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

181–190 of 309 posts

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

#181
post #58

Earlier quoted context omitted.

Can you solve these problems in your language of choice then? How can you write business logic at work without loops?

I tried looking up various solutions in languages which I knew a lot better, so, and example of one of these would be Go. The logic was there, but I still couldn't understand most of what was going on, unfortunately. Through trial and error, I eventually managed to get something working. >How can you write business logic at work without loops? It's not that I don't use them, it's that I have a hard time figuring out…

Personally, I would feel trying to find the solution by parsing other people's code would be way more complicated than just coming up with your own solution.

I would forget about C, though, and try to do it in a language you already know to begin with.

To be honest I also find it very difficult to relate, as especially the Cesar Chiffre seems like such an easy problem. I only have to read it and my brain already maps out the solution. (I guess you could call it a No-Brainer, except that it seems to be a "Brainer" :-)

I honestly can not imagine how you usually code.

However, I want to say I remember my first year of studying mathematics. Many of the exercises also seemed very hard back then, but looking back on them the following year, they actually seemed quite easy (well, most of them). So practice and experience really can work. No guarantees, though.

Personally I like "Project Euler" for programming problems: https://projecteuler.net/ I actually had questions pop up in interviews that I had previously solved on project Euler.

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

#182
post #44
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…

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.

I mean the question also is whether OP has done any programming in C before. If the majority of your expierience is in VB.NET and web technologies I can see this being a major hurdle aside from the actual algorithmic problem.

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

#183
post #50

Earlier quoted context omitted.

I just replied above, but I've never been amazing at being able to figure out how I should be using for loops to solve problems quickly and efficiently. I do tend to make things harder for myself, as my boss and fianceè have told me before. I usually end up with a very convoluted solution which I end up coming back to and refactoring the next day.

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 you have a huge architecture issue because the whole system is so inefficient. So rather than rewrite the entire code base to actually be efficient you are forced to hack in some kind of caching solution. Then your problems multiply.

Make it fast from the start. Premature optimisation being the root of all evil is a lie!

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

#185

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…

well your experience is highly atypical.

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

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

I mean you had your share of tough love already in this thread. But: - The examples you posted are indeed very simple problems. Caesar is just about "can you scan two arrays at the same time" (and then do charString + charKey and some modulo). Luhn is just a step of non-obvious specification to follow.

- This is a different game than your day to day. Those two being easy stuff means nothing if you never played the game.

- Now you moved a "unknown unknown" to the category of "known unknowns". You know you have no competence in this category, and if you wish to improve in it you can do so. Or not, it's your choice. Before, you didn't have the choice. So that's good!

- It's not about the language. You can solve these in Java, C, Assembly, Haskell. Most training website for interview questions (like these) allow you to implement in any of the major languages. If you want to play the game and get better, I recommend Hackerrank (for structure) and TopcoderArena (for variety, since they give you a bit more fuzzy spec and you also need to identify the algo for the issue at hand). The latter is slow as balls though, and offers no solution (except the best submitted, which may be cryptic).

- This stuff takes time, and if you want to learn about things you'll have to book up. Cormen's "Intro to algorithms" or Skiena's Manual are the goto texts. They are thick. Take your time. Persevere.

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

#188

Earlier quoted context omitted.

> Visa approval requires that paper to prove you're skilled. There are ways to go around that - in some countries, US among them, you can count some years of specialized work experience in the field in lieu of formal education ("degree equivalence" - I believe). I got a work visa in Canada on that basis, and later L1, H1B, and finally a green card in US, without any degree. With respect to US specifically, google for…

Yea, but was it a relatively easy process? I've heard of USCIS too, but the process looks complicated.

I don't really know - in my case, it was all handled by my employer and their lawyers; all I did was gather the documents they told me they'd need (basically whatever is necessary to prove said work experience).

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

#189

Programming isn't the same thing as computer science, in the same way that writing isn't the same thing as journalism. Writing code is the easy part. It's tedious, requires lots of practical knowledge and troubleshooting skills, but is for the most part a straightforward exercise. Computer science is about the theory. It involves solving problems in the abstract, using (and in some cases creating) new conceptual tool…

That’s a good point. Now, how do you find interesting job which involves computer science skills?

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

#190
post #100

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

As has been said here many times, these puzzles test for corporate compliance, not for problem-solving ability. You're being assessed on your willingness to spend x months studying to a certain industry-wide norm, and to then pliantly follow interview instructions to reproduce one of the stock answers on demand in the format requested.

If you deviate from the rather arbitrary requirements you will be considered a no-hire.

Other industries have a formal study, exam, and professional certification process. Developers don't. [1]

In the absence of that, these interview play-throughs are treated as an ad hoc substitute. They're a passable fit for generic ass-in-chair juniors, but a very poor fit for anyone looking for good seniors or a CTO.

[1] In the UK you can become a Chartered Engineer via the British Computer Society. I don't think there's anything equivalent in the US, and I'm not sure how many shops in SV even recognise Chartered Engineer as a professional qualification.

Post reply on HN