Picture frames

Finally committed, after years of not being impressed by reviews, to a digital picture frame. Namely the Pix-Star PXT510WR02. It’s been very nice, but my only complaint has been that while it can physically stand in a portrait mode, it doesn’t understand that the pictures should be rotated.

Exiv2 to the rescue. Using this, and this excellent explanation on EXIF data and orientation, I was able to first filter out only the landscape pictures (including the one odd upside down picture my wife took on her phone), then I bought a second one for portrait mode and used exiv2 to first filter, and then to rotate. Rotating was a case of trial and error to work out that I had to change an orientation of 6 to 3, and 8 to 1. To rotate you identify the files with an orientation of 6 (using exiv2 -pa, though note it’ll describe it as ‘right, top’, then you do:

  exiv2 -M"set Exif.Image.Orientation 3" foo.jpg

So now we have a happy portrait photo frame :)

I also now know that my wife (I’m only showing her camera phone pictures right now) takes 15 times more portrait pictures than landscape. I wonder if this is a) normal for camera phone users and b) if digital photo frame companies have noticed that they’re missing that market.

Posted in What I did...

Cheater’s guide to Bread Sauce

I’m a huge fan of Bread Sauce. Not being in the UK, instant isn’t really an option (and I’m too snooty a cook to make it), but the Delia Smith method is a little too much of an effort to remember to do in time. So I’ve created homemade instant Bread Sauce :)

Feel free to adapt how you like, and bear in mind that I like my Bread Sauce to be like Porridge – Your Mileage May Vary.

425 ml of Milk, 1 teaspoon of Onion Powder, 1/4 teaspoon of Ground Cloves, 1/4 teaspoon of Black Pepper, 1 bay leaf. Stir and stick in the microwave until the Milk is bubbling happily: 5-7 minutes seemed to do the trick.

Take the bay leaf out. Add 1 oz of Butter. Stir. Add breadcrumbs – I zap the crusts every now and then from our loaves of bread and stick it in the freezer – so when making Bread Sauce I use the breadcrumbs from frozen. I add a lot of breadcrumbs, 3oz is the intended amount. I add until the consistency is how I like it. Stir.

Add bay leaf again. Wait 5 minutes. Put in microwave for 1 minute. Wait 10 minutes.

Remove bay leaf again. Add 1 oz butter. Add 2 tablespoons of double cream (heavy whipping). You’re done. Enjoy the huge quantity of Bread Sauce :) I treat it as a side, you may want to freeze some if it’s just a sauce to you :)

I need to try without the bay leaf. Not sure if it really adds much.

Posted in Uncategorized

Two more sessions

Last night I introduced the eldest to gameQuery, and more importantly game design. We created a background and clouds for some parallax scrolling, then created a hero with animated legs who could be controlled to move around the screen.

Tonight eldest drew a castle to go on one side of the screen and a sun was added to arch in notably straight lines from one side of the screen to the other. He also used paper to design the animation of the hero (in Roman garb) hitting an orc.

Going well :)

Posted in Raising Cains

Out loud thinking

It’s interesting the things that are frowned upon for a child to obsess over and the things that are considered holy.

Computers and TV are evil. Reading a lot used to be more frowned on (this article is a faint echo ( http://www.parents.com/kids/education/reading/reading-too-much/ ) where the notions of ‘okay books for their age’ and suggesting writing as a better outlet make me instinctively wince. Yet I can’t find anything when I google for “plays outside too much”, but surely there must be kids who are overbalanced in the direction of too much outside time or too much drawing of pictures (wtf do we do with all these doodles?).

So I had a ponder. Is this a core hypocrisy? Why would it be sane to ban TV for a child while still believing they could have a career as a director or actor, yet it sounds pretty inane to ban a kid from sports and expect them to play for the national team. As I started to write this, my aha moment was that it’s about their position as a consumer/producer. While outside, kids are generally producers, they are involved and create. While in a book, kids are generally consumers. Taking what I’ll coin as Grandmother’s Law (ie: everything is healthy in small doses), a healthy balance of consumer and producer makes sense. Only playing sports and not experiencing sports (both on TV or at a stadium) would be a limiting issue and should lead to the same kind of frowny faces from the external culture.

Consuming books is good, with writing books as a good outlet. Writing is an abused word, what it should be is creating books, especially as so few would actually write a book with pen and ink nowadays. [Mental note for the kids - encourage them to think up the synopsis for a book, multiple books in fact, encourage a series].

Same thing for video games. Play them, watch others play them, create the plots and ideas for them. N has as much fun playing scorched earth as he does drawing up designs for his replacement for it (if only my time/skills at game programming allowed for such to be created at the speed he demands). Similar for TV, though the over-commercialization of broadcast/cable TV makes that a dangerous space for other reasons (namely that your children are not the customer, they are the product). Encourage creation of synopsis for Toy Story 5 without blocking it with the pain of writing.

How to summarize this out-loud thinking?

There are two camps that are easy to fall into. The first is bringing up consumers – junkies of input with future lard arses and sheep like attitudes. This is what we fall into when we get lazy as parents. The other is bringing up producers – bull-headed obsessives with achievement addictions and a big shock awaiting them in the future (sorry ‘Timmy’, turns out your artwork is pathetic after all). This is what we fall into when we obsess about maximizing the value of their time by some arbitrary ‘Timmy did this today’ metric.

The trick of sprog raising appears to be balancing the experiencing and the doing.

Posted in Raising Cains

First session complete

Hour 1 of teach a nearly 8 year old to program finished. We discovered the basics of HTML, described our game inside a <p> tag and watched Daddy create a JavaScript example of the random Football league games he wrote when he was 8. Coding style was to hard code the numbers, then learn about random functions, variables, if statements and basic maths. Then the fun part – finding many ways to cheat so that N’s favourite team (the Lions in this case) always won. Lastly we renamed ‘Goals’ to ‘Kills’ to fit with the original intent of Nathan’s game (“Total Battle!”).

Posted in Raising Cains

Language chosen

Thinking on the ‘what to teach eldest’, I went back to the first principles. Many of those reading learnt BASIC first because it was the core building block to the machines we were using. It wasn’t the one professionals used; that would be the variants of assembly aka machine code. Machine code always blew my brain as an 8 year old, it made no sense. Admittedly neither did the higher data or algorithm requirements I had of BASIC. Sorting a football table by points obtained as the bane of my existence in my first life as a programmer. I could never quite get it right.

So looking around at various languages etc to teach, the answer is obvious. Teach HTML5/JavaScript. The Internet is the computer now, not the piece of hardware in front. The Internet as displayed on a tablet.

Thus I was surprised (given my history of not using Microsoft tools due to their expense) to see the MIT licensed Microsoft/Atari hook up. The Atari SDK looks very nice ( http://atari.com/arcade/developers/building-html5-games-atari-arcade ). I’m not interested in publishing into the arcade, but as a tool to write games at home in JavaScript, it looks excellent.

So move aside Squeak, Greenfoot etc, Atari is the goal :)

Posted in Raising Cains

Old Thesis code found :)

Greenfoot is somewhat akin to my cruddy thesis code (no surprise, same drivers giving the ideas). So I wondered if I still had the code. Did a search and found it in the following:

Keep/Machines/kiaora-burnt/hen-yak-home/turtlehen/Piglet/Backup/Internal/thesis

That is, in a directory from my last laptop (Keep), in the backups from servers (Machines), specifically the Kiaora server, which had a directory from the Yak server, which had files from an old Windows machine (Turtle), which had a backup from Piglet, my Psion Netbook.

Old code doesn’t go away, it just gets deeper and deeper in the tree.

And it still works! :)

Posted in Uncategorized

Greenfoot, first look

I didn’t get very far before the desire to yell idiot emerged. I spend far too much of my time dealing with software licenses to read the following commentary about a GPLv2 application:

“The Greenfoot system and this tutorial are available ‘as is’, free of charge to anyone for use and non-commercial re-distribution. Disassembly of the system is prohibited.

No part of the Greenfoot system or its documentation may be sold for profit or included in a package that is sold for profit without written authorisation of the authors.”

Pretty sure it’s a bug (ie: old text) in their tutorial. Annoying though given it’s practically the first thing newbie me gets to read.

Posted in Uncategorized

Teaching to program…

Our eldest bundle of joy is nearly 8. The time hath come to distill the zenlike/stoic/cynical/manic art of programming upon said tadpole.

Initially I pondered the classics. “Here my boy, this be LOGO, and this be a virtual turtle”. “No da, it’s a real turtle”. Hmm. Something Pratchetty about this boy. Back and forth we go and I realize he’s been playing with Logo at school.

Realized after a bit that LOGO isn’t for teaching programming, it’s for teaching Maths. Wondered if anyone has created N-dimensional LOGO to teach the higher Mathematics. Back to Pratchett it seems.

ROTATE 90
FORWARD 5
TIMESLIP -3 & WORMHOLE -5y
Event: Hit self.

Obviously that’s a higher level version of LOGO that eschews the underlying Maths for a sci-fi level language. I leave the completion of the underlying logic to the reader.

After playing with the Arduino in a Robothon at work and enjoying the code (very like LPC on MUDs, you write most of your C above libraries and it all feels like a generic C/Java/LPC/something language), I decided that writing in Java was the way to go, but without having to learn the structure of Java programs.

One obtuse view I have from MUDs is that you don’t have to teach OO. OO is natural, it’s teaching invisibleness that’s hard. Tell someone they have a turtle, with a bunch of functions and they’ll happily come up with instructions for it. If they want a Tortoise, they’ll happily create a Tortoise object.

A colleague then poked me in the direction of Greenfoot. Sounded interesting, and familiar. It’s related to the work at UKC that I was briefly exposed to when writing my monkey’s vomit of a thesis and has since left me a crippled brainwashee of Piaget & Papert.

Anyone used Greenfoot?

Posted in Uncategorized | 2 Comments

Lego Lessons

I’m finding that building a little Lego late at night is a great way to maintain my sanity. Bear in mind however that this is the sanity of someone who chose to buy the Super Star Destroyer; I’m not sure there’s much left to maintain.

Some lessons:

Perfect isn’t important. When you’re ~2,000 pieces in and you realize something is off by one lego bit, the important thing is being able to backtrack and figure out the off-by-one mistake. Lesson: Debugging skill is more important than Developing skill.

When you’ve got 80 of some tiny 1×2 piece coming out of one bag set, it takes zen-like skills near the end to trust the 3 year old hasn’t lost one of them. The lesson here remains: Trust the Lego QA above all else. Perhaps a more generic lessons is “know the quality of your upstream QA”. In this case – global supervillain quality (ie: awesome and let down by the megalomaniac pointing the device in the wrong direction).

The SSD uses a huge amount of usually core architecture pieces as cosmetic features. Usually you know that this piece and that piece are going to be a hinge and you wait to discover how they’ll lock into place. With this set I have no clue. The rule of thumb seems to be that the more versatile the piece, the more likely it’s there for the cosmetic look of skyscrapershipness. Lesson: Sometimes your best practices are going to hold you back.

It’s big. I tend to work through the manual for a while building pieces and then go back to the main piece to add them. I try to minimize how often I have it sitting on the floor waiting for the next block to add on. Lesson: Don’t keep Lego on the floor? :). It does make me wonder what it’d look like if built with agile methodologies.

“Lord Vader, we have the throne room built. See how it flies around very nicely and can go into production immediately. “
*force choke*

Lastly, the new Dengar sucks. He looks like he just finished swabbing the deck in Pirates of the Caribbean. Lesson: There’s always a bug :)

Now to build a table size curve of the Death Star and video the SSD crashing into it.

Posted in Uncategorized