Live data from Hacker News

Rob Pike interview

evrone.com

171–180 of 273 posts

Re: Rob Pike interview

#171
post #25

Go is the language that made me realize I’m not much of a production quality software engineer. Normally I would be quite happy riffing with ideas in Ruby or Python, and just running my code and iterating trying to figure out what to do. When I tried this in Go, every time I wanted to change the shape of my code to try doing things slightly differently I had to do a lot of work to get the code to compile again. I fee…

This isn't true at all. Go is not the tool of choice for experienced professional programmers for exactly this reason. The ability to quickly refactor code is very important and Go fails at it horribly for a number of reasons. 1) sheer verbosity. 2) multiple return makes altering function signatures tedious. 3) no generics mean code is written in hard to refactor styles out of the box 4) poor reflection support 5) po…

I am going to disagree pretty heavily with this. You don't give any explanations, evidence, or mention your experience, so let me lead with mine before I explain where I think you are wrong.

I cut my teeth in the 90s with C, and have professionally used PHP, Python, Java, C#, Javascript (both server and client side), and have been using Go as my main choice for the past 4 years. I've worked on teams as small as 1 up to teams in the hundreds, both as an individual contributor and tech lead. I say all that because I would consider myself an "experienced programmer". I am mostly writing APIs for web and mobile apps to communicate with, although I have written code in a wide variety of contexts. I say all of that because I can't imagine going back to Java or Python. I even migrated a bunch of my services from Typescript to Go because I found Go to be far more productive and easier to work with. Refactoring as always been easy. At my current job as a Chief Software Architect, I have over 25,000 lines of code in production running Go. I say all of that to provide background and context on my humble opinions.

1) Verbosity is among the leanest I have seen for a type-safe language. Compared to Java or C#, it is much more like Python. Perhaps the most verbose sections are a repetition of "if err != nil" blocks, but those are there for a reason and I explicitly prefer that over long "try catch" blocks.

2) Not sure what you are arguing here. If you are talking about functions returning multiple values, many languages do that. If you really don't want to, return a struct or a map. Or choose to not return multiple values. That is a choice of the programmer, if I understand you correctly. You could also use any of the major editors (I prefer VS Code) to refactor; the tooling is awesome (see #5)

3) Maybe it is due to the nature of what I do, but I have never once thought "man, I wish I had generics for this." I am sure there are some who genuinely need it, but I haven't run across that in my own experiences. I find that structs and interfaces have been everything I needed there, but again, my use case is on the server.

4) I haven't needed to use reflection either, so I have no comment here.

5) Hard disagree. GoLand (by Jetbrains) and VSCode are INCREDIBLY powerful. I will never go back to Eclipse or Visual Studio if I can avoid it. Go ships with tons of tools (formatters, linters, vetters, etc) and integrate with a ton of others (delve, etc). So your statement simply isn't true.

Your last statement is probably what drove my response. I was able to spin up a full API server incredibly quickly alone, and then with one other person, in a fresh startup with minimal issues. Rules and requirements were changing daily, so the code and business logic had to change. I can't imagine having to do that kind of work in Java (don't get me started on the deployment story here...). I would argue Go is a great fit for small teams. It is a small language with opinions, so programmers can focus on their use case.

Go isn't perfect, but it's my tool of choice. That's my two cents though.

Re: Rob Pike interview

#172
post #118
post #78

Earlier quoted context omitted.

Huh? I am sure 80%+ of AWS is Java and probably 90%+ of Azure is C#. I doubt it is going to change any time soon. Kubernetes is but one successful cloud product out of Google, and it just happened to be written in Go. There are even rumors in that thread about it starting as Java.

Go is reasonably big on the open source side of the cloud space.

Not sure what you mean by "open source side" of the cloud space. PostgreSQL is still C, and Mongo is still C++ + Node.js.

Re: Rob Pike interview

#173
post #160
post #22

Earlier quoted context omitted.

I would entreat you to not be afraid of Golang. To be frank its adoption speaks to a desire to make software that does not require (or, often, benefit from "staff SWE" skills). Treat it as what it is, a jumped-up, terser, and in some ways gutted Java, and give it another go. It is designed, to a fault--and this is a little pejorative, I absolutely do not enjoy writing Golang because of it--to be not that hard .

golang is not terser than Java for any non-trivial code bases, it's quite the opposite.

FWIW, I don't disagree. That is, however, the general impression. :)

Re: Rob Pike interview

#174
post #22

Earlier quoted context omitted.

I would entreat you to not be afraid of Golang. To be frank its adoption speaks to a desire to make software that does not require (or, often, benefit from "staff SWE" skills). Treat it as what it is, a jumped-up, terser, and in some ways gutted Java, and give it another go. It is designed, to a fault--and this is a little pejorative, I absolutely do not enjoy writing Golang because of it--to be not that hard .

This is my impression too. I was at Google when Golang v1 was released, and my friends and I were hobbyist language geeks and decided to play around with it. We were....not fans. We were already in the habit of writing extremely clean and healthy code[1], and having a language hand-holding and hectoring us into doing things in its narrow, specific way was just too much of a hit to productivity. Now that I work in a C…

This is largely where I'm at. I've never gotten paid to write C++, though I've written my share, and I went through Scala, Ruby, Kotlin, a little Elixir and a little Rust, and now almost exclusively TypeScript--and I just don't need what Golang wants to make me do to do a good job and to output high-quality code.

Re: Rob Pike interview

#175

Go is the language that made me realize I’m not much of a production quality software engineer. Normally I would be quite happy riffing with ideas in Ruby or Python, and just running my code and iterating trying to figure out what to do. When I tried this in Go, every time I wanted to change the shape of my code to try doing things slightly differently I had to do a lot of work to get the code to compile again. I fee…

I had an initial period where Go felt really difficult, coming from Python. Now I've adapted and I actually feel like refactoring things is easier than it was before coming to Go. Just the fact that arguments and their return values are more strictly defined helps a lot.

This is not that obvious, since many people are resisting it, but if you ever tried to use type annotations in Python, it dramatically improves refactoring (from my experience PyCharm it actually is more reliable than GoLand), you get autocompletion and bug detection. Highly recommend this for large Python projects.

Re: Rob Pike interview

#176

A few fellow OpenStack developers and I half-jokingly suggested we rewrite some or all the services in Go. Python gets to be a bit hard to deal with at that scale.

I used to work at an Openstack shop (small public cloud) We considered this several times, very much not-jokingly. Ultimately the investments never came. At least for Swift the object-server was re-written in go as an alternative implementation.

Heh ours started out as "We should rewrite Nova and Neutron and then Ironic..." That's awesome that Swift was. I always felt like Swift was one of the more solid services, but maybe that's because I rarely had to deal with it.

We actually did write and deploy a small Go rescue agent for bare metal machines in Ironic. I'm not sure if that every got upstreamed though.

Re: Rob Pike interview

#177

Earlier quoted context omitted.

Just take the time to learn it, it's really trivial once you take the time to learn the basic types. You have lists, dictionaries (maps), and primitives. It could not be easier.

I think the real problem is that yaml encourages you to make things declarative (which is 99% of the time a good thing) but sometimes hiding complexity is the wrong thing, and so when you have clashing declarations, the imperative resolution path is not necessarily explicit, and hidden behind an operations layer that you can't really see or reason about. For some reason YAML seems to be an attractive option to try to…

Markup languages are by their nature declarative. Take HTML, for example. You're providing a set of instructions for some other, smarter program to create some output based on your declarative input.

YAML is no different. You encode some configuration, something else makes it so.

Ansible kind of muddied things up because it looks like you're doing imperative things in YAML, but actually, you're doing declarative things and Ansible is interpreting your YAML in some particular way.

Re: Rob Pike interview

#178
post #66

Earlier quoted context omitted.

Use - maybe. Is it the most used lang in these companies? Probably not.

For Dropbox and Uber, it is.

I thought Uber was node.js company (to the point that they had to rewrite existing solid projects, because they weren't in node.js)

As for Dropbox I was convinced primary language was Python.

Re: Rob Pike interview

#179
post #175

Earlier quoted context omitted.

I had an initial period where Go felt really difficult, coming from Python. Now I've adapted and I actually feel like refactoring things is easier than it was before coming to Go. Just the fact that arguments and their return values are more strictly defined helps a lot.

This is not that obvious, since many people are resisting it, but if you ever tried to use type annotations in Python, it dramatically improves refactoring (from my experience PyCharm it actually is more reliable than GoLand), you get autocompletion and bug detection. Highly recommend this for large Python projects.

I didn't like type annotations in Python, but I didn't like Go's type system either when I started. I'd be willing to take a second look at types in Python now. But, my real reason for choosing Go was for performance, and it blows our previous solution out of the water. Go isn't perfect but I'm pretty happy with it for right now. I still use Python for a lot of other things though.
Post reply on HN