Monday 29 September, 2008

S. Palin mistake

Filed under: General, Politics

I bring you potential future US Vice President Sarah Palin.

Oh my days.

Thanks to Francis for pointing this one out, Katie Couric's CBS interview.


Posted by dan at 9:47pm | Permalink | Comments (0) | Trackbacks (0)

Circuit breakers

Filed under: Random thoughts

Is it illegal to do a full 360° circuit of a roundabout? If not, why is there a gap in their signs suggesting to drivers that they shouldn't do a full circuit?

Roundabouts


Posted by dan at 9:14pm | Permalink | Comments (3) | Trackbacks (0)

Shit British bank names

Filed under: Random thoughts

Today, we continued to hear the revelation of news of banks' struggles. Wachovia fell to Citigroup, while the Benelux bank Fortis received a £9bn cash injection from the countries' taxpayers. And the Bradford & Bingley (originally mis-typed Bungley) was nationalised.

I have to say, Bradford & Bingley is a bit of a rubbish name for a bank, especially compared to the likes of Fortis and Wachovia.


Posted by dan at 9:08pm | Permalink | Comments (0) | Trackbacks (0)

Student claims deadline extended

Filed under: Random thoughts

As I've said before, the BBC is hamstrung by the shortness of the surfaced titles of articles. By shortness, I mean minimal length, as opposed to abruptness.

Today's example, student claims deadline extended, brought to mind the image of a student confirming to the press that his/her dissertation deadline had indeed been extended, after much media speculation. And a much more enjoyable that would have been.


Posted by dan at 8:59pm | Permalink | Comments (0) | Trackbacks (0)

Monologue of the day

Filed under: General

Why is a vagina called a box? I can only imagine it's because you put things in it. But it's not square; and it doesn't have hard edges.

The original vagina monologue?


Posted by dan at 8:57pm | Permalink | Comments (4) | Trackbacks (0)
Saturday 27 September, 2008

What's minimum wage again?

Filed under: Life

I just got off the phone from Ocado's customer services, trying to figure out when our delivery, scheduled for 20.30–21.30 tonight, will arrive.

This followed a garbled conversation with the driver who threw in keywords like traffic jam, rescue van and might be able to get there in two hours among other, unintelligible ramblings.

The customer services lady has kindly given us £5 credit towards our next shop for the inconvenience. Or £2.50 per hour of me waiting. Current minimum wage is £5.52 per hour.


Posted by dan at 9:36pm | Permalink | Comments (1) | Trackbacks (0)
Friday 26 September, 2008

Poker justice

I played poker last night. Texas hold 'em, apparently. The hand you bet against is the best five-card hand you can muster from two cards dealt to you and five that are dealt face-up on the table.

You're dealt two cards each. Then there's a round of betting. Then three cards are drawn, all face up on the table. Another round of betting. Card four on the table. Betting. Card five. And final betting.

£10 was the initial stake, with unlimited buy-ins before 10pm, after which, you bet until you won or you were eliminated.

Just before midnight, the nine players had been whittled down to two, of which I was lucky enough to be one. The £200-worth of chips (and supplementary hand-written 100-chip notes) were pretty evenly divided between the two of us, so instead of battling through the night we thought it wise to split the pot. £80 up on the night: not bad at all.

The reason for the post, however, is to question one specific feature of the game. If a player runs out of chips during betting, they can still stay in for that round, not being obliged to bet thereafter. If they win the round, then their winnings from each other player are capped at their own bet. So if Alberto has bet his last 25 chips, Balthazar 70 (before folding) and Cecilia 90 (still in), then Alberto winning means that they will take 25 from each of the other two players.

At first glance this seems quite fair. But the scenario has always troubled me, and I've just realised why. Let's assume that the three players' hands have equal chances of winning, and it is merely the playing styles of the players that are at odds.

If Balthazar and Cecilia get into a bidding war after Alberto has maxed out, Balthazar folding when Cecilia raises that bit too much to justify him continuing, then the increased investment by Balthazar and Cecilia has benefited Alberto, as he now only has to beat one hand rather than two. So Alberto has benefited from the additional investment of Cecilia, through it driving Balthazar out of the game.

Further, continued investment from one of the cash-rich players cannot result in them winning by default—they will always have to beat Alberto to win the round.

The trade-off is that Alberto can win fewer chips than Balthazar or Cecilia. But there is no trade-off for Balthazar or Cecilia.


Posted by dan at 9:53pm | Permalink | Comments (0) | Trackbacks (0)
Wednesday 24 September, 2008

Google Spreadsheets to Google Maps: soup to nuts

Last week, I described how I'd used a Google API to allow a Google Spreadsheet to drive items appearing on a Google Map. I was proud of the work. Rob was less impressed, instead focusing on the fact that the latitude and longitude had to be looked up and input manually based on the postcode or town being mapped. He's never impressed, that boy.

In a comment on the original post, Mercedes Car Finder (a person, it seems) suggested a Google formula, as follows:

=ImportData("http://maps.google.co.uk/maps/geo?output=csv&q="&A1)

where A1 contains the item to be looked up—the postcode or placename. Let's assume the formula is entered into B1.

The CSV file resulting from the URL contains four fields. For "York", the first two numbers are 200 and 4. (I have no idea what these are. Anyone?) The last two (53.957702 and -1.082286) are the latitude and longitude respectively.

So the ImportData function brings back all four values, but only stores the first of these (200) in the cell containing the formula, in this case B1. The subsequent three values are accessed through the formulae

  • =CONTINUE(B2,1,2)
  • =CONTINUE(B2,1,3)
  • =CONTINUE(B2,1,4)

Given that the CSV file returned has a single row of data, these formulae bring back the mysterious 4, 53.957702 and -1.082286 respectively.

Unfortunately, Google doesn't allow you to create latitude in one step through the following syntax:

  • =CONTINUE(ImportData("http://maps.google.co.uk/maps/geo?output=csv&q="&A2),1,3)

But nonetheless, if I have a column of postcodes or placenames, all I need is three columns of formulae (the ImportData formula containing the 200, the CONTINUE (3) formula containing the latitude and the CONTINUE (4) formula containing the longitude) to feed the map.

Fabulous. Thanks, Mercedes-selling-person.


Posted by dan at 10:19pm | Permalink | Comments (2) | Trackbacks (0)
Tuesday 23 September, 2008

Angry Dan

Filed under: General, Life

I'm watching a fabulous documentary this evening about anger, being guided through the emotion by Griff Rhys Jones, himself an angry man.

Coincidentally, I got angry at work today. I say coincidentally because I rarely outwardly display my anger.

I got angry with my IT supplier, I got angry with my colleagues, and I got angry with myself. I raised my voice, I got emotional in a meeting (in this case, as has been the case on occasions before, anger displayed itself as passion), and I was unnecessarily terse in my responses to people, both verbally and in emails.

While some of the anger was justifiably directed towards incompetence, some was a direct result of pressure and workload as we head towards a major software release this weekend.

Apologies if I offended anyone unjustifiably.


Posted by dan at 9:41pm | Permalink | Comments (7) | Trackbacks (0)
Sunday 21 September, 2008

Flickr vs. Picasa

I don't know Google's Picasa. I know of it, but don't know it. But Kumar yesterday pointed me to it, primarily owing to its recent incorporation of software that identifies people in photos based on other photos of that person. A colleague showed me riya three years ago, similar software, and I was blown away.

This is big. No longer do you have to tag group photos with people's names. It's done for you.

It's a compelling reason for me to leap from Flickr to Picasa, but having just invested $25 for 15 months of Flickr Pro membership, I'm loathe to switch. Adding to that the fact that more and more of my online world is being controlled by Google—Mail, Calendar, DNS, web analytics, search, mapping—means I won't.

But Yahoo! needs to do two things with its Flickr offering: sort out its information architecture and incorporate face-recognition software. Maybe riya itself?

As for the IA, it's dreadful. Although for an uploader (or uploadr?), there is a clear concept of the hierarchy into which my photos are uploaded, I don't this is clear to the viewer. And the concept of adding friends who are already members of Flickr without inviting them to join Flickr by email address seems not to exist—unless I'm missing something.

Someone needs to take a step back from the technology and work out what people are trying to achieve through their photos, both as an uploader and a viewer. Until this happens, the UI will be clunky and unintuitive, and it will continue to lose ground to picasa, and once again, Google will be our default choice.


Posted by dan at 9:28am | Permalink | Comments (0) | Trackbacks (0)
Saturday 20 September, 2008

Giraffe, rhymes with graph. Oh never mind!

Filed under: Random thoughts

In one of my daughter's bedtime books, I have to rhyme giraffe with scarf. Being a northerner, this troubles me hugely.


Posted by dan at 8:39pm | Permalink | Comments (2) | Trackbacks (0)

Streetcar: is it worth it?

Filed under: General, Life

Last week I took a week off work. And hired a Streetcar for the nine day period, at an overall cost of £289.43. That includes petrol, insurance and parking round the corner from our home. It also takes into account a £5.95 reduction for taking it through the car wash, which my daughter loved!

Over the course of the week, I drove 276 miles (444km), averaging £1.05 per mile (65 pence per km). Let's stay metric from hereon in.

Allowing for a combined fuel consumption of 6.7 litres per 100km travelled and an average petrol cost of £1.15, petrol would have cost me £34.22. My parking would have cost £3.20, and my road tax £4.19, both pro rated from the annual charges of £130 and £170 respectively. confused.com tells me my insurance on a VW Golf 1.6 would be around £750 per year, or £18.49 for the nine day period.

If we say the car cost £15,000 and it depreciated fully over five years, then that would equate to £73.97 in depreciation over the nine day period. Yikes.

So if I owned a car, my costs for the nine days would have totalled £134.07. I've not included the cost of any maintenance work, servicing, damage I wouldn't want to claim on my insurance, car washes or MOTs in this figure.

So I paid £155.36 extra over the nine day period for the luxury of not owning a car, but having access to one whenever I choose, subject to availability.

But that wasn't my average Streetcar week. Over the last twelve months (including last week), I've used a Streetcar on 40 calendar days, travelling 2,573km (1,599 miles) at a cost of £1,591.26. That's 62 pence per km, or 99.5 pence per mile.

If I'd owned a car, my costs would have been:

  • Petrol: £172.41
  • Parking permit: £130.00
  • Road tax: £170.00
  • Insurance: £750.00
  • Depreciation: £3,000

A total of £4,222.41, or 165% higher than the Streetcar cost. Even ignoring the depreciation, the cost would have been £1,222.41, or 77% of the Streetcar cost.

Streetcar does prohibit us a little. Occasionally it would be nice to be able to just jump in the car and drive somewhere, without thinking about cars' availability. But when you look at the relative costs, given the amount of driving we do, owning a car just ain't worth it.


Posted by dan at 7:17pm | Permalink | Comments (2) | Trackbacks (0)

Placcy bags

Filed under: General

I'd like to know the ratio of environmentally-unfriendly plastic that supermarkets' plastic bags account for vs. environmentally-unfriendly plastic from the packaging of the products therein. A random survey of 100 shoppers all of whom have bagged up their shopping in the shop-issued plastic bags will be just fine. Can someone please arrange this?

The post was inspired by a recent trip to Sainsbury's, Vauxhall. I queued up after a self-righteous lady, who was proud and loud in her refusal to take any plastic bags being offered to her by the lady at the checkout, instead choosing to pack her shopping into her rucksack.

My conservative, uninformed estimate is a ratio of 1:5. For every kilogram of plastic generated from plastic bags, there will be five kilograms from the packaging of the products. Which would suggest that supermarkets' efforts to get us to move to their branded hemp bags and the like, miss the point somewhat. Don't get me wrong: it's not a bad thing. It's just not the best use of their enviably-strong position. Surely they should be pressurising the suppliers to use environmentally-friendly packaging; or else the government should be applying the pressure, as per SLATFATF's suggestion.


Posted by dan at 6:59pm | Permalink | Comments (1) | Trackbacks (0)
Friday 19 September, 2008

A cry for help

Filed under: Life

Whenever my daughter reaches up and tries to press keys on my laptop, she always seems to hit F1 first. Maybe it's just a cry for help.


Posted by dan at 6:38pm | Permalink | Comments (0) | Trackbacks (0)
Thursday 18 September, 2008

Geographical status updates

Filed under: Tech. stuff

I was recently asked whether it was possible to develop a graphical reporting tool, one that allowed you to flag a number of locations across the UK and for each to hold and present data about its location.

As is becoming more and more common nowadays, my first instinct was to turn to Google. And I never turned back, although I stumbled a little along the way.

First of all, I tried creating a personal map in the “My Maps” section of Google Maps. This allowed me to plonk markers on the map, but the data within each could not be updated other than in the map view itself. What was needed was a spreadsheet that drove the map data, both in terms of the locations’ coordinates and the data therein.

I found a Google Maps API that allowed the data presented by a Google Map to be driven from a Google Spreadsheet. Fabulous. As soon as the spreadsheet is updated, the URL dedicated to the map will display the new data. Any new rows’ locations will be displayed as new markers on the map, and the data that appears when you click on a marker will also be up-to-date.

The only missing link is the automated lookup of a location’s postcode to determine its latitude and longitude position—few people know their locations’ geo-coordinates. I’ve found this site which is great at returning the coordinates of a single postcode, but I’m yet to find a similar one that can return the coordinates of a whole bunch of postcodes.

Now all I need is a place to host the map. Google Sites couldn’t help, as the code uses tags that are deemed “untrusted”. Ha!


Posted by dan at 8:24am | Permalink | Comments (2) | Trackbacks (0)
Sunday 14 September, 2008

Premier League predictions

If at the start of the season you were to predict the finishing positions of the 20 Premier League teams and then compare your predictions with their actual finishing positions, if you had no previous knowledge of teams' performance, what would be your expected margin of error? The measure here is the sum of the absolute differences between teams' predicted and actual positions. So if every team was out by one (either over- or under-predicted), then it would be 20.

I'm not sure whether it's easy to create a formula for n teams, but a random Excel trial of 26,126 such prediction sets yielded a minimum difference of 56 (an average discrepancy of 2.8 positions per team), a maximum of 192 (9.6 positions per team) and an average of 131 (6.6).

My brother's performance in his work competition based on the teams' current positions is 80, 0.4% of my random trials bettering this. Is 80 good? And where will he be in May?


Posted by dan at 7:49am | Permalink | Comments (0) | Trackbacks (0)
Saturday 13 September, 2008

Dim and dimmer

Filed under: Random thoughts, Life

I went to the cinema this evening to see The Boy with the Striped Pyjamas. An absolutely wrenching, harrowing film, one which helps you appreciate the value of life and goodness.

Whenever I go to the cinema—rarely nowadays; the previous time was to see Sideways at the Regal on North End Avenue, Battery Park City in 2005—I always think they're dimming the lights when they're not. A good few seconds can elapse between my thinking they're dimming and my realising that they're not. I guess it's not just me.


Posted by dan at 9:48pm | Permalink | Comments (1) | Trackbacks (0)

From the ridiculous to the sublime

Filed under: General

I received a couple of comments tonight, which are both worthy of a mention.

First, at 17:15, a comment came through from metaphor on my post of January 2007 entitled 'H' from Steps is gay. Below in italics is a transcript of his/her comment.

So what?do you have problem if Ian H. Watkins is a GAY?Its none of your business you all "idiot".mind your own problem if Ian H. Watkins don't have problem with his sexuality...that is his choice.if you have problem with that then you must be one of those PEA BRAIN paparazzi.ITS NONE OF YOUR BUSINESS.do you understand...SUCKER!

I've left the grammatical heathenry in place for your, and indeed my, enjoyment.

My original post was intended to be tongue-in-cheek and jovial, Metaphor. (I feel like the time in the Friends episode (The One After Joey and Rachel Kiss) when Phoebe meets Mike's ex-girlfriend Precious, but insists on calling her Suzie, as she can't bring herself to call her Precious. For the sake of progress, let's call you metaphor.) I have no issue with his sexuality. I merely expressed surprise at the fact that this was not already common knowledge.

Next to a comment at 20:47 from Raymond about my March 2006 review of Pellicci's, the fabulous cafe on Bethnal Green High Street:

its us the finnertys your cafe is 5/5

Of course it is, and thank you Raymond Finnerty for sharing. You are indeed correct in your top-drawer assessment.

For some reason, I put the grammatical error in the latter comment down to haste (I love the correct pluralisation of the surname, btw), but that in the former down to heathenry.


Posted by dan at 9:05pm | Permalink | Comments (1) | Trackbacks (0)

Re-wheeled?

Filed under: Random thoughts

I just read of Dave Weir's likely frustration at having to race the T54 800m wheelchair final again, having been stripped of what he thought was a gold medal owing to some of his competitors being lined up in the wrong lanes based on the lane draw. Kurt Fearnley was drawn in lane seven but was lined up in lane two, understandably a hindrance given the increased curvature of the inner lanes. (Maybe wheelchair events should take place on a specially-converted airport runway. Heathrow Terminal Five will be closed for two weeks in August 2012 to accommodate London's Paralympics. I digress.)

The Australian's appeal means that, according to the BBC, the race will be "re-run". Is that the correct term for such events? Would a stage of the Tour de France be re-run? (Not Alpe d'Huez, I'd hope. That would be a right pisser.)


Posted by dan at 8:34pm | Permalink | Comments (1) | Trackbacks (0)

The difference a letter can make

Filed under: General, Grammar etc.

There are a couple of word pairings that differ by a single letter but whose meanings are completely different.

Encourage: inspire with confidence; give hope or courage to
Entourage: support group

Homophone: one of two or more words with different origins and meanings but sounding the same
Homophobe: one who hates or fears homosexual people

Any other non-trivial examples?


Posted by dan at 1:02pm | Permalink | Comments (0) | Trackbacks (0)

'Amusing' office posters

Filed under: General

God I hate them.

There's one up in our office at the moment suggesting that if you're feeling lonely, etc., you should schedule a meeting. Those, along with Dilbert cartoons pasted on the walls, should be banned and the culprits responsible for their promotion shot without question.


Posted by dan at 12:59pm | Permalink | Comments (0) | Trackbacks (0)

Pluracy

It would be lovely if the plural of apex was apices and if that of annex was annices.


Posted by dan at 12:42pm | Permalink | Comments (0) | Trackbacks (0)
Wednesday 10 September, 2008

West Wittering

Filed under: Life

We went to West Wittering beach today. The weather was pretty lousy all the way there, the first sign of blue sky appearing two and a half hours after leaving home on turning into the beach estate.

And what a fabulous, blustery day it was. Pictures here.


Posted by dan at 9:57pm | Permalink | Comments (0) | Trackbacks (0)

Which F-ing app.?

I like Facebook. It's both useful—to find people you otherwise might lose touch with—and interesting—to find out what those people are up to.

I like Flickr. It's useful for posting photos and videos that you want to share, either with the rest of the world, or with close family and friends. It's also interesting to see those of friends who care to do the same.

So where should I post my photos? My Facebook friends currently total over 100. My Flickr friends are closer to 30. So I'm more lax in my willingness to add friends on Facebook.

I use the applications in completely different ways. Facebook is a very informal forum for updating with trivial shite and play the occasional game of Word Twist. Flickr is more formal, allowing me to share personal photos with people with whom I have genuine, meaningful connections.

Flickr's dedication to photo (and now video) sharing has given it a rich interface through which you can tag, name, protect, map, group photos. Facebook's photo-sharing facility is much more simplistic, with one essential yet beautiful ingredient: the ability to tag individuals' faces.

I think Facebook needs Flickr to fuel its photos and user contribution. And Flickr probably needs Facebook as an additional source of content for its users to enjoy. How, and whether, the two will evolve with one another remains to be seen.

At the end of the day, I don't think the two Fs can ignore one another


Posted by dan at 9:31pm | Permalink | Comments (0) | Trackbacks (0)

Danger: cars skidding

Filed under: Random thoughts

Ever since childhood, I've had a major issue with the UK signpost warning drivers of slippery surfaces.

Slippery

I've always wondered how the car in question came to leave the tyre tracks in the picture. Given that there are only two tracks, it seems that only two tyres (the fronts, I expect) are leaving the marks, which can only mean that the car has rotated a full 180°, the middle of the front axle acting as the pivot point for the rotation, all the while maintaining a constant movement forward overall.

The right (or is it left) wheel being off the ground adds further intrigue to the accident.


Posted by dan at 9:16pm | Permalink | Comments (2) | Trackbacks (0)

Cell phones in forecourts

Filed under: General

I was told off today for using a mobile phone in a petrol station. I heeded the request, and ceased the conversation.

But according to Adam Burgess, none of the 243 petrol station fires worldwide allegedly caused by mobile phones were actually a result of a spark from the handset, but instead from static caused by people's bodies.

Maybe it's not mobile phones that should be banned from forecourts, but the people themselves.



Posted by dan at 9:07pm | Permalink | Comments (0) | Trackbacks (0)
Tuesday 9 September, 2008

Weather or not?

Filed under: General

I checked this Friday's weather for Windsor this evening in advance of a likely visit to Legoland this Friday. BBC Weather offered me the following symbol:

Black cloud

…along with a daytime maximum of 19°C and an overnight minimum of 11°C.

So it seems it's gonna be a bit rainy, a bit sunny. But I don't think that helps me much.

Instead, I think I want six pieces of data in total:

  • Percentage chance of rain
  • Expected amount of rain
  • Expected number of hours' sun
  • An expected average brightness of the sky
  • Daytime maximum temperature
  • Daytime minimum temperature.

Those piece of information would allow me to prepare accordingly, I think. Much better than the mixed-message symbol with which I was presented.


Posted by dan at 8:08pm | Permalink | Comments (2) | Trackbacks (0)
Monday 8 September, 2008

Will it ever stop raining?

Filed under: General

The headline across the front page of today's Mirror read "Will it ever stop raining?" I didn't read the article thereafter, but I can safely say that it has. Good question though, the answer to which was touch and go for a while.


Posted by dan at 8:50pm | Permalink | Comments (0) | Trackbacks (0)
Saturday 6 September, 2008

New photos

Filed under: Life

Lots of new photos on my flickr site. Friends: email me if you have a flickr account but can't access any pictures of me (and indeed want to). I've left the pictures of landscapes, buildings etc. open to all, but restricted the permissions on the personal stuff to my friends and family.

The most recent upload is 240 photos from the last 15 years or so. Some fond memories indeed. All of them were scanned in by click2scan. Not the best resolution, but glad to have them digitised and a very professional service.


Posted by dan at 8:46pm | Permalink | Comments (0) | Trackbacks (0)
Wednesday 3 September, 2008

Chrome data paranoia

Filed under: Tech. stuff

Interesting how Matt Cutts' last three posts have all focused on people's concerns over the extent to which Google Chrome will tap into your user behaviour and associated data, not in a good way. Maybe the Do No Evil philosophy is no longer as believable as it once was.


Posted by dan at 9:03pm | Permalink | Comments (1) | Trackbacks (0)

On no account...

Filed under: General

A word of advice for suppliers. Never refer to the client as an account in documentation they will see or meetings they attend. It's so impersonal. And never refer to costs as revenues. While it's nice to know that your shareholders are benefiting from your working with us, it's not my primary driver.

That is all.


Posted by dan at 8:14am | Permalink | Comments (0) | Trackbacks (0)
Tuesday 2 September, 2008

Google Chrome

Google Chrome worries me. Its intention is no doubt to give Google even greater control over your browsing experience, wrapped up in a lovely interface to lure the unsuspecting user in.

This is all very well (kind of), but I'm nervous that its efforts will create unwelcomed competition for Mozilla's Firefox, and will not touch Internet Explorer's continued market dominance. My mum won't download Chrome, nor indeed would she have downloaded Firefox was it not for my intervention. Only geeks will download it, the very market that Firefox has cornered, myself included. Infighting for market share between the two will only serve to strengthen Microsoft's relative dominance.

Amusing and cheeky that they chose MySpace in the BBC News demo to highlight the graceful degradation experienced when a tab crashes.


Posted by dan at 8:37pm | Permalink | Comments (1) | Trackbacks (0)
Monday 1 September, 2008

Serco Consulting company bus

Filed under: General

My bus drew up next to a security-armoured Serco van outside Parliament this morning. As we waited at the lights to enter Parliament Square, the sound of prisoners' feet/bodies pounding the sides of the van in an attempt to escape was quite shocking and loud, to the point that I questioned whether it was in fact a police van carrying horses. It wasn't.

But maybe they weren't prisoners either. Maybe it was a Serco Consulting van on its way to another assignment.


Posted by dan at 1:48pm | Permalink | Comments (1) | Trackbacks (0)
Sunday 31 August, 2008

Calendar spreadsheet: explained

Filed under: All things Excel

I tidied up the calendar spreadsheet last night while awaiting for our Ocado delivery. Plenty of time available, given they arrived over an hour later than their billed time. A tiny bit of the logic was tidied up, and I added a year-view. Overall, it's now the dog's bollocks, if I may say so.

Below is the logic I used, in English rather than Excel.

The first thing to do was to confirm the weekday of the first day of the year. So I took the value from concatenated the year on to "01/01/", and calculated its weekday from there.

Next, I created a table showing each of the month-lengths, eleven of them hardcoded, February's using the slightly cumbersome formula for working out whether a year leaps: divisible by 400 is; divisible by 100 is not; divisible by 4 is; otherwise, not. The table also contains the weekday of the first of each month, calculated as the mod base seven of the previous month's start date plus that month's length less one.

On the calendar sheet itself, the first row of January's dates was created by comparing the number of the day of the week each cell represented with the day the month started on to establish whether to show a blank (the month hasn't yet started) or a number, either a 1 for the first day, or the previous cell plus 1 for subsequent days.

The rest of the rows' entries simply compare the previous entry with the number of days in that month. If the two are equal, then that and subsequent entries display blanks; if not, then it's time to increment the previous entry by one.

Each month has six rows of entries to accommodate the rare months that start late in the week and drip a day or two into week six.

And the cells' formats are dependent on their contents and the weekday. Blank cells have no borders; those representing weekends are shaded with borders; those representing weekdays are clear with borders.

Combining so many beautiful elements of Excel into a spreadsheet so useful was rewarding to say the least. Formula-driven conditional formatting, lookups, ifs, weekdays, moduli. Happy days.


Posted by dan at 9:35pm | Permalink | Comments (0) | Trackbacks (0)

Ian Watkins' wikipedia entry

Filed under: General

Ian Watkins is better known as H from Steps, H standing for hyperactive apparently. I was surprised to see a non-trivial number of people in August (39) happening upon this site directly from his Wikipedia entry. It seems that I'm quoted as a reference (number six), allegedly fuelling rumours of his sexuality. Slightly harsh, given that my post succeeded his coming out on live TV. Still, quite amusing.


Posted by dan at 9:19pm | Permalink | Comments (0) | Trackbacks (0)

Copy paste weirdness

Filed under: All things Excel

If I open two instances of Excel 2007 and copy a range from one to another using paste special, the destination doesn't recognise the copied range as an Excel object. Instead of offering paste values, paste formulas (it's formulae, goddamit), transpose and the like, it offers me Microsoft Office 2003 Worksheet Object, Picture (Enhanced Metafile), Bitmap etc. Copying between two workbooks within the same instance behaves correctly. Bizarre, and rather annoying.


Posted by dan at 9:10pm | Permalink | Comments (0) | Trackbacks (0)

The Citroën C5: unmistakenly German, without the attention to detail

Filed under: General

The new Citroën C5 Tourer is advertising itself on billboards as having "504.98 cubic litres of boot space, precisely". I assume they mean litres; or cubic decimetres. Because as far as I'm aware, the cubic litre is not a unit of measurement.


Posted by dan at 9:04pm | Permalink | Comments (0) | Trackbacks (0)