Moving

To peterjs.com

So I’ve decided it’s high time to finally move off Blogger onto something more powerful and customisable. Normally I’d take the time to consider a large number of competitors in the industry, you know – evaluate different solutions for their strengths and weaknesses.

But since it’s basically just for me, I planned well for this year of honours study and well we can really only make so many decisions in great depth, I’ll +1 ThisWeekInTech (TWiT) and go with hover.com and squarespace.com

So far, pretty painless 🙂

Now of course there are other things on the to-do list, like redirecting Twitterfeed, performing the full import, and building something of my own instead of a hastily modified SS template, verifying email addresses work and pipe into GMail and so forth, but on the whole very happy so far.

REMIX11 Sydney Highlights

Vaughan Knight “Game on with HTML5” was IMHO the star with this gem of JavaScript (serendipitously discovered of course):

while (zombies) {
    run();
}

He demoed how easy it is to use HTML5 game development frameworks to build cool stuff, and fast too.

Russ Weakley “CSS3 is everything we used to do wrong?” of Max Design gave a very solid presentation on how much he loves CSS3, how it’s another powerful tool for the arsenal (but like all tools – there are the right times and the wrong times to use it), the importance of object-oriented CSS and knowing CSS2.1 thoroughly before a deep-dive into CSS3, and how to make a site’s CSS more faster and more maintainable through resets, frameworks and other neat tips.

Aaron Powell “Chasing the evolving web: things you need to know to be a web developer” explained with live code demos how to actually use JavaScript’s this in different contexts (something like that featured here):

var x = 10;
var o = { x : 15 };


(function f(){           // self invoking function f
   console.log(this.x);
})();


f();                     // Global variable x
f.call(o, “foo”, “bar”); // Takes any number of additional args
f.apply(o, [“bar”]);     // Must have array as 2nd parameter

And other little titbits like how CoffeeScript compiles to JavaScript and how JavaScript functions can be polymorphic in that they can rewrite themselves from inside.

Speakers here if you’re looking for more info.

I’d definitely recommend REMIX to anyone looking at the future of web development…now how to make it to Melbourne next year?

PREMIX11 – Keynote to REMIX11 – Highlights

My first time at the web conference REMIX – Sydney 2011, and PREMIX is apparently having its first year (REMIX has been running for four).

I’d say pretty good so far, the keynoters (not quite speakers – but I’ll explain) were excellent.
  • Mr Percival is a wizard of sound, not my kind of music but very superbly performed and very entertaining. Not sure how to explain this, but he used real-time recording and playback, then sang to the playback. A few iterations of this and his track is sounding like it’s recorded by a half-dozen people at once. My guess is excellent use of a shotgun microphone and/or some great software and hardware behind the scenes.
  • Dan Ilic, self-styled hypocrite (working in network television); of Hungry Beast fame is predicting that TV will be dead by 2013 due to the rise and rise of internet TV with companies like Next New Networks.
  • Gordon Bell of Microsoft Research gave a presentation on his fascinating MyLifeBits project – could you record everything a human being has ever experienced? I got the impression he was predicting that by 2020, it may even be the norm.
  • And well it wouldn’t be a Microsoft event without some Windows Phone 7 and Kinect goodness. Looks like some really cool stuff coming down the pipe – there was a hybrid dancer / musician who performed on a good dozen instruments for our pleasure, and a tech demo of a high quality CAD of a Toyota concept car, running in real-time, e.g. the demo guy changed the colour, rotated at will and what looks like exploded the car…by which I mean the car parts flew out in several directions so you could see how they fit together. There was also a Qantas WP7 app which really reminded me of Paul Thurott on Windows Weekly – the phone is really designed around the user more than the corporate brand. It’s looking like it will be more and more difficult for me when my Android phone contract comes up for renewal soon enough. 
I’m happy I decided to go after all, and hey – free food, drinks and networking is always good as well!

Chrome to Phone is awesome

Soooo fast, and cool!

More details via the official Google Blog:
http://googleblog.blogspot.com/2011/03/20-percent-time-spent-coding-in-clouds.html

Starting to get a little scared though, if Froyo is the requirement, hopefully Gingerbread/Honeycomb don’t become requirements too soon for these new features (or HTC and Telstra update more frequently). Still this was heartening:
http://www.androidcentral.com/three-uk-suggests-original-htc-desire-will-get-gingerbread-update

CSE Camp – Epic bus fail, broom game, newspaper towers and internet memes

It’s been about 6 years since I’ve had the pleasure of being on a camp, the last I can remember was a Year 11 Thredbo/Jindabyne trip. So ending yesterday, for a little over 48 hours CSE@UNSW first years, and me since it’s my first year at UNSW, were at Wombaroo Adventure Center in the southern highlands about half way from Sydney to Canberra, Australia.

Internet Memes
The theme, one pretty awesome one. I just couldn’t resist going as Happycat (pics may come later). Memes in attendance (by Ben Pinto):

Pirates vs ninjas
Im on a boat
Portal
Troll science
Trollface
Fffffuuuuu
F**k yeah
Forever alone
Anon
Milhouse is not a meme
Lolcat
Domokun
Luigi
Goatse
Mac vs pc
Wonka bar
The ring/ grudge girl
Charlie the unicorn
Shamwow guy
Old spice guy
Hello world
Dancing star wars kid
Hide yo kids guy
Double rainbow guy
Leekspin
Dickinabox
Engineer (teamfortress)

The engineer won the award for best costume…not sure I agree since Callum’s PC was epic but that’s democracy for you.

Broom Game
Simply put – hold broom and face upwards, spin 15 times then jump over it. Your inner ear’s motion detector will deceive you – good luck! (Not me but some of those who participated – the end is a must see :- )
http://www.youtube.com/watch?v=zwgXt6Lr5BE

Newspaper Towers
aka Fun with Newspaper. The Australians were by far the best general building material, literally just separate, roll up and build up. You learn quickly the best ways to build things like rope to tie things together.

The two most successful teams maxed out their towers to the 4 m ceiling using tripod-based designs with a spire on top. One other got very close with a spire like a knight’s jousting post on top of a 3 very solid base rings of compacted newspaper. Guess which one I was 😉

Epic Fail Bus
Well ’twas begging to have little more than the chance of a wee snowball in the fires and brimstone of hell. A little context and story:

  • Driver tries to start bus on slight slope at Wombaroo. Driver fails a couple of dozen times, including rolling backwards several meters (luckily no one was back there).
  • Driver finally succeeds in starting the engine for more than 15 seconds, gets the bus up the incline. This is over 30 minutes after we should have left!
  • Bus breaks down at least twice on the freeway (I dozed off so it may have been more).
  • Driver decides to continue following M5 into the longest and most congested tunnel in Sydney (and possibly still the world), despite his engine trouble.
  • Driver continues in the right hand lane, starts off well on the tunnel descent.
  • *Kffppppphh*…*splutter*…*cough*…*bang*…and we’re coasting to a stop.
  • Driver attempts a restart a good dozen times before giving up.
  • Realisation of being (semi) trapped inside a bus inside a 4 km tunnel with hundreds of cars passing very close sets in for some team members. I feel for their claustrophia.
  • Some 15-20 mins in, a redirecting sign truck arrives behind us.
  • To great applause, 52 minutes in, we greet the tow truck…
  • Only to wait another half hour to be fully towed out!
  • And another 20 minutes trapped inside on the side of Marsh Street, or thereabouts. But at least with fresh air through the top air vents…some compared it to being reborn or other life changing experiences. Quite the saga.
Clearly the cases of:
  • the forgotten sleeping bag (yes someone slept the entire night before discovering their sleeping bag was actually right where it should have been), and 
  • the 7 am fire alarm (don’t go playing with circuit breakers at 4am, you don’t know when the cabin battery power will run out)
were awarded camp’s “Biggest fail” far too soon. Everyone scored a trophy – the limited edition purple cake camp shirt.
In summary:

LaTeX3.1415926 on Win7x64 = pain, on Ubuntu 10.10 = pleasure

I can’t be bothered ranting…title said it all. I wasted a good 2-3 hours setting stuff up on Windows (and didn’t get there), it was like 2 commands on Ubuntu Linux Maverick Meerkat (10.10). Those two commands were discovered by typing the commands found at:
http://www.ringlord.com/publications/latex-pdf-howto/

Basically typing latex and thumbpdf, and following the Ubuntu command prompt instructions. Kind of felt like xkcd’s python:
http://www.xkcd.com/353/
import antigravity

❤ Ubuntu + LaTeX, especially awesome for all the math-oriented stuff. Donald Knuth’s years of toiling were not in vain!
http://en.wikipedia.org/wiki/TeX#History

Google and social, go together?

So here’s one experience I’ve just had – and an insight into why it’s sometimes said Google doesn’t get social.

Social is about conversation and interaction – here’s something I can do for you, would you mind doing this for me?

So here’s why – the first comment on this blog, 3 months ago. Discovered by me just because I decided to go back and see what I was writing on this humble weblog, see what I was thinking.

Now Blogger has the option to turn on comment notification email. But if I’m not Engadget, Gizmodo, Dvorak, i.e. someone or something that can afford a real hosting / blogging / content management solution, this is the kind of thing I’d like to know about!

Basically this “Comment Notification Email” box, buried at the bottom of Settings > Comments, should have had the email address I signed up with. It’s not spam if its a real person behind the scenes (and the link that’s not a link and contains the Session ID and a blog behind it is a clear example of that =). And it’s easy enough to link back to these settings in such an email so if the user decides it is spam – they have the option to turn it off.

Google – time to listen to dear leader turned advisor and think a little less engineering and a little more social. We’ll like you more for it, promise!

First house move, memories and moving on to future opportunities

Moving house for the first time in 22 years takes a phenomenal amount of time.

Time to clean, to prepare, to pack, to decide what to take, to decide what to box and put in storage, to decide what is important and what is junk. Sorting, sharing, helping the rest of the family, cleaning, washing, bubble-wrapping, padding, taping, vacuuming, clearing out.
And then more on the other side unpacking…

Unwiring the sprawling Cat5/Cat6/TV/phone/power mess with its tentacles reaching into nearly every room of the sprawling multi-story six bedroom mansion.

Finding old school projects and taking photos because there’s no way you can keep them. Clearing the areas where life, water, and wildlife (possums were adventurous – one once poked its head through a hole in my wall and stared at me, at least before I taped over it).

Yes ’twas a grand old house, but one which really is reaching the end of its life. The brick fireplace roof flew off in strong winds last year so it’s just a column up to open sky. The roof is still mostly covered in aging wooden shingles where the possums haven’t knocked them off, and leaks in many places. Mosses and fungi are starting to invade sections of walls. Lichen grows on the fireplace bricks, especially in the cracks over the old cement. Some of the glass has been broken and taped over as a quick fix to keep the elements more outside than in.

Still much is habitable and the house still feels solid, even when it’s hailing and pouring with rain. The downstairs is generally far more pleasant, especially in the hot summers when hot air escapes leaving the downstairs areas cool. It has a charm, an air about it, though perhaps that’s just 22 years of memories staring back at me.

In any case, on to the future, apartment living and continuing study for this year at least. Let the good times roll, being closer to a new university in a new suburb, being close to good buses and trains, meeting new people and just keeping up with the continuous learning, the wave often likened to a tsunami, or the tide itself rising up – the ever-growing ocean of  the sum of human data, information, knowledge and wisdom on the internet.

Water prices should be trending downwards, not upwards

http://twit.tv/gtt18 – Green Tech Today 18: Oasys Water.
Aaron Mandell, CEO’s aim is to get the price down to as low as $0.25 per cubic meter. He says current processes (where energy costs are often subsidised) range from $0.65-$1 per cubic meter for current desalination.

How? Using some clever thermodynamics and chemistry at scale.
Why? The Oasys process in practice uses 1/3 to 1/2 of the energy of currently in use methods (with theoretical potential for 1/10 of the energy), primarily because it can use normal osmosis rather than reverse osmosis.

http://hypertextbook.com/facts/2004/JosephSabatelle.shtml – New York Water Prices
A little math – 1kL = 1 cubic meter. So $0.000537 per liter = $0.537 per kL (cubic meter)

http://www.sydneywater.com.au/Publications/FactSheets/UsageCharges.pdf#Page=1 – Sydney Water Usage Charges. $2.012 per kL, a big piece due to the cost of the Kurnell Reverse Osmosis Desalination Plant.
http://en.wikipedia.org/wiki/Kurnell_Desalination_Plant

I wonder if in 5-10 years this process could be retrofitted into existing plants for big potential savings as well?
Rob McGinnis, CTO and co-founder says the “plants are modular building blocks” so they should be scalable down as well as up – perhaps for use by farmers near saline aquifers? These are in addition to the other applications – industrial waste reuse, and even a new form of hydroelectric power.

In any case I think this is pretty amazing that some clever salts and thermodynamics could become a huge piece of the solution to the world’s water issues.

Explore more:
http://www.oasyswater.com/press.php

Carbonite – Workarounds to back up executables, videos and other files

Carbonite is the online backup service I’ve ultimately decided to use to protect my data off-site against those proverbial theft/fire/flood events. Unfortunately a Windows Home Server box, as awesome as it is, just isn’t off-site (so it gets destroyed or stolen with everything else).

For me, Carbonite does a great job out of the box – documents, photos, music, program/web application source files – ASCX/ASPX/CS/CONFIG/C/CC/CPP/H/HTML/CSS/JS/PHP/Python (ironically including the .pyc files which are actually almost useless to me) /Ruby/Scala/ASM/eqn/JED, program data files – SQL/YAML/XML/XSD/in/out, text files, PDFs, Mercurial repositories (.d and .i for example), compressed and encrypted files – Zip/7z/TrueCrypt/Axcrypt and the vast majority of the other important stuff.

Of course, it’s detailed by Carbonite that they do not automatically back up executable files, video files, or many other kinds of files.

In effect, you manually have to go into the relevant folder, right click and select backup (thankfully Ctrl+A to select all and then backing up does work for all files, just not folders).

Why it’s a problem
The core is simply – your complete backup is no longer automatic. That means human error begins to creep in.

I’m a computer science student. I have dozens of different projects and assignments completed over the last 4 years, and I know if I come back to them in 5 years, it will be a lot easier to have their executable forms lying around so I can remember the application context more easily.

These are primarily .exe, .o, .jar, .dev and other miscellaneous file formats. Now I will be clear – Carbonite backs up the source forms as detailed above. I’m just saying I want the whole package because some things like compilers and IDEs can become misplaced, hard to find, etc over time. Stuff disappears from the internet all the time, for example if you missed it one of the major original content portals on the internet – Geocities – closed recently.

Workarounds
So, I said Carbonite does by default back up all zip files. This suggests a relatively simple workaround, just put each important file inside a .zip file. Easier said than done?

We’ll need some programmatic way of manipulating these files (otherwise it’s literally back to the Windows GUI). 7-zip provides such a useful method.

http://dotnetperls.com/7-zip-examples

7za.exe is the command-line version, this one worked for me (though YMMV)
http://downloads.sourceforge.net/sevenzip/7za452.zip?use_mirror=puzzle

Like many programmers, I see myself as pragmatic (e.g. Rasmus Lerdorf, father of PHP – http://itc.conversationsnetwork.org/shows/detail3298.html so I’m going to just do something simple and easy for me.

My backup strategy for these files is basically to call something like the following on the Windows command line, which will create one big .zip file:

C:UsersPeter>7za.exe a -r -tzip myfiles.zip *.exe

Since this is fundamentally a 3rd tier backup for me, I’m satisfied even though it will take me a little longer to recover the data, and it’s possible I’ve missed something (or Carbonite changes their program’s rules, but I reckon they aren’t looking to start a war because they’ll only lose customers).

Now again being lazy (though I should say this is in the spirit of automation, removing human error), I’d rather not type that into the command line every time (and if I forget something?), so let’s turn this into a file called backup_via_carbonite.bat :

GOTO EndComment
This BAT-file zips up executable files,
web site favicons, development files, DLLS,
installers, compilers and other miscellaneous
files so they are backed up by Carbonite.

Please run it through YOUR OWN TESTING if
you plan to use it as part of your backup
strategy!

Notes: - * is a wildcard meaning match all
- "a" means create archive
- the -r recurses through the entire
folder structure
- myfiles.zip is the name of the
resulting .zip archive
- the -x!Downloads* excludes files in
the Downloads folder, same for AppData

Written by Peter Schmidt
03/DEC/2010
:EndComment
7za.exe a -r -tzip myfiles.zip *.a *.bak *.cab *.com *.dev *.dll *.exe *.ico *.ini *.jar *.lib *.msi *.o *.win -x!Downloads* -x!AppData*

Now I can just double click backup_via_carbonite.bat from Windows, put it in my Startup directory, or in the Event Scheduler so it happens as close to automatically as I’d like it to.

My understanding of .zip is it is not a solid compression format and so should be more resilient to small amounts of data corruption, i.e. one flipped bit will not corrupt on average half the files, just one of them.

Now I did say video files. That’s another set of extensions – easy to add but hard to discover. Here’s a start:

GOTO EndComment
This bat-file zips up some video files
so they are backed up by Carbonite

Written by Peter Schmidt
03/DEC/2010
:EndComment
7za.exe a -r -tzip myvideos.zip *.flv *.mpeg *.mpg *.mp4 *.m4v *.qt *.wmv

Of course anyone with a sizable video library will know this won’t scale, will consume a ridiculous amount of space and well…just be unwieldy and bad. It’s possible on many connections that this file would never even be completely uploaded (or may change too frequently) – resulting in no backup at all!

I don’t have the solution, except to say Windows 7 does provide the lovely feature of libraries. Try compositing all your videos into one library so you can use the Ctrl+A backup above. If you store your videos in separate folders or across multiple drives – you’ll need to add each drive/folder to the library unless you’ve got a more creative workaround – good luck thinking =)

Final note: Ironically because Carbonite stores older versions of files (including the .zip file that will now be being regenerated automatically on schedule or when I restart Windows), this solution will end up costing them significantly more storage space, bandwidth and time than if they just gave me, the informed paying customer, the option to back up what I wanted conveniently.

Eventually I might get around to splitting this up into separate archives for separate folders, but I’m probably too pragmatic with too much other stuff to get on with…330MB is not too bad a zip file to upload dozens of times over.