Live data from Hacker News

Organizing complexity is the most important skill in software development

johndcook.com

171–180 of 286 posts

Re: Organizing complexity is the most important skill in software development

#171
post #55

Earlier quoted context omitted.

This happened to me once. I went for an an interview at a huge real estate company. They had a chat with me for exactly five minutes, then gave me a computer (an old one, with keyboard not working properly) and some legacy code. I wasn't asked to fix it, but I was asked to make a small change and given half hour for it. That code had no documentation and no comments. Then 5 more mins to explain what I understood abou…

Did you accept?

No, I had another offer that I took. I'm an average programmer and was able to do the task easily, but that codebase really scared me. Plus the other job was to build something from ground up and I really liked the CTO, so I took it. They were primarily hiring someone just to keep it running than adding new features.

It was a great interview experience though. One of the engineers commented that they gave the same task to other interviewees too.

I think this is a smart and lazy way to hire people :P No need to spend an hour in the room asking random questions, having awkward pauses etc. Just let the candidate fight with the codebase - lazy and simple!

Re: Organizing complexity is the most important skill in software development

#172
post #39

there is an excellent book by jon lakos called 'large scale c++ design' which treats organizational or physical design of large scale c++ projects (> 1giga loc). highly recommended.

I've considered this book a few times, but the following review always stopped me cold: http://www.amazon.com/review/R1ICFUDTH8VXQ5/ref=cm_cr_dp_tit... Any thoughts on it?

I would give "API design for C++" by Martin Reddy a shot. The only thing I remember now from the large scale book is to pay attention to compile-time and link-time dependencies, although when I read it I remember that it contained some nice tidbits of info that I had not seen in other books

The big takeaway was that the way the project is split into libraries, files, folders etc and how these map to classes, modules and subsystems matters.

Re: Organizing complexity is the most important skill in software development

#173

This is incredibly true. I once turned 60kLoC of classic ASP in VBScript into about 20kLoC of python/django including templates. And added a bunch of features that would have been impossible on the old code-base. It turned the job from hellish (features were impossible to add) to very nearly boring (there wasn't much to do anymore). So with this newfound freedom I built some machines to automate the data entry and on…

> Sadly there's (seemingly) no way to interview people for this ability I had one interview where the interviewer simply showed me a printed page of code, and asked me to talk about it. I spotted a few problems and debatable constructs, and we had a good 3 minutes discussion. Since at least I spend more time reading code than writing it, that felt like a truer test of my abilities than many of the coding tasks. PS. Y…

I had an interview recently where we did something similar and it was awesome. They had picked an especially good example: the code was small enough that it didn't take long, but it has a variety of sorts of badness, from coding errors to bad names to bad method grouping to logical errors.

I'm definitely stealing this trick.

Re: Organizing complexity is the most important skill in software development

#174
post #168
post #55

Earlier quoted context omitted.

This happened to me once. I went for an an interview at a huge real estate company. They had a chat with me for exactly five minutes, then gave me a computer (an old one, with keyboard not working properly) and some legacy code. I wasn't asked to fix it, but I was asked to make a small change and given half hour for it. That code had no documentation and no comments. Then 5 more mins to explain what I understood abou…

> gave me a computer (an old one, with keyboard not working properly) What I like most about this is how close to reality their interview model is. Less than stellar equipment, legacy code, and a maintenance task... just a normal Monday.

Another story - I walk in on my first day (this is a subsidiary of a HUGE company). Nobody remembered that a new guy was supposed to join that day - so no desk or computer for me. First couple of hours I spent reading magazines, then I was given the oldest (probably older than me, ha) computer I've seen in my life. I am not kidding - I spent half hour just cleaning the thing (not talking about software, but hardware. it had half inch of dust on it).

Good times.

Re: Organizing complexity is the most important skill in software development

#177
post #20
post #2

Organization is the hardest part for me personally in getting better as a developer. How to build a structure that is easy to change and extend. Any tips where to find good books or online sources?

Same here. I only have 2 years of experience, but right now my opinion is that this is not something you learn in a book (for the moment). You can learn how to create clean, readable methods and classes with a book (1). You can learn how to refactor old methods and classes with a book (2). You can learn how to organize a small team to allow fast iterations with many books. But building a project lasting more than a f…

I just finished a book called "Practical Object Oriented Design in Ruby." It teaches you how to build OO applications that are pleasant to maintain. I highly recommend it.

http://www.amazon.com/Practical-Object-Oriented-Design-Ruby-...

Re: Organizing complexity is the most important skill in software development

#178

Earlier quoted context omitted.

Our main product was developed on a keyboard that was missing a "w". It's not a big deal, though - you can use a for(;;) loop instead of a while loop without hurting performance. And it's easy to just avoid "w" words in the view templates by being clever with word choice. Of course, that's not true at all. But giving someone a defective-but-not-entirely-broken tool can be a clever way of seeing how they work around p…

It's too contrived though; not having a single working keyboard anywhere isn't a real business situation. A slow bottlenecked server, sure. If the "w" key weren't working I'd copy-paste "w" characters from elsewhere in the document, or bring up the on-screen keyboard. Writing bastardized code -- for (;;), really?! -- would be a huge negative against a candidate. And, of course, if a company really didn't have a worki…

Whenever you need a character your keyboard won't produce - either because it's broken or because it's in a different language and you can't figure out how to get it, just google the character and copy/paste it. i.e. Google "double u"

Re: Organizing complexity is the most important skill in software development

#179
post #103

Or in other words: code should be as simple as possible, but no simpler. I guess you could call it organization or readability or just good design. It requires deeply understanding what you're trying to accomplish and structuring your code to reflect that. I don't think there's any rote, step-by-step procedure that will get you there. Often it is a flash of creative insight that breaks the log-jam and reveals the hid…

Developers understand the word "simple" in different ways.

I personally think of the UI/API: what the code exposes to the outside world should be "simple".

Some people might think about language features. "Simple" is being very selective about what language features you use and what you avoid.

Others might think design patterns, and think the code is "simple" when you can point to any class and immediately recognize what pattern that class implements.

I've come to learn the word "simple" as in KISS (Keep It Simple, Stupid) isn't very useful at all.

Re: Organizing complexity is the most important skill in software development

#180
post #41

Earlier quoted context omitted.

> Sadly there's (seemingly) no way to interview people for this ability I think there is. Show the candidate some bad code. Not WTF code, but something you wouldn't be proud of but is realistic. Bonus points if you're comfortable enough to pull this out of your own production system. Ask the candidate about adding some functionality, but be clear that cleanup and refactoring changes are fine (even encouraged). The co…

It would be actually interesting to look at the commits of a candidate's any online project repository from the very start and observe how the candidate made the progress with respect to the structure of code and improvement in coding practice. To check whether the candidate optimizes and refactors the code during the development of the project leading to a stable release.

This assumes that developers' off-work behavior is similar enough to their work behavior that it's a reliable indicator of their workplace performance. Or that developers should comport themselves on their off time to a workplace-level standard.

The problem with this is that it doesn't let my personal projects be Play. If I'm writing something for myself, it's not going to be as clean and documented to the level it would be in the workplace. And why should it? It's supposed to be for me.

And if I'm learning a new technology, I'm going to be sloppy. I'm going to make mistakes. That's the very nature of learning-by-doing.

But in the real world of managers and companies looking for reasons to say "no hire", I have to assume that every public checkin I do is another potential "no hire" justification. Which means if make all my checkins public, I have to treat my personal projects as Work, not as play. Which is an excellent way to burn out.

Or I just give you a curated look at the final product. Which ought to be enough.

Post reply on HN