Learn Programming in Java


This is a self-paced short course designed to get eager, self-motivated people started in the skill of programming. Nobody learns programming in one or two weeks or even a whole semester, it takes time and practice -- "motivation and miles" -- but we can give you a roadmap. Once you more or less understand the basic structure of things, you can look at existing programs and figure out how they work -- and by extension and a lot of copying, you can write your own code to do similar things.
 

tl;dr = Stop Here

Programming a computer to do what you want it to do -- rather than one of a small number of things somebody else decided to let you tell it to do -- is a text-based activity. You write programs using a keyboard, and you will spend a lot of time reading -- mostly your own code, but while you are learning, you also read other people's code and the detailed instructions for how this programming language works, or how to make that library method do what you want it to do -- and if you get really good at it, you will also spend a lot of time reading about (learning) the problem domain you are writing programs for.

If you don't like reading and writing, if "tl;dr" (= "too long, didn't read") is a phrase you use often, then you might consider a different profession, perhaps ballet or baseball or carpentry, where watching videos (plus a lot of practice) can get you all you need to know.

But computers run the world. If you want to take control of your life, you need to know how computers work, in particular how they are programmed. We can get you that far, if you are willing to -- just for this course -- spend the time reading. You can do it, if you want to. We are here to help you do what you want to do (with computers), but you must do the work yourself. It's hard work, but that's why the pay is good. As sci-fi novelist Heinlein told us, "There Ain't No Such Thing As A Free Lunch." If you believe there is (or should be) easy money, you need to find it some other place. Churchill offered his people "Blood, sweat, toil and tears." Programming isn't quite that bad, but expect to earn your keep. It's actually fun after you've done it a while, you get a feeling of accomplishment, of creativity: you did something new! Other kinds of creativity like writing novels or songs and painting also give some of that satisfaction if you work at doing it well, but only computer programming can actually change the world.

The most important requirement to be good at this is attention to detail. I call it "Observant, Careful, and Determined" 

It helps a lot if you enjoy knowing how things work, because programming is first of all knowing in great detail how your program should work, and then writing it down, first in English (or whatever language you prefer to think in), then in Java (or whatever language the computer thinks in). If you don't care how things work, then you will not enjoy knowing how things work, and if you don't know how they work, how can you tell somebody else -- let alone a computer -- how they should work? If that's how it is with you, you might consider a more passive profession, where other people make things work, and you only experience what they did. That's not programming. In any case it's your choice, and we are here to help you, if you want to do this. Try it, you might like it. And if not, "No harm, no foul." We want you to succeed at something you like.

I had a lot more introductory remarks, but they filled up my page with this massive gray sea of text, so I cut them out. I still rather like what I said, and you can read them here ("tl;dr" is OK, it won't cost you much, but it does help you know if this is what you want to do for the rest of your life).
 

Design in English

The hardest part of computer programming is understanding what you want the program to do. If you cannot explain to somebody (to yourself first, then to other people) in the language you think in -- English or Spanish or whatever language you learned first -- if you can't describe in a language you understand what the computer should do, how will you ever describe the same thing in a foreign language like Java or C? Write it down. This is why we started in English. Every program in this course of study begins in English. Even the esoteric ways to solve programming problems like Binary Search (which we used and will use again in the Guessing Game) always start out in English. If you think in another language, re-think it in that language. Understanding is the key. The value you bring to the table -- what you will get paid for, if you get paid at all -- is the ability to understand how something works, and then to say the same thing (to translate it) in a precise programming language. Nobody does it any other way and succeeds, not even "deep" neural nets (sometimes erroneously called "AI").

OK, let's get started. Turn the page.

Next: Programming Environment

<<Previous | ToC | Next >>

Revised: 2021 August 27