How To Get Into Programming?
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?"
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".
That which is done from love exists beyond good and evil
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.
Shadus
Most community colleges have beginning programming classes. It's a way to get started before branching out on your own.
~
"A foolish consistency is the hobgoblin of little minds." -Emerson
...I'd say here:
x
http://mindview.net/Books
and here:
http://www.c2.com/cgi/wiki?WelcomeVisitors
and maybe here:
http://www.objectmentor.com/resources/articleInde
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.
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.
.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.
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
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)
GOBACK.
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.
Hexy - a strategy game for iPhone/iPod Touch
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.
there are 2 kinds of people. those who divide people into 2 kinds, and those who don't.
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.
Little Debian: America's #1 Snack Distro!
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.
SJW: a person who perceives an injustice, and while correcting it, commits a greater injustice.
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).
Bah! Two words, VB.NET.
Yeah. Get into role playing.
I've been wondering how to get out of programming.
Do you want my job?
Beauty is in the eye of the beerholder.
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: http://www.cs.cf.ac.uk/Dave/C/CE.html 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
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.
120 char limit? How the hell am I supposed to cram my favorite sig quote and make it fit in here? =p
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.
vk.
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.
What I'm listening to now on Pandora...
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
--LWM
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?
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.
http://www.welton.it/davidw/
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
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 - php.net/{whatever function name} to lookup the info on that function. PHP is probably the easiest language to teach yourself because of its documentation.
rooooar
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 Borland.com. 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.
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.
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.
I'm Rick James with mod points biatch!
more info please!
-guy in midwest
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.
Open Source Identity Management: FreeIPA.org
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,
-l
Help cure AIDS, cancer, and more. Donate your unused computer time to worldcommunitygrid.org. Join Team Slashdot!
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.
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.
GCHQ Quantum Insert installed. If only our tongues were made of glass, how much more careful we would be when we speak
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.
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.
------ Take away the right to say fuck and you take away the right to say fuck the government.
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.
This signature intentionally left blank
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.
Typical HR drone. Any "real" programmer can pick up a new dialect in a few days. Oooooh, .NET/Java! Buzzword monkey.
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.
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.
ZFS: because love is never having to say fsck
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.
I'm Rick James with mod points biatch!
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.
Dave Thomas' Code Kata.
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
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++.
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 - http://www.mozilla.org/products/firefox
JS Tutorial - http://www.w3schools.com/js/default.asp
Have fun!
Frink: Nice try floyd, but you were designed for scrubbing, and scrubbing is what you shall do.
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...
SJW: a person who perceives an injustice, and while correcting it, commits a greater injustice.
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.
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.
SJW: a person who perceives an injustice, and while correcting it, commits a greater injustice.
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.
/." 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 VB.net 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.
/* 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 */
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
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 sig kills fascists.
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.
SJW: a person who perceives an injustice, and while correcting it, commits a greater injustice.
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.
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.
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.
You say you got a real solution
Well, you know
We'd all love to see the plan
(The Beatles)
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....
A fool throws a stone into a well and a thousand sages can not remove it.
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.
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.
.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.
True enough- but that alone offers a gret way to turn chaff into wheat. *Offer training*. Don't just assume because some guy has
SJW: a person who perceives an injustice, and while correcting it, commits a greater injustice.
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?
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.
.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.
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
SJW: a person who perceives an injustice, and while correcting it, commits a greater injustice.
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?
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."
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.
Looks like it's working.
I'm Rick James with mod points biatch!
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.
SJW: a person who perceives an injustice, and while correcting it, commits a greater injustice.
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.
Same old BS to justify head-hunting fees.
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. Advogato.org) 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!
Live barefoot!
free engravings/woodcuts
C=64 BASIC
... insert 10 years of no programming ...
MacOS QBASIC
AmigaOS QBASIC
translate AmigaOS QBASIC to MacOS QBASIC for a simple word processor (yes, a number of idiosyncracies in both)
a little AREXX
PASCAL
BASH (this installer)
C (current hobby)
fast as fast can be. you'll never catch me.
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!)
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.
"What can a thoughtful man hope for mankind on Earth, given the experience of the past million years? Nothing." -Bokonon
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.
SJW: a person who perceives an injustice, and while correcting it, commits a greater injustice.
I've found it really beneficial to come up with an interesting, small, easy coding project to help learn a new programming language or programming concept.
ie *not* a 'Hello World' program!
Everyone has different learning styles, but I think having something to apply what you are learning to (beyond the usual 'hello world' and other bland examples... "say you have a company with employees - these are your objects..." zzzzz).
I usually pick a game (eg blackjack) or simulation (eg orbital motion) or some tool I personally need (eg online photo album, resume database, etc).
This usually prods you to search all the nooks and crannies of the language to find out what you need to make your project work.
If you learn Haskell first then when you eventually learn C, or Python, or whatever, you'll think they're trivial Mickey Mouse languages and master them quickly. If you start with something like C you'll have a ton of conceptual barriers that will make it hard to move to Haskell.
You clearly have the luxury of not having to learn a language just because you need it to interoperate with your colleagues. So learn a language that's fun, intellectually stimulating, designed (as opposed to accreted like most languages), beautiful and functional (in at least two sense of the word).
Please, what ever you do, don't just do it. All that leads to is opportunities to get your thought/logicp processes wrong, time and time again.
As a Computer Engineering student at UT Arlington, the best way I could have prepared myself for learning how to program was to learn logic, specifically: Discreet Structures. This will not only help you with high level language structures, like loops, but it is essential to understanding binary logic: the foundation of computer operations, it is also helpful in understanding and doing calculus, which you will have to take if you pursue an engineering degree.
For example, if you do not understand that the opposite of the color black is not the color white, then you will have trouble with binary logic and the structures and sets built there on.
It's ok to acustom yourself to programming languages. But, my point is that you understand the logic behind any computer language you learn.
If you want to use a book to learn a language, a good and challenging series can be found under the Dietel & Dietel authors.
If you want to tackle object oriented programming, go for learning Ruby; it's free, simple, powerful, and open source (not that the later is too critical unless you want to change the back end of it: requires much programming understanding).
Hope this helps.
P.S. The binary opposite of the color 'black' is 'not black'. The binary opposite of 'white' is 'not white'. The binary opposite of 'on' is 'not on', which is often defined as 'off'. Perhaps by the time you get into college, either the one you choose already teaches logic early on in the program or they will have when you get there.
I'm curious how someone owned a computer in 1978 and never learned to program. There was little else you could do with them back then. Even in the mid 80's most people were still copying their programs out of magazines.
When will Windows be ready for the desktop?
Python is a great language for learning general programming concepts, not syntax. The major philosophies of programming are all present in one form or another. And it's all highly readable, meaning you don't have to be a pro to understand the pros.
I'm teaching a weekly night class on Python to beginning programmers in my areas and they are picking it up very quickly.
The radical sect of Islam would either see you dead or "reverted" to Islam.
the main skill you needed to program was programming.
It's simply not true anymore. Any intelligent person with a knack for logic can program. The big issues now are in the domain of design. Much of your life isn't figuring out how to do something, it's figurign out how to make something somebody else has created (typically a framework or API) do something you want it to do. Keeping these things in mind, I'd say that programming langauge is not the issue. You can't get a sense of design until you've been deeply involved in one, either as a creator, or as somebody who has extensive experience in somebody else's design.
Therefore, I'd do this:
Make a list of some projects you'd like to get involved with.
Going down the list, look at the kind of things you'd like to do on them. Example: suppose you have something like JOE (Java Outline Editor) on your list, and you remember lots of things from a product like In-Control that you really liked that no outliner around seems to have. If you can't think of anything to do on the project, cross it off the list (Linux Kernel -- Hoo yah! Err, maybe not).
Pick a project that has lots of things you'd like to do with, and has at least one or two things that seem dirt simple enough. Look to to keep yourself invovled part time for a year (not as an official contributor -- yet), and diverse enough that if you're bored with A you can try B. Now find out more about it. Check out its developer mailing lists, find out what kind of reputation it has for design.
Examine the languages and tools you would have to learn, read some books, download the code. If things look like they make sense, dive in for a year or so.
Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
I was going to submit an "ask slashdot" post of this very same question but thought it'd be rejected. I'm glad someone else did. I've been trying to teach myself programming for the past couple of months. I've been reading as much as I can. I'm working on a project to help me learn faster. I've created an IRC bot in perl. I also made an IRC client with REALbasic. Both are still crude, but they are helping me learning certain things that would have been hard to grasp or impliment. For instance, I wanted the bot to speak like yoda. I used this problem to learn more about string manipulation. I wanted the bot to log the channel and randomly quote. So I learned about file handling. I created a custom log file and pulled lines from it randomly. A friend wanted a link on his website to link to a random file mirror. So I learned how to do that in PHP.
My main problem is that I'm having trouble concentrating on one language, but I can see a big improvement. I may not be learning as fast as I'd like but I am learning.
I wouldn't invest in something like VB.net or Delphi or REALbasic Pro as a start. There are a ton of languages and even IDE's that are free out there. NetBeans is Java IDE that looks nice, though I haven't really tried Java. Some may disagree with me on that. I don't like the IDE experience much though. REALbasic for Linux Standard edition is free and it can give you results quickly. You'll want to learn more if you try it and write a program in a few minutes with it. I know the Linux community probably doesn't like BASIC, but that software could make developing on Linux easy for a lot more programmers. I liked it better than Visual Basic which I also tried. It seemed like a much better product, but I'm speaking from a programming n00b perspective.
Thanks for posting this question. I'll really enjoy reading everyone's take on programming for a beginner.
Beer! It's what's for breakfast!
Common Lisp is a native-compiled language, but it gives you more interesting control than C. As far as the basics go, the expressiveness of both languages is similar, but Lisp has such wonderful things as an easily accessible built-in disassembler, explicit control of the stack with things like unwind-protect, and syntactic abstraction through macros (which are nothing like C macros) which allows you to experiment with little mini-DSLs. It does all this while remaining fairly simple and consistent.
Why? Because as I've seen first hand time and time again, it's very difficult for people who start out with structured programming to really "get" OOP. So go grab a beginner's book on Java, C#, or even Python. Another suggestion would be to pursue projects that you are interested in. If you like video games, get a guide to videogame programming, or find any of the many scriptable games on the net (unreal, Terrarium (c# .net)). If you are into media player type apps, find an open source one and start hacking it. Or, if you want to start making useful applications for yourself, try creating some sort of simple program to catalogue your books, movies, music etc...
Honestly, why seek a profession where there is no future whatsoever? Or are you independently wealthy and just need something to fill your time?
As the parent of this post said Pacal is a great language, especially for beginners, but it isn't seen outside the classroom (because it was designed as a learning language, not for commercial use), but Ada was based on Pascal. I have not personally used it, but it appears very similar to Pascal, and because of this fact I think it would be good. It is a very structured language that forces you to use good style and learn good programming habits, whether you want to or not. This is very important for someone learning how to program. I've had people that have skipped this step and most of the time it takes me minutes to make heads or tails of code that should be simple to understand, also this code can usually be written much more simply, and this would be obvious to them if they used better design and coding techniques.
"Curiouser and Curiouser" - Alice
Just curious, I understand that "doing it for the money" is a generally bad idea in any field (I learned that one the hard way...) but I see a recurring theme on /. that IT/IS jobs are hard to find/crappy/being outsourced/unfulfilling. Maybe it's just griping, but I am curious - does the community generally think the industry for design-savvy programmers (or programming-savvy software designers) sucks? Besides CS for the sake of science, isn't it just a damn cool area to work in?
I'm a CPA in my day job, so it doesn't take much to be 'cool' to me, but hey...
A good way to go is to start with a nice, high level language and then learn C. For a high level language, I would recommend Python. It has a simple syntax, good introductory guides, and you can run it interactively to try things out instead of trying to track down errors from a compiler. You should become familiar with loops, branching (if/then/else, etc) and recursion (programs which call themselves on a subset of the problem. It is often hard to find good examples of what to program when you are starting out. Once you write "hello world", then what do you do ? I would like to offer a few suggestions here:
- write a program which iterates f(x) = a*x*(1-x) where a and x are floating point numbers. The input to the program should be a value of a between 0 and 4, and then you should be able to enter different values of x between 0 and 1. The program will then replace x by a*x*(1-x) in each iteration. Have it run for 100 or 1000 iterations, then output the next 20 or 30 values of x. There is something interesting to discover.
- write a program which sorts the elements of an array. Just fill the array with floating point numbers. You should try to implement bubble sort, shell sort, insertion sort, merge sort, and quick sort. Make sure you understand why bubble sort is bad.
There are plenty of other examples I could list, but the above two should be good enough to get you started. Once you have some experience in a high level language, you should start learning C. There are plenty of introductory books to help you along. A good test for whether or not a book is useful is that it should cover writing linked lists and binary trees from scratch using pointers. The purpose of learning C is to understand the fundamental data structures and how they are actually implemented. An old computer science textbook might be the best reference for you. You should write both a linked list and a binary tree from scratch. Contrary to what all the introductory books will say it's not difficult - it is a standard introductory exercise for computer science students. Start with floating point numbers, then modify your code to point to arbitrary data objects.
In Soviet America the banks rob you!
Its free with MSDOS
The editor is simple without being hostile like vi (pukes up)
An old version will actualy compile, the last one did not, not that it makes much odds
Has on-line help for its small set of features, loads of sites try google's groups for a list
More important it avoids GUI, which is what a newbie should do!
Failing that try FreePascal (FPC) runs on nix & windows, Pascal is stupid easy to learn just as useful as C (but with less ()**/==!=&), you can start with CLI progs and work up to a GUI
Or real old school Fortran try phortran, an Eclipse with GNU fortran stuck on Nice IDE Nice easy lingo, don't try to write any text stuff with it!
I realize this may not be an option in your situation, but if it's at all practical consider going back to college. At Georgia Tech (the only institution I'm fit to speak about from experience) they don't even teach you a language the first semester, because -- at least this is what I was told when I attended a brief talk about the differences between available intro courses -- they want people to learn the principles of programming, not a certain implementation.
:).
I wasn't particularly concerned about this, having already had quite a bit of experience with procedural, OO, and functional languages, and took the "experimental" Scheme version of the class instead so I could have the benefits of an interpreter to check my work. But if that's the type of thing you're looking for, it seems like a great option, if a little expensive.
Personally, after toying around with an old Tandy that booted into a BASIC interpreter for a few months, I started scripting in the extension languages of a couple applications I was interested in. These weren't fully-featured, which helped me I think because I could grasp common programming concepts with a tiny language that might have been more difficult with the complexities of something like C++ (or even one of the P* languages). From there it was natural to move into actual programming, and I don't think I'd have wanted to learn the other way. I'm a bit odd, though, so I acknowledge it might be easier for someone else to learn differently
Game... blouses.
Choose the most hard, unforgiving language possible, as that will discourage bad habits. I reccomend brainfuck. If you can learn to program with that, you can program with anything.
There are 11 types of people, those who know unary and those who don't.
meh, I'd suggest throwing PHP and MySQL in there somewhere, just because theey're super easy to use, and PHP is a real language
-Erasmus Descarte
try this
Squeak: Learn programming with robots
Or at least, read the reader comments on amazon. Squeak is a Smalltalk implementation, which if you don't know, is a complete proramming & graphics environment designed to be easy enough for kids to learn. Check it out. And if it isn't interesting to you, then my advice is in the absence of any other specific direction, find a great book that appeals to you first, and let that decide for you what specific topic/language/environment you first learn. One of the greatest things about Smalltalk is that you can open up, inspect and change anything, including the entire environment, even as it is running.
Others have reported success with The Little Schemer. There is a Scheme language implementation in javascript (google JScheme) which lets you write Scheme programs right in your browser.
must... stay... awake...
Looks like it's a little too late for that, buddy. Thanks anyway, though.
To one of your main points, however, yes perl doesn't exactly force you to use good programming habbits, but certainly C does not abide by your "there's one way to do it" philosophy. Plus, I try not to suggest new programmers to use C right out of the box because of it's uncanny ability to allow you to shoot yourself in the foot. I am not saying that C is bad, I have done a lot of C programming and as a language I absolutely love it, but dispite it's power, speed, and ease of use it may not be a great choice for a beginner who is not in a classroom setting (I would suggest it to either someone who has a little experience or someone who has a teacher to show them when they are doing something that is incredibly stupid). It is not always easy for someone to learn to program by themself, even someone that is experienced as a user.
Perl may not be the best choice, but as I said, it sounds like it would probably be a great choice for someone in his specific shoes. He didn't sound like he wanted to change careers to become a programmer for a living, so many other languages may be quite unnecessary for him. Yes, perl doesn't exactly force you to program by the book, but it is something that he could get his feet wet with and possibly create something that could be of use to himself relatively quickly. Sorry, don't mean to rant, it just pisses me off sometimes that there are so many mods that don't understand the moderation system. I also would have modded my original post redundant if it would have read "ME TOO!!!!! PERL IS UBER L33T!!! LOLOLOL!!!", or something to that effect. I may not have added much info to the post before it, but I don't think modding it down was unnecessary.
"Low cost of entry/decent return on investment" - i like that.
i got hired by a fluke into my first programming job. knowing what the job market was like at the point it was either learn programming fast or get fired and go hungry. i chose programming.
it is not the way i would recommend learning to program.
just look at different languages, find one that is pleasing to your eye, and learn it. buy more than one book on it, by more than one publisher, read through them while you manually type each example, and learn what is going on.
once you've learned enough of that language that you can write new code and debug other's code semi-easily, and you hopefully start to ache to learn more, pick a similar language and learn it. lather, rinse, repeat until you know enough languages that you start mixing syntax of one language in with another.
that's what I'd do.
I started taking programming courses in high school... took a course in TrueBASIC (nice to learn, if rather limited). Taught myself a modicum of Java (and developed a real dislike for it - yes, yes, I know there are people out there who like it and make their livings off of it - I am not one of them). I then taught myself C++ piecemeal... and am now decent at it.
I generally suggest the BASIC varients as a beginning step - the advantage at that level is that one can read one's own code without getting one hell of a headache. Also, there are very fun things one can do with BASIC-programmable PICs... a fun way to do electronics and see what your code does [and usually how it fails]. After that (and hopefully a good grounding in programming basics), I'd reccommend going on to C++ (which is admittedly an utter mess of a language, but to quote Stephenson, "Sometimes its fun to have a tank [when a car would do the job]". I swear by the O'reilly books when it comes to dead-tree references... but one can find an astonishing amount of material on Google. I still need to get a C++ reference, and a good half of my job as a lab technician is coding in the language for custom controlling applications!
So, in short, Google is your friend, BASIC is a good beginning step and C++ can be fun (but you'd better lay in a supply of asprin first).
Why don't you make that "someday" right now? There are plenty of website design webapps that would let you make a decent site in about 5 minutes. When I first went to your site, I almost threw my monitor through the window. The ugly ass blue is ridiculous and the text is poorly formatted and gigantic. Your site has absolutely no style. If you want to see what 5 minutes and some thought can do to a website, go to my site. I know it sucks, but it completely owns yours and I bet it took me less time to make. And what the hell is "cyberterrorism"? Why do you have a "direct link" to Hi-Jack This? And do you realize that you can have links that tell your browser to save the file instead of openning it? And, HOLY GOD, THAT IMAGE OF YOU AND YOUR SO IS FUCKING HORRIBLE!!! Get a damn digital camera, take your pic and save it as a PNG or JPEG and be done with. Use 15-bit instead of 24-bit if you're worried about space. (I think it may be called 16-bit by most programs but the 16th bit is padding and has nothing to do with the image. It's also stripped our during compression, making referring to it even more ricockulous.) Even at 24-bit, a PNG wouldn't be that much larger than your current JPEG, maybe three times as big. Not an issue at all, even for the crappiest of crappy 56K dialup. It's only one pic.
BTW, I am only posting as AC to prevent being modded down as flamebait; my four-digit UID can't take the abuse in its old age. Oh, and I would link to my site but I don't feel like being flamed. Here's a different example of a quick, 5min. site: http://www.theultimatelanexperience.com/
NB I'm not saying ULX's site is crappy, just that it was quickly made. Does it show? Yours does.
Hell no.
JS is enough to make someone stop programming and never look back. You need a compiled language first so the student can begin to understand syntax. After syntax you need to understand data types and flow. Then you can begin to create a program.
Browser Javascript provides little/no guidance in any of these persuits. Nor is there a truly coherent reference on just how each of the JS engines are implemented.
Compiled, well documented languages are a good place to start. Pascal or C are good bets.
for a newbie, it's overly short and the succinctness leaves you scratching your head.
/ 0673999866/104-9332919-7759146?_encoding=UTF8
It's good for the experienced programmer but gave me ulcers when trying to learn from it as a brand new programmer. I always thought it was overrated for learning C (yes, I know who the authors are) when I was in college. The same goes for Bjarne Stroustrop's book on C++. These books are much better for someone who already knows the language reasonably well and wants insights to the language, not to learn it from scratch.
My C teacher in college had another book as a side companion that was absolutely wonderful called "Pointers on C" by Kenneth Reek. Easy to read, details not likely to leave you with a million questions, and excercises that make you think about what you need to think about.
It's one of the few C books I encountered that really dealt with pointers, all the others books including K&R simply skimmed over it, which is a joke when you consider that pointers and their various forms are probably the largest source of bugs/security problems on code level itself:
http://www.amazon.com/gp/product/customer-reviews
It's expensive but worth it if you really want to get into C programming. Half.com might have it cheaper.
My favorite is writing text editors and calculators.
Some things that are more fun to write and play with are cellular automata. Start with implementing John Conway's life, and then try changing the rules or extending it into 3-D.
Another fun one is CoreWars (http://www.corewars.org/). It requires that you write a machine emulator that executes code in a small (~10ish) instruction assembly language with maybe 4 addressing modes and the option to split your program into multiple threads. You also have to write an assembler (or run your emulator as an interpreter), and back in the day you also had to write your own program editor. It's also nice, but not critical, to have a graphical display. I haven't kept up with the current specification, but it wasn't too hard to implement the original spec, and it then gives you a simple assembler playground to mess around in, too.
An IT job can be hellish if you're not actively interested in the stuff. I have a friend who learned Java development though she wasn't actually particularly interested in it. She made good money from it, but couldn't deal with basing an entire career on it.
To pick another example, there are also lots of people who have a miserable time doing sysadmin work. They can do it just fine, it pays well, but they don't have the right personality and end up stressed out. The ideal sysadmin maintains a zen-like calm even when a critical server is crashing, approaching the problem with pleasure as an interesting little puzzle to solve. If you don't have that kind of personality, I wouldn't recommend being a sysadmin.
GCHQ Quantum Insert installed. If only our tongues were made of glass, how much more careful we would be when we speak
Anyone needing an experienced LOGO programmer?
Thanks- I hadn't done either of these in years, and since I'm in a relatively new (
Another fun one that I've never attempted simply because I don't have the graphics skillset for it, nor recent languages strong in graphics primatives, is the STTNG User Interface- the three-to-four pane touchscreen that has a title, a menu on the left, a text section, and a picture section (with the last two resizeable). That would be an excellent way to learn a new WIMP environment...
SJW: a person who perceives an injustice, and while correcting it, commits a greater injustice.
1. I never claimed to have "style". I'm autistic, and I never really understood what style is let alone how to have any.
2. I'm actually working 45 hours a week, how about you?
3. I actually like white on blue text- it's the only thing that doesn't trigger migraines for me. The site you linked to or here on slashdot is what I consider hard to look at, but ugly isn't a word that is within my understanding.
4. The Anticyberterrrorism toolkit is a collection of freeware and shareware applications that I've found usefull in battling cyberterrorism: spyware, spam, and viruses.
5. I'll take your ideas into account the next time I mess with that site.
6. The reason for the separate link to HijackThis is due to the fact that is my primary tool for phone-based long-distance spyware removal. It's usually downloaded by somebody on a dial-up line, who can't download AVG or Adaware without crashing multiple times due to crappy phone lines. Perhaps you live in a world of 100% broadband connections, but here in Oregon we simply don't, and likely never will.
SJW: a person who perceives an injustice, and while correcting it, commits a greater injustice.
In your situation, I'd suggest starting with a scripting language. Perl, Ruby, or Python probably. Perhaps AppleScript if you're a Mac person. Guile or scsh could work as well.
JavaScript in HTML is a slightly different paradigm, but might be a good choice for you.
Then start trying to write short scripts to automate things you do a lot. The choice of language isn't as important as having programs to write & using a language that makes it easy to write those sort of programs. Small scripting tasks that improve you daily work are a good way to get some instant gratification.
All languages have their disadvantages, but the majority of what you learn is applicable to most other languages. If you want to learn ABOUT programming, you'll naturally play around with different languages as time goes by. So, it doesn't really matter so much where you start. In fact, after you've written a stable of a dozen or so scripts that you regularly use, it can be educational to pick another scripting language & try to translate them all to the new language.
& while it JavaScript can be a good command-line scripting language & Ruby can be a good embedding-in-HTML scripting language, I wouldn't suggest you try starting that way. If you're just starting & want to do command-line scripts, choose Ruby over JavaScript.
Eventually, I'd suggest learning C & Scheme. Then if you're still interested, check out C++, Smalltalk, & Prolog. At some point, you'll probably just find yourself going to lists of programming languages & playing with any one you don't recognize.
Interpreted lisp or scheme have a couple of things going for them as introductory programming languages. There is no overhead: declarations, compiling, include files, paths, etc. Second, instead of having to think like a computer and write procedural code, you think like a mathematician and write functional code.
(print "Hello, World!")
Intron: the portion of DNA which expresses nothing useful.
Get yourself a Scheme interpreter or compiler and watch These Online Lectures from MIT's most famous computer science class
I might suggest buying a copy of the textbook as well. you can definitely get it used.
((lambda (x) (x x)) (lambda (x) (x x))) http://www.endpointcomputing.com a scientific approach to custom computing.
It also filters out the honest.
In my experience these filter out not the bad coders, but those who are honest, as HR will not allow your resume on if you don't meet the requirements, no matter how good you are.
The worst part for me in C is dealing with memory allocation. It is a little too close to machine code. I don't want to have to ask for more memory. Either the variable should be declared of a given size up front or the system should handle it on its own without some crazy malloc / free statements.
python or matlab seem nice enough for initial forray using an interpreted language. Close enought to C and Fortran to move on later. Go into object oriented stuff much later. And Perl is a scary nightmare of syntax.
Figure out the basics:
data types
assignment statements
if statements
for loops
while loops
nested statements
recursion
Figure out how to sketch out a procedure using psuedo code
Figure out how to sketch out a procedure using flow charts
I think you can even compile python later to a real binary (not interpreted) executable.
Recommended reading: How To Become A Hacker by ESR. I think it will give you a more holistic approach to your learning process and has a nice section that covers the need to "Learn how to program".
-- Stu
/. ID under 2,000. I feel old now.
I lovingly term a "tool junkie:" a person who can only be productive with a certain set of tools from a certain vendor. ...a "visual" programmer. You can be very productive using a visual toolset, but the same thing that makes them strong, also makes them weak - they also cover up a lot of the "nuts and bolts", making complex tasks more accessible to people that don't necessarily understand the subtleties. Same as a math "expert" that relies solely on a calculator.
I wish I'd seen this a couple days ago so I could post when it was new. Hopefully you'll still see this post.
You've got some good advice as well as some really, really bad or irrelevant advice. Quote from a post above: "You need a compiled language first so the student can begin to understand syntax." This statement is so utterly meaningless it is hilarious.
Here's some things you should know:
1. This industry is dysfunctional. Seriously. Why are so many programmers using C, a language designed over 30 years ago? Or C++ and Java which retain many of the problems with C? There are better technologies out there but people are so stuck in their ways.
2. It does matter what language you use. You will regularly hear people say otherwise. Don't believe them for a second. I don't have the time to go into all of this now, but find out for yourself. Please do not just learn C++ and Java and be stuck in that same rut your whole life. Learn C, C++, Scheme, Common Lisp, Haskell, OCaml. Not necessarily in that order. In fact, definitely not in that order. But learn each of them and learn them well, and use them to write not-utterly-trivial programs. Each of them will give you some insight in a different way. And if you learn them well I guarantee you you will wonder "Why in the world are people using C or C++ for application-level programs???"
3. Keep your eye on the big picture. Understand the issues. It doesn't really matter that much if you can sit down and bang out a good random number algorithm. If you ever need to implement such a thing you can get it out of a book easily. What does matter is if you understand how to design programs.
4. A big chunk of learning programming for a complete beginner is learning peripheral issues. Learning to use an editor well. Learning to use your compiler or interpreter. Learning to use a build system. Frankly it's appalling that things like build systems are still such an issue. But, some of these (like an editor) are unavoidable. My advice: GNU Emacs. It's definitely not perfect, but it's very good and very capable.
5. Computer science is not about computers. Computers are the tools we use. Computer science is about process. About imperative knowledge, rather than declarative knowledge. Mathematics addresses the question "What is a square root?" Computer science addresses the question "How do you find a square root?"
6. You must read books. When I first started programming (I'm self taught) I thought I could learn everything I needed to know online. Wrong! The information is simply not there. Read Structure and Interpretation of Computer Programs. You can buy it or it is free online here (OK, I guess I'm contradicting myself... it is online. But it's a real book, not just some guy's webpage).
7. Learn to discern who knows what they're talking about and who doesn't (see #1 above). For instance, you will often hear that languages like Scheme are not "practical" or are just plain not useful. This is completely bogus. I use Scheme. It works. Period.
8. Write a lot of code!
Seriously, there is no better motivation than laziness. What would you rather do go through 50 computers and robotically enter commands or spend a hour on a perl script and letting the script take care of the work while you take a coffee break.
...is that all of my itches are horrible, complicated ones. Like I want to run win9x on some old hardware, and write some little utilities to work around some of its problems, specifically:
A virtual serial port driver, to make a local or networked gpsd appear as a locally connected GPS device. Except that, even under NT, hardware virtualization is third-year stuff. Under 9x, it's the blackest of arcane voodoo.
Or, since changes to a network adapter's IP don't take effect until it's removed and reinserted, but the OS supports DHCP, I'd like to write a little local DHCP server that simply takes the place of the network properties box, so I can change addresses at will without wearing out my PCMCIA socket. Except that network programming is also not considered good starting material for a beginning programmer.
All the "hello world"-grade programs have already been done a million times. Go ahead, just search for "file synchronization software" and see how a large number of monkeys have solved that problem with weird interfaces, incomplete functionality, and a total inability to build off each other's successes.
So with the low-hanging fruit being picked already, there's nothing appealing as a "first programming project". And I'm not likely to apply myself to an exercise just for its own sake -- it has to be really needed for me to even bother trying to program it. Does this make sense?
Otter has it right. I'll add
1) that your INTEREST is the only thing that matters; the most valuable thing in the entire universe is a problem which you think you can solve, but you just gotta make sure. It can be hard to find, that combination of "think I can do it" and "it might even be useful / cool / satisfying / fun."
2) You referenced 1978: I'll say that BASIC is a very nice language to start with. (Microsoft's QBasic was my introduction; if you can find me at mugwumpus.com I'll make sure you get a copy.) Because: IT'S POSSIBLE TO KNOW EVERY DAMN THING THERE IS TO KNOW ABOUT IT. This is not so true (to my understanding) for "modern" languages. There's a level of certainty, control, power and confidence conferred by that POSSIBILITY that's hard to shake.
My advice to the OP: get BlueJ and 'Thinking in Java' as the parent mentioned, also its good to find some task you need doing that doesn't already have a program that does it, then do the program yourself.
Since you asked about programming principles, here they are. There are only two, and they are as easy to state as they are hard to master:
1) Make the CPU do what you want.
AND
2) Make what you did understandable to other human beings.
That's it. Programming is just the act of configuring computer hardware to do what you want. That's the first goal. Secondly, you want to be able to make what you did understandable to other people, so that they can make changes or improvements as required.
CPUs are very simple hardware devices, so to get them to do complex things takes a lot of steps. Typically, a chip can read a few bytes from memory, add or subtract the values in memory addresses, send electrical impulses to disk drives or screens or other devices, which are often also presented as "memory addresses" to the CPU.
Since chips are very primitive, that's a lot of typing, and it's possible to make mistakes when you enter the same codes over and over. Certain patterns of commands get repeated a lot (for example, reading a line of text from the keyboard is used a *LOT*).
One of the earliest breakthroughs in computing was the realization that the computer itself could act as a translator: if it read a command in the programming language that meant "read a line of text from the keyboard, and store it ", the translator program would convert that command into the kinds of instructions the CPU could do: checking to see if a memory address is nonzero (ie. a key has been pressed), writing the right symbol to the section of memory that corresponds to the right spot on the screen, checking for the end of line, storing the results in memory for later, and so on.
There are different languages, of course: each one expresses basic concepts in it's own way, and each one tries to give the programmer a useful set of shorthand to get tasks done. Each shorthand has it's own way of thinking about how to encode programming tasks. In the end, just about any programming language can be used to do the job of any other programming language, (they all translate the same basic concepts back to the chip instructions) so the choice is really what works for the task you have at hand, and how best to express the issues you have to think about.
Some of the earliest programming languages just made programs that weren't tied to specific memory addresses; most assembly languages did this. Once they were created, it was easier to write other computer languages than before, and use those languages to write other languages, and so forth.
If you want to know how a CPU really works, learn the corresponding assembly language for the CPU chip in your computer. C is a language tied closely to assembly language; the programmer can still directly access specific memory locations, and request specific numbers of byte storage in specific places.
Memory layout is handled automatically, and a translator program called a "compiler" translates C code into the CPU instructions for your chip. C, like most modern languages, but unlike assembly language, is not tied to any specific chip; the language specifies operations like "access this memory location", "read from a file", "get a line of text", and so forth. People turn to C when they need a fast language that requires direct access to specific memory addresses, such as device drivers or operating systems.
Early computer programming languages focused on the steps required to do a job, the procedure involved. These languages are called proceedural languages. They typically are composed of functions, labeled verbs which describe what steps are being done to what sort of data, and the data structures which were passed back and forth between them were managed by the programmer. C, BASIC, FORTRAN, and COBOL are procedural languages.
In the late 1980s and 1990s, people suddenly decided that nouns (the data structures) were more important to focus on than the verbs (functions), and hence the object oriented programming movement was st
Python is not obligatory object oriented; you can use a functional programming style as well. Or even combine the two, whick makes a very powerfull combination!
Try Kids Programming Language (KPL). http://www.kidsprogramminglanguage.com/ A free download of a simplified version of C#. It requires .NET 1.1 but it does allow you to create some wonder applications with outrageously simple syntax.
Examples included with the download include simple games and mathmatical exercises, as well as program logic examples such as sorting.
If you use KPL you'll begin the programming journey in a very scalable way, because all KPL programs can be converted into their equivalent C# or VB.NET equivalents; so when you are ready you can jump into full on .NET programming!
Try out Kid's Programming Language (KPL). http://www.kidsprogramminglanguage.com/ It's a language based on .NET 1.1 and is simple enough for kids to create wonderfully rich graphical and console based applications. It's all free to download and once installed there are plenty of example programs and a full set of learning programs to get you started.
All KPL programs can be converted into C# or VB.NET allowing you to scale up to these languages once you've mastered the basic programming skills.
a Silicon Valley office, and a six-figure income
I think this is the problem. People I know who program for a living used to talk about going out west. I knowing one who did and regrets it (aparently 6 figures is about what a broom closet gores for), from the outside it just does not look worth it.
Well I've wrestled with reality for thirty five years doctor, and I'm happy to say I finally won out over it.
I would seriously recommend Python http://www.python.org/ to someone who hasn't had any programming experience. Although I've only picked up this language recently and after I already had knowledge of several other languages. It scales nicely, and it is very similar in many aspects to other languages. The way it works on whitespace helps you to learn how to tab and format code in other languages. The great thing is that the distribution also includes a tutorial. I know you are looking for another answer, but the only way to learn how to program is to look at a language, read a book/tutorial and play around with it. Python is a great language to do this with. Take my advice if you are doing this in your spare time: if you aren't having fun don't do it. Coding isn't for everyone, but if you enjoy picking through your own code and finally finding your mistakes, or the pleasure of seeing something you had in your head become a reality, then give it a shot. Remember that everyone makes stupid mistakes coding and just have fun with it.
Judges and senates have been bought for gold; Esteem and love were never to be sold.
As a CS major student now, the one best advice I can give you is to start with a data structure class. A good data structure class will probably teach you the bare-bones of a language, then somethings about how computers work on the inside, then they'll teach you about how to organize data, how data works, etc. I really wished I had taken a data structure course before I took C++, Java and Assembly. Languages might change over time but data strucutres will not. In programming, it's not the language itself that's the hard part (although some languages are harder to grasp than other. *cough* *assembly* *cough*), the hardest/important part of programming is trying to figure out how to get something done.
please... let me sleep... a little more... yay, no longer annonmyous coward.
Without much effort on your part you could grab DrScheme (its packaged as part of some Linux distros, otherwise go to here. That's your graphical coding environment. It runs on Windows, Mac and Linux.
:-) more pragmatic language to learn to deploy applications in.
For material to accompany it, "How to Design Programs" is a good book available online in its entirety here.
If you're more hardcore, then you might prefer "The Structure and Interpretation of Computer Programs", another book online here. SICP also has about 20 hour-long downloadable lecture videos, but be prepared for 70/80s fashions in the audience...
I think HTDP is a great way to learn to program in general, and DrScheme is a good environment in which to learn.
Downsides: scheme isn't widely used outside of education. It is also not obviously closely related to mainstream languages (C++/Java/C#/Perl/Python/Ruby) in appearance.
Upsides: scheme is fairly easy to learn, so you can focus on picking up concepts and discovering if you enjoy programming. Scheme is a also a very close relative to lisp, which is a (slightly
What do you find complex that hold you back from programming? That is the first question you have to answer alone. Fear? Lack of literature or time? No need for anything of that.
You have Win98? Even DOS is usefull. Install Quickbasic and start. You will learn what is interpreter and how do find problems is your program flow. Quick basic command set is enought to learn you on basic program flow. That wold really relax you and help on basics. After that
you can install some visual Basic (there are many beside Microsoft, some are free) and your programs with a minor modifications might be transfered from Quick basic. Thats called compatibility. Now, if you like problems you can start directly with its code, using onscreen help, or you can use its visual interface to hide majority of complexity in writing windows based programs. And that is all. My 13 years old son learned Basic programming that way in school. You should too. Visual learning of HTML is even easier and after publishing it all can see your work. Good luck.