Ask HN: Should I quit trying to be a programmer?
I take an extremely long time to come up with solutions to any problems. I enjoy trying to solve problems and coming up with a high level solution, but I get stuck for hours on details or miss vital parts of the algorithm so often it becomes a drag. Personal projects take me an extreme amount of time too and I haven’t made any of note. I’m not good at organizing code and I am not detail orientated which means I tend to get a lot of one off type errors and can take hours to find them. Even problems I’ve seen before, I’ll likely forget the solution or fail to recreate it.
To give a concrete example of some of the above, just this morning I tried to code the brute force solution following problem: Give two sorted arrays return the median. I spent over an hour trying to implement the brute force solution involving linearly going through each array and couldn’t code it in Python. The entire time I was struggling to figure out how to increase the respective index variables given different cases, how I would ensure one of the numbers the indices landed was the median, how to differentiate which of the array indices I was keeping track of was the actual median and finally how to determine the next number I needed if the lengths of both arrays were even.
Many problems go the same way. I don’t know what the difference between the normal struggle associated with coding is and the sort of struggle that means it’s just not for me. I'm not looking for encouragement per se, but objective feedback on which group I belong to and practical advice on how to move forward.
68 comments
[ 3.3 ms ] story [ 143 ms ] threadBut I do believe you should try to be a software developer at all before you decide what exactly what kind of software developer you should be for all your career. You have never worked with software developer and you are willing to consider only one aspect of it "worthy"?
*A comment, google-type whiteboard interviews does not mean that they do select better software developers. It is a bias, not necessarily a bias to the best ones.
With that said, think about why you chose to major in computer science and what classes you enjoyed the most. Maybe there's a specialty you really want to do, maybe you would prefer to do something tangential to programming like project management, information security or data analysis. You may find more it more interesting and easier to work on practical projects. It's probably worth trying some web development work (especially in languages such as ruby or python with foreach semantics where you won't need to worry about off by one errors as much)
I chose cs because I like problem solving, having a concrete end result and because it's a way to make good money without an extreme amount of years in school.
Alas, not all is lost. Screw what you did wrong yesterday and in the past, and start fresh today.
For personal projects, keep the scope minimal. Better to finish something than not finish anything at all. And if you're struggling with something as basic as type errors, then your approach to programming is wrong. You have to drill this to your head: code a little, test a little.
Of course, all of this on the assumption that you have speckles of ember left to turn it into a fire - to have the drive to learn and improve.
Best of luck.
- You need better practice, not more practice
- There's a difference between <being able to be hired by google> and <being able to be hired by a small company that needs a programmer>.
- Go through the MOOC "learning how to learn", sleep 8 hours, eat some ice cream, get hired by a small company, become a programmer.
Thank me in a couple of weeks for that.
Granted it does take a knack to be a good programmer, attention to detail a feel for what's wrong when tracking down a bug.
But every problem will be a struggle the first time but as you get more experience things will get easier and easier and your programming intuition of what to do and what's wrong will become better and better.
There is a wide variety of jobs out there. Maybe test out a few frameworks and see what you like.
I always recommend learning Rails or Laravel because working on web applications is always interesting and both frameworks have great communities and learning resources.
Don't give up if you enjoy it. I think you're making it harder than it is. Your degree just gets you in the door. You're going to learn and do so much that wasn't covered in your classes.
Good luck.
There are few prodigies in the field. Most people make it through sheer work ethic and self-belief. Do everything you can to hangout with other passionate people (if they're more skilled than you even better). The best way to do this is just get your foot in the door somewhere. Do whatever it takes. One year in a work environment gaining real world experience is priceless and your skills will skyrocket if you challenge yourself and step outside your comfort area.
Best of luck to you (whether you continue pursuing programming or something else)!
PS: For what it's worth, just understanding the above problem you described is half the battle. The other half is getting comfortable implementing different algorithms. For this, you can seriously just copy paste someone's solution from stack exchange and execute the code to observe the effects of your tweaks. It's kind of like how most people need to practice solving the math problems before being able to grasp the concepts behind the solution.
This is especially relevant if you think your disability is affecting the quality of your practice. You made need to engage in different strategies to get the most out of practice. (or to manage the kinds of problems you're working on).
It's possible that you would have a lot of difficulty with a career in programming, but I wouldn't even consider that until a skilled tutor or two feel that way.
There are lots of jobs that are coding adjacent. Technical SEO is an example. A mate of mine does installations of software inhouse.
You don't have to code, per se, you can likely find a job where coding knowledge helps but is not specifically what you do.
There is a lot s scope in IT beyond coding, and I'd consider exploring that.
Programming is akin to building a house. Once the blueprint is figured out, the actual act of building (putting bricks together, etc) is actually pretty straightforward. The key though, is good the planning.
By good planning, in your example of returning the median, you should solve the problem before touching your computer. Use either pencil-and-paper or whiteboard method as much as possible. For example, I'd plan it as follow: 1. Solve it in a high-level manner, as if you're trying to teach someone who never codes a program before 2. Write down all the function definitions you need (don't code the body, just know what each does) 3. Write down how all the functions are to interact (again, don't write the body of any of the functions yet, just assume you have them) 4. Write down pseudocode for each of the functions 5. Code
I've seen lots of beginner programmers tried to skip over to 5 without concrete plan only ended up confusing himself over trivial problem. No matter how tempting it is, jumping straight to 5 without concrete plan is only going to confuse you.
I forgot whether it was Leslie Lamport or Edsger Dijkstra, but one of them said that a good programmer should have the skill to fully plan out a computer program without coding it.
The need to make what I'm thinking precise and understandable to the computer or the oversight of edge cases or, sometimes, an entire set of cases I didn't have in mind originally when coming up with the high level solution, evades me until I hit a wall. I don't know how to know what I don't know- I don't know how to see what I'm overlooking when it sounds like a solid and complete algorithm on a high level.
Then there are times when I simply don't know where to start and nothing comes to me. I think your outline is good, but I'm not sure what to do with it if the ideas and logic simply don't come to my head.
To me this sounds like you should spend more time in the planning phase. Sounds like your plan needs to be more detailed and concrete. If you hadn't yet come up with a high-level solution, jumping straight to code wouldn't help either, it'll only make it more confusing.
>>but I'm not sure what to do with it if the ideas and logic simply don't come to my head.
What sort of ideas and logic are you specifically having problem with? If they're about algorithms, try reading more algorithm books (Thomas Cormen's Introduction to Algorithm is really good), do more practice programming (I used to practice a lot here https://practiceit.cs.washington.edu/). In general I'd suggest try to see more problems where the solutions are available, but don't immediately see the solutions. Try to do it yourself first.
To be concrete, yesterday I tried to solve this question: https://leetcode.com/problems/wildcard-matching/ I spent 45 minutes on the planning phase which would be the entire time I'd have for the problem in an interview. I had some pseudocode, thought through it, tried an example or two and then decided to code it up. As I did I realized a few more examples which I added in. Finally, I had some code that seemed even more correct than the code I thought was already correct. I run it and test cases fail. I spent 2.5 hours in total trying to get them all to pass without realizing the central issue of the question is what to do when you hit a * character. The necessity to try all the combinations of the string after a * doesn't not occur to me in 2.5 hours; I kept tweaking for specific cases I was failing. I ask a friend about the problem and in less than two minutes he realizes you need to try all combinations.
>>What sort of ideas and logic are you specifically having problem with?
It seems everything. Sure, some problems turn out to have an algorithm that I didn't know about it. Like the other day I was trying to do a problem that basically needed topological sort and I never really learned top sort. But then I read in the solution in CTCI that it's reasonable to derive that on one's own in a 45 minute interview so there goes that. More generally, it just seems when a problem reaches a certain level of difficulty my brain simply can't solve it. I suspect it's an intelligence thing. I just don't have a high enough IQ to get passed a certain point.
I will look at the resources you mentioned.
The fact you kept trying for 2.5 hours shows you are persistent -- an awesome ingredient to be a great programmer. In my opinion, you shouldn't blame yourself for not being able to solve that particular wildcard-matching problem. I think it's a typical "interview problem". I personally don't think "interview problem" is a good measure of a programmer because: 1. some people are more gifted in the thinking required to solve such problem. 2. if you practice a lot, basically you get better at it. It's like there's a certain pattern to such problems that you can learn. (think of it as similar to SAT)
>>Sure, some problems turn out to have an algorithm that I didn't know about it.
I'm not suggesting you need to know a lot of algos to be a great programmer. You just need to be familiar with the important ones such as linked list, hash map, binary tree, etc. Cos even at places like Google, they wouldn't really ask interview questions where you need to know anything unconventional. What I'm suggesting is that you learn to solve problem by reading solutions to existing algo problems, make sure you understand it, and try to re-implement it.
>>I just don't have a high enough IQ to get passed a certain point.
From your comments, it seems you think you have to be good at "interview problems" or what I like to call "algorithmic-thinking" to be a good programmer. I totally understand that perspective as most US tech companies' screening process involve such problems. I'm telling you from experience though, that computer science is much more than just "algorithmic thinking". There is the field of system where the main challenge is to envision how all the large number of components collaborate and work together (i.e. OS, distributed system). There is also the field of frontend web programming. Frontend involves the skill of implementing something that is visually aesthetic or implementing a web according to the design document. There's also product management role, where you have to understand the how the thing works but you don't have to go too technical. And many more.
In short, there are so much more in the CS than just "algorithmic thinking". Don't be discouraged. Try to figure out where your interest and talent intersect, work hard on it, and don't easily give up :)
And the truth is I've been doing interview prep on and off for at least a year and I'm still at this stage. My goal is to be good enough to get into a Big 4. If I can't do that, I don't want to continue. Given that, do you think I should quit?
Aside from personal opinion above, the chance of getting to Google is less than the chance of getting accepted to Harvard. And as you probably know, there are people who are qualified who got turned down by Harvard because they don't have enpugh spots anyway. So if your goal is merely to get there, statistically speaking there are much more plausible things to aim for, so you shouldn't waste your time..
For the past 14 years I've run my own web dev company but I understood my limitations and hired people who are actually good at coding and I've stuck to what I'm good at.
From what you write, there doesn't appear to be a passion for coding - avoiding assignments & now struggling with core constructs point to that. But something at some point got you into this field - perhaps there's something to the side that might suit your skills/passion more? Testing, QA, project management, client management, business analysis... there's lots of roles that benefit of understanding programming concepts that don't rely on you actually being a gun programmer.
I got into programming for the money and because I like problem solving and concrete results. I honestly think it would be perfect match if I had +10 IQ points. As for your suggestion, I wouldn't know where to begin looking for things "on the side" as you put it.
It's easy to get sucked into a coding problem and fight with it for days like it's a personal challenge to your abilities. That can turn into a habit. It did for me. Screw that. Admit you have a problem and then get over it.
The goal of working is to produce something, and not necessarily, or even very often, to invent something new or even invent a new way of doing something. Coding is no different.
The truth is for most of us coding is more often akin to assembling something even when you're designing and building something new. That's how I approach it anyway.
When I switched from coding mainly Perl to Javascript I learned (the hard way) to start searching for answers first instead of banging my head on my desk for hours (even days) over what were often times really just syntax issues or things that already had boilerplate solutions publicly available.
Learning to search for answers first made a huge difference in my productivity and in how much I enjoyed coding. Getting stuff done provides a sense of accomplishment and we all need that to inspire us to keep working.
And it's made me a better coder too. I have learned so many new and better ways to do things, as well as how not to do them, and found great explanations on the "whys" and "hows" in the process. And I learn them when they're relevant to what I'm working on too, not in some abstract way that is easy to forget or dismiss.
The truth is there is way more to learn about coding than we can possibly learn already and that gap is constantly expanding. That's really a great thing though because learning on a need to know basis makes it so much easier to get stuff done. It lets us focus on one problem at a time and not worry about what comes after. We can learn what we need when we get there and by then there might be a new and better way.
When I first started making a habit of searching for answers and example code for how to do something I was amazed a few times to find an answer. Now I'm more surprised when I don't find one easily.
To me, that's what a "hacker" is in the truest sense. You find and write and hack together code. There's nothing wrong with that. It's why we have "open source" code and in fact it's truly awesome.
"...the simplest solution tends to be the right one..."
Although its not the intended context, its extremely useful to remember when building software (at least to begin with)
And I mean practice on some project that you are personally interested in completing, some genuine goal, not an exercise or theoretical. /academic challenge.
You may be surprised to find you're able to help people solve technology problems that comp sci majors struggle to understand.
Keep moving, inward, onward, upward.
When I work on my own things, I waste a lot of time trying different ideas/implementations because there's no time constraints or due date.
Let's say you want to make a single player Tetris game right now, on a platform of your choice. Could you do that?
Single player Tetris, maybe not. I don't know graphics libraries. Maybe, if I just continually printed a 2d array on screen then I could figure out the logic, I think.
Everyone struggles as they strain to reach the next level. Do you enjoy the struggle or its outcome? If you're not having fun now, programming as a career will seriously suck for you. If you are having fun, don't worry about your speed or how well you grok algorithms - find a job, any job, and try to kick ass at it. That'll set you up for a better job. Rinse and repeat.
Some developers I've worked with are incredibly smart, but also know that of themselves and (with that knowledge) prefer to work without the constraints of having to explain themselves to others. However genius doesn't scale well, and this kind of attitude can make them less effective in teams. So learning to be a team player and adopting scalable ways of working can be a strength of your lack of ego, if you choose to see it that way.
Don't just think there's one set of criteria that all employers are looking for. Present your best self and I'm sure you'll find somewhere to work.
Of course the alternative is to not be a programmer; there are still plenty of related disciplines you can choose from.
Ultimately it's up to you to decide if you even love doing programming; recall why you chose this major; do some soul-searching and decide whether you have the motivation and interest to continue. Maybe take a short break go to the mountains or somewhere else, and clear up your mind.
Coding is not an activity reserved for the "gifted". Your daily thought processes are far more complicated than coding, and it's highly likely you have all the capacity you'll ever need to be good at it. Before you know it, you'll know 5-10 different languages and pick new ones up in days. You'll be able to solve problems in a dozen different ways, and translate problems from one structure to another; much the same way that you can already do with human language.
Ask yourself if you give-a-f*ck enough to stick with it. That's the main factor in most pursuits, the other considerations are for suckers and mostly benefit someone else.
Some disabilities can be helped with aggressive nutritional support.
You can also learn coping mechanisms to help you work around your weak areas more easily. The exact mechanism will depend very much on the disability in question.
I'm speaking from firsthand experience.
I'm medically handicapped. I have days when I'm fairly together and days when nothing comes easily. I do a lot of self care and I have learned coping mechanisms. I am more productive than I used to be and some tasks are just easier for me than others.
I also raised and homeschooled two sons who have disabilities. They still live with me.
> Some disabilities can be helped with aggressive nutritional support.
What do you mean? Any examples you could give?
When I did a high school paper on functional hypoglycemia in the 1980s, at that time, the only known effective treatment was high dose vitamin therapy and a modified diet.
Studies suggest that children with issues like ADHD benefit more from certain supplements than from standard drug therapies.
Years ago when my now 31 year old son was 8, I found a vitamin therapy protocol on the internet for Aspie kids. He has never been formally diagnosed, but he reads as very Aspie. It was some B vitamins, magnesium and one other thing, I can't recall what the last item was. After a few months on it, his severe handwriting issues improved and he began comprehending social things better. To this day, when he makes me too crazy about certain things, the solution is to get more B vitamins into him -- though we no longer use supplements and the solution these days is beef. He gets a steak for dinner when he is making me apoplectic.
Magnesium helps with noise sensitivity. I frequently run fevers. Afterwards, I am often noise sensitive. At that point, I eat dark chocolate and cashews for their magnesium content.
Firsthand personal experience suggests that many neurological issues can be ameliorated with sufficient B vitamins, good quality salt and the right fats, including cholesterol, found in foods like eggs and bacon.