Best way to learn programming

what is the best way to get started with learning to program? I’ve covered some very basic C and Visual Basic in college butthose were part of other courses so I doubt I learned anything very practical. I’m looking for some resources on the net or cheap books so that I can learn on the side.

I’m open to any languages. I want something that will help me in landing a better job than what I have now.

Thanks

There’s a lot of stuff out there.

I like** http://webmonkey.com** for HTML and JAVA

Try http://ask.com to search for others. There’s really a lot out there.

Java is a pretty simple language, I hear Visual Basic is even easier, and Sun and Microsoft have wealth of tutorials, programmers are pretty well paid. $80/hr is about average. Unfortunately you have to learn the concepts too. I would recommend taking classes in data structures and Object Oriented Programming at the very least.

HTML/jscript/javascript on the other hand averages $35/hr and is a lot easier to pick up. Tools are a lot more powerful, but it requires more of a “knack” since you spend most of your time using the tools to produce something that LOOKS good. Depending on your level of artistic talent, (in my case, very low) it can be considerably more difficult than solving a challenging analytical problem in Java.

First of all, HTML IS NOT A PROGRAMMING LANGUAGE.

Now, that said, I believe C is one of the best languages to learn programming with. It’s extremely small and simple, but it doesn’t baby sit you like BASIC, Pascal, or VB (I hesitate to call VB a programming language, but whatever.)

I find programming is best learned when self taught. That means you have to write programs. The best book for learning C is Practical C Programming, published by O’Reilly.

It’s pretty fast paced, but if you go through each chapter and do the questions and exercises, you will learn a LOT. Not just about C, but about programming concepts (functions, logic, data types, nesting, recursion, memory allocation, etc) good programming style, and other neat tricks.

I forgot to mention. Object Oriented languages like Java are good to learn as well, but I reccomend learning C first, so you get a good foundation on proper design and implimentation before wrapping your brain around object models and classes and polymorphism, oh my.

As a Delphi fanatic, I have to question your assessment of Pascal. :wink:

Writing a Windows app in Delphi is like using VB with a real language behind the scenes. You can do cute, easy things like dropping controls onto forms and making a program with hardly any code, but when you do write code, there’s a powerful language with the features to do what you need. Every third-party Delphi control is written in Delphi (so are the compiler and IDE, in fact), and you can easily write your own.

I agree with Mr.inc(2k), Delphi would be a good choice if you can afford the standard edition. As supplied it is very easy to grasp at virgin level, yet it is widely used in all sizes of apps. Trying VB or C may be easier, but the style they teach, is out of sorts with modern professional programming techniques. The documentation supplied is good and there are numerous Delphi sites out there, with tutorials, samples, hints etc. Although Delphi 5 is most recent, you should be able to find an earlier version reasonably cheap (the differences between 4 and 5 are really of benefit only to the professional user)

Well I must confess I’ve never used Delphi, but since y’all say it’s so cool, maybe I’ll check it out.

My only experience with Pascal was using true Pascal on a PS/2 running DOS. I have heard that Delphi is essentially object-oriented Pascal; is this true?

Pretty much so, TP (turbo Pascal) was Borland’s first attempt at an object-orientated language in Pascal (in the latter versions), but the OOP side to the environment was pretty lame. With Delphi, Borland took OOP as the determining structure, with a much more smalltalk style of OOP, i.e. much more faithful to the concept, they included a visual interface, which was long overdue (TP was primary a dos environment, the windows version sucked) and used Pascal as the programming language underpinning the whole thing.

Because Delphi is visual, you don’t need to know Pascal to create your first programs. By manipulating components and their attribute you can build some fairly useful and attractive programs without typing a word of code. The Pascal language still has the same commands and structure as good old TP, but with the additions necessary for an OOP and Windows environment.

Delphi also comes stacked with database tools and components; this side of programming is a must if you are to become serious about programming.

BTW I program in Delphi, so my comments are going to be biased.

>HTML IS NOT A PROGRAMMING LANGUAGE
Oh sorry DHTML, that better? Sheesh. Take a pill.

If your intersting in making cash, DHTML requires very little effort to learn and programmers are in high demand, and its completely demonstrable, so you can get away with having a lot less experience if you have a good looking portfolio.

C by itself is Crap. Unless your planning on working with embedded systems, or really old stuff, most companies are gonna expect C++/OOP. Looking back on my C and C++ experience, I think my familiarity with common C paradigms actually got in my way when I was trying to learn C++, and I wish I had gone straight to C++ extensions before pounding out 50KLOC of straight C.

And as Pascal/Delphi… as powerful as it may be,
lets look at monsterboard:
In San Jose(Silicon Valley)
Delphi: 2 jobs
Pascal: 8 jobs
VB: 19 jobs
HTML: 223 jobs
Java: 446 jobs
C++: 529 jobs

Just one of my nitpicks. I hate it when people say they can “program HTML”…sigh.

Most companies will expect C++, but the OP was about learning programming, and I always reccomend going with a procedural language first, but whatever floats your boat. And C is useful for a lot more than embedded systems and really old stuff; I can show you several current operating systems entirely written in C.

C is NOT good for writing graphical applications. You need an event driven model for that.

Just to play Devil’s Advocate:
I have seen files with the extension .chm, which Explorer refers to as “Compiled HTML Help” files. If it is possible to compile an HTML file, couldn’t HTML be considered a programming language?

(I know, virtually nobody who erroneously states that they program in HTML actually does this, but is it possible?)

If not, then what exactly distinguishes a programming language from something that’s not a programming language?

Tecnically, to “program” a language must support procedural constructs such as flow control. Strictly declarative languages like HTML,XML,SQL,IDL are not programmable. This is probably one of the reasons the title “programmer” has been mostly replaced by the title “developer”

Well thank you all for the input. I do have one more question. Is HTML still marketable by itself? With all the editors out there I have to think straight HTML wouldn’t be very marketable.

I have an HTML book but I quit reading it after a simple WYSIWYG editor helped me in my task. Would it be worth it to finish reading the book?

.chm files are used in Visual Basic (and possibly the other languages covered under Visual Studio, I’m not sure). You use HTML to create a help file with anchor tags (to create context-sensitive help), and it is then “compiled” with a seperate program so that VB knows how to use it.

HTML is not a programming language because its purpose is to change the appearance (“markup”) of the data it is given.

One problem with some HTML editors is that it creates alot of unneccessary code. If you’re really interested in doing internet-related programming, it might be worth it to finish the book, if only to understand how HTML works without having to rely on a program to write everything out for you.

If you’re really interested in programming, I’d suggest going to the library and just taking out a couple of books on Object Oriented programming (books on the general topic, rather than a specific language).

If OOP doesn’t interest you, you could also look into a mainframe/procedural language like COBOL. Even though its old, alot of companies still rely on it. Also, procedural languages are often easier to begin with, rather than having to immediately start with the concept of objects and classes. I know that, at least on the East Coast, there are alot of job offers for COBOL programmers. The downside is that it takes a long time to be considered “experienced”.

Also, if you’re willing to spend around $50, some books come packaged with a demo version of the language that the book is covering (the demo versions usually are good for about 120 days). I know Microsoft packages a demo of SQL Server with one of its books.

Not in my experience. YMMV.

Is HTML programming? I’m not sure. Some of the skills required to write good HTML smack of the same skills required to write good code in many other more traditional programming languages.

The The American Heritage Dictionary offers these computer related definitions for programming:

I think HTML coding could fit into either of these definitions…
falcon2 wrote:

I disagree with this definition. There are many modern ‘programming languages’ that are not procedural and have no concept of a flow. Look a a language such as LISP that doesn’t even distinguish between data and code and supports concepts such as properties and symbolic programming. I can think of a bunch of other ‘bad’ examples, as well.

Having said all that, as a computer and software engineer, I don’t tend to put HTML coding in the same category as traditional programming… but perhaps I’m just being a snob…

The best advice I can offer for learning to program is:

(1) Start with the fundamentals. Learn about data types, data structures, algorithms, variable scoping, and structured programming. Learn the difference between pass by value and pass by reference. Learn how things work on the most fundamental levels. This will be essential if you ever have to use a debugger.

(2) Choose a good introductory language. A good language will enforce a strict discipline that will establish good programming practices for the rest of your career. Pascal is a good introductory language - C++ is not a particularly good language to start with. C++ obviously has more commercial viability, so it’s one you’re going to want to learn eventually. Just think of your first language as an investment.

(3) Learn a wide variety of languages. Skills and concepts that you learn from programming in other languages such as assembly, perl, LISP, and others will be invaluable even if you spend your entire career programming in C++ and/or java.

(4) Get professional training. If you learn to program by hacking then all of your programs will probably be ‘hacks’.

When someone shows me how to write a loop or a conditional in HTML, then I’ll call it a programming language. Writing good HTML is a valuable, marketable skill, but programming it’s not.
As for what language to learn first: If your goal is to make money as a programer, then you need to learn either C++ or Java. If you just want to learn about programming, for the sake of knowledge, I would recommend C. C is powerful enough and low-level enough to do absolutely anything you want, but it’s high-level enough to be comprehensible without a Ph.D. in math and boolean logic.

If you can create a Turing machine with a candidate “language”, then it’s a true programming language. If you can’t, then it’s not.

Arjuna34