• Advertisement
Sign in to follow this  

Ways of learning

This topic is 4868 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Ways of learning to program, right from the basics: Well, I know the very basic stuff, about data structures, variables, ideal program structure, etc, in C++, VB, Pascal, Delphi, Python, PHP, and then some. I just can't put it together to actually make anything, at all. It seems to be some magic thing you're meant to pick up, not something that can be taught. People have said to try reading source code, problem is i can never seem to understand anyones source code. So, after two years or attempting to learn to program I'm still on the first chapter of most books. I've read hundreds of tutorials, which I can follow.. just I can't turn that knowledge into doing anything else, at all. Any advice? Any unusual ways of learning, or should I give up entirely - two years seems a long time to have done nothing :( Charli!

Share this post


Link to post
Share on other sites
Advertisement
What kinds of things have you been trying? I remember being in the same position, I understood all sorts of things but couldn't implement them. I eventually realized that I was attempting things that were way too hard for me. I decided to try really simple things like old arcade game clones and found myself programming all the time. I think my problem was that all I did while I was learning was read stuff. Programming can only be learned by programming. Maybe you're having the same problem?

Share this post


Link to post
Share on other sites
Practice, Experiment, don't just read examples, program them yourself and see what they do.

Get good so you can write your programs without looking at books and understand what they do. The only way to really learn what programs do is through practice and experience. Good programmers don't get good overnight, it's a continuous process that takes time : )

Share this post


Link to post
Share on other sites
Two years is a long time, its about the length of time i've been programming properly.

What is it exactly that doesn't work? Do you just keep getting errors, or is it a problem making logical sense of what you're coding?

If you need a kick-start:
Can you use the clipboard? I thought so. Okay, copy and paste (or if from a book, type it in) the code for a simple program that was shown to you in one of these tutorials. Now, once it works, try playing around with some of the variables, and use the compiler's help, MSDN and Google to search for certain libraries and their functions. You should then be able to expand on it without worrying about the "magic" that you need to make a program, until you're more experienced.

If you don't understand the logic:
Do you understand how a computer works (in terms of bits and memory locations)? If not, find something that'll tell you (it's not difficult). But, judging by the Original Post, I don't think this is the problem.

Share this post


Link to post
Share on other sites
I've tried making text adventures in almost every language I know, that was the basic-est thing I could think of, an easy one that just loaded a few rooms into memory, no natural-speech parsing or anything like that, but I've failed everytime - I just have no idea how to proceed past a certain point. I made a dynamic PHP website too, with an upload facility, login system, etc, but all the stuff was gleaned off tutorials, and the site ende dup being an absurd number of pages long, all full of straggley horrible code.
So, I do try and do practical coding stuff, but.. still stuck :(

Good programmers don't get good overnight, it's a continuous process that takes time : )
-- Just... I'm somewhat sick and tired of spending tonnes of time trying to learn, and I just realized its been two years, and I still know nothing.

Share this post


Link to post
Share on other sites
I'd say that first you should crack down, pick a language, and dedicate yourself to learning it.

All done? Okay, now, once you've read all your tutorials, all your books, and all of other peoples' source code, I want you to hide it. Get rid of it in any way you can think of, and go back and redo something from chapter 1. Do the simplest thing you can think of (even if that means "Hello World!"), and do it without references. That's the memorization stage...most people don't program anything like that. But it'll help you to memorize how simple commands work, and that's what you need (speaking for C++, anyway).

Keep going bigger and better until you can't go any further without references...until you're stuck. Grab a reference book (tutorial, other peoples' stuff, whatever) and go back and redo what you've already done. That teaches you better ways to do things, and to learn to solve problems. Programming is problem solving. If you made a method that's better than the book's or tutorial's...find out what makes your method better. If their method is faster, takes less lines, or just seems like "how it should work"...who cares? If you came up with the solution, then you're learning.

And then practice. Before long, you'll have the simple commands memorized and know quite a few of the un-simpler ones, and, most of all, you'll know METHODS. You'll know how to recognize problems, and how to make them un-problematic.



At least, that's how I'd do it. But I guess someone else will have a better idea by the time I post this.



EDIT: Hey, like 4 people posted between my post and the OP's...and I kinda like their methods. Seem like abbreviated versions of what I just said. That's my story and I'm sticking to it.

Share this post


Link to post
Share on other sites
Quote:
Original post by red_sodium
What is it exactly that doesn't work? Do you just keep getting errors, or is it a problem making logical sense of what you're coding?

I can make sense of the code given in tutorials and stuff, just I have no idea where to even start if I wanted to do anything myself

Quote:
If you don't understand the logic:
Do you understand how a computer works (in terms of bits and memory locations)? If not, find something that'll tell you (it's not difficult). But, judging by the Original Post, I don't think this is the problem.

I can understand how a computer works, I can understand how programs should work.. just.. not my own.

Share this post


Link to post
Share on other sites
Ahh. I think everyone feels the way you do at some point, but maybe to a lesser extent. It gets that way when you realise that the project you're working on is just a horrible mess (either the code or the actual program).

I agree, stick to one language for now until you can produce something proficiently in it.

Can you give us any specific examples of projects you've attempted and reached the part where you're "stuck", and what that part was? This shouldn't really be happening to you.

Share this post


Link to post
Share on other sites
I hope this question doesn't insult you, but when was the last time you wrote a farenheit to celcius converter? Or a program that prompts the user for two numbers and returns their sum? Maybe you just need to do some really simply things to build confidence.

Share this post


Link to post
Share on other sites
Do what Boku San suggested. Read/research as much as you can. When you have read all the references, and believe you understand them, hide them. Then try to do what they did! It may not be that easy. This is a also good way to develop a style of your own. When you are stuck, reference one of your sources and see how they did it.

(An analogy)
When you write a science research paper, what do you do? Do you read one reference and then paraphrase what it said in one paragragh and then for the next paragraph paraphrase another source? I hope not. You read many sources, develop your understanding, intergrating all those sources. You then write the paper, without the sources open or anything. Write what you remember and understand. This process does two things. It helps prevent plagiarism (same as developing your own style), and it makes you understand what you are saying (same as combining all of those tutorial's and book's ideas together).

Share this post


Link to post
Share on other sites
In case you wish to do that, here's the formula:

Tc = (5/9)*(Tf-32); Tc = temperature in degrees Celsius, Tf = temperature in degrees Fahrenheit

Share this post


Link to post
Share on other sites
What you should do is learn a few things, maybe 4-6 and get really used to doing them, which can be anything. And then go and think about a simple app or game that you can make which will collapse everything together. Worked for me. Your overall project structure will improve as time goes on.

Share this post


Link to post
Share on other sites
i agree that it sound pretty bad to see all those languages listed & hear you not being able to do the "sîmplest stuff" but it's where your problem lies stop switching languages pick one & only one & stick to it even if you hate it

it's just a choice ... would you rather speack english in a fluent maneer or would you rather speack chinese english german french japanese & spanish & only be able to say hello how are you in all of these? not only do you advance slower but you also learn less because you don't form your brain for programming (you just take the same very basic class that teach the same thing a lil bit diferently ) & the parts where you learn diferent stuff not only aren't helping you advance but are slowing you down (as when you try to program in a language you might get confused by rules of another) learning multiple languages is easier when you know one.... but that's when you know at least one WELL & have used it for a while

if you want some help you can contact me on icq as ranakor (194-662-921)

Share this post


Link to post
Share on other sites
Quote:
Original post by Charli
Ways of learning to program, right from the basics:

Well, I know the very basic stuff, about data structures, variables, ideal program structure, etc, in C++, VB, Pascal, Delphi, Python, PHP, and then some. I just can't put it together to actually make anything, at all. It seems to be some magic thing you're meant to pick up, not something that can be taught. People have said to try reading source code, problem is i can never seem to understand anyones source code. So, after two years or attempting to learn to program I'm still on the first chapter of most books. I've read hundreds of tutorials, which I can follow.. just I can't turn that knowledge into doing anything else, at all. Any advice? Any unusual ways of learning, or should I give up entirely - two years seems a long time to have done nothing :(

Charli!


I used to find myself in the same position ....

around 2 weeks ago I jumped up and said "I need to learn C++" and thats what I have been doing since. I bought the "C++ Primer" which this site recommends as a first book btu it ended up being a little too complex for me initially, so now I have for the C++ For Dummies eBook and have been learning the very basic's.

When I was reading the C++ Primer I found myself reading for an hour straight and learning loads of really cool stuff, but when I went to code it myself my head was just blank!

So I decided to start simple, I got the C++ For Dummies eBook and started with the simple stuff, read how to do something really pathetically simple, then code it and GET USED TO THE SYNTAX, then move onto the next thing.

While youre reading, try to make some really basic use of the stuff youre learning. For example, one fo the first things you need to know about object oriented programming is how to use objects, so think of a really simple object and try revolving your findings around that object. For example, I am sitting at my desk at work currently (yeah, I should be working) and I can see a telephone, so create a telephone ovject; even if that object does not initially have any functionality or even properties, it is something that you can always build upon and add functionality and in the extreme case even put to use in networking scenarios.

Share this post


Link to post
Share on other sites
Quote:
Original post by aaroncox1234
when was the last time you wrote a farenheit to celcius converter? Or a program that prompts the user for two numbers and returns their sum?

Hmm.. I can do that, it would just take me a long time. I've done things like adding numbers together, getting a few numbers and listing them in ascending order, saying whether a year is a leap year or not.. but, thats it. 'a simple app or game that you can make which will collapse everything together.', thats the bit I can never do.

The furthest I ever got in anything was a text adventure in C++, although, as far as I got was reading stuff in from a file, but I couldn't then work out how to organize it into room objects or how to store if properly in a searchable manner.

Share this post


Link to post
Share on other sites
Best advice is don't try to run before you can walk. If you are able to write simple code, but it takes a long time, then trying to write a text adventure is probably too big a jump.
Choose a language and stick with it, as lots of others have already said. It is better by far to be good in one language then below average in six!
If you've read through the first chapter of lots of books and no further, you need to keep reading :) No offense, but it sounds to me like you have an idea in your mind of what you want to achieve, and you read a little bit and then jump straight in to try and achieve your idea. You need to stick with the tutorial books and go right through - learn everything in there, even the stuff you don't *think* you need... You might just be surprised.

I guess what I'm trying to say really is persevere with it. The early stages of learning to program (which is where you're at by the sounds of it - two years is a long time, but if you never go further then that first chapter...), are very tough - trying to get your head around some of the concepts is difficult, and much of the subject matter and the examples are pretty dull. But you need to learn the language before you jump in and expect to be able to program a larger project.

Hope all this helps - good luck with it!

Share this post


Link to post
Share on other sites
I completely understand how you feel, Charli. I've all but lost hope in my tile map editor. I realized it was turning into one big mess of crap code and that my skill level wasn't quite there yet. But I'm not worried about it. I'm making checkers instead. Checkers is more complex than anything else I've done, yet is simpler than a map editor. Plus with checkers there is already a specific set of rules to follow. Also, since I already know how to write it as a console game, I'm going to help myself with gtk+ by making it graphical.

I suggest you write either a classic arcade game or a simple board game. Something under 1000 lines of code, so it will be easy to organize and won't take too long to complete. I also suggest you stick with two languages and not just one. For instance, I am sticking with C++ and Perl. I spend a little bit of time with each one, both reading tutorials/books and actually writing silly code. I say this because personally I get bored if I try sticking to only one language. Everyone is different though and this might not work for you.
.
And you know, there is absolutely nothing wrong with copying code from a tutorial. As long as you understand the code you are copying. Eventually you will get to the point where you don't need a reference to remember what code to use. Afterall, it's concepts that are import, not the actual code involved. Learning a programming language is just memorization.

I guess what I'm trying to say is if you feel stuck then you need to reevaluate your skill level. Understanding how a program should work, and then actually getting your hands dirty, are completely different. When I look at other people's code I go "oh yea!" but when I start trying to make something on my own more often than not I go "oh crap." It just takes time and dedication. And most importantly, you need to ask yourself if you enjoy doing it.

Share this post


Link to post
Share on other sites
I think you may be setting your expectations too high... but at the same time, you're not letting yourself break away from the tutorials/books.

There are many ways to solving a problem. Use your ingenuity and the tools you're already familiar with to solve it. If you have absolutely no idea how to go about coding something, then set your standards lower.

Also, when you say you're still on the first chapter of most books, are you referring to laziness/procrastination, or you actually don't understand the material? I know from experience that being lazy about it and not getting down to business to learn the material can make you feel this way. I still suffer from the same problem today - it must be a disorder or something... lol.

It's probably a good idea to get a book that gives problems at the end of each chapter. This way you can get a collection of increasingly difficult problems to do.

Remember - you need to be creative.

Share this post


Link to post
Share on other sites
Yes. I definetly agree... Do thinks you think that you CAN do. It's just like climbing a flight of stairs only after each step, the step gets higher...

Also, the read then hide the books then codes method of learning could work. :) I suggest that you do this... read then code what you read(example programs). While coding(copying.. ehem) the sample code, UNDERSTAND it, FAMILIARIZE yourself with it, and EXPERIMENT with it. It wouldn't hurt to change or add a few lines of code or manipulate the variables. Then you can hide the books and code again...

I'm not that much of a programmer. Heck! I haven't made a single game at all! But it works for me... I'm currently trying to learn C# and I'm at page 314 of the 1000+ page book that I have... HEHE!!!

Share this post


Link to post
Share on other sites
Im in the same position, i do c++ i can make simple programs like hello world by memory and can do structure lops variables and all other stated, i dont know whee to go from here, how do i implement graphics to my work???

Share this post


Link to post
Share on other sites
Hey Charli, why don't you try to make a simple game where you have to make a guy and move around? Just use @ or some other character for the guy. If you have trouble making this, I could give you some code for it and explain how exactly you would make this.

Share this post


Link to post
Share on other sites
The other posters have good advice. You need to learn by doing. Set a simple goal for yourself. Make a console-based program with a text user interface. Then make a graphical program and make tetris or something.

Try writing code and learn just what you need to achieve those goals. Actually creating something is 100 times more educational than just reading about it.

After you've done some coding, you might find that your program get too long and complicated, and you can read some more on how to structure programs. Then go out and practice it.

For me, it has generally been a read, code a whole bunch, understand, read some more advanced or different concepts, code a whole bunch more, etc.

It's a bit like learning to play an instrument: you need to practice.

Share this post


Link to post
Share on other sites
Don't give up yet. I was in a similar position when I first started programming. I took one programming class in high school and FAILED (36% I think :). Yes, my teacher wasn't very good but I had no confidence and all I did was copy my classmates work. I then mucked my way through a first-year uni. java course. That christmas vacation I bought "++: How to program". It took me 2 weeks to read the first 5 chapters, but I promised myself to TRY every single programming exercise in the book (about 300+ I think). This was tough and very frustrating but I stuck it out. At the end of this, my best program was a simple text-based tick-tac-toe game, but I was damn proud of it! I learned that the only way to learn is by doing. The biggest thing you gain from doing something yourself is confidence. Now I'm in my final year of uni. in computer engineering and find myself programming everyday (by choice). It's never too late to learn, don't give up. That fact that you have attempted to read books/tutorials shows me you want to learn. I just think you have been approaching it wrong so far. Good luck.

Share this post


Link to post
Share on other sites
Quote:
Original post by Ralphzehunter
Hey Charli, why don't you try to make a simple game where you have to make a guy and move around? Just use @ or some other character for the guy. If you have trouble making this, I could give you some code for it and explain how exactly you would make this.


Ooo, I can do that, I can do that! (Well, with @ as the little man), it only took me a few hours too!

Thanks for all the advice folks :) I'm sticking to two languages I think, everyone says C++ is good for having to learn very strict stuff, but PHP gives nice fast results ;) Cheers all :)

Edit: I you have any ideas for harder-than-a-calcius-converter-but-easier-than-text-adventure-project, please post :)

Share this post


Link to post
Share on other sites
Quote:

The furthest I ever got in anything was a text adventure in C++, although, as far as I got was reading stuff in from a file, but I couldn't then work out how to organize it into room objects or how to store if properly in a searchable manner.


You need to design how you're going to do it *on paper* (or otherwise outside the code) first and then implement it in your code. This way, you can try loads of different ideas.

Do you know about objects, etc? Also, you may wish to learn more about the Standard Template Library for ways of storing data.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement