Mop up
[Part 12]


So, here we are at the end of the course! This is a bit of a 'mopping up' part, just to briefly introduce some of the core Java elements we didn't have time for, and to give you some hints for continuing your coding in the future.



So, what haven't we covered, and where can you go now? The short answer on the former is an almost infinite amount. The question is then 'where now?' Below are some of the areas worth investigating in terms of the things we've missed and the direction things are travelling.

The computing field moves so fast it is impossible to stay on top of all the new technologies, but even if you don't currently want to engage with any of the areas below, it is worth setting aside some regular time each term/season to pick up a book on a technology you are completely new to.


Further Java:

Java is a life-time's occupation in itself, but here's some specific areas we haven't covered that might be of interest.


It is worth spending some time learning Swing. We haven't dealt with Swing so far, mainly because you can treat it much like AWT in some cases, but for anything complex it has a slightly different model for working. Nevertheless, it is the go-to GUI solution for most Java of any sophistication. Good starting points are:
The Swing Tutorial
Swing with GridBag
For very sophisticated GUIs, you may also want JavaFX.


We've pulled together a vast array of other bits and pieces on the extra materials page, but particuarly worth a look in terms of core Java are the materials on network programming.


A little more advanced, but very useful for projects that need flexibility, is reflection: the use of Java to examine and alter class internals on the fly. For example, it is used to make plugin architectures that load classes from jar files. A good starting point is:
The Reflection Trail
You may also be interested in how to run JavaScript inside Java (to allow users to script) and how to compile and run Java from inside Java.


For effective 2D drawing and image processing, it is worth getting your head around the 2D Graphics API. A good starting point is: The 2D Graphics Trail


In addition, there are a few features of the language that were added in Java 1.5, 7, and 8 which we haven't covered. For these, see:

Java 1.5 ("Java Language Features")
Java 7 ("Java Programming Language")
Java 8 ("What's New in JDK 8")

Other coder culture:

It's always worth staying on top of what's going on more generally in IT/Tech culture. A couple of popular news sites which have RSS feeds and/or send email summaries are Slashdot and Hacker News. More general British-centred IT stuff can be found on The Register and the august Computer Weekly.

At the moment, the four big themes in computing culture are:

  1. getting more children into coding
    (see also Scratch; Coding Club; Lua for Minecraft)
  2. redressing the gender balance in coding
    (which has slipped considerably);
  3. hackathons / open source
    (see also LeedsHackSpace; BioHacking).
  4. Privacy, data, and surveillance
    (see also, the ever excellent New Aesthetic blog; Bruce Schneier; Cryptome / Wikileaks).

Useful:

Other stuff we haven't covered, but which might be useful, includes:

Cloning objects (copying complex objects).
Swing (better GUIs).
Java Native Interface (docs) (how to connect to non-java code)
RXTX (how to connect to hardware using serial ports, e.g. scientific equipment)
Commonly used data formats: HTML, XML, and JSON (see the useful links page and w3schools for tutorials)

 

We'll provide you some info on advanced topics (databases, XML, ArcGIS) at the end of the course. Nevertheless, even with these materials included, the course is very much aimed at the core language, with a bit of interest to social and ecological modellers. If you did a full computer science course, the main extra stuff you'd get would be on structuring data and sorting/searching data. You can find books on these kinds of elements on our Recommended Texts page.

Good to have heard of:

Other stuff that it might be useful to be aware of for the future, includes:

Java2D (better image and drawing manipulation).
JavaFX (better GUIs).
Java Webstart (a way of getting your programs to run over the web)
JavaBeans (a way of allowing other people to develop programs)
Servlets (programs to produce web pages)
JavaServer Pages (programs to embed data in webpages)


Other languages and technologies:

We've pulled together some info and links on other programming languages, plus technologies like Web-based Mapping, mobile phone development, and hardware integration on our extra technologies page. However, here's a short intro to some other languages.

 

If you've coped even vaguely ok with this so far, you'll probably find the languages to the right pretty easy to pick up. There are suggested books on the Recommended Texts page, and reading one book will probably get you up and running with these.

However, most modern programming languages won't prove difficult to pick up, now you have the basics. Most languages you hear about fall into a family called the Imperative Programming. languages (these include Fortran, C++, Objective-C, etc.), and these are all similar to Java. There is a separate family of languages, called the Functional Programming languages that have a very different style, and include languages like Prolog (for modelling logic) and LISP. Despite the differences, even these you should find not too bad, now you've spent a bit of time thinking like a computer.

Python: a much easier language than Java, with some really nice elements in it, especially for text processing (it sounds lovely! Why don't we teach that!? See: Why Java?!).

Javascript: not Java, but the basics are very similar to Java because it was based on Java to an extent. The main differences come with something called prototypes which is a bit like rewriting the class of objects as they are running (sounds like fun, hu?). If you embed the Javascript within a webpage, you'll also need to know how to refer to bits of the page using a tree-like description called the Document Object Model (DOM). A great training site for both is w3Schools.

Visual Basic.Net: very influenced by Java in terms of the underlying structure, but different keywords, and strongly embedded within Windows. Great for quick and easy applications that integrate well with Windows (though you can also write Windows 8 apps in Javascript).


Final advice:

The final thing to say is just some advice for moving forward with your coding.

Like learning any other language, the secret to practice. Try to put yourself in the position where you have to build small bits of code to help with projects. A good start, if you don't have a core project to do is to write some code for little tools you can later adapt, for example:

  1. Code for running through directories, reading all the text files and doing some search and replace.
  2. Code for reading in image files and converting them to text data files.
  3. Code for a basic Applet that shows research results (see the info above, on Applets)

Giving yourself little tasks to do will get you to a high level of coding confidence quicker than anything else.

The second thing to say is Read. There's no subsitute, in terms of become a good programmer, for seeing the code produced by good programmers, and the easiest way to do this it to read textbooks. It's also true that computing is a field that moves very fast -- try to read one good computing text in an area you don't know, every three months or so. You might also like to sign up for email alerts / RSS feeds from some of the blogs and websites listed on the useful links page.

In the meantime, here's a couple of links that you might find helpful:

How to be a programmer
New 2 Java

 

Other than that, good luck, stay in touch, and if there is anything we can do to help, don't hesitate to get in contact!


Quiz:
Finally, fix this code to finish!

public class HelloWorld _____
   public static void main (String args[]) {
      System.out.println("Hello World!");
   }
}

 

  1. ;
  2. ^
  3. {
  4. )
  5. ;^)

> Hello You!


Finished!