Live data from Hacker News

I Hate Puzzles: Am I Still a Programmer? (2011)

zef.me

201–210 of 268 posts

Re: I Hate Puzzles: Am I Still a Programmer? (2011)

#201

Earlier quoted context omitted.

JavaScript can be used to do complex things. A "copy-and-paste JavaScript" developer, as I referenced above, is someone who can create web pages that have simple actions, but who doesn't do much original development. The language certainly doesn't define the programmer. I also use JavaScript on occasion; I wasn't trying to paint all JavaScript developers with the same brush. It sounds like what you do is NOT what I'm…

Fair enough. I think what we do is probably pretty similar, the difference being that I do it mostly in JavaScript. Perhaps there is something to your point -- I doubt there are nearly as many successful "copy and paste C++ developers" (although I have met at least one). It might be harder to cobble together even a barely-working piece of software from StackOverflow C++ posts.

I've met a copy-and-paste C++ developer myself, though he ended up losing the job eventually.

Blew me away to discover this when I sat down to help him debug an algorithm that he had, in fact (correctly) copied from somewhere else, but then he'd slaughtered it trying to "make it work." Most of the fixes involved reverting his changes, and then making a couple minor modifications that WERE actually necessary.

He'd been fighting with it for a couple days. I had it streaming sound in about 15 minutes. Based on his words to me after the fact, he was really just not understanding what the code was doing. Pretty much at all.

That said, he did have some good insight into user interface design. I could see that he did have some important skill sets, but understanding how to manipulate memory in C was not one of them. Whether he was a "successful" developer is debatable, since he didn't hold the position, though.

I'm sure that "copy and paste" developers exist for most common languages. I've heard from several sources that finding a non-copy-and-paste developer who uses JavaScript is a real rarity. I've also been told that Google in particular is looking for that skill set. Sounds like you could write you own ticket. :)

Re: I Hate Puzzles: Am I Still a Programmer? (2011)

#202
post #174
post #157

Earlier quoted context omitted.

This so much. I don't get how people can think that something so simply and straightforward as the time complexity of an algorithm is something superfluous that only belongs to some boring classes they took in university, and it has nothing to do with "real world problems". Those people complaining about Google caring so much about their engineers being able to deal with basic algorithmic, instead, should wonder why…

> Those people complaining about Google caring so much about their engineers being able to deal with basic algorithmic, instead, should wonder why every Google service is so fast. I imagine it has little to do with algorithms and everything to do with infrastructure. Most Google services (and even outside of Google - most services, websites, mobile applications, etc) are simple store data/retrieve data services. When…

Data in the magnitude that Google, Amazon, and Facebook handle doesn't work in standard databases. They have to develop their own data stores to manage it. Check out AWS's offerings, there's a lot of special-purpose services there.

Re: I Hate Puzzles: Am I Still a Programmer? (2011)

#203
Jigsaw puzzles are repetitive and inefficient. They may be the antithesis of good programming. While they might be fun as a distraction, they are hardly a marker of programming ability. I don't like the idea that people have to have "smart person hobbies" to be coders. Playing music, poker, shooting pool, or racing could be equally as relevant.

The best programmers typically choose not to reimplement a solution when an existing one works just as well. Why should we love solving the same old puzzle from scratch over and over again?

Re: I Hate Puzzles: Am I Still a Programmer? (2011)

#204
I have lost count of the number of job interviews where I have been asked to solve a puzzle or brainteaser. I very much enjoy it when I can tell them "I've heard that one before: the answer is X," until they run out of alternate challenges. But I also enjoy it when I actually get to solve a new one. It's like my payment for doing the interview, even if there's no offer.

This isn't really a strike against the company. This is just an indicator that they haven't had much experience at hiring people. They clearly are all copying from the same source, who was in turn copying from the books and magazines filled with puzzles and crosswords that I have been reading since I was old enough to do so.

I know from firsthand experience that the puzzles they are using are not the ones that I feel best correlate with coding ability. They are instead the ones that can be asked and solved quickly, with a single correct answer. They are generic filler, like "what's your greatest strength?" and "what's your worst weakness?" Those questions just show you that your interviewer does not know how to evaluate your fit for their job.

Programmers translate human problems into procedure-based solutions. They do not need to solve puzzles, except insofar as it can be puzzling to get stupid agents to perform complex tasks without step-by-step supervision from the principal.

Hacking is an essential part of the wider culture that formed around early programmers, but this culture is somewhat more inclusive than most. Certain activities draw forth the archetype. Safecracking, lockpicking, geocaching/orienteering, scavenger hunts, reverse engineering, deckbuilding strategy games, Rube Goldberg machines, drone photography, robotics, etc. That type of person is drawn to programming, not necessarily the other way around!

We don't need a cultural battle. I don't particularly care for "brogrammers" or "rockstars" or Nerf battles and foosball at the workplace, but I don't begrudge those types the right to call themselves programmers and to claim to work for technology companies.

But just as they should not be expected to solve brainteasers during their interviews, so too should I not be expected to play Ping Pong against a company founder during mine. I think monoculture is dangerous and foolhardy. Please, lets just judge our worth as programmers by how well we can write programs.

Re: I Hate Puzzles: Am I Still a Programmer? (2011)

#205
Does a lack of interest in solving (mechanical) puzzles imply you're a weak programmer?

I really don't think so: I think it all comes down to how you think - intuition versus logic. And I think people don't fall neatly into either category - it's a spectrum. Too much emphasis is placed in interviews on solving mechnicaly problems and less on problems that can be solved more suitably by itutition: design, feature improvements, re-factoring and some people (including me) I've found have to internalise the problem and can't just simply solve a problem as qucikly as those who are very mechanically minded.

And besides technically ability is part of being a professional(!) programmer working with others. The following should also carry significant weight: an ability to work with others, take criticism, lead others, be resourceful, get stuff done on time, write clean and readable code (not just solve the problem technically) and so on are from my(!!) experience not given enough weight!

Just me two cents.

Re: I Hate Puzzles: Am I Still a Programmer? (2011)

#206

Earlier quoted context omitted.

Actually I think graph theory is pretty important. For example many programming contexts have to deal with dependencies, and often dependencies form a directed acyclic graph. Understanding that will aid in writing better, more reliable code. Path finding is also pretty important, especially if you want to make a game.

That's great if you're a game AI programmer (an incredibly small group) or you're creating Yet Another Dependency Loader (hey, I guess will only have 100 frameworks to manage modules, you'd better create your own as well). You know what I really wish? Programmers would spend 1/100th of that algorithm studying on learning to write readable, maintainable code.

> You know what I really wish? Programmers would spend 1/100th of that algorithm studying on learning to write readable, maintainable code.

IME, programmers that write readable, maintanable code and those that have a solid grasp of algorithms and theory as it applicable to the problem domain tend to overlap considerably. Having a clear analytical mental model of the approach to the solution leads to clearer and cleaner code -- and, where necessary, clearer and more useful comments -- than hacking your way to something that works. (And I'd say thats as true of my own code -- where I've done work on both extremes of the clear model to hacking-my-way-through axis -- as of others' code I've seen.)

Re: I Hate Puzzles: Am I Still a Programmer? (2011)

#207
This. A thousand times this. After going through the rounds of interviews at various companies as someone who's not particularly strong in the algorithm department, I've often felt frustrated. I think my strengths are in making good sensible design decisions for a given problem, and being able to manage the complexity of a system; but I've never been able to really show that in an interview. I've seen work from colleagues that solves a simple problem, but makes extensive use of obscure C++ template features. Maybe they were great at algorithms, maybe they weren't, but they certainly weren't capable of coming up with the simplest solution.

I've dedicated lots of time learning graph algorithms in order to get better at interviews: I've only had a graph problem come up once in the last 5 years of programming, and it wasn't particularly tricky (it came up at a time I knew nothing of graph problems, and kind of figured out a graph structure by myself).

When I'm at work, I find I have a knack for keeping things simple, and get a feeling for when certain solutions are a bad idea. For me, software engineering is really about the engineering (make things that meet requirements with the given resources), and from my experience is not so much about being able to implement and provide the time/space complexity of 10 different sorting algorithms (although knowing the basics is important).

It's genuinely a relief to see many other people relating to this kind of experience, sometimes it can feel like you're the only one!

Re: I Hate Puzzles: Am I Still a Programmer? (2011)

#208

Earlier quoted context omitted.

This. So much this. I'm a programmer who loves 'building the brain'. I've been coding professionally for about 16 years. I've written some code I'm really proud of. A couple of specific pieces of code are actually used in a LOT of major websites you probably use. Like almost every health care site or major retailer site. I actually find most code written by 'whiz' startups - even successful ones - to be incredibly si…

I agree. >>> I don't have a GitHub page, nor do I have an interest in having one. Glad I'm not the only one. >>> I don't care about hackathons or solving puzzles. Couldn't have been said any better. I never produce anything good when its tightly timed, under pressure, when people are watching over you. >>> I hate the term 'nerd' or 'geek'. I am neither and I find the terms insulting. Add "ninja", "guru", "rockstar" a…

I wish programming culture didn't scare away people who enjoy athletics. I love playing basketball and sometimes it's hard to find other programmers who enjoy the same.

When I see "Ninja", "rockstar", etc. I run. Can't stand that.

Re: I Hate Puzzles: Am I Still a Programmer? (2011)

#209

>Four people need to cross a rickety bridge at night. Unfortunately, they have only one torch and the bridge is too dangerous to cross without one. The bridge is only strong enough to support two people at a time. Not all people take the same time to cross the bridge. Times for each person: 1 min, 2 mins, 7 mins and 10 mins. What is the shortest time needed for all four of them to cross the bridge? 17 minutes, if you…

I think the purpose of the puzzle is one of resource management.

It's not a hard puzzle, and I think that it's too easy to try to overthink it to sound smart, like you've done.

The reasonable assumption is that the four people are on one side of the bridge, and you want to have them all on the other side of the bridge.

The simple answer is that the person that takes 1 minute to cross goes with all of the other people, and then brings the torch back for the rest.

So 10 minutes, 1 back, 7 minutes, 1 back, 2 minutes. Total of 20 minutes.

There isn't anything technically specifying that they have to end up on the opposite side of the bridge at the end, but you wouldn't have a situation where someone really wanted to cross the bridge and end up where they started without a torch, and it indicates that the four people have one torch, which implies that they're a party of 4, not 2 groups on opposite sides of the bridge.

I think it's a good question, because it judges the state of the person being interviewed. Are they just scared away by a simple puzzle? Do they come up with some contrivance to try and show off how smart they are? Do they just come up with a practical solution?

Personally, I'd give the practical answer and say 20 minutes, give or take a bit for transferring the torch and turning around. I'd make the assumption that they were all on one side of the bridge and want to go to the other.

When you're given a request to send a request across a network and send a confirmation across the network, you're not going to go and send the some of the requests to the server, and some of the requests to the client, and some of the responses to the server, and some to the client, just because, despite the implied context, you decided that you could make it a bit faster by doing something that didn't make sense because it technically followed the rules.

You probably think your answer is still better, and that's why it's a decent question.

Re: I Hate Puzzles: Am I Still a Programmer? (2011)

#210

I don't really want to sound off-topic but did you guys get the answer?

I thought about it like that : since the one whos cost is 1 is a good roamer he should get each of the other ones? This looks too damn easy?

That's a good solution to start off with, but given the current costs, it's not the most optimal one. A lot of time is wasted by sending C and D to cross independently. If you manage to get them to cross together at one point, you will ultimately save some time.
Post reply on HN