I've heard and read this several times everywhere around the techmosphere.
So I must ask: What does thinking like a programmer mean to you?
UPDATE: For all of you who answered, "Think like a computer!"
I've got a video for you.
I've heard and read this several times everywhere around the techmosphere.
So I must ask: What does thinking like a programmer mean to you?
UPDATE: For all of you who answered, "Think like a computer!"
I've got a video for you.
For further actions, you may consider blocking this person and/or reporting abuse
Adrián Bailador -
Phaustin Karani -
Probir Sarkar -
Saddam Hossain -
Top comments (58)
01101001 01110100 00100000 01101101 01100101 01100001 01101110 01110011 00100000 01110100 01101000 01101001 01101110 01101011 01101001 01101110 01100111 00100000 01101100 01101001 01101011 01100101 00100000 01100001 00100000 01100011 01101111 01101101 01110000 01110101 01110100 01100101 01110010 00100001
In all seriousness though, to me, thinking like a programmer means:
Hmm thinking about breaking problems into small pieces is like thinking "algorithmically". Right?
I don't believe breaking problems in small chunks and thinking algorithmically is the same thing at all. The first is more about reducing the big picture into small problems you can handle in your human cache memory, whereas the algorithm is an abstraction model of a good way to solve the big picture. Usually the algorithm ends up being the big picture on the implementation side. For exampke say you want to implement Djikstra's algorithm. Thinking algorithmically is thinking about what data structure you'll use because of which operation you need to perform on each step. The small chunk is the implementation of a single step or a part of a step.
Yeah, I think I agree with this. The algorithm is somewhat big-picture thinking, though to put it in code you need to chunk it into the smallest components possible to tell the computer what to do. It's a bit tricky, because while an algorithm is defined by small instructions, the algorithm itself is a composition of those instructions...
This is my life.
Also there are 3 points. Always have 3. Just like Andy and his cats
YES! I popped your Binary message in a converter 😆
"it means thinking like a computer!"
Same 😅
Thanks for making me laugh, now all my cats are looking at me
Edit: I only have 3 cats
Happy to help! :)
hahahaha DON'T SASS ME.
Update: I see what you did there.
But computers can't think :/
I love this question, because so often do we read it, but don't necessarily reflect on it!
To me - it's thinking logically and in steps with no assumptions made! I am problem-solving at its finest. And, like anything - it is a skill to practice and reiterate on. So usually I like to break down problems or functionality into small manageable steps.
I want A to do B. I get the logic down (or at least try to in pseudocode whether that be mentally or in the form of comments in my editor <-- a much better approach) and then implement it in code.
I really don't worry about my first draft of code being polished, I allow it to be messy. Then, once I get working functionality I go back and comb through it, rinse and repeat.
For me, that above are the foundations of thinking like a programmer.
The next steps are efficiency!
How can I write my code that is explicit and easy to follow?
One thing I absolutely love is - finding new ways to implement code or a solution in a different way. Sometimes I'll come across an article and get so excited when I find practical bits that are relevant to what I am working on and I can implement it in. It feels like a treasure when you can find and see something in a different way! I LOVE that and cherish those moments!
Aside from development in particular, I find myself solving problems in every day life logically. Why carry my groceries the same route, when I can take this different path and get to the kitchen quicker?
Agree. "The code works, but there must be a simpler/more manageable way to do this." Cue a day researching patterns and badly documented libraries just to MAYBE reduce my 60 lines of code down to 5 lines.
When it works, it's the best feeling in the world. When it doesn't, I always learn something i can use somewhere else.
This is actually the most succinct answer I've got here since you broke down into detail what you do by step.
Right??? I also think about the grocery problem especially if I buy party-sized things and it's raining outside: 5x 2 liter soda bottles, 5x bags of chips -- how can I carry it all into the house, while running back and forth in the rain the least amount of times?
I'm not exactly sure of the context in which the phrase was used. It could mean translating the problem into logical parts and then those discrete parts into code.
However, it seems to me that thinking like a programmer could be detrimental. For instance, I'm standing on the curb at the airport about ready to check some bags for the family. I think to myself: "I will make sure I have all 3 bags." So I count them: 0, 1, 2. Then I think "Oh no, I'm missing a bag!" And after puzzling for a few seconds realize I made a mental off-by-one error.
I have a background as a writer so maybe my perspective is a little different. But I've always felt that "thinking like a programmer" was about effectively using technology to tell a story that people can follow to solve tasks and problems.
The thing about programming is that it’s so abstract that there has to be room for virtually any mental model. Programming is just a collection of shared metaphors and a few eureka moments along the way.
It feels like that episode in South Park with the underpants gnomes.
That’s why describing your solution is so often such a big leap from implementing it. Maybe you just tried a bunch of stuff. Now tell me what happened.
I'd say thinking like a programmer would mean something along the lines of "modeling out the problem".
It also might mean thinking about the current problem, with a bit of an eye towards the future problem (but not too much!)
Otherwise I don't know, I'd hate to think this question could lead to telling people what "types" of thinkers make for good computer programmers. Thinking like a programmer can mean highly logical or highly creative and abstract.
I'd perhaps say that systems thinking (whatever exactly that means) is a way of thinking like a programmer. An operating system, an API infrastructure, a program, it's all a "system" I think.
What is a system?
Ben Halpern
Overall, being a problem solver and being willing to learn.
A large part of my workflow is working to make existing software more maintainable, or setting up structures to scale a code base and keep it maintainable over its entire lifetime.
"Thinking like a programmer" for me is not just about solving problems or breaking a task down into smaller components, but solving the next problem: seeking to anticipate future problems, and make decisions about the current task based on the long term vision.
I always think that this joke sums it up perfectly:
"The programmer's wife sent him to the grocery store. Her instructions were: 'Buy butter, see if they have eggs. If they do, buy 10". So he bought 10 packs of butter."
HAHA order of operations and specificity.
I remember when I was first learning JS, my friends told me this little anecdote emphasizing the importance of "return"
"You give your roommate a list of things to do:
At the end of the day, he returns with nothing.
But hey, you got a red door."
You didn't specify if he had to RETURN HOME WITH THE PIZZA so... ¯_(ツ)_/¯
That's a great way to remember specificity, thanks!
Some comments may only be visible to logged-in visitors. Sign in to view all comments.