Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

How To Get Into Programming?

Cliff posted more than 8 years ago | from the start-with-math-then-move-to-logic dept.

Programming 195

writermike asks: "Like many on Slashdot, I practically grew up with computers. I've had one or more since 1978. However, unlike a lot of people here, I simply never learned how to program. Twenty-seven years later, I still know nothing about 'programming.' I'm a fairly successful technology troubleshooter, having been in that role for 15 years, and I find as I delve deeper into why programs fail, my interest in programming rises, and I feel that not knowing the principles is a hole in my knowledge that hampers me a bit. There are so many books and courses out there that seem to focus less on principles and more on specific languages and/or the 'career-track'. I don't really want to code the next great web service. I want to learn principles, then begin to learn a language. Where can I begin the adventure I should have started back in 1978?"

Sorry! There are no comments related to the filter you selected.

To steal a line from the sneaker company (5, Insightful)

jtev (133871) | more than 8 years ago | (#13865241)

Just do it. The first step to learning to program is to just start programing. I know that sounds a little trite, but honestly, unless you just start programing the theory of programing isn't going to mean much. Then once you've learned a little about how to program you can start thinking about the "One true methodology".

Re:To steal a line from the sneaker company (2, Insightful)

drakaan (688386) | more than 8 years ago | (#13865605)

Building on that thought, I'd say you might want to get your feet wet with Perl. There are many ways to structure Perl code, and it'll make it reasonably easy to move to C or C++ later on. Dink around with it until you find something you want to do, but can't, and then delve into C to find out if you *really* want to know how to do it. You can make useful programs, get help from plenty of people, and learn a bit at the same time. Just remember "#!perl -w" and "use strict;"

Mod parent up (1, Redundant)

FireFlie (850716) | more than 8 years ago | (#13866025)

Perl is a great suggestion. It is one of the easiest languages to get into if you have never programmed before, and for someone in your shoes it is particularly good beccause of how easy it is to write simple but helpful scripts to run on various machines you work on.

Mod parent DOWN! (4, Informative)

evilpenguin (18720) | more than 8 years ago | (#13866347)

Oh my God!

I won't say this is completely wrong, because perl is a language where you can do an awful lot of useful things with a very small investment of time and effort, but the idea that one can learn "principles" of programming from our favorite hydra of a language is not a good one.

IMHO (which is not H, BTW), I would start with a language that has a more coherent design.

The big question is "objects" or "not objects." Secondarily, native compiler or scripted/VM language (which has more to do with getting used to the toolchain).

I'm going to assume that you would like all the software to be free of charge.

If you are going for objects, I would recommend starting with Java or Python. I would NOT recommend C++ because it is a complex hybrid of C and objects, doesn't have a single inheritance model, and gets enormously complex in its effort to cover all possible bases. Not that C++ can't be a great language, I just think it is not a best first stop.

If you are going for non-objects, believe it or not, I would recommend C.

Yes, C is full of pitfalls, but it is a simple language in design, easy to learn , but difficult to master. It can express powerful data constructs with simplistic data types and the experience of it translates well both "down" to assembly and "up" to other "safer" but more complex procedural languages. C is also a "classic native compiled" toolchain, which will stand you in good stead for all such similar toolchains.

Java I recommend from experience, Python from reputation (people I know, respect, and trust like Python -- I haven't yet had occasion to go much beyond the "Hello, world" stage with it).

As for how to start, for both of my "basic" choices, C and Java, I recommend beginning with a simple text editor and the command-line tools. Master using these for a few multi-file projects. In C, get used to writing and maintaining a Make file. Once you are comfortable with these basics, feel free to move to IDEs for simplifying/streamlining. But learn those low level skills so you don't become what I lovingly term a "tool junkie:" a person who can only be productive with a certain set of tools from a certain vendor.

Back to perl for a moment: Please folks, don't think I'm trying to get religious about perl. I love perl. I use perl every day. But a programmer learning programming from perl is like a chemisty student learning the definition of "exothermic" with dynamite. Perl is, by Larry Wall's own admission (nay, boast) "pathologically eclectic." Perl's whole philosophy is "there's more than one way to do it." For learning, I like a language where there is one right way to do it. That way you don't develop bad or confusing habits. Once you have discipline and style, you move to the more expressive languages and you make good code with them. Bad perl code is just plain terrifying. In my 20 years of programming, once I got beyond BASIC, which is very much a toy, I went to Pascal. Pascal is a great (IMHO) learning language. But I don't see a lot of Pascal development these days (outside of variants like Delphi, which, I'm afraid, take you down the "tool junkie" path).

Anyone got a great compiled procedural language suggestions besides C?

Re:Mod parent DOWN! (1)

evilpenguin (18720) | more than 8 years ago | (#13866463)

Oh, a couple more things. First, I'm not really suggesting that the grandparent post be modded down! I'm just disagreeing with it! It's a good post in and of itself. And totally intended to be helpful to the questioner, so please don't mod down the poster who first suggested perl!

Next, it might be more helpful if I mentioned a few more details.

Any Linux distro will include all the tools you need to do free C development (and perl, and python, and, with just a little work, Java). Fedora Core 4 gives you an actual "Free Software" version of Java (oddly enough, native compiled even).

Now, some books that might help:

For C, I'm out of touch. I learned it almost 20 years ago now. The Kernigan and Ritche "The C Programming Language" is still the "bible," but I don't think it is good tutorial. Browsing about, Stephen Kochan's "Programming in C, 3rd Edition" looks good, but I haven't read it.

For Java, "Thinking in Java" by Bruce Eckel is a great starting point.

For both Python and Perl I like the O'Reilly titles "Learning Python" and "Learning Perl."

The "Programming Perl" title by Wall, et. al. is, like the K&R C book, the "bible," but not a good tutorial.

Hope this helps!

Re:To steal a line from the sneaker company (5, Interesting)

fm6 (162816) | more than 8 years ago | (#13865711)

...just start programing.
I'm reminded of the joke: "How can I make money in the stock market?" "Easy: buy stock at a low price, sell it at a high price." Strictly true, but not very useful. Exactly how do you "just start"?

The answer to that depends on what you hope to learn. Programming is a big topic and there are a lot of ways to approach it.

Probably most Slashdotters will answer this question with something practical and job-oriented. "Get a copy of Kernighan and Ritchie [] , C is a language everybody should know." "Download Perl." "Download the Java SDK." "Use the VBA engine in Word to write macros." Etc. All worth doing if you're looking for a career as a programmer. But I sense that this guy is motivated more by intellectual curiousity than by career development. (As he should be — the developer job market is a tad oversupplied.) He's used computers most of his life, but has an unsatisified curiousity about how the suckers work.

One good way to satisfy that curiousity would be with the very basics: machine language [] and assembly language [] . These are not useful skills for most programmers, who only need to know the high-level abstractions of the systems they work with. (Some people would disagree with me on that.) But for satisfying your curiousity about just what computers do, it's a nice exercise.

Or instead of going very low level, you can go very high level, and learn some basic computer science while you're at it. That the route if you read the classic Structure and Interpretation of Computer Programs [] and work its Scheme [] programming exercises.

Then again, learning programming on your own is not for everybody. If somebody has managed to be around computers for a long time, but has never go around to learning programming, he probably is the sort of person who needs some initial handholding. Community colleges often have good classes.

Re:To steal a line from the sneaker company (5, Insightful)

stanmann (602645) | more than 8 years ago | (#13865742)

Buy some books from the 90s with source code, documentation and specs. Doesn't matter what language or environment particularly. Basic is OK, C is OK, Pascal is OK. type in the code, or scan and OCR it. Kick the tires, see how it works. Change it. Break it. Fix it. Make it do something different. Make it do the same thing differently.

Re:To steal a line from the sneaker company (1)

halltk1983 (855209) | more than 8 years ago | (#13866180)

Very sound advice, though you could do the same thing with Perl. This is what I recommend, because many of the older languages are a bit archaic.

Re:To steal a line from the sneaker company (1)

arkanes (521690) | more than 8 years ago | (#13865793)

Don't forget The Art of Computer Programming []

If you want to learn how to *program*, then you need an itch you want to scratch. Taking a programming course, or reading a book and working the samples will teach you about programming, and maybe computer science (depending on the book), but won't teach you how to program. And learning about programming, or computer science, or computer hardware and engineering might be what you want - it's an interesting topic. But if what is bothering you is something like "this program sucks, I need something better" or "it'd be nice this program did this thing", or "I need a way to automate this because it's annoying", then you want to get a book on a appropriate language (I heavily recommend against Perl or C++, try Python or Ruby for local stuff) and start hacking on it until your problem goes away.

Re:To steal a line from the sneaker company (4, Insightful)

pyite (140350) | more than 8 years ago | (#13866388)

Don't forget The Art of Computer Programming

Wow. Umm, throwing TAOCP at someone who's never programmed but wants to is a bit like throwing an aerodynamics book at someone who wants to fly. Sure, it will tell you how to fly, but it won't get you much anywhere unless you have a solid mathematical background and really good machinist skills. Seriously. I postulate that someone who has a decent math background has also seen some sort of programming in their life. That said, the amount of Sigmas, Pis, and Integral symbols in TAOCP is enough to scare someone way away from programming if they haven't seen such notation before. Don't get me wrong; I love the stuff, and I own and read all three volumes, but it's not something you want unless you have programming experience and/or strong interest in mathematics and preferably both.

ANSI C (2, Informative)

Shads (4567) | more than 8 years ago | (#13865250)

Is probally the most valuable programming language to learn. It may not always be the most commercially viable but it definetly provides the most insight into programming really. If you're going to learn a language don't learn some gui version of it first. Learn the low level stuff and build up to gui interfaces.

Garbage (0)

Anonymous Coward | more than 8 years ago | (#13865347)

Bah! Two words, VB.NET.

Yeah, VB.Net if (-1, Flamebait)

Anonymous Coward | more than 8 years ago | (#13865526)

you want to be tied to the M$ slave ship forever.

Re:Yeah, VB.Net if (2, Interesting)

evilpenguin (18720) | more than 8 years ago | (#13866656)

Not really flamebait. Yeah, it's written in a "flamy" way, but I think there is a serious point being made that VB.NET skills will not be very helpful in programming in a different language/environment.

I would not recommend VB.NET as a "first language" to learn programming.

That said, I wouldn't discourage someone from learning it. There's a lot of work to be had developing in it.

But I wouldn't make it either the first or the only language I learn. It comes from one vendor and runs on one platform (Mono notwithstanding!)

Languages to Learn (3, Insightful)

DavidNWelton (142216) | more than 8 years ago | (#13865465)

It's hard to say exactly what language is the right one without a better idea of this guy's goals, but here's a shot at it:

C: like the parent says, it will give you a good insight into how computers store things at a low level, and of course it's useful if you want to do low level things yourself. If you really get into programming, you'll need to learn it sooner or later, but it might not be the best if you just want to learn a bit and get something done.

Tcl/Python/Ruby: Pick a scripting language and learn it as a good way to get things done quickly. Each has its advantages.

Smalltalk, Forth, Scheme: less useful, but mind-benders that will open your eyes to different ways of doing and thinking.

Re:Languages to Learn (2, Insightful)

poopdeville (841677) | more than 8 years ago | (#13865808)

I like your suggestions very much. However, in my experience, there's a lot of C voodoo that might make it unsuitable as a first language unless one has personal instruction. I'm referring to the comiler chain, libraries, and other technologies that mighting appear to be unduly important to the novice. Indeed, when I first tried to learn C, I ended up trying to read through the gcc documentation because K&R suggested that I should get to know my compiler. Obviously, at that stage, it was a tremendous waste of time.

My suggestion is that an autodidact should learn the basics of a scripting language first. I abandoned my initial efforts to learn C and picked up a copy of "Learning Perl." There's a minimum of "black magic" -- just a line at the start of your program telling your operating system where to find perl. It takes about a week to get through Learning Perl at a relaxed pace. Granted, it does not cover the entire language. But it does cover Perl's procedural fragment in depth. From here it is straightforward to move on to more advanced Perl, or laterally to C and other procedural languages. I would image Python and other scripting languages would be similar.

Re:Languages to Learn (1)

DavidNWelton (142216) | more than 8 years ago | (#13865967)

Oh, I just put C first because I was responding to a guy who mentioned C. I completely agree that a scripting language is probably better as a first language. It really does depend on what he wants to do, but most likely a scripting language will be more satisfying in that it's more immediately applicable in the short term.

Re:Languages to Learn (1)

scvalex (865901) | more than 8 years ago | (#13865892)

No! Don't start learning the 1000 difrent programming languages. If you trully need to learn one, learn pascal. It's simple and easy to learn. But the essence of programming are algorithms. Learn to think structuarly, sistematicaly, and thy shall learn the truth.

Re:ANSI C (1)

extremescholar (714216) | more than 8 years ago | (#13865879)

Amen to this! Back in the 80's I putzed around with BASIC and moved to C-128 Assembler. I thought I was pretty good until I took a low level C course. Oh, wow. Then you need to take some algorithm classes. Don't mess around with C+ until you can do C. If it can't be done in C it can't (or shouldn't) be done.

Re:ANSI C (2, Insightful)

AuMatar (183847) | more than 8 years ago | (#13866424)

I'll put in another vote for C, and list my reasons:

1)The syntax is simple, and is the basis for every major language today.
2)It has most of the major features of other languages except inheretance and generics, both of which ought to be skipped until you understand procedural anyway.
3)It doesn't force you into OO, allowing you to examine other paradigms. Whatever some people will say, OO is not the best way to do everything.
4)It has good, freely available tools.
5)It forces you to deal with resource allocation (memory management). This is a major concept in programming, and if you do not learn and understanad it early, you will never understand it at all.

Take a class (4, Informative)

araven (71003) | more than 8 years ago | (#13865282)

Most community colleges have beginning programming classes. It's a way to get started before branching out on your own.

Re:Take a class (2, Insightful)

dr_leviathan (653441) | more than 8 years ago | (#13865653)

I would agree with this. If you haven't been able to learn programming over the years of messing with computers you will need some impetus in the form of a homework assignment.

Also, you should take a class in using the CLI if you haven't already picked up much proficiency yet. Using the CLI on *NIX as a serious tool will provide more opportunities to learn programming. I just recently decided to learn a little BASH programming to manage all of the CLI aliases I was putting into my ~/.aliases file -- so I relearned how to write functions in BASH -- it was a fun little sidetrack from my normal day.

Maybe, maybe not. (1)

bluGill (862) | more than 8 years ago | (#13865754)

I'd like to agree, but there are many teachers out there who teach bad programming.

As an example, Comments are good, but many teachers take that to mean each line needs a comment. So you end up with:
a = a + 1 # add one to a
Which should take off points, but instead is the only way to get points. A real programmer will know from the first part what it is doing, but will be wondering why add 1 to a right here.

If you can find a good course, yes you should take it. However at the beginner level you are not qualified to evaluate the quality of your teachers.

Re:Take a class (1)

yamla (136560) | more than 8 years ago | (#13866224)

I'm not at all sure that is the right approach. This person wants to learn the principles of programming. Community colleges, in my experience, specifically DO NOT teach you the underlying theory, they just teach you the syntax of that particular language.

Re:Take a class (1)

dar (15755) | more than 8 years ago | (#13866621)

A quick google for "community college" "introduction to programming" returns 26,500 hits. So I'd say that at least some community colleges do.

Re:Take a class (1)

yamla (136560) | more than 8 years ago | (#13866741)

Disclaimer: I'm in Canada. Our use of 'college' and 'university' may be different to your usage.

Well, all the local community colleges around here offer introduction to programming classes as well but the vast majority of them simply don't teach you anything about the theory. In fact, the only ones that DO teach you more than the absolute minimum theory are the ones that count as university credit.

In fact, that's probably a good way to approach this. Does the course count as university credit? If not, it is useless for this particular person. If it does count as university credit, it may have some value.

Just off the top of my head... (1)

Dr. Bent (533421) | more than 8 years ago | (#13865286)

...I'd say here: []

and here: []

and maybe here: []

And although a lot of people around here would probably disagree, I think it would be worth your time to go back and try to get a Computer Science degree. Programming != Computer Science, but it's helpful to understand the scientific principles that modern software development is based on.

Re:Just off the top of my head... (1)

gleather (596807) | more than 8 years ago | (#13865627)

CompSci degree for free. All lectures mirrored at Most books from syllabus available used at amazon, etc...

Low cost of entry/decent return on investment... (5, Insightful)

COBOL/MVS (196516) | more than 8 years ago | (#13865293)

For a really low (and I mean low) cost of entry into the programming world, why don't you start with your web browser, a text editor and a good book on Javascript.

Javascript is not the world's best language to get started with (not sure what is really), but it's good for instant graphical gratification. Make a .js file and an html file and simply load the html file into your browser. Any changes you make to your code would be viewable by simply refreshing the page.

Another good language to start off with assuming you have a Windows setup is VBScript. This would be a better option teaching you control flow and how to structure a program. In spite of its reputation, it's a good "starter language". (Please, no replies about viruses or other results given from VBScript over the years--I'm being serious. As a teaching tool, it's a good start)

Re:Low cost of entry/decent return on investment.. (1)

venomkid (624425) | more than 8 years ago | (#13865432)

In line with the above poster, web is the way to go for beginning programming. Just stick to one platform; dealing with cross browser compatibility issues won't help you learn programming basics. I like Firefox, it has a great little js console.

Re:Low cost of entry/decent return on investment.. (2, Informative)

jhoger (519683) | more than 8 years ago | (#13866156)

I agree with that. Developing web pages and scripts is the most natural way to learn to programming. No barrier to entry for most folks. Everone has the tools and there are lots of docs free on the web.

Actually, I would suggests starting with HTML. It's not programming per se, but it is a close relative, and many of the same skills are required. Just make sure you use a text editor to write your code, not a crutch web page generator, at least not for this purpose. Vi, emacs, or even something like notepad is OK.

Then JavaScript, then Java or C# or C. Eventually, you must get to C. It will probably take a while to "get" C pointers, but it is so for everyone.

General advice: you're the programmer. Everything is *your* fault. This is a mistake fledgling programmers make: they tend to be ready to blame the interpreter, the computer, the disk drive. But 99% of the time, the problem is your code. The other side of that coin is most of the software challenges you will encounter are doable if you put the effort into it. Always have Google handy to look things up and find the easy way to do it.

On that score: good programmers are usually interested in "The Right Way" to do a thing. If the way you've chosen seems klunky and inefficient and that there is a better way: well, that's because there probably is a better way. Seek out the "best ways" (there is usually only one best way... yes, it's weird). It takes time, but that's how you learn.

Oh yeah, laziness: if you aren't maximizing laziness (in the sense of putting extra effort now to avoid work later) you aren't a Real Programmer.

-- John.

Depends what kind of programming you want to try.. (1)

BigZaphod (12942) | more than 8 years ago | (#13865310)

Personally, I'd suggest learning Javascript since it is quite accessible on your desktop in the form of a browser. All you really need is a text editor and the web, but you could go and buy almost any random beginners Javascript book and just start on page 1.

If you're looking for something more meaty, perhaps check out Python or Ruby. Both have some pretty good tutorials around (linked from their homepages - use Google). Python in particular was designed to be a learning language anyway.

Do something that will help you. (1)

ers81239 (94163) | more than 8 years ago | (#13865315)

If you are working in an office environment, then start out doing VB for Office. There are a ton of books available and you can write little programs that will help you do your job. M$ is evil, but they do give you a nice environment to learn in. This is (or at least used to be) called 'Office Automation.' I eventually got sick of M$ programming, but it IS a good place to start.

If you want a more theortical intro, you can do what many colleges do, and get started in PASCAL. If you go this route, I would just go head and sign up for the class at a local college. It will save you a bunch of headaches. For that matter, there are 'Programming for Office' classes at some junior colleges too.

A third useful option, depending on your job would be to get started with 'shell scripting.' That would be another useful way to learn.

Once you realize that languages are just levels of abstraction, it gets pretty easy to switch among them.

Take a class at a technical college (1)

Single GNU Theory (8597) | more than 8 years ago | (#13865318)

Take a programming language class at a small college. Any language!

Syntax is easy, structure is hard. Any language will teach you the basics of conditions, looping, branching, subroutines and procedures, etc. Once you get the gist of algorithmic design, you're set to understand what programming is about.

Once you've done that, you may want to pursue learning object-oriented vs. non-oo languages (if that's what you started with) so you understand both paradigms.

Don't. But if you must, try this method (2, Interesting)

Marxist Hacker 42 (638312) | more than 8 years ago | (#13865320)

Don't. Or at least, not as resume fodder or in an attempt to make a living. Coders are a dime a dozen these days.

However, I agree it could help you in other areas if you understood more- but don't go for it from a business or career standpoint. Pick your favorite form of art: drawing, music, animation. Once you have one of those three, pick your favorite artist: a painter, a composer, an animator. Then pick a language that has strong instructions in that arena, or a library you can take advantage of- graphical primatives (all the better if they use Hexadecimal in some form), sound instructions (polyphonic if you can find it), Sprites or large memory move instructions of some sort that can access video.

Once you've found your art, and your language, I suggest reading Godel, Escher, and Bach, the Eternal Golden Braid along with the reference manual for your language. This will give you mini projects that are very visually or audually responsive. From there, you can move on to Boolean math, game theory, and expert systems. After that, you can get into methodologies, though object oriented design might be a good help from the begining, it isn't the only methodology out there.

But most of all- make it fun for YOU, rather than a chore.

Re:Don't. But if you must, try this method (1)

Proc6 (518858) | more than 8 years ago | (#13865567)

Coders are a dime a dozen these days.

I don't know where you live, but where I live that is most certainly not the case. One of our clients is a recruiting firm and they have literally 50 .NET/Java programming jobs they simply cannot fill. They pay $75,000 to $150,000 (in the midwest, where that is a very good salary) and are more than willing to accept applicants with "zero" college if you can prove you have actual coding skills. Still, the jobs sit desperately unfilled because of the small number of "real" .NET/Java programmers out there. (As opposed to smelly hackers living in their mom's basement insisting that .NET/Java are passing fads and c0d3ring in Apple Python++ is the future.) So, a dime a dozen? I don't think so.

Re:Don't. But if you must, try this method (0)

Anonymous Coward | more than 8 years ago | (#13865621)

more info please!

-guy in midwest

Re:Don't. But if you must, try this method (1)

GypC (7592) | more than 8 years ago | (#13865714)

Typical HR drone. Any "real" programmer can pick up a new dialect in a few days. Oooooh, .NET/Java! Buzzword monkey.

Re:Don't. But if you must, try this method (2, Insightful)

Proc6 (518858) | more than 8 years ago | (#13865884)

Any "real" programmer can pick up a new dialect in a few days.

It takes 5 minutes to learn how to drive a clutch, a hell of a lot longer to learn how to drive it well.

Theories from one language indeed can apply to another, but the nuances and awareness of an entire framework and what works "well" versus what "works" are what seperates the wheat from the chaff.

Re:Don't. But if you must, try this method (1)

Marxist Hacker 42 (638312) | more than 8 years ago | (#13866251)

Theories from one language indeed can apply to another, but the nuances and awareness of an entire framework and what works "well" versus what "works" are what seperates the wheat from the chaff.

True enough- but that alone offers a gret way to turn chaff into wheat. *Offer training*. Don't just assume because some guy has .NET and Java on his resume that he either knows the entire framework OR the subset your company is using. But any good programmer is also good at *learning* or they wouldn't be a good programmer to begin with; so use that to your advantage.

Re:Don't. But if you must, try this method (1)

GypC (7592) | more than 8 years ago | (#13866555)

Same old BS to justify head-hunting fees.

Re:Don't. But if you must, try this method (1)

Shut the fuck up! (572058) | more than 8 years ago | (#13865726)

Coders are a dime a dozen these days.

True dat. Marxist Hacker is a bitter person who can't find a job decent job. He made bucks in the dot com boom and subsequently couldn't find work to keep up his high standard of living. I suspect that as much as it is probably his paper thin skill set, his attitude and appearence probably contribute equally to his situation.

Every other post by this guy is a whine about how his life sucks and outsourcing and GW sucks and blah blah blah.

Quit whining, Marxist Hacker, the Slashdot community is tired of it.

Re:Don't. But if you must, try this method (1)

Marxist Hacker 42 (638312) | more than 8 years ago | (#13866127)

10 years of experience and 42 languages is not a paper thin skill set. It's just a highly disrespected one.

OTOH, you are correct in many ways- I don't interview well, I have no skills outside of coding (so while not paper thin, as deep and NARROW as a mineshaft). It doesn't help that most of my languages aquired since college have been in response to immediate on the job need- which limits one's ability to explore a language.

Re:Don't. But if you must, try this method (0)

Anonymous Coward | more than 8 years ago | (#13866260)

That's great if you know 42 languages however the real problem with you is that you don't know any of them well. Writing a "Hello World" program in 42 different languages does not mean that you "know" the language. Take your website for example; it looks terrible, is poorly organized and uses HTML that is long out of date. Add up the facts that you admittedly have poor communication skills and no skills outside of coding "Hello World" applications, what exactly are you expecting?

Re:Don't. But if you must, try this method (2, Interesting)

Marxist Hacker 42 (638312) | more than 8 years ago | (#13866300)

Anybody who's been to Oregon Institute of Technology knows how to learn a language in a weekend- and Hello World has NOTHING to do with it.

My favorite is writing text editors and calculators.

Take your website for example; it looks terrible, is poorly organized and uses HTML that is long out of date.

Maybe to you- but to the people that website is marketed to, it does a lot with very little bandwidth, which *used* to be a key in web design (and damn well still should be).

Add up the facts that you admittedly have poor communication skills and no skills outside of coding "Hello World" applications, what exactly are you expecting?

You're the one who mentioned "Hello world"- currently I'm on contract to ODOT working on a team doing a .NET client-server program to keep track of civil rights information for 6000 contractors statewide. But what I was expecting was actual techies (that is, people who can see past *appearances* to reality) doing hiring, instead of idiots. I no longer expect that- in fact, I no longer expect anything. Coding is now a job better done in Bangalore or Hydrabad at $2.50/hr. If you want software engineering, flow charts, and the ability to make the machine do REAL things deeper down than the user interface layer, hire me. If you want flash and coding to spec- go there. In no way should any American be going for a career in "programming" in this day and age- it's not worth it.

Re:Don't. But if you must, try this method (1)

schon (31600) | more than 8 years ago | (#13866530)

Sorry, but I have to jump in here..

Take your website for example; it looks terrible, is poorly organized and uses HTML that is long out of date.
Maybe to you- but to the people that website is marketed to, it does a lot with very little bandwidth

Unless "the people that website is marketed to" are blind people with IQs below room temperature, I'd say it does very little with very little bandwidth.

Seriously - you're marketing web design skills with a site that looks like a smurf puked on it.

which *used* to be a key in web design (and damn well still should be)

And it still is (as far as I'm concerned). However, "low bandwidth" does not mean "ugly as sin." Get rid of the table, convert the page to valid HTML4.01, and sprinkle a little CSS - size will be almost identical. Replace that 256-color gif-converted-to-jpeg with a full 24-bit jpeg, and it will not only look nicer, but be smaller as well.

Re:Don't. But if you must, try this method (1)

Marxist Hacker 42 (638312) | more than 8 years ago | (#13866684)

Seriously - you're marketing web design skills with a site that looks like a smurf puked on it.

Actually, I'm mainly (with that page at least) marketing spyware removal, virus removal, hardware and software setup, and LAN Parties...

I've only had one web design job in 10 years, and I'm not terribly good at it, I should remove any mention of that from that page.

And it still is (as far as I'm concerned). However, "low bandwidth" does not mean "ugly as sin." Get rid of the table, convert the page to valid HTML4.01, and sprinkle a little CSS - size will be almost identical. Replace that 256-color gif-converted-to-jpeg with a full 24-bit jpeg, and it will not only look nicer, but be smaller as well.

Agreed on the rest- and someday I might go ahead and do that (that page is about 5 years old now). But on the 24-bit JPEG; I originally had one up, but it was dithered all to heck on certain NON-MICROSOFT browsers and video cards, thus applying the websafe palette instead. When you're going for people who haven't updated their computers since 1992 as customers, well, it doesn't always pay to go flashy.

Re:Don't. But if you must, try this method (1)

Neil Blender (555885) | more than 8 years ago | (#13866376)

I agree with the other AC reply to your post. When I get a resume with 50 languages in it, I toss it immediately, no longer bothering to think, "Well, does this person know any of these well?" You say 'narrow and deep' but I see "wide and shallow." I have worked with dozens of coders in the past, and the ones who are always trying out a new language every week tend to be the worst of the bunch. Sure they have done 50 small projects in 50 languages, but each and every one of those projects is a shitpile and puts strain on future maintainers because they are hacky first attempts at the language. 42 languages reeks of padding and bullshit. Craft you resume to the job and take all the irrelevant stuff out. Or summarize it with "working knowledge of several other languages."

Re:Don't. But if you must, try this method (1)

Marxist Hacker 42 (638312) | more than 8 years ago | (#13866452)

I agree with the other AC reply to your post. When I get a resume with 50 languages in it, I toss it immediately, no longer bothering to think, "Well, does this person know any of these well?"

That's why I long ago started tailoring each resume to *only* the languages that I know well and are in the job description- no more. Who gives a rip that I happen to know that the add instrution on a Verifone is not communitive? Nobody codes for verifones anymore.

You say 'narrow and deep' but I see "wide and shallow." I have worked with dozens of coders in the past, and the ones who are always trying out a new language every week tend to be the worst of the bunch. Sure they have done 50 small projects in 50 languages, but each and every one of those projects is a shitpile and puts strain on future maintainers because they are hacky first attempts at the language. 42 languages reeks of padding and bullshit. Craft you resume to the job and take all the irrelevant stuff out. Or summarize it with "working knowledge of several other languages."

I don't even summarize it anymore. I even take out any project not directly related to the job I'm applying for because of this type of bigotry. But since I don't interview well, it doesn't matter much. So what that I can edit the EXE at a hexadecimal level, or that I understand compilers so well that I know the reason why, in Microsoft compilers, you should comment out the variable on next statements? Nobody cares about that anymore- they care more about "maintainability" than saving memory or actual engineering. If that's what you want from a coder- only knowing a single language, always coding to spec regardless of whether it's efficient or right code- then I'm convinced that you'd be better off shipping your project offshore.

Re:Don't. But if you must, try this method (1)

bluGill (862) | more than 8 years ago | (#13865945)

I live in the midwest. Last I checked, most places looking for java and .net wanted 10 years of the latter, and 5 of the former. (Java was released in 1994, .net in 2002, you figure out how many people can have that much experience with either)

I'm slightly interested, though I prefer to stick with hardware. Post some user info or something.

Re:Don't. But if you must, try this method (2, Interesting)

Proc6 (518858) | more than 8 years ago | (#13866441)

I'll let you in on a secret: The idea behind excessive requirements in any job posting is to cut out those without the motivation or ability to prove why they are fit for the job irrespective of the requirements. ie. It's a way to filter out the weak.

Looks like it's working.

Re:Don't. But if you must, try this method (1)

Marxist Hacker 42 (638312) | more than 8 years ago | (#13866017)

Well, considering that nobody learned .NET because it came out just as the .bomb bust came and companies were outsourcing to India like crazy- I'd say what they need to do is look in Bangalore or Hydarabad. Either that- or start offering training again...

Re:Don't. But if you must, try this method (3, Interesting)

egomaniac (105476) | more than 8 years ago | (#13865755)

Don't. Or at least, not as resume fodder or in an attempt to make a living. Coders are a dime a dozen these days.

Sure. My team is trying to hire a couple of Java programmers right now. We're talking about a very well-known company (hint: there's a Slashdot category for us), a Silicon Valley office, and a six-figure income.

And we're desperate. We finally (after much searching) managed to find a really great candidate for one of the positions, but the other one remains unfilled. I'd rather leave the position empty than lower my standards enough to pick some of the people we've talked to.

So, I suppose I agree that coders are a dime a dozen if you're looking for an idiot that doesn't even understand the difference between "a == b" and "a.equals(b)", but if you're looking for competent programmers, they're tough to find at any price.

Re:Don't. But if you must, try this method (1)

Marxist Hacker 42 (638312) | more than 8 years ago | (#13866078)

So, I suppose I agree that coders are a dime a dozen if you're looking for an idiot that doesn't even understand the difference between "a == b" and "a.equals(b)", but if you're looking for competent programmers, they're tough to find at any price.

And given the Ask Slashdot that this is in, which do YOU think a guy who's spent the last 20 years doing tech support is going to be? Competent programers- what you're looking for is software engineers. A decent programer in a given language isn't going to know the difference between those two- I do, but hang it up, you're not looking for a mere code monkey.

Actually, if I were you, I'd contact some of the new guilds and unions- and unionize your shop. Anybody smart enough to be your kind of "competent programmer" is probably a bit gun shy by now- or has moved to a much more stable career like truck driving. If you can't treat people like human beings who have lives, and have had a historic cycle of laying people off every 2-6 years, why would anybody smart enough to be a "competent programmer" want to work for you? Give them some REAL guarantees- like 2 years salary banked ahead of time as a bit of a golden parachute that they get if terminated for *any* reason, continuing education oportunities, flex time, and a health care/gym system that allows them to continue coding while walking on the treadmill, and you just *might* be able to attract the PHD's and Master's degree holders that haven't been working in the past 4 years.

basics (not basic) (2, Insightful)

yagu (721525) | more than 8 years ago | (#13865346)

  • learn and have great command of an editor (vim?)
  • play with something interpretive (not basic)... forego the hassle of having to learn compilation and compile debugging to start. (I suggest perl, if you can master some simple concepts in perl quickly, you're likely to have some programming aptitude or be completely looney.)
  • step up to some 3GL... I prefer C or C++, but you'll have to learn about compiling, executables, etc.
  • invest all time necessary to be fluent in the debugging facilities of ANY language you choose, and by that I don't mean learning "print" statements, they're totally useless, take too much time, and perturb code you think you're debugging. (NOTE: this investment will be dear, but the Return on Investment is a windfall).
  • avoid "IDE's" like Visual Studio if you can, they start you out with a crutch you may never throw away and keep the underpinnings of languages opaque. If you AREN'T interested in learning how languages work, skip this bullet.

A couple of points: I can't stress enough achieving fluency in your editor of choice. Create a sample file, write down a list of changes, navigations, etc. and DO THEM ad nauseum... until it's second nature. The last thing you want in programming is the noise that is editing.

Also, learning debugging techniques is off-the-scale important. I was the pariah on a team I worked with because I fell a few days behing on some "assignments". The team was incredibly hostile. I was new to the environment and was spending up-front time learning the debugger of the environment. The team demanded I use print statements and I refused. Within a week (when I had caught up), team members asked how I was doing things looking over my shoulder. I soon had the rest of the team using the debugger and establishing that as the standard (I know, I know, what kind of team was that in the first place???, no comment).

Re:basics (not basic) (1)

Anonymous Crowhead (577505) | more than 8 years ago | (#13865658)

I suggest perl

NO!!!!!!! Seriously, don't pick Perl as a first language. If you have absolutely no idea what you are doing, Perl is going to mess up your thinking about writing code. You can shoot yourself in so many ways. It is far too easy to write code that is not doing what you think it is doing.

If you must though:
use strict;
At all times.

(I'm not ant-Perl either, I use it every day.)

Re:basics (not basic) (1)

yagu (721525) | more than 8 years ago | (#13866003)

That WAS my point... I didn't like perl when I first encountered it, but you can do things with it quickly, and I like its flexibility. And I think it's a good test for aptitude -- if you find yourself doing productive things with perl, it's a good bet you'll take to other languages. Is it the best or only first choice? No. But it can tell you a lot about your aptitude.

Using use strict; is a good suggestion also for starting (I think the Learning PERL book starts beginners with that (though I haven't looked it up).)

Re:basics (not basic) (1)

pclminion (145572) | more than 8 years ago | (#13865938)

invest all time necessary to be fluent in the debugging facilities of ANY language you choose, and by that I don't mean learning "print" statements, they're totally useless, take too much time, and perturb code you think you're debugging.

No -- a programmer with real skill can debug without a debugger. It may not be the most efficient way to debug, but in some cases you just can't use one. If a print statement "perturbs" your code enough to alter a bug's behavior, that in itself gives you a lot of information about the bug.

Print statements and trace logs may seem antiquated, but they can get the job done. It sounds like you don't know how to use them and instead rely on a debugger as a crutch. A debugger is a useful tool but what if you didn't have one?

A lot of people immediately jump into a debugger whenever a problem occurs. Many times the correct course of action is to sit down and really think about the evidence presented, the structure of the code, and how the observed bug might have been caused. It's easy to waste time single-stepping through code that has nothing to do with the problem. It's also easy to confuse yourself by looking at too much data.

To admit that you rely on a debugger is basically to admit a lack of skill.

Re:basics (not basic) (1)

yagu (721525) | more than 8 years ago | (#13866117)

No -- a programmer with real skill can debug without a debugger.

Yes a programmer with real skill can debug without a debugger. I do it all the time. As for perturbed code altering a bug's behavior and giving information about the bug, I agree. But that can be nuanced behavior and I consider it more sophisticated detective work.

Print statements and trace logs may seem antiquated, but they can get the job done. It sounds like you don't know how to use them and instead rely on a debugger as a crutch. A debugger is a useful tool but what if you didn't have one?

Wow! You sure can infer a lot from minimal information! I do know how to use them and have used them many times. Maybe I'll back pedal slightly from my claim of "totally useless". You're right, when I don't have a debugger, print statements is an approach. I've done it, I know how, and I'm quite good at it. I typically find debuggers to be a more direct and concise approach.

A lot of people immediately jump into a debugger whenever a problem occurs.

Ahem. I don't.

Many times the correct course of action is to sit down and really think about the evidence presented, the structure of the code, and how the observed bug might have been caused.

Ahem, again. That's exactly my approach. Something isn't working or behaves unexpectedly my first reaction is careful thought about my code and if there were any careless or invalid assumptions I made that could have produced the unexpected behavior. Many times that is sufficient.

To admit that you rely on a debugger is basically to admit a lack of skill.

I'm not sure I agree that I have "admitted" anything. I don't rely on a debugger and fortunately my code is good enough I rarely resort to one. But, on whole, debuggers have saved my butt more than print statements and with less heartache.

(Maybe I'm a bit partial to debuggers because my very first assignment ever in my career was to write an assembler debugger for an OS we created for EEProms. There really were no easy ways to create "print" statements so we (I) got the task to write (all in assembler) a debugger letting the team step through code (all assembly code), look at registers and memory, etc. It was our only alternative.)

Re:basics (not basic) (1)

heinousjay (683506) | more than 8 years ago | (#13866406)

To deny yourself the use of debugger in pursuit of some fairytale "Real Man" "One True Way" of programming makes no sense. The fact that you conflate poor use of a tool with all use of a tool says an awful lot about your skills, and nothing at all about anyone else's.

Get into RPG (0)

Anonymous Coward | more than 8 years ago | (#13865348)

Yeah. Get into role playing [] .

Perfect timing (5, Funny)

MarkGriz (520778) | more than 8 years ago | (#13865353)

I've been wondering how to get out of programming.
Do you want my job?

Just dive right on in and hope you can swim. (2, Insightful)

rgbe (310525) | more than 8 years ago | (#13865364)

If you really want to learn a 70's language, you can start with Fortran77, it came hot off the press just a year before you got your first computer. However, I recomend learning in C if you are already computer literate. It's not the most modern programing language but there are lots of resources available and until recently it has probably been the most popular programming languages. With C you will learn all the nasty things like "pointers" and "memory allocation" that the modern langauges tend to hide. You also get to learn a very well structured language.

A good place to start with C is: [] It is a good intro.

Then you will also need a good IDE (integrated development environment) and development platform, for Linux there is Anjuta, Eclipse, Emacs (for those who are not affraid), and many more.

And the thing I most recomend, is just search the web for interesting bits of code, compile and run them, then discect them.

But most of all, Enjoy :)

Get a few reference books, for starters. (2, Informative)

DominicanZero (861859) | more than 8 years ago | (#13865385)

Firstly, it's better if you start with basic programming logic and algorythms, and an industry-standarized language like C right afterwards; once you have the basics of these things, you can move on to other languages, both simpler and more complex. A few good reference books are these:
Teach yourself beginning programming in 24 hours []
Beginning programming for Dummies []
C for Dummies []
The C Programming Language []

Those could serve as a good start. If you need further help, I can get you a basic manual of how to start programming in Visual Basic from the stuff I used at college; contact me through email (it's in my url) if you're interested.

Here's the standard operating procedure (1)

infernalC (51228) | more than 8 years ago | (#13865410)

1. Use a LOGO interpreter to make a little triangle leave trails of doodoo all over your screen.
2. Get a KAREL interpreter. Make the computer pickbeepers and putbeepers.
3. --- Apple ][ ---
5. 20 GOTO 10.
5. You cheated. You should stil be doing 4 and 5.
6. Get Turbo Pascal and learn to write a breakout game.
7. ...3 years later... OK, you can stop playing that now.
8. int main (void) { printf("Hello world.") }
9. Write some classes. Reuse some code.
10. Yeah, I know, you took more time making the code reusable than you would have just writing the same sort of thing twice.
11. Go back and document all of the code you wrote in 1 - 10.
12. <html><head><title><?php echo $strHelloWorld; ?></title><body><p><?php echo $strHelloWorldBody; ?></p></body></html>"
14. $> sudo chown -R your.username / ;#!!!!!!

Re:Here's the standard operating procedure (1)

(trb001) (224998) | more than 8 years ago | (#13865770)

Get out of my head damn demon!

Seriously, those are almost exactly the steps that I (and, apparently, many others) took to get to where we are now (I would place 2 after 5, but whatever). The unfortunate part is that I can't really tell you, in all good conscience, to leave any one of those steps out. They were all invaluable in teaching me how to become a good coder. You have to start out with something that makes you *think* like a computer (LOGO), then write something that's logical and linear (BASIC), then write something that's procedural (Pascal), then write something more powerful (C), then figure out OOP and basic data objects (C++), then...well, then you just start getting more complicated with what you already know. Twelve through 14 are really just paradigm shifts that are more commercially viable and built on the previous 11 steps.


Re:Here's the standard operating procedure (1)

an_mo (175299) | more than 8 years ago | (#13865851)

This is genious. Believe it or not, it describe quite accurately my path.

Re:Here's the standard operating procedure (0)

Anonymous Coward | more than 8 years ago | (#13866526)

Hey! You can't go on to step 9 when step 8 won't even compile!

Doing it backwards (4, Insightful)

Otter (3800) | more than 8 years ago | (#13865439)

I want to learn principles, then begin to learn a language.

Some advice from a casual, self-trained, hobbyist programmer:

1) You need an itch that has to be scratched. Find something you need, and code it. Outside of a classroom, you need to be extraordinarily self-motivated to learn in the absence of a defined project. Pick something, and *complete* it, despite the unexpeceted directions it will go.

2) Don't worry about principles now. Learn to hack a bit, get some feel for writing working code, and maybe then start working through real CS books. Honestly, half the "programmers" graduating with CS degrees are inert to the underlying principles. You can have plenty of fun without them.

3) For me, Qt/KDE was the tool that made it intuitive to jump from reading about objects and GUI programming to doing it. YMMV, obviously, but I'd recommend that as a place to start. Qt also has *the* best documentation in the open-source world.

Re:Doing it backwards (1)

stanmann (602645) | more than 8 years ago | (#13865769)

BUT, if you really want principles, Knuth will beat you to death with principles.

Re:Doing it backwards (2, Insightful)

Arandir (19206) | more than 8 years ago | (#13866079)

It's like learning a spoken language. You can study all you want about nouns and verbs and tenses, but until you actually learn some vocabulary, it's all meaningless. Your first step in programming is to learn a language, because the principles are pointless without a language.

p.s. I also second the Qt recommendation. To learn C++, I would recommend Practical C++ Programming [] . This is one of the very few C++ books suitable for a programming newbie.

Get a book (1)

lilmouse (310335) | more than 8 years ago | (#13865446)

I recommend getting some book for a programming language (e.g., Java?), such as Learn Java in 30 Days (if you like, I can find a cute book I was trying to learn Java from). Go through the motions of learning the language according to the book.

Type in the examples. Actually type them in - you'll learn what syntax errors look like ;-)

Do the questions. Do the practices.

Sure, you'll feel dumb for typing "print("Hello World");", but that's the way to learn it. Granted, there are other ways to learn it, but this provides a fairly straightforward, structured way to go about it. It also guarentees that you'll be exposed to all the syntax of the language at least once. That's one of the biggest problems I have with just jumping in - you never know what can or can't be done easily and you don't know what's already been done (especially troublesome with Perl when you have no experience. I'd try a book if I had to do it again...well, maybe I wouldn't - there's only so much you can do to learn perl; the rest is magic). If you just start coding on some project, you may never learn a bunch of the things you *could* be doing. OTOH, that may not be a problem ;-)

Anyway, good luck :)


PHP (0)

Anonymous Coward | more than 8 years ago | (#13865447)

Or some other web related language. Why? Because you get instant results. You don't need to wait for something to compile before you know you did it correctly or incorrectly. Because the web is popular on the web, you'll also find lots of articles, information and discussion if you go this route. And, everyone needs a webpage, right?

You need a problem first! (2, Insightful)

Bootle (816136) | more than 8 years ago | (#13865518)

What I have always found is that I need a goal in my mind. I can't just say, "I want to learn PHP." It needs to be, "I need to write a webpage for automating google searchs.

Of course, learning to program is all about the concepts, the rest is just syntax. If you know C/C++, it's nothing to learn PHP, javascript, python, etc. So once you get started and get some real knowledge under your belt, it will get easier and easier.

Ask yourself what you want to accomplish, then learn what you need to meet that goal

Perl is easy (1)

Evro (18923) | more than 8 years ago | (#13865528)

The easiest thing to do would probably be to setup a Linux box and then just play around with Perl scripts to get the basic concepts like variables, arrays, and hashes down. Then PHP or whatever for more OO learning (yes I know you can do oo stuff in Perl but it's not as clear as in other languages). PHP is great because of its documentation -{whatever function name} to lookup the info on that function. PHP is probably the easiest language to teach yourself because of its documentation.

Start out the way the 'rest of us' did it (1)

vasqzr (619165) | more than 8 years ago | (#13865532)

Buy/find a Commodore/Apple/Atari computer. Then scour the net for a book on how to program that machine. You'll be using BASIC and ASSEMBLER. Fun stuff.

Next up, get a 386/20 and introduce yourself to Borland. Turbo Pascal and Turbo C. Actually, free downloads at Do some x86 assembly while you're there.

Now you're at about 1995. Find a Pentium and pick up the Petzold book. Alternatively, find an old Mac and find a copy of Think C. You're using GUI's now!

Enter the net. Perl, Java, HTML (not really programming but you'll want to know it), JavaScript.

That'll get you pretty current. Then you'll want to hop on C# or Ruby or Python or whatever's hot this week.

Re:Start out the way the 'rest of us' did it (1)

stanmann (602645) | more than 8 years ago | (#13865789)

Step 1 can also include an early PC/PCjr/Tandy 1000 series for Basic and assembly.

Programming Concepts (1)

Usquebaugh (230216) | more than 8 years ago | (#13865559)

I wonder if the definitive book has been written yet on this?

Basically, it sounds like you're smart enough to read code but would like to know the why not the how. You don't want to learn all about design/editing/debugging but rather why is there a iteration used here.

Programming is abstractions, prgrammers take reality and then model that within the computer. The more types of abstractions available to a programmer the closer he can model reality. The easier the abstraction can be used the more likely a programmer will use it.

So your task would be to go and learn about abstractions and then learn how to recognise them when they're being used! Good luck! As an example Object Orientation is an abstraction, iteration is an abstraction, type systems are abstractions. These abstractions are at such a level as to provide the programmmer with many chances/ways to use them. Also one abstraction can be used within another.

You would probably want to look up some of the Open MIT coursework. Most CS books will be written in such a way as to gurantee the reader rarely understands the authors intent. The coursework stuff usually gives you a chance to grasp the ideas without having to know the language.

Personally I think you're nuts, if you want to become a programmer then become a programmer. If you want to read code then read code. Rather like an author and a critic the two jobs are far apart and require differing skills. Programmers are artisans slowing being brought kicking and screaming into the world of mass production.

Use and IDE to start (2, Insightful)

adamy (78406) | more than 8 years ago | (#13865646)

The post about Turbo Pascal made me realize one of the key tools for learning programming, a good IDE. While I agree that learning a program from the ground up using vi/emacs and the command line compiler is a valuable experience, there is nothing like a good intergrated debugger and statement completion to aid you on your way to understanding.

My advice, download eclipse and get yourself a copy of Bruce Eckel's "Thinking in Java."

I originally learned on a C-64, moved to Pascal in highschool using a line editor and UCSD Pascal on an Apple IIe. In College, I got Turbo Pascal and the added advantage was extreme. There is nothing like stepping through your code in a debugger to really understand how it works. There were still a lot of things I didn't understand, the big one being memory management.

Once you learn thingsd in a high level language like Java, you can move down into the nuts and bolts of memory mangement, pointer math, and all those things you need to know to poke at the operating system.

At the same time, you might want to learn a scripting language. I tent to use Bash a lot, and it is not a bad place to start.

One of the most useful courses I took in college was comparative programming languages, where we learned how to learn a new language. But to get there, you need somewhere to start, and I would advise Java. It is designed for inexperienced programmers, and yet for accomplishing serious programming tasks. Once you know a language that has training wheels, you can take them off and attack things in C and assembly.

Good Luck, and may the source be with you.

my experience (1)

Luyseyal (3154) | more than 8 years ago | (#13865651)

This is just my experience -- take from it what you will. I took a couple CS classes in college, but my jobs were always LAN Administrator type jobs. At one company, they needed someone to maintain a simple script on the servers. I did that. I hated the way it worked, so I made it better. And better. And even more better! (heh) After awhile, I decided I wanted to do programming instead of system administration and I've been happier since.

Above all, have fun with it,

A couple ideas (3, Insightful)

ctr2sprt (574731) | more than 8 years ago | (#13865652)

First, start with a full-featured interpreted language like Python, Perl, Ruby, or Scheme. Interpreted languages give you instant gratification that you won't get with Java or C. And because the languages I named all have big libraries, you can start writing some nontrivial programs with them too. As for which of these to choose, I would say Python, because I like it, but it's up to you. The Scheme syntax is cake to learn, but "the Scheme way" (actually the Lisp way) is unlike most popular languages so transitioning to something else would be harder. It's too easy to develop bad habits in Perl, especially if you don't know enough to have any idea what habits are good and what aren't. I've never used Ruby, so I have no idea how good it is. All four of these languages are full-featured, well-supported, and popular. None of them are toys: they are all used for serious work. So don't worry that you might be "wasting time" by learning one or more of them.

Next, once you get past the simple tutorials, try to think of a simple program you'd like to write. My personal favorite target for learning exercises is reimplementing well-known Unix programs, or parts of them at least. So I might design a version of "cut" that does some things I want it to, like treat contiguous whitespace as a single delimiter. But maybe you already have something in mind, like a simple web app. If so, you should tailor your choice of language to what you want to do. Like if you want to make a simple web app first, you probably want to use PHP. (Which I didn't recommend earlier because it's a little harder to debug.)

At this point you can hopefully write nontrivial programs - programs 100 lines or so long that mostly do what you want on the first few tries. Now you should learn Java. The main reason for this is that you will need to learn C, or at least a C-like language, at some point, but you don't want to get into the complex parts of C yet. Java will handle most of them for you. It's also a compiled language, so it adds an extra step to the process (code-compile-test instead of just code-test). This is probably where you ought to learn most of the intermediate programming concepts, like basic data structures and algorithms. What you may find helpful is going back and forth between Java and the language you started with. Sort of sketch out the app's framework and decide how you want to do something in e.g. Python, then rewrite it in Java. This will not only let you use the language you're most familiar with, it will give you a valuable understanding of how programming languages work.

Finally, move to C. C++ would be an easier transition since it's much more like Java than C is. But what you want to learn is memory management and all the other hard shit, and there's no way to escape it in C (there are lots of ways to escape it in C++). Plus, once you have a solid grasp of C and Java, you will almost by default know C++. Then you can learn the advanced features of C++ without having to worry about anything else.

Once you're at this point, you will be able to pick up the basics of any new language in a week or two. If you still want to learn and didn't start with Scheme, you should learn it now. It's a very different way of programming than you'll be used to, and it'll teach you even more about how languages work and how to be a good programmer.

I'm assuming you want to do as much of this as possible on your own. The first two steps - learning your first language and writing some simple programs in it - can be done with books and online tutorials. Past that, however, I would advise taking classes. You will know enough by then to have questions which might not be answered in a book, but which an instructor could answer easily - maybe before you even know to ask. Instructors will also be giving you assignments which are neither too easy nor too hard (hopefully), which is really hard to do on your own. You'll quickly find that you can read a book and understand every word in it, but not be able to write a program that says "Hello, world!" on your own. You need to be practicing this stuff constantly as you learn it or all the books in the world will be useless.

More advice (1)

metamatic (202216) | more than 8 years ago | (#13865669)

Here's my bias: I've written code in over a dozen languages, ranging from BASIC back in the 70s to the usual big ones (C, Java, C++), with a few of the weird ones too (Lisp, Scheme, Smalltalk).

I'd say:

First decide why you're doing it. If it's for money, don't bother.

If there's some specific niche you're interested in, pick the appropriate first language for that niche. For example, if you build web sites, start with JavaScript. If you work in an all-Microsoft shop, learn VB.NET. If you want to help with open source projects, learn ANSI C.

If you don't have any specific goal in mind, examine your own biases. If you're a mathematician, try something like Lisp, Scheme, ML. If you're a biologist, Perl might be useful. If you're a chemist, FORTRAN is probably still the thing.

If you still don't have a clear choice of language, pick Ruby. It supports modern styles like OO as well as basic concepts from functional programming. It's very clean and easy to learn, very consistent, it can actually do useful stuff, and it runs on Windows or Linux well. All you need is to download a Ruby interpreter and find a good text editor. The first edition of the Pickaxe Book is available online for reference for free, and it's a very well-written and clear book. There area also a few "learn to program" tutorials online for it.

Start off by writing handy little command-line utilities for yourself. For example, write something to total up the disk space used by each directory on your hard drive, sorted in reverse order. Write something to clean out all the files in your temporary directory older than N days. Write something to suck down your favorite comics and turn them into a set of indexed local web pages. Write something to clean all the porn URLs out of your browser history.

Then you can look at some graphics stuff. OpenGL is one direction, or you could head towards GUI via Qt or wxWidgets or GTK or Cocoa. Once you've got some of that working, it might be time to look at learning your second language. At that point you could sensibly choose C++, Java, or Objective-C.

But I really wouldn't start with C++, Java, or Objective-C. I wouldn't start with BASIC, even though I did so myself, because there are so many variants, and it's pretty primitive compared to modern scripting languages. I wouldn't bother with FORTRAN or Perl unless they're the standard in your industry, because they're ugly. I wouldn't advise Common Lisp as a first language, as it's too huge and mind-bending. Java's a bad start because the API is huge and apparently thrown together without much planning. C is a bad first choice because it has little support for abstraction, no automatic memory management, and so on. I used to suggest Scheme, but Ruby is far more useful and supports OO.

Yes, there's also Python. I think of Python as Ruby for people with bad taste, but that's an aesthetic judgement, you may love it. It's certainly better than BASIC, Perl or C.

My progression (1)

blueday4 (569939) | more than 8 years ago | (#13865678)

I started out with BASIC on a VIC-20 and then DOS, then progressed to Pascal. The BASIC gave me good basic programming logic, then Pascal helped me get comfortable with functions. I then moved on to C, which gave me more control. After understanding C, perl and the like became more about learning basic syntax, than relearning a language. Once i hit roadblocks with C/C++ I learned some basic x86 asm to fill in some small gaps. Granted these were learned over a long period of time, but I also started with about zero computer knowledge. Being exposed to what you have over your life, you should hopefully be able to catch on to them quicker.

Computer Systems (1)

delirium of disorder (701392) | more than 8 years ago | (#13865682)

If you want to learn how computers work from the bottom up and really see how your operating system interacts with hardware, you should check out "Computer Systems: A Programmer's Perspective". [] It assumes some understanding of *nix and C, so you need to get familiar with them before or while you read CS:APP. You can't learn "programming" without learning a programming language, and although something like BASIC might be easiest, I suggest starting with C or assembler because they will give you a more complete understanding of how computers actually function. You seem to be someone who wants thorough knowledge, not just marketable skills. Once you comprehend the structure of code at a low level, you should tackle more useful techniques and algorithms. Donald Knuth's books [] are a must. At this point you should have a strong enough foundation to delve into more specific aspects of systems level programming, or move on to high level programming and look into learning a language that's more suited for application development like Java.

A couple of books. (3, Insightful)

jsantos (113796) | more than 8 years ago | (#13865710)

If you have good math foundations you can try: Structure and Interpretation of Computer Programs - 2nd Edition [] . Which will teach you a lot of sound principles. Otherwise you can try: How to Design Programs: An Introduction to Programming and Computing [] . Which is also a good book for learning principles of programming but it's intended for a more general audience. Or you can try both. They are both worth owning.

python (3, Insightful)

bluGill (862) | more than 8 years ago | (#13865713)

I recommend you start with python, for two reasons: there is a good book How to Think Like a Computer Scientist [] , and because the enforced whitespace will start getting you into good habits as far as code formating from the start.

Note that I said start. Python is a great language, I use it a lot for my real world stuff. It is not the be all, end all of programing. Programmers I trust strongly recommend Ruby. (I have not got around to learning it yet) You will need to learn both LISP (Scheme is great) and assembly (any assembly, doesn't matter which, x86 is about the worst choice you could choose to learn though) at some point if you want to become a good programmer. Do not get stuck in the rut of thinking that your first language is perfect for everything.

While you can learn perl, php, C, Java, C++, C#, basic, etc, I recommend you avoid them until you need them (though I have different reasons to not recommend each). Unfortunately all are fairly popular, so odds are you will be called upon to use one. They are however ugly, so you should avoid them until latter.

It has been said that it is impossible to become a good programmer if you start with basic. While this isn't strictly true, there is a lot of truth behind it.

Real programmers do not think about language. Real programmers know that all languages are Turing complete, and thus if you can do it in one language you can do it in another. (though sometimes the language will try to get in your way) Real programmers are concerned about data structures, algorithms, and other such things that have nothing to do with the syntax of the language. While you are learning the language keep in the back of your mind that the language itself isn't what is important.

I'm torn about the recommendation that you take a class. While classes can be good, there are a lot of teachers out there who know nothing about programing, but think they do. If you get a good teacher, take the class. However a bad teacher can teach bad habits. (Comments are good, but run from any teacher who makes you comment every line) Sadly as a beginner you will be unable to tell the difference between a good teacher, and a bad teacher.

Practice (1)

cratermoon (765155) | more than 8 years ago | (#13865949)

Dave Thomas' Code Kata [] .

RAD (1)

vijaya_chandra (618284) | more than 8 years ago | (#13865969)

Why not make the jump with RAD and start with something like VB(6 and earlier) or Delphi.
You can simply just get some pretty windows displayed which just do nothing, just for the kicks
and then start working on things like a simple calculator
Might sound crazy but you can get yourself familiarised with different aspects of programming without getting pained a lot and once you feel comfortable take the plunge into the world of C

Many others in your category... (1)

Ledfoot (75412) | more than 8 years ago | (#13865993)

I've actually had several friends in the same boat as you. In fact, I had one co-worker who had a Masters in CS, but couldn't code herself out of a box because, like you, she never really got into the coding side of things, (for her it was more of the math/theory side of CS.)

First off, you have to understand what programming is. Programming in it's most basic, pure form is problem solving, using a specific set of rules and principles. (Remember all those damn proofs you had to do in HS Geometry class???) EVERY program you load on your computer is nothing more than a set of instructions that apply to rules that somebody gave to the computer to solve a specific problem at hand.

The important thing to remember is that you don't try to solve all the worlds problems in 1 huge chunk. Computers are pretty stupid in reality and so you have to break what seems like a simple problem into smaller sub-problems to solve. Take for instance "taking out the trash". Sounds like a simple problem, right? In reality, you can break that down into smaller problems - Remove Trash bag from bucket, Tie trash bag, Drag bag to back door, Open door, Drag bag to outdoor can, Place bag in can, return inside, shut door, place new bag in bucket. There, you just wrote your first program.

As others have stated, the easiest way to learn to code is to have an itch, then figure out how to scratch it. Is there something in Word that you wish was automated? Figure out how to write a Macro to do that. Take the concepts you learned there by writing some VBscript code and do the same sort of thing in another language to solve another problem. And so on. You'll come to find that most computer languages have VERY similar logical constructs, and the differences are more in the way in which you use those constructs and the syntax (the names of the commands and parameters.)

To start off, I'd avoid C/C++, or even Perl (too messy to read.) Go with something like Visual Basic, Javascript, or Python. Write some very simple things and slowly build up. As you get more comfortable, move up to Java or C#, and then C/C++.

A platform everyone has (1)

Jorkapp (684095) | more than 8 years ago | (#13865998)

One way to start programming is by using something you are familiar with - your web browser. Most all browsers have a Javascript implementation (be aware of MS's JScript and VBScript with proprietary functions though) which you can use to begin learning the basics of input and data manipulation. Might I recommend Firefox for its nifty little JS console.

Sure, buttons and text boxes for input aren't the total representation of data input/manipulation, but like I said, its the basics. You only need to know what a variable is, and most functions offer decent interoperability with numbers and strings.

As well, you learn the C-Type syntax and get to do some cool stuff without having to download compilers and IDE's - a text editor and a JS-enabled browser is all you need. Once you do feel quite comfortable with the concepts, you can use your knowledge of the C-Type syntax to ease the transition into other C-Type languages - C/C++/C#, Java, and a whole lot more.

Recommended links:
Firefox - []
JS Tutorial - []

Have fun!

Summary of whats been said (and a critque) (2, Insightful)

cypherz (155664) | more than 8 years ago | (#13866107)

It seems that the prefered beginners languages here on /. are (in no particular order) are Python, BASIC, and ANSI C. All are IMNSHO, good choices for a beginner. A few have mentioned Ruby, which is a very approachable language. But the best advice I've seen here so far is "Find an itch you want scratched". That is, find yourself an interesting project, and code it. Decide which platform its gonna run on, pick one of the above mentioned languages and do it! The only way to learn to code is to code! Oh yeah, it helps to read code. Reading source is a huge help to see how others solved problems.

One problem with this discussion is that you never said what platform you use or want to write for. This lack of information about what you want to do is really common. Almost _every_ one of these "Ask /." articles leave out information that respondents need to adequately answer the darned question! At any rate, if you're a M$ kinda user, I think you should get ahold of VB 6 or and start with that. Lots of books etc available to make getting started easy. If you're a Linux/UNIX sorta person, then the ANSI C recommendations really start to make more sense.

I think the bottom line is this: If you just want to learn some more about programming "in general", then you probably won't learn much. If you have some sort of persistent interest in solving some problem or other, or you want to make your life easier by automating something, then just code it! /* this post is really disorganized. i'm in the middle of debugging a headless batch process on HP-UX, so this post is only getting spare clock cycles */

Read "The Art of Computer Programming" (1)

hubertf (124995) | more than 8 years ago | (#13866195)

by Don Knuth
it's not for the faint at heart though,
but it will teach you WAYS more than any of those
"programming for beginners" courses and books.

How I got into it (1)

Morgalyn (605015) | more than 8 years ago | (#13866202)

I started 'programming' as a kid, in the form of DOS batch files and some BASIC, just to do funny things (like make people think that they were reformatting their harddrive by replacing an .exe file with a file that put info on the screen that looked like a drive reformat... silly, I know, but I was like 8!).

If you have any *nix available at home (and if you're a tinkerer and you want to get into programming, you should be able to get your hands on at least one computer set up this way, if only for geek cred.. if you just run windows, try Cygwin [] !), a really good way to start would be learning shell programming. This is both immediately useful to you as a user, as well as being a great introduction into programming concepts like variable scoping and loop structures. It also lends itself to coming up with something useful to program, which is helpful when you're learning programming. Most shell syntax/commands (depending on the shell) are similar to (or are actually) the C language, which would give you a solid foundation. There's also plenty of resources at the library and on the net for free, or you could pick up a book (I have this one [] ) to serve as a reference.

What it won't teach you very well is object-oriented approaches to programming. An easy (and cheap!) way to get more information on this sort of thing is to look for free books on the internet. There's a lot of hotness to be found in The Pragmatic Programmer's Guide [] to programming in Ruby; the text is all online and covers both 'the good way' as well as serving as a language reference. Everything you need to get started with Ruby (and then some) are free, too! Then again, most of the necessary tools for any language are easily available and typically free, but might take some hunting.

A lot of people have probably suggested Java and all its cross-platform goodness. Personally, I think it would be much better to start with a language with less of an entry hurdle - it can be difficult for a total newbie to do all the 'extra stuff' like linking to libraries and all the class structure right out of the gate. All that stuff makes Java more powerful (and cumbersome), but much harder to just dive into than scripting or Ruby.

We're in the same boat... (1)

foniksonik (573572) | more than 8 years ago | (#13866222)

I was born in 1978 and I didn't even get into programming until 4 years ago... ;-p imagine how good I'd be if I'd started way back when....

Language not important as the Problem. (2, Informative)

jcwynholds (765111) | more than 8 years ago | (#13866233)

I see the language as just a medium. And when I say medium, I mean it in the sense that the painter uses canvas as his medium. The programmer uses a languages like a medium. Don't get hung up on which to use; the "best" one is entirely your opinion.
So if you wish to learn programming, the medium isn't as important as the problem you're trying to solve. If I were in your shoes, I would try approaching a classic computing problem (eg generating Fibonacci sequence) using several of the languages that appeal to you. I use Python and C/C++, but that is simply my preference. But seeing a similar problem solved by different languages (and if _you_ do all the coding), then you would get a much better sense as to why to use one language or set of methods for a solution to a problem. I solve the same problem over and over to learn new languages and to get a better sense of new features of a language.
And as far as other suggestions I have seen here:
* Don't use IDE's. They're fine once you understand (fully) what they're doing, but when you're learning the window dressing can be confusing, and can become a crutch that many cannot do without. I'm not saying that we should go back to punchcards, but if you want to learn, begin from the beginning.
* Get used to using a good text editor. Vi is my choice, but I have seen alot of Emacs stuff that is also very handy. I recommend Vi.
* Steer clear of M$ Dev stuff. Perl, python, and gcc (and just about every other language) are all available for win32, so use those unless you're getting paid to develop with Vis Studio.
* Use interpreters *AND* compilers. Learning when to use one and not another helps with the "everything looks like a nail when holding a hammer".
In conclusion, at University, classes showed how to solve many problems with one language, but I found myself learning more when I solved one problem with several languages. It gave me insight as to how to structure things, and the inner workings of each language.

Learn C++. (1)

Spy der Mann (805235) | more than 8 years ago | (#13866429)

A language guaranteed to stay for long.

You can download dev-c++ (or even better, codeblocks IDE) for free (they're OSS), and get a c++ tutorial from the web. You know, hello-world stuff and the like.

Re:Learn C++. (1)

basiles (626992) | more than 8 years ago | (#13866490)

No, I suggest learning several languages (possibly non-mainstream) and read many books. C++ is very hard to master, and IMHO painful to learn (you'll need several years to master it, and C++ popularity is already declining). It won't learn you the best practices.

I suggest learning powerful languages like Ocaml [] and lisp or Smalltalk (or even Prolog). With such languages, you'll learn to think better.

Once you master different languages of various families, learning a new language will be much easier.

learning to think correctly about programming is more important IMHO than learning the currently popular languages.

And I suggest using only open-source language implementations. At some point, you'll learn a lot by diving into their source code (so better use Linux).

At some point, you probably will want to follow a college or university degree. Regards.

Learning The Principles (1)

Ankh (19084) | more than 8 years ago | (#13866589)

I won't suggest a programming language because that's not what you're asking...

A good theoretical undergraduate computer science degree should teach you things like algorithmic complexity, finite state machines and automata theory, sets and group theory (if your middle or high school didn't do that already), graph theory, data structures, and a bunch of other groundwork.

As other have said, you can pick up the MIT coursework for free, but what you can't get is the sessions with a tutor, the late-night hacking sessions in the computer room with other students, the time spent talking with others sharing the same path.

Short of going back to school, look at some university text books, and maybe get involved in a programming project with other people, so that you can interact with people who do know this stuff and you can ask the questions. Some people find that hanging out on IRC can help them if they are isolated, but find a good place where there are people with a wide range of skills and backgrounds.

There are also programmer-specific blogging sites (e.g. [] ) that you can read and where you can ask questions.

There is an advantage to using strongly-typed compiled programming language (e.g. Haskel, ML or CAML) in that you have to understand what you're doing and get it right before the program will compile, forcing you to step back and think at an earlier stage. Not everyone likes this, though, and (as I promised!) I'm not going to say that there's a particular language you should learn first. The important part, as you so clearly know, is the understanding of the underlying concepts.

Beware, by the way, that some course text books are primarily for reference, and some are a lot easier to read (obviously) than others. Knuth's The Art of Computer Programming is a classic, but it's also pretty hard going, especially if you don't have a mathematical background.

You should also pick up an Introduction to Mathematics book (at University level) if you're not comfortable with reading mathematical notation (forall, exists, set membership, etc) as it's widely used in computer science.

Hope this helps!

How I started (1)

SilverspurG (844751) | more than 8 years ago | (#13866655)

translate AmigaOS QBASIC to MacOS QBASIC for a simple word processor (yes, a number of idiosyncracies in both)
a little AREXX
... insert 10 years of no programming ...
BASH (this installer [] )
C (current hobby)

Learning Programming via Entertainment (1)

quantax (12175) | more than 8 years ago | (#13866680)

I found a cool little teach-programming game called CeeBot [] (has been featured on slashdot before I believe), and it would be excellent for teaching you the basics. I've played it myself as a programmer as a puzzle-game since some of the later parts are challenging logic wise. In the end though as many posters have indicated, 'just do it' is the main course of action and learning based off your needs to start with. Think of a very simple application and then code it, whether its an address book or a small card game. To those ends, I recommend something like Python or Perl (though perl is a bit less structured than Python) since they're evolved languages and have greater out-of-the-box functionality. I tend to think of C++ as being given a hammer & screw driver to make a car, you need to use those 2 tools to manufacture the rest of the tools and then after that, make the actual car. Python & Perl give you pretty much all the tools you need, you just need to worry about the car itself.

That being said, the one of the best resources for programming (besides the actual language documentation itself) is Usenet (specifically, using Google groups to search), since it goes back to the creation of the internet & is fully archived, you have at your disposal stuff that goes back to 1981. Barring that, there's always google & forums.
Load More Comments
Slashdot Login

Need an Account?

Forgot your password?