Looking To Get Into Programming

AMD_RULES

2[H]4U
Joined
Mar 26, 2007
Messages
3,010
I'm looking to learn how to program. I already know how to do HTML and JavaScript. I am looking to get into some C and C++ programming. I already have VisualStudio2008 to start work with. Could you recommend any good books or online tutorials on basics?


Thanks!
 
Whilst I think C++ & C are good languages for programming in, unless you have some good motivation I think I'd suggest you learn C# first. This is because you'll likely have fewer 'bizarre' problems with it & it is easy to knock up a gui with. GUIs tend to be more exciting than command line stuff...
 
my university used Big C++
I think its a great book, an easy and interesting read where I pretty much read every page of the first few chapters
it also uses a very simple graphics package which is an effective way to visually teach the principles of object oriented programming
 
If you want to learn how to program, read the article mikeblas posted called "an essay for programming students."

if you want to screw around and just have a little fun with a computer, don't learn C, C++, C#, etc. Those languages have too many caveats in them. If you don't have a DRIVE to learn it, you never will. Instead, learn something like PHP. While there are certainly complicated web applications, for the most part it's easier to code for the web than for other types (systems programming, optimization programming, embedded prgoramming..).

it is also my experience that people have an easier time teaching themselves web stuff rather than actual computer programming.
 
+1 for mikeblas's article: http://www.hardforum.com/showthread.php?p=1029612365
(the section on "about languages" may be especially worthwhile)

since you are looking to get into programming, how about making a list of possible projects to do? that may help influence which languages you would try learning first.

once you pick a language to sink your teeth into, then head to a book store and grab a "beginner's" book on your language to start. wrox, sam's, etc. all have some good stuff to get you started. use google searches to supplement your reading. post your progress, code samples, and questions in the [H] forums.

...and, most importantly, have some fun!!
 
I'd rather do c# than java ANY day....

But yes, read Mikes article.
 
Thanks Guys. I'm gonna start with mike's article than move onto some more stuff.

Thanks!!
 
If you don't have a DRIVE to learn it, you never will.

QFT. At the time when I started to learn languages, I don't know why but I settled on Python. I was unmotivated for anything but Python.

After learning Python well enough, I found a reason to learn more languages. That single reason alone motivates me to learn new things.
 
Avoid any book that claims to be able to teach you to program quickly. It's almost certain to be worthless.
 
If you want to learn "Programming", learn these two languages in exactly this order: C then Java. C exposes a LOT to the programmer -- understanding these concepts will make you a better programmer. It will drive you crazy, but you will actually learn how to program. After C, do Java. It is the exact opposite, it hides all the nasty "C" stuff from you and lets you focus on writing apps and teach you how to make programs quickly.

After that, the sky is the limit
 
I went out last night and purchased a book on Java. I'm gonna learn some C stuff online before I move onto Java. So I went ahead and downloaded the JDK as directed by the book.

http://www.mhprofessional.com/product.php?isbn=0078825709

The book may be a bit outdated, but I glanced through it and compared to the others, it seemed very similar if not identical.

Thanks for your help guys. I'll start out basic and work my way through. Once I get some experience, I'll post some codes and projects I've done.

Thanks guys. Appreciate it!
 
[H]exx;1032589866 said:
Know your roots ^_^
If you want to know your roots, why not learn assembler, first?
f you want to learn how to program, read the article mikeblas posted called "an essay for programming students."
Thanks for the plugs, ya'll. If you have any questions about the essay, AMD, let me know.
 
If you want to know your roots, why not learn assembler, first?

Why not learn how to build an adder from logic gates? Logic gates from transistors?

I'd be more inclined to say that learning your roots would involve Lisp and lambda calculus.
 
Why not learn how to build an adder from logic gates? Logic gates from transistors?
I'm all for it. The Bugbook series is a great way to study this stuff; the parts are very inexpensive, and the experiments are easy and informative.
 
[H]exx;1032589866 said:
Why C#???

Head for the basics....C and C++....then off to Java ;-)

Know your roots ^_^

I'm a Java guy myself. Just can imagine that sitting in a room learning a language, you might lose your inspiration pretty quickly after your program coredumps for the 15th time..
If he's keen to stick with it, then C, C++, sure..
 
I'm a Java guy myself. Just can imagine that sitting in a room learning a language, you might lose your inspiration pretty quickly after your program coredumps for the 15th time..
Maybe I'm having a hard time piercing your rhetoric, but how is Java any different? An unhanded exception out of the Java runtime isn't much different than a coredump or GPF.
 
Having some n00b probelms with java. Once I go through Command Prompt and type in "javac filename.java" and it creates the .class file, once I click on the .class file, nothing comes up.

I've installed the JDK from Sun (The Sun SE version 6).

Any ideas?

Thanks
 
Having some n00b probelms with java. Once I go through Command Prompt and type in "javac filename.java" and it creates the .class file, once I click on the .class file, nothing comes up.

I've installed the JDK from Sun (The Sun SE version 6).

Any ideas?

Thanks

What if you just type 'java Classname' without the .class extension?
 
AMD,

you are encountering your first in a long series of development issues that stem from philosophy of design --Sun's design.

mikeblas is a champion of starting at as low a level as possible for the student and learning from there.. along those lines, i'm going to post two wikipedia articles for you to read. if you can't understand either of them, don't feel too bad yet. you just started this process. look up a term when you don't understand. ask questions.

http://en.wikipedia.org/wiki/Machine_code

http://en.wikipedia.org/wiki/Bytecode

again, at least the first one will likely be over your head. don't be too worried about that now. ask questions when you need to, and you'll have a better understanding of what you are doing when you program a computer.

edit: this is the WHY answer to your HOW question. the HOW answer is posted in the one before this post.
 
That's curious advice. What's wrong with Visual Studio 2005? Or Visual Studio .NET?
AMD_RULES mentioned above: "I already have VisualStudio2008 to start work with."

Depending on what OS he has, VS.NET 2002 or 2003 may not work fully or at all. I gave up on 2003 when I moved to Vista x64 and VS.NET (2002) is not even supported (as in it won't even install).
 
AMD_RULES mentioned above: "I already have VisualStudio2008 to start work with."

Depending on what OS he has, VS.NET 2002 or 2003 may not work fully or at all. I gave up on 2003 when I moved to Vista x64 and VS.NET (2002) is not even supported (as in it won't even install).
I'm running Vista Ultimate x64 w/ SP1.
javac filename.java
>> .class file created
java filename

That should run it!
When I do this, it does not work...
 
I'm not recieving an error of any kind. When I run the file, the command prompt window comes up and then shuts off so fast I can't even read what it is saying.

Edit: Also, when I type in command prompt, "javac filename.java", it says "javac is not a known command..." But when I click Open With and go to the program files where Java is and click on Javac, it complies the file. Any reasons why this is happening?
 
AMD_RULES mentioned above: "I already have VisualStudio2008 to start work with."
Ah, I see. I read it as a condition of the advice, not a precondition of the state of the advisee.

Depending on what OS he has, VS.NET 2002 or 2003 may not work fully or at all.
Unfortunately, that's true for VS 2008, as well. Important features like the profiler, for example, still don't work under Win64.
 
I'm not recieving an error of any kind. When I run the file, the command prompt window comes up and then shuts off so fast I can't even read what it is saying.

Edit: Also, when I type in command prompt, "javac filename.java", it says "javac is not a known command..." But when I click Open With and go to the program files where Java is and click on Javac, it complies the file. Any reasons why this is happening?


1 point of correction --when you say something "doesn't work," that implies errors, either when compiling it or errors that are produced at run-time by getting "bad" values or the program crashing. it doesn't sound like you have a crashing program.

your path variable is not set up correctly. however, it sounds like you are getting it to compile, so i'll leave the path variable for you to look up on sun's website. to see the output of the program, go to start->run and type "cmd" then enter. cmd should have no quotes. navigate to where the .class file is located and try running the program from there like you have been instructed previously.

...an alternative is to use an integrated development environment which handles all of this for you.. (jcreator, eclipse, netbeans..).. but these are often difficult to use for beginning programmers or otherwise require some configuration.

edit: a useful tip... when something happens that you don't expect, google it. in your instance, a search phrase like "javac unknown command" would likely work. for the window disappearing, "java console window disappears" but i think you're less likely to get results for that 2nd one.
 
i didn't meant to make it sound as though fixing the path variable will make the window stay open longer... it won't. you'll still need to use the console to look at the ouput
 
Unfortunately, that's true for VS 2008, as well. Important features like the profiler, for example, still don't work under Win64.
That's lame. I installed the Express Edition and didn't expect much, but I may be disappointed if the version MS sends me (for free) still doesn't work for all the major features. :p
 
Maybe I'm having a hard time piercing your rhetoric, but how is Java any different? An unhanded exception out of the Java runtime isn't much different than a coredump or GPF.

Friendlier error messages along the lines of "java.lang.ArrayIndexOutOfBoundsException at line 23"? Also being easier to diagnose as they tend to fail fast.
+ as I mentioned with C#, easier to get a pretty gui to impress yourself & friends.
 
I find the best way to find motivation to learn C++/C or C# is to first figure out what type of program you want to make. Be careful, you must start off simple or you'll go in over your head. Then once you know what you want to do, find all the resources you need to accomplish just that goal. When you new just ignore a lot of stuff that isn't pertinent to what you are doing so you don't get sidetracked or overwhelmed. Check out lots of tutorials and understand how the code makes it work. Once you start running into performance issues or errors that's when you start reading lots of the very technical stuff. But even then only read what applies so that you don't get muddled by it all. Once you get a fairly good understanding of how the programming works, then it is time to read all the books cover to cover and become the expert. I would suggest starting off with Clive Maxfield's "How Computers do Math". It gives a very good grasp of what your programs are doing down on the hardware level and gives insight into how everything from stack pointers to index registers work. One of my favorite C++ books is "Beginning C++ game programming" it provides a fairly understandable and fun way to learn C++ by using it to entertain.

But if you're just looking into programming then first you need to know what you want to program. Then find what resources you need and how to use them to achieve your goal, otherwise programming is useless and boring.

Well this may not be how it is for everybody but this is how it works for me.

Good Luck
 
Ok, what is the most basic language of these all I can start with? I think i'm going to advanced for the first time with Java. Should I do C# or C first and why?
 
The most important things about software engineering are not the languages (although choosing the right one for a given project is a good start) but the concepts. Specifically algorithms (performance characteristics, performance/memory relationship, recognizing certain problems) and object oriented patterns (The 'how' and 'where' to employ patterns, and most importantly 'why' which ties in with algorithms).

I'll probably be in the minority when I say this but I like Java. I'm probably a little biased as I' currently doing development work with J2EE. I like it because it has a relatively feature complete, well documented library and a great open source tools (thanks ASF), not to mention Eclipse is my favorite IDE :D. It all really boils down to using the right tool for the job, but for learning purposes I'd imagine Java is excellent (can't say personally as I learned on C/C++) the only thing you'd be missing out on would be pointer arithmetic (Pointers themselves still exist in Java they are just hidden from you).
 
Ok, what is the most basic language of these all I can start with? I think i'm going to advanced for the first time with Java. Should I do C# or C first and why?

As I am only skimming the thread, how did you approach learning Java to start off with? I don't think that Java is necessarily too advanced for a beginner, as it is used as a teaching language in schools (for better or worse). Perhaps you are not approaching it in a manner that is conducive to your personal learning style.

Are you following the Java tutorials over at Sun?
http://java.sun.com/docs/books/tutorial/
 
you're in a tough spot, to be honest.

from the sounds of it, you don't know much at all about programming or how computers work. you can either learn a programming language and learn the basics with it and have absolutely no clue how a computer works. this strategy is fine if you just want to have a little fun with a computer and don't really care to know what you are doing. if this is what you want to do, i WOULD NOT start with java. i WOULD NOT start with C#. C is a good language for absolute beginners to start in because the typing system is fairly loose, and it's rather bare-bones, but C's learning curve gets pretty steep really fast. PHP is a good alternative as well, but because it's easy to set up and pick up like C but the learning curve isn't as steep... you don't need to know as much about computers to do more with it.

the alternative is to learn in either order 1)how computers work 2)how algorithms work. there is no getting around these two things if you want to do anything halfway interesting with programming. in a formal setting, you learn both at once. on your own, it's a little more difficult.
 
Back
Top