Tuesday 6 August 2013

Double Dragon Style Java

I haven't had much time lately, which I'm using as my excuse for not posting recently. I've been busy with some different things, a lot of which is related to university. I am actually still very busy, so I will keep this short.

There are a great many debates surrounding the best way to learn programming, and many a heated discussion has centred on the value of learning 'real programming' versus learning logic and theory in programming courses. Everyone seems to have their own opinion, and it is crazy factional. Yay, factions! Anyway, I am a proponent of the Double Dragon Style of programming education. I believe that in order to be a true master you will need to master both of the Dragons, and understand how they work together. You must move between the dragons, benefitting from the strengths of each as you progress. In this instance Greenfoot represents the logic oriented dragon, while Eclipse is the 'real programming' dragon. Both of these tools have tutorials that cover a variety of different skills and skill levels, and both of these tools are so straight forward that I would even go so far as to suggest that even early high school (maybe even primary) students shouldn't have any difficulty with the projects included in the early tutorials. Additionally both of these tools are available for OSX, Windows and the major Linux distributions. They also both use Java, which I think is a good thing. Java is a good place to start learning to program. There are a number of reasons why and why not, but the short versions tend to sound a lot like, "Java is universal", "It's object-oriented", "It's easy" and "The more recent versions handle their own garbage collection (or so I have heard)". It may not end up being the most useful language you ever learn, but it is a fantastic language to get started on.

Our first Dragon will be Greenfoot is a good place to start, as the early tutorials will cover programming logic in a simple way while still making you feel like you are actually making things, and those things that you will be making will be games. There are a lot of fun things you can make very quickly with Greenfoot. You won't be doing a lot of 'real programming', but you will be. Programming isn't that difficult, it just seems overwhelming, and Greenfoot does a good job of circumventing some of the early boogeymen. Look, the term 'real programming' is one that I have heard a few people throw around when hating on and around Greenfoot, but in my experience it is mostly thrown around by people with a more traditional programming educational experience. It is easy to be negative about logic oriented learning, because it is often overlooked, well at least it seems to be. Either way, logic is incredibly important to programming, and figuring out a way to learn it is just as important. There is a lot of surprising stupid code out there in the bowls of the interwebs (and the all of the app stores), and it is probably best if you don't contribute to the rubbish heap.

Where Greenfoot turns the process around and focuses on logic first and 'real programming' later, Eclipse uses the more traditional approach of replicating specific tasks that is common in university courses and DIY books like Sams Teach Yourself Java 6 5th Ed. This is the way that most people learn to 'program', which is to say that it will teach you how to write code and will show the solutions to specific problems. The problem with this method is that it produces a lot of terrible coders. It is great for learning good form, but it isn't good for learning to write clever code. While clever code is important, good form is also important, and for many of the projects on which you might find yourself working closing off scanners and memory management could well be far more important to you, and the people who use your apps on their phones and tablets. The other major benefit of learning programming like this is that you will learn some of the best ways of coding common functions and solving common problems, so that you don't spend the majority of your time reinventing the wheel.

I have checked through (read as 'completed') quite a few of the tutorials, and tried to check that there aren't any major oversights. That said I can't swear that learning this way is truly effective, or that none of the important fundamentals are overlooked, because I didn't learn this way. I started with other programming languages and tools, and learned logic mostly through games, but this back and forth between the two styles makes the most sense to me. In the end these are two of probably thousands of tools out there that could be used in the Double Dragon Style, and they may not be the best, but I will vouch for these two, because I am certain that they are two of the best. That and if you come to me for help, I will probably know what you are talking about and where you are stuck.

You will need to make sure that you have the latest version of Java (7u25 at the time of writing, though I read somewhere that 8 is on the horizon) and install the JDK (Java Development Kit) to use either of these tools. If you have any questions, comments or difficulties, please comment below or e-mail me at jacob dot c dot w dot henwood at gmail dot com. I'd rather you commented though, just in case I end up fielding the same questions.

Next time on United by Glue: Three Unity tutorials that anyone could finish.

No comments :