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
Arindam Majumder -
Paul Ngugi -
Ben Link -
Ibrahim Shahine -
Latest comments (58)
Hahaha that was a good laugh, needed that!
{thing i'm looking at} isn't in my favorite language![0] ::throws temper tantrum::
Seriously though I think this assumes there's just one kind of programmer, or one way of thinking for programmers. But if I had a specific problem I could tell you how I'd think about it.
.[0] Python, of course.
You have to know what
programming
is first. Only then you can start thinking in it.Programming is the art and science of turning a
set of ideas
into alist of computer instructions
.That's it.
You have to think both as an artist and as a scientist.
To program as an artist, you have to read The Art of Computer Programming
To program as a scientist, you have to read The Science of Computer Programming
Simple ?
To me, thinking like a programmer means you can define the problem space and solution space. Then you could make a plan to go from the problem space into solution space.
For some tasks, you might not need a computer to do it, but a computer could help you execute it for you to test it.
Just focus on the: Think like a programmer, not think like a computer.
stackoverflow.com/search?q=Think+l...
For me, thinking like a programmer means thinking how to write your code as readable as possible.
IMO to think like a programmer you must:
Maybe I'm not a programmer, more a systems architect, because what I do day to day, the way I think, is more complicated than most of what has been listed.
The way I think is generally 20% "how to make things work" and 80% "how to prevent things from breaking". The happy path is easy. It's the potholes and detours that are hard. I think about the implications of a proposed solution - will it impact other components of the system? What does it imply for edge case? Can it handle the printer catching fire, or the database being hijacked by aliens?
I don't ask "can it fail?" but "under what conditions will it fail?" Then I compare the likelihood of failure to the damage that would cause. If a user enters bad data and gets confusing results, that needs to be fixed. If it only fails once the Java Date maximum value is reached, yeah, I'll live with it.
So, I think this may illustrate the difference: "how do I get to Starbucks from here?"
Normal person:
Programmer:
Pareto principle at work.
I think it is as important to ask:
Under what conditions will it succeed?
The most important part for me is: "MAKE NO ASSUMPTIONS".
Assumptions without asking to clarify will inevitably lead to extra work.
Or broken hearts.
I think the different types of artifacts we create each correspond to a way of thinking: source code, scripts, architecture diagrams, spreadsheets, dev tools, etc.
These ways of thinking are our real tools.
Edit to add: LOL @ the video
I would say being able to think like a programmer for me. Is being able to break a process down into a bunch of smaller steps. For instance, if you wanted to make a button do something you would break the process down. Such as hover over the button. Process button clicks and performs the action you want to perform. I would say thinking like a computer just makes the concept a bit more confusing. But for me its just being able to logically work through a problem.
geekgirl <3
Usually it is stopping to listen to what the problem is and what the purported solution may be. Then thinking deeply about what possible solutions could be for the use case. Then breaking all of that down into separate problems to be solved.
Thinking through problems logically from the beginning and all possible endings. Being analytical.
That's exactly it. When people say they want to break the problem down into smaller pieces, that's not programmer thinking, that's architect's role.
Let's say you get a task that you need to write a function that returns a list of database records from start# to end# (e.g. one page of results).
This might be probably a oneliner (sorry, I think in Linq). How do you break it into smaller pieces?
It's more about being able to analyze the problem in your head and then write it in one take.
First ask yourselfg a question: Do I have all important inputs to complete the task? No? Go grab them!
The things important here are:
Another things you should do:
Some comments may only be visible to logged-in visitors. Sign in to view all comments.