Wednesday, 31 December 2008

Happy New Year / Kids and Maths

Happy New Year!

This morning -- January 1 2009 -- Jake and I went for a walk around the park and greeted various joggers and bike-riders and walkers with hellos, often resulting in replies of "Happy New Year!".

On the way back Jake -- who is almost five -- said to me, "Daddy, do you want to hear something that I know that you don't know?"

"Sure", I said.

"There are two fours in eight, and four twos in eight!"

Actually I did know that, but didn't say it, and instead felt very proud, and asked Jake how many twos there are in six, and how many threes.  I also asked him how he got to his first result: He "figured it out".  So I told him that he was noticing patterns in numbers, and that that is a good thing to do.

Just for the record, without much prompting from me, basically just encouraging him to count forwards and backwards, counting on fingers, tallying, and recognizing written numbers, my boy spontaneously noticed a pattern illustrating not only a feel for division, but also for symmetry, or more specifically the commutativity of multiplication (a*b = b*a always) albeit in this one case.  And this before noticing commutativity of addition (a+b = b+a always), and even the trick of "counting on".

I'll take this as evidence that (at least for Jake) encouraging an awareness of numbers and patterns is not a bad way to go. This contrasts with my experience of doing pages of simple sums and subtractions (4+3= ...) at age four, which apparently I enjoyed!  

Not a bad new year's present for a dad!

Sunday, 21 December 2008

Peter Sbarski has submitted

Congratulations to Peter Sbarski on submitting his PhD thesis (just in time for Christmas). Peter developed the layout algorithms used in Authink's software, and more besides. His supervisors were Prof Kim Marriott of Moansh University and Austhink founder Dr Tim van Gelder, but Peter was kind enough to also thank me for my help and sometime mentoring:
Dan, I must thank you for all your advice and work that you have put into this thing. I know that my thesis wouldn't be the same without your help. I really do appreciate everything that you have done and I'll always remember it. In fact, I feel so very lucky that I got to work with you. A huge chunk of this thesis belongs to you.
[Quoted with permission.]

It should be pointed out that Peter was kind enough to include me as a co-author on some of the papers that came out of his thesis work, which I appreciate.

Peter is a bright fellow and collaborating with him and Kim has been a pleasure. I wish him all the best, and hope to work with him again one day.

Wednesday, 17 December 2008

Programming Languages as Cars, Religions

I owe part of my vanity rank to my contribution to Michael Vanier's amusing If programming languages were cars ... rant:
  • Ada is a tank. A butt-ugly tank that never breaks down. People laugh uncontrollably if you tell them you drive Ada, but really, do you want to be driving a sports car in a war zone?

  • Assembly Language is a bare engine; you have to build the car yourself and manually supply it with gas while it's running, but if you're careful it can go like a bat out of hell.

    Assembly Language: you are the car.

  • Basic is a simple car useful for short drives to the local shops. Once popular with learner drivers, it has recently been stripped down to a shell and rebuilt by a major manufacturer, The new version has been refurbished for longer journeys, leaving only cosmetic similarities to the original model. [from Przemyslaw Wrzos]

  • C is a racing car that goes incredibly fast but breaks down every fifty miles.

  • Cobol is reputed to be a car, but no self-respecting driver will ever admit having driven one.

  • C# is a competing model of family station wagons. Once you use this, you're never allowed to use the competitors' products again.

  • C++ is a souped-up version of the C racing car with dozens of extra features that only breaks down every 250 miles, but when it does, nobody can figure out what went wrong.

  • Eiffel is a car that includes a built-in driving instructor with a French accent. He will help you quickly identify and learn from your mistakes, but don't you dare argue with him or he'll insult you and throw you out of the car. [From Daniel Prager with some embellishments]

  • etc. etc.
Now amz (and friends) have been inspired to write: If programming languages were religions.... Not quite as pithy, but possibly more accurate! Cut-down version:
C would be Judaism - it's old and restrictive, but most of the world is familiar with its laws and respects them. The catch is, you can't convert into it - you're either into it from the start, or you will think that it's insanity. Also, when things go wrong, many people are willing to blame the problems of the world on it.

Java would be Fundamentalist Christianity - it's theoretically based on C, but it voids so many of the old laws that it doesn't feel like the original at all. Instead, it adds its own set of rigid rules, which its followers believe to be far superior to the original. Not only are they certain that it's the best language in the world, but they're willing to burn those who disagree at the stake.

C++ would be Islam - It takes C and not only keeps all its laws, but adds a very complex new set of laws on top of it. It's so versatile that it can be used to be the foundation of anything, from great atrocities to beautiful works of art. Its followers are convinced that it is the ultimate universal language, and may be angered by those who disagree. Also, if you insult it or its founder, you'll probably be threatened with death by more radical followers.

C# would be Mormonism - At first glance, it's the same as Java, but at a closer look you realize that it's controlled by a single corporation (which many Java followers believe to be evil), and that many theological concepts are quite different. You suspect that it'd probably be nice, if only all the followers of Java wouldn't discriminate so much against you for following it.

Lisp would be Zen Buddhism - There is no syntax, there is no centralization of dogma, there are no deities to worship. The entire universe is there at your reach - if only you are enlightened enough to grasp it. Some say that it's not a language at all; others say that it's the only language that makes sense.

Haskell would be Taoism - It is so different from other languages that many people don't understand how can anyone use it to produce anything useful. Its followers believe that it's the true path to wisdom, but that wisdom is beyond the grasp of most mortals.

Erlang would be Hinduism - It's another strange language that doesn't look like it could be used for anything, but unlike most other modern languages, it's built around the concept of multiple simultaneous deities.

Ruby would be Neo-Paganism - A mixture of different languages and ideas that was beaten together into something that might be identified as a language. Its adherents are growing fast, and although most people look at them suspiciously, they are mostly well-meaning people with no intention of harming anyone.

Python would be Humanism: It's simple, unrestrictive, and all you need to follow it is common sense. Many of the followers claim to feel relieved from all the burden imposed by other languages, and that they have rediscovered the joy of programming. There are some who say that it is a form of pseudo-code.

COBOL would be Ancient Paganism - There was once a time when it ruled over a vast region and was important, but nowadays it's almost dead, for the good of us all. Although many were scarred by the rituals demanded by its deities, there are some who insist on keeping it alive even today.

APL would be Scientology - There are many people who claim to follow it, but you've always suspected that it's a huge and elaborate prank that got out of control.

Visual Basic would be Satanism - Except that you don't REALLY need to sell your soul to be a Satanist...
Although I have nothing to add -- at this time -- I did enjoy many of the comments on proggit.

Thursday, 11 December 2008

Waffles are go!

My quest for waffles is over. Last Saturday I saw a modern waffle-maker at K-Mart with my beloved and gingies, and -- despite being there to purchase gifts to place under the Wishing Tree, and not stuff for ourselves -- I had to have it. Now it is mine:

The recipe was complicated, including sifting, separating eggs and beating the whites until they stiffened, folding, and -- most challengingly -- leaving the mixture to sit for 10 minutes.

Then you cook each waffle for exactly 3 minutes:

cool them on a rack:

Now cut them up and sprinkle with sugar, Belgian style:

And admire the complexity of the waffle-creation process:

Now enjoy!

Hmmm: They tasted like ... waffles! I.e. Good. The general consensus was that they are even better with ice-cream and Maple syrup. There was so much mixture that we were able to freeze some for later. I think that they should reheat quite nicely in the toaster.