I have some technical interviews coming up. I am struggling to think like a programmer. Whenever I get an assignment, I always ask for help from professor or tutor and explain how to get started and such. But I have a feeling that I would not able to answer technical questions if given. I do not want to say, "I don't know" on every question I do not know. Any suggestions? How can I improve? Sometimes, I used internet to find the solution to my problem, for example, how to store in an array, I googled that and see how it's done. But tends to forget them easily.


  • 7
    This might seem harsh, but maybe you should practice doing your own work for once. – Telastyn Oct 1 '14 at 14:29
  • @Telastyn Thanks for your quick reply. Some assignments, I did on my homework (like few), and was able to understand what is going on. – S2015 Oct 1 '14 at 14:45
  • 3
    There is no switch that could allow you to think like a programmer. From what you have written, I get an impression you struggle to come up with solutions on your own. Of course, it is easier to look information up or ask someone for advice. Very often it is better to get as far as you can on your own, and then ask how to improve your solution. Think, do research, draw a sketch of what you want to do, and present that to the professor. – MoustacheMan Oct 1 '14 at 14:53
  • I would recommend using Coding Bat if you struggle to think like a programmer. I've completed all the exercises on it and it has vastly improved my logical thinking! But then again I'm only an intern at the moment. – Adz Oct 1 '14 at 15:09
  • @MoustacheMan Remember what comments are for, that looks more than an Answer than a Comment. – Jonast92 Oct 1 '14 at 17:17

You need to practice coding to think like a programmer in the same way you need to practice anything to be comfortable with it.

1) Write code

There are plenty of places online that will give you a bunch of problems to practice on and ponder upon. I like http://codekata.com/ but there are several others. You also have previous homework that you have the solution to. Having done it once, try to do it again from memory. If you need to peak, then peak. Repeat until you can code it from memory. Being comfortable with recalling how to do fundamental tasks will help you look at a problem and immediately start to see possible solutions; if you don't master the building blocks, what do you expect to build?

2) Read code

Read code online, read code in your text books, read code your peers write, read code strangers write... Just read you some code. This is especially helpful if the person decides to implement a particular solution in a different manner than the way you would have gone. Ask yourself, why did then go this route? Is it better, worse? Does it matter?

3) Know a language's best practices

Each programming language has its own way of doing things like array/list iteration, loops, condition checking etc. There's a lot of overlap, but a certain programming language can make a particular programing task very easy or very tedious. For example, list comprehensions in python can save you a lot of time, but not if you don't know about them.


That's pretty simple : practice. A lot. That's the only way you're gonna get better. Your example of forgetting simple coding methods such as storing data in an array is typical from someone who hasn't produced enough code in his life. Sure, if you read how to do it on Google and copy-paste it once to complete your homework you won't remember it. If you do it twenty times in various exercices, you will.

I assume you're (or soon to be) fresh out of college. Interviewers don't expect you to know everything (of course they don't expect you to be completely ignorant either). Don't lie to them. Just work so that there soon will be only a few questions you have to answer "I don't know" to, and you'll be fine

Not the answer you're looking for? Browse other questions tagged .