Friday 21 August 2009

Songs In Code

These were tweeted today - I liked them so much I wanted to capture them in one place for posterity. For more, go to http://twitter.com/search?q=%23songsincode#search?q=%23songsincode

this.CanTouch(false); Stop(DateTime.Parse("Hammer");


assert Soon(you.isHome());

if (you == 'The Piano Man') {you.SingUsASong(tonight, 'Oh, la la la, de de da');}

you.my.Girl.EyeColor = Color.FromRgb(139,69,19);

streets.each { assert it.name == null }

Tuesday 17 March 2009

Time-based Manipulation of VOB Files

Editing DVD VOB files can be a royal PITA.

I had a DVD which was a copy of a VHS tape, produced by a simple copy in an LG RC-195 DVD/VCR combo unit. The tape was of a TV show which is damn near impossible to buy now, and all the reviews of the DVD version claim it has been badly edited. Even the VHS drops the main title sequence from all but the first episode.

So - I wanted to create a backup of the tape, but also make it a bit more intelligent and be able to access the individual episodes. The primary problem was episodes were split across multiple VOB files - so I needed a tool which would treat these as a single data stream and allow time indexing into it.

Media Coder is the only tool I've found that allows setting time-based start and end points. Alas it didn't want to play nicely with joining across the multiple VOB files, particularly with the time indexing past the first file. It supposedly supports joining files, but I had no success with that.

Enter VOBmerge. This handy little tool allows multiple VOB files to be joined into one large file. It's very quick, and I also discovered that Media Coder was much quicker in transcoding from the merged VOB file than from the originals - plus it seemed to be producing smaller results at the same settings - approx 160meg XviD avis versus the approx 200meg when transcoded from the original VOBs.

[Aside: someone suggests 'copy /b A.vob + B.vob merged.vob' gives exactly the same result!]

While this is ongoing, I was happy with yesterday's progress. Next step is to join the original title sequence onto each episode, and instead of transcoding to XviD, preserve the footage in DVD format so I can create a custom menu for the DVD.

Wednesday 11 March 2009

Rubber Duck Debugging

Priceless. http://lists.ethernal.org/oldarchives/cantlug-0211/msg00174.html

We called it the Rubber Duck method of debugging. It goes like this:
  1. Beg, borrow, steal, buy, fabricate or otherwise obtain a rubber duck (bathtub variety).
  2. Place rubber duck on desk and inform it you are just going to go over some code with it, if that's all right.
  3. Explain to the duck what you code is supposed to do, and then go into detail and explain things line by line.
  4. At some point you will tell the duck what you are doing next and then realise that that is not in fact what you are actually doing. The duck will sit there serenely, happy in the knowledge that it has helped you on your way.
Works every time. Actually, if you don't have a rubber duck you could at a pinch ask a fellow programmer or engineer to sit in.

Thursday 29 January 2009

Auto Self-Service/Diagnosis

I'm pondering the merits of buying an ODB II code reader, in order to be able to service & diagnose problems with our cars. Jaycar have one for $129 - which is quite a lot to shell out for something I may decide isn't really how I want to spend my already limited time.

In the first instance, I might try a $10 can of contact cleaner & give the MAF (Mass Air Flow) sensor a clean to see if that helps at all.

However, it's still cheaper than having the local AutoMonkeys clock up labour hours trying in vain to diagnose a problem that they don't really care about all that much... Alas, erratic idle behaviour or stalling in our current 45.7 degree Celsius heatwave falls into the "too hard basket" for most people.

Thursday 15 January 2009

Origami CD Case

Very green. Very cool. Very handy!

http://www.curbly.com/DIY-Maven/posts/680-How-to-Make-a-Folded-Paper-CD-Case

ADSL Speed Testing

Download/upload test: http://www.ozspeedtest.com/

Distance from Exchange:
  1. Use http://www.adsl2exchanges.com.au/ to find your exchange
  2. Use Google Maps to compute the approximate distance to your house
  3. Use http://www.internode.on.net/residential/internet/home_adsl/extreme/ to convert distance to theoretical speed (under ideal conditions).

Downstream Attenuation:

  1. Find the "Downstream Attenuation (dB)" figure from your modem's stats page.
  2. divide it by 13.81
  3. Use http://fremnet.net/article/216/adsl-theoretical-speed-calculator or the excel spreadsheet on which it is based.

All of the above is approximate & theoretical, and only reflects the performance between your house and the exchange you are connected to. The network performance beyond your exchange, and the performance of the sites you are visiting is another story entirely.

Thursday 8 January 2009

The CIMM - Capability Immatturity Model

What's worse than ad-hoc? The four levels of software immaturity - negligent, obstructive, contemptuous, and undermining:
http://www.stsc.hill.af.mil/crosstalk/1996/11/xt96d11h.asp

Based on http://eprints.ucl.ac.uk/977/1/12.7_immaturity.pdf

Tuesday 6 January 2009

NEETS - United States Navy Electricity & Electronics Training Series

http://www.phy.davidson.edu/instrumentation/NEETS.htm

The Navy Electricity and Electronics Training Series (NEETS) was developed for use by personnel in many electrical and electronic related Navy ratings. Written by, and with the advice of, senior technicians in these ratings, this series provides beginners with fundamental electrical and electronic concepts through self-study. The presentation of this series is not oriented to any specific rating structure, but is divided into modules containing related information organized into traditional paths of instruction.

The series is designed to give small amounts of information that can be easily digested before advancing further into the more complex material. For a student just becoming acquainted with electricity or electronics, it is highly recommended that the modules be studied in their suggested sequence. While there is a listing of NEETS by module title, the following brief descriptions give a quick overview of how the individual modules flow together.