Instructions for Setting up Outlook 2007 for GTD

outlook rules

I’m moving to a new job soon and wanted to take the opportunity to set up the new email system in line with GTD (Getting Things Done) methodology.

Here’s my checklist for setting up the new system on Outlook 2007.
Most tips and code are taken from Simon Guest over at Simon Says but I’ve amended the code (very slightly) to suit my particular needs and naming conventions. For further details and descriptions please follow the links to his blog where I’ve listed them.

1. Create Folders at same level as Inbox

  • @ACTION REQD
  • @MEETINGS
  • @READ
  • @REFERENCE
  • @PERSONAL
  • @WAITING FOR

2. Create Macro for categorising and assigning email as task:

To create a new task from an email, select the email, run the NewTask macro, choose categories and at least one @CATEGORY, in my case @ACTION. Then you can choose to rename the subject title – this will become the new task.

    Function FileFolderEntryId() As StringDim myolApp As Outlook.Application
    Dim myNamespace As Outlook.NameSpace
    Dim myInbox As Outlook.Folder
    Dim rootFolder As Outlook.Folder
    Dim subFolders As Outlook.Folders
    Dim subFolder As Outlook.Folder
    Dim fileFolder As Outlook.Folder
    Dim fileEntryID As String
    Dim fileFolderName As String

    ‘Set the folder name – must be at the same level as the inbox
    fileFolderName = “@ACTION REQD”

    ‘ Move the the file folder
    Set myolApp = CreateObject(“Outlook.Application”)
    Set myNamespace = myolApp.GetNamespace(“MAPI”)
    Set myInbox = myNamespace.GetDefaultFolder(olFolderInbox)
    Set rootFolder = myInbox.Parent
    Set subFolders = rootFolder.Folders

    Set subFolder = subFolders.GetFirst
    Do While Not subFolder Is Nothing
    If subFolder.Name = fileFolderName Then
    fileEntryID = subFolder.EntryID
    Exit Do
    End If
    Set subFolder = subFolders.GetNext
    Loop

    ‘ return the entry ID for the file folder
    FileFolderEntryId = fileEntryID

    End Function

    Sub NewTask()

    Dim item As MailItem
    Dim myolApp As Outlook.Application
    Dim myNamespace As Outlook.NameSpace
    Dim fileFolder As Outlook.Folder
    Dim newName As String

    ‘ Pick the category
    Set item = Outlook.Application.ActiveExplorer.Selection.item(1)

    ‘ Mark as unread
    item.UnRead = False
    item.Save
    item.ShowCategoriesDialog

    ‘validate to see whether two categories exist, including an action
    If (item.Categories <> “”) Then
    If (InStr(item.Categories, “@”) > 0) Then
    If (InStr(item.Categories, “,”) > 0) Then

    ‘ Set the follow up flag
    item.MarkAsTask (olMarkNoDate)

    ‘ Move the item to the file folder
    Set myolApp = CreateObject(“Outlook.Application”)
    Set myNamespace = myolApp.GetNamespace(“MAPI”)
    Set fileFolder = myNamespace.GetFolderFromID(FileFolderEntryId())

    ‘ Ask for a different name if required
    newName = InputBox(“Please enter a subject for the task:”, “Task Subject”, item.TaskSubject)
    item.TaskSubject = newName
    item.Save

    item.Move fileFolder
    End If
    End If
    End If
    End Sub

3. Create a rule that will send a email from me and cc’d to me as @WAITING FOR category and file

This is a way of keeping track of requests you’ve sent out in the @WAITING FOR folder.


4. Create a macro that will categorise and send mail to the @REFERENCE Folder

    Sub ToReferenceAndCategorise()

    Dim item As MailItem
    Dim myolApp As Outlook.Application
    Dim myNamespace As Outlook.NameSpace
    Dim myInbox As Outlook.Folder
    Dim rootFolder As Outlook.Folder
    Dim subFolders As Outlook.Folders
    Dim subFolder As Outlook.Folder
    Dim fileFolder As Outlook.Folder
    Dim fileEntryID As String
    Dim fileFolderName As String

    ‘Set the folder name – must be at the same level as the inbox
    fileFolderName = “@REFERENCE”

    ‘ Pick the category
    Set item = Outlook.Application.ActiveExplorer.Selection.item(1)
    item.ShowCategoriesDialog

    ‘ Move the the file folder
    Set myolApp = CreateObject(“Outlook.Application”)
    Set myNamespace = myolApp.GetNamespace(“MAPI”)
    Set myInbox = myNamespace.GetDefaultFolder(olFolderInbox)
    Set rootFolder = myInbox.Parent
    Set subFolders = rootFolder.Folders

    Set subFolder = subFolders.GetFirst
    Do While Not subFolder Is Nothing
    If subFolder.Name = fileFolderName Then
    fileEntryID = subFolder.EntryID
    Set fileFolder = myNamespace.GetFolderFromID(fileEntryID)
    item.Move fileFolder

    Exit Do
    End If
    Set subFolder = subFolders.GetNext
    Loop

    End Sub

5. Repeat above for Categorise and send to @Waiting For Folder

6. Create a macro that will categorise and send mail to the @READ Folder

This is the same as above but I want to include it under my task list, which I have sorted by folder, so I also include a routine to add a no date follow up flag.

    Sub ToReadAndCategorise()

    Dim item As MailItem
    Dim myolApp As Outlook.Application
    Dim myNamespace As Outlook.NameSpace
    Dim myInbox As Outlook.Folder
    Dim rootFolder As Outlook.Folder
    Dim subFolders As Outlook.Folders
    Dim subFolder As Outlook.Folder
    Dim fileFolder As Outlook.Folder
    Dim fileEntryID As String
    Dim fileFolderName As String

    ‘Set the folder name – must be at the same level as the inbox
    fileFolderName = “@READ”

    ‘ Pick the category
    Set item = Outlook.Application.ActiveExplorer.Selection.item(1)
    item.ShowCategoriesDialog

    ‘ Set the follow up flag
    item.MarkAsTask (olMarkNoDate)

    ‘ Move the the file folder
    Set myolApp = CreateObject(“Outlook.Application”)
    Set myNamespace = myolApp.GetNamespace(“MAPI”)
    Set myInbox = myNamespace.GetDefaultFolder(olFolderInbox)
    Set rootFolder = myInbox.Parent
    Set subFolders = rootFolder.Folders

    Set subFolder = subFolders.GetFirst
    Do While Not subFolder Is Nothing
    If subFolder.Name = fileFolderName Then
    fileEntryID = subFolder.EntryID
    Set fileFolder = myNamespace.GetFolderFromID(fileEntryID)
    item.Move fileFolder

    Exit Do
    End If
    Set subFolder = subFolders.GetNext
    Loop

    End Sub

7. Create a macro that will create Task and Mail Search Folders

    Sub CreateNewSearchFolder()

    Set MyOutlookApplication = Outlook.Application
    SearchSubFolders = True
    Set MapiNamespace = Application.GetNamespace(“MAPI”)
    Set TasksFolder = MapiNamespace.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderTasks).Parent
    strS = “‘” & TasksFolder.FolderPath & “‘”

    Dim folderName As String
    folderName = InputBox(“What category would you like to create a search folder for?:”, “Category”, “”)
    Dim objSch As Search
    Dim categoryFilter As String
    categoryFilter = “(“”urn:schemas-microsoft-com:office:office#Keywords”” LIKE ‘%” & folderName & “%’)”
    Dim taskFilter As String
    taskFilter = “(“”http://schemas.microsoft.com/mapi/proptag/0x0e05001f””= ‘Tasks’ AND “”http://schemas.microsoft.com/mapi/id/{00062003-0000-0000-C000-000000000046}/81010003″” <> 2) OR (NOT(“”http://schemas.microsoft.com/mapi/proptag/0x10900003″” IS NULL) AND “”http://schemas.microsoft.com/mapi/id/{00062003-0000-0000-C000-000000000046}/81010003″” <> 2)”
    Dim strTag As String
    strTag = “RecurSearch”

    ‘ Create the tasks folder
    Set objSch = Application.AdvancedSearch(Scope:=strS, Filter:=categoryFilter & ” AND (” + taskFilter + “)”, _
    SearchSubFolders:=True, Tag:=strTag)
    objSch.Save (folderName)

    ‘ Create the mail folder
    Set objSch = Application.AdvancedSearch(Scope:=strS, Filter:=categoryFilter, _
    SearchSubFolders:=True, Tag:=strTag)
    objSch.Save (folderName & ” (Mail)”)

    End Sub

8. Create custom toolbars for the above macros

  • Right click on toolbar – Customise
  • Select commands tab the Macro on Left
  • Drag desired macro to toolbar
  • Right click on macro button and rename and assign keyboard shortcut if necessary (you need to do this with the customise box still open)

9. Introduce colouring to organise selected folders

  • Go to Tools> Organize and complete the following steps:
  • select Using Colours
  • Change “Colour messages from [you] in Silver”
  • Apply Colour
  • Turn on the “Show messages sent only to me in Blue”

10. Panic if new job doesn’t use Outlook 2007

Alternatively I could start working through some tips for using Outlook 2003 for GTD, starting here.

I am still a little bemused as to how to deal with SENT items in Outlook, I’ve seen macros directing all sent items back into the inbox to be categorised and filed but I would prefer the category dialog box to pop up when I press send.  I’ve currently set up a lot of rules which apply categories on the basis of who I have sent them to but it is not foolproof.

Hill Horror

Retro Chic

The calendar entry for Saturday read “Pick up Bike”, I couldn’t have realized quite how literal that reminder would prove to be.

I like riding bikes but I have a severe and disabling bike parking phobia. I always have had. I took the first bike I had, out on a trip to Matlock – motorbike heaven, but rode right through before looping back and heading home dejectedly because I couldn’t bear to park in front of all those experienced bikers.

For the last month (which happens to coincide with the onset of my latest bike “enthusiasm”) I have had terrible night sweats relating to the bike parking anxiety.I’ve done my best to calm my fears. I’ve watched youtube videos on the subject and visualized parking spots and methodology. I really felt I had my demon whipped but that was BS….before Saturday.

We live on a hill. The sign says 17’ but it’s near vertical in places. Obviously you can’t park a bike on inclines like that so I’d earmarked a spot across the road, just on the brow of the hill. Of course when I get the Bonneville home I find a car sitting in the one and only spot I’d psychologically mastered.

Curses!

There followed a period of considerable revving as I looped around the block a few times sizing up the options and ensuring an audience of curtain twitchers had amassed.

For some reason I have a brain fart at this point and decide to park right in front of our house so I can admire it from the living room window. So I pull in with my wheel pointing up the hill (like I say, I’ve done my research) and kick the side stand down. I then combine my clambering off the machine with my release of the front brake; just to ensure I am at my most unbalanced as the Triumph starts to slide down the hill, scraping a trail in the tarmac.

I’m not too sure what happened then. I resigned myself to being pinned under the bike but made some heaving attempts first. There were horrible revving sounds, grunts and then a ping of snapping metal.

Bollox! My foot rest was off and impaled in the tarmac.

I hauled the bike up and across the road and deserted it while I walked nonchalantly back, stooping surreptitiously to retrieve the shrapnel and heading inside to wail about my broken bike.

<

I was very lucky not to have completely ruined the new machine.

None of the paintwork was touched and the impaled foot rest must have saved both me and the engine from any serious crush injuries.

My pride is seriously dinted though. The neighbours spotted my ineptitude and then I had to ring the dealer to see if he might possibly have a spare pedal because I managed to break mine off less than hour after taking it away.

<

By Sunday life was looking up again.

Lynn fixed the bike for me and is showing signs of wanting to go for a ride and the neighbour took pity on me and offered me the use of his drive to park on.

The world is back to being a wonderful place.

Big Betty’s Bonnie

The discovery that “I was too short for BMW” floored me, but as the t-shirt says, Fat Bikers Bounce Better.

I bounced back quick smart and found myself sitting comfortably astride a Triumph Bonneville the very next day.

The 2009 Bonnie has been shrunk by a whole inch and must now be at least two inches shorter than the BMW F650 GS, couple that with the nearer vertical position into the side stand and you have a bike that I can actually get my leg over and get in the upright position without the need for pulleys and heavy equipment.

So the size was right but what about the ride?
My previous experiences with bikes fell into two categories, fun and boring:

BMW F650 Strada (1998) – extremely nippy and fun
Yamaha Virago 535 (1998) – shiny, slow, hard to turn and boring
BMW F650 GS (2010) – powerful, nippy and fun again but did I mention I’m too short?

My demands for the Bonneville were that it should fall slap bang in the middle of the right category.

The test ride started well, I got it out of the courtyard without stalling. The Bonnie is incredibly easy to ride. It has a very solid gearbox with a good clunk as it pops into gear and I had no problem finding neutral. In contrast the BMW’s gearbox felt fussy and demanded millimeter precision from cold and booted toes before it would display the neutral indicator.

I rode it out of the Sanderstead showroom and headed left, into the unknown but remarkably picturesque landscape, winding round hilly roads with the mist clinging to the chalky cliffs at the side of me. At one point as I started to descend I heard a low throaty rumbling over each shoulder and glanced into my wing mirrors expecting to see an escort of Harleys, but the road was clear. I smiled with pride as I realized I’d found myself a proper bike.

I don’t really have the experience or vocabulary to describe quite how the bike felt or understand the differences between the Triumph and the other bikes I’ve ridden but it certainly didn’t disappoint. I’m not a speed demon and have no interest in topping 100 mph (or even 80) but I do like acceleration. Quite a lot actually. The Bonneville has a good kick, I’ve no idea how it would fair head to head with the Beemer but it felt powerful. It’s got a flat seat and opening the throttle swiftly gave me the sense that I could quite easily slide off the back without some firm inner thigh action. I’m exaggerating of course but I did think it would be sensible to get a sissy bar before accelerating hard with Lynn on the back – she isn’t built to bounce as well as me.

I pulled off into a lay by to admire the machine and all felt well with the world.

I was introduced to the biking world by my brother who used to take me to school on his 1970’s Kawazaki Z1000. That still holds the benchmark of a real bike to me and the Bonneville came pretty close to the mark. It’s a modern retro so there will be no opportunity for me to tinker, stripping the engine out and cleaning it in the kitchen sink but that can only be a good thing, the last thing I touched with a spanner remained out of action for at least 3 months.

I rolled back to the dealers about 40 minutes later than expected but I could have gone on and on. I was tempted to just ride until the road ran out but instead I turned back and signed on the dotted line.

I pick it up on Saturday after they’ve given it a polish and fitted me with some heated grips.

All the Gear, No Idea

sad biker

I’ve been acquiring gear for my latest obsession at a fair rate of knots and the pile of trammel in the hall is now reaching embarrassing proportions.

I’ve sourced fat bikers trousers, extortionately priced yet rather swanky bad ass biker jackets, helmets, special socks, neckerchiefs, outdoor bike covers and locks. Quite frankly I’m the best kitted out biker in town apart from one startling omission……

The bike.

It keeps evading me.

I’ve come mighty close on a couple of occasions.

My first bike of choice was an ebay listed 10 year old BMW F650 GS. A single cylinder version, factory lowered and with a whopping 55k on the clock.

I think I might have had a lucky escape with that one.

I lost the bid in the final millisecond and shifted my glances in the direction of this beauty. Still a BMW F 650 GS but completely revamped for 2008 with an 800cc engine and a twin cylinder. Again factory lowered but with only 5k on the clock this time.

The snow did it’s best to deter my biker dreams. Police actually closed the roads around the dealership on the day of my first planned test ride due to the treacherous conditions.

I stuck a deposit on it to hold it for another week and then two days before the rearranged test ride, more snow fell. Fortunately heavy rain followed and cleared the roads sufficiently for me to take it out to play in the downpour.

My new biker trousers must hang a teensy bit low because I struggled to get into the saddle and then I could barely reach the floor to provide enough leverage to take the bike of the side stand. I’m surprised the dealer didn’t rush out and whip the keys out of the ignition as he saw me teetering from side to side trying to reach the ground on my tip toes.

Having got the thing upright I managed to stall it on the way out of the forecourt but then I was off and flying.

It was the fun machine I remembered from my direct access course more than 12 years ago. Nippy and seriously easy to handle, at least until I needed to stop and put my foot down again. Stopping on even the slightest of inclines was a little bit hairy and left me in no doubt that this bike was going to sit on me one day.

The final straw came after I’d pulled into the petrol station to load up. I’d filled up and paid and with a fair queue of cars pulling in behind me all I had to do was hop on and speed off gracefully.

I leveraged my leg up in a passable fashion but couldn’t even come close to throwing the bike upright. The big GS bikes have one heck of a tilt on to the side stand and you need at least one firm foot on the ground to handle them. I came so close to having to ask the guy in the station to push me up that I had to face facts. This bike was just too darn big for me.

I tried not to get too dejected and enjoyed a bit of a blast along the A22 before taking it back to Vines and asking for my money back.

Now I need to find myself another dream bike or risk looking like a complete narna on my Brompton.

I’m currently toying with a Triumph Bonneville, on paper they seem lower than the BMW and are probably considerably narrower. They can hold their own in the charm stakes as well.

VBA Snippets – Sorting Arrays and Random Selection

The blog post sounds a little Darwinian but I’m afraid it’s just a dull selection of VBA code that enables you to sort one array on the basis of values from another. A double sorting array.

I’ve amended array sorting code from John Walkenbach and Anthony’s VBA Tutorials to create something I can understand.

The DbleBubbleSort routine takes two arrays as arguments and sorts the string array (y) on the basis of the values in a nuber array (x). I’m using John Walkenbachs BubbleSort methodology which is simple but undoubtedly not the most efficient.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
Sub DbleBubbleSort(x() As Single, y() As String)

' adapting the BubbleSort method to sort an array on the basis of the values in another array.
' x is an array of numbers (can be random as in the DbleSortTest() routine)
' y is a string array
    Dim First As Integer, Last As Long
    Dim i As Long, j As Long
    Dim xtemp As Single
    Dim ytemp As String
   
    First = LBound(x)
    Last = UBound(x)
    For i = First To Last - 1
        For j = i + 1 To Last
            If x(i) &gt; x(j) Then
                xtemp = x(j)
                ytemp = y(j)
                x(j) = x(i)
                y(j) = y(i)
                x(i) = xtemp
                y(i) = ytemp
            End If
        Next j
    Next i
End Sub

The following routine calls on the DbleBubbleSort sub routine and uses it to provide a random selection of 3 entries from a string array.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
Sub DbleSortTest()
'this is an amended version of a function on http://www.anthony-vba.kefra.com/vba/excelvba-simulation.htm
'it randomly selects 3 entries from a text array (y)
'it utilises a random number array and the sorting of one array based on the values in another.

    Dim i As Long
    Dim x(8) As Single, y(8) As String
    Dim str As String

    y(1) = "Anthony"
    y(2) = "Bobby"
    y(3) = "Chris"
    y(4) = "Danny"
    y(5) = "Eton"
    y(6) = "Frank"
    y(7) = "George"
    y(8) = "Harry"
   
  'enters the x array into a worksheet
    For i = 1 To UBound(x)
        x(i) = Rnd
        Cells(i, 2) = x(i)
    Next i
   
  'enters the y array in column 3 of the worksheet
    For i = 1 To UBound(y)
        Cells(i, 3) = y(i)
    Next i
   
    Call DbleBubbleSort(x, y)
   
   'calls the first 3 values of y sorted according to x and enters them in the worksheet
    str = ""
    For i = 1 To 3
        str = str &amp; y(i) &amp; vbCrLf
        Cells(i, 1) = y(i)
    Next i

    MsgBox str
End Sub

VBA Snippets to Sort Arrays in VBA

Here’s another VBA snippet post. I find it handy to have a store of regularly used macros on the blog so I can access them at any time, not that I need them that often of course.

These particular snippets are useful routines for sorting arrays and can be called from other procedures. I’ve taken these particular ones from John Walkenbach’s book: Excel 2007 Power Programming with VBA. I’m working my way through Anthony’s VBA tutorials for excel modelling and array sorting is regular feature.

The BubbleSort code is easy to understand and therefore one of my favourites but the other 3 methods are much quicker for arrays with more than 500 entries.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Sub BubbleSort(list() As String)
' Taken from power programming with VBA
' It's a sorting procedure for 1-dimensional arrays named List
' The procedure takes each array element, if it is greater than the next element, the two elements swap positions.
' The evaluation is repeated for every pair of items (that is n-1 times)
' Change data type to As Integer if your array isn't text

    Dim First As Integer, Last As Long
    Dim i As Long, j As Long
    Dim temp As String

    First = LBound(list)
    Last = UBound(list)
    For i = First To Last - 1
        For j = i + 1 To Last
            If list(i) &gt; list(j) Then
                temp = list(j)
                list(j) = list(i)
                list(i) = temp
            End If
        Next j
    Next i
End Sub

You can test this macro with the following routine which pastes the results into the immediate window.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Sub SortTester()
   
    Dim x(1 To 5) As String
    Dim i As Long
   
    x(1) = "egg"
    x(2) = "apple"
    x(3) = "stuff"
    x(4) = "nonsense"
    x(5) = "1"
   
    Call BubbleSort(x)
   
    For i = 1 To 5
        Debug.Print i, x(i)
    Next i
End Sub

Here are a few more sort options which are a bit more efficient but unfortunately more complex.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Sub WorksheetSort(list)
'   Sorts an array by transferring it to
'   A worksheet and using Excel's sorting command
   
    Dim First As Integer, Last As Long
    Dim i As Long
    Dim FirstCell As Range, LastCell As Range
    Dim CurrCell As Range, FillRange As Range
   
    First = LBound(list, 1)
    Last = UBound(list, 1)
    Set FirstCell = Sheets("Sheet1").Cells(1, 1)
    Set LastCell = Sheets("Sheet1").Cells(Last, 1)
    Set FillRange = Range(FirstCell, LastCell)
    Application.ScreenUpdating = False
   
'Transfer the array to worksheet
    FillRange.Value = list
   
'Sort the worksheet range
    FirstCell.CurrentRegion.Sort Key1:=FirstCell, Order1:=xlAscending, Orientation:=xlTopToBottom
      
'Transfer range back to the array and clear range
    For i = First To Last
        list(i, 0) = FirstCell.Offset(i - 1, 0)
    Next i
    FillRange.Clear
    Application.ScreenUpdating = True
End Sub
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
Public Sub Quicksort(list() As Long, ByVal min As Long, ByVal max As Long)
'This technique works only with Integer or Long values.
   
    Dim med_value As Long
    Dim hi As Long
    Dim lo As Long
    Dim i As Long

   ' If min &gt;= max, the list contains 0 or 1 items so it
    ' is sorted.
    If min &gt;= max Then Exit Sub

  ' Pick the dividing value.
   i = Int((max - min + 1) * Rnd + min)
    med_value = list(i)

    ' Swap it to the front.
   list(i) = list(min)

    lo = min
    hi = max
    Do
      ' Look down from hi for a value &lt; med_value.
      Do While list(hi) &gt;= med_value
            hi = hi - 1
            If hi &lt;= lo Then Exit Do
        Loop
        If hi &lt;= lo Then
            list(lo) = med_value
            Exit Do
        End If

       ' Swap the lo and hi values.
       list(lo) = list(hi)
       
       ' Look up from lo for a value &gt;= med_value.
        lo = lo + 1
        Do While list(lo) &lt; med_value
            lo = lo + 1
            If lo &gt;= hi Then Exit Do
        Loop
        If lo &gt;= hi Then
            lo = hi
            list(hi) = med_value
            Exit Do
        End If
       
       ' Swap the lo and hi values.
        list(hi) = list(lo)
    Loop
   
    ' Sort the two sublists.
    Quicksort list(), min, lo - 1
    Quicksort list(), lo + 1, max
End Sub
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
Sub Countingsort(list)
'This technique works only with Integer or Long values.

    Dim counts()
    Dim i As Long
    Dim j As Long
    Dim next_index As Long
    Dim min, max
    Dim min_value As Variant, max_value As Variant

'   Allocate the counts array. VBA automatically
'   initialises all entries to 0.

    min_value = Minimum(list)
    max_value = Maximum(list)

    min = LBound(list)
    max = UBound(list)
   
    ReDim counts(min_value To max_value)
   
   ' Count the values.
    For i = min To max
        counts(list(i)) = counts(list(i)) + 1
    Next i
' Write the items back into the list array.
    next_index = min
    For i = min_value To max_value
        For j = 1 To counts(i)
            list(next_index) = i
            next_index = next_index + 1
        Next j
    Next i
End Sub
1
2
3
4
5
6
7
8
Function Minimum(list)
    Dim i As Long

    Minimum = list(LBound(list))
    For i = LBound(list) To UBound(list)
        If list(i) &lt; Minimum Then Minimum = list(i)
    Next i
End Function
1
2
3
4
5
6
7
8
Function Maximum(list)
    Dim i As Long

    Maximum = list(LBound(list))
    For i = LBound(list) To UBound(list)
        If list(i) &gt; Maximum Then Maximum = list(i)
    Next i
End Function

Top 5 iPhone Word Games

I’ve been devouring word games over the last few weeks and found myself dreaming obsessively about 4-letter word combinations. Now it’s time to relax and to bring you my review of the Top 5 iPhone word games of all time.

In my quest I’ve come across some awful games and some that just didn’t quite make if into my list of all time faves. I’ve made some notes on these towards the bottom of the blog post.

1. Word Warp
Word Warp

This isn’t the most attractive looking game and I’m sure the simple graphics on this screen shot won’t make you want to rush out to the iTunes store clutching your 99p. Nevertheless, it hits my Number 1 spot by virtue of the game play. Word Warp has the right balance tension and challenge and you get to feel as though it is testing your mental nous rather than just your nerves of steel.

In order to progress to the next level you have to uncover at least one 6 letter word and after that its down to revealing as many of the remaining words as possible. I like the fact you can see exactly how many words are available, it spurs you on for the final few seconds.

If you find the 6 letter word you get to move on to the next level and build on your score. Fortunately you can leave the game at any point and return in the middle of a challenge without having to start from scratch again.

2. Moxie
Moxie

Moxie gives Word Warp a run for its money and very nearly came in first. It’s Lynn’s favourite by far and she hasn’t even touched Bejewelled 2 since this appeared on my iPhone.

I think it’s quite an unusual game, I’ve certainly not seen anything similar yet.

It’s rather like a game of patience. A random letter appears in the top right and you have to place it or pass it. The idea is to build words horizontally, changing a letter at a time. Having created a word you have to be careful not to break the chain and create a “twaddle” which will result in lost points. Additional points are available for “Moxie” words which can be animal, vegetable or mineral, depending on your game choice.

It’s an excellent game, intellectually stimulating and without time constraints. They offer a free Moxie lite version but I bought the main app after my first trial. Go for it.

3. Lexic
Lexic

Now Lexic is a very stylish game. The screen graphics are beautiful and it is one of the few games that I want to play with the sound on. The tiles make a wonderful ivory clatter as they shuffle, giving the whole game a quality vintage feel.

There are loads of games of this style around, sliding across the screen to make ever longer and ever more words. Lexic offers the most accomplished version I’ve tested though. The selection (and rejection) of letters is effortless and with 4 quite different game options available it is an extremely good value game.

This screen shot comes from the Quest option. The idea beyond scoring as many points as you can from the selection of words is to collect all the gold tiles. In this level I have to collect 3 before I can move on but this increases as you step up the levels.

To add complexity there are a number of tile types. The “I” with the red dots will explode after 5 moves if I don’t get rid of it and the game will end. The steel plated “O” remains in-situ while those around it will cascade down and the red “A” will spin to reveal another letter after each go.

There are quite a few more tile types as well. I’ve come across one which spreads itself like the plague. Try getting rid of an exploding “Q” while it is surrounded by an infectious “F”. Quite a challenge.

Another of Lexic’s game option is Blackout which challenges you to clear an entire screen before you can reach the next level. Selected word tiles disappear so you have to think carefully about the few tiles that remain towards the end. You start the game with 10 explosives to clear stubborn letters but they soon run out if you don’t play strategically.

The Stasis option is your standard timed, find as many words as you can, type game.

Lexic is an extraordinarily stylish game.

4. Wurdle
wurdle

Wurdle offers a 5*5 grid and lets you loose finding words and that is pretty much it, no whizzes and bangs, just a good solid well presented game.

It’s simplicity is attractive and it does the job very well. Slide to select, release to enter or reject, its easy. I’ve knocked a number of games out of my top 5 because they can’t get this part of the game play right.

I like the list of entries that appears at the top and at the end of the game you can see the list of all possible words along with the location on the grid.

If this is your style of word game I don’t think you will be disappointed with Wurdle.

5. Word Jong
WordJong

Word Jong is another unusual game, this time built in the style of Mahjong.

Unlike Mahjong, where you have to match pairs, Word Jong requires you to spell words. The similarity in the game styles is that you can only select edge tiles and that the goal is to end the game with all the tiles matched and removed.

There are a few aids along the way, such as the occasional wild card and a bomb to remove annoying tiles but even so its a tricky game.

It’s another game without a time restriction so you can ponder to your hearts content and relax over it.

Word Jong is styled as a daily challenge and the menu screen is laid out as a calendar where you can select the days puzzle. I personally find this a bit tiresome but I suppose it does mean you can go back to a particular puzzle or challenge a friend with the same layout. You can go back to any date so you aren’t limited to one puzzle a day.

The Also Rans

Here’s a brief mention of some of the other word games that didn’t make it into my Top 5 list of apps.

Scrabble – you will already know if you are going to like this one. It is a fabulous and faithful conversion of the board game, if you like scrabble then go for it. Controlling the counters and the screen is a breeze and the game play is effortless. I haven’t ranked this one because I see it as a game deserving of its own category, it’s not your 5 or 10 minute filler game like most of the other word game apps I’ve reviewed here.

Codeword – I play this game regularly and it lulls me off to sleep nicely. I used to buy the Times just for the codeword but I am currently boycotting Mr Murdoch so am grateful for the electronic version that will churn out as many new puzzles as I can handle. Although it is one of my stalwart games I haven’t put it in my Top 5 iPhone word games list as I don’t think it translates so well to the small screen. Ideally with codeword you should be able to see the whole grid at once but at that resolution I can’t make out the numbers. You can zoom in of course but then you miss out on the essential overview. If you like codeword I think you’ll be happy but you do have to be a little forgiving of the navigation.

Bookworm – I’ve read some outstandingly good reviews of this game but I can’t understand their enthusiasm, I personally feel robbed. It’s a Pop Cap game and is touted as a match for Bejewelled 2.

It is not. Lexic comes a lot closer to the Bejewelled style of play and carries it off with more finesse.

I can’t say it’s a terrible game but it doesn’t flow well and as I left play school quite some years ago I don’t feel the need for a talking worm on my screen. Word selection is tiresome as I have to tap to enter and unslide to reject and really there are much better word game options available for less cash.

Scramble – This is fun and offers itself up for a good two player challenge game, either by pass and play or live hook up over wifi with others online. This adds the competitive challenge that the other games miss out on.

I haven’t given it a top rating because it seems to accept so many weird words. I had considered it a flaw with its dictionary but maybe the problem is mine and I just need to expand my small word vocabulary.

Word Fu + – This game promised a lot but I just find it too embarrassing to play. It’s your standard make as many words as you can out of an assortment of letters game with the addition of playing along to the accompanying sounds of karate chops and martial art grunts. You have to slap your iPhone down in a Kung Fu styling to accept your word choice – not something I want to do in public and I don’t really want to risk slamming my phone into something solid. I can’t complain too much, this was a free game application but I’ll be deleting it very soon.

Boggle – This is one of the original word games but try as I might I just cannot like this iPhone version. My first complaint is that I have to shake my phone to start and then it throws the die up in the air to jumble. I don’t like shaking my phone around and would prefer a subtle tap option. The second and more sever complaint is the annoying selection method. Where I have to tap dice individually and then tap the end to select or the beginning to reject. It is just not smooth and I can’t be bothered to finish a game when I have so many better examples on my phone.

Top 5 iPhone Games

I thought I’d share my recommendations for what to fill your new iPhones and iPod touch machines with, starting with my take on the top 5 iPhone game applications available from the iTunes store.

My games screen tends to change fairly regularly as I drop the duff purchases and curse the reviews that led me to part with my hard earned pennies.

The 5 top games I’ve selected today have lingered for quite some months, and be warned, they have wasted a good chunk of my life in that period.

Here’s a shot of my current games screen.

Mahjong Solitaire
Mahjong Solitaire

This is the most played game on my iPhone. I’ve tried out quite a few mahjong apps but so many of them are truly shocking. It must be a difficult challenge to get so many detailed little tiles on the screen but I’ve found this version to have the clearest representation without the fuss of changing inclination or rotation. You can zoom in of course but the standard display works very well.

There is a free Mahjong Solitaire Lite version so try that out first and move up to the fully fledged app when you feel the need for more layouts.

My only gripe with application is that it is timed (see the green bar) and I prefer to play mahjong when I need to chill out and relax. A freestyling option would be a good enhancement I think.

Bejewelled 2
Bejeweled 2

Bejewelled is an all time favourite of mine from my days in the lab. I would spend hours on my laptop matching the coloured jewels while my experiments performed their own little miracles in the background.

This iPhone app is superb, a very faithful representation.

I’ve found myself standing out in the street at night, huddled under a street lamp trying to beat a previous high score as I come home from work. This is high stakes, high stress stuff and extremely addictive – handle with care.

Fieldrunners
Fieldrunners

The idea with this game is to lay out your weapons or towers in the right places to destroy the ant like invaders who try to get from one side of the screen to the other.

It’s a very simple concept but amazingly engaging. The sound effects help a lot as bombs explode, helicopters whir and soldiers croak it so I recommend playing this with your headphones on. Beware not to miss your tube stop though.

Airport Mania
Airport Mania: First Flight

I must have spent hours playing this game when I first installed it and now feel fully prepared for a role as Flight Traffic Controller at Heathrow.

The general idea is to land the planes, unload your passengers and get the plane back in the skies as soon as possible. At times you may have to refuel and send the planes to the workshop, all while dealing with multiple runways, inclement weather conditions and too many planes. They have a tendency to get agitated if you make them wait too long at any stage.

The levels get pretty intense and here I’ve started to let things get a little out of control with planes backing and sitting needlessly idle.

For a while I heard a lot of hype about Flight Control but it is just not as accomplished as Airport Mania, don’t let the child friendly graphics fool you, this is a very adept game.

Galcon Labs
Galcon Labs

I’m at a loss how to explain this arcade game.

You are basically directing your ships to colonise other planets, produce more spaceships and ultimately take over the world.

The graphics are very simple but then the best games often are simple. It is a fast pace gamed which is remarkably strategic in its outlook. I haven’t done it justice with this rambling but I don’t think you’d be disappointed if you gave it a go.

So, there we have my top 5 iPhone game app recommendations, what do you think, have I missed any brilliant games? Do I need to reassess my game screen real estate?

Blogpress iPhone App

I’ve been a little disappointed with the latest update to the WordPress 2 iPhone app for blogging on the fly.


Not that I blog on the fly that much but I do like to fiddle around with drafts while I’m at work (lunch time only of course) and it’s the draft functionality that appears to be up the spout for WordPress2.

Time to try Blogpress which promises some useful functionality such as support for picassa and Flickr web albums, image upload to your blog server, support for landscape mode and posting to multiple blogs and blog platforms. It also supports drafts which is why I’m here in my local caff, tapping away at a review of sorts.

You’ll be able to make your own aesthetic judgements when the post is published. I am able to position the photos in amongst my text (so not just at the end as with WP2) but I don’t think I can control allignment or output size and I haven’t yet found a preview option.


Here’s a shot of the writing screen. If I rotate to landscape mode the ability to scroll is hampered by the presence of images – it gets stuck and doesn’t show the image.

Scrolling is fine in portrait mode though and I’m typing away quite happily.

Tags and categories are easily accessible and I think I can create new ones from the edit screen. iPhone is a new tag so I’ll check for it after publishing.


I’ve found this post a doddle to create so I better publish it and get back to work.

– Posted using BlogPress from my iPhone

Location:Balham High Rd,Wandsworth,United Kingdom

3 Twitter Tools to Test

Here are 3 tools to enhance your twitter experience. Let me know if you use them already or have found better ways to achieve the same functionality.

I currently let friendfeed handle the linking of flickr uploads to twitter but it’s not ideal. FF alerts the world to my first uploaded image in any batch and I can’t control whether it should be twittered or not. Twittergram on the other hand will only set up a tweet post for images that I have tagged with the word twitter. That has another bonus – if I’ve bothered to tag the photo I will probably also have named it so it will prevent all those messy img2036.jpg style links.

TweetBeep can be a great ego boosting device, sending email notifications whenever you, your website or products are mentioned in a tweet. It’s even able to pull out your website address from a shortened URL, although the domain alerts are only available for premium subscriptions. Of course it doesn’t have to be all me,me,me you are at liberty to enter any search term of interest for your regular notifications.

Favrd is a website providing a time line of all the most favourited tweets and as such provides a very handy way to pick up a few more interesting tweeps to follow. I’ve just found the gay @DerrenBrown – welcome.