News for hackers. Stuff that matters.
Re:Programmers At Work: Bill Gates (1986) by dm8 on Wednesday February 05, 2014 @05:54PM (#7187452)
I really liked this quote - "Programmers just starting out today never had to squeeze, so it’s a little harder for them to get the right religion because they always think of resources as being immediately available. Ten years ago every programmer ran into resource limitations, so the older programmers are always thinking about those things."

And --

"I still think that one of the finest tests of programming ability is to hand the programmer about 30 pages of code and see how quickly he can read through and understand it."

Does any company run "code comprehension" tests for hiring? Any thoughts?

Re:Programmers At Work: Bill Gates (1986) by Hermel on Wednesday February 05, 2014 @07:06PM (#7187777)
As the CTO of a cloud startup, I did exactly that.

Apart from the usual brain-teaser and whiteboard coding, we gave candidates 20 minutes to browse through a small database project in eclipse. Afterwards, I checked whether they could explain the data structure of that database.

The outcome of this test was a much better predictor for competence than any other technical test. I can whole-heartedly recommend it.

Re:Programmers At Work: Bill Gates (1986) by Eye_of_Mordor on Thursday February 06, 2014 @03:58AM (#7189388)
Does this mean you recruited some people who couldn't explain the structure and you found they were no good anyway?
Re:Programmers At Work: Bill Gates (1986) by seabee on Thursday February 06, 2014 @04:12AM (#7189430)
Sometimes you put less weight on an aspect that deserves more because the candidate showed other skills, 'cultural fit' etc.

Sometimes you realise that was a mistake :)

Re:Programmers At Work: Bill Gates (1986) by bitwize on Thursday February 06, 2014 @04:50AM (#7189538)
But the flip side of that is that optimizations that were made when resources were tight may bite you in the ass when resources become available. For example, the declaration for the WinMain entry point that still persists to this very day in Win32 and Win64 applications looks like this:

    int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdLine, int nCmdShow);
Note the hInstance and hPrevInstance bits. Back in the day Windows loaded the code for a Windows application's .EXE once into memory and then maintain several pointers to a separate data section for each running instance of the application. The hInstance and hPrevInstance are actually pointers to such datasections. One of the reasons for this was so that the program needed to only do certain kinds of initialization once; if future instances needed that data, they could copy it into themselves from the previous instance (remember, no protected memory!) with the GetInstanceData function. In addition, it was a simple way of telling if you were already running; window classes, for instance, were registered once per program, not once per instance.

Of course in Win32, instances of a program are their own processes with their own address spaces, so you can't do the kinds of clever tricks you could in Win16 to save time and memory. And hPrevInstance is always NULL. Win16 programming is full of hacks like this that made sense in their day, but are counterproductive now, though their vestiges remain on in Win32.

Re:Programmers At Work: Bill Gates (1986) by renata on Wednesday February 05, 2014 @06:10PM (#7187508)
When I interviewed at Garmin they gave me a couple pages of their actual code and asked me to point out the bugs they introduced to it. Thirty pages seems like a bit much for an interview, but I definitely like the idea. Most jobs you'll be looking at other people's code way more often than writing your own.
Re:Programmers At Work: Bill Gates (1986) by boomzilla on Wednesday February 05, 2014 @06:19PM (#7187542)
I really like this idea, but it's not easy to apply. Nowadays, most jobs involve writing code that are based on layers and layers of abstraction, so a lot time, you have rely on the API/docs that are given to you.

On the other hand, if the job requires a lot of algos and low level code, this will be a good test to gauge an engineer's thought process and mental capability.

Re:Programmers At Work: Bill Gates (1986) by austinlyons on Thursday February 06, 2014 @01:28PM (#7192008)
Many libraries and abstractions that I come across don't have much/any documentation (or it's out of date, etc), so the ability to quickly look at the source and understand it still seems valuable to more than just low level programmers.
Re:Programmers At Work: Bill Gates (1986) by meowface on Wednesday February 05, 2014 @11:47PM (#7188781)
I recently interviewed with one of the "big 10" tech companies and was asked to do similarly; I was given 4 pages instead of 30. I felt like it was a good and useful exercise.
Re:Programmers At Work: Bill Gates (1986) by chiph on Thursday February 06, 2014 @09:30AM (#7190523)
I've done this for interviews - we showed them some code that had real bugs in it, as well as some poor design choices (we told them this in advance so they wouldn't think our real code was like that). We were looking for people who weren't afraid to tell us the code sucked and what they'd do to improve it. If they said it was fine as-is, or spotted very few of the bugs, that was a strong no-hire indication.

We tried sending the sample to them the day before, but there wasn't a strong correlation between doing that and good responses from the candidates. Basically, if they got it, they got it. And if they didn't, they didn't.

Re:Programmers At Work: Bill Gates (1986) by anthuswilliams on Thursday February 06, 2014 @11:38AM (#7191214)
In 2013 I briefly contracted for a PHP shop. The hiring manager would invite people in for an interview and present them with the following code:

  mysql_query('
    INSERT INTO `products` (`name`, `descriptions`, `price`)
    VALUES ( '.$_GET["name"].', '.$_GET["description"].', '.$_GET["price"].');
  ');
Then he would ask, "how do you feel about that?" He claimed this question weeded out a lot of potential candidates.
Re:Programmers At Work: Bill Gates (1986) by tanzam75 on Thursday February 06, 2014 @12:52PM (#7191731)
I like it.

I don't know if you can use this kind of test on fresh-out-of-college hires, because a lot of professors don't teach security, and there may be plenty of other bad habits to break anyway.

But on any experienced hire -- even someone one year out of school -- it's perfect for screening out the codemonkeys.

Re:Programmers At Work: Bill Gates (1986) by 72deluxe on Thursday February 06, 2014 @04:32AM (#7189485)
I thought the irony of that was the masses of RAM that the .NET runtime consumes? Or am I missing that?

Every time I opened Management Studio for SQL Server 2005+, it took forever and caused massive disk churning, compared to the Win32 version for SQL Server 2000 and before, which didn't engage in abstract disk churn and memory gobbling.

Re:Programmers At Work: Bill Gates (1986) by bad_user on Thursday February 06, 2014 @08:26AM (#7190202)
Is that really a function of the app being written on top of .NET? It could be, but most often than not, that's due to poor architectural decisions. Pointing fingers without knowing the internal details isn't constructive criticism.
Re:Programmers At Work: Bill Gates (1986) by tanzam75 on Thursday February 06, 2014 @12:55PM (#7191758)
.NET applications should not just churn at random. There needs to be real memory pressure (was there?).

I wonder if something went wrong with the native image generation during setup? It may be trying to JIT it every time on startup. That could be quite slow and result in a lot of disk activity.

Re:Programmers At Work: Bill Gates (1986) by kyberias on Thursday February 06, 2014 @12:56PM (#7191770)
Is Management Studio 2005+ written on .NET? Any reference on that?
Re:Programmers At Work: Bill Gates (1986) by 72deluxe on Monday February 10, 2014 @12:24PM (#7212238)
As far as I new it was. You noticed the flickering views and new-style GUI controls, eg. looking at the properties of a server caused massive update flicker, common to .NET controls (early versions only?)
Re:Programmers At Work: Bill Gates (1986) by Haul4ss on Wednesday February 05, 2014 @08:00PM (#7188011)
I like the idea of a code comprehension test. I would give the code to the candidate 1-2 days before the interview, and let them ponder it.

I know, technically they can cheat and google API calls or show it to their friends, but I bet with a little prying in the interview you could uncover that.

Re:Programmers At Work: Bill Gates (1986) by mkartic on Wednesday February 05, 2014 @09:07PM (#7188289)
In this context, taking help shouldn't be considered cheating. Its better that s/he looks up the API calls. It wouldn't be a comprehension test if all that is required is knowing a few API calls. Isn't the whole point of the exercise to see if the candidate can get past the API calls and understand the big picture?
Re:Programmers At Work: Bill Gates (1986) by jcagalawan on Wednesday February 05, 2014 @06:09PM (#7187506)
I've had interviews that obfuscate some basic software system or algorithm. They were always just a page or two though, never 30.
Re:Programmers At Work: Bill Gates (1986) by zaidf on Wednesday February 05, 2014 @06:20PM (#7187545)
"Ten years ago every programmer ran into resource limitations, so the older programmers are always thinking about those things."

Interestingly this is why I believe VCs let founders of start-ups get do partial cashing out in later rounds. In the later rounds when you are shooting to build a billion dollar business, it's not optimal for the company if you as CEO is thinking about your everyday finances or paying past debt.

Re:Programmers At Work: Bill Gates (1986) by digz on Wednesday February 05, 2014 @06:51PM (#7187697)
I think you misunderstood the quote. BG is referring to hardware resource limitations... and saying it was a good thing in terms of encouraging efficient design.
Re:Programmers At Work: Bill Gates (1986) by sizzle on Wednesday February 05, 2014 @09:26PM (#7188351)
Yeah you definitely misinterpreted that
Re:Programmers At Work: Bill Gates (1986) by hoka on Wednesday February 05, 2014 @07:36PM (#7187905)
IMO, that quote's garbage and really "back in my day". Our resources are just more powerful today. We still run into performance issues with things like bulk updates and computation times (MapReduce / distributed computing) quite frequently.
Re:Programmers At Work: Bill Gates (1986) by georgemcbay on Wednesday February 05, 2014 @07:47PM (#7187952)
I wouldn't say the quote is garbage, there's truth to the idea that over time we have to worry a little bit less about cleverly dealing with resources, assuming the amount of resources we care about remains static... But of course they don't.

The really interesting thing about the quote is that it is from 1986 but could have been stated the same way in 1996, 2006 and likely in 2016 with the same "10 year back" qualifier and nobody would bat an eyelash. Systems are way more powerful but we're also pushing a LOT more data (in terms of depth of the data, breadth of the data, and types of data).

To be fair though, these days a lot of people see "spin up 25 more AWS instances" as a perfectly valid way of solving a bottleneck when compared to months of developer time whereas back in 1986 the decision would be a no-brainer in the other direction given that the equivalent of spinning up 25 AWS instances today would be economically infeasible back then for almost any commercial entity (even if you scaled back the amount of processing needed to fit in the context of that era).

Re:Programmers At Work: Bill Gates (1986) by coldtea on Thursday February 06, 2014 @01:09AM (#7188980)
>IMO, that quote's garbage and really "back in my day". Our resources are just more powerful today.

Which is the whole point if the quote. And the "back in my day" is 100% true in the field of programming. Ever heard of Moore's law? Ever tried to program with 8K RAM?

>We still run into performance issues with things like bulk updates and computation times (MapReduce / distributed computing) quite frequently.

Yes, we still run into "performance issues". But with MILLION times the data they ran into performance issues with.

Heck, we can now do a whole computer of the time interpreted in a web browser in Javascript and still get acceptable speed to play games in it.

Perspective man.

Re:Programmers At Work: Bill Gates (1986) by bad_user on Thursday February 06, 2014 @08:32AM (#7190223)
Nowadays in-browser Javascript is able to execute algorithms in under 1 second that would have taken tens of minutes or hours to compute in the late eighties. Back then, even a dumb spell-checker like that one implemented by Peter Norvig in Python, would have been problematic and was considered a major feat. If a software engineer from the eighties would travel forward in time, he'd be amazed that we are carrying super-computers in our pockets.
Re:Programmers At Work: Bill Gates (1986) by pseut on Thursday February 06, 2014 @11:22AM (#7191115)
I like the implication that these "software engineers from the eighties" are absurdly rare creatures that no longer exist.

edit: but yes, it's amazing.

Re:Programmers At Work: Bill Gates (1986) by acqq on Thursday February 06, 2014 @05:39AM (#7189675)
To illustrate coldtea's point:

http://bellard.org/jslinux/

You've just fully booted linux in your browser. That Linux sees 16 MB RAM for itself. If you are a web programmer, do you even try to see how much memory the browser spent for this, or any other page you click to?

Re:Programmers At Work: Bill Gates (1986) by bottompair on Wednesday February 05, 2014 @08:58PM (#7188253)
Ironic language given that most "engineers" today can't write code without dependency on built in garbage collectors.

Do you really think developers these days are just as good at optimizing for limited system resources as they were in 1986?

"We still run into..." Who? Maybe you - but most developers aren't running into map/reduce problems every day. And when they do, they certainly aren't coding a solution from scratch.

Re:Programmers At Work: Bill Gates (1986) by boomzilla on Wednesday February 05, 2014 @09:32PM (#7188373)
I think what really happens is that programmer/software engineer profession have become a lot more accessible to the mass. Back in billg days when he started programming, I would bet less than 1000 kids around the country had access to a computer. In 1986, the total number of programmers would've surely been less than 10,000 and most of them worked for MS, IBM, DEC, etc. In the current time, half of SF are software engineers and entrepreneurs :) I guess my point is there are still a lot of people who work on the hard core stuff like Linux/Windows kernels where every byte counts, or JVM/LLVM where data structures/algorithms are rewritten over and over to get a bit more performance. I would say the number of programmers who have to care about the optimizing system resources may be even more than back then, it's just that there are a lot more application developers these days.
Re:Programmers At Work: Bill Gates (1986) by hoka on Wednesday February 05, 2014 @10:42PM (#7188604)
I guess my original post was focused on map/reduce problems; I meant it to be more general. We take our site response time very seriously, and therefore our application code and data layer has to be very fast.

Yes boxes are faster and easier to spin up. The 'downside' to that is that many website on the internet are blazingly fast: Google, Amazon, Dropbox, etc. Because they are so fast (or perceptibly fast via tricks), the rest of the web is held to that higher standard. Twenty years ago, things taking a long time on a computer screen with no updates was acceptable. Today it really isn't because there are N other websites that are selling your exact product or experience.

Re:Programmers At Work: Bill Gates (1986) by erkkie on Wednesday February 05, 2014 @10:49PM (#7188623)
Maybe these days other metrics are more important to optimize for? Ultimately it is about transforming money (resources) into output (more resources) and depending on times different things bottle-neck you there.
Re:Programmers At Work: Bill Gates (1986) by peterpathname on Thursday February 06, 2014 @09:04AM (#7190399)
optimise for maintainability, reusability, composibility
Re:Programmers At Work: Bill Gates (1986) by erkkie on Friday February 07, 2014 @09:29AM (#7196346)
and talent pool availability
Re:Programmers At Work: Bill Gates (1986) by kamaal on Wednesday February 05, 2014 @10:42PM (#7188603)
>>Our resources are just more powerful today

Have you ever programmed a embedded system? Every worked on a 8-bit micro controller?

There are hard, very hard problems that come up which have to solved in with really limited resources.

Re:Programmers At Work: Bill Gates (1986) by hoka on Wednesday February 05, 2014 @10:53PM (#7188633)
I sure have. I've written k-maps and wired a multi-bit ALU by hand.

My point is that those problems aren't any harder. They're just different. (in many cases it's because the toolchains stink by modern standards--embedded systems tend to just crash with no helpful debugging information) BG and co stood on the shoulders of the guys who made their chips 'just work' just as we stand on their shoulders. To complain about how 'kids have it so easy these days' just makes you sound crotchety.

Re:Programmers At Work: Bill Gates (1986) by valarauca1 on Thursday February 06, 2014 @08:46AM (#7190305)
>My point is that those problems aren't any harder. They're just different.

Not really. The problems are made a lot harder by finite memory being more in play. Even with a good tool-chain when you actually have more data then you have RAM then you'll run into problems that are completely unique to an embedded world.

Code shrinks are very hard.