Showing posts with label programming. Show all posts
Showing posts with label programming. Show all posts

Sunday, 23 May 2010

The return

Wow, it has been a long time since I wrote anything here, 20 days to be exact. Truly this is a testament to just how busy my existence has become! (I truly enjoy kidding myself don't I).

Truth be told, I have a massive back log of things that I want to post about, but haven't really had the motivation to write them up.  Instead, I've been busying myself with the following things:
  • Learning the Android API (which is actually very nice, and generally a pleasure to work with),
  • Huge tracts of University work, which unlike last term feel more soul destroying than fun challenges to improve my knowledge
  • Playing Just Cause 2, and both Mass Effect games (which have rapidly become new favourite games, despite trepidations I had about them before playing).
So ultimately an average day over the past 20 days or so has consisted of getting up at about 6:30, getting to Uni for 8:30 lectures from nine until one, then staying on campus until about five either drinking in Falmer bar, or working on various projects, getting home about 7 and then gaming/learning Android until roughly 3am, before collapsing in bed ready to start it all over again in three hours time.

Hopefully, however, this should change over the next couple of weeks as I head into the time of year where exams loom their ugly heads; freeing up more of my day to spend on other things (such as this place).

Thursday, 25 March 2010

This takes me back

Man, I nostalgia-d (I have no idea what the past tense of nostalgia is, come on people work with me here) hard when I saw this, I haven't written anything in qBasic in years:



I'm gonna have to dig out some of my old code again (and find a copy of qBasic again), only thing is I can't remember if I commented anything.

Saturday, 9 January 2010

Not so "diff"-icult after all

I've gone back and updated the way that the filename formatter would work on the command line, and it turns out that on the command line, it's a lot simpler than I'd previously thought.  So here's the ammended version:

perl -e 'print join("\\ ", @ARGV)' [FILE NAME]
I also feel no shame in using yet another "diff" based pun in the title.


Friday, 8 January 2010

A "diff"-icult problem

Sorry, I couldn't help myself.

Writing the file copying routines for the "diff for folders", I've come across the small problem of converting from the non-escaped versions of file names that readdir produces, to the escaped versions that the shell commands need.  I have, however, managed to produce a imho pretty nice oneliner to do this.
join("\\ ", split(/ /, $fileName));
 Which takes a file name like "some random file.txt" and converts it to "some\ random\ file.txt". Obviously, this won't work directly from the command line yet, but when I've got more time I'm going to adapt it to do so.

Tuesday, 5 January 2010

Creating a "diff" for folders

For me, diff is one of those utilities that, although I don't use it frequently, I would be lost without.  In essence, diff checks the content of two files and compares them line by line; showing you where there are differences between the two.

Now unfortunately, diff is also one of those utilities that suffers from Unix-itis, the tendency for a command line utility to have an interface that could charitably be described as esoteric (I could cite awk and sed here but I won't). Getting diff to show he difference between the content of two directories is an "interesting" problem, as this page shows.  Comparing the content of two folders though is actually one of those problems that personally occurs quite often.  Therefore I've decided to write my own program, to perform this task automatically.

Now, as usual, I've decided to write the program in perl, and have managed to put together a working prototype, but there is still work that needs to be done.  I've gone with a GUI for the interface design, but want to put in command line options as well.  Over the course of the next few days, I'm planning to solve the few bugs and glitches the prototype has, as well as add increased functionality, and stability.

Tuesday, 9 June 2009

Plans for the now

So, with summer truly upon us, I've decided that it's going to be good weather to actually go and fly a couple of model rockets. With this in mind, and in order to procrastinate about my exams that start tomorrow I've dug out my copy of The Handbook of Model Rocketry in order to convert the programs contained in there over to perl, so that I can run some simulations on a couple of designs I want to build.