12 Replies - 1636 Views - Last Post: 23 December 2009 - 10:03 PM

#1 kowwok  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 21
  • View blog
  • Posts: 583
  • Joined: 20-November 09

Programming Psychology

Posted 01 December 2009 - 08:49 AM

After reading the thread about whether or not learning to program is hard, I noticed the main point seemed to be this:

It's not the programming/coding part that's hard, it's learning to think like a programmer, to be able to adapt to different situations, and having the ability to come up with a logical development process that suits the needs of any given client.

That being said, I was wondering if you programming pro's could help us nublets out. Personally, thinking like a programmer is the hardest part for me. I memorize the code and type it out. After a day or two I look back at it and think "what the heck does any of this mean? Did I copy this straight from someone else's code?"

Is This A Good Question/Topic? 1
  • +

Replies To: Programming Psychology

#2 NeoTifa  Icon User is online

  • Whorediot
  • member icon





Reputation: 2497
  • View blog
  • Posts: 15,462
  • Joined: 24-September 08

Re: Programming Psychology

Posted 01 December 2009 - 09:10 AM

I think it's kinda like a thing you're born into. Most people say "I wanna be [insert vocation here] when I grow up", but if you look at them throughout their whole entire lives, you can pretty much tell what they are born to do, no matter what they're going to college for. I'm gonna say it now, I'm an engineer through and through. If you look back, my favorite childhood past-times were Legos, Lincoln Logs, and making cushion/blanket forts. (Sailor Moon was exluded from this example :P) I love to build things, and you could see that when I was little. I also spent most of my time in front of my Nintendo, and I even remember I'd get excited every time I saw a computer. I've had a little VTech laptop since I was like 9 (which was how I actually learned BASIC, as it had a compilor). Ever since then I've programmed, tried to build things, and such. (... and watch Sailor Moon :D)

Learning to think like a programmer can be done, it's just not easy. I mean, I can't just learn to think like a nurse, and show compassion and not get repulsed by huge boils and blisters and stuff; I'm not cut out to be in the medical field. The mind can be trained, but it is very difficult to push against your will. Thinking logically normally comes easy to me, and so I always think of things along the lines of "well, if I do this, this will happen. However, if this happens, I could do this, which leads to this result..." and etc.

If you really want to train your brain that way, do this simple exercise: make a list of instructions on how to make a peanut butter and jelly sandwich for someone who has no memory or conciousness of making one before. Basically, make it for a brain-dead person. Sounds simple enough, but if you're stopping at like 5 steps, you're doing it wrong. Ideally, the list should probably be like a page or two, and even that could be elaborated more. It's harder than you think. Trust me. ;D
Was This Post Helpful? 0
  • +
  • -

#3 erik.price  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 485
  • View blog
  • Posts: 2,690
  • Joined: 18-December 08

Re: Programming Psychology

Posted 01 December 2009 - 02:43 PM

I don't think the "Memorize, recite, repeat" is an effective strategy for learning to program at all (or learning any topic for that matter).

Think back to your middle school art class (I know, it was painful), if you were like me, you had next to absolute zero artistic ability, you went with stick figures and that was about the best of your ability.

Every day in class, you would be asked to do the same thing as everyone else. Look at this picture/painting/style, make a copy of it.

This isn't a very stimulating way to learn, and you'll only end up with a crappy monotonous picture anyway (unless your good at art, in which case the last rant of a paragraph is void).


What I'm saying is, don't just memorize the code and try to repeat it. Try something out, do some of the boring memorize/repeat examples, and then experiment. Try something new out. It doesn't have to be a game changing piece of software, just find something simple that intrigues you and try it out!

Hopefully what I said made at least partial sense :)
Was This Post Helpful? 0
  • +
  • -

#4 TriggaMike  Icon User is offline

  • Using up all your 1's and 0's
  • member icon

Reputation: 85
  • View blog
  • Posts: 1,101
  • Joined: 26-September 08

Re: Programming Psychology

Posted 01 December 2009 - 06:25 PM

I heard from a very well versed programmer that you will meet two types of people who develop software.

Coders: People who have learned to convert their thoughts and designs into code

Programmers: People who eat, breathe, sleep, and think in code. These people don't think about how to convert ideas to code, they think in code.

So if you are in the former category then you will likely have troubles adapting yourself to many different situations and being truly versatile in the industry. The latter will obviously have an advantage, both learning to code and implementing what they have learned. It's just a way that people think, you either think in the logic and understand programming at it's most base level, or you don't.

It's sorta like Erik was saying, in relation to art. Some people learn to mimic it, others are born with it.
Was This Post Helpful? 0
  • +
  • -

#5 Allizoid  Icon User is offline

  • D.I.C Head

Reputation: 4
  • View blog
  • Posts: 91
  • Joined: 09-November 09

Re: Programming Psychology

Posted 01 December 2009 - 06:43 PM

When I first started out in high school, for the first 3 or so months the teacher made us write in psuedocode. I think this was quite beneficial, because it helped me "to think like a programmer", understand the structure of programming languages without having to learn any syntax.
Now I think I should add that I wasn't particularly good at programming in high school, but I had a great interest in it. I stopped programming for 6 months and came back to it when I went to university. We learned C++ straight off the bat and I found it to be very easy, as it was just syntax I was learning. Since then I've been doing quite well in my programming related subjects.

So I think my suggestion to anyone who can't "think like a programmer" is to understand psuedocode first, then move on to an easy programming language to reinforce your learning (ie compile code, test, debug etc).
Was This Post Helpful? 0
  • +
  • -

#6 kowwok  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 21
  • View blog
  • Posts: 583
  • Joined: 20-November 09

Re: Programming Psychology

Posted 01 December 2009 - 06:51 PM

All great posts so far, thank you for your input :)
Was This Post Helpful? 0
  • +
  • -

#7 moonknight  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 106
  • Joined: 19-October 09

Re: Programming Psychology

Posted 02 December 2009 - 11:10 AM

yeah, im going to have to say, The idea behind programming is an easy concept, learn syntax then its the algorith and putting them togethter wich is hard.
Was This Post Helpful? 0
  • +
  • -

#8 MentalFloss  Icon User is offline

  • "ADDICTED"[2:5]
  • member icon

Reputation: 525
  • View blog
  • Posts: 1,397
  • Joined: 02-September 09

Re: Programming Psychology

Posted 17 December 2009 - 11:31 PM

Thinking like a programmer... hmm.

I have a point I think, but I just have to ramble a bit here...

First, there's several phases I transition between. These are contextual to what I'm currently doing and at what stage I'm at. Also, there is no order. These are merely responses to certain situations.

(Also, I'm not a professional - I'm QA by title currently. So, keep that in mind.)


Initial Project Idea:
- I stop programming oddly enough. I don't write any code at all (unless it's job related) during this phase. I start thinking purely about what it is I will create - what's its purpose, will it be useful, has it been done, more importantly - can I do it better? All through this percolation, I research my idea out and figure out my approach. I would say I'm simply in observer mode.

Design:
- This is where I start to really, really think about the actual code that will go into my project. I think about my data structures I'll need to create and the overall flow of the application. What will it look like? What usable features will be in initial pass? What do I have to prototype out to ensure my initial assumptions are correct? I think about code a lot here, but I still do not write any.

Prototyping:
- Assuming I have a complicated section that I believe I'll need, I'll create a prototype out of it. It will usually just be a single feature. My thought process here is to only think about the prototype and only code the prototype. In fact, I want to paint myself into a corner and be very rigid about it if that's going to happen. I want to know early (in my prototype) how this is going to fail and if it's acceptable. This also tells me what research I have to do and what other prototypes I might need first because the current one is too complex still.

Go Time:
- Just code and test. There's nothing more to it here. I know the features I need and I know when they are satisfied or not. The prototype worked out and I know I can mimic its structure - for now.

Bugs:
- I kind of like finding bugs because it reminds me of my weak areas. Do I actually learn from it? Na, not always - but sometimes. At this point though, my mind set is that of a troubleshooter. I get in the mentality that I'm tech support (an easy switch because I've done tech support). And I troubleshoot my problem until it's fixed. I should also mention that I don't go back to thinking about the big picture here. I just focus on the bug.

And that's it. In regards to programming, my mind bounces around those concepts.

Now, I have done a couple programming projects for work. In those cases, I have one more phase:

Requirements Gathering:
- No design - no code - no prototyping. I only talk to the customer and ensure that what I have in mind is what they want built. Every detail is meticulously fleshed out. My last project I estimated had almost all the time allocated to requirements gathering. Coding wasn't even hard but there were nuances that we would have missed had we been less diligent in this aspect.

So, learning to think like a programmer? Maybe I'm a bad case study because 1. Not professional and 2. I'm honestly pretty damn bad at programming. But, again - take it as you will.

Take care.
Was This Post Helpful? 0
  • +
  • -

#9 kowwok  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 21
  • View blog
  • Posts: 583
  • Joined: 20-November 09

Re: Programming Psychology

Posted 18 December 2009 - 06:16 AM

Thank you very much mental! That was definitely a well thought out post, I'll keep those things in mind.
Was This Post Helpful? 0
  • +
  • -

#10 Krisx  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 21
  • Joined: 14-December 09

Re: Programming Psychology

Posted 19 December 2009 - 04:14 AM

View PostTriggaMike, on 1 Dec, 2009 - 05:25 PM, said:

Programmers: People who eat, breathe, sleep, and think in code. These people don't think about how to convert ideas to code, they think in code.


I function in PHP.

Happy - Cookies make me happy
<?php
setcookie("ME", "COOKIE!", time()+5000);
?>


Angry - Self explanatory
<?php
die(die(die("DIE!");););
?>


Sleepy - Delay execution
<?php
sleep(5000);
?>




and If i start thinking in C then my avatar shows my mad C executions.



IF THIS IS VIEWED IN LATER DATES AND MY AVATAR HAS CHANGED:

if(dead)
beat();


:D

This post has been edited by Krisx: 19 December 2009 - 04:15 AM

Was This Post Helpful? 0
  • +
  • -

#11 Choscura  Icon User is offline

  • D.I.C Lover


Reputation: 449
  • View blog
  • Posts: 2,207
  • Joined: 18-October 08

Re: Programming Psychology

Posted 21 December 2009 - 11:56 AM

I don't know how useful my input will be, but I think in terms of objects and actions. I've spent a lot of time learning to make very exact mechanical things, and so when I get the idea, I generally try to physically visualize it (which I can do with some strange things) and visualize what it does with the other objects- eg, bouncing into things and so on. then I take each of these and look at the discrete pieces of code in each one, and I try to reduce this so that it's as absolutely efficient as possible.
Was This Post Helpful? 0
  • +
  • -

#12 kowwok  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 21
  • View blog
  • Posts: 583
  • Joined: 20-November 09

Re: Programming Psychology

Posted 21 December 2009 - 01:49 PM

I see what you mean, thanks :)
Was This Post Helpful? 0
  • +
  • -

#13 pablo9891  Icon User is offline

  • New D.I.C Head

Reputation: 2
  • View blog
  • Posts: 41
  • Joined: 19-December 09

Re: Programming Psychology

Posted 23 December 2009 - 10:03 PM

It's really difficult to think like a programming, it's a relative thing i believe, in my case in the beginning it took me a lot of time to learn how to programming well until i leartn how to do it (or i guest so), the problem is that when you start in programming you have to change the way you think from a totally structurated way to another, i believe a little more detail and creative because you have to think how could this problem be resolve.It's also true that some people were born with that detail and creative way of thinking, but it is also true that you could learn how to think as a programmer.

When you say "I memorize the code and type it out. After a day or two I look back at it and think "what the heck does any of this mean? Did I copy this straight from someone else's code?". that kind of things you learn them with practice.After you have written thousands times the same statement.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1