PDA

View Full Version : need to improve my programming



bobish
07-25-2002, 09:00 PM
I find that when ever I try to right a program I go at about 10 lines an hour average, I never get very far and my code always ends up doing stuff in a bad way and I often relize that to get it to work ill have to redo it. What books can someone recomend for improving this. I would like the book to be easy to follow, entertaining, and not using too much c++/oop. It can be on ether game programming or general programming.

tgm
07-25-2002, 09:44 PM
'Code Complete' is an excellent book to read.

ygfperson
07-25-2002, 10:56 PM
the best medicine is experience. don't be afraid of doing your programs over again.

i suggest c++ for dummies. while there are a few things out of date for c++, and some other things go unmentioned like variable argument functions, it provides an easy-to-follow guide to c++.

endo
07-26-2002, 02:57 AM
My coding improved alot by hanging around on boards like these, you will pick up lots from reading the answers to most of the questions that are posted

Ruski
07-26-2002, 03:06 AM
Sams Teach Yourself C++ In 21 Days :)

netboy
07-26-2002, 08:05 AM
Data Structures, Algorithms & Software Principles In C
Author: Thomas A. Standish
:rolleyes:

Shiro
07-26-2002, 08:28 AM
>...I never get very far and my code always ends up doing stuff in
>a bad way and I often relize that to get it to work ill have to
>redo it.

That doesn't matter if you learnt from it. You realise that you sometimes do things in a bad way, this is very good. It means that you recognise your own problems, that is learning and gaining experience, very valuable.

But I think you should pay some more attention to design. Before coding you should take pen and paper and pay attention to the design of your program and think about the algorithms you are going to use.

A nice book on program design, datastructures and algorithms is Program Design and Datastructures in C.
http://vig.prenhall.com/catalog/academic/product/1,4096,013288366X,00.html

ober
07-26-2002, 08:36 AM
Shiro makes a good point... to get a good feel for how things should flow, or how it should be done, try making a flow chart. Outline what you need to do, and a rough idea of how to do it.

And don't forget to document! :)

Ruski
07-27-2002, 11:44 AM
Loooool :)

ober
07-27-2002, 12:38 PM
Originally posted by Ruski
Loooool :)

uhhh... wut was that about? :confused:

adrianxw
07-27-2002, 12:42 PM
>>>
Before coding you should take pen and paper and pay attention to the design of your program and think about the algorithms you are going to use.
<<<

Boring to the amateurs here, but so true! . I bet half the time you have coded something up and then found you needed to re do it would have been prevented if you had seriously thought about the design of your program.

I have said this over and over, but I'll say it again. Design your program then code it, not the other way round. It is alll so easy to think, "yeah,I'll need a routine that does this, and one that does that", code it up - great, then try to thread all these dispparate chunks into a whole - oh dear, "the output of this is not what I need for the input to that", and so on.

If you're happy being an amateur, great, if you have designs on being a professional, give the job, as a whole some thought.

bobish
07-27-2002, 05:48 PM
well you see thats the problem, If i'm Carless and lazy then I get fruatrated and give up and if im not then I get bored and give up.

Waldo2k2
07-27-2002, 07:44 PM
It's ok to get bored and frustrated.
See, some people are, how should i put this without hurting feelings...take on the challenge of programming better. Some people, enjoy the frustration (yes in a sick twisted way) of not knowing how to fix what they just created....or even how to create it. Some people get ........ed off or bored and move along. The second does NOT mean you are any less of a programmer as far as talent or intelligence goes. It just means you have to tackle everything a different way. Get a book, Sams 21 days is a good choice along with the C++ Black Book. Go through the parts that keep your interest long enough to read a chapter. Look at the examples. Then, this is how you beat your problem: try to re-create what they've done in your own style, it shouldn't ever be more than 10 lines (at least not in black book). Now save each of these small executables and workspaces away in a safe place. Slowly build yourself a library (i do it all the time for functions i can never remember how to use). Next time you have to make a program, you have small pieces of bug free code you can copy and paste together, and concentrate more on what you want your program to do, not on how to code it. Hope i helped.

Ruski
07-28-2002, 05:36 AM
Originally posted by ober5861


uhhh... wut was that about? :confused:
Never mind :)

mithrandir
07-28-2002, 08:14 AM
There is a free online version of "Teach yourself C++ in 21 days" which IMO is quite good to get started (http://firstpod.tripod.com/cpp21/) or if you're stuck on something and need a quick reference. I highly recommend anything by Bruce Eckel (www.mindview.net). His book "Thinking in C++" is excellent (and you can find it available to download at http://www.ibiblio.org/pub/docs/books/eckel/. It gives you more that just code, he really explains why things are done the way they are in C++, as well as how to effectivley manage projects. It may not be the best thing to start with if you are inexperience with programming, but if youa re it will vastly improve your understanding of OOP and C++.

moonwalker
07-28-2002, 08:30 AM
Originally posted by [stealth]
There is a free online version of "Teach yourself C++ in 21 days" which IMO is quite good to get started (http://firstpod.tripod.com/cpp21/)
I found this AFTER I bought the book ($ 30 :( )

frenchfry164
07-28-2002, 01:46 PM
you know, I never have read a C++ book in my life. I've learned EVERYTHING I know from various websites and trying stuff out.

I never say "I don't know how to do that". Because if I do, I always work at it until I DO know how. I have done things for weeks at a time, just to figure one little problem that I need to change. Then POOF! I got it.

So that means I'll NEVER say I don't know how to do 3D Polygonal Programming. That's one I'll NEVER get done.

Waldo2k2
07-29-2002, 08:32 PM
um...how exactly does that help bobish?
unless you have advice don't go making yourself out to be some guru. And if that was advice you obviously haven't been reading the other posts, bobish has expicitly mentioned not being able to do that.

black
07-29-2002, 09:01 PM
what about Thinking in C++ ? The author is a genius one~ :p

Ruski
07-30-2002, 04:46 AM
Originally posted by frenchfry164
you know, I never have read a C++ book in my life. I've learned EVERYTHING I know from various websites and trying stuff out.

I never say "I don't know how to do that". Because if I do, I always work at it until I DO know how. I have done things for weeks at a time, just to figure one little problem that I need to change. Then POOF! I got it.

So that means I'll NEVER say I don't know how to do 3D Polygonal Programming. That's one I'll NEVER get done.
Various websites... wonder what those could be...

bobish
08-02-2002, 09:44 PM
man Ive already read sams and I have thinking C++ but havent read it. Anyway mabey I take a look at it now. One thing is I like to have a book which is entertaining enough that I can read it while barly awake, without putting it down in a few minuets.

mithrandir
08-03-2002, 04:04 AM
Well the best way to approach learning programming is to study the theory, but also to practice the concepts you've learnt. It's hard to understand some things until you actually see them working (e.g. - pointers).

Ruski
08-03-2002, 04:43 AM
I had found a free book (Sams Teachyourself C++ In 21 Days) on the net but I formatted the computer and didn't save the favourites. Can somebody remind me? Thank :)

mithrandir
08-03-2002, 04:47 AM
The link is at the very top of page 2 of this thread.

Ruski
08-03-2002, 04:50 AM
What page 2? I dont have pages in here...

mithrandir
08-03-2002, 05:08 AM
Why do I all of the sudden feel like that guy from BASEketball?

Ruski
08-03-2002, 05:26 AM
Just paste it in your next post.. will ya?

mithrandir
08-03-2002, 05:35 AM
For goodness sake!! Read through this thread and you'll find it!!!

Ruski
08-03-2002, 07:07 AM
Sure.. whatever you say...:rolleyes:

mithrandir
08-03-2002, 07:12 AM
Mate you are a few beers short of a six pack..here's the bloody address you lazy sob http://firstpod.tripod.com/cpp21/

Ruski
08-03-2002, 07:25 AM
Finally.. that's all I wanted to hear... Took me five posts to get that.. :rolleyes:

mithrandir
08-03-2002, 07:44 AM
Are you dull? Because all you had to do was read through the thread (a mere two pages) and you would have found the link! It would have taken you a matter of seconds to do this, but no, you couldn't have been bothered. Even when I explicitly told you that the link was in this thread, you still didn't see my point - the link was posted twice previously. So don't tell me "finally" because that is rubbish - you were too ****ing lazy to bother to read through the thread. Are you sure you're smart enough to be able to program if you can't even do something as simple as read through a thread to find a hyperlink?

Klinerr1
08-03-2002, 09:52 AM
c++ the blakc book. i like it for refrencs cause unline c++ for dummies it get straight to the point and doesnt sance around first.

Ruski
08-03-2002, 12:13 PM
Originally posted by [stealth]
Are you dull? Because all you had to do was read through the thread (a mere two pages) and you would have found the link! It would have taken you a matter of seconds to do this, but no, you couldn't have been bothered. Even when I explicitly told you that the link was in this thread, you still didn't see my point - the link was posted twice previously. So don't tell me "finally" because that is rubbish - you were too ****ing lazy to bother to read through the thread. Are you sure you're smart enough to be able to program if you can't even do something as simple as read through a thread to find a hyperlink?
You're so mean! :(

adrianxw
08-03-2002, 01:36 PM
Enough.

Hint: If the answer has been posted, leave it alone. BTW, I really do understand, but lets try to keep thing civil.

mithrandir
08-03-2002, 08:17 PM
Okay, understood. Sorry Ruski if what I said sounded harsh, but I hope you at least got my point.

Ruski
08-04-2002, 02:57 AM
I guess I did :(