6 ms·
Today, I got a request for a secure message passing service from our CTO. My group, which is a small team of 2 *nix geeks in a company with ~20 mostly c# develo
by fixxer 11y ago
Today, I got a request for a secure message passing service from our CTO. My group, which is a small team of 2 *nix geeks in a company with ~20 mostly c# developers, has become a bit of a skunkworks operation as we have been responding to external constraints and forced to move quickly.
I was able to implement the service per the provided spec in 179 lines of Go in about ~2 hours. Stress tests passed. The job is done. We march on.
Could I have written this service in C++? Absolutely, but it would have taken me 20 hours to get to the same level of confidence. Maybe some could do it on 2 hours; I'm admittedly not a great C++ developer or frequent user.
Could I have written it in Python? Sure, but I would have had to scale and put it behind a load balancer, adding complexity to get equivalent performance.
From what I've seen of Rust, I like it and plan to give it more time now that it is stable. I haven't spent time with D. I played with Erlang. I don't care for Haskell for anything remotely related to "work", but I don't dispute that it has a place in computer science.
In my 2 years with Go, this is not my first positive experience. I have found that Go works well for cranking out high fidelity, snappy services like this. I think this is the result of the language's constraints enforcing simple patterns. Unlike C++ and Python, there are not a huge number of ways to accomplish tasks (at least not ways that feel natural).
Take it or leave it, but I like Go (for certain things).
- nly 11y ago> Could I have written this service in C++? Probably. C++ productivity really relies on knowing good libraries, and having the freedom to use them. Without details, I'd wager you could have done it in 300-400 lines. If you gave a brief overview of what you needed, I'd describe my first instinct for doing it in C++.
- istvan__ 11y agoYes, correctly exposed concurrency is a pretty amazing thing. CSP ftw! You could as easily do it in Clojure, Erlang or any language that supports that.
- threeseed 11y agoI don't understand what I am supposed to take away from this though. If you were a strong C, C++, Java, Scala, Clojure etc developer you could equally deliver a highly scalable solution in 2 hours. I haven't seen anything yet to show why Go is fundamentally easier to deliver solutions except for single binary development which isn't really an issue for server side development.
- sagichmal 11y ago> If you were a strong C, C++, Java, Scala, Clojure etc > developer you could equally deliver a highly scalable > solution in 2 hours. I guess the point is, no, you couldn't. An equivalent solution would be less robust/reliable or take (much) longer. Or both.
- coldtea 11y agoWith some of this languages it would have been much faster AND much more reliable.
- sagichmal 11y ago> With some of this languages it would have been much > faster AND much more reliable. I don't think that statement is validated out by the body of evidence we have about Go. But, this is all hypothetical, anyway.
- merb 11y agoI think the language doesn't matter It has more Ton so with Ohr Brain. Sole People feeling Continental with go sind bot. Sole Need generis Sole not. Language doesn't matter too much Write The Language which Young Feel is right foR the job
- fixxer 11y agoWhat was your takeaway from the blog post?
- pixie_ 11y agoIf you have 20 c# devs, why not code it in c#?
- serge2k 11y agocause that's enterprise BS friend, we gotta be more webscale.
- wz1000 11y ago> I don't care for Haskell for anything remotely related to "work" Why not? Haskell seems perfect for this task. It has fast, robust and safe concurrency and GHC's IO manager is highly optimized and insanely fast.
- Dewie3 11y agoAs a * nix geek it's beneath his station. Welcome to the flip side of the academic ivory tower, the scoff at academic stuff because it doesn't "get shit done".
- k_bx 11y agoIt does "get shit done" for us perfectly, and type-system only helps here. So I still don't see why it's not suitable for *nix geeks. Give it a try!
- saurik 11y agoI read Dewie3's comment as agreeing with you, albeit via sarcasm and cynicism (and some negativity).
- Dewie3 11y agoRight you are. I'm here all night.
- f0nd004u 11y agoTry building a package with Haskell dependencies for a linux distribution sometime. It is horrifying.
- codygman 11y agoJust built my project on NixOS with no problems. Built it on Ubuntu with a cabal sandbox, no problems. Using stackage LTS I have no problems. Built it using Halcyon as well. Building with vanilla cabal I might have some issues, but professional haskeller's use the tools mentioned above.
- serge2k 11y agoyou could also have written it in Java, or C#, and been done quickly with a solid result. Not sure why you didn't compare to 2 languages at about the same level, and instead went with a lower level and a higher level language.
- deleted 11y ago[deleted]