1 of 24

Go�Good Intentions, Bad Outcomes

I know you mean good, but….

​

2 of 24

Who Am I ?

  • Senior Director of Software Engineering in Dynatrace
  • Debugging Addict
  • Low level geek and polyglot

CONFIDENTIAL

2

3 of 24

What we’ll talk about ?

  • What’s “Good Intentions, Bad Outcomes” ?
  • Real world examples
  • Go examples
  • How to cope with those outcomes

​

​

CONFIDENTIAL

3

4 of 24

Good intentions, Bad Outcomes

​

  • You meant well
  • You thought hard
  • The real world showed up

​

CONFIDENTIAL

4

5 of 24

What you usually meet

CONFIDENTIAL

5

6 of 24

The Laffer Curve

  • Increase taxes
  • Get more money or lose money?

​

6

7 of 24

Ballmer Peak

CONFIDENTIAL

7

8 of 24

CAFE (Not the drinking kind)

  • Corporate Average Fuel Economy
  • Improve fuel consumption and save the world
    • Shift to Larger Vehicles
    • Increased Emissions
    • Safety Concerns

​

​

8

9 of 24

No Exceptions

  • Go has no exceptions
  • Developers like exceptions
  • Developers will do anything to get their exceptions

​

​

9

func tryFunction() {

defer func() {

if r := recover(); r != nil {

fmt.Println("Recovered from panic:", r)

}

}()

throwingFunction()

}

10 of 24

No Exceptions

  • Rebels among us
    • https://github.com/mitranim/try

​

  • Try proposal
    • https://go.googlesource.com/proposal/+/master/design/32437-try-builtin.md

​

​

10

11 of 24

Error Handling Explosion

  • Make error handling visible and clear
  • Gotta handle each and every error
    • Ignore errors when handling them
    • Too hard to follow and read
    • Inconsistent error handling

​

​

11

12 of 24

GDPR and Cookies

  • Make users aware of their privacy
  • Make users agree to anything

​

​

12

13 of 24

Go Routine Abuse

  • Easy concurrency and efficiency
  • If it’s easy and accessible, should we really use it everywhere?
    • Resource Exhaustion
    • Leaks
    • Complex Debugging
    • Unintended Blocking

​

​

13

14 of 24

Betamax VS VHS

  • Superior quality closed-sourced format Betamax
  • Open-sourced free-for-all VHS
    • Everybody manufactured VHS
    • Closed-sourced lost

​

​

​

14

15 of 24

Git Repository Package Management

  • Let’s be transparent and collaborate
  • Higer complexity in proprietary code and sensitive 3rd party libraries

​

​

​

15

GOPRIVATE

GOPROXY

GONOPROXY

GONOSUMDB

GOSUMDB

16 of 24

Go cross compilation

  • Go is architecture dependent
  • Just cross compile and have no worries
    • Testing limitations
    • Users meet bugs first
    • Increased complexity

​

​

​

16

17 of 24

The Australian Cane Toad

  • Cane Beetle problem?
  • Let’s just throw some toads at them
  • A whole new problem rises
    • Agriculture damage
    • Killing multiple predators

​

​

​

17

18 of 24

GOMEMLIMIT

  • Let’s solve OOMs
  • What about that CPU ?
    • Performance Degradation
    • Complex Configuration

​

​

​

18

19 of 24

Out of order declaration syntax

  • Let’s make it simple and readable
  • Why make it simple when we can confuse experienced developers?

​

​

​

​

19

var x int vs int x

20 of 24

How do we rewire our brain?

20

Lotus Bridge, connecting RHD Macau and LHD Mainland China

�

Brazil on the left has RHT. Guyana over the Takutu River on the right has LHT�

21 of 24

No Default Argument Values

  • Make function calling explicit, readability and maintainability
  • Will the developers get used to it?

​

​

21

22 of 24

No Default Argument Values

22

23 of 24

Nature always finds a way

CONFIDENTIAL

23

24 of 24

All Gophers created with Creative Fabrica�https://tech.creativefabrica.com/

CLOUD DONE RIGHT