News for hackers. Stuff that matters.
Re:How We Went from 30 Servers to 2: Go by gilgoomesh on Tuesday March 12, 2013 @08:15PM (#5365928)
> Any serious programmer should be a polyglot by default.

It depends if you're going to spend years training someone or if you need an expert right now.

My experience is that it is impossible to maintain expert level skills in more than one or two language + library environments. You can remain familiar with other environments but you don't have the time to be an expert.

While I sometimes switch between C-family languages for different projects, it can take months to get up-to-speed with the changes in a language and its environment since you last programmed in it. I'm talking about situations where I know the language well but the environment has changed. Languages change a little but the libraries they use can change dramatically. And along with the change comes a whole body of implied knowledge about how to safely and effectively use it all and this impacts on how you use the language itself.

If you've literally never programmed in a language before, it can be a few years before you know about all the eccentricities, before you understand why the language follows certain patterns, before you understand the risks with certain behaviors.

If you need an expert now, not in 12 months time, then they need to know both the language and the environment. If you can wait a couple months, then they still need to know the language.

Re:How We Went from 30 Servers to 2: Go by timr on Tuesday March 12, 2013 @10:02PM (#5366339)
"It depends if you're going to spend years training someone or if you need an expert right now."

I'm not going to claim that there are no legitimate reasons to hire people who are narrow experts in Blub (and only Blub), but I'm having a hard time thinking of any.

At an established company, you've got the luxury of time -- there's rarely a good reason to "need an expert right now" that isn't just a contractor. At a startup, where hiring the wrong person is a disaster, hiring an "expert right now" is like holding a loaded gun to your head. Ideally, you should be hiring "T" people -- lots of breadth, with lots of depth in at least one area.

A truly good programmer will pick up your language/framework in days, and be at full productivity in months, even from scratch. It's hard to do better than that.

Re:How We Went from 30 Servers to 2: Go by jbooth on Tuesday March 12, 2013 @10:42PM (#5366471)
Even at an established company, a really smart language newbie could write a bunch of ad-hoc code that does almost the same thing as well-understood libraries that everyone more experienced in the language uses. Even if his code was relatively high-quality, now you have a bunch of extra stuff to maintain, and everyone who interacts with it will have to learn this thing instead of just using the library everyone knows. I've done this in languages I'm unfamiliar with and will probably continue to do so.
Re:How We Went from 30 Servers to 2: Go by timr on Tuesday March 12, 2013 @11:00PM (#5366540)
Not Invented Here syndrome goes away with general experience. It doesn't come back every time you switch to a new language.

Just because I've never written Erlang doesn't mean that I will automatically try to write a random-number generator (say) the first time I need one in Erlang. I have enough experience to look for a library function first.

Empirically, NIH tends to be more common in single-language developers, not less. People who place a lot of value on their "expertise" in Blub tend to do so because they're over-weighting the importance of their memory of the API details. When they don't automatically remember something, they leap to the conclusion that it doesn't exist. They're also typically a less-experienced cohort than people who have written in lots of different languages.

Re:How We Went from 30 Servers to 2: Go by jbooth on Tuesday March 12, 2013 @11:10PM (#5366570)
I wasn't talking about NIH syndrome, I was talking about "I don't know that a common library exists for this standard use-case so I'm going to write my own one-off because I have a job to do". I mean, you can google for libraries but sometimes you just don't find them and then find out a few weeks later what you should have used.
Re:How We Went from 30 Servers to 2: Go by timr on Tuesday March 12, 2013 @11:36PM (#5366660)
I don't know that a common library exists for this standard use-case so I'm going to write my own one-off because I have a job to do.

That's called "laziness", and is even more likely than NIH syndrome to be mitigated by experience. Certainly, having lots of coding time with a single language doesn't make you less lazy, and having lots of experience with different languages doesn't make you lazier.

Re:How We Went from 30 Servers to 2: Go by jbooth on Wednesday March 13, 2013 @12:45AM (#5366860)
Well, I'm less lazy than most devs and have worked in lots of languages and did it just the other week -- maybe I'm just not that bright :)
Re:How We Went from 30 Servers to 2: Go by timr on Wednesday March 13, 2013 @04:59AM (#5367483)
It's certainly possible that you'll miss some oddball idiomatic way of doing things in a new language (e.g. Python itertools or using C++ STL algorithms or something like that), but this is rarely a real problem. The job gets done correctly -- and in any case, we're all learning new ways of doing things. It's not as if you gain total prescience after N days on the job with Blub.

The point isn't that the generalist programmer will be 100% correct in all the details in new language, it's that they'll be able to quickly (and correctly) implement the important parts in whatever language you're using. Idioms tend to be the low-order bit of a solution anyway.

Re:How We Went from 30 Servers to 2: Go by lifeisstillgood on Wednesday March 13, 2013 @02:36AM (#5367170)
Could you give a specific example as I am still thinking "random number generator" and want to balance it with your "standard idiom or library that everyone steeped in $lang knows "

Cheers

Re:How We Went from 30 Servers to 2: Go by aidos on Wednesday March 13, 2013 @04:41AM (#5367440)
Things like the Counter in python collections. Actually, the python collections library in general. You don't need that stuff to do the job, but it makes the code a lot clearer.

It probably took a couple of months full time in python before I had enough understanding of the std lib to know where to find everything (I sat down and read through a description of most of the functions in there).

There are still plenty of libraries that would have made my life easier if I knew about them. I'm sure there are plenty more.

Having said all that, that's just for example. When it comes to hiring I'd still pick a good experienced developer over a specific language expert for a full time position. For me it's not so much about the understanding of a specific language as it is the appetite for understanding computers / systems in general that makes truely good developers.

Ultimately the task is going to dictate the best type of hire. Short term contract, get a specific expert. Long term hire, find someone who actually enjoys developing software :)

Re:How We Went from 30 Servers to 2: Go by philh on Wednesday March 13, 2013 @04:37AM (#5367432)
I dunno how well-known the things I didn't know about are, but an example of me doing it: https://news.ycombinator.com/item?id=5113202
Re:How We Went from 30 Servers to 2: Go by lifeisstillgood on Wednesday March 13, 2013 @05:49AM (#5367597)
I think there is a fine line between using a library and writin your own to understand better the domain

It's something to do with how critical the library functions are to you / your system. I would never write my own compression software, but I can see why people would just to learn about the trade offs.

Re:How We Went from 30 Servers to 2: Go by philh on Wednesday March 13, 2013 @09:36AM (#5368239)
Okay, but if I had known about the alternatives I would have used them, so I'm not sure how that's relevant.
Re:How We Went from 30 Servers to 2: Go by lifeisstillgood on Wednesday March 13, 2013 @11:17AM (#5369026)
philosophising really. I guess on the "actually helpful advice" level, I'm all out if the googles cant help.
Re:How We Went from 30 Servers to 2: Go by jorgeleo on Wednesday March 13, 2013 @07:28AM (#5367789)
I have nothing interesting to say, I just wanted to see how far the left indentation can go
Re:How We Went from 30 Servers to 2: Go by themckman on Wednesday March 13, 2013 @10:22AM (#5368545)
That's where code review can be such a valuable tool. I was learning Python coming from Ruby about a year ago and, sure, the languages are similar and it wasn't too hard to get started, but having code review sped up how quickly I became proficient by a lot. It's great having a bunch of people around you that can say things like "There's this thing that exists, don't do that." or "It's more idiomatic to do this that way instead of how you're doing it." or "People hate that because, do it like this.". It makes a huge difference.
Re:How We Went from 30 Servers to 2: Go by grey-area on Wednesday March 13, 2013 @03:27AM (#5367276)
This is unlikely with go as it has a good standard library and a central place for documentation of all the packages.

http://golang.org/pkg/

Third party libraries are also listed here:

http://go-lang.cat-v.org/pure-go-libs

And the ecosystem is not so broad or mature that you would miss significant libraries because there are too many options and you just didn't find them.

Re:How We Went from 30 Servers to 2: Go by mercurial on Wednesday March 13, 2013 @04:42AM (#5367443)
It depends. If you're the only one knowing the language at this company... it's a bad idea, because the bus factor becomes unacceptable.

Otherwise you have a methodology problem. You don't do daily standups, where you'd have the opportunity to say "Yesterday, I started implementing X because I couldn't find a library" and more experienced coworkers would tell you "Use library Y instead".

Re:How We Went from 30 Servers to 2: Go by belorn on Wednesday March 13, 2013 @03:56AM (#5367344)
Being a programmer is not about knowing everything. With experience one should be able to separate library functions that should always exist from those that are unique for each language. Everything else should just be a matter of information searching.
Re:How We Went from 30 Servers to 2: Go by WildUtah on Wednesday March 13, 2013 @01:32AM (#5366997)
That's just an imbalance in programming virtues: too much hubris, not nearly enough laziness (unknown impatience).
Re:How We Went from 30 Servers to 2: Go by flyinRyan on Wednesday March 13, 2013 @05:01AM (#5367491)
You talk as if we develop code by chiseling it out in stone. We write it in text files, usually with IDEs. No one needs to learn the new libraries the newbie made, they can talk to the newbie, point out what the library already gives (and where to look in future) and write to well known interfaces.

Any project should have time allocated for "tech debt" and that's where this sort of thing gets addressed.

Re:How We Went from 30 Servers to 2: Go by Nursie on Wednesday March 13, 2013 @06:30AM (#5367684)
"I'm not going to claim that there are no legitimate reasons to hire people who are narrow experts in Blub (and only Blub), but I'm having a hard time thinking of any."

Blub is a very useful tool but has a bunch of quite esoteric gotcha's that an expert will be able to avoid due to long experience.

Expert has used almost all of the Blub framework over the years, including the more popular third-party addons and already knows what's best and fastest in a variety of situations without having to think about it much.

"A truly good programmer will pick up your language/framework in days, and be at full productivity in months, even from scratch. It's hard to do better than that."

Yeah, but then HR won't be able to tick off the 'Blub expert' box and, well, nobody would ever get hired! Or something...

Re:How We Went from 30 Servers to 2: Go by bingobangobongo on Tuesday March 12, 2013 @09:29PM (#5366219)
> impossible to maintain expert level skills in more than one or two language + library environments

And the crappier your language and libraries, the more time it takes to be an "expert."

Re:How We Went from 30 Servers to 2: Go by rgbrgb on Tuesday March 12, 2013 @09:50PM (#5366302)
By this definition, Ruby/Rails are pretty crappy (I kind of disagree). As a newcomer, the amount of stuff going on in a Rails app and the stack trace when there's an error are pretty overwhelming. Meanwhile, people expound on how simple and elegant Rails is. Lately I've been thinking that this is because those people started using it 5 years ago when it was small and their knowledge has built incrementally with the environment.

My other theory is that it's a lot harder to track down bugs for a newcomer because like C (and unlike Python in most cases), importing functionality from another file is implicit. That is, when you 'require' a bunch of files, there's no indication which functions are coming from where. For me, this is one of the things Python solves marvelously (it's generally considered bad form to 'import *').

Re:How We Went from 30 Servers to 2: Go by cartwright on Tuesday March 12, 2013 @10:20PM (#5366397)
Rails is pretty crappy if you ask me. It's "omakase" which is Japanese for "acts according to what DHH wants despite what the community wants". And there's a lot of magic happening that isn't explained very well. There are better frameworks in Ruby. Ruby itself doesn't take all that long to be an expert at.
Re:How We Went from 30 Servers to 2: Go by coldtea on Wednesday March 13, 2013 @05:26AM (#5367540)
>Rails is pretty crappy if you ask me. It's "omakase" which is Japanese for "acts according to what DHH wants despite what the community wants".

This sounds great. I'd hate software made in the way some "community" wants. Community is the other name for committee.

Re:How We Went from 30 Servers to 2: Go by VeejayRampay on Tuesday March 12, 2013 @10:34PM (#5366443)
Though I could argue that all the languages pretty much take the same amount of time to become an expert. Just because some languages are supposedly higher-level than others doesn't mean that the complexity they allow you to tackle (and associated challenges as a programmer or "expert") is any less.

Especially since being a good programmer is more about design, choice of interfaces, reactivity to change, etc. which are by definition language agnostic.

I firmly disagree that Ruby requires any less effort than say C, C++, Java or LISP to become an expert.

Re:How We Went from 30 Servers to 2: Go by cartwright on Wednesday March 13, 2013 @12:51PM (#5369553)
I didn't mean to say that Ruby was less complex than C, I meant to say that if you take out the magic it is comprehensable and one can be good at it quickly enough just like a straightforward language like C. I agree that learning design, etc. is the real key in any language, thanks for pointing that out, because that's what everyone should focus on.
Re:How We Went from 30 Servers to 2: Go by regularfry on Wednesday March 13, 2013 @05:14AM (#5367511)
Ruby doesn't take long to be productive in. It is an utter pain to become expert in, for any reasonable definition of "expert". Fortunately it's fun enough that I don't mind the slog.
Re:How We Went from 30 Servers to 2: Go by jshen on Tuesday March 12, 2013 @11:25PM (#5366618)
"it's a lot harder to track down bugs for a newcomer"

This is FUD. It's a different way of doing things, not harder. I live inside Pry which makes it rather easy to figure out what's going on.

Re:How We Went from 30 Servers to 2: Go by rgbrgb on Thursday March 14, 2013 @11:04AM (#5375407)
That's kind of what I'm talking about. I've never heard of Pry. With Rails I have to learn about the 100 most common gems (devise, paperclip, mongomapper or mongoid), Pry (thanks for that), bundler, rvm, and ActionEverything before I can be productive (or understand a simple app) . With Node.js, something newer with less "maturity", I figure out npm and I'm good to go.

I really don't think it's FUD to say that Rails has gotten much bigger in the past 5 years, and it's definitely not FUD to say that as codebases and tooling grows, so does barrier to entry.

The specific thing I guess you're objecting to is that it's harder for a noob to understand implicit imports and where something is coming from if you don't know much about what you're importing. If you use a tool to solve that language deficiency, that doesn't remove the deficiency from the language. By that logic, adding an IDE to Java makes it a very concise language.

Re:How We Went from 30 Servers to 2: Go by jshen on Friday March 15, 2013 @11:46AM (#5381170)
Most of what you said above is a strawman. I said one specific thing.

"it's a lot harder to track down bugs for a newcomer"

This statement is FUD. You seem to be defining "language deficiency" as "hard for a noob before they become proficient". I think that is absurd.

Re:How We Went from 30 Servers to 2: Go by qznc on Wednesday March 13, 2013 @02:34AM (#5367159)
However, you do not need to be an expert to be productive. You can write Django web apps perfectly well without knowing about Python's metaclass tricks, for example.

An expert still needs time to become familiar with a large codebase and architecture. I wonder if a competent programmer could simply learn the language in addition during this period.

Re:How We Went from 30 Servers to 2: Go by tonyarkles on Wednesday March 13, 2013 @01:22PM (#5369752)
Until your form isn't coming out quite right, and you need to start digging around in the source for the form class to figure out why. The happy path generally doesn't need expert-level skills, but debugging often results in a quick deep plunge.
Re:How We Went from 30 Servers to 2: Go by trungonnews on Tuesday March 12, 2013 @09:40PM (#5366262)
Go as of today doesn't have too many libraries available. So there is really nothing to learn besides the language itself.
Re:How We Went from 30 Servers to 2: Go by jlarocco on Tuesday March 12, 2013 @10:41PM (#5366470)
That's not really true.

Granted Go doesn't have as many libraries as the more established languages, but to say there aren't many and there's "nothing to learn besides the language" is just flat out wrong.

Just for starters there's http://code.google.com/p/go-wiki/wiki/Projects

Re:How We Went from 30 Servers to 2: Go by trungonnews on Tuesday March 12, 2013 @11:36PM (#5366661)
A seasoned Java developer is expected to have worked with one of the mainstream ORM like Hibernate or Ebean. But a Go developer gets away with not having to know an ORM because there is no mainstream ORM in Go. :)
Re:How We Went from 30 Servers to 2: Go by burntsushi on Wednesday March 13, 2013 @02:02AM (#5367082)
So what, the lack of a mainstream ORM implies "So there is really nothing to learn besides the language itself"? I don't think so.

And there's probably more to a lack of an ORM other than "Go is immature." It's a fairly common opinion among the Go community that ORMs are not worth their complexity. I tend to share that opinion myself, after having worked with a few in a couple different languages.

Re:How We Went from 30 Servers to 2: Go by pestaa on Wednesday March 13, 2013 @02:57AM (#5367210)
Not sure why you were downvoted, I tend to agree ORMs are not the best ways to communicate with databases.

As to only the lack of ORM would make Go immature? Honestly I don't know. There are tons of software written in JavaScript; do they make JavaScript mature? Hell no.

Re:How We Went from 30 Servers to 2: Go by coldtea on Wednesday March 13, 2013 @05:28AM (#5367548)
>If the language is strictly OO (as Java and C# are) then an ORM is pretty much required.

Really? Because we managed to get just fine without one for decades...

Re:How We Went from 30 Servers to 2: Go by flyinRyan on Wednesday March 13, 2013 @05:18AM (#5367517)
If the language is strictly OO (as Java and C# are) then an ORM is pretty much required. What is the preferred solution in Go? And please don't say writing out raw SQL.
Re:How We Went from 30 Servers to 2: Go by virmundi on Wednesday March 13, 2013 @09:37AM (#5368243)
I've moved away from ORMs in Java because they don't really solve the problem faced. Hibernate could be a really good solution to providing a blanket system for SQL interaction except for the performance issues. If one was really using Domain objects (not pojos, or dumb DTOs) the typing ability of Hibernate would be great. Unfortunately for simple CRUD apps the issues presented by Hibernate (like loading it in an EAR) are such that it requires too much maintenance time on complex projects.

I know that I've used Hibernate for years. I've used it with DTOs. I know that it does provide a certain benefit for simple reads and writes. Unfortunately, Hibernate was designed to work in a disconnected manner like the Web. As a result you get into complications of session management. This is just one example of Hibernate maintenance costs.

Now I use Spring JDBC. This removes the noise of the checked exceptions, connection management, transactions, just like Hibernate. But I write simple or complex SQL in one place and map in and out contently.

Re:How We Went from 30 Servers to 2: Go by flyinRyan on Wednesday March 13, 2013 @10:19AM (#5368519)
Well, I can't speak to Java here but NHibernate works fantastic. I've checked the generated SQL on complex joins and it always ended up writing what I would have by hand.

In C# the session management is no big deal: you access everything via the Repository pattern, turn on trait injection and just make sure any repository method that will need a session has a transaction attribute. If you need to do a series of read/writes in one transaction you throw that whole method into the repository class and put a transaction trait on that method.

Re:How We Went from 30 Servers to 2: Go by socceroos on Thursday March 14, 2013 @12:12AM (#5373045)
That's a helluvu lot of abstraction for writing to a database.
Re:How We Went from 30 Servers to 2: Go by flyinRyan on Friday March 15, 2013 @08:53AM (#5380290)
It's not. I create a DTO and I set up an exact mapping of how that appears in the database. Then I create a type generic Repository pattern that makes the DB access explicit as opposed to NHibernate's magic database access. Then the rest is just one time wiring I set up so I don't have to worry about actually connecting to the DB in my code.

In any solution you come up with you'll either need a repository that handles sessions and so on, or you'll have to explicitly connect to the db every time you need it. Either case will be more work than what I've done with this solution.

Re:How We Went from 30 Servers to 2: Go by Luyt on Wednesday March 13, 2013 @08:30AM (#5367970)
What's wrong with using SQL in your program? As long as your database layer is able to perform parameter substitutions to avoid SQL injection, this is a pretty efficient way to get stuff out of the database (and only the stuff you want). Why would using an ORM be a 'requirement' for OO-oriented languages?
Re:How We Went from 30 Servers to 2: Go by flyinRyan on Wednesday March 13, 2013 @09:33AM (#5368213)
There are quite a few problems using SQL directly in your program. Separation of concern issues, typing issues (e.g. the compiler can't tell you the USER table isn't appropriate here because it has no way to see what you're doing).

In a multi-paradigm language you wouldn't be tied to using an ORM but you should still use something that provides some kind of anti-corrupt support. In an OO language you can have nothing but objects so there is nothing else your database library can return. It may as well return objects that represent the records rather than, say a list of strings.

Re:How We Went from 30 Servers to 2: Go by voidlogic on Wednesday March 13, 2013 @10:06AM (#5368394)
Even though it is terribly out of fashion, the performance of database interface classes (a database access layer) that wraps and abstracts SQL prepared statements and/or stored procedure calls is almost always much more efficient than ORM when the SQL written by someone minimally SQL competent. ORM can be much faster to implement, ah- classic tradeoffs.
Re:How We Went from 30 Servers to 2: Go by redbad on Wednesday March 13, 2013 @04:11AM (#5367377)
ORMs are broadly considered antipatterns in Go.
Re:How We Went from 30 Servers to 2: Go by Xion on Wednesday March 13, 2013 @08:45AM (#5367996)
Source? I have never heard that claim. And contrary to that, Go has facilities for implementing ORMs, like field annotations in structs for specifying column bindings.
Re:How We Went from 30 Servers to 2: Go by smrtinsert on Thursday March 14, 2013 @02:49PM (#5376905)
A seasoned java developer stays away from orm anyway ;)