Monthly Archives: May 2011

Search your Gmail account using text-based queries

I’m a huge fan of Gmail for its speed, simplicity and power. Rather than try to do everything graphically, Gmail allows you to construct your own text-based searches. For me, an aficionado of Emacs, that’s a truly wonderful thing. For … Continue reading

Posted in Uncategorized | Tagged , , , | Leave a comment

Initializing fields in Java classes

It is often possible to initialize class fields and instance fields as they are declared. For example, This works well when there is a simple assignment. However, for more complicated assignments we may need to use an initialization block. A … Continue reading

Posted in Uncategorized | Tagged , , | 1 Comment

How to change the time zone for Google Analytics

This is a quick visual guide for anyone who wants to change the time zone for a site profile in Google Analytics. It should be quite straightforward (and is!) but the “edit” link isn’t that obvious at first. Step 1: … Continue reading

Posted in Uncategorized | Tagged , | Leave a comment

Using Greenfoot to teach Java programming in the classroom

I’ve been doing a lot of Java programming recently, trying to update my programming skills and learn a new object oriented programming language. Most of my other programming experience has been using PHP 5 and VB .NET, and although VB … Continue reading

Posted in Uncategorized | Tagged , , | 1 Comment

How to remove Greenfoot (installed as a .deb package)

I installed Greenfoot on my Ubuntu linux computer using a .deb package, but then decided to remove it and try running the JAR file instead just to compare the two methods. If like me you need to uninstall a .deb … Continue reading

Posted in Uncategorized | Tagged , , | Leave a comment

Superclass, subclass, static fields and methods (Student example)

Programming task: write a console program in Java to demonstrate the use of class fields and methods declared with the static keyword. Use a class field to keep track of an auto-incrementing ID that can be assigned to every instantiated … Continue reading

Posted in Uncategorized | Tagged , , , , | Leave a comment

More on static fields in Java programming (politician example)

Following my recent article on instance variables and class variables, I thought it would be good to demonstrate the usefulness of the static keyword to define static class variables (also known as static fields). Please note that in Java programming … Continue reading

Posted in Uncategorized | Tagged , , , | Leave a comment

Declarative and imperative programming compared

Declarative programming is a programming paradigm (or “discipline”) that expresses the formal logic of a computation and not the control flow. Put another way, Declarative programming is when you write your code in such a way that it describes what … Continue reading

Posted in Uncategorized | Tagged , , , | 3 Comments

Using qualified names to access shadowed fields

This example code shows how we can use qualified names to access shadowed fields when programming in Java. Class declaration with shadowed fields:

Posted in Uncategorized | Tagged , , , , | Leave a comment

Organising a primary school visit (for PGCE Secondary ICT @ KCL)

This September I will begin a PGCE course at King’s College London (KCL) to study Secondary ICT education. One requirement of the course is that students should arrange a four-day visit to a primary school to observe lessons at Key … Continue reading

Posted in Uncategorized | Tagged , , , | 2 Comments