Not Quite Coding At The Speed Of Thought

March 13th, 2009


img_20731Last Saturday, the programmers from Screw The Nut (Andrew, Deji, Ian, Phil and I) took part in the first Realtime Worlds student programming competition. It was the first time any of us had attempted something like this, so although we had some vague plans before the day began, we didn’t really know what to expect.

The basic format of the competition was that around seven teams from various universities were each given one computer between the five members. After a basic practice question to check we could correctly read the output and would be able to submit our answers, we were given three hours to solve three further problems. Finally, at the end of the day we were tasked with writing AI for a spaceship to complete an Asteroids-like game, which the competed against the other teams.

For each of the three questions our team managed to agree upon a solution and write out the psuedocode required to implement it. What really took time was actually writing out and testing our solutions. Being so pressed for time really emphasises the amount of overhead involved in writing in C++. Creating functions involves either writing prototypes for them or ensuring they’re all written in order, and finding one again means using Ctrl-F or searching through the file. The obvious way to make things neater would normally be to create multiple files, but that becomes almost unthinkable when you consider the overhead involved in writing headers. Then you come to testing the project – the compile time really adds up. Don’t get me wrong, all the teams were working in the same conditions (we were also given the option of using C# – I’m not sure if this would have improved the situation or not), but at any rate, at the end of the three hours we only had one solution to submit.

img_20751

The second section of the competition (creating the game AI) went better. Knowing we would be short of time we focused on creating the most simple working solution we could – staying in one position, rating asteroids based on several criteria and shooting the highest rated one. As it turns out, most of the criteria we calculated were almost useless, or even hindered the spaceship – far more important than anything else was shooting the closest asteroid to the player. Our ship did very well in round one, but unfortunately we hadn’t considered what would happen at the end of the level when no asteroids remained, and we crashed out of the competition leaving two ships to continue through the next rounds.

At the end of the day things were looking a little bleak – we had had fun but given all the teams had successfully submitted more solutions than us and we knew ours wasn’t perfect, so we were hugely surprised to find we came in 3rd place, winning Amazon vouchers. Hopefully the competition will take place again next year as we now have a far better understanding of how we’d take part.

Things we learned:

  • Don’t enforce time limits for each problem unless things aren’t working – one working solution is better than several non-working solutions.
  • A quick solution which works in most cases is better than a perfect lengthy solution which will take a long time to implement.
  • Don’t try to solve problems at the computer – just type up pseudocode.
  • There are tasks one person can do while the rest of the team is working on the first solution, for example reading in the input into data structures.
  • Global data works just fine.
  • Working with people you know well is far easier than getting a group together – no matter how brilliant they are.

Lifesaving Organisation Tips For Students

October 4th, 2008


So it’s the start of term again, so naturally I’ve been busy: first by helping new students aroung the university, then with my own classes. However thanks to some prior planning, I’m managing to keep on top of everything. So here are my tips for staying organised at university:

Have a plan. Decide how you are going to organise things, what you want to take part in, and how much time you’re willing to spend on each activity. Have a system for taking notes and storing your work. Sort out how you will manage everything as early as you can, and stick to it.
 
Make things as simple as possible. Whatever you’re doing to stay on top of your notes, appointments and work, keep it simple. If it’s too difficult or complicated you’ll give up or get behind after a few weeks or be spending time you could use for something more rewarding.
 
Make the most of software. Get hold of an organiser like Thunderbird or Kontact or use an online tool. Keep track of your timetable and any meetings or important dates. Use a list of to-dos to note your personal and academic deadlines.
 
Break bigger tasks into smaller bites. When you’re given a deadline for a piece of coursework it can be hard to know where to start, and it can seem like you have ages to work on it. Split the task up into sections and you’ll get a better idea of what needs to be done. Then set your own regular deadlines and milestones to keep your work on track.
 
Recognise when something has gone wrong. When I get behind, my natural reaction is to stop going to classes so people won’t see that I haven’t done enough work. Resisting that urge and immediately taking action is what has made the difference between catching up and failing a module.
 
Keep your notes and files sorted. Whether you take a load of notes on your laptop or a few sketches on paper, decide wht works for you and keep them in order. If your notes aren’t easy to access and understand later when you need them, they’re useless.
 
Don’t waste your time. Try to prevent yourself spending time doing nothing. If you enjoy something, make time for it in your week. Things like endlessly clicking on Stumbleupon however can take up hours of time you could spend on something else. On a related note: minimise your down time. Don’t take time clicking through sites when using RSS would be quicker. Don’t check your email every 5 minutes. Get into the habit of making your use of time more efficient, and spending more time on things you actually enjoy.

 
Hopefully these tips will help you get through university with minimal stress and panic: if you have any advice or techniques to share, drop me a comment below.

Vital Free Software For Computing Students

September 1st, 2008


With universities soon to start back, I’ve been focussing on student software a lot these past couple of weeks. First I suggested some freeware and open source software that all students will find useful. Next I looked at how Open Source software can benefit computing students and why they should try Linux. Today I’m going to suggest some Open Source software which will be particularly beneficial to computing students.

 

The Text Editor

You weren’t planning on writing code in Notepad were you? When a full featured IDE is too much for the task at hand, these text editors will give you all the features you need without too much bulk. Each of them lets you have multiple files open at once, has syntax highlighting and search and replace functions, and a whole lot more.

Kate (Linux)

gEdit (Linux)

Notepad++ (Windows)

 

The IDE

Asside from being expensive, Microsoft Visual Studio is closed source, and only runs under Windows. Whether you want something a little lighter, something tailored to your language or just something free, there’s an open source option available. Here are some great choices for a range of platforms.

Eclipse (Cross-Platform)

KDevelop (Linux)

Anjuta (Linux)

Dev-C++ (Windows)

 

The UML Editor

I’ve looked before at the importance of planning. UML modelling tools make it easy to put together a visual representation of a solution, and to modify it as you work.

Gaphor (Multi Platform)

ArgoUML (Multi Platform)

Umbrello (Linux)

StarUML (Windows

 

The Mind Mapper

Some times you need do some planning without the constraints of something formal like UML. When you just need to get ideas onto paper (or screen as the case may be), mind mapping can be ideal. These applications help you make maps quickly and easily, and unlike writing them in a notepad, they’re easy to edit later on.

Freemind (Multi Plaform)

Whilst not open source, this online tool can also be useful:

Bubbl.us (Online)

 

The Source Manager

Whether you’re working alone or as part of a group, losing all of your work is never fun. Source code repositories make it easy to store your code in a seperate location, access it from multiple computers, and revert to older versions when something goes wrong. Several of the IDEs I listed above have support for repositories either natively or through plugins, plus I have listed some stand alone tools below.

CVS

Tortoise CVS (Windows)

Cervisia (Linux)

Subversion

Tortoise SVN (Windows)

KDE SVN (Linux)

Git

 

The LiveCD

This might seem like an odd choice if you’re not normally a Linux user, however it can be a lifesaver if you experience computer problems. A Live CD can be great for rescuing data before a reinstall if Windows messes up, testing problematic hardware and of course trying out Linux without installing it to your harddrive.
Whilst these distributions might not be the most suitable for long term use, they come with great tools for emergencies.

gParted (Partitioning)

Knoppix (General Purpose)

Backtrack (Security/Pen Testing)

 

Over To You…

I hope you find some of the items on this list useful. If you have any other great pieces of Open Source software computing students might find beneficial, please share it in a comment below.
If you enjoyed this post, I’d encourage you to check out http://blog.padowi.se, which features an expansive overview of software which could be useful to any developer, an in particular to students.

8 Reasons Why Every Computing Student Will Love Linux

August 27th, 2008


With a lot of schools starting back around now and universities about to begin, we’ve been spending this week looking at software for students. First of all I suggested some useful freeware and open source applications for all students. Then I discussed why computing students should make the most of open source software. Today I want to follow on from that by considering how running Linux can benefit computing students.

 

Why run Linux in particular?

1. Get experience with a different operating system.

Whilst you can set up Linux to look almost exactly like Windows or Mac, when you get down to the details it is a fundamentally different operating system. Whether or not you prefer using Linux, it’s important to realise that there are alternative ways of doing things. Besides, some experience with Linux or a Unix based OS is vital because…

 

2. It’s used in many areas of computing.

Although you may see relatively few desktops running Linux, you’ll find considerably more servers which do. Linux is used behind the scenes all over the place: embedded devices, ultra-portable laptops, multiplayer game servers, cloud computing and high performace computing to name but a few. If you want to work in any of these areas, some previous experience with Linux can only help you.

 

3. You can tweak your system to exactly the way you want it.

Linux is open source, so nothing about your operating system is hidden from you. From the way you want your desktop to appear, to whether you want Blowfish support built into your kernel or compiled as a loadable module, Linux is all about choice.

 

4. It’s easy to stay up to date and secure.

Linux comes in a multitude of flavours, or distributions, each one with different features, and in many cases a different package manager. Package management is a new concept to a lot of Windows users. Basically, imagine how easy it would be if thousands of pieces of software could be installed, tracked and updated through one central location. No more trawling the web to find a decent CD Burner. No trying to find out which of your applications have newer versions available, and whether you need other software in order to install them. Well, Linux package managers handle all that for you. With a few clicks (or commands if you prefer), you can manage the software you want installed, keeping you up to date and secure.

 

5. It can be a challenge.

These days, user-friendly distributions like Ubuntu make it easy for even a novice to get a desktop installation up and running smoothly. However, try to get an unusual piece of hardware working, or use a less stable distribution or piece of software, and you’ll probably face a few “challenges”. Now, someone who just want to do some word processing might refer to these as “problems” or “reasons to go back to Windows”, however, I personally find them one of the most exciting features of the operating system. Every time I have a problem, it takes some work and liberal use of everyone’s best friend Google to get over it, but each time I learn a little more about the software I’m using.

 

6. It runs on a range of hardware.

If you have an older PC lying around, or a laptop that isn’t quite as Vista capable as the shiney sticker on the box made out, Linux can let you get far more out of the hardware. Linux isn’t limited to desktops either, you can try it out on a range of devices from smart phones to games consoles.

 

7. You don’t even have to install to your harddrive.

If you’re not quite ready to take the step of installing Linux to your harddisk, there are still ways you can try it out. LiveCDs offer you a bootable environment on a CD or DVD so you can try out the OS without making any changes to your computer. You can download LiveCD images of various distributions from their homepages or via bittorrent, or if using the internet is an issue for you, you can order a free Ubuntu CD. Linux magazines also often come with dvds with images of the latest distro releases on them.
If you prefer, you can also install Linux to a USB flash drive or external harddrive to give you a portable version, without re-partitioning your internal harddrive.

 

8. You don’t have to lose Windows.

If Windows is necessary for some of your work, or you just can’t bear to part with it, you don’t have to give up on installing Linux. It’s easy to set up an environment, either with virtualisation or a native dual-boot install, where you can use either operating system on the same computer.

 

Over to you…

Do you run Linux? What benefits does it have?

Why Computing Students Should Care About Open Source

August 23rd, 2008


As I’ve mentioned before, my university has a pretty successful Linux Society. It welcomes both students and members of the public, and looking at an average meeting you’d probably agree that a decent number of people attend. That is, until you compare that number to the total amount of computing students at the university.
At this point, you’re probably thinking something like

“Linux has a less than 2% market share – why would you be surprised about how few people use it?”

Well, for the general public I wouldn’t be. Be we’re talking about computing students in particular – people who could get a lot of benefit from using Open Source software and running the Linux operating system. Continue reading »