Hacker News new | ask | show | jobs
by dkarl 5484 days ago
Having the right answers counts for a lot. I see a lot of less knowledgeable developers spend a day or two figuring something out that I know off the top of my head. These days, people tend to come by my cube and ask questions before they struggle too long with something, which makes me feel pretty darn good about myself. I've also learned that before I go too far down a rabbit hole in some area I'm shallow in (OS resources, PL/SQL, database performance, webby stuff, the list goes on and on) I should have a conversation with someone who knows what they're talking about.

Age doesn't necessarily have anything to do with knowing the right answers. (My first experience being a greybeard actually came within a few weeks of starting my first job.) Part of it is investing the effort to gain expertise, part of it is being smart and/or lucky about investing your effort in the right areas, and part of it is having the background and aptitude to absorb knowledge. Wherever it comes from, being able to answer questions that stump other developers provides a big gain in productivity, because you spend more time doing work and less time struggling with trivialities. If the ability to answer questions increases with age and quality of work doesn't decline otherwise, then the average value of developers increases with age.

So anyway, my first experience being the greybeard, even though you don't care. I was walking around in the office when someone flagged me down. There were three senior developers standing behind a junior developer, all huddled over staring at his screen. They were trying to figure out a snippet of Java code that looked something like this: set?foo:0

"It must be a valid identifier of some sort or it wouldn't compile." "If it is, where is it defined?" "Question marks and colons aren't allowed in variable names. We checked that three times in the book." "Maybe it invokes an implementation-specific feature in the compiler we're using. Whatever it is, it's some kind of deep magic." "Maybe there's a bug in the compiler and it's treating the question mark as a combination semicolon and comment character." Apparently they had been at this for quite a while and were repeating the same ideas they had had an hour ago. They were scared to just "fix" the code because it had been written by a "really smart guy" who had left the company, so it must be right.

"Sheesh, haven't any of you guys written any C?" I said. Two minutes later I had restored a junior developer and three senior developers back to productive work, saving them God knows how much more wasted time.

That's the value of knowing random things off the top of your head.

1 comments

LOL, what?

You're seriously telling me that they were stumped with "set?foo:0"??

And you stayed? :-)

Back in the day, it was very common among Java programmers to consider using ?: as atrocious style. It was a relic from C, eccentric and therefore confusing, just more damage inflicted on the language through the influence of conservative programmers who didn't "get" Java. Since most Java programmers were monolingual and learned from books that relegated ?: to a few sentences inserted somewhere for completeness, many didn't even recognize it as an operator.

Even setting aside my love for the ?: operator, I never understood that attitude. One of the major selling points of Java in the early days was that it was simple enough for everyone to understand pretty completely. It was supposed to be impossible for a guru to write code that a junior programmer couldn't understand at the small scale with some effort, line-by-line, if not at the large scale. Training programmers to be competent at only a subset of the language undermined the purpose of having such a simple language.

nod I understand your point, it's not the most clear operator. Java would not be worse if it was never in the language.

Though, it has made many lines of my code more succinct!