Archive for the ‘Uncategorized’ Category

Making Windows Usable - colourisation

Thursday, August 21st, 2008

Human beings are visual creatures, so in this post I’ll introduce some ways of making your life easier using colour.

Colour Your folders with iColorFolder

IColorFolder gives folders a context menu which lets you change the colour.  Unfortunately this doesn’t work fully in Vista yet, and you’ll need to manually change the icon, navigate to Program Files\iColorFolder\iColorFolder.dll to get access to the folder icons.

Incidentally if you want have a shortcut to a folder, you can use the same workaround to use a coloured icon.

Colourise your commandline

Colour ls

It’s equally useful to have colour folders when using the commandline, to achieve this you can use msls from utools.

Download it and place it somewhere within the path (I use \usr\bin, which I added to the path earlier).

Now, to get colour directories you can type “ls –color”.  However it would be better to have that happen all the time.

To set color as the default, set the environment variable LS_OPTIONS to –color:

  1. Press Windows+Pause,
  2. Click through these buttons: Advanced, Environment Variables, New
  3. Set the name as LS_OPTIONS and the variable to –color

Next time you launch the commandline and type ls, it will be in colour.  You can also combine options here, for instance if you want -l to be default as well.

Using 4NT/TCC-LE

Another way of getting colour directories is to use 4/NT or TakeCommand-LE (The free cut down version) from JPSoft.  This replaces the whole command shell and has many enhancements that help day-to-day.

Once you’ve downloaded the shell, if you want to change colours for particular kinds of files, then type option, go to the windows tab, and you can set directory colours.

To set EXE CMD and BAT files to be bright white enter:

EXE,CMD,BAT:15

If you want bright white on blue enter

EXE,CMD,BAT:15,1

Semicolons seperate file types - here I’ve set executables yellow and documents white:

EXE,CMD,BAT:14;TXT,DOC,PDF:15

The colours are arranged foreground, background and can be any of the ones used below (note background only has 8 colours to choose from, while foreground has 16, the last being the brighter versions).

Note:  These are the default textmode colours, if you change the command prompt colours yours may be different.

Tango in putty

The tango project is a usability project for free software, the colours are very pleasing and have been ported to putty, alternatively the Igvita theme is nice.

The tango port comes with the bitstream vera mono fonts too, so everything should look pretty good once installed.

Colourise your browser

If you use firefox you can install ColourfulTabs which makes it easier to find that tab among the crowd (especially useful if like me, you have lots open).

Colourise gmail (sometimes)

This one is a little annoying as it seems to be broken, but I’ll include it anyway in case it gets fixed.

If you install greasemonkey and the gmail colouriser, then all your gmail will be coloured by label (for instance I have a label for mailing lists I subscribe to).      When the gmail colouriser is working this works great for finding certain kinds of mail in the long list.

Unfortunately this isn’t working for me at the moment, so no screenshot… if I knew how to debug greasemonkey scripts I might have a look at fixing this as it’s so useful - it seems to choke on certain mail names but I’m not sure what they are.

JEdit with tango goodness

Saturday, July 12th, 2008

I’ve been using a patched version of JEdit with tango icons for a while, but seems like I missed the fact that 4.3 pre 14 came out with Tango support.

Go forth and download…

Via  http://deadcabbit.blogspot.com/2008/05/jedit-pre14-tango-has-arrived.html

Tango is a project to bring tasty icons to open source projects, those on windows can also see tango icons in the current version of the gimp, in linux you can see them in gnome and kde.

ZX Spectrum flightsim

Saturday, July 12th, 2008

Just found this while going through my phones photos.  This is from my last contract, the company used to be Psions software division, we found the tape in the bottom of a desk draw, who knows maybe it is the master tape for this game?

Psion flight simulation on cassette

Update:  Link to PsionSoftwareLTD promotional information on worldofspectrum.org

What’s in a name?

Tuesday, April 1st, 2008

…or why “my” is not a valid prefix for a variable

While I’m greatful for examples like this J2Me GameCanvas example I’m not so happy about this bit of it:

/** Starts the canvas by firing up a thread
*/
public void start() {
Thread myThread = new Thread(this);

// Make sure we know we are running
running = true;
done = false;

// Start
myThread.start();
}

What’s wrong ? Quite simply ‘myThread’.  You see the ‘my’ prefix used in code all over the web - it’s extraneous… extra noise, you may as well add ‘the’ to the beginning of every variable.

Variable naming is to a certain extent a matter of taste; a lot of people would say that it is worrying about nothing. The problem is, that most of the time spent with code is reading it, not writing it; as such we should try and be as succinct as possible ‘my’ adds absolutely nothing here.

In the example above it would be better to either leave out the ‘my’ or call the thread canvasThread.

 Fuzzy

Where possible variable names should reflect what you want to use them for, if your naming is fuzzy then others will use them for things you did not intend and then your on the downward spiral…

This is the other crime in variable naming, over generalising… quite often you see variables called ‘data’ when the name of the type would do fine… usually it is only in IO based applications dealing with arbitrary data that the name is appropriate.

Of course, if you can’t think what to name them, then don’t pad them out as well, it’s pointless.

My my my

A quick search on coders (excluding mysql) finds 301,040 hits for ‘my*’.

That’s a lot of noise… stop the madness: ban ‘my’ now… if microsoft can remove it from Vista, how difficult can it be?

Date for wine 1.0 release announced

Tuesday, April 1st, 2008

The Wine project has been going since 1993, and has got to the point where a large percentage of windows programs run well in linux.

A perennial question is when 1.0 will be released, excitingly it looks like this will be sooner than we thought - as seen from their mailing list today:



Paul Vriens <paul.vriens.wine at ??????> writes:

> Just noticed that the dates attached to the versions on
> http://wiki.winehq.org/WineReleasePlan are not correct.
>
> 0.9.58 came out on March 21st.
>
> Does this mean we still stick to May 9th or do we stick to 0.9.61 as being
> 1.0.0.rc1?

We should stick to May 9th, we'll just have to wait for this date to
coincide with a release. If my calculations are right this should be
release 0.9.218 on May 9th, 2014. Hopefully we can clear the 1.0 bug
list by then.

--
Alexandre Julliard

Vista vs Blender

Wednesday, February 20th, 2008

The good news is, my laptop can run the Blender game engine at a decent framerate.

The bad news is I found out that is the Vista taskbar that more than halves it.  I run without Aero, as Aero completely borks OpenGL (quite apart from the fact that Vista limits you to OpenGL 1.5).   It’s bothered me for a while that in Blender I could never get over about 30FPS - on the weekend I found out that I can have the window as large as I like and get much better framerates as long as the window doesn’t touch the taskbar.

This is the kind of thing I hope SP1 will fix, but I severely doubt it :(

The One to Pick up

Monday, February 18th, 2008

My dad found this old advert for the Osbourne I… at only £1250 + Vat (and with a free 12 Inch amber for a limited time), this is The One To pickup… or not as they were never popular. Weighing in at “below 24lb” (10 Kilos!) this was a proper computer running CPM the anscestor from which DOS was cloned. It’s interesting as this was before the 8 bit wars had really kicked off in the U.K. with well known computers from Spectrum and Commodore, Amstrad and Acorn.

the-one-to-pick-up.jpeg

[EDIT - Add Flickr link]

Flickr

retrocomputing

Sunlight Soap

Tuesday, February 12th, 2008

As our washing machine broke, I was in the Laundrette where I saw this on the wall -

Sunlight Soap

The writing on the bottom says

£1000 Reward!

Will be given to any person who can prove that this soap manufactured by Lever Bros.
Port Sunlight on Mersey
Contains any form of adulteration whatsoever or contains any injurious chemicale

In Victorian times adulteration of products was widespread and it’s interesting to think that some of the big brands we have today came out of this - Cadburys being the famous one, their unadulterated cocoa essence leading to the Adulteration of Foods Acts.

Phonetorch

Saturday, February 9th, 2008

While trying to find some good freeware to use the flash on my phone as a torch, I stumbled across a couple of nice apps

Obex Commander for sending files to your phone over bluetooth.

YBrowser a Series 60 file manager (you can do useful things like send multiple files over bluetooth in one go)

So far haven’t found a decent torch app, though so will have to keep looking on that front.

Blue proximity

Saturday, February 9th, 2008

This is very cool - lock and unlock your computer depending on your phone being in bluetooth range.

blueproximity.sourceforge.net

Next time I’m in linux I’ll definately have to play with it. Something I’ve been wanting to do is automatically rotate the songs on the memory card of the phone when in bluetooth range, so I’ll have to see if it’s possible to hook up the connection event to a script.

[edit] fixed link