One of The Best Ways to Solve a Problem

posted by on 31st August 2012, at 5:30pm

I’ve always been a person to wonder how things work. This of course extended into both hardware and software. Later on this lead to an interest in programming. That interest in programming naturally lead on to computer science. As I’ve discussed before computer science is a wide field, ranging from theoretical to practical. Today I’m going to talk about something that I picked up during the process of many computer science assignments: hacking.

A couple weeks back I was talking to Brad (yes, I mean Chief Snake) and he mentioned he was enjoying an assignment he had been given. It was an assignment where a brief description was given and the resources available were limited. I mentioned that I used to like these types of assignments too because I found them the most rewarding. The reason being they were highly educational because most of the work towards a successful implementation had to be found via hacking. This ultimately resulted in us discussing why we both like computer science.

A hacker in the sense computer science can be defined as “a person who enjoys exploring the details of programmable systems and stretching their capabilities…” Most of the hacking done in my assignments was to fix something that wasn’t working right. It was through this that I feel I learnt the most. It was enjoyable because it was something new and I didn’t exactly know where I was going, a kind of exploration perhaps. Whether you’re simply trying to learn your first language, trying to create an add-on to your favourite linux kernel, or trying to create a web server for the first time, it’s all very rewarding. Today I still engage in this practice whenever I decide to pick up a new language (most recently Objective-C) and it’s also the reason why I made my own system for The Daily Bits.

Now that I’ve covered a bit about why I find hacking enjoyable, it’s your turn. I’m going to provide a couple of entry level programming projects that you could try to implement. If you have an interest in programming, now might be a good time to start. Who knows, it might lead to pursuing a computer science degree!

The first programming challenge consists of something we all have used at one point or another: a RuneScape high score lookup tool. In a language of your choice (Java, PHP, JavaScript maybe) create a high scores look up tool where a name is specified and it displays stats in a human readable way. It doesn’t have to be pretty, just use it to get used to the language. Use the “index_lite” page provided by Jagex. If you want a poke in the right direction send me a private message).

Create a simple 9-puzzle using HTML and JavaScript. The 9-puzzle is similar to the RuneScape treasure trail puzzle boxes. Use a series of different coloured squares. Focus on creating the code that will allow you to drag and drop a piece. For more of a challenge you might want to enable the use of the arrow keys to move pieces around. Once again this entire project would be a good challenge to get yourself used to the HTML DOM specification and JavaScript to manipulate it.

The third and perhaps most advanced challenge will get you knee deep in C. For those who do not know, C is a relatively low level language used in many operating systems. This challenge will almost certainly require a Linux/Unix based system to complete since Windows isn’t the most elegant operating system out there. Create a memory analysis tool that looks at pages of memory and reports back certain attributes such as read/write and the contents of the block. I highly recommend you being familiar with operating system memory layouts before attempting this, you should also have some programming experience before as well. For fun you could try running it on different variants such as a BSD Unix, Linux, or OS X.

I don’t expect everyone reading to go out and create all three of the little tools mentioned here, that’s not the point. The point is to show how you must think if you want to go about learning through hacking. If you do manage to implement one or all of these, by all means do contact me and share your findings! Also if you want hints, contact me) as well ;).


This article is filed under Tech. You can follow any responses to this entry through the RSS 2.0 feed. You can discuss this article on our forums.