Live data from Hacker News

Ask HN: I've been a programmer for 6 years, and I can't solve basic CS problems

news.ycombinator.com

91–100 of 309 posts

Re: Ask HN: I've been a programmer for 6 years, and I can't solve basic CS problems

#91
post #61

Earlier quoted context omitted.

Is it the algorithmic efficiency that's the problem, or the ability to scale the application? I've seen things some people wouldn't believe. mod_perl 1.4 on Apache 2.0 handling 350,000 hps dynamic traffic on twenty archaic 1U's. Five tiers of caching, serialized objects on local disks, NFS in production. C-beams glittering in the dark near the Tannhäuser gate. Who cares about inefficiency if it scales?

Putting aside the damage that issues with correctness can cause, the problem is exactly that if you e.g. wrote something that grows with n^2 instead of n log n, you cannot scale by "brute force" anymore, as the inefficiency very quickly outgrows the amount of resources you can add. Seriously, your thinking that "algorithmic inefficiency" can be countered by "scaling" is almost proving the point. CS is by far not just…

Scaling an application's operation does not directly relate to its algorithm's efficiency, is my point. Of course a really inefficient application can eventually become unusable, but even terribly performing applications can be "worked around" and thus scaled higher.

Say your app is using bubble sort. Egads!!! What a shit design. Clearly this is going to become a nightmare in real world scenarios. But wait - we can theoretically get to O(n) if the list is already nearly sorted. How can we achieve this? By monkeying with the dataset, queueing and batching operations, invalidating operations that take too long, artificially limiting the number of requests per second, or just passing the request to a completely different app depending on use case. It sounds insane, but if you can perform any of these things quicker than redesigning your app, so that it can continue performing under load, that's an example of "scaling" despite the application's poor performance.

Another example is the "scalability" of application development. Say you have an application which is basically O(1), but one day you find a bug in it. Even after you write and commit the one-line fix for the bug, if it takes you between four hours and two days to deploy it to production, or the validation process takes a month... You still have a bug in production for hours, days, or weeks. "Scaling" the development process can significantly reduce the amount of time needed to solve problems, or complete new features. It can be more beneficial to be able to ship code faster and more reliably, even if it isn't the most efficient code.

Re: Ask HN: I've been a programmer for 6 years, and I can't solve basic CS problems

#92
post #62
post #41

Earlier quoted context omitted.

Is there a particular part of these problems that is stumping you? Perhaps breaking them down into smaller sub-problems? Where is it something else? Based on your original description I was expecting something more heavy on straight CS theory. “how do you sort an unordered binary tree in place“ kind of thing.

> heavy on straight CS theory. “how do you sort an unordered binary tree in place“ kind of thing. I was having a related conversation earlier, and feel like I'm reprising the same argument for a new audience, but... I don't see what is either Computer Science or theoretical about that. It seems like an eminently practical task: Handling things in a tree structure, sorting items, and doing work in-place to conserve re…

If you’re a bog standard “dark matter developer” using high level languages or writing your typical SAAS app, you wouldn’t need it.

I turned down a job offer where the interviewer was more concerned about whether I could write a merge sort on the board (I did), than whether I could design a system. It told me a lot about the kind of people they hire.

I spent my first 12 years as a developer doing a lot of bit twiddling in C writing cross platform code with nothing but the standard library, but these days if someone asked me how to sort I would call a library function. Heck even C has a built in sort function.

Re: Ask HN: I've been a programmer for 6 years, and I can't solve basic CS problems

#93

Earlier quoted context omitted.

>And that's okay! Inventing new algorithms with theoretical significance is not your job! You have other skills and they're of much more immediate value! Except when it comes to getting a job. Forget any of the rest of your skills, because we all know the only thing that matters when interviewing is an ability to recite CS algorithms out of memory and solve obtuse puzzles while pretending you've never seen them.

Except when it comes to getting a job. Forget any of the rest of your skills, because we all know the only thing that matters when interviewing is an ability to recite CS algorithms out of memory and solve obtuse puzzles while pretending you've never seen them. I’ve been a professional developer for 20 years and have never had to recite CS algorithms or solve obtuse problems. My last three jobs I had to whiteboard an…

Good for you, but your interview experiences would be atypical these days

Re: Ask HN: I've been a programmer for 6 years, and I can't solve basic CS problems

#94

Earlier quoted context omitted.

Except when it comes to getting a job. Forget any of the rest of your skills, because we all know the only thing that matters when interviewing is an ability to recite CS algorithms out of memory and solve obtuse puzzles while pretending you've never seen them. I’ve been a professional developer for 20 years and have never had to recite CS algorithms or solve obtuse problems. My last three jobs I had to whiteboard an…

I am guessing you don’t work in the Bay Area.

Nowhere near it - and neither do most other developers in the US.

Re: Ask HN: I've been a programmer for 6 years, and I can't solve basic CS problems

#95
post #72
post #63

Earlier quoted context omitted.

We probably underestimate how many people out there are just copy/pasters. No offence OP but I hope you dont work on anything that handles money/user data/requires security.

I do! I develop bespoke add-ons for the accounting software Sage 200. Fear not, my work is peer-reviewed by my boss who has 35+ years experience in the field. If I get something wrong, my boss lets me know, I learn from my mistakes and ship out good quality software.

Aren't you ever embarrassed that you work on accounting software but 'haven't been able to really figure out loops' (as you said elsewhere) to the extent that you study more and really nail down the bare basics of programming?

Re: Ask HN: I've been a programmer for 6 years, and I can't solve basic CS problems

#96
I don't think it's really just you. Most academia seems to have a hyper-focus on algorithms and data structures. I don't know what kind of jobs they're expecting people to apply for - I'm not writing an implementation of the C++ STL, and I'd argue most of the time it's a mistake to write your own data structures with such a great ecosystem of existing implementations.

Don't get me wrong. It's great to know how binary search works, or to understand algorithmic complexity - those things come in handy. But you probably don't need to know how to find the largest palindrome in a string and you almost definitely shouldn't be writing your own hashmaps in real world code. Most people would benefit a lot more from domain specific knowledge. How do system calls work? What's a load balancer? etc, etc. Even being domain specific, a lot of the ideas can be applied outside of the context it was created in, and so knowing these things is incredibly useful.

Thankfully, most of the interviews I've had have focused a lot more on real-world situations and topics. Maybe academia will some day catch up and at least balance the focus out a bit.

Re: Ask HN: I've been a programmer for 6 years, and I can't solve basic CS problems

#97
I'm surprised no one is suggesting a basic revisiting of first principles. How optimized is your nutrition? Are you exercising frequently, and getting plenty of regularly scheduled, high quality sleep? Anecdotally, I know that when I stop prioritizing my health—my working memory goes, and it's all downhill from there.

Re: Ask HN: I've been a programmer for 6 years, and I can't solve basic CS problems

#98
post #44

Earlier quoted context omitted.

What exactly did you have trouble with? These really are simple problems, all you need are an understanding of loops, ASCII character codes, and basic arithmetic. To be honest, I'm surprised a seasoned developer of 5+ years can't do these, or at least have a decent stab at them.

Why would you expect the modern application developer to even know what ASCII is? There is a chance I wouldn’t know what ASCII encoding was if my exposure to programming didn’t start in the 8 bit era. C is foreign to a lot of self taught programmers.

A modern application developer should be at least vaguely familiar with Unicode, so character encodings should not be an entirely foreign concept.

You should be able to use a search engine to figure out what ASCII is, though. That's fair game to expect. The text document mentions ASCII, so it's not like a developer would be left without a clue.

Re: Ask HN: I've been a programmer for 6 years, and I can't solve basic CS problems

#99
post #82

"The first lesson is that computational complexity theory is really, really, really not about computers. Computers play the same role in complexity that clocks, trains, and elevators play in relativity. They're a great way to illustrate the point, they were probably essential for discovering the point, but they're not the point. The best definition of complexity theory I can think of is that it's quantitative theolog…

I thought complexity theory was based on the fairly intuitive Turing machine model (of computation) and not religious concerns

Re: Ask HN: I've been a programmer for 6 years, and I can't solve basic CS problems

#100

Earlier quoted context omitted.

>And that's okay! Inventing new algorithms with theoretical significance is not your job! You have other skills and they're of much more immediate value! Except when it comes to getting a job. Forget any of the rest of your skills, because we all know the only thing that matters when interviewing is an ability to recite CS algorithms out of memory and solve obtuse puzzles while pretending you've never seen them.

Except when it comes to getting a job. Forget any of the rest of your skills, because we all know the only thing that matters when interviewing is an ability to recite CS algorithms out of memory and solve obtuse puzzles while pretending you've never seen them. I’ve been a professional developer for 20 years and have never had to recite CS algorithms or solve obtuse problems. My last three jobs I had to whiteboard an…

I've had two successful exits since the early 2000's, most recently one that of a company that I built, wrote the product for and sold to a company in 2014 (all modern web based stacks, technologies etc). The last one, I ran engineering which had 25 developers and we shipped a brand new product to market and I helped sell that company (the company that bought me out) to a larger company. All the while, still writing code, building product, etc.

I had a three year earn out, finished that and decided to get back into the workforce and get a job at a senior or above level (thinking Director, Manager, etc). Guess what, not only did my age hinder me (I'm 53), but my lack of CS math background seemed too in an interview process. Various interviews had me solving what I consider not only impractical, but almost silly puzzles / math problems that not only didn't apply to the company I was interviewing with, but didn't apply to anything real-world -- it felt like it was a way to:

- Weed me out because of my age - Make the company seem like their vetting process was "Google like" and "trendy" - Make the interviewer feel entitled or the company be "elite" in their process

Part of me realizes that some of this is to see how well someone problem solves. I get that. However, I had one interviewee actually bungle up the questions, in fact, I had to point out at one point that it appeared that they described the problem wrong. When I got my answer wrong, and then asked for the answer, the interviewee clearly realized he setup the whole problem incorrectly.

Oddly enough, this is the part that bothers me the most. I've been asked many times for my GitHub. I have lots of solid examples to see my work. I've also been asked to do a programming challenge, which almost always I nail 100%. But it's always these "trap" CS challenges that I feel are used to eliminate someone based on either HOW they solve it or a way to justify them out and not hire them based on other factors (age, fit, etc.)

I actually had one that was a whiteboard session where the CTO asked me to solve the problem on the board "using code of your choice", so I stated, "Look, since I know multiple languages, I'll use pseudo code to walk through the problem and explain the answer"

When he described what he wanted me to solve (badly I might add), I wrote the pseudo-code on the board and described the problem as being solved by using regression. Which was 100% the right answer but because I chose to use pseudo-code not say, Python or JavaScript -- he told the recruiter, "he couldn't solve the problem I was looking for him to solve." When pressed by the recruiter about the solution, he gave a link to the problem in his Github, which of course was verbatim of what I described but in Python -- using regression.

What I've learned from this is that I should contract and consult. Most of these smaller companies want what they want in the way of an employee and are seeking the 10X developer, culture fit and someone in their own age group...

Post reply on HN