(This is partly a response to a HN thread I read some time ago, but I didn’t really find the time to answer until now. The TL;DR was something along ‘Fire your script kiddies, hire some “fat guys” that only do Java, C++ or C and kick ass! They’re organized in some super-secret guild, they probably won’t work for you, but they’re worth every penny’)
Now there is something I believe in very strongly. You could call it my secret life agenda: I think that dogmas are pure evil. They are poisonous and pretty dangerous. And in all the years that I’ve spent in technology, I’ve seen it happen over and over again.
I’m what the author of the aforementioned post would call a hipster, because what I do for a living right now is programming PHP. I’m even doing it by choice, take that. Now why would anyone do that if Ruby is way cooler, C is faster, Java is more robust and Erlang is more performant in parallel execution? Why would I do that if I can even understand and write all of these just mentioned languages (to a degree)?!
Simple: For me, it’s the right tool for the job at hand. It gets done what I have to do right now (which is solving various small to medium sized problems with a user base that one server can easily handle) and it does so FAST. Windows is a first-class supported system, it’s a breeze to deploy almost anywhere and it has all kind of special tools out of the box. Accessing an LDAP server in three lines? You got it. And yeah, I actually do need that, because right now I’m what you’d call a very highly qualified plumber.
The point is that there are two kinds of fast. Fast as in “writes fast” and fast as in “runs fast”. And you should simply go for the right tool for the job.
Twitter wrote their stack on Ruby on Rails and later ported almost all of it to the JVM. So were they wrong about their choice? The surprising answer is probably a resounding “no”. RoR got them to the point of having a viable product to the market in record time and keeping ahead of the competition for as long as they needed to aquire a massive user base and sufficient funding. When they grew to the point that deploying 10x the amount of servers for basically the same work cost them more than paying a few “fat guys” to port the backend to the JVM, they did, and it was the smart thing to do at exactly the right time.
I’ve been in a Java shop before and because of their insistence on doing everything in Java (yes, even the frontend), and doing it all on a three-tiered “Service Oriented Architecture”, their development pace crawled down to a snail’s pace, because for a simple text or CSS change, you had to recompile the massive stack in the name of “performance”. It wasn’t any better or cleaner than the C++ mess they did before, only more extensive and mind-numbingly boilerplate. You really, really wouldn’t wanna do that if you like to keep your exceptional developers.
Now I can’t state credibly that there are no bad languages (try COBOL or Brainfuck for a change), but they were all shaped to serve a certain purpose, and if it is just getting good in enduring pain, like Malbolge.
On the other hand – sorry to break you the news, but there are no good languages either. I know it’s hard to believe after listening to a Haskell or Scala enthusiast for an hour, but if it really exists, it must be TS/SCI and used in some super secret government lab, because otherwise, it would be used everywhere.
With closeness to the machine (C, Assembly) comes blazing speed, but it gets messy and error-prone. With high abstraction (Python, PHP, Ruby, JS) comes productivity and dev speed, but at a performance penalty, with static VM’ed languages (Java, C#) somewhere in the middle as a tradeoff to both sides.
And I didn’t even mention all the special areas. If you need realtime, have a look at Ada. Massively parallel? Try wrapping your head around something functional. R for statistical analysis – hey, even Batch and VBScript, if your sorry job is to make MS Word spit out a PDF on an arbitrary windows system without any further ado. Yes, I did that and I felt dirty. But so what, it worked pretty quick, pretty well and it still does to this day. No COM, no bloated PDF library, just 50 lines of code combined. That’s my idea using the right tool.
In my very humble opinion, it’s usually a better approach to use a good general purpose, high level “scripting” language and framework of your choice early on, and then go deeper into the system as you see fit, than to bring in the “fat guys” early. Premature optimization is something that doesn’t just apply to a language but to architecture as well. So you’re doing video encoding? Don’t even stop at Java or C, go right for (inline) assembly. Exposing the videos as an API? You’ll be an order of magnitude faster and cleaner using RoR, and if you’re hitting a performance brickwall, you can still do it in Scala or whatever suits your needs. You always have the time to redo the relevant part of your code when and only when it makes sense economically.
Seriously, entering your problem domain with the right tools and mindset can make or break your day.
TL;DR:
There are no “hipsters” and there are no “fat guys”. There are only good programmers and bad programmers. 95-percentile-programmers know about the limits of the technology they are (mainly) using – and they will be open to use something else if appropriate.
Language doesn’t influence your skill, only your productivity for a certain domain.
And while I can see reasonable value in not letting your code base fall apart to several languages and frameworks: Think twice if it really looks like a nail before you hire a “fat guy” and get out your HammerFactory.getInstance()
Do me a favor – and just use the right tool for the job.
Playframework 2.0 with Scala build in brings a cool functional way to develop applications, with a fast, robust and Strong typed environnement (even routes and templates are compiled). And it also took some aspects from Haskell for async features. If you haven’t yet, you should have a look at it !
Lol @Walter!
Reread the article! And now think!!! And then read what you wrote down… an astonishing conclusion might light your day.
Exactly why JavaScript proliferation is bad!! It’s good for many things, but we really need to have a better language sometimes, like CoffeeScript.
Couldn’t agree more in general. I would add that the platform par-excellance for that type of thinking has always been Unix. The entire philosophy of Unix is to have numerous small tools that each do a simple job well, and an overlaying architecture that encourages the plumbing of these tools together to do larger jobs.
Your current job language (php) was really develped on Linux, and I was actually surprised to see you use it on Windows and did not even acknowledge its Linux heritage (while I understand that Windows can be the right platform for other reasons).
One of the reasons I love my current job is that I can (by and large) choose the tools I use for coding, even though I was hired primarily as a C++ coder (fat guy?). I am actually most at home (and productive) shifting from sh to perl to php, knocking out a quick web front-end in rails and throwing in the odd line of awk and sed.
Very good points. By the way: Did you notice we almost have the same name?
Do you think you could easily pass on your code to another programmer for maintenance?
No matter how fast you write or run, if anything goes wrong. Do you somtimes think about ‘fast debug’ ou ‘fast tune’ ?
You should look into NetRexx. It has been open-sourced by IBM and it produces code for the JVM.
Bob Hamilton
Richardson Texas USA
I one of the “fat guys”, but at present I code mostly in PHP, HTML5, CSS3 and jQuery,with a bit of Objective C. The reason is that I’m working mostly on WordPress websites, (including building themes and plugins), and iOS. In the past I spent many years writing Assembly code that was part of the APL interpreter. APL was the original write fast, run slow language, it was claimed that you could do Fourier analysis in one line! Since then I’ve spent a lot of time writing C, C++, C# and Java, even venturing into the dark world of JSF and all its pomps.
One of my favourite hobbies is woodworking and I own a full sized SawStop table saw, it’s very nice, powerful and safe, I also own several Japanese hand saws which I use almost as frequently. Some things, like cutting small parts, are actually quicker, easier and safer with the hand saw. By the time I’ve set up the machine, I could have finished the work by hand. Other things, like cutting 24 identical pieces or ripping a 4×8 sheet of plywood are much better done with the machine.
The people working in the traditional crafts know which is the right tool and usually have whichever is needed at hand. Someday the software craft will learn the same thing.
Good post, apart from dissing COBOL. Which is an excellent language if you want the right answer to financial calculations instead of an approximate one (38 decimal digit precision).
Pingback: friday links 9 « A Programmer with Microsoft tools
Languages are just tools. Is is more important to learn the five programming paradigmns that exists. Languages are just represetations of AST and compiler that process it. Sintax change, method library also, but concepts that you learn dont change at all. Software enginering is now thirty years old.