June 12th, 2009
Am simply outraged that some clever bugger decided to launch an iPhone app that talls you the name of sushi dishes, and they decided to call it sushiguru. Had they never heard of Google before naming their product?
Ponders: are they, in fact, infringing my trademark…?
Posted in Uncategorized | No Comments »
February 26th, 2009
Had a hair cut the other day. It’s not an occasion that happens very often in my life; I have little of it left, though my wife did persuade me to grow it a little as by usual home-done buzz-cut was making me look more and more like either:
- A deranged, escaped mental patient; or
- A deranged, escaped convict
Either way, small children would scream if they saw me and old ladies clutched their handbags tighter. I did, however, like the ‘velcro head’ feeling that the close cut gave. Anyhow, I had the cut the other day (short back’n’sides and don’t take too much off the top…
At the end of the cut, my life hit an all time low. The barber got out his wee battery powered trimmer, neatened up the edges around my ears and neck, then stood back and said, in an expectant voice: “eyebrows?”
That’s that then. Back to home cuts from now on.
Posted in Uncategorized | No Comments »
February 4th, 2009
Aargh. Came across an old problem with a spreadsheet today; trying to create and then write values to a dynamic array in VBA.
The position is that I’m trying to write email addresses to a file for a bulk mailing; the mail client particularly likes the local part of the email addresses in a comma delimited list, and the mailing lists are dynamic in nature - I might have 10 on one occasion and 1000 on another.
Problem:
- Excel doesn’t like one dimensional dynamic arrays
- Once you have 1000 rows in a spreadsheet of unique email addresses you need to concatenate them with a comma
- This is difficult to do in a single cell as you can quite quickly exceed the char limit for one cell
- It can be done by splitting the concatted addresses across multiple cells, but this isn’t a sure-fire winner
- Would be much easier to stuff all the values into an array and then simply join the array with a comma.
Found a work-around in amongst google code etc which goes like this:
Open file_to_open For Output As #1
Dim addr As Variant
addr = Sheets("Sheet1").Range(Cells(2, 1), Cells(uniques + 1, 1)).Value
ReDim addresses(UBound(addr, 1) - 1) As String
For i = 0 To UBound(addr, 1) - 1
addresses(i) = addr(i + 1, 1)
Next i
print_addresses = Join(addresses, ",")
Print #1, print_addresses
Close #1
This may not be the most elegant solution in the world, but it works for me (and it’s fast).
By declaring addr as a Variant type it can become a dynamic TWO dimension array, which is then populated with the values of the addresses. i can then step through the dynamically created array to create a single array of known size, and then join it with the comma.
There’s probably a way to do this without creating the two dimension array first, but I couldn’t find it, or get one to work, so this’ll do for me 
Posted in Uncategorized | No Comments »
January 15th, 2009
Since my websites have evolved into 2.0 territory I wanted a nice popup css/js box for displaying things in and completing forms etc. Unfortunately, most of my ajax driven sites were (and continue) to be based on the excellent prototype javascript framework, and thickbox et al use the jQuery framework.
However, I’ve since found that greybox, together with prototype and scriptaculous (or the combined compressed version protoculous) offers even more functionality and I’m a happy chappie.
sg
Posted in Uncategorized | No Comments »
January 15th, 2009
It never ceases to amaze me at just how crap I can be at writing. Honestly. My last post was March 4th…
It’s a new year, and although I spent the best part of the first week of it off with a cold (and I still have a head full of snot) I’m going to attempt (#4?) to keep up with the blog this year. Possibly weekly. Perhaps daily (probably not). Though it might just be when random thoughts take me.
So what’s new this year? Work is busy; three sites on the go just now. We have a builder for the house, but have to do the demolition of existing structures and dig out for a new retaining wall ourselves. I love spades.
Speaking of spades, poker is the new game for me, and I’m getting pretty good (read lucky) at Texas Hold ‘em, having make 7k out of 2k in the first few days. It’s rather addictive - good job I’m not the sort to actually want to part with cash. Did you know that casino poker chips are made out of clay?
We’re also now the proud owners of a tropical fish tank, thanks to freecycle, and have a gold gourami and some sort of pleco in it. Fish are fun
sg.
Posted in Uncategorized | No Comments »
March 4th, 2008
Of just how damned lazy I can be. Microsoft have this new toy: Windoze Live Writer, which can log into and post blog entries on my own blog.
Why oh why do I need this, when the other way to do it is just to open my browser and enter the blog entry into the blog directly. I guess I just like toys…
Posted in Uncategorized | No Comments »
February 8th, 2008
I was once in a meeting with my first boss out of university when someone came into the office and asked him a banal question. I will never forget the way he rolled his eyes and let out a big sigh, sat back in his chair and looked at me. He stared back at the bit of paper that had been handed to him and said: ‘why do people insist on wasting my life minutes?’
How many times have I found myself asking the same damn question…?
sg.
Posted in Uncategorized | No Comments »
February 8th, 2008
After being a failed blogger many times (I’m just not disciplined enough to keep up a blog as an ongoing project), I thought that I’d install one of my own to procrastinate further in my own space. Yay.
Well, anyhow, I’ll put up my rambling, muse on the meaning of life, complain bitterly about the state of the nation/roads/poorly documented software/the strength of the coffee in the office etc etc.
Well. That’s that done then. I’m off to watch the rest of Back to the Future III which I’m currently watching out of the corner of my eye while getting Wordpress to run. Damn version 2.3.3; I’ve wasted quite a few Life Minutes on that installation tonight…
sg.
Posted in Uncategorized | 1 Comment »