Tuesday, October 07, 2008

Using Outlook like Gmail

I love GMail's 'Archive' feature. I wanted the same in Outlook which I am currently forced to use. So...

Sub Archive()
Dim myItem
For Each myItem In Application.Explorers.Item(0).Selection
myItem.UnRead = False
myItem.Move (Application.Explorers.Item(1).CurrentFolder().Parent.Folders("Archive"))
Next
End Sub


This little macro marks the current selected item(s) read and moves them to the 'Archive' folder (that you will need to create at the top level).

I also added a button to run the macro and called it "&XArchive" so I can go Alt+X to archive the currently selected mail item.

Works for me..
If anyone can be bothered to get it to work for all selected items that would be cool. Done...

Oh, I'm using Outlook 2000. You may need to change the macro for other version.
Let me know :)

Wednesday, October 01, 2008

Don't Drop the Bar!

You're hiring... you make a list of mandatory skills and some preferred ones. You interview someone... they don't get ticks in all the mandatory fields... so easy decision. They are mandatory! You have to say no.

Now... some time passes... you are interviewing people, but no-one seems to be passing the bar. Time is running out. You have to staff your project or it won't be viable. What do you do?

What would you do?

My thought for the day..

Staffing a project with the wrong people WILL LEAD TO FAILURE! Usually a slow, expensive failure. Having the project canceled because it wasn't viable is a much better business decision, and in the long run may save the company (and your job).

Sunday, September 14, 2008

A Nice Summary of Ruby MetaProgramming

Check out this simple introduction to metaprogramming. I have an article bubbling away in my head about why in .Net I need tools like NDependencyInjection, but in ruby you don't.

You really do need tools like NDependencyInjection in .Net by the way.. I'll explain that too.

MapReduce in Ruby

Some guys at Google came up with this idea of specifying a set of problems as two stages processes.

Step 1: Map (come up with a mapping function that takes a key value pair and maps it to a new set of key value pairs)
** do this for all key value pairs **
Step 2: Reduce (for each of the new key values, take all values and reduce them down to a single value)

Any problem that can be broken down into these steps can be parallelized really easily and scales well by adding more boxes.

An example may be 'Count word occurrence on the web'
Mapping: [word, url] => for each occurrence of 'word' in document@url add an item to an output hash for value 'word'
Reduce : [word, values] => number of items in value list 'values'

Anyway... lots of problems can be defined in this way... the code that runs your map/reduce functions for you can solve all sorts of problem handling networking issues, machine loading, etc...

Blaine Cook wrote a version in ruby here. Or see mapreducerb@github

I can't wait to have a play with this.

Saturday, September 13, 2008

Maximize window in osx

Finally someone has got some scripts together to maximise windows in osx.

OSX has this weird idea that you want to see lots of windows at once. "Maximizing" a window therefore means make it big enough to show the content of the window, but not too big. This leaves the application to decide how big is big enough. Some apps do this fine... others (like Preview) keep getting it wrong.

Grab these scripts form git hub. From a terminal type "rake install", then type "rake install_fastscripts" so you can map the scripts to keys easily. Once you have this working map Maximise to something like Ctrl + Apple + M and you can now make one app take over the whole screen.

THANK YOU TopFunky THANK YOU!

A couple of the scripts are hardcoded to use Terminal, so I have forked the repository for my own edification. I also want to fix a problem with the scripts expecting the draws to be on the right hand side of a window.. which it isn't always.

GitHub Projects