Jump to content

  • Log In with Google      Sign In   
  • Create Account

Thinking like a programmer


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
16 replies to this topic

#1 metallicsoul92   Members   -  Reputation: 101

Like
0Likes
Like

Posted 22 March 2011 - 06:25 PM

Hey guys, i have been programming for the last year and a half, I am fluent in c++ and I am almost fluent in Java. However, the problem isn't learning the syntax for these languages, its learning to think like a programmer. Does anybody have anything they can recommend me doing to start thinking like a programmer?




Sponsor:

#2 owl   Banned   -  Reputation: 364

Like
0Likes
Like

Posted 22 March 2011 - 06:39 PM

Just keep programming. Eventually it'll come.
I like the Walrus best.

#3 wicked357   Members   -  Reputation: 1275

Like
0Likes
Like

Posted 22 March 2011 - 06:41 PM

I am not sure how someone cannot think like a programmer after becoming fluent in a programming language. I guess you could try looking at things and thinking how you could program how they would work. Like if you see something swinging think about the algorithm you would use to make something do that. Or if you see a math equation think about how you program that to work out. If you are into game development, think about how you could create something you see and what kind of methods you would use. Other than that I think it is something that would just come to you with the more time you spend programming. I can't help but think like a programmer all the time and sometimes it is annoying. The reason I say annoying is because if I see something and get an idea, I cannot stop thinking about it till I get it down on code.

#4 Hodgman   Moderators   -  Reputation: 31798

Like
0Likes
Like

Posted 22 March 2011 - 06:50 PM

Maybe reading something like code complete will help?

#5 Splinter of Chaos   Members   -  Reputation: 239

Like
0Likes
Like

Posted 22 March 2011 - 07:17 PM

There's no one way to think as a programmer. One good thing to do is familiarize yourself with the different programming paradigms like object oriented and procedural programming.

#6 zerothrillz   Members   -  Reputation: 152

Like
0Likes
Like

Posted 22 March 2011 - 07:22 PM

Solve lots of problems, think about how to solve lots of different types of problems. Read lots of stuff about programming. Be good at math and understanding mathematical languages. Write programs and read programs. Never stop learning.

#7 wqking   Members   -  Reputation: 756

Like
0Likes
Like

Posted 22 March 2011 - 07:48 PM

Think, program, rethink how to improve you programed, program again to improve, rethink again, an endless loop and you will grow endlessly.
During that endless loop, reading some kind of good books on design patterns and refactoring may help you too.

http://www.cpgf.org/
cpgf library -- free C++ open source library for reflection, serialization, script binding, callbacks, and meta data for OpenGL Box2D, SFML and Irrlicht.
v1.5.5 was released. Now supports tween and timeline for ease animation.


#8 metallicsoul92   Members   -  Reputation: 101

Like
0Likes
Like

Posted 22 March 2011 - 11:08 PM

I am not sure how someone cannot think like a programmer after becoming fluent in a programming language. I guess you could try looking at things and thinking how you could program how they would work. Like if you see something swinging think about the algorithm you would use to make something do that. Or if you see a math equation think about how you program that to work out. If you are into game development, think about how you could create something you see and what kind of methods you would use. Other than that I think it is something that would just come to you with the more time you spend programming. I can't help but think like a programmer all the time and sometimes it is annoying. The reason I say annoying is because if I see something and get an idea, I cannot stop thinking about it till I get it down on code.



im talking about how to go about doing something. I wanna write a game:
so i first think ok the game needs :
graphics,
sound,
physics,
user input
etc.

after that its a blur, on how to do go about putting everything together




#9 medevilenemy   Members   -  Reputation: 326

Like
1Likes
Like

Posted 22 March 2011 - 11:31 PM

I tend to think one thing a lot of formal methods of teaching technical skills (the programming aspects of CS or engineering in large part) lacks is any instruction in creativity/design thinking. I am myself educated as a computer engineer, and there's something we tend to say from time to time and that is that one "thinks like an engineer" or doesn't. Perhaps its something that isn't really teachable, I don't know. I think the same basic way of thinking applies to programming. This is not to say you can't be a good programmer without this, but it works through a different mechanism.

A lot of people, including myself, describe thinking "like an engineer" or "like a programmer" as being able to sort of "feel" a problem and visualize its parts as well as possible solutions instead of the mathematical approach they tend to teach which is very paper-oriented and manual -- focused largely on canonical forms for things and "rules" rather than organic and creative design and problem solving. Its a peculiar ability, to be able to sense the scope and details of a project as if it were a physical object with parts which can be removed and moved around. Honestly, I don't think it is related to the knowledge of any language or method in any direct way. This is also why I tend to think that design based technical fields are not so mathematical and structured as many believe or would teach you -- rather there is plenty of room for creativity and organic development though it manifests differently than painting a picture or writing a book. Sorry for rambling, just my quick $0.02
There was a saying we had in college: Those who walk into the engineering building are never quite the same when they walk out.

#10 jbadams   Senior Staff   -  Reputation: 19330

Like
0Likes
Like

Posted 22 March 2011 - 11:37 PM

im talking about how to go about doing something. I wanna write a game:
[...]

after that its a blur, on how to do go about putting everything together

Unfortunately, that is something you'll really only get a good handle on through experience. Choose an approachable game idea -- if this is your first game I would recommend something reasonably simple such as Pong or Tetris -- and set about trying to make it. Make sure you create a complete game, including the actual gameplay, menus, high-scores, pause screens, etc. Along the way you'll be forced to come up with ways to approach putting the whole thing together, and can ask for help or feedback on the areas that you can't figure out or where your own solutions seem sub-optimal.

Learn by doing. Hope that helps! Posted Image

#11 szecs   Members   -  Reputation: 2185

Like
2Likes
Like

Posted 23 March 2011 - 01:47 AM

As others have stated, make programs. But start small. Tinker as much as you can.
Thinking as an engineer comes with practice, but sometimes I feel it's really a gift. I've seem so many people totally puzzled and stunned when facing a simple logical problem. I had no problems with that, because I played Lego and built stuff since I was 5...

So just make stuff and you should be fine.

#12 arasmussen   Members   -  Reputation: 111

Like
1Likes
Like

Posted 23 March 2011 - 01:07 PM

http://projecteuler.net/

#13 owl   Banned   -  Reputation: 364

Like
0Likes
Like

Posted 23 March 2011 - 01:14 PM

because I played Lego and built stuff since I was 5...


Heh, me too. :)
I like the Walrus best.

#14 TheTroll   Members   -  Reputation: 882

Like
0Likes
Like

Posted 23 March 2011 - 03:26 PM

There is no single way to think like a programmer. A lot of it depends on the type of person you are.

There is also no single way to program or solve a programming problem. Anytime someone says this is the "right" way to do something, you should be secptical, because right is all in the eyes of the beholder. The same goes with the "best language" arguments.

The question you should be asking yourself is; "If someone gives me a problem to solve in code, can I?"

#15 rip-off   Moderators   -  Reputation: 8709

Like
0Likes
Like

Posted 23 March 2011 - 03:35 PM

My "thinking like a programmer" has evolved over my time spent programming. The more diverse project, problems and tools I'm exposed to the better I seem to get at it. Start writing code, and finishing projects. Finishing projects is important because unfinished projects are often indicative of problems you aren't comfortable with or tools you aren't aware of yet.

#16 krez   GDNet+   -  Reputation: 443

Like
1Likes
Like

Posted 23 March 2011 - 11:47 PM

I find it helps to do everything in powers of two.

For example my lunch today was a double cheeseburger with 128 french fries and 1 liter of cola. Then I brushed my teeth using 512 strokes, smoked 4 cigarettes, and was ready to code for several hours.

:D

#17 MeshGearFox   Members   -  Reputation: 158

Like
0Likes
Like

Posted 24 March 2011 - 07:49 AM

I think the first step towards thinking like a programmer is, after waking up every morning, immediately start questioning why you woke up. The next step would probably be to start crying and hitting the whiskey.



(A more serious answer might be: Most programmers think like programmers. Instead of being like everyone else, learn to NOT think like you're trapped in your specific problem domain. This is how you develop unique ideas).




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS