Live data from Hacker News

Organizing complexity is the most important skill in software development

johndcook.com

121–130 of 286 posts

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

#121

I agree that it is an important skill in engineering to recognize when the complexity got too high - At that point you need to take a step back (or several steps back) and find a different path to the solution - Sometimes that means throwing away large amounts of code. It's about acknowledging (and correcting) small mistakes to make sure that they don't pile up into a giant, disastrous one. Another thing I learned is…

> Another thing I learned is that dumb, explicit code is highly desirable

I knew for a long time that "dumb" code was easier to reason about, but it wasn't until I started looking at compiler output and profiling my code that I realized being "clever" in the source text really didn't matter. Now I'm quite happy to write code in the most straightforward fashion, rather than foolishly "compress" things. I imagine the same experience could be enlightening for a lot of newbie and intermediate programmers.

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

#122
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…

How'd you do it if the keyboard wasn't working?

It wasn't working "properly". For all we know, that just means the insert and home keys were switched around somehow. Or maybe caps lock was broken.

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

#124
post #110
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…

We did something similar at previous job. We handed the candidate some code that was intentionally bad, explained that it was so (so they wouldn't think we wrote like that every day), and then asked what they'd do to improve it. This let us find out a few things - whether they could read & understand someone else's code, whether they could make improvements to existing code, what levels of abstraction they were comfo…

That sounds like a good way to set expectations for communication and introduce the interviewee to the way your team respects each other.

Some teams are like "Man, what idiot wrote this code! This is garbage!" (sometimes in other words). I can imagine they couldn't do the type of interview you're doing.

In your interview, you show them some bad code, ask them to change it, and if they start disparaging whoever wrote it, you can red card them before they start dragging down team morale.

Or, if they start wondering about 'how did this code get like this? are there other issues leading to the bad code?' they've got some strengths in areas outside of development.

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

#125

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…

I got fired from a job because I had done this and they couldn't figure out how to keep me billable after that. Well, I got fired because I would "show up late" and "leave early" because there was nothing else for me to do (even though I was actually pulling a full 40 hours, they were expecting 60 out of people). They could have given me more work, put me on new projects, etc., like I kept asking to be done, but inst…

I've come across this a few times. The managers' thoughts were probably along the lines of "great, I got all my code cleaned up/the hard part of my product built for the expensive rate, now I can fire him and pass on maintenance to the cheap guys over there".

And of course your thoughts were "I'm going to work extra hard initially, which will make a good impression and get the product built on time and all the tasks automated, and then I can coast and it will still be worth their money."

The manager doesn't care because when your code starts rotting due to bad maintenance and badly added features (or just the fact that nobody has bothered taking it over), he'll already have been promoted or changed companies.

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

#126
post #113

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…

Maybe it's why I'm not a developer anymore, but my approach to a broken "w" key wouldn't be figuring out a workaround to using "while", but rather copying and pasting a "w" from somewhere else.

My would be to (in order): jury-rig the keyboard to make it type "w" anyway, rebind it to some unused key, or just bring my own keyboard from home (if this would not be an interview but probational period setting).

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

#127
post #125

Earlier quoted context omitted.

I got fired from a job because I had done this and they couldn't figure out how to keep me billable after that. Well, I got fired because I would "show up late" and "leave early" because there was nothing else for me to do (even though I was actually pulling a full 40 hours, they were expecting 60 out of people). They could have given me more work, put me on new projects, etc., like I kept asking to be done, but inst…

I've come across this a few times. The managers' thoughts were probably along the lines of "great, I got all my code cleaned up/the hard part of my product built for the expensive rate, now I can fire him and pass on maintenance to the cheap guys over there". And of course your thoughts were "I'm going to work extra hard initially, which will make a good impression and get the product built on time and all the tasks…

Except this was a 5-person company that could have used all the help they could get. They styled themselves a "startup", but I don't know how valid it is to call yourself a startup after 8 years. They had me very cheaply, but I think they knew I was never going fit their "company culture" of lying to clients.

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

#128
post #113

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…

Maybe it's why I'm not a developer anymore, but my approach to a broken "w" key wouldn't be figuring out a workaround to using "while", but rather copying and pasting a "w" from somewhere else.

ascii 119, son on Win Alt-119. But seriously, stand up and ask for a working keyboard first. The test there is communication.

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

#129

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…

[deleted]

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

#130
post #125

Earlier quoted context omitted.

I've come across this a few times. The managers' thoughts were probably along the lines of "great, I got all my code cleaned up/the hard part of my product built for the expensive rate, now I can fire him and pass on maintenance to the cheap guys over there". And of course your thoughts were "I'm going to work extra hard initially, which will make a good impression and get the product built on time and all the tasks…

Except this was a 5-person company that could have used all the help they could get. They styled themselves a "startup", but I don't know how valid it is to call yourself a startup after 8 years. They had me very cheaply, but I think they knew I was never going fit their "company culture" of lying to clients.

Oh, I completely agree - this is terrible for the company.
Post reply on HN