dont repeat yourself

Tool Tip: Create a list of Globally Unique IDs with TurboGUID

I’m proud to announce the launch of a little website called TurboGUID. I put this site together out of frustration having to manually generate unique ids for my work.

TurboGUID - Create a list of Globally Unique IDs

Sometimes I need to create a bunch of GUIDs for my work but generally you can only create one at a time. There are a number of ways to create them, but I normally use the Microsoft utility guidgen.exe - recently I had to create over a hundred GUIDs so I figured I should just spend a little bit of time writing some code to do it for me. Simple code, but definitely a time saver!

This release is only iteration one so if you have any comments or suggestions on extra features then please leave me a message and I’ll add your suggestions to a future iteration.

If you’re asking what a GUID is or what you might use one for, you may want to read the next website:

GUID wiki - Another wiki post that describes more than I care to on my own site

Enjoy!

Share this article:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Blogosphere News
  • Fleck
  • LinkedIn
  • Live
  • Netvibes
  • Print this article!
  • StumbleUpon
  • Technorati
  • Tumblr
  • TwitThis
  • Yahoo! Buzz
  • BlinkList
  • blogmarks
  • De.lirio.us
  • DZone
  • feedmelinks
  • Furl
  • IndianPad
  • kick.ie
  • LinkaGoGo
  • Linkter
  • MisterWong
  • MySpace
  • Netvouz
  • NewsVine
  • Ping.fm
  • Reddit
  • scuttle
  • Slashdot
  • Socialogs
  • SphereIt
  • Spurl
  • Taggly
  • Webnews.de
  • Wists
  • YahooMyWeb

Tags: , , , , , ,

Wednesday, April 29th, 2009 NewArticle, Site News, Tool Tips No Comments

Tool Tip: Junction for Windows XP

During my years at university I spent majority of my time on a command line, working on unix systems. One of the things I loved about unix was the ability to create symbolic links.

A symbolic link allows you to ghost the location of a file or folder to another location on your file system. This means that you can create a symbolic link from a folder (e.g. /myproject/tools/nant ) which points to another folder on the file system (e.g. /common/tools/nant/). The main benefit of doing this means that you can link to a common file or folder from many projects and maintain just one copy of that file or folder. Reducing duplication is what the DRY principle is all about, so you know its good.

Now that I’m mainly using Windows as my development OS, I don’t have symbolic links anymore. Vista has them under a different name but that won’t help anyone using Windows XP. That’s where Junction comes in handy.

Junction - A symbolic link tool for Windows

After downloading junction, I placed the executable file into C:WINDOWSSystem32 so that it will be available from the command line (i.e. it will exist in the “path” environment variable). The next step is to now create a junction!

Give this a try:

C:>junction.exe c:Test c:WINDOWS

After completing, you should be able to see the following:

C:>dir
 
 Directory of C:
 
11/11/2008  23:32                 0 AUTOEXEC.BAT
11/11/2008  23:32                 0 CONFIG.SYS
15/01/2009  06:31    <DIR>          Documents and Settings
11/11/2008  23:36    <DIR>          Intel
10/03/2009  15:39    <DIR>          Program Files
11/11/2008  23:43               173 Setup.log
11/03/2009  13:53    <JUNCTION>     Test
09/03/2009  13:44    <DIR>          WINDOWS
               3 File(s)            173 bytes
               5 Dir(s)  136,112,881,664 bytes free

Notice that Windows recognises the new folder as a Junction, not a Directory. Now have a look inside C:Test

C:>dir Test
 
 Directory of C:Test
 
09/03/2009  13:44              .
09/03/2009  13:44              ..
09/03/2009  13:44                 0 0.log
11/11/2008  15:18    <DIR>          addins
19/06/2008  23:20            57,344 ALCMTR.EXE
19/06/2008  23:42         2,808,832 ALCWZRD.EXE
11/11/2008  15:22    <DIR>          AppPatch
14/04/2008  12:00             1,272 Blue Lace 16.bmp
14/04/2008  12:00            82,944 clock.avi
11/11/2008  23:28               200 cmsetacl.log
14/04/2008  12:00            17,062 Coffee Bean.bmp
15/01/2009  06:35             1,444 COM+.log
.
.
.

What you should see is all the files contained inside C:WINDOWS. This means that C:Test now points to C:WINDOWS and appears to contain all the same files.

Removing a Junction is simple:

C:>junction.exe -d c:Test

A WORD OF WARNING: If you delete a file in the Junction folder, it will delete the real file. Be careful not to delete files inside a Junction thinking that it will only affect that Junction.

And that about sums up the simple side of Junctions! I find it really useful to link to a common tools folder in each of my projects, so that I can get to the easily from the project and only store them on disk once. Hopefully you can find a good use for them in your next project.

Share this article:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Blogosphere News
  • Fleck
  • LinkedIn
  • Live
  • Netvibes
  • Print this article!
  • StumbleUpon
  • Technorati
  • Tumblr
  • TwitThis
  • Yahoo! Buzz
  • BlinkList
  • blogmarks
  • De.lirio.us
  • DZone
  • feedmelinks
  • Furl
  • IndianPad
  • kick.ie
  • LinkaGoGo
  • Linkter
  • MisterWong
  • MySpace
  • Netvouz
  • NewsVine
  • Ping.fm
  • Reddit
  • scuttle
  • Slashdot
  • Socialogs
  • SphereIt
  • Spurl
  • Taggly
  • Webnews.de
  • Wists
  • YahooMyWeb

Tags: , , , , ,

Wednesday, March 11th, 2009 Tool Tips 1 Comment

Welcome!

I’m finally starting a blog to keep track of all the cool things that I learn as a computer programmer and web developer. No matter how much we learn, there is always a universe of knowledge waiting for us to discover.

I recently read this quote, which I thought I would share:

“The universe is full of magical things, patiently waiting for our wits to grow sharper” Eden Phillpotts

In the past few months I have been busily practising all the things a good programmer should:

  • Read - At the moment I’m reading this - Domain Driven Design by Eric Evans
  • Practise - Plenty of unit tests, lots of refactoring and adhering to lots of other good coding practices. One I really love is DRY
  • Interact - I recently went to a weekly XTC event held in London and plan to attend more often from now on. I recommend going to a local developer’s event where you live. Even if you don’t anticipate learning anything (although you most certainly will), chatting over a beer is always good :)

Hopefully you’ve already found and read this next website, but if not I would highly recommend visiting the agile manifesto. It was the start of my realisation that I have plenty more to learn about the job I love.

There will be more to come very soon, I’m just getting started!

Oh, and I realise that referencing Wiki pages is probably lame, so if you have a better source for any of the links above please let me know!

Share this article:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Blogosphere News
  • Fleck
  • LinkedIn
  • Live
  • Netvibes
  • Print this article!
  • StumbleUpon
  • Technorati
  • Tumblr
  • TwitThis
  • Yahoo! Buzz
  • BlinkList
  • blogmarks
  • De.lirio.us
  • DZone
  • feedmelinks
  • Furl
  • IndianPad
  • kick.ie
  • LinkaGoGo
  • Linkter
  • MisterWong
  • MySpace
  • Netvouz
  • NewsVine
  • Ping.fm
  • Reddit
  • scuttle
  • Slashdot
  • Socialogs
  • SphereIt
  • Spurl
  • Taggly
  • Webnews.de
  • Wists
  • YahooMyWeb

Tags: , , , , , , ,

Monday, March 9th, 2009 Beginner, Site News No Comments