views:

501

answers:

15

I ask on behalf of those that have a very hard time grasping the basics, and I mean the very basics. From simple loops to basic arrays and what have you. Is there really a light at the end of the tunnel. Language independent.

Yes, practice and experience pays off without a doubt but from my experience those that blossom in something usually found the given field comfortable to begin with.

I attempt exercises and if I cannot do it I then take a peek at the solution only to get angry that I couldn't think of that. Sure it's part of the learning progress but I feel it's the sort of thing I should find easy.

So, is there anyone out there who really couldn't do the extremely simple tasks for a good while but ventured on and with time became very proficient and good?

Or, are those that are good and experienced at what they do found the starting steps simple then started slowing down when it came to the more complex tasks? Is there a point where someone should say - "right perhaps this as a working field is not for me?". As can certainly be the case for some even if you do enjoy the work.

is it as simple as this?

+2  A: 

yes.

The field is for you if you're interested in it.

Steve B.
+3  A: 

Practice, make mistakes, read other peoples code, find similar problems and see how other people solved them. Above all stick at it.

Chris McCauley
+1  A: 

Have you ever climb a ladder? every step is not very tall, but with many steps, you get high

Hernán Eche
sure and I agree with this, but I think there's a point where you should seriously assess what you're capable of achieving. No doubt hard work pays off but sometimes something is just not a suited very well. I understand it's not the best example as physical activity requires a particular genetic make-up but the I think the principle is close enough. I teach two sports. Some of my students live for it but they would never compete or do it for a living as they simply aren't that good regardless of their passion, effort and genetics.
aLostMonkey
@aLostMonkey if you enjoy it, you don't need to be good, it's a life, if I were born with a great ADN to swim, I will be here coding anyway or playing music, because I like it more =)
Hernán Eche
+1  A: 

If someone has problems understanding the basics of programming, maybe an understanding of math and logic is also lacking.

There's a reason math is a main focus in computer degree programs. Digital logic is also fundamental in programming and is an early part of the degree programs

A focus on these basics may help the person understand the basics of programming

Ed B
The reason math is a main focus in CS degree programs is an historical accident and bears little correlation with whether someone can produce working code. True, the more you know in all fields the better you will do in any field, but this claim is generally false.
msw
Ed B
The major difference between math and programming is that solving programming problem does not require logical proof the way math problem requires it. Take Collatz problem for example. You can find a great deal of examples with code that any given number sequence ends up at 1. Nobody proved it yet (despite extremely simple formulation of the problem) that it will be happening for ANY integer.Somebody said that combinatorics is slums of topology; extending the metaphor, I would say that programming is outskirts of math.
Anvar
"Historical accident? I don't think so. Computers..and programs were initially created to automate calculations." What was that about understanding logic?
msw
+1  A: 

Unless you're a genius I guess every programmer have had to struggle with some basic concept once in a while. Sometimes we just "forget" about something we used to know.

But you're correct in asking, when you're beginning is the best time to decide if this is for you.

I remember just a couple of years back how daunting it was for me just to think about all the things I didn't know, but...

"A journey of a thousand miles begins with a single step". Lao-tzu, The Way of Lao-tzu. Chinese philosopher (604 BC - 531 BC)

StudiousJoseph
+21  A: 

I teach basic Comp-Sci, and believe me, the students with the least computing knowledge and the most sense of overwhelm-ment at the beginning have turned into good programmers. It is definitely possible.

The milestones I had to hit over the course of learning programming could vaguely be listed as (keep in mind that I grew up on basic, pascal, fortran, then c), almost in order:

  1. understanding that a program is a bunch of instructions
  2. that variables store copies of information (at some level)
  3. that setting 'a=b' then 'b=2' will not affect a (in most simple languages)
  4. loops - that the same code on the same line does different things each time
  5. how to make loops stop at the right point
  6. that functions are like mini-programs, they contain common stuff you want to do again in another place
  7. how function parameters work
  8. how arrays work
  9. the idea of data-driving things, simplest-case putting choice information into an array, iterating over the array, and executing different code based on the element at that spot
  10. file i/o
  11. the concept of marshalling and demarshalling - taking information from memory and putting it in another form (usually saving as strings in a file), and the reverse
  12. making more use of the compiler to do work for me, like structures and enumerations
  13. the dreaded pointers
  14. data structures, like lists, trees, and hashes
  15. recursion
  16. interprocess communication
  17. multi-threading
  18. algorithmic complexity - allowing me to choose when to use loops, functions, and various data structures
  19. design patterns
  20. then softer topics... revision control
  21. sharing projects with others
  22. specs vs debugging vs real-world
  23. working with clients
  24. documenting interfaces and tutorials
  25. et ceteras

No one ever finishes learning, I've been doing this since I could reach the keyboard of my Ohio Scientific with 6K of ram and a cassette deck, and not a day of programming goes by that I don't learn something else new, in at least one language, or one new generic topic. Heck, it took me an hour to try to get this to work (and I still don't know if its completely correct, I may be wrong), and I learned a brand new topic generators in python only because I ran into a wall and asked other people - just today.

So chin-up, it's a life-long path. Follow what you love, whether it's solving computer problems or anything else.

eruciform
+1 for the killer closing statement
Andrew Heath
I'm surprised Recursion isn't on your list. It's a more fundamental stumbling block than IPC or Design Patterns.
JasDev
@jasdev: thanks, i knew i missed something! :-) i'll add it in someplace now... i really didn't make use/understand of recursion until trees and algorithms.
eruciform
@andrew: thanks! :-)
eruciform
+4  A: 

Take it easy on yourself. If it was easy, there's be no need for specialized training, one language would be sufficient, et cetera.

but I feel it's the sort of thing I should find easy

Why? What part about making a machine understand specific instructions when you and it have huge cognitive dissonance should be easy? It's like saying "I'm in Portugal, I should be able to speak Portugese".

Is there a point where someone should say - "right perhaps this as a working field is not for me?"

'Should'? Not necessarily. Some people intiutively understand everything down to the physics of disk storage and other have to work at it. If you don't enjoy it - either the learning challenges, or the working challenges, or some aspect of it - perhaps this isn't the best field for you.

Everyone I know who's doing this for a living can point to an "aha!" moment where << some hard thing >> started to make sense. None of them would be doing what they're doing if they gave up when it got hard.

DaveE
+1, no words can describe that feeling when you really get it learning something on your own.
Zaki
+1  A: 

every body learn with his/her pace. same as every one is different visually, physically. exactly in the same way every body is different mentally, some one take ages to achieve one thing and others take days, hours or minutes to do the same thing.

One thing we should realise that nothing is impossible in this world specially in computer science world. every problem comes with solution. some one take little longer to find that solution than others. Thing is that how dedicated we are to find the solution. there is is no reason for disappointment.

Only thing is that if you don't enjoy your work, than definitely that work is not for you. don't compare yourself who knows more then you, compare with those who are lesser than you. But always set your goals higher. not that higher that you will get disappointed in achieving them and become fed up :)

Ghost
+3  A: 

There are studies that suggest that some people--even otherwise intelligent people--simply cannot grasp the basics of programming. The OP could be one, I suppose. But I'm not sure how I feel about those studies, and not sure they apply here.

It seems that the OP has some problems of intellectual style that are getting in the way more than a lack of ability. He understands what he sees when he peeks at the solutions, after all.

I suspect the OP is too impatient. Too impatient to start at first principles and puzzle out the solution, or do a lot of iterations that more and more closely approximate the desired result. Instead he gets frustrated and goes to the answers. Then, because he hasn't gained the facility he requires, he's ready to jump to the answer that programming is just not on for him.

You can learn by being presented the answers, but solving the problems will never get easier for you if you do that. Programming is about learning a problem solving process, not a series of correct answers. So, OP, slow down and try to learn techniques for solving the puzzles, and work on your patience. Forgetting syntax plagues many of us, but those of us who have facility as programmers never forget how to solve problems.

bikeboy389
+1  A: 

25+ years ago, when I was studying Computer Sciencee in college, I had an instructor tell me that computer programmers had one of the highest suicide rates, mainly because the work was so mentally hard and frustrating.

Granted, that was the dark ages compared to now, but the basic fact remains that getting a computer to do what you want it to can sometimes be quite difficult. I have worked as a professional programmer for 20 years and consider myself quite good at my job. Nevertheless, I still run into problems (such as today) that should be simple to solve but, for whatever reason, stymie my intial attempts. At those moments writing code is like wrestling an octopus. I call them "duh" moments, because when you finally see the solution you feel so stupid for not seeing it sooner.

On the flip side, there are moments of pride where I solve a REALLY hard problem. Where I come up with a solution that I know would be beyond the average programmer. Those moments make you forget the "duh" ones.

RB Davidson
+2  A: 

When people ask me about starting to program and the difficulty involved in it, there's one thing I stress above all others:

Syntax is easy. The logic is what's important.

It seems like a lot of people get hung up on not understanding where curly braces go or what in the hell "public static void" means. For someone who's learning, I think it's crucial to emphasize that learning the basic logic behind how programs work is far more important than anything else. Once they have these tools, understanding the language's syntax is an easy task. I can personally attest to this, because it has absolutely been my experience with programming.

Start with the very basic building blocks such as the concept of a variable. Once solid on that concept, move onto types of variables. You can progress from here and talk about concepts like arrays. Suddenly, "a collection of variables" doesn't sound nearly as daunting when you know exactly what variables are and how to use them.

For operations like loops, I remember it finally clicking when I actually wrote the code (or just plain english statements in the basic structure of the code) down on paper. Being able to step through them, pointing your pencil to exactly where you are at the moment, can really help lock down exactly what's happening as the program travels through it. It may help to actually chart the program down on paper, using whatever terms or language you want, and then go from there. This is where languages like Python can be immensely helpful as learning tools, because they take out so much of the confusing syntax so you can focus on the actual structure of the program and how it works.

I've kind of started to ramble here, but the main point I'm trying to get across is that there absolutely is a light at the end of the tunnel. If you keep learning, things will click and make sense. There is usually a difference between how a programmer looks at a task as opposed to a non-programmer. Getting to that point of being able to look at a task from that mindset is the hardest part about programming, but it's something that you can, and will, get to.

Sean O'Hollaren
+2  A: 

I believe you might have it harder than someone like myself who learned the basics of programming by learning BASIC on an Arari 800. My advice is to learn C with a data structures book from 1995, then learn C# and Java at the same time. On a separate learning track, do HTML, JavaScript, and PHP. On another, MySQL and MSSQL. For something interesting/change of pace, get a developer edition for Salesforce and start following their extensive tutorials. Another interesesting learning oriented offering is XNA game studio - for straight forward object oriented stuff.

Gabriel
I think you've nailed it with "I believe you might have it harder than someone like myself who learned the basics of programming by learning BASIC on" a ... 1970-80's micro-computer. BASIC was just that: basic. And the immediate feedback those machines provided made the learning experience that much more rewarding.
Mark Stock
+1  A: 

Whenever you feel like you are really stuck and have seemingly nowhere to go in your problem solving, just think of that recommendation Albert Einstein has given to his son - life is like bicycle, to keep your balance you have to move forward.

I would also say, it is very natural to feel the way you feel when trying some programming problems. Many prominent programmers, including Spolsky, mention about it in their writings. Just keep on hammering them, problems I mean.

Also, try some from Project Euler. I find those problems REALLY useful in sharpening programming skills, even if you don't solve it, you will get a valuable experience.

Anvar
+3  A: 

I dunno. This is a hard one. I think being good at anything depends several things. The three that come to mind are:

  • Skill. O.K. so you weren't born with keyboard in hand. Oh well. Neither were 99% of the programmers in the world.
  • Attitude/Tenacity. Be stubborn. Re-visit concepts that you don't understand/grok.
  • Goals/Expectations. What are your expectations? Do you expect to be another Linus Torvalds, Bill Gates, or the inimitable John Skeet?

I've definitely felt like you about the basics, and believe me, my first several years of programming just sucked sooooo bad. I'd be forever shamed if any of that code found its way into the World Wide Web.

My 10 years thus far in the BIZ look like this:

  • First 3-4 years of total sucki-ness coding, struggling to grok stuff (started with vb 6, vb script and notepad as my IDE)
  • I spent about 2-3 more years slowly progressing, but mostly just languishing and suffering. (started .Net programming versions 1.1/2.0 of the CLR), trying to figure out where I was going or if I would stick around.
  • The last 2-3 years I feel like I've taken the training wheels off, that I'm finally starting to move it to the higher gears (learned C#, asp.net 3.5, LINQ, OOP design patterns, etc.)

For the most part I'd say I'm still here cuz I wanted to understand stuff like I wanted to breath. I love coding even though I'm not a genius. I just wanted it bad enough that I've bashed my head against the wall to the point where, one day, I sat down at 'el computer' and voila! It FINALLY made sense. Finally.

Some people are born to code. Some people can speak natively to machines in assembler, but most people I'd say have paid dearly for their coding "stripes".

To make an analogy to baseball, there will always be the Babe Ruth's, the Mickey Mantle's, etc. of the industry (i.e. people that can walk up to the plate and hit a 95-mile-an-hour fast ball without really trying that hard). But even the major leagues are mostly filled with average major-league players that worked/played/practiced their a$$es off to get there. Maybe they had a little talent, but they'll never win a golden glove, be another Cy Young, or make the hall of fame.

A lot of what makes sense to programmers, only makes sense because they've suffered and felt the pain of doing things the "wrong" way.

Keep yer chin up aLostMonkey. Hopefully you won't have to suffer TOO much, but if you wanna play bad enough, keep swingin' that bat. We'd all love to have ya 'round.

Maybe one day, Skeet'll be asking you or I a question here on S.O.
Hey, we can dream, can't we!?

Isaac
Mind pointing me at the other 1% that was born with a keyboard in their hand? ;)
RCIX
+1  A: 
Mark Stock