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

271–280 of 309 posts

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

#271

Okay, I'll give you the "triage" presentation. It's a combination of "where to start" and "what I've actually used in industry." 1) Algorithmic complexity: Study why naively adding to the end of an array or the end of a string results in O(n^2), while doubling the size when you increase the storage results in O(n). That one tidbit has comprised some embarrassingly large fraction of the "consulting" I used to do worki…

4th one should be elective :-P

I disagree. I'm not asking for one to implement ACID transactions. Rather, just understand why people did it. I'm building a system which is relaxed down from ACID, which depends on idempotency and a single coordinator process to keep a cluster of servers from trampling on each other.

You need to know the rules and the reasons behind them if you're going to start "breaking" them. Otherwise, you're just acting in ignorance.

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

#272
post #121

Earlier quoted context omitted.

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?

That crosses into personal attack. Please review the guidelines and don't do that here. https://news.ycombinator.com/newsguidelines.html

Every time I see a deleted comment and a reply like that, I get so morbidly curious what was said, and yet, I've _been_ a moderator on a forum, so I know for certain that reading it would never make my mood any _better_, just worse.

Is this just me? I know it's self destructive to seek out negativity like that, but that curiosity just won't go away.

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

#273
post #183

Earlier quoted context omitted.

There's an old Kent Beck quote that fits here... "Make it work. Make it right. Make it fast." Your approach fits that. http://wiki.c2.com/?MakeItWorkMakeItRightMakeItFast

I've seen so many projects where the developers have taken this to heart way too much. The problem is they use it as an excuse to give up after stage 2 thinking stage 3 can come along when it actually becomes a problem. The thing is that performance issues tend to creep up on you so slowly that you don't realise it until you have a very important client with tons of data screaming at you to fix it now. To fix it then…

I'm not sure you two actually disagree, but rather that you're thinking on different scales. Make it right, then make it fast is usually talking about specific snippets of code, rather than the whole program, so your whole program should be "made fast from the start" because you went through the process of making it right and then making it fast on the components themselves.

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

#274
post #62

Earlier quoted context omitted.

> 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 twiddli…

But those issues are all totally orthogonal to my point.

You can argue that someone doesn't need something, that it's the wrong level of abstraction, or that it's not an appropriate interview question. I even agree to some degree. But that still doesn't make those "CS theory" subjects.

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

#275
Programmer for 40 years and CS terms are a foreign language to me. My daughter did a CS module at uni but when she phoned me for help I diddnt even understand what she was talking about until I googled the terms and realised I knew them all but without fancy names.

I am pretty sure in 30 years all you current experts in CS will l be scratching your heads with the same.

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

#276
You’re fine. You don’t need it. I’m a Senior Dev and I don’t have a degree. I’ve been a professional programmer for almost 15 years. Not once have I needed to write an algorithm from scratch.

Would I be a better developer if I’d learned that stuff?

Arguably, no. I’d probably be cock-sure and a bit of a dick. I know there’s a lot I don’t know and hopefully that keeps me humble. I’m always learning and I love it!

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

#277

Okay, I'll give you the "triage" presentation. It's a combination of "where to start" and "what I've actually used in industry." 1) Algorithmic complexity: Study why naively adding to the end of an array or the end of a string results in O(n^2), while doubling the size when you increase the storage results in O(n). That one tidbit has comprised some embarrassingly large fraction of the "consulting" I used to do worki…

Could you explain why adding to the end of an array results in O(n^2)? From what I can find, it appears to be O(1). If you increase the size of the array by 1 each time and copy the old array elements over, wouldn't that be O(n) to copy the array plus the additional add, O(n+1) which is just O(n)?

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

#278
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.

In this modern time, no one needs to know what the ASCII code for @ is, but I think it is logical to expect people to know that some encoding exists and that letters can be mapped to numbers.

Also, all the ASCII you need to know to solve the problem is explained at length in the problem description.

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

#279
post #31

Thank you to everyone who has replied to my rant. I felt of low value for not being able to provide immediate help for most of the problems that she's being taught to work on. Some of the examples (since some of you were asking for them): https://github.com/cs50/docs/blob/master/_pages/2018/x/psets... https://github.com/cs50/docs/blob/master/_pages/2018/x/psets... I realise that I may have written my original post a…

When I learned about the CAESAR cypher, I wrote a program called ENIGMA that changed the number of places shifted with each iteration.

Obviously I knew next to nothing about cryptography, and I did feel very smart about making a safer cypher.

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

#280

I'm a little annoyed by the people who call these simple problems. There are no simple problems. Calling something simple is very insulting and demoralising. It really depends on your experience and knowledge for what is simple for you. You can have 20 years of experience developing projects and acquired a ton of valuable skills but when I shove a whiteboard in your face and tell you to solve some algorithm it's comp…

> Just as someone with a lot of theoretical CS knowledge will struggle if I present them with a failing dependency tree of 30 thousands NPM packages. Good luck solving that when you have never done it.

Honestly that problem is kind of self created. The amount of trivial NPM packages is mind blowing.

Post reply on HN