jemnotesversion 2 / featuring random or see all/search

Jan 27
Sewerage is the practice of conveying sewage in sewers. They’re easily confused words.
Jan 26
PiCloud has a clean and simple website, explaining their clean and simple way of adding python computing in the cloud. Here’s their example:
def func()
  # Do something.
  ...

import cloud
cloud.call(func)
Jan 12
According to wikipedia, dry arabica coffee contains about “12mg of caffeine per gram of dry mass”. Some of this will be damaged by roasting, and it won’t all be extracted after brewing, but this means 15g of ground coffee probably contains around 150mg of caffeine. This is the same as around three cans of coke.
Dec 22
I looked and listened to lots of the portraits here, of the leaders at the Copenhagen summit. They’re quite fascinating.
Dec 10
The amazon remembers feature of their iPhone app is quite hilarious, and very good. I took photos of lots of bits of office stationery, and it recognised them very well—including a small yellow post-it note pad, some gum and various other random bits.
It seems they’re using their mechanical turk service. It is a bit disappointing that it’s not automated, but a cool application of ‘old technology,’ too, I guess.
Addendum: I tried writing “Ideal $10 gift for co-worker” on a post-it note, photographed it, and promptly got this product suggestion. Nice job :)
Dec 10
There are some amazing pictures and videos called Britain from Above. Even the thumbnails look great! For example, start with one of these:
Dec 10
Porsche’s new four door sedan looks and sounds amazing. A nice car.
Dec 9
I saw artist Candice Breitz’ video installation of 30 fans singing along to a Madonna album in the Boston Museum of Fine Arts Seeing Songs exhibition. I mentioned it to some friends, and we ended up trying it ourselves. We first, all together, sang a song and recorded the sound. Then, one at a time, we videoed each other singing the music while listening to the group track with headphones. That gave us 9 videos that we wanted to tile in a 3x3 grid, synchronize, then convert to one video.
I started off using iMovie, but the interface was laggy and inconsistent as my computer struggled with the load. You can also only play two videos simultaneously, using the picture-in-picture feature. You’d have to add one video at a time, and constantly export and re-import. This wasn’t going to work.
Then I discovered rmov, an excellent library for opening, editing and exporting QuickTime movies within Ruby. It worked spectacularly well, and I made the video as desired. I found the required start-time offsets to synchronize the streams by importing streams one by one and comparing them to a single person; then I could just compose all the streams together. I often just exported the audio, which made it much faster to render while deciding on the offsets.
Lastly, here’s the code I used.
require 'rubygems'
require 'rmov'

# locs refers to the filename of the original files.
locs = [2732, 2734, 2736, 2739, 2740, 2744, 2746, 2748, 2749]
offsets = [41.12, 4.25, 1.8, 0.0, 0.8, 2.5, 1.65, 4.7, 0.8]

clips = []
locs.zip(offsets).each do |l,off|
  filename = "source/MVI_#{l}/MVI_#{l} - iPhone.m4v"
  clips << QuickTime::Movie.open(filename)
  clips.last.delete_section 0, off
end

background = QuickTime::Movie.open 'source/background_480x360.png'

q = QuickTime::Movie.empty
length = clips.map(&:duration).max.ceil
puts length
(length*15).times do
  q.insert_movie background, 0
end

WIDTH = 480
HEIGHT = 360

clips.each_with_index do |c,i|
  row = i / 3
  col = i % 3

  q.composite_movie c, 0

  a = q.tracks[-1]
  a.scale 0.34, 0.34
  a.translate col*WIDTH/3, row*HEIGHT/3
end

exporter = q.exporter
if File.exist? 'settings.st'
  exporter.load_settings 'settings.st'
else
  exporter.open_settings_dialog
  exporter.save_settings 'settings.st'
end

outname = "output.mov"
puts "creating #{outname}."
exporter.export outname do |progress|
  percent = (progress*100).round
  puts "#{percent}% complete"
end
Oct 29
Fantastic icons that I saw a while ago, and had to re-find this evening.
Oct 6
A rather long but quite interesting discussion of domain specific languages.
Aug 13
A nice explanation of camera sensors.
Aug 5
Nice way of seeing a cloud of words. For example, for this page I got {{<img src=“/jemnotes.png” alt=“wordle cloud” />}}
Jul 24
Mar 31
Compare the popularity of two search terms over time at Google Trends.
Mar 28
The first javascript libraries I used were prototype and scriptaculous. However, I just started using jQuery, which is insanely great. The (css-like) selectors they use, for example, are so much fun: consider
$('li:visible:not(:has(img.checkmark.checked))').hide('slow')
This slowly hides and removes any visible list items that have no child elements that are images in the checkmark (tick for commonwealth readers) and checked (ticked) classes.
In other words, this slowly fades any checked off items that haven’t yet been hidden. So clean!
Mar 26
Slicehost clearly know what they’re doing, with a simple, clean website, and nice tools—including a web browser based console for emergency situations.
Feb 26
Nov 6
Peregrine espresso in Washington, DC (map). The best espresso I’ve had in the US.