News for hackers. Stuff that matters.
Re:How Go helped save HealthCare.gov by mbesto on Monday November 09, 2020 @04:42PM (#25040310)
> building modern, reliable digital infrastructure for government

And how about well supported? How resilient is the technology going to be in 15 years and how easy will it be to find developers? How much are those resources going to cost versus say .NET, PHP, Java, etc.?

Re:How Go helped save HealthCare.gov by casept on Monday November 09, 2020 @04:47PM (#25040360)
Go is sufficiently trivial that anyone who dares call themselves a programmer can learn it in two weeks if they already have experience in some even remotely-related language.
Re:How Go helped save HealthCare.gov by meddlepal on Monday November 09, 2020 @09:49PM (#25042395)
As others have noted, this is one of the areas Go really shines at (and I am not a Go fan). The lack of language features really forces most code into a limited form of TOOWTDI and because it has pretty opinionated choices about loops, conditionals, errors etc... you really don't see much Go code that makes you scratch your head.
Re:How Go helped save HealthCare.gov by Cthulhu_ on Tuesday November 10, 2020 @04:15AM (#25044058)
Plus - at least so far - it hasn't aged; they are reluctant to make backwards-incompatible changes, and right now they're really humming and harring about whether or not to add generics. The biggest changes you'll see in Go codebases from 10 years ago vs modern will be Go's module system / dependency management and the `context` package sprinkled as an argument to some of the API methods.

Compare that to other languages (from the top of my head, don't pin me down on details or inaccuracies please):

- Java: Added generics, annotations, lambda expressions and streams, new date/time libraries, modules, switch expressions and multiline strings.

- PHP: Added classes, types, null coalescing operator, etc

- Javascript: Classes, ES6 features (arrow functions), imports, and offshoots like Flow, Typescript.

- Obj-C / Swift; ARC, Swift itself (4 versions), I haven't been up to date with this much.

TL;DR, most languages really shift over time, often 'borrowing' features from other languages, but Go resists these changes because it's intended to still be read and compile in ten, twenty years' time.

Personally, I'm working on a management interface for a network application; the existing UI has been around since 2012, I'm trying to build this to last at least as long, probably longer, and I think Go is a great choice for it. The old application was built in PHP 5.2, which is vastly outdated now (and updating is challenging because on the one hand, the versions of RHEL used in production don't supply newer packages, and on the other there's 65K lines of badly written PHP that would likely need to be updated).

Conversely, the new Go back-end is standalone and self-contained, I try and maintain the habit of updating the Go version and all dependencies monthly; so far I've never had to make any code changes or had to rethink my architecture because of Go adding a new (architectural) feature. (I probably have the benefit that it started after `context` and the module system were in place though). I feel a lot more confident in its future proof-ness. And I feel confident that anyone looking at the code can maintain it, although that said I'm cautious about the more magic parts like GORM, which I should probably swap out with lower-level SQL at some point but I don't really want to.

Re:How Go helped save HealthCare.gov by porknubbins on Monday November 09, 2020 @08:35PM (#25042003)
I did just this, learning Go to do MITs Distributed Systems course. It has the speed and easy of dynamic scripting language plus a ton of sane defaults where JS and Python have quirks, and is compiled. My understanding is the major downside is the performance has stalled at 2-5x C++ which is not enough for systems infrastructure projects.
Re:How Go helped save HealthCare.gov by chinhodado on Tuesday November 10, 2020 @12:27AM (#25043047)
What do you mean 2-5x C++ performance?
Re:How Go helped save HealthCare.gov by barell on Tuesday November 10, 2020 @01:05AM (#25043200)
I think he means C++ is 2x to 5x faster to run than Go. I saw many benchmarks and not sure if that is true though. Go is still one of the fastest out there.
Re:How Go helped save HealthCare.gov by cryptos on Tuesday November 10, 2020 @06:05AM (#25044635)
According to micro benchmarks C is about twice as fast as Go.

https://benchmarksgame-team.pages.debian.net/benchmarksgame/...

That is already pretty fast, and I guess the difference in practical scenarios would be even smaller since external systems like DB's won't change their speed if you call them with another programming language and because production code is not always as optimized as benchmark code.

Re:How Go helped save HealthCare.gov by porknubbins on Tuesday November 10, 2020 @08:18PM (#25054457)
Sorry, I mean in benchmarks Go took 2-5 times what C++ did to complete.
Re:How Go helped save HealthCare.gov by aeyes on Monday November 09, 2020 @07:31PM (#25041657)
This project might not have a million lines of code but how maintainable is the codebase going to be in a few years once the original authors have moved on to other projects? Is the code organized to be easily readable? Java is very expressive but that's a good thing from a maintainance standpoint.

Also, the ecosystem is very young so you don't know which libraries will still be around in 3 or 5 years. You might find yourself reworking large parts of the code for betting on the wrong horse.

Re:How Go helped save HealthCare.gov by jshen on Monday November 09, 2020 @08:06PM (#25041854)
I've been coding for decades and Go is the best language I've used in terms of being able to easily read and understand other peoples code. It also "feels" very maintainable to me, but it's hard to speak empirically about that.

I've also found that most libraries in go hold up well over time. In fact, I just recently needed to write a go program that could use some code i wrote many years ago and haven't touched in nearly as many years which used a few external libraries. I literally copy and pasted my old code into my new project and it just worked.

Re:How Go helped save HealthCare.gov by Cthulhu_ on Tuesday November 10, 2020 @04:18AM (#25044065)
One part of the ecosystem and community is that they tend to pull up their nose at using too many libraries, especially if they're too different from the standard library. A lot of people come into e.g. the Go slack channel and ask "What is the best web application framework?", because that's the go-to thing when you do e.g. Java; the common answer is "YAGNI", because the standard library is good enough. If not, there are some really lightweight libraries on top of the stdlib that do things like adding route matching, or slight conveniences to do SQL.
Re:How Go helped save HealthCare.gov by mbesto on Monday November 09, 2020 @07:38PM (#25041691)
> Also, the ecosystem is very young so you don't know which libraries will still be around in 3 or 5 years.

This is precisely my concern. It's all good and well that we have these "Google level engineers" taking over government projects. But when the boredom runs out (or they go back to the private sector), who takes over?

I suspect the first people who wrote gov't applications in COBOL felt the same way...and you know how that story ends.

Re:How Go helped save HealthCare.gov by nrr on Monday November 09, 2020 @08:07PM (#25041859)
I think the obvious answer is to make it compelling for those kinds of engineers to consider civil service as a long-term option. Right now, 18F positions on the general schedule, which is probably where ICs would land, are time-limited up to, I think, four years.

That said, we should perhaps not have Google engineers live the meme of bringing their flavor of complexity everywhere they go, but I feel that having permanent FTE positions within government agencies specifically for bolstering up the competency and cost-effectiveness of information technology projects is overall a good thing.

My suspicion is that the majority of the projects that agencies like the GSA undertake (through its TTS arm, of which 18F is a constituent part) are ho-hum boring business IT projects, where most of the complexity comes not from the technology itself but from having to deal with getting a handle on the meandering specifications laid down by stakeholders (read: the plebiscite via representation in Congress).

I further suspect that the engineers that are recruited by 18F and the USDS tend not to go into the weeds on immediately building out, e.g., systems like Chubby and Stubby and D/GFS and Bigtable for the sake of it but rather tend to focus on trying to solve the problem at hand. I feel that the requirement to submit timesheets (and, hence, justify time spent) every week tempers that "every problem is tempting" feeling. Anecdotally, it did for me when I worked at a similar three-letter organization, albeit in the private sector, for the better part of half a decade.

Re:How Go helped save HealthCare.gov by quotemstr on Monday November 09, 2020 @04:56PM (#25040445)
You could have said the same about pre-generics Java. The problem is that when the language is simple and minimalist, people do things with the language that are byzantine and arcane, and you can't learn those in two weeks. Example: classic Spring's XML configuration inner platform.
Re:How Go helped save HealthCare.gov by socialdemocrat on Monday November 09, 2020 @05:38PM (#25040816)
No you couldn’t. I watched both Java and Go since they got released and Java really quickly went into the over-engineering and complexity camp long before generics. I worked as a consultant doing Java long before generics and the culture of over-engineering was already there. The language also really encourage it.

Go is an entirely different beast. The language, libraries and whole community is really worshipping simplicity in a way Java never did.

Just look around a bit at the standard library. There are pretty much no setters and getters. No inheritance hierarchy to speak of. Not even constructors most of the time.

It is not without reason that Go angers a lot of people that think they know how to do software. It breaks all the rules they have kept sacred, that they think all “real” programmers should follow.

Think about it this way. If Java is SLS assembled in a clean room never getting done, then Go is more like SpaceX assembling a rocket in open space with guy who normally weld water towers. It isn’t how it is supposed to be done but it works and they get shit done 20x faster.

Re:How Go helped save HealthCare.gov by mbesto on Monday November 09, 2020 @07:39PM (#25041705)
> The language, libraries and whole community is really worshipping simplicity in a way Java never did.

Isn't that because it's essentially "new"?

Re:How Go helped save HealthCare.gov by Cthulhu_ on Tuesday November 10, 2020 @05:26AM (#25044402)
It's been released (or gotten a 1.0 release) in 2012 but in development since 2007, so relatively as old as Java 5 since Java's inception; compare the features added to Java with those to Go: https://en.wikipedia.org/wiki/Java_version_history vs https://en.wikipedia.org/wiki/Go_(programming_language)
Re:How Go helped save HealthCare.gov by nrr on Monday November 09, 2020 @08:43PM (#25042038)
I don't think so. Go looks to be focusing mostly on systems-level problems and the kinds of applications that orbit that concern.

Java, on the other hand--at least when you control for the confusion around whether "Java" referred to the JVM, the language, the base class library, or the security model--was looking to take on C++ and the kinds of software people were looking to write in 1996 in C++.

You can write line of business software in Go, but that doesn't really feel like its purpose in life. The language fights you a little bit when you try to do that.

Re:How Go helped save HealthCare.gov by yesdocs on Monday November 09, 2020 @06:11PM (#25041109)
News flash: this is what they said about COBOL, C, C++, JavaScript, closure, etc. as well as architectural patterns such as OOD or functional programming. Every language, and every platform has it’s nuances. You can do silly, non performing things in any language or platform. To assume a particular language will solve all your woes is outright naive and exhibits no memory of past software engineering concepts.
Re:How Go helped save HealthCare.gov by ineedasername on Monday November 09, 2020 @07:16PM (#25041544)
You are basically saying that no language is a silver bullet and any of them can go badly wrong, which is trivially obvious and not a productive addition to the discussion. If you have specific criticisms of this approach, that would be much more constructive.
Re:How Go helped save HealthCare.gov by yesdocs on Tuesday November 10, 2020 @10:06AM (#25046748)
When you claim history is ‘not productive’, you have taken the fool’s path.
Re:How Go helped save HealthCare.gov by geodel on Monday November 09, 2020 @06:17PM (#25041156)
Nope. Java complexity came straight from Sun and friends. J2EE / EJBs (came in 2000) did not come from some randos, it was official Sun specification and supposedly standard way to develop any enterprise application.
Re:How Go helped save HealthCare.gov by jshen on Monday November 09, 2020 @08:08PM (#25041865)
I think Go has held up pretty well on this front, and I've also found a good heuristic to detect if libraries aren't doing this well. Check and see if they use the empty interface type a lot (this is the All or Any type in go). It's a code smell for me if I see a library using it a lot.
Re:How Go helped save HealthCare.gov by paulsmith on Monday November 09, 2020 @08:10PM (#25041876)
This is something we think about and discuss a lot. We take the implications of using the word "infrastructure" seriously. There is a healthy scepticism among the team about new & shiny. We try to be conservative in our technology choices, recognizing that the externalities of those decisions will be borne by others, including the taxpayer. That said, we also have to be mindful that users' expectations about technology change over time, based on their experiences with the consumer world, so we also have a pressure to at least be conversant with new stuff and evaluate it regularly.

I think this is a rich space for practitioners to comment on. We are in the midst of a mass conversion of the delivery of government services into digital channels. It's important that we approach it as if it were physical infrastructure, for a host of reasons.

Re:How Go helped save HealthCare.gov by ineedasername on Monday November 09, 2020 @07:11PM (#25041515)
why wouldn't it be comparable to any other modern, reliable digital infrastructure? Those are not terms I would use to describe something that was going to become a horror show to deal with in a few years.