Seven Segment Displays

You probably haven’t thought much about them. However, they are everywhere! You might know seven segment displays from the digital watches that we all had in the 80s, making up each digit of the time, as well as from many other electronic clocks, thermometers, radios, CD players, VCRs/DVDs, calculators and even in lifts.

In fact, seven segment displays premiered in the 1968 film 2001: A Space Odyssey and were later to appear in the first digital watch – the Pulsar – which came out in 1972 and cost $2,100. It’s ironic that by the time 2001 came, the digital watch had already gone out of fashion.

Anyway, in the early hours of the morning recently, I was staring at the clock and started wondering about the fact that although seven segments are used, only 10 different patterns are displayed. There are 128 (i.e. 2 to the power of 7) different patterns that can be displayed on a seven segment display, which is a few more than are really needed. In fact, you should only need four segments to display 10 patterns, so three of the segments are, in a sense, redundant.

I wrote a quick and dirty computer program to see which segments could be removed, or burn-out, and you would still be able to tell the difference between the different digits. It turns out that the bottom and bottom-right segments could be removed, and the standard patterns that make up the digits one through zero are still unique. This is shown in following the diagram:

However, we can do better. There are a number of variations on the patterns used for some of the digits. There are alternatives for one, six, seven, nine and zero, as shown here:

I remember my Dad’s precious digital calculator from the late 70s used the variant for zero shown here. Although, I admit I don’t recall having seen it anywhere since.

Using the software I developed, I looked for whether by using any of these alternative versions of the digital numbers, if there was a way of removing three segments from the display but still being able to tell the difference between the numbers. In fact, there was a way to remove another segment, if we use the variants for zero and six (and also nine, since we might as well have them match, although it’s not necessary). This special set of digits is shown here:

From this set of digits, we can remove both right segments and the middle segment, and the remaining patterns for the digits can still be distinguished. Although, to be honest, it is a bit strange.

It does show that we don’t need the full seven segments, and only need four. But, clearly, it’s not possible to go any fewer.

I can’t think of any applications for this four segment display, but it makes me happy to know that it’s possible to make one that is also compatible with existing patterns for the ten digits. And if the special set of digits is used, then up to three segments can fail on a display while it remains (somewhat) useful.

Patrilineal

Kate has this theory that new-born babies, aside from mostly looking like what babies look like, resemble mostly their fathers so that any disputes on paternity are cleared up quickly. Well, here is a side by side comparison of what I looked like at Harriet’s age compared with her.

It’s those powerful Scott genes at work. However, I’m a little worried: at some point she better stop looking like I did or we’ll need to rethink schooling options.

A different perspective

It’s something that Kate and I are doing together, but we’re clearly having very different experiences. I don’t think we’ve been so divergent since that time we saw Bowling For Columbine. But this time Marilyn Manson isn’t making a guest appearance.

We’re both caring for Harriet, but due to anatomical differences, we have different roles. Kate handles all of the feeding, while we share the playtime, and I do most of the settling.

Currently the breakdown in hours is something like this:

  • Sleeping – 14 hours
  • Feeding – 5 hours (including mid-feed nappy change)
  • Settling – 4 hours (including bath-time)
  • Play – 1 hour

There’s no play at night-time, and happily she requires minimal settling after midnight, so my participation is generally limited to civilised hours. However, Kate is involved 24/7.

The other aspect is that I’m involved to this level for only these weeks before I return to full-time work, while Kate is looking at doing this for months and months into the future. I’m hoping that at the six-week mark, when I go back to work, the most dependent and most unsettled parts of Harriet’s early life are behind us.

But we are living different lives here, despite spending all our hours together. I guess I wasn’t expecting that.

The moral of the storey

We’re all thankful for the RBA’s recent 1% cut in the cash rate. Hopefully it will help Australia avoid a recession. However, it seems that the Tenants Union of Victoria is trying to leverage this into improvements in rents for their members, using the argument of ethics. The claim is that landlords are morally obliged to reduce rents when their costs fall.

I am sympathetic to the plight of renters: I have been one for most of the time I’ve lived out of home, and it is possible I will be one again in the future. However, I am also a landlord and I speak from experience when I say that the price of rents is generally unrelated to the level of interest rates. The current rental crisis is more due to population pressures driving a level of demand beyond that of the existing supply. Market forces set rents, not the mercenary nature of landlords.

Over the last decade, up until the last two years, I have had to keep my rents more or less static, despite rising interest rates, since it was a renter’s market, and market forces meant I had to wear the increase in costs. In the last couple of years, it has swung around and it’s more of a landlord’s market in Melbourne (although less so than 12 months ago), so rents rose in line with demand. When more apartments are built, supply will increase, and things will balance out again. I know, this isn’t helpful to those renting today, but housing is a long term proposition. People renting can get a house of higher quality than if they bought, as they are paying off a historical mortgage (i.e. when the house was cheaper) rather than a current mortgage (assuming house prices have risen).

Another flaw to the proposition by the Tenants Union of Victoria is that if you extend their argument to its logical conclusion – that rents should be set at a fixed margin above costs – then you get absurd outcomes. For example, rents would be cheaper on properties where the owner had paid off more of their mortgage, and almost free when there was no mortgage left at all.

However, there are some ethically grey practices by landlords around rents that do deserve scrutiny and complaint. I am thinking here of when a property is advertised at a particular weekly rent but then the landlord expects prospective tenants to offer to pay above that level of rent, or selects tenants for the property based on offers of above-advertised rental payments. The issues here are transparency and fairness: all tenants should be given equal opportunity to apply for a property. If landlords wish to receive higher rent, then they simply need to advertise their property at that level of rent. There is no need for secret, above-advertised payments.

But even with such dodgey practices in the market, overall rents will respond to market forces. It’s simple supply and demand. No matter what the Tenants Union of Victoria demands.

Birth notices are dead

Harriet in mittens
Harriet in mittens

Several days after the birth of our baby girl Harriet, I realised that I hadn’t bothered to put an announcement in the paper. This was shortly followed by the realisation that there was no point – her arrival had been SMS’d, telephoned, emailed, Flickr’d and Facebooked to pretty much everyone we think would care, so why bother putting it in print? It doesn’t seem that many years ago that you would typically have put this sort of thing in the paper, if only as a keepsake, so there’s been rapid change here.

I checked the newspapers for the last few days to see if anyone else had put in a birth notice for Harriet. Nope. Tellingly, I confirmed this by using the web search interfaces for both The Age and the Herald Sun. The online world really has replaced the printed world in this regard.

It was also clear that hardly anyone was putting their birth notices in the papers either. There are just a handful of such announcements, and their number is dwarfed by the volume of death notices, which have at least five times as many. Understandably the demographic that death notices are intended for is not as web-savvy as the demographic that puts in birth notices.

Another aspect to this is that not only is online the more “traditional” means of notification for today’s parents, but it’s significantly better than newspapers. You can’t tell people about your new kid without also providing pictures, based on the demand we received for photos when we were a bit slack about making them available. Newspapers have never supported large, colour prints of your baby, unless you were at least on the A-list. Or they were born on an auspicious day, such as new year’s day, or the day when the Federal Government commits to maternity leave. While online, you can provide almost limitness photos to sate even the thirst of the most eager relation.

But now the question – if a newspaper cutting isn’t available as a keepsake, for the child to look back on in years to come, what is the online equivalent?

US Patent 6,285,999

There are several fundamental inventions that have shaped the formation of the Internet business models as we know them today. There was the selling of banner ads (credited to HotWired back in 1994), the keyword auction for displaying ads (invented by Goto.com in 1999), and there is Google’s algorithm for ranking search results, also known as PageRank (described in US Patent 6,285,999).

This patent was the foundation for Google, and enabled them to differentiate themselves from other well-established search engines at that time. So, given its significance, I thought it was time that I got around to reading it, which I did this weekend.

Search engines, such as Google’s, “crawl” the web, grabbing copies of all the web pages that they can find, and following the links within them to find more web pages. Then they create an enormous index of all the information within the web pages. So, when you type in some keywords to search for, they look them up in the index, to find all possible matches, and then rank and order those matches such that the most likely ones appear in the first page of results. The PageRank algorithm supplies this ranking.

Essentially their algorithm produces a scaled version of the estimated probability of a web surfer ending up on a given page. If one page is better linked-to than another page (based on the number of links from other well-linked-to pages), it will gain a higher ranking.  They describe how this can be estimated through iteratively multiplying a probability matrix with itself.

As I was reading this, I recalled a discussion that I had back in the late 90s with my then-housemate Brendan. We were discussing a reputation database, where people would recommend others who they respected, based I think on a concept in David Brin’s book Earth. The solution to calculating these reputations was pretty much the same as Google’s method for PageRank. I’m not saying this to big-note myself, just to point out that as neither Brendan nor I had a PhD in database algorithms and since it took us 5 minutes to think up the solution, the algorithm is hardly rocket science.

Since then, Google’s gone on to greatness, and to produce many other patents. Today, PageRank is considered to be just one of hundreds of factors that go into ranking their results. However, it’s interesting to see how a simple invention (and a lot of hard work from talented people!) has been the basis for one of the most respected global companies.

Not much like my schooldays

It’s a bit dull waiting for the baby to arrive now. We’ve watched a lot of DVDs. On the weekend we took a break from the TV to go watch a film.

Son of Rambow

A bit like The Wonder Years crossed with Jackass

Set in Britain in the early 80s, this is a film about kids, and the power of their over-active imaginations. Don’t expect much in the way of special effects, or cloying nostalgia. Just wacky kids. I laughed a lot, but I think I was laughing more than most others in the cinema.

Will is a boy growing up in a fundamentalist religion. Lee is a ne’er-do-well kid of the same age. Both turn out to have a few things in common. Both are well acted. In fact, all the acting is pretty good.

This film might be considered anti-religious. Well, anti-fundamentalist-religion, more precisely. But although that’s there, it isn’t what the film is about.

This film might also be considered anti-French. It was made with the assistance of the French, so perhaps they didn’t know what the film was about ahead of time.

But this film should not be considered a kids film. Sure, they could go see it, with it’s kid-friendly classification, but adults will get much more out of it.

It was the best thing I’ve seen for weeks.

My rating: 3.5 stars
***1/2

Unexpected, black comedy

I guess it’s our own fault that we weren’t expecting this film to turn out like it did. We saw 10 seconds of a preview for it on TV while channel flicking, and remembered enough of the name to pick it out when buying tickets. It wasn’t a light-hearted comedy about dwarves.

In Bruges

A rather black comedy-drama set in Bruges

If Quentin Tarantino had instead been raised on a diet of European art-house film, then this would have been a film he made. It’s about an odd couple, both hit-men, who have escaped to Belgium after completing a job in London. However, Bruges turns out to be a lot more interesting than either expect.

Outside of the violence that you’d expect from a film involving hit-men, and some laugh-out-loud moments, there are also points where the film ponders philosophies of ethics and honour. And all of the main characters develop in interesting ways as the film progesses.

An amusing game to play during this film is to spot all of the actors who were also in Harry Potter and the Goblet of Fire. It seems that casting was done as a job lot.

My rating: 3.0 stars
***

Another UK Cult Classic?

I’m a bit of a fan of Simon Pegg. The star of Shaun of the Dead is one of the legends of UK cult classics. This was an easy selection from the video store…

Run Fatboy Run

More charming UK rom-com and less cult classic

This is the story of boy meets girl, boy leaves girl knocked-up at the altar, girl hates boy. Actually, that’s just the set-up. But don’t think it’s a gritty, black comedy. Although it’s About A Boy crossed with Rocky, it’s more the former than the latter.

Simon Pegg is both a writer for and the lead actor in this film. However, his co-writer from Hot Fuzz and Shaun of the Dead, Edgar Wright, is not a co-writer this time. And it is David Schwimmer’s film directing debut. All of which might explain the lack of edginess.

However, it’s still a lot of fun. Pegg’s character Dennis is a hopeless buffoon and an endearing athlete. The rest of the cast is excellent also. I laughed a lot. And you can’t ask for more than that, really.

My rating: 3.5 stars
***1/2

Wireless Power

Today, The Age is running a story (from AFP) on Intel’s recent demo of wireless power. It’s a great story, but it’s actually a year old. The original story is from June 2007 and was MIT’s demo of wireless power.

The demo involves lighting a 60W light globe across 2m, with 40% efficiency. If the technology could be improved to longer ranges, the applications are phenomenal. For example, you could distribute power throughout your home, and avoid needing batteries in any of your appliances or their remote controls. Or, you could distribute power with radio communications, so you wouldn’t need batteries in mobile phones. Or, you could distribute power across car-parks, so people who leave their lights on could still start their cars. Or, you could distribute power across an office, and people could work with with laptops anywhere, even if there were no power points. Sod that, you could distribute power into parks, where there are never going to be any power points.

The power cord is the “last cord”, as Intel says. I can’t wait til we can cut it. Safely, of course.