Skip Navigation

Photos of New Office Build From Two Years Ago

While reminiscing yesterday I uploaded a set of photos of the destruction and re-build of the garage, which became Rockall HQ. You can see all the photos here.

Some of you DIY geeks might like a look. It was also an excuse to test out the Upload button in Picassa, which works well and seamlessly integrates with my existing Google account. Nice 'n easy. Just how I like things to be.

Two years on and I have no regrets in spending 7k on a new office. It was definitely one of my better ideas and worth every penny. Without an out-of-the-house office my productivity would be almost zero. You can't work at home when you have three kids 3 and under. Not a chance.

People often say to me "I bet you need to be really disciplined to work from home" to which I normally say "Not really". I just treat it as much like a normal job as I can. Leave the house as much before 9am as I can and come back in just after 5pm.

If you're wondering how I know it came to 7k or where all the money went then here's the log of the costs I kept:

Window 108
Heater and Lights 150
Lock 160
Skip 145
Skip 145
Sand 101
Blocks 270
Concrete for footings 250
Screwfix - misc 62
Labour 1200
Cement 10 bags of 25
Metal mesh reinforcing 40
B&Q - Misc networking bits 65
Concrete for slab 310
weather strip for door 8
Large lintel and wood 50
Lintels and bricks from Jewsons 128
Plastering 475
Blocks 80
Door 38
Door frame 45
Rendering 760
EPDM (rubber) for roof 341
Wood for roof 480
Midi Skip 75
Screwfix - misc 165
Jewsons - fascia wood etc 157
B&Q - up-n-over frame, fixings etc 37
B&Q - Guttering et misc 94
Laminate flooring 84
Masonry paint 36
Wickes -- Gate and wood 70
SUBTOTAL 6154
Furniture for office 900
TOTAL 7054

My original budget was 5k, but I think that was a little unrealistic. As you can see it soon adds up.

It all leaves me wanting to demolish and rebuild something else. I love a good "project" me.

Comment Icon 2/3 Comments Read - Add | Fri 12 Mar 2010 | Open »

Twas Two Years Ago

Anybody remember what's going on here?

 image

How time flies...

Comment Icon 1/8 Comments Read - Add | Thu 11 Mar 2010 | Open »

Flex: Using A SharedObject to Remember User Settings

Try this:

  1. Open the Contact Manager app.
  2. Change the columns that are visible by using the "column chooser" button, as below:
     image
  3. Quit the browser.
  4. Re-open the browser and visit the app again.
  5. Notice how the visible columns are the same ones as before you closed the browser!

The View component I've been developing recently now uses the Flex equivalent to the cookie - the SharedObject - to remember your choice of columns across sessions.

Note that the same column preferences are shared across all browsers on your PC as the SharedObject is per Flash player install rather than per browser.

For now it won't remember your preferred order of columns (did you know you can drag and drop columns to change the order!?). I'll work on that. The updated demo now remembers the order of your columns! Nor does it remember the width of them. I'll work on that too.

In the mean time here's the updated source code for both the Domino database and the Flex source code. Enjoy. More to come...

...can anybody think of anything else this View component is lacking before I can consider it a universal solution for all your Notes-to-Flex migration tasks?

Comment Icon 4/9 Comments Read - Add | Wed 10 Mar 2010 | Open »

Flex: A Toggle-Style Column Component for Your Views

Adding even more functionality to Flex "view" I've been building I've now added a "toggle column" to the list of available column types:

image

The idea is simple. You click the icon in the column to toggle a field value on the back end document. The icon in the view is either on or off and is dictated by the value stored in the field. It's an idea I've mentioned before which I've now made into a re-usable and customizable component.

In this example I'm using the idea of being able to mark certain contacts as favourites and you can see a working example in the Contact Manager app. The component itself can be re-used in almost any scenario though.

Adding a toggle column to a View is as simple as adding one line of XML to the View's configuration, which is specified in the backend Domino database, as discussed previously.

The XML looks like this:

image

As you can see it's fairly easy to configure and customize. You can easily change the icon, field name and what the "on"/"off" values should be for the field. You can also add a tooltip for the column.

The Column value of "starred" refers to the name of the XML node of each document which holds the field value we're interested. When the grid is first loaded it will show the icon as on or off depending on the value in the "starred" node.

Clicking on the toggle column on sets the value of the field called "Favourite" to "1". Clicking it again sets the value to "".

To see the XML used in the demo open the Contacts view as XML. This is the XML format that defines the structure and data of the View component. Simple, no?

Taking It Further

If you want to go further than simply modifying a single field at a time and want to perform a more involved action then you can do what I tend to always do and add a self-referencing "computed for display" field to the backend Domino form called something like "Action". In the WQS agent you can then check the value of this field. If the value is something like "Approve" then you can run a set of actions against the document.

In this scenario the XML data for each row just needs to define a true/false value to let Flex know whether to show the icon as on or off depending on whether it's approved or not. The value for the fieldValueOn would be "Approve" and for fieldValueOff it would be "Unapprove". The actual XML data for approved documents would be "Unapproved" and for unapproved documents the column value would be "Approve". If that makes sense.

Summary

It's the simple little components like this that show how powerful Flex can be once you get going with it. With the View component and the components I'm adding to it I feel like this is getting to the point where it's a viable product that can be re-used in live applications. In fact I already am using it in live applications for paying customers.

In the next couple of days I'll update the downloadable version of the app with updated Flex source code. Before I do I want to blog about another addition to the code -- the ability to store a user's choice of columns across sessions using the Flash/Flex equivalent of cookies - the SharedObject. Give me a day or three.

Update: Here's the updated source code and Domino db.

Comment Icon 3/4 Comments Read - Add | Tue 9 Mar 2010 | Open »

Domino's POP3 Server Breaks HTML Emails by Removing Characters

There's a bug when sending and retrieving HTML email from Domino that has been plaguing me for years now. Now I've finally decided to take the time to investigate fully and find a fix.

First, imagine the code below:

While i<100                 
        j = 0
        html =""
        While j<i
                html = html + "split string "
                j=j+1   
        Wend
                                
        Set mail = New Email()
        mail.Subject = "Test " + CStr(i)
        mail.HTML = html
        mail.Send("jake howlett")       
                
        i=i+5
Wend

What this does is send me 20 test emails. Each email is increasingly longer than the one before it and they all just repeat the words "split string" over and over.

The code to send the email is based on my Email class. All it does is create a multi-part MIME message. Nothing out of the ordinary. If you're using the MIME classes to send emails then this probably applies to you.

At some point in the loop the length of the message will get to such a size that something very worrying happens, as you can see below:

image

Notice the missing p?!

The Problem

From my investigations I've concluded the following:

If you use a 3rd party mail client (like Thunderbird) to download a multi-part HTML email from a mail file on a Domino server using POP3 then the POP3 server will remove the 655th character and put a line break in its place.

Looking at the very same email in the original mail file - using the Notes client - there's no missing character.

What I've also noticed is that it only removes the first 655th char. Not every subsequent 655th char in the whole string.

Obviously this can be very, very bad. At it's least worst, like in this example, it just looks like a typo. However, I've had numerous bug reports because it's broken the string inside an HTML tag, resulting in un-clickable links or -worse still - emails that just show raw HTML.

The problem seems only to occur when sending emails where the HTML content is made up of one very long string. I guess using very long strings is generally a bad idea in any case, but there's nothing actually wrong with it, and nothing half as wrong as the server removing characters.

The Solution

What we need to do is avoid very long lines of HTML code in the email. The obvious solution is to add line breaks in the HTML as you build it in your code.

Unfortunately, in my case, I have way too many instances of code sending HTML email to make it practical to go and add new line breaks in to each email. Instead, what I did was put a fail-safe in to the Email class which sends the email. At the point it adds the HTML to the email it adds a new line at every point an HTML tag is closed, like so:

Call stream.WriteText(Replace(Me.str_HTMLPart, ">", ">"+Chr(10)))

There's still a slight chance that there could be a long string that avoids this rule, but it's unlikely enough for me to feel happy this has resolved the issue for now.

Summary

So, you've been warned. If you're sending HTML emails to a Domino server, make sure you split the HTML string down in to sizeable chunks so that users who access their email via POP3 don't see broken HTML.

It all leaves me wondering why on earth the POP3 server would replace the 655th character in the first place. Assuming it does of course. My investigation wasn't exactly extensive but, from what I can tell, it definitely looks like it does. Why though? What's significant about 655? It's not like it's a base 2 number or anything.

Comment Icon 9/20 Comments Read - Add | Wed 3 Mar 2010 | Open »

 icon Page 1 of 274Last » | Next ›