Adventures in Programming with Java: The Beginning

Update: Life has a way of getting between us and our best intentions. The person who I was working with is recently overwhelmed by obligations at work and home. Unfortunately, we are unable to proceed with our learning project at present. Maybe in the future we will try again. I’ll leave this post up because I still think it has some good information in it.

Someone I know recently got the programming itch. It began with a foray into an Excel spreadsheet application using Visual Basic for Applications.  The urge to build other things soon took grasp, and this person is now interested in diving deeper.

I don’t think I’m in any position to teach someone programming as I have too many of my own questions on the subject. It’s been said, however, that teaching something is a good way to solidify what you know and change your perspective of your own knowledge. Teaching forces you to simplify what you know. Having a simple mental model of something complex is a perspective that is difficult to attain once you’re past childhood. Teaching others is an opportunity to devise a simple model for someone else, and if we retain that simplified model ourselves, it enriches what we know about the complex nature of… whatever complex thing we’re talking about.

While we’re on the subject, I’ll digress shortly into my philosophy on teaching. As a former member of the modern education system, I have a strong opinion regarding the bastardization of teaching. It’s my opinion that learning requires more activity on the part of the student than on the teacher. It sounds obvious, and you might be nodding your head in agreement, but our modern education system is completely opposite. In that context, teaching is a synonym for lecturing or instructing,  and that simply isn’t effective.

Teaching, in my opinion, is mostly passive, consisting of provocation and subtle influence that causes a student to think and discover a path themselves instead of being shown the path and told how to walk down it. A teacher should initiate student learning, respond to questions when prompted by students, and guide students where necessary (as opposed to forcibly via lecture and instruction). For the most part, students should learn in a self-directed manner.  A student is not a tourist on a bus following a pamphlet of attractions. They are a backpacker lost in the woods, guided by the Sun and the stars, and when requiring assistance, consult the journal of the last one who was lost.

With all that in mind, I offered this aspiring programmer my Java textbook from college, and my time to answer questions and clarify where needed. Throughout this endeavor, I thought it would be interesting to post some of the questions, answers and discussions we have. I’m hoping to start posting more regularly in general, you know… to appease my imaginary readers.

Why Java?

For the reasons listed here:

  • It’s accessible.
  • It uses a common (thus transferable), readable,  C-style syntax.
  • It has lots of available documentation.
  • Its use spans a variety of application types (desktop, mobile, web).
  • It doesn’t require learning other languages (don’t need HTML, CSS, etc.).
  • It has a static type system (Yes, I know static typing is so 1990, but I believe it’s better in the realm of code comprehension than dynamically typed languages).
  • This particular person likes Android phones, so an end goal is to perhaps build Android apps.

If you’re in the same boat about to embark on a journey into programming, here are some of the reasons we didn’t select other languages. Maybe it can help you decide. Remember, it depends on what your goal is. Some of the reasons we didn’t pick a language could be the reason you would pick that language. Other languages we considered are  C++, JavaScript, Python, and Ruby.

I suggested learning C++ because it exposes more of the lower level mechanics that are good for building a mental model of how programs run and how memory works. Additionally, understanding pointers is important and an interesting mental exercise. We ultimately decided against C++ because it doesn’t offer immediate feedback. As a beginner in C++ you’re likely to spend most of the time writing console applications. With Java, you can quickly jump into Swing/AWT/JavaFX libraries without much fuss.

We skipped JavasScript, because you’re either logging to the console which has the feedback issue like C++, or you have to learn HTML, the DOM, and CSS. We also skipped JavaScript because it’s a terrible, awful, soul-sucking, disaster of a language, and I would only suggest learning it if you absolutely have to, i.e., you want to work primarily with the web (which this person is not interested in doing).

Python and Ruby are popular, but I don’t know them well enough to answer questions. Also, if I’m not mistaken they use a weak type system, which I’m not opposed to, but I prefer strongly typed languages; especially for learning (I’ll probably write a post on my type system bias at some point). Furthermore, while there are applications for Python and Ruby outside of web development, the learning evolution for those languages seems to inevitably lead to web development. I don’t want to overwhelm this person with frameworks, HTML and CSS. This should be fun like a water slide, not like a tidal wave.



Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s