PDA

View Full Version : How to study programming?


cgibie
08-12-2005, 06:31 AM
Guys, you folks are really great when it comes to code and help others. I've been studying VB, Javascript, Java, CGI for almost 2 years, but I sitll cannot code up any programs besides simple "hello world." What is the matter with me? Everytime, for loop, while loop, if/else statement got me stumped. Especially those File I/O. How do you guys learn programming, please? I'm sophomore now, I still don't feel confident to do any Internship *sigh*

iota
08-12-2005, 07:24 AM
Hey, don't humble yourself too much. For two years, you might have completed some advanced areas, I think. If you read some programming guidlines , vist :

http://forum.flashband.net/

Information Technologies > IT Fields in General >

There , three of threads you'll find related to programming.
Hope it useful for you. :)

SpirtOfGrandeur
08-12-2005, 07:37 AM
The problem is that most of us that answer questions day in and day out have been doing it for more then two years. We where the dorks in HS... who are now making mad loot comared to those "cool people" in HS. Ooooo...

jkd
08-12-2005, 07:47 AM
Don't study programming, study computer science.

Who cares if it is System.out.println() or printf() or echo? That's just a boring detail.

How does one sort a list? Prove computational complexity of an algorithm? Write provably correct programs? "Play" a game? And so forth, much more interesting things to study that you naturally develop good programming habits in order to solve. If you really want to bend your mind, research some lambda calculus (and subsequently writing integers simply as a composition of functions, creating linked lists with nothing but functions via birth-environments, and so on). Or learn about general OOP (Object-oriented Programming) techniques and write a blog that stores posts as a Post object, comments as a Comment, and Post objects have a linked-list of Comment's, and so on. Something you already understand conceptually, just trying to apply to the OOP paradigm.

Once I took a few good CS (computer science, not programming) classes at my high school, I instantly became 100x better at programming in general because I gained the skills to critically evaluate what the code I was writing was actually doing, as well as saw enough/studied enough paradigms and methods to allow me to not worry about how I get from point A to B, and instead focus on why I'm getting from point A to B, which is infinitely more interesting and crucial to program performance/quality.

SpirtOfGrandeur
08-12-2005, 05:52 PM
Most CS (Computer Science) majors are just programmers any ways. But they are usualy the lead over a bunch of MIS (Managment Information Systems) programmers. They usually get there by understanding how things work instead of just how to get things to work.

(I have a MCS and am working towards my Dr. CS)

cgibie
08-12-2005, 09:19 PM
So what shall I do? The main thing is whenever there comes an assignment, say Java. All I could do is public static void main ...... then I am stuck. I only went online and searched for similar code, then I got the idea, but that's not 100% getting the assignment worked either. I am so lost about learning programming now. I don't wanna change my major cause I think I like it, but it just frustrates me when I could not get it done/worked OR I "copied" from online code. I feel disappointing.

Another example is CGI, when I studied and copied the code from tutorials, I quite understood it, but then when I closed the book and coded up say a "guestbook", I forgot what is what. Is it normal about go back and look at the code again OR that means I don't know at all. Well, actually I really don't know. Any programming counselor here? Hehe... I'm so confused.

DoubtlessOne
08-15-2005, 04:25 AM
scholaring a programming language isn't really a necessity of life
however, the best to study a language is by studying the code snippets of hundreds of people then finding pieces that you see can easily fit to your likings
from there, you match that, memorize that snippet and use it for later engines
also like learning a language, study the dictionary on that language
learning computer language is like learning a foreign language
it gets more fun later on

NancyJ
08-15-2005, 02:34 PM
You're all probably going to think I'm really cruel for saying this but IMO, unless you're being overly humble about your programming abilities then I would say your best bet is to change major.

If after 2 years you dont understand basic programming concepts (for/while loops, if/else) then its probably not the subject for you.

Anyone can copy code out of a text book or website but if they dont understand it then they're not learning anything. How are the rest of your class doing?

Not everyone can learn to be a good programmer just like not everyone can be a good artist. It takes a certain flair that you've either got or you havent. You can learn the techniques and methods but you'll always be lacking.

I love music but I have 0 musical talent. I do my best but despite having piano lessons for 8 years the best I could manage was grade 2. I can read music and I know what all the piano keys sound like but if I look at a piece of music I wouldnt have a clue what its supposed to sound like.

Perhaps you've just got a crap teacher or you're getting bogged down in syntax.
Next time you get an assignment dont try to code it straight away. Look at the question and on a piece of paper write down the program logic.
Most programs basically break down into a simple formula that you should have been doing since you were a little kiddie ;)
eg. 1 + x = 5
ie 1 is what I've got, 5 is what I want, what do I need to do to 1 to make it into 5.
You have your input and you should know what you're trying to get out of the program at the end, so what do you need to do to/with your input to get the output you want.
If you can successfully write the program out in english on a bit of paper see if you can get a more experienced coder to program it for you - if it works then your problem is not the coding principles but language specific syntax (and theres still hope for you yet)

The ability to look at a problem and break it down into it smaller problems leading to a solution is not something that you can really learn.But syntax is something you can learn with a little practice and a lot of experience ;) And theres nothing wrong with having to go back to the book and look stuff up.

i'm a professional web developer and a hobbyist game developer but I still have to look stuff up ;) I know php, asp, vb, c++, pascal, javascript and java (and more) theres no way I could possibly keep all that in my head ;)

I would recommend starting with VB, the syntax isnt that difficult and its very similar to writing in pseudocode. It should help you get the grasp of those basic principles before you move on to languages with more difficult syntax (like java)

SpirtOfGrandeur
08-15-2005, 02:56 PM
You're all probably going to think I'm really cruel for saying this but IMO, unless you're being overly humble about your programming abilities then I would say your best bet is to change major.

If after 2 years you dont understand basic programming concepts (for/while loops, if/else) then its probably not the subject for you.


Actually I wrote something like this up. And then decided not to post it. I am a chicken!

NancyJ
08-15-2005, 03:44 PM
Well I didnt say it just to be mean ;) Everyone makes mistakes and he wont be the first person to take a subject that he enjoys then find out he doesnt have what it takes. The earlier you find out and do something about it the better.

No matter how much you enjoy it right now, if you're really no good at it then someday you're going to regret not changing to something you're better at.

DoubtlessOne
08-16-2005, 03:06 PM
Well you're saying that "he doesn't have what it takes"
to "learn" something, of course EVERYONE has what it takes to learn C++
it's just that some people can increase the limits of their left brain and then it would make it easier for them to learn it.
sure it means if they are purely left-handed, it may be impossible or no chance in hell is it possible to learn

but the thing is, he may not be trying or is getting frustated and lazy
he just needs to study a few code snippets just like how Xiaolin Kungfu masters have studied the abilities and techniques of many other martial artists
he just needs time, and 2 years apparently he just rushed in, that's probably why he's struggling

what he needs to do is start with the code language dictionary
from there he needs to get the concept of how the script works
then from there he can build up, and within some time he'll master the basics
if you master the ROOT basics, then you'll understand the rest

that's how I learned how to play the guitar and piano :D

NancyJ
08-16-2005, 03:47 PM
to "learn" something, of course EVERYONE has what it takes to learn C++


no they dont, there are people in the world who no matter how hard they try, will never 'get it'. They may be able to 'learn' to recite basic snippets and when to use them, much like parrots can learn to imitate the human voice and can even use phrases appropriately but they dont understand it and they could never make their own sentence out of those words and phrases.


what he needs to do is start with the code language dictionary
from there he needs to get the concept of how the script works

That would be the worst place to start. Learning to program should start well before any specific language is looked at. Learning should starting with programming principles that can be applied to any language and arent syntax specific. Once you understand the fundamentals, applying that knowledge to a language is easy.

theexo51
08-16-2005, 03:52 PM
im english, so what yr is sophomore? i used to know some basics of vb and js when i was in college, 17/18 but once i went to uni and discovered alcohol and illegal substances my brain has melted away, and now im retarded lol. maybe he is smoking too much? :rolleyes:

NancyJ
08-16-2005, 03:58 PM
im english, so what yr is sophomore? i used to know some basics of vb and js when i was in college, 17/18 but once i went to uni and discovered alcohol and illegal substances my brain has melted away, and now im retarded lol. maybe he is smoking too much? :rolleyes:
The only person on my course to get a first was the biggest stoner I've ever met. She got withdrawal if she was away from her gear tin too long ;)

theexo51
08-16-2005, 03:59 PM
lol, opposite with me...it was a quick fix at the time but now i cant remember the day of the week lol...and now i have a job in IT :eek:

EDIT: thinking about it, i only became this stupid when i gave up...might need to use that in my argument with the missus!

NancyJ
08-16-2005, 04:08 PM
FWIW all the most intelligent people I know are stoners ;) And mad l337 gamerz too lol ;)

theexo51
08-16-2005, 04:12 PM
mad L337 gamers??!?! sorry, im too old for all that speak lol. even my prowess on xbox live has deteriated since i stopped. fags just dont hit the same spot! still, one has to grow up eventually, i can start again at 65, hehe

NancyJ
08-16-2005, 04:17 PM
still, one has to grow up eventually
says who?

My dad's starting at university in september... hes 55 and an ex lawyer - that should be interesting ;)

theexo51
08-16-2005, 04:21 PM
he will start coming home with mad skunk lol, take himself back to the 60's.

before: :)
after: :D

brothercake
08-18-2005, 11:44 AM
he will start coming home with mad skunk lol, take himself back to the 60's.
The 60s? Mate - they didn't have skunk in the 60s - what they were smoking then would barely register with our tolerance now ;)

theexo51
08-18-2005, 02:00 PM
ah, i made no reference to skunk in the 60's ;) but if u smoked in the 60s u would have got just as much of a buzz off it as now, because that was the best grass around. are tolerance levels have risen because of the new stuff. if u had never smoked skunk u would still enjoy old fashioned grass..

Vox
09-01-2005, 09:42 AM
Hello everybody...

I first code in Basic some 10-15 years ago... And I done it pretty well for that time, I managed to build some pretty good programs.. The best was a roulette game, that I build from nothing, alone, in dark nights...:) In Basic... It was great, was mine, and had good graphics, was original.... After that I stop...

Now, after 10 years I still have a passion for computers... My job is quite diferent from CS...

I noticed years ago, how strong and how dangerous is for me coding !!! Is not that I didn't succeed to create, but rather the impact on myself !!! Is not that I could not start it was that I could not stop !!! I become one with the program, I could not stop, my mind was inside the project so much, that was draining my body of power ( I'm sure lots of guys know what I'm talking about )...

So , now, after a decade... I become again interested in programming... And of course, the best way to learn ever, I tell ya, is to steal without shame good ideas to learn !! The forums on the internet are enough for everybody to see how others learn !!!

Now the CS is quite different than 15 years ago... But I tell you a secret... VBasic, C++, Java, etc,etc... All this don't mean almost nothing for me for now... Why to loose time to learn them if I don't have a purpose ??

Instead of learning, in programming, you have to focus on the "final result" !!! You don't have to learn C++ with the ideea that you will be able to do something later !! Try to focus on a program you want to build !! In programming, start from the tail to the head !!! First build the program in your brain, visualise it with your mind !! And then, oh, it will be easy to choose a platform for it, either is C++ or Java or even Basic !!!! And you'll not notice that you code naturally, you'll just be surprised how fast you go forward !!

So, I have a simple ideea for everybody !! If you cannot build(code) a program in your brain, you'll never manage to code nothing really (good)!!! The computer, the code is just a tool !! The real programmer is inside you !!!

And for the people that after 2 years of code study can't do almost nothing, I have just one result !! Quit !!! Find something else that is suitable for you !!!

Imagine my situation !! I was good,I still am, I can feel it, in programming !!! But I choosed another boring job, because as a programmer my life would had been closed forever !!! Programming is a strange job !!! The best programmers have really big problems keeping their lifes !!! Because beeing close to the best in this job, is coding with passion up to 14 hours a day !! I know because I did it before !! It's a form of art, but you have to be carefull !!!

The common sence is the best friend in life !! Everybody can find answers in themselves... Balance is another key element... If I choosed programing years ago for a job, I could be far ahead now in C++ and Java... In programming, but in real life, I will be destroyed !! Because the job should not be worked with passion !! Passion in your job, and you fail to be balanced !!! Passion works good with a hobby, yes, that's what I did... Programming is a hobby for me... As a hobby, I am a free man... As a job, I'll be forever dead because I like it too much !!

In the end, oh, now I have some good(CS) projects in my mind !!! That's why I am here now !! Because I know exactly what I want !!! And the only thing remaining for me, is to find the right tool to build it, C++ or Java !! ! And I can't say I will learn Java or C++, because is more like they teach me how to build my projects !!!!

See you around... And I hope my ideeas will help you.... :thumbsup: