xRIM: The Virtuous Cycle
Posted on January 10, 2012 at 01:56 AM
Categories: tech, theories, mobile, business, barcamp, startupcamp, jobs
What would happen if a handful of ex-RIM employees started up new companies? Food for thought. Thousands have been laid off, we could get dozens of new startups. The groups would be experienced, knowledgeable, compatible, the ideal for a founding team. They would be connected to former colleagues wealthy from stocks from RIM's early days, making it easy to raise seed capital.
On the other hand, the RIM "diaspora" could drift away, getting jobs in the US, seattle, silicon valley… pulling valuable human connections, knowledge, and experience out of the local loop.
It's not hard to see that the first scenario is better for the region. The existing cluster grew because individuals, once they get a taste of the industry, cycle through many companies. In fact, this region has been an entrepreneurial centre since the industrial age. Electrohome for example, a major electronics company in the mid-20th century, was founded in Kitchener. While Toronto has more tech and sheer scale, KW has a greater concentration, and it's concentrated groups of entrepreneurs that create the upwards spiral.
I can't go without mentioning silicon valley, because I spent a significant part of my formative career time there. Around the time of Electrohome, there started a lovely chain of diasporas and virtuous cycles in the bay area. Shockley left Bell Labs to start his new company. The "Traitorous Eight" left Shockley to form National Semi. More left to start Intel and AMD. At SRI, Engelbart's employees skipped out to join PARC. PARC people left in many directions–including the Mac division at Apple, as well as Adobe and 3Com. Ex-3Com people are all over the place. More recently, there's the Xoogler effect, leading even to specialized ex-google-only VCs.
My point is this: if we can keep the xRIM in the area, then cool tech will be created, the cluster will expand, and new startups will grow. That's a good thing. So, let's see if we can see the silver lining in the cloud and open up some doors.
Oh yeah, and come out to StartupCampWaterloo12.
How to interview well at Google
Posted on August 29, 2011 at 10:11 PM
Categories: tech, code, infographics, jobs
Some friends of mine have been interviewing at Google and I've been helping them prepare. After some practice interviews, I drew up this flowchart for them to take with them (mentally) to the interviews.
Google uses "oral exam" type interviews:
- The best preparation guide is by Steve Yegge.
- You can pretty much ignore all the official guides that Google provides.
- Expect tough questions of the type that you would have received in your advanced CS classes.
- You can also mine programming contests for good questions.
- Another good source of questions is this mathNews question list.
For another strategy, pull out your copy of CLR(S) (you do have a copy, right?) and re-learn everything. It's all fair game in a google interview.
After you start reviewing, you must do practice interviews. Invite a friend over to ask you questions. Here is what they have to do:
- Pick a challenging question and read it to you.
- Not give you any help at all.
- Ask for a solution in pseudo-code. When you provide it, ask for the order of magnitude runtime analysis.
- If you make a mistake, after a while, they should say "are you sure that's correct?"
- If you don't give the optimal solution, they should let you develop it, and when you're done, say "do you think there's a better way to do it?"
Believe it or not, interviewing someone isn't a fun as you think, so provide them with beer and/or pizza. Meanwhile you must do your work on a whiteboard. If you don't have one, use a flip-chart or as a last resort paper.
Trust me, answering questions in real time on a white board isn't like doing them in your head. You must practice this or you're going to mess up the interview. Practice with a friend!
Finally, use the interview flowchart to answer the questions:
- The first, simplest solution just has to work. Don't worry about runtime at this point.
- Start with pseudocode. Only real code if they ask for it.
- Do a bunch of examples. Make up some sample data and run through it by hand. This will help you understand the problem better, even if you think you already do.
- Once you complete a simple (slow) solution, prove it works and then move on to making it faster.
If you do well, the interviewer will tell you you're done before you run out of time. Good luck!
Scientific American infographics or chartjunk?
Posted on July 29, 2011 at 08:35 PM
Categories: infographics, science
This data graphic isn't just crazy, it's misleading.
Enhanced information graphics are part Scientific American magazine's refresh effort. They probably feel the pressure from Seed magazine's great imagery. Right now they're they're just flailing around and showing how to do it wrong.
When I first looked "Baby's Life, Mother's Schooling" I thought it was a periodic table of the elements with psychedelic colours. My first intuition was the blue arrows would show the increase in child survival in each country as mother's education grew. But the colour gradients and line thickness changes confused me.
So I read the accompanying text. It purports to explain:
"Mortality drops in proportion to the years of schooling that women attain … as seen above in each rising line."
(this is wrong).
The legend clarifies what the colour gradients mean. It seems that the thickness and colour of each line shows the rate of infant mortality. The rising arrow, on the other hand, shows how much, between 1970 and 2009, education levels have gotten better for women. That's not what was advertised.
I thought I was looking at improvements in child health, not improvements in parental schooling. Where's the real data? Try to read the thickness of each line from left to right. It's not easy to quantify the thickness change by eye, and yet this is the key chart data.
Examples:
- Things seem to be going well in Guyana. But in fact, the change in infant survival has been minimal. Line thickness stays the same.
- Yemen appears to be doing poorly, but in fact, infant survival got better, even as women's education stagnated, contradicting the central theme. Line thickness decreases, even though the angle is flat.
The irrelevant time data obscures the relevant correlation data. On the basis of this evidence, I claim that the chart is not only ugly but actually misleading.
In addition to these massive flaws there are also some only major flaws such as:
- The table of elements style obscures the geographic layout.
- The grid layout distorts actual continent shapes beyond identification.
- The colours surrounding each continent are unnecessary non-data ink and clash with the data colours.
- The extra world map in the legend adds to the confusion about geography.
- Since the arrows point up, the title should say that "child survival rates go up" rather than mortality going down.
That's a load of complaining, and it would be inappropriate if I didn't end by showing how to fix it. So. If I had been involved in the editorial design, I would have suggested that the artist replace the grid with a real world map, which can easily contain the data elements in free-form layout on top of the relevant country. Next, I would have made each arrow a mini-graph keyed to education in the X dimension and survival in the Y dimension. I would have calmed or eliminated the colouring, since it adds no information.
Multivariate charts are tough to implement, all infographic designers are aware of that. However, that's no excuse. Scientific American should be a beacon of good data graphics, not a disseminator of chartjunk. They need to get their game in shape before they consider themselves serious purveyors of data visualizations.
I got some really awesome comment spam recently. Here's an example, from my post on Nerdcore music (I deleted the comment because it contained a spam link):
LOL. I think you may have missed your calling. What you need to do now is get some oversized pants and some dark shades. Add a little bling, and they go on tour. You'll pull geeks out of the woodwork. Heck, I bet you could fill a decent sized coffee shop. On second thought, maybe you should stick to your day job.
If this was written by a human, they put some actual thought and energy into it. If it was written by a chatterbot, I'm seriously impressed. Either way, great work, whoever you are!
A friend just asked me for some advise on buying speakers — should she get Bose or Paradigm? Well, I had a few words to about that, so here's my response:
Here's an answer that's probably much longer than you wanted but you've hit a personal obsession! Maybe I'll turn this into a blog post :-)
I'm going to throw you a curveball with a totally unorthodox opinion. Speakers are funny, there's no trade secrets or patents that big brands have to make better speakers. It's basically heavy metal and the more expensive the components the better the speaker. And the components are all commodity parts, so big companies have no real edge or benefit. Ads will tout the benefit of odd designs and so on but really what you want is a big, heavy box with good metal inside. MDF (yes, fibreboard) is a great material for the case because it doesn't vibrate.
But—if you get a good pair with a good system, you're going to hear the difference and you'll never go back!
I would stay away from the big brands, because you're paying for marketing, not parts. Bose spends a ton amount of money to convince people that their speakers are awesome, so when you buy the speaker, you're paying for all that marketing. They also use tricks like compression and bass boosting that psychologically make people think it "sounds better" or louder but break down the fidelity of the audio to the original recording. If you want to stick with a known name try B&W.
But you don't need or necessarily want to get a brand name. Instead go for some tiny company in some guy's shed. A friend of mine bought a pair of speakers made by a guy in a shed in Hamilton and they're awesome. My speakers are AudioEngine 5's and they're made by some tiny company in Mississippi and they're very very good. They put the system in my car to shame. Guys in sheds make great speakers because they buy the best parts and have no overhead and there's no magic—what you want is totally dedicated craftsmanship.
When you decide to invest in speakers the first thing to do is head to a proper audiophile level shop and listen to as many as you can. Check out for example Alternative Audio. Turn the system way up to find out what happens to the sound. There's big difference in how they sound just like different instrument makers (they are effectively instruments). For example here's a comparison of two brands on audioholics.
The audio forums are the best place to get unbiased opinions from people who really know what they're talking about. Most reviewers (like on gadget sites) will be judging based on features which don't matter. What you want to know is, do people who have good ears think they sound good. One fun forum for people who really know their hardware (like which crossover is best?) is diyaudio.
You can also trust true audiophile sites because those people are just obsessed. For example have a look at stereophile.com. They have just reviewed for example a pair of bookshelf speakers from a Canadian company called Totem Dreamcatcher. They loved them and they're about $600.
You should be able to get a really good set for under $1000. Don't go higher because you get into stupid money territory and the law of diminishing returns kicks in real fast. Also seriously consider buying used, because they don't degrade over time. No moving parts, and the good ones have good components. You can save a ton of money used. For example look on Audiogon.
If you want to read a really awesome and trippy description of one person's highly convincing theory, check out Mother of Tone ... it's worth checking out as a musician and makes a lot of sense. Start back at the beginning if you have time.
Regarding surround: first get a good stereo pair, and then add the other three, which don't matter nearly as much, simply to add the surround experience.
Finally, speakers are only a part of the chain. All audio hardware follows the general rules above: there's no special magic, don't believe what brands tell you, it's all about components, heavy metal is good, listen before you buy.
In summary there is no "best speaker manufacturer". Go to a high end shop, listen and find out what you like, and then buy used or online from a guy in a shed.
(Pictured is Altec Lancing Voice of the Theatre—a true classic)
Google doesn't provide any "official" way to embed a YouTube video in 480p. It always drops you down to 360p by default, and that just looks crap. You can embed in HD so why not 480p? No one knows. But don't despair, there is a way!
Here's some code for you:
<object width="853" height="505"> <param value="http://www.youtube.com/v/MOVIE_ID&amp;hl=en_US&amp;fs=1&amp;rel=0" name="movie"> <param value="true" name="allowFullScreen"> <param value="always" name="allowscriptaccess"> <embed width="853" height="505" allowfullscreen="true" allowscriptaccess="always" type="application/x-shockwave-flash" src="http://www.youtube.com/v/MOVIE_ID&amp;hl=en_US&amp;fs=1&amp;rel=0"> </object>
That will give you an "HD width" 480p video. Just change "MOVIE_ID" to the ID of your video (e.g. "J-lHxxToCfo") in both places. The width of the embed will be 853px, which is 16:9 for HD video.
What if your video is 4:3, i.e. 640x480? I can't find any clean way to embed at exactly that size, if you use the above code you'll get black bars on either side. However you can use a negative margin to get a box of the right shape. Just wrap your object like this:
<div style="width: 640px; overflow: hidden;">
<div style="margin-left: -107px;">
<object etc ... ></object>
</div>
</div>The controls will go off the screen but at least the user will still be able to click the centre of the video to start and stop it. Here's an example:
My column width is less than 640px but hopefully you get the idea.
I'm not convinced by gamer nerdcore but good CS Geeksta Rap is cool. Finally some street beats that talk to me!
Monzy's Kill -9 (video) is pretty entertaining. Check out Dale Chase Coder Girl. "She's not another shallow copy I can sudo" heheh.
I found a few new lines in a dream recently. Don't know if they'll ever fit into a rap though.
Java or Scala it doesn't matter to me If you want I'll even write your app in PHP 10 PRINT "HELLO" 20 GOTO ONE-OH Your bytecode is subject to my interpretation Use my RJ-45 I'll put a packet right into your ass If you don't do what I want then I will fork your git I'm fully dedicated but you just can't commit
Why condition your battery once when you can do it three times?
Posted on October 13, 2010 at 09:46 PM
Categories: mac
MacBook users have started to discover over the last few years that their batteries can take a total nosedive into uselessness in just a few months. The first battery on my 2008 MacBook Pro was dead by the end of 2009, flat dead, and out of warranty too. Damn. Cause of death? Lack of "battery conditioning" also known as "calibration".
If you want to know how to calibrate your battery, you can refer to this hard to find guide from Apple:
To calibrate the battery:
- Plug in the MagSafe power adapter and fully charge the MacBook or MacBook Pro battery until the light on the MagSafe connector changes to green and the Battery icon in the menu bar indicates that the battery is fully charged.
- Allow the battery to rest in the fully charged state for two hours or longer. You may use your computer during this time as long as the power adapter is plugged in.
- Disconnect the power adapter with the computer on and start using it with battery power. When the battery's charge gets low, you’ll see the low battery warning dialog on the screen.
- Continue to keep your computer turned on until it goes to sleep. Save your work and close all applications when the battery's charge gets low and before the computer goes to sleep.
- Turn off the computer or allow it to sleep for five hours or longer.
- Reconnect the power adapter and leave it connected until the battery is fully charged. You may use your computer during this time.
Pretty easy to understand, right? Yeah, the only problem is that even though you're supposed to this every month or two, there's no facility on the mac that actually, you know, prompts you to do it. Nothing, nada, zap diddly doo. You'd think that Apple with their vaunted usability standards would pop up a message at the right time saying "hey, now would be a good time to condition the old battery, here's how to do it".
Also, Apple's instructions are missing two other key pieces of information. The first is that you should immediately download a wonderful app called Coconut Battery. Go ahead, I'll wait. It will tell you how crap your battery is and you can save the data to get a history over time.
Second is that that condition is not something you can overdo. Don't just do it once. Do it twice, three times even. Keep doing it until you stop seeing capacity gains in coconut battery. Most recently, my first condition went from 71% to 76%, and the second brought me up to 80%. I'm going to see how high I can get.
All in all this is a bit of a failure on Apple's part, and it makes you wonder if perhaps they are making a load of money from selling replacement batteries. It doesn't seem in character for the company. More likely, they just haven't put the time into designing a proper monitoring system that detects when you need to condition. Hopefully we'll get that soon.
Warning: May Cause Earthquakes
Posted on September 13, 2010 at 02:04 PM
Categories: theories, future, predictions, science
It seems like things that cause earthquakes are the ultimate in evil or hyperbole. But now we've achieved that end: human technology can cause earthquakes. Hurray!
A recent Scientific American article discussed a new way to generate free power called enhanced geothermal. It works great, there's just one minor drawback, it causes constant earthquakes. The project in Oregon is far enough from settlements that it merely annoys the neighbours with the small rattles. But still. A technology that causes earthquakes? That's fantastic!
Here's another one: geologists are worried that Taipei 101 may have torqued the earth so much that it opened up a new fault. Cool! The residents of the building will be OK because it's highly earthquake resistant.
All new technology presents benefits and dangers. People say that the atomic bomb is purely a danger. But think about the upside. Major international conflicts have ceased because they're too dangerous. And if we ever find a giant asteroid coming our way, we're probably going to need nukes to blow it up, right?
So I think we can actually measure our progress by the sheer destructive power of our technologies. Now that we can cause earthquakes, can the colonization of other planets be far away?
Mac OS X 10.7—the OS that no one is talking about—should be the next major release of the venerable Mac OS X (since 1989!) So, what will it look like? Seems like nobody knows. All of the focus has been iPhone and iPad for so long that it seems like everyone has forgotten about the old desktop/laptop computers.
Frankly, although Mac OS X is easier to use than Windows or Linux, it's still not what I would call "easy to use". I see not only my parents but even programmers bumble around with trying the locate the right window, the invisible application with no windows open, and lots of UI fragmentation (for example, should you have a "start screen", or open a blank document, or open the last document, or what).
As far as things went in the past, Apple was stuck with that system. For example, if they had moved the menu bar from the top of the screen to the top of the window (like every other operating system ever) there would have been howls of protest from the Mac clan back when they introduced OS X. Believe it or not, OS X was actually a step backwards from OpenStep in many ways. Steve Jobs and the NextStep clan were forced to adopt many old Mac conventions even when they didn't work particularly well.
Remember that the Mac interface was designed for a strictly one-app-at-a time system. That's right, the first Macs did not have multi-tasking, not even fake "co-operative" multi-tasking. So the whole idea of having menu and windows separated wasn't so confusing at first. But then System 6 came along with the MultiFinder and things started to go a little wacky (and note, that was after Jobs left the company).
The iPhone was a blank slate, and so Jobs and the UX gurus at Apple could go back to square one and design an OS that was well and truly proper. Don't doubt that they spent many years on it prior to the public even hearing about the iPhone touch UI, probably since circa 2003, maybe sooner. There were always tablet dreams circulating in the company. I had conversations about it there in 2001.
The blank slate meant they could get rid of all the broken things in Mac OS X. And indeed in all window-based operating systems. Like, floating windows. The original "windows" designs at Xerox PARC didn't float, they were just arranged in a grid. Much simpler to understand. And that indeed is the paradigm used on the iPad, where they are called panels instead.
So... what comes next? I predict that the next step for Mac OS is going to be a major revamp of the UX for desktops and laptops to bring back the best ideas from the Touch UI. I would personally be glad to see the last of the Apple Menu, the File menu, all of the submenus. Most of the Finder I could scrap as well (keep the column view of course :-). No application should ever NOT have a window visible—that's just crazy. It would be nice if they could sort things out so that I don't have to care which applications are running vs. not running. Maybe they could even—somehow—eliminate floating windows. Maybe that's too much to ask.
Since they've been able to break with the past in the iPhone/iPad, I hope that they'll be able to find a way to bring the best parts of the new and integrate them with the old Mac OS X ... the user interface that hasn't changed in any major way in 20 years.
(PS: and I wouldn't count on it being called 10.7 either...)
Another job opening :-) iPhone developer — learn on the job
Posted on May 04, 2010 at 04:32 PM
Categories: code, business, iphone, jobs
My iPhone custom software development business is expanding yet again and we need more part-time programmers. The last round I hired two people, now we need more. Our recent apps include Unitron's uHear to test your hearing, OurKids, the Kik chat app, and others.
You must:
- know C, C++, pointers, object and object-relational patterns already
- be ready to learn the iPhone SDK fast (we'll help)
I've personally been programming on the Cocoa SDK since 1998 back when it was called OpenStep, so if you can pick things up, we can get you up to speed in a few weeks.
Demonstrate your qualifications by answering 2 out of these 3 tricky questions:
[Question 1] (C Pointers) Here is some slightly odd C code, but it will produce an (int) result, provided that you make some small changes in order to make it compile. What is the result going to be, and why?
int * a = 1990; int result = &5[a];
[Question 2] (Database design) Create an entity-relationship diagram for a small subset of the Facebook database. In particular, include in your diagram:
- User
- Photo (including who is tagged in the photo)
- Wall Post
Focus on the relationships/associations between these three objects, and only include one or two of the most important static fields (like a person's name). Make sure to indicate the cardinality of a relationship e.g. one-to-one/one-to-many/etc.
To get an idea of what I'm looking for see: http://en.wikipedia.org/wiki/Entity-relationship_model
Here's a tool you can use to draw it online: Gliffy. Then just send me a screenshot. Or feel free to use ASCII art or draw on a piece of paper and photograph/scan, as long as it's very clear.
[Question 3] (C++ Objects) The C++ program below has just 2 compile time errors, 1 runtime error, and there is 1 single line missing. Send us a fixed version that compiles and runs correctly. The errors will test your knowledge of object use and management in C++, and the missing line will test you on abstract/virtual inheritance.
SEND TO: simon@semacode.com. Include your answer(s) and some source code that you have written, whether it's open source, for assignments, for fun, or whatever.
REMUNERATION: Competitive.
MORE INFO: http://simonwoodside.com/pages/consulting
(PS Please keep the answers to yourself)
//// File: futurama.cpp ////
#include <iostream>
class Drinker {
public: Drinker(); void drink( int potency ); int _numberOfDrinksSoFar;
private: virtual int cantDrinkAnyMoreThan() = 0;
}; Drinker::Drinker() { _numberOfDrinksSoFar = 0; }
class Robot : public Drinker { int cantDrinkAnyMoreThan() { return INT_MAX; } };
class Human : public Drinker {
};
void Drinker::drink( int potency ) {
_numberOfDrinksSoFar += potency;
if( _numberOfDrinksSoFar > cantDrinkAnyMoreThan() ) { std::cout << "I'm all done." << endl; }
}
int main (int argc, char * const argv[]) {
int beer = 5, coffee = 3;
Human fry;
Robot * bender;
for( int i=0; i<6283; i++ ) { bender.drink(beer); }
for( int i=0; i<100; i++ ) { fry.drink(coffee); }
std::cout << "Bender: " << bender->_numberOfDrinksSoFar << " Fry: " << fry._numberOfDrinksSoFar << std::endl;
fry.drink(1);
return 0;
}
Maybe Nokia just can't make good software?
Posted on April 28, 2010 at 04:20 PM
Categories: tech, theories, symbian, mobile, predictions, nokia
Nokia looks to be in serious trouble. They've delayed Symbian^3, which was supposed to be the sort or basic catch-up version of their main smartphone OS. Symbian^4 is supposed to be the move ahead again version and who knows when they'll release it. Meanwhile, Maemo or whatever they're calling it these days is more like vaporware even though theoretically it's out on a couple of devices.
Hey, you know what? Maybe Nokia just can't write good software.
Think about it ... when was the last great release of software from Nokia. The first version of Symbian S60. Which, if you remember your history, was actually written by PSION. Symbian has not improved in any major way since then. The first Symbian smart phones were epic—the Nokia 7650 was way ahead of its time in 2002 and make Nokia the smartphone kings. But after that they didn't seem to be able to put out a really substantial upgrade.
Big companies have a long history of not being able to complete operating system upgrades. Back in the late 80s early 90s Apple managed to fail to create a new OS not once but twice—Pink and Copland—were both epic failures of massive proportion. Making software is hard.
The question is, can Nokia learn how to do it. One option - which I have advocated in the past - is to simply ditch Symbian and get on to the Maemo train full stop. But it's not clear if Nokia has the guts to do something so drastic.
Well, they'd better grow some, because they haven't put out a competitive smartphone since the N95 three years ago. Their current offerings are jokes. Android, Blackberry and iPhone are way ahead of them. And, the investors are starting to figure it out. Hopefully Nokia's shareholders will beat them up until they take the drastic measure before it's too late.
Review of Resonance by Daniel Stepp (mac os x/windows)
Posted on April 25, 2010 at 09:51 PM
Categories: music, tech
Once upon a time while tripping across the 'net I stumbled upon a piece of software called Resonance. The web site is cryptic:
resonance includes a mathematically-precise binaural tone generator, capable of producing fifteen hundred unique binaural frequencies.
What is a binaural tone? Why would I want to listen to one? I downloaded it to find out.
The interface is equally mysterious, but fortunately it has some presets which immerse you into audio soundscape that defies clear description. Those binaural tones were pulsating, interacting stereo waves that gave me a tingly feeling, the kind of feeling that you get when you're learning something profound. Maybe some people would call it a spiritual feeling.
If you look up binaural tones, the great wiki has some descriptions of odd and perhaps unbelievable effects they can have on your body and brain. I don't know if I believe a word of it. But I do believe there is something odd happening when I listed to Resonance.
The author does because he created the program to help him concentrate:
I personally use it when I am programming or writing, basically whenever I need a lot of concentration. Others use it for relaxation, sleep aid, meditation, yoga, background noise...etc. [via email]
He also pointed out that for best effect you should use headphones with no other sound or music playing. Even though, Resonance does include a variety of natural sounds effects from the Earth Recordings library—which accounts for the large size.
This is definitely an odd program, but I have a feeling that it would be a great candidate for conversion to the iPhone, where I think it could gain a cult following.
Bottom line: if you're interested in audio phenomena or unusual interface design, check it out. Resonance.
An incomplete list.
Per:
- line of code: 1 point
- line of generated code: 5 points
- repeated line of code: 50 points
- repeated comment: 10 points
- TODO note: -10 points
- comment explaining hack: -10 points
- hack: 50 points
- clever hack: -50 points
- memory leak: 10 points
- ignored warning: 100-1000 points
- public but should be private: 100 points
- unreadable line of code: 50 points
- whitespace at the end of a line of code: 15 points
- a tab: 25 points
- incorrect indentation: 5 points
Compare: technical debt.
Job Opening: iPhone part-time / contract coder wanted -- we'll teach you
Posted on February 11, 2010 at 03:07 AM
Categories: code, business, iphone, jobs
My iPhone custom software development business is expanding and we need more part-time programmers. Our recent apps include Unitron's uHear to test your hearing, OurKids, an upcoming app for Kik, and others.
You must:
- know C, C++, pointers, object and object-relational patterns already
- be ready to learn the iPhone SDK fast (we'll help)
I've personally been programming on the Cocoa SDK since 1998 back when it was called OpenStep, so if you can pick things up, we can get you up to speed in a few weeks.
Demonstrate your qualifications by answering 2 out of these 3 tricky questions:
[Question 1] (C Pointers) Here is some slightly odd C code, but it will produce an (int) result, provided that you make some small changes in order to make it compile. What is the result going to be, and why?
int * a = 1990; int result = &5[a];
[Question 2] (ORM) Draw an relational/DB model that would work for the Twitter database or the Facebook database. You don't have to cover all of the features, just the basics. You can use ascii art if you like.
[Question 3] (C++ Objects) The C++ program below has just 2 compile time errors, 1 runtime error, and there is 1 single line missing. Send us a fixed version that compiles and runs correctly. The errors will test your knowledge of object use and management in C++, and the missing line will test you on abstract/virtual inheritance.
SEND TO: simon@semacode.com. Include your answer(s) and some source code that you have written, whether it's open source, for assignments, for fun, or whatever.
REMUNERATION: Competitive.
MORE INFO: http://simonwoodside.com/pages/consulting
(PS Please keep the answers to yourself)
//// File: futurama.cpp ////
#include <iostream>
class Drinker {
public: Drinker(); void drink( int potency ); int _numberOfDrinksSoFar;
private: virtual int cantDrinkAnyMoreThan() = 0;
}; Drinker::Drinker() { _numberOfDrinksSoFar = 0; }
class Robot : public Drinker { int cantDrinkAnyMoreThan() { return INT_MAX; } };
class Human : public Drinker {
};
void Drinker::drink( int potency ) {
_numberOfDrinksSoFar += potency;
if( _numberOfDrinksSoFar > cantDrinkAnyMoreThan() ) { std::cout << "I'm all done." << endl; }
}
int main (int argc, char * const argv[]) {
int beer = 5, coffee = 3;
Human fry;
Robot * bender;
for( int i=0; i<6283; i++ ) { bender.drink(beer); }
for( int i=0; i<100; i++ ) { fry.drink(coffee); }
std::cout << "Bender: " << bender->_numberOfDrinksSoFar << " Fry: " << fry._numberOfDrinksSoFar << std::endl;
fry.drink(1);
return 0;
}(Update Feb 14: updated code to make my intentions clearer)
It's getting harder to tell. Be sure to watch it in fullscreen:
The Third & The Seventh from Alex Roman on Vimeo.
Not only that but Alex Roman did a fantastic job on this. The Third & the Seventh homepage. Thanks to Tinselman.
Previous related entry: Fake or Real?
I'm part of a group called Hamilton Light Rail which has been pushing for the development of a european-style light rail (aka Tram) in Hamilton. Recently the Hamilton newspaper The Spectator published an anti-LRT rant by a businessman who owns, among other things, a car wash. His opinion piece is so full of factual errors that I couldn't resist making a list. I actually found 14 factual errors (that is errors that require no argument, simply a correction of information from easy to access sources). So, without further adieu (sic) here it is:
- Chicago does not have a light rail. (It does have a heavy / commuter rail system. There was an LRT proposal in Chicago which was cancelled at an early stage.)
- Detroit does not have a light rail. (There is discussion underway to develop one.) (It does have a medium/heavy rail rapid transit line which loops overhead, running the same system as Scarborough RT.)
- Hamilton employment in 2008 was 362,000. I don't know how much of that is downtown.
- The LRT project in Hamilton began moving in 2007, whereas issues related to the Pan Am games did not arise until 2009. Metrolinx plans, and LRT in Hamilton in particular, were already firmly developed, including routes and support statements from different government levels, before the Pan Am games began to influence planning.
- The 2007 Pan Am Games in Rio attracted in the range of a billion viewers, so it's difficult to assert that people haven't watched it.
- When you drive to downtown and park you face the same issues of finding a parking location as you do if you drive to an LRT terminal.
- The US Department of Energy projects that gasoline prices could double in the next decade (AEO2009).
- Downtown will not be closed off. One recent proposal suggests a pedestrian zone for one block (TODO I can't find the source) of King Street.
- Downtown parking garages will still be accessible by cars either from the reduced lanes, or in the case of a pedestrian zone, from the opposite street. For example, Denningers (outdoor) parking lot is accessible from both King and Main.
- Statements regarding access to business assume that shoppers drive to a parking lot in front of their target business, make a purchase, get in their car and drive to the next business. In fact today even with our current car centric model that is not the case in downtown Hamilton. Many shoppers drive to the vicinity of the business, park, and then visit multiple stops on foot.
- LRT plans do not include removing sidewalks. Pedestrian areas would increase.
- Parking provisions should naturally be different in areas with different densities of population and business, including differences between the mountain and downtown.
- An overhead railway proposal for Hamilton in the early 80s was roundly and appropriately dismissed due to the effect it would have on the street environment. The few overhead railways that have been built worldwide do not share the success of on-street LRT. Manhattan recently converted its defunct Elevated railway platforms into garden parks.
- LRT does not require 20 metres width. Each direction requires the width of one standard lane of traffic, which is 11-12 feet wide (3.5 metres).
Mucho thanks to The Cartoonist for discovering this lovely Steampunk film "Reise Zum Mars" (journey to mars, in german). Made by german film student Sebastian Binder, along with Fabien Grodde and Alexander Schumann, it's a short film based on a draft screenplay by Walter Dexel, an early 20th Century Constructivist. But don't worry, it's just music and action, so there's no need to know any german to watch it. And what's more, the lyrics to the song are in english anyway.
And you can watch it at their cool web site, which also has some interesting making-of videos.
Unfortunately they only show the video at the original size. So, if you want to watch it full screen, here is a direct download link that I hacked out of their SWF file: Reise Zum Mars direct FLV download (106MB).
Overall I have only two criticisms: one, that it needs an increase in brightness, it's quite difficult to make out what's happening. This is a simple post-production blunder. Second, the music is a little heavy. On the other hand, the silent-movie farce kind of atmosphere/acting works well.
I love steampunk, and I love this film.
Full lyrics to Yazoo (Yaz) song "I Before E Except After C"
Posted on January 13, 2010 at 06:14 PM
Categories: music
The full lyrics for this great Yazoo song are not to be found on the entire internet. I did some fun audio processing to extract all the different voices... some of the words are a bit tricky.
There would, stop because there will always be, because there will always be, for two there will always inside, you can feel the outside, you can see the difference inside, stop, inside, difference outside, out stop, inside, you can feel the difference feel the you can difference, difference, difference you can see the, feel the difference you can stop, stop, and see the, you can stop, you can see the difference Dragons, the policeman knew, were supposed to breathe, to breath fire, fire, to breathe fire and occasionally get themselves, get themselves slaughtered, slaughtered, slaughtered he decided. That would definitely not he decided stop, stop definitely not stop, stop not definitely That would that would that would stop definitely decided decided decided decided not not stop he decided (repeat) [old woman 1] the basis of the all important process involved in the mixing, and regeneration, of a person's voice incapable of any distinction, between frequency response is such that the entire output, is revealed in the voice is the actual voice itself, and the voice being used is the voice being used, is the voice being used used voice being used being used voice being voice (repeat) [young woman, with laughter] this type of formation can only be explained when two or more separate units are linked together thus forming a string only detectable through specially designed equipment or at least that's what I thought stop. is that enough? (repeat) [old woman 2] despite the pure outlook which have been forced upon me stop stop upon me force the tools available I decided to use the tools available mainly because the function of the stop the stop available being used demanded an experience which I did not fully understand (repeat) Yes, I'm all right [laughter]
The only word I'm not 100% sure about is "pure" for old woman 2. Aside from that it's solid.
Is the man Vince Clarke? Is the young laughing woman Alison Moyet?
What I want to know is, where did they get the text these people are reading? Did they make it up? None of it seems to search in google.
Mobile phones access agricultural market price information in developing nations
Posted on January 09, 2010 at 09:46 PM
Categories: tech, mobile, future
The most critical piece of information for any farmer is what to grow. What grains are going for good prices at the market. What is overproduced and what is underproduced. What is in demand. Farmers must know this information in order to make a living, hopefully a profit.
Let's say you're a farmer in rural part of western Africa. You have very little in the way of communications—the roads are poor, telephone lines are poor or non-existent, internet access is not there. In fact, your village may only contain a few people with literacy to even use the internet. Aside from travelling for hours or days the only way to access market information could be through a shared mobile phone.
Then you need a trust-worthy source of information on the other end. Preferably one that can communicate via SMS text messaging, because it's much cheaper than making a voice call. I've been collecting some information about these kinds of services in Africa and intending to write up what I found for quite a while, so here it is, a summary of the agricultural market information providers operating in Africa that I am aware of.
Esoko
Esoko is the easiest to find on the internet. It was founded by Mark Davies, a serial entrepreneur who started up a number of successful internet companies including CitySearch in the UK before transplanting to Ghana where he founded BusyInternet, an internet café, ICT centre, and business incubator in Accra. In 2005 he started TradeNet which is now renamed to Esoko.
I've played around a bit with Esoko and it looks like the real deal. I viewed prices for a variety of produce for a wide variety of markets in Ghana, for example. The data seemed to be fairly up to date. I was able to set up an alert for myself on prices for certain commodities in certain markets, so the system would SMS the prices to me on certain days of the week. You can also 2-way SMS into the system with different code and they will send you back the info you are looking for by return text message.
I couldn't actually test the SMS because I don't have an African cell phone # but assuming that works (and I'm sure it does) this looks like a great system with tons of accessible and useful information. They currently have at least some data for Afghanistan, Burkina Faso, Côte d'Ivoire, Cameroon, Mali, Mozambique, Ghana, South Africa, and Sudan so if you're operating in any of those countries, check it out.
They also seem to be looking to expand their platform as a service into other parts of the world, see: esokonetworks.
Others
Another service is Trade at Hand, which operates in Senegal, Mali and Burkina Faso. I haven't been able to try this service, but their representative Raphaël Dard tells me via email that they are oriented towards international exporters in those countries, and provide prices in the major agricultural market in Rungis, France. They distribute information via SMS to farmers who sign up at federated agencies within the country.
Hans Hesse tells me on his blog that Zambian National Farmers Union runs a service for that country at http://www.farmprices.co.zm/, unfortunately the site is down as I write. There is some information on the ZNFU site, which appears to be right up to date, and have an SMS interface with short-code 4455 (from inside Zambia). Good stuff.
Last but not least, Engineers Without Borders's Megan Putnam shared with me a report from an EWB volunteer who examined a project called ECAMIC which facilitated the use of Esoko. One issue they noted was charging the phones in the many locations where no grid power is available. Another is dealing with the metrics for quantity and quality of each commoditiy, which may not be easy to transmit over SMS (some might be weighed, others rated by size and quality).
To summarize. It's important to be skeptical of any technologically driven development initiative. That said, I'm quite keen on this one because it is based on mobile phones, which are a huge and expanding business concern in Africa, a huge force for development, and probably the continent's biggest success story right now. They are also durable, cheap, and run on very little power. The information systems I've mentioned here are early days, but they seem to work and provide value to their users. I won't link to testimonials and success stories because I'm too skeptical about them as marketing for development agencies. But reading between the lines there are enough different people trying this out and getting positive results that I would encourage everyone involved to stick with it and keep pushing the boundaries.
Light + Music
Posted on December 21, 2009 at 04:12 AM
Categories: graphics, music, tech, theories, film, future
I'm proposing a talk for TEDx Waterloo. The subject is Light + Music, an overview of visual music, the past and future, of this wonderful field where two of your senses get together and jam and have a good time.
The theme of TEDxWaterloo this year is Tomorrow Started Yesterday, which is pretty appropriate for this subject. The visualization of music certainly started with dance, which was probably one of the most ancient of human arts, although we cannot say for certain when it started. Music certainly existed over 50,000 years ago. On the other side, the future of music is certainly digital, and the digital signal lends itself to being interpreted in multiple ways—witness mp3 visualizers and VJs.
But I want to start with what is sound. In 1904 Heinrich Rubens created a tube to see the sound as light—literally—glowing from the flames of his curious contraption:
Sound is a wave through the air, and like all waves you can reduce it to a sum of waves at different frequencies. I won't get into sine waves and circles and cycles and oscillators because I don't have the time. But take waves of different speeds, some large and slow, others small and fast—just like in water—and add them up, you get sound. The rube's tube simply shows the amplitude and pitch of the wave as it creates a standing wave inside the tube.
An oscilloscope does the same thing!
Guess what, your iTunes visualizer does the same thing too. It just jazzes up that information into prettier pictures. The basic ones show an oscilloscope like the ruben's tube, or a "spectrogram" which provides much more information—it actually breaks down the signal into the component sine waves, and shows the strength of each. Usually frequency is vertical, time is horizontal, and the intensity of colour is the intensity of sound at that pitch. Here's a spectrogram of a violin:
And here's a video of a whiz-bang mp3 visualizer. It may look crazy but it's just oscilloscope + spectrograph driving it:
.
Maybe you can look at the spectrogram and tell a flute from an electric guitar, but most people can't. That's why Anita Lillie made a program that tries to show the timbre of different instruments in colour against the notes of the scale. This is where the future of direct visualization is going:
Visualizing Music by Anita Lillie from S Woodside on Vimeo.
.
All of that said… there is more to visual music than can be imagined by computers. Artists will surely have a word to say. And we can go back to the early days of film to find inspiration from Len Lye, famous for his abstract film, A Colour Box (1935):
And you might have already seen this one. Fantasia: Toccata and Fugue in D-Minor, by Oskar Fischinger in 1940!
There is much more, such as the Star Gate sequence in Kubrick's 2001, Lapis by James Whitney, The Bead Game by Ishu Patel, Synchromy No. 4: Escape by Mary Ellen Bute in 1938. Bret Battey's Luna Series #3: Sinus Aestum is more recent—2009. After three quarters of a century, the art is being revived.
.
Tomorrow though, it will be the other way around. Instead of looking at sound, you can go the other way, you make light and get sound.
The most significant entry in this green field is surely TENORI-ON, a completely new form of digital instrument created by Toshio Iwai and Yu Nishibori for Yamaha in Japan. It's being used in concert by artists such as Little Boots. I would like to leave you with these two examples, which might blow your mind.
Little Boots .. watch her set it up :-) :
Jim O'Rourke ... a little deeper, but stick with it and your mind will expand. Steve Reich needed 18 musicians! :
.
I've skipped over a lot of really cool stuff, so if you want to see more in a fast, wide-ranging and crazy presentation, head over to TEDx Waterloo and nominate me for the show :-) I might even do some live demos :-)
A little ToneMatrix Music
Posted on December 05, 2009 at 10:45 PM
Categories: graphics, tech, links, art, infographics, film, iphone
André Michelle, inspired by the TENORI-ON, created a grid-sequencer called ToneMatrix. It's an interactive experience written in Flash 10 that merges graphics, visualization, interactivity, and music. There are also iPhone knock-offs such as the free TonePad. As for ToneMatrix, click here to check it out and create your own tunes. Here's one of mine.
Eine Kleine ToneMatrixMusik from S Woodside on Vimeo.
You can also right-click on the ToneMatrix flash app and copy/paste numerical sequences to load and save your music. The sequence for the above is:
98386,1024,4096,1024,67474,96,65540,32768,65618,1024,64,0,65618,4,65600,0
Share and enjoy.
How to prepare a build for distribution in the App Store using the Program Portal, XCode, and iTunes Connect
Posted on September 28, 2009 at 04:59 PM
Categories: code, iphone
Apple does a pretty good job of explaining how to prepare the meta-data for an app submission in iTunes Connect, but it's not completely obvious how to prepare your actual build in XCode.
Assuming that you've already got Ad Hoc distribution working, it's not too hard. I was looking for advice and didn't find it, but I did find a question on StackOverflow that people had actually downrated and not really answered. So I figured out how to do it and added a proper answer. So without further adieu, rate me up on StackOverflow to give me wonderful wonderful karma, and view,
something I found written on a piece of paper
Posted on September 19, 2009 at 01:22 AM
Categories: (none)
I don't know what it means.
What happens when you don't understand open source licenses?
Posted on September 17, 2009 at 12:20 AM
Categories: tech, code, opensource
I was just checking out a TextMate-like editor for Windows called E Text Editor. It looks pretty good, but I was a bit surprised when I read about his "Open Company License".
To be clear, this is something he came up with himself, and it's not a bad idea. To be double clear, it's NOT open source. And he says that up front. He added "just one" clause to the standard BSD license:
Any redistribution, in whole or in part, must retain full licensing functionality, without any attempt to change, obscure or in other ways circumvent its intent.
Not bad. Users gain because they can modify the software and use the modified version all they want for in house purposes, and they don't have to share those changes with anyone. But they still have to pay him, and that's why it's not open source.
Unfortunately for him, he made a little mistake, because the clause only stipulates on redistribution.
So if you want E Text Editor for free, just download the source, modify it to remove the licensing code, build and use it. As long as you use it only yourself, you're perfectly legit and don't have to pay.
In addition, he left open a rather major hole. Anyone can now make a completely separate small program which downloads the source code, automatically applies a patch which removes the licensing code, builds it and installs on the local computer. This is the way in which many applications include GPL software into non-free, just in reverse. To be clear, my hypothetical program does this:
- You download my program, FreeE and run it on your computer.
- FreeE goes online and grabs the source code for E Text Editor.
- FreeE applies a patch to remove the code that makes you pay.
- FreeE builds—on your local machine—a new copy of E Text Editor without the pay code.
- FreeE quits and you delete it.
As long as you never distribute your copy of E Text Editor that you get this way, you're totally clear and legally able to use it without paying.
Alexander Stigsen, the author of E, might want to consider changing his license. But even if he does so, the versions he released under the current license will always have this hole. So go ahead, get some free as-in-beer software :-)
This is their idea of a good new logo.
After the previous new logo got crapped on because it totally sucked.
The new new one? Looks like a beer glass being poured out.
While that may be appropriate reflection of the student body, it's not my idea of a good image for the school. Please UW, fire your graphic designers and hire new ones who can draw. Maybe go to Toronto to find some good ones? Or New York?
Prediction: this is going to go on for a long time...
So according to what everybody is saying, Nokia is going to start using the Maemo operating system + SDK in their high-end smartphones. This is good news. Symbian is basically a smoking pile of junk. It's too old, and too crap, to be fixed. Toss it out the window and good riddance.
I realize this won't happen overnight, but the sooner we can get a more modern, well-documented, programmer-usable SDK available for Nokia phones the better. Maemo looks good at first blush. You develop on Linux instead of horrible, horrible windows, which is good and means that a proper SDK for Mac is probably possible. You use Qt which is apparently pretty good. So, good news all around.
Nokia needs to fix a lot of other things to keep their game going in the smartphone market. They need to stop messing around with resistive touch screens for one thing. But without a great OS they can't make anything else happen. So, I hope that they follow this up with more symbian abandonment and more alternative awesomeness.
UPDATE: And here it is (video of N900).
Apparently it's 1.15463195 * 10^-14.
Who Will Get What? -- a US healthcare infographic
Posted on August 20, 2009 at 08:42 PM
Categories: infographics
Who Will Get What? This is an information graphic based on Health Insurance Reform in Three Steps by
Some people's deaths hit me harder than others. When Douglas Adams died in 2001 I was devastated. I also took it pretty bad when Guido Sohne died last year. I'm glad that he's now been rewarded with a post-humous award—in his name—and triggered a belated reaction to the original news.
Guido Sohne was an African software developer and open-source proponent who grew up in Ghana, went to Princeton, and then—amazingly—returned to his native land. Why did he do it? It's awfully tempting to stay where wages are high, where computer products are easy to get, peers are easy to meet ... he would have had no problem there. But instead he chose to return to Accra, and later Nairobi (Kenya).
I met Guido on a mailing list called PubSoft, focused on global issues around open source software. I've been an open-source nut for a long time. I've also been interested in international development and especially Africa since I lived for 6 months in a rural development project in Lesotho at an early age.
Guido and I struck up a cyber-relationship—we never met in person and only talked a few times on the phone. I was really interested in his views on the development of internet and computer technology in Africa. I can go and read what people are saying, but Guido was "one of us"—a CS grad from a big school—and a really nice guy and had a lot of credibility. I learned a lot from him about the realities. And, also, lets face it he was ahead of me in terms of exploring the boundaries of web technology—introduced me to Ruby on Rails for example.
Somehow or other I wound up hiring him to do some work for my company Semacode—I needed software written, didn't have many connections at that time, and he was looking for work. He did some himself and also managed another African native who he managed very effectively. We had a great business relationship which is especially important since he's on the other side of the world, and trust in business is so critical. He was totally reliable.
The source code by the way is still in the Semacode barcode decoding source base and is good code—has been built on over the years (since 2004 or 2005??).
And I know that Semacode was a great opportunity for him too as it has great web presence and is (still) really cool up-and-coming technology.
He had some business ideas that we discussed, we exchanged I don't know how many emails, and finally he got a job at Microsoft. Crazy, I know, because he was a Linux fan and always used a Mac. But I know other people who are otherwise good people who wind up at Microsoft and anyway: (a) MS is much less evil now and (b) this is Africa we're talking about ... how many major software companies have significant operations there?
(As an aside, did you know that there is only one major software company with HQ outside the USA?)
And then... I got an email that he died. At 34. In his sleep. There was no warning that I knew of. He always looked and sounded healthy. Maybe he had a heart condition or something. I don't know.
I often wonder if the reason he went back to Africa was because he had been diagnosed with some kind of "eventually-will-kill-you" illness and had a sort of revelation, to do something more meaningful than the traditional CS job. Well, that's looking for a reason for someone to be so extraordinary. I know good programmers and he was well up there. But he also had a vision, great people skills, drive, energy, communication and a good heart. So. I still can't believe he's gone.
- IEEE Spectrum article from 2008
- The Guido Sohne Fellowship, another award in his name
- Princeton obituary
- Blog post by G. Pascal Zachary
- You can still see sohne.net at the WayBack Machine although without the cool skin he had.
Where have all the great actresses gone?
Posted on August 12, 2009 at 08:00 PM
Categories: theories, film
Movies are great for many reasons, but having a superstar actor/actress can make even a half-ass movie bearable or even good. There's lots of great actors who can pull it off these days. To give a few random examples. Benicio Del Toro. Bruce Willis. Brad Pitt. Clooney. Clint Eastwood, after all these years. ... much as I hate to admit it, Leonardo DiCaprio.
We used to have them. Just looking at the 80s & 90s: Sigourney Weaver pulled off many hits, including Alien, Terminator, ... Renée Zelwegger was awesome headlining in Bridget Jones, Nurse Betty... Jodie Foster carried Silence of the Lambs & Contact. Meryl Streep, Katharine Hepburn, Kim Basinger.
Where are they now? They seem to have faded away. Julia Roberts seems to be gone. Zelwegger is doing voiceovers. Foster hasn't been seen lately. Hepburn is out of town, and Basinger seems to be mainly in movies I haven't heard of.
Does Kate Winslet count? Uma Thurman? My theory is that there's still great actresses out there, but they're not getting good parts.
Regarding growing up your acts_as_taggable and lack of primary_key
Posted on August 12, 2009 at 07:53 PM
Categories: code, rails
This is a comment on "growing up your acts_as_taggable" post on Evan Weaver's blog snax.... because comments there are closed.
If you are upgrading from an older acts_as_taggable installation and moving to has_many_polymorphs, as I did, your old table will have create_table :id => false. That will be unhappy. You should add this to your migration:
add_column :taggings, :id, :primary_key
And that's all.
Fictional magazine covers from Blade Runner
Posted on July 29, 2009 at 06:31 PM
Categories: film, future
Blade Runner is one of my all-time favorite films. I got my hands on the extended features and one popped up that I thought I'd share with you—some fictional magazine covers from a fictional news stand on a fictional street in a fictional universe. I believe that the news stand is seen—briefly in passing—during the chase through the streets. Here are all six grabbed from the feature, designed by production illustrator Tom Southwell.
I still think that the uHear application I made for Unitron is pretty cool. So do some other people.
Can't believe it's free *****
by DancingRomantic - Version 1.0 - Jul 22, 2009
It's apps like this that make the iphone the most powerful of all smartphones. Great work!
It's amazing how much app crap there is out there.
Here's how to get everything you need from closures today in Java, without waiting for the big foreheads to argue over how to make it nice and perfect.
You've almost certainly used something sort of closure-like when you've used the Runnable interface. You can for example create an anonymous subclass of Runnable and .run() it:
Runnable closure = new Runnable() {
void run() { System.out.println("Hello"); }};
closure.run(); // prints HelloIn particular in Java Thread class implements Runnable. You can do more interesting things, for example:
StringBuffer _myString = new StringBuffer("Hello");
// Java will only close around final variables because it's dumb
final StringBuffer foo = _myString;
Runnable closure = new Runnable() {
public void run() { System.out.println(foo); }
};
closure.run(); // prints HelloThis is why it's called a closure—the anonymous subclass Closes Around the variables in the scope in which it's defined. So, it has access here to myString. If you change _myString in the original context the closure will use the new value.
You can pass closures around, for example pass it to another method in another class, and it will still remain closed around the Original context. Like this:
public void anotherContext( Runnable closure ) {
StringBuffer foo = new StringBuffer("Goodbye");
closure.run(); // still prints Hello from its own context
}This is all available out of the box in Java, a little boring. It would be interesting if the closure could work on variables BOTH from its original context and that you pass into it at the same time. This can be done, but Runnable doesn't allow it, so we'll make our own Runnable:
// A general-purpose closure class that can receive and
// return values when you call it.
// This is an abstract class... override these functions for
// whatever kind of closure you need.
// If you call a non-overriden function, it will throw you.
public class SemaRunnable {
public void run() { throw new RuntimeException("Must override SemaRunnable.run()"); }
public Object run( Object param ) { throw new RuntimeException("Must override SemaRunnable.run()"); }
}
Now I can do a simple example (from the Wikipedia article):
SemaRunnable bestSellingBooks = new SemaRunnable() {
public Object run( Object thresholdObject ) {
int threshold = ((Integer)thresholdObject).intvalue();
// assume bookList is in the local context:
myBookList = bookList.booksWithSalesGreaterThan(threshold);
return myBookList;
}
};
// call books = bestSellingBooks.run( Integer(5000) );Here's a more complete example. In some code I'm working on, I need to pass an image—not just an image, but also the ability to get just a subImage of that image. I don't want them to have to know how to do image manipulation. Here is how I do it using closures:
SemaRunnable getSubImage = new SemaRunnable() {
public Object run( Object param ) {
int x = Array.getInt(param,0); // these four variables
int y = Array.getInt(param,1); // are coming in
int width = Array.getInt(param,2); // from the
int height = Array.getInt(param,3); // caller
// Now I will close on a method in my local context:
short[] subImg = dataForSubImage( x, y, width, height );
return subImg;
}
};
someObject.setClosureToBe(getSubImage);
...
// This method is being closed upon in the local context:
public short[] dataForSubImage( int x, int y, int width, int height ) {
...someObject in some completely different part of my code, gets the closure and calls it like this:
// completely different class, which received closure object
int [] subImageData = (int[])closure.run( new int [] {new_x, new_y, new_w, new_h} );
You don't have to call it closure. And you can pass as many params either way as you like, storing them in arrays, since array is an Object in java.
But... but... but..., people will say, why not create a class which does this, and import the class, and construct the class, and make calls on the class, it would do the same thing. They just answered their own question: it requires lots of LOCs.
And there's other good reasons. For example, let's say you have two versions of your function for different situations, you can simply swap them out of they are closures. The beauty of it is, the java compiler doesn't know or care what's happening, because everything is just SemaRunnable and Object. So it's not going to complain that a function or class name has changed. That means metaprogramming goodness. Sweet.
So, practical closures in Java. It may look a little unfamiliar at first, but once you know how to do it it's easy and can be really useful.
EXTRA SPECIAL BONUS: An implementation of the full monty, closure that takes a closure, makes a new closure from it, and returns that. I promised myself I'd go to bed early, but instead I stayed up and wrote you this code which is guaranteed to actually work, because I tried it. Try running it.
// By: Simon Woodside sbwoodside (a)(t) gmail (d)o(t) com
// See: http://simonwoodside.com/weblog/2009/7/7/a_little_bit_more_serious/
// To try this out:
// % javac Test.java && java Test
// Demonstration of how to do closures in Java
// In this case, |derivative| is a closure which approximates derivatives, and
// |sineDerivativeApproximator| approximates the derivative of ... you guessed it ... sine.
// It's hard to believe, given how much code there is, but in javascript this would be:
// function derivative(f, dx) {
// return function(x) {
// return (f(x + dx) - f(x)) / dx;
// };
// }
// (See http://en.wikipedia.org/wiki/Closure_(computer_science) )
import java.util.*;
import java.lang.reflect.*;
import java.lang.*;
public class Test {
public static void main (String args[]) {
System.out.println("Closures coming up!");
Test test = new Test();
test.go();
}
// SemaRunnable is a general-purpose closure class that can receive and
// return values when you call it.
// This is an abstract class... override these functions for
// whatever kind of closure you need.
// If you call a non-overriden function, it will throw you.
public class SemaRunnable {
public void run() { throw new RuntimeException("Must override SemaRunnable.run()"); }
public Object run( Object param ) { throw new RuntimeException("Must override SemaRunnable.run()"); }
}
void go() {
// Let's start with a really simple example.
// See my blog post for more details:
StringBuffer _myString = new StringBuffer("Hello");
final StringBuffer foo = _myString;
Runnable closure = new Runnable() {
public void run() { System.out.println(foo); }
};
closure.run(); // prints Hello
// Now let's do something more fun.
// A closure that receives a closure and returns a new closure.
// This is going to be wordy because Java Arrays and Number objects are TERRIBLE
// Return a function that approximates the derivative of f
// using an interval of dx, which should be appropriately small.
SemaRunnable derivative = new SemaRunnable() {
public Object run( Object params ) {
// params must be { SemaRunnable f, Float dx }
final SemaRunnable f = (SemaRunnable)Array.get(params,0); // get f
final float dx = ((Float)((Object[])params)[1]).floatValue(); // get dx
SemaRunnable approximator = new SemaRunnable() {
public Object run( Object xFloat ) {
float x = ((Float)xFloat).floatValue();
float fOfXPlusDx = ((Float)f.run( new Float(x + dx) )).floatValue();
float fOfX = ((Float)f.run( new Float(x) )).floatValue();
float answer = (fOfXPlusDx - fOfX) / dx;
return new Float(answer);
}
};
return approximator;
}
};
// Now create a closure that will simply return the sine(x):
SemaRunnable sineClosure = new SemaRunnable() {
public Object run( Object xFloat ) {
double sine = Math.sin( ((Float)xFloat).floatValue() );
return new Float(sine);
}
};
// And finally put it all together:
SemaRunnable sineDerivativeApproximator =
(SemaRunnable)derivative.run( new Object [] { sineClosure, new Float(0.001) } );
for( double x = 0.0; x<3.1416; x+=0.1 ) {
Float result = (Float)sineDerivativeApproximator.run(new Float(x));
System.out.println( "Sine(" + x + ") = " + result );
}
}
}
I ran out of time to demonstrate this, but you can also modify variables in the context from inside the closure, even though they are final, by creating a final array containing the variable, and then modifying the object contained in the array. It's not pretty but it works.
I'm not sure if it means anything:
Existential crisis was
written on the egg.
I cry sis. Sis is tense. She has
no shawl. Where is my shawl?
she cries. Perhaps her shawl is
partial by now, the cat
unwound it an hour ago. The cat
in the hat? The very same, and
a top hat it is. I am no
magician, just a logician, I
cannot unravel this riddle cries she.
A crisis
I say, if the cat is in the hat,
a magician's hat will it
reveal when the hat I
repeal? Simple,
says she, by Occam's razor we
may cut a hole in the
hat and oculate inside. But
we have but Occam's hatchet
I say, and a blunt tool it is,
more liable to crush it. Let us
wait and see, cries sis
sensing an existential crisis.
This interminable solution has left
me with no determinable
resolution.
Singin' in the Rain's crazy dream ballet sequence
Posted on July 02, 2009 at 12:49 AM
Categories: art, bittorrent, film
I just watched the movie Singin' in the Rain... and by far the best part was this sequence where Gene Kelly dances a ballet with Cyd Charisse. Wow!
The set is a surreal, Dali-esque painting, which uses forced perspective to appear to vanish into infinity. It features stairs that look like stripes on the ground, strange shadows... but the most surreal is Charisse's 50-foot long white silk veil, which wafts up into the sky like it's floating on air. There must have been some incredible fans, and the choreography of the air current with the ballet is incredible.
I don't know how Gene Kelly thought it up, and how he managed to get it made and into the movie. It has almost nothing to do with the plot. It's totally unexpected, but mind blowing. I've never seen anything like it.
Here it is, but really, you should rent it or download it in high quality...
You've got to try this.
It's like a tiny little myst adventure in beautiful steam-punk 2D flash game.
Play Little Wheel a tasty little morsel by One Click Dog.
via Das Cartoonist.
Tinselman should like this.
The Entire Cast of Futurama -- someone should make a poster
Posted on June 21, 2009 at 02:28 AM
Categories: tv, film, future
Here is as close as we've ever got to a poster of the entire cast of Futurama... from their most recent direct-to-DVD movie Into the Wild Green Yonder. It's notable for two things in my mind: first, it doesn't include most of the principles (they would be easy to add) and second, wow, Futurama just doesn't have as many characters as Simpsons. Simpsons has a LOT of characters. What do they say, 50 active on-going basis? That's a lot.
And now my fellow Earthicans ... More Futurama is Coming ...
Comedy Central was happy with the specials and with the 72 produced episodes of "Futurama" it acquired from 20th Century Fox TV in 2006. "Yet there is nothing like new, self-contained episodes week to week," said David Bernath, Comedy Central's senior vp programming. "This is all about reinvigorating the franchise, giving it a new burst of energy."
In other words, futurama pays.
OK, this is stupid but I came up with this joke for Zap Brannigan.
SCENE: ZAP BRANNIGAN IS YET AGAIN TAKING CHARGE OF A
TOP-PRIORITY MILITARY MISSION BY DRAFTING SOMEONE. LET'S SAY
LEELA. IT COULD BE ANYONE, THOUGH.
ZAP: Ahh, do you remember me? I'm Zap Brannigan.
Captain Zap Brannigan. I put myself in your charge.
SOMEONE: How generous of you.
ZAP: By which I mean I put myself in Charge. Of You.
Lame joke? Maybe. But I don't see YOU making up jokes and blogging them for everyone to see.
How many programming languages do you know?
Posted on June 16, 2009 at 10:31 PM
Categories: tech, meta, code
List of programming languages that I know* that appear on the Official Wikipedia List of Programming Languages**.
- * Or once knew... but I could pick it up again, I swear. It's like riding a bicycle. I don't include languages that I tried to learn but failed... like Scheme and Prolog.
- ** Commonly recognized as the standard in Lists of Things. Let it be known that I only include those languages that are turing complete, so CSS and HTML don't count.
Begin listing:
- AppleScript
- BASIC (Apple ][+)
- Bourne Shell
- C
- C++
- DLX Assembler (not listed, but it's a language...)
- HyperTalk (my first, favourite language!)
- Java
- JavaScript
- Lingo
- MATLAB
- Modula-3 (and don't I wish I didn't?)
- Objective-C
- Pascal
- Perl (and don't I wish I didn't?)
- PHP
- Python (and don't I wish I didn't? :-)
- Ruby (my third, favourite language!)
- μC++ (is it really a separate language? Well, it requires a separate compiler...)
- Visual Basic (sufficiently different from basic BASIC)
- XSLT (yes it's turing complete) (my second, favourite language)
So. Thoughts. FIrst, I can say that I know more than 20 languages. Second, my # of languages isn't going up as slowly these days, but the depth is. Third, my big hole is functional languages. Only XSLT is really functional-ish (people get mad when I say that).
I'd like to learn oCaml.
All of this work courtesy of procrastion and needing to quote a number of languages on my updated Custom Software Development page.
Rails "core team" fucks up big time
Posted on June 07, 2009 at 11:03 PM
Categories: tech, code, rails
Hey, if you have a rails app that uses the recently introduced authenticate_or_request_with_http_digest Rails 2.3 / http_authentication.rb, you've got a big fucking security hole. Anyone can log in if they provide a wrong username and no password, or a nil username & password.
Kind of terrible, right?
So Nate posts it on his blog after a week of trying to get the attention of the Rails security people, and they blame him in their security alert:
Due to communication difficulties and a mis-understanding between the reporter and the security team. This vulnerability has been publicly disclosed on several websites, users are advised to update their applications immediately. Steps are being taken to ensure that the security email is more reliable in the future. We regret the nature of this disclosure and will endeavor to ensure it doesn’t happen again in the future.
And they give him no credit. Most of the RCT idiosyncracies I can write off but don't fuck with security.
uHear -- test your hearing with an iPhone
Posted on June 04, 2009 at 11:39 PM
Categories: code, mobile, iphone
Here's a little movie I made of an iPhone app called uHear I developed for Unitron. This is also a bit of an experiment because I've uploaded the movie to Amazon S3 and you're watching it from AWS.
Anyway, the video is short, and shows you four parts of the app:
- The standard hearing sensitivity test, which finds out how quiet you can hear at various pitches in each ear,
- the speech & noise test, which tests if you might have trouble hearing over noise like in a restaurant,
- lots of hearing-related info, and finally,
- a live audiologist lookup based on your current location, powered by google maps API.
Nokia blows it on the N97
Posted on June 04, 2009 at 03:17 PM
Categories: tech, symbian, mobile, nokia
Nokia's new N97, I was hoping it would be the next great phone. But looking at a review in AAS, it looks like they totally blew it on the keyboard. There are only three rows of keys, which means that the space bar is in completely the wrong place. Gak!
ZDNet UK notes that the touchscreen is resistive instead of capacitative and apparently this results in a substantially less appealing touch compared to the iPhone. Yet another strike against.
Finally, I note that the camera is still the 5MP unit in the N95. I have that camera. It's good, but it's not great.
Despite the fact that the new home screen looks really cool (and much better than iPhone) and that it actually has keys, this means that we're not looking at the next great Nokia device that I was expecting. My search for a great device that combines a huge touchscreen and a decent keyboard/keypad apparently will have to continue.
StartupCamp Waterloo Numero Six
Posted on June 03, 2009 at 11:29 PM
Categories: business, barcamp, startupcamp
StartupCampWaterloo6 will be... is ... was. Yesterday in fact.
In presentation order:
- Ultrasaur RM kicked things off with a great 30-second pitch "Your sysadmin is hacking your server. How do you stop them?" ... they tried last time and were denied, so the moral is, try, try again. They were first pick this time.
- Thinkpanda with coolest logo and a demo you can't get into right now... an interesting tool for social bookmarking (my words, not theirs) which reminded me a bit of delicious and looked like it would be great as a part of groupware like Base Camp.
- Neverboard Studios... these guys had a pretty cool looking iPhone game and were like, how the hell do we get attention for this thing? They want to charge $$ for it but are worried that they'll never break through the attention barrier. We bounced that one around the room for a while... hopefully had some useful advice... Afterwards at the bar I suggested that they lace the sound effects of their game with profanity in the hopes that Apple will ban it, and ride on the publicity from that. And if they do let it through, people will want it— for the same reason.
- Kaimera Media with a concept for a theme park ride video capture system—like the thing that captures a photo of you on the roller coaster, but video. kiosk that burns a DVD for you on the spot. Definite win for simplest, best developed business plan of the evening.
- Primal Fusion, definitely known around the Waterloo startup community for being pretty well funded and definitely brainy. Demo, which I've tried the private beta on their first product, and while it's interesting, I think there's a lot of what they've done that's not exposed in this version that needs to be in the next before it's clear what they are achieving. By the way, I cheated on including Primal Fusion in the sequence because Mark missed the 30 second pitches. I've been power corrupted. But I suffered accordingly, as my discussion topic was pushed off the end of the agenda. I won't give up though... I'll have another one next time.
- Pager Duty was I think my favorite of the evening, although obviously they didn't do so well on the 30 second elevator pitch or they would have been farther up the presentation order. Very simple, to the point—if you need to have people on call, they will make sure that people are effectively notified with a simple service-style web system.
- Giftah has what looks to me like a solid plan, allowing you to buy/sell excess gift cards and they take on the guarantees. Interesting discussion, including acknowledgement that they do have larger, better funded competitors in the USA like Plastic Jungle ... how to get traffic, etc.
I suspect you'll be seeing some of these companies around in the future doing cool stuff.
Oh yeah—and if you were there remember to take advantage of the Communitech Entrepreneur in Residence (EIR) program definitely—just call them. Say I sent you :-)
Also, we REALLY need a single unified calendar of events and it looks like watcamp.com might provide.
Possible idea for next time: handing out red cards to anyone who says "Facebook". Also, giving a prize for provoking the best discussion.
Thanks to the Accelerator Centre for providing space, and Tech Capital, Sun Microsystems, and Communitech for food & drinks. This is a totally non-profit venture and all labour is volunteer :-) My posse is Jesse and Mic.
% uptime
00:59:46 up 607 days, 14:13, 2 users, load average: 0.06, 0.17, 0.36
no wonder I found a lot of wacky old processes running on there...
How to make samba on ubuntu use your unix passwords
Posted on May 31, 2009 at 01:47 AM
Categories: unix
You need something called "password sync" ... obvious right?
This will help:
Unix and Samba password sync on Debian Etch
...only took me an hour to figure out how to get logging working and decode the obscure error messages....
This is probably what you want to do if you get this:
Authentication for user FAILED with error NT_STATUS_WRONG_PASSWORD
So there I was, watching the Incredible Hulk titles again in slow-motion, because I'm always curious as to what the special effects people write into the various fake news stories and computer graphics. Sometimes it's funny. And I came across this little easter egg which seems to have been missed by fans on the net.
Nick Fury and S.H.I.E.L.D. Command are never mentioned in the film. He's part of the comic team Fantastic Four I think (I never really read a lot of comics as a kid, sorry...) which I guess will be having a film some day. Anyway, here's what it says:
Nick Fury
Shield Command
Code RED
New York, NY 060584
Details: Classified. Subject is THREAT LEVEL RED, surveillance only.
The Bruce Banner manhunt is still not over. This shadowy figure re-
nowned as a doctor and professor at the Culver University Science De-
partment has once again slipped through the authorites hands and is
still on the run.
That's verbatim by the way. Apparently the letter was never on screen long enough (just a few frames) to warrant a thorough spell check.
How come Marvel puts their logo on their movies, but DC Comics doesn't?
Why do people on eHarmony close with "I am pursuing another relationship"?
Posted on May 27, 2009 at 01:14 AM
Categories: theories, eharmony
I have a theory about this one. Because they can easily go to Matching and turn it off temporarily. But I think that some people leave it on, because they want the ego boost, even though they're going to shut down the match anyway.
How to do rails tests when running with restful_authentication
Posted on May 26, 2009 at 01:18 AM
Categories: code, rails, ruby
The Restful Authentication plugin seems to be the standard right now, although I'm staring to wish I'd tried something else, maybe AuthLogic... because restful_authentication is kind of poorly documented. One serious error of ommission is how the hell do you update your tests so that you can run them on controllers that require a logged in user? Well, I have had the pain, and so you can have the quick answer, here it is.
Assuming you are using ActionController::TestCase ... first edit test_helper.rb:
# Add this helper function to test_helper.rb
# It will allow you to run any block under the aegis of
# a controller of your choosing. This is not something
# that is possibly by default
def run_with_controller( controller_class )
old_controller = @controller
@controller = controller_class.new
yield
@controller = old_controller
end
Now you can use that helper method in your test cases, in the setup function do this:
def setup
run_with_controller(SessionsController) do
post :create, { :login => "george", :password => "monkey" }
end
end
What you're doing here is simply making a POST to the Restful Authentication SessionsController to "create" a new session, pass in a login/password that exists in your fixtures. And that's it.
By the way, if you chose to install with RSpec because of the dire warnings that old fashioned tests will be out of date, but aren't currently using RSpec for you other tests, you should copy the rspec fixture data into test/ so that you get the right password hashes. Tricky...
Don't use porn in your slides at a tech conference
Posted on May 15, 2009 at 09:47 PM
Categories: tech, rails, theories, ruby
So Merb developer Matt Aimonetti made a presentation at GoGaRoCu heavily laden with soft-core pornography and some people got upset. In particular, a woman got upset—Sarah Allen. It didn't help that she was one of only six women at a 200 person conference. Holy shit!
Don't put sexual images of women in your slides. If you must do it, then put just as many sexual images of men in your slides. Be fair. Unless of course you're presenting to a club that only allows male members. Which in a way is what pisses off the women who are reacting to this incident—because it implies that Ruby/Rails/whatever is a men-wanted-only club.
If I had been there, I suspect I would have walked out. I've walked out of presentations, movies, plays, etc. for less. I have low patience no pride.
Why the lucky stiff posted a summary of women rubyist's reactions, and there's discussion aplenty there and elsewhere on the net. Hopefully the positive outcome will be a community that is more aware of issues that differ between men and women, and therefore has more women in the future.
sudo apachectl stop && sudo apt-get remove apache2 && sudo apt-get install nginx
Posted on April 30, 2009 at 12:56 AM
Categories: tech, code, rails, internet
I binned apache finally on semacode.com. It was easy. A little bit of "this is really the last straw" frustration with mod_rewrite and I ditched it.
I've been threatening to leave you, apache, for years. Ever since I first cursed your horrid rewriterules, I knew that it would never be the same between us. You were good, once. You weren't just "a patchy" web server, but a scrappy one... once. But 2.0 you just didn't live up. You didn't fix your big warts. You got flabby. Even the decision by your developer team to finally remove the default MIME type didn't redeem you in my eyes.
No, it was just one poke in my eye too many, when you insisted on unencoding my percent encoded URLs before passing them to the rails/mongrel proxy, and there was just no way to make you stop doing it, no matter how many googles I searched. And so I said: enough is enough. Everyone on Rails uses nginx now, and I will too. I'm tired of learning how to sacrifice chickens to the apache configuration gods. Bring me something new, clean, shiny, fast, and easy to configure!
Learning how to configure nginx took an hour on the outside—it's very easy and keeps all the good parts of apache's syntax and throws away the complete crap. It even allows me to compress stupid blocks into one-liners! :
if (-f $document_root/system/maintenance.html) { rewrite ^(.*)$ /system/maintenance.html last; break; }Isn't that gorgeous! I agree. And so the "engine x" russians get my love now. It's all over. Sayanora. End communication.
Intelligent online cartoons:
- xkcd. yes everyone already knows about this one. IPv4 space (notice how apple has as much space as all of japan? trust me they don't need it). how pure is your scientific discipline? frequently a bit ... odd.
- Basic Instructions. How to make a good impression at a job interview. How to converse with someone you don't want to talk to. Scott Adams experimented with him in turning it into a print cartoon but it just wouldn't fit into the restricted size.
- Savage Chickens. Peace and wisdom. Dachshund. My most recent discovery.
There's plenty of crap out there. Can you add any other good ones?
How to really URL encode an NSString in Objective-C, iPhone, etc.
Posted on April 22, 2009 at 02:52 AM
Categories: code, mac, iphone, objectivec
Trying to encode URL parameters on Mac or iPhone? Frustrated because NSString stringByAddingPercentEscapesUsingEncoding encodes non-URL characters but leaves the reserved characters (like slash / and ampersand &) alone? "Apparently" this is a "bug" apple is aware of, but they haven't done anything about it yet, and so, here is a solution that actually works.
Try this:
NSString * encodedString = (NSString *)CFURLCreateStringByAddingPercentEscapes(
NULL,
(CFStringRef)unencodedString,
NULL,
(CFStringRef)@"!*'();:@&=+$,/?%#[]",
kCFStringEncodingUTF8 );
As an example, @"'Decoded data!'/foo.bar:baz" will become "%27Decoded%20data%21%27%2Ffoo.bar%3Abaz".
Obviously you would use this, not on the full URL, but just on the parameters.
Well, apparently I've achieved the vaunted and much-desired "trusted user" status on DKos. That means I can rate people down, as opposed to just up. I'm probably not going to do it much, just like I rarely troll rated people when I had privs on SlashDot (back when /. was interesting...)
Daily Kos probably gets as much traffic as /. did back in the heyday, but their rating system is much different. Ratings are simply thumbs up as far as normal users are concerned, so the higher the number, the more recommended that comment is. Whereas in /., every comment was rated from 0-5. /. allowed you to quickly filter to view only comments above a specific level, which filtered out a lot of gunk but also meant that most people were actually reading less. This I think probably led to a situation where important and interesting comments were not seen by many people, and it was almost a competition for cleverness, etc. Whereas the system on DKos leads to much more of an actual dialogue.
Anyway, what lead to this was my analysis on the subject of the 46-page 2005 "torture" memo by White House "attorney" Steven Bradbury, which you can read here, if you have the stomach for it. (it's really nasty stuff, to be honest, and I felt ill after reading it and writing about it).
Update: trusted user status is gone! Thank god, the stress was getting to me.
The better way to code error-handling routines
Posted on April 17, 2009 at 12:50 PM
Categories: code, rails, ruby
There's an excellent guide to Rails 2 that I'm reading through right now, but I don't like this bit:
if @comment.save
redirect_to post_comment_url(@post, @comment)
else
render :action => "new"
end
It's much better like this:
render :action => "new" and return unless @comment.save
redirect_to post_comment_url(@post, @comment)
They do exactly the same thing, but mine is 2 lines instead of 5, and mine clearly eliminates the exceptional/error case first, and then leaves you to see the normal case. In fact, I virtually always code this way when I can, deal with the error cases first, and return, and then the rest of the function is an un-nested normal case handler.
Simplelog-X... is coming...
Posted on April 11, 2009 at 02:50 AM
Categories: meta, rails, ruby, simplelogx
So I just made some major updates to the software running this site, which for now I'm calling "Simplelog-X". And the source code for simplelog-x is now on github.
This will probably interest people who are running the original SimpleLog by Garrett Murray which he no longer supports (and incidentally it doesn't run on Rails 2.x). Simplelog-X also has quite a few other changes aside from working on (presently) Rails 2.2.2, all of the details are in the README.
I'm not going to annouce this loudly just yet because I still have a whole ton of my own site files in the public directory, and I need to move them to public/system I guess and get them out of the repo but still capistrano-friendly.
I was just making a lot of changes and it struck me how much more I know about Rails now than when I started this journey...
So Dubai isn't a wonderland and actually is a vast petrol- and credit-funded nightmare that is on a knife's edge of sinking into the sands, forever gone? I'm shocked! Who could have thought it.
If a recession turns into depression, Dr Raouf believes Dubai could run out of water. "At the moment, we have financial reserves that cover bringing so much water to the middle of the desert. But if we had lower revenues – if, say, the world shifts to a source of energy other than oil..." he shakes his head. "We will have a very big problem. Water is the main source of life. It would be a catastrophe. Dubai only has enough water to last us a week. There's almost no storage. We don't know what will happen if our supplies falter. It would be hard to survive."
— The dark side of Dubai (in The Independent) via The Cartoonist (see also Laid-Off Foreigners Flee as Dubai Spirals Down)
Here's a thought. Don't build a big city in the middle of a desert. And here's a prediction: Dubai will be gone in 50 years.
Zuckerberg melts down, facebook redesign sucks, worse than 80s Steve Jobs
Posted on April 03, 2009 at 06:09 PM
Categories: theories, internet, predictions
I absolutely hate the latest Facebook redesign. And, for the record, I loved the last one, so I'm not some kind of knee-jerk negativist. The new facebook removes the single most important feature, the live news feed. Facebook's major contribution to the online world was the live news feed. Everything—updates, pictures, interests, links, notes, etc. etc. etc. all in one time-sorted feed. It was brilliant, and obviously I think so since I make some kind of minimal replication of it on my own front page.
And now they have removed it. The new... thing ... whatever it is .. that I get is more like twitter. I don't need another twitter. I already have twitter. What I want is my live facebook feed. Now, if I want to see what photos people have been tagged in, what apps they have been using, etc., I don't know what to do. The right hand side seems to have some stuff there ... but I can't filter it.
Now what kind of idiot would destroy their company's chief asset in an eyeblink? When you've got something that good, you don't change it, you nurture it. Look at google's home page. They are so careful in making changes. They do statistical A/B tests on every single change they ever make, and only keep the ones that make people's results better. When they make a change that sucks, it's also minor and gets rolled back quickly. So my point is this: for FB to ruin their own user experience is really out of the ordinary and insane.
Who would do such a thing? Only a tyrant who's lost touch. Which means Mark Zuckerberg has become a tyrant and lost touch. For evidence that he's become a tyrant, we can look at the following evidence:
Gawker: A tipster tells us that Zuckerberg sent an email to Facebook staff reacting to criticism of the changes: "He said something like 'the most disruptive companies don't listen to their customers.'" Another tipster who has seen the email says Zuckerberg implied that companies were "stupid" for "listening to their customers."
TechCrunch: Facebook says this is about getting a CFO with public company experience ("We have retained Spencer Stuart to lead our search for a new CFO and will be looking for someone with public company experience."). Which is complete nonsense (and poorly thought out nonsense at that), because [Gideon] Yu, after a short stint at YouTube and an even shorter stint at Sequoia Capital, was the treasurer and SVP Finance at Yahoo. Which is very much a public company.
For evidence that he's lost touch, well, there's plenty. As of now over 1 million users have gone to the trouble to install an app specifically to complain about the new layout. I know that facebook has ~ 175 million users, but that's still a HUGE user backlash.
Now apparently they are going to roll back some of the changes... we'll see how that goes. Presumably at a company of that size the investors are going to force Zuckerberg to back down. See this Joy of Tech comic for an idea. But people are also going to compare Zuckerberg to Steve Jobs of the 80s, when he was forced out of Apple for being an asshole.
Let's be completely clear on this. Steve Jobs WAS an asshole in the eighties! My impression is that the film Pirates of Silicon Valley is quite accurate. And from working at Apple during Steve's second coming, I can say that he still could be a real asshole, the kind that gets things done and doesn't have patience for idiots. The difference is, that Jobs never did anything really stupid to his user base.
So, what's going to happen now? I suspect that Z won't back down very easily, and that we're going to see more conflict, clashes and problems in the future. It's unfortunate, and I hope that wiser heads prevail and FB recovers the truly awesome user experience that it used to have.
Update: Gawker thinks Zuckerberg should go. Strong stuff.
And Business Insider: Mark Zuckerberg has begun "believing his own hype," a source says. He believes he is the genius the magazine covers say he is. Mark has always been an executive who made life difficult for those he disagreed with. "Mark is a very demanding person to work for, if you screw up, one day you are in, the next day out, persona non grata," says one former employee. Now that he thinks he's Steve Jobs, he's unbearable.
Yup.
Got a new server.
The old box, was a Penguin Computing rack-mount purchased in 1999 or 2000. It had a PIII and was totally maxed out RAM-wise—at 512 MB. Anyone who's tried to run rails on a box with that much ram might understand why I had occasional downtime. mongrel would just give up sometimes. Trying to install new gems was fun as well. Still, the old box had a good run.
The new box is a Dell R300... Core 2 Duo... RAM is at 4GB right now, max 24. And we've gone with RAID-1 since we don't really need the space but like the redundancy.
Also, we switched from debian to ubuntu. Ubuntu is a bit less secure but a hell of a lot easier to deal with in terms of package management and installation.
Welcome to the World of Tomorrow!
Posted on March 29, 2009 at 01:18 AM
Categories: tech, art, future
When I was just a young tyke, getting beat up by my peers every day, I retreated to the little school library to immerse myself in visions of the future. Little did I know that some day the mythical year "2001" would come and pass in a blaze of ... nothing spectacular. Well anyway, I think it's fun to look back at those visions of the future and look in awe at the coolness of how we should now be living.
My absolute favorite of all time series was called "World of Tommorow" by Neil Ardley, who also collaborated on the famous "How Things Work" with another of my favorites, David Macaulay (see him talk at TED!).
I love how Ardley saw us with huge gigantic wall-sized computers completely taking over our houses:

Or maybe you'd prefer to see what the tank of the future will look like (n.b., it's robotic!)

Playing holographic games could also be fun...

And there's more—two whole books are online: World of Tomorrow - Health and Medicine, and World of Tomorrow - School, Work and Play. I want my wall-screen TV.
Under the lid of a power line conditioner, the APC H15
Posted on March 25, 2009 at 06:24 PM
Categories: tech, photos
I just acquired an "APC AV H15 Home Theater 1500VA Power Filter and Power Conditioner", which is usually just called the APC H15. It's a pretty popular device basically to smooth out the AC power for home theatre type systems, and also protect your equipment from any kind of bad power juju. Some people buy these kinds of things to make their speakers sound better, but my system probably isn't good enough to notice at this point. My concern was that my apartment has bad power, and I've been having random computer shutdowns, blown lightbulbs, and even weird lines in my new LCD TV. Fortunately I got this silver H15 less than half price because they're moving from silver case to black case.
To me the most impressive thing about this kit is that it's HEAVY. 25 pounds as a matter of fact. So naturally I wanted to crack it open to see what the hell was inside.
Here's the front and back. Click on any of these pictures and on flickr click "All Sizes" to see 5 megapixel full resolution versions (ID parts to your heart's delight).
Three easy screws gets the top off. NB If you've been using it there might be "hot" components inside (electrically speaking) even if it's unplugged. This one was fresh out of the box. Don't touch anything unless you know what you're doing.
So, not just an empty case then. What the hell is that huge thing in the middle?
Looks like a massive toroidal core transformer operating as a constant-voltage transformer if you ask me. Provides voltage regulation and surge protection at the same time.
Some ceramic capacitors. Don't know what they do, beyond storing power.
The yellow/green toroidal things are Common Mode Chokes and reduce line noise. The red box is a surge cube relay (surge protection) and the blue boxes are Interference Suppression Film Capacitors for EM noise. I googled it.
And finally, here's the back panel.
If you must have more, you can visit my flickr photoset with 37 detailed images...
The Shape of Things That Hum
Posted on March 20, 2009 at 08:36 PM
Categories: music, bittorrent, film
The Shape of Things That Hum is a series of 11-minute short documentaries about different electronic instruments. It goes through a bunch of classics, most I recognize the sound easily but never knew the name or the story. Here's the proper order:
- Minimoog, the grand-daddy analog synth of them all
- Vocoder, making a voice sound like a synth
- Roland DX-7, the first proper digital synth
- Roland TR-808, early drum machine
- Roland 303, a sort of bass synthesizer
- Various subjects
- Akai Sampler
The whole thing was first broadcast in 2001, in Britain, maybe Channel 4? I'm not sure. In any case it seems to have been more or less ignored, and it's definitely a sort of niche appeal subject. At the moment it seems like youtube/google video is the only source, but let's hope that someone out there will make a torrent with proper quality at some point.
Here's a link to all of the episodes, the best quality I could find. Click on "More from this user" to see them all. Or just google for the title if you can't find it there.
Check out this artist hiding out in an Ikea store using a unique urban camouflage. Watch as he disappears in plain sight!
This Japanese clothing designer has another safety-minded approach: a vending-machine dress.
And finally, something I really wish I could buy. A sure-fire way to hide on the street when life just becomes too much:
It comes complete with vents so you can look out and watch the world go by while you hide and wait for your therapist.
I just wonder how you get into it without being noticed...
How To Save the World Without Destroying It (Too Big to Fail. It's True.)
Posted on March 10, 2009 at 11:25 PM
Categories: theories, finance
Cross-posted in my Daily Kos diary, where it will be almost certainly ignored (because kossacks mainly care about breaking news).
A Metaphor
Suppose I had a car company, Woodside Cars, Inc., and we discovered an amazing new way to power cars using a miraculous substance called unobtanium. We'd roll out a line of new cars, and everyone would buy them, because they never have to be filled up. People would buy shares in the company too. The cars are great, they're well made, they save money, and have a high resale value. But then, after 3 years, suddenly the cars start to fail. It's mysterious. Some of the unobtanium is corrupted. It's unpredictable. Some of the cars just stop, others keep going. Overall there's a 50% failure rate but no way to predict which ones will die and which will keep on going. Suddenly the resale market vanishes, no one wants the cars, and the stock price collapses overnight.
Why did the stop price drop so precipitously? The problem with unobtainium existed all along. But no one knew about it. One morning everything was fine, Woodside Cars was worth $50 billion, the next morning, it was worth $25. The details aren't important, the important thing is: the world collectively decided that the company wasn't worth as much as they thought. The wisdom of the market took care of the rest.
Now we might pity poor Grandma Joe who had her life savings tied up in Woodside stock. But only stupid people invest their net worth in the shares of a single company, right? Not so fast. Many people had their money in Woodside. Woodside has been making cars for 70 years and has always been stable before. Even charities, and small companies, have their money in Woodside shares. In fact, millions of people had their money in Woodside. Fortunately, they still have half their money left.
And then the lawsuits start. People are mad that their cars are broke. They start a class action suit. And it looks like that suit could drag down Woodside's remaining business in regular cars, even though those regular cars run on gasoline and electricity. This is bad news for Woodside shareholders. They run the risk of Woodside's "toxic business" dragging down its regular business and making their shares worth a big fat zero.
So the government steps in. "Woodside is too big to fail" say prominent business leaders and politicians. "Just think of the economic damage that it could do." First they loan Woodside money to buy back the bad cars, and then the split Woodside into two companies – one to carry on with the good business, and the other one to deal with the broken cars and the lawsuits.
Of course, in reality very few people would put all of their money in a company like Woodside. Woodside was free to develop and trade in new kinds of cars, based on any kind of fuel they like. Banks, on the other hand, have restrictions. They are regulated and insured and subject to constant scrutiny. Banks aren't companies... they're banks.
They used to be.
Now they are companies.
In fact there's even a phrase for it: the "shadow banking system". It sounds scary, and it should because it's regular companies, with all of their exposure and foibles, pretending to be banks. These so-called "financial services companies" are just as innovative and subject to unexpected losses as any high-tech, manufacturing, or services company, just as they wormed their way into the heart of the world's monetary system.
Too big to fail? Yes, Dorothy, they are too big to fail. Like Woodside, if they fail, suddenly a lot of individuals and businesses – perfect good citizens who truly believed that they were investing their money wisely – are going to be broke. And through no fault of their own. The effects will spread. People who never touched a Woodside car will suffer.
Yes, the executives should be axed. Yes, the regulations should be changed. But the company is really a bank, whether it's Woodside Cars, or AIG, and needs to be treated as such. If it's allowed to fail, then the economic costs will be massive. Certainly the company made mistakes, and there's good reason to punish it for that. But. They didn't break the law. Unobtainium was legal when it was introduced. Maybe it shouldn't have been, but it was.
Of course the real situation is much worse. It's like unobtainium has been added to the fuel of every car that anyone makes or drives, except that no-one knows which cars are good and which cars are bad. Unobtainium has become so essential that there's no way to quickly remove it from the transportation system – it will take years. Car companies are struggling to figure out which of their suppliers have tainted parts. Even the government can't figure out which parts are good and which are bad.
That's more like the actual banking crises. Unobtainium is bad debt. Oh, there's a million ways to name it – CDOs, MBSs, CDSs, etc., etc., but it's all fundamentally bad debt. These shadow banks, running amok, have infected the entire system. When no one knows which accounts are good and which are bad, they won't borrow and they won't lend.
The knee-jerk reaction is to save the system by destroying it. Let them fail. That is short sighted. All of our so-called money is inside these companies. If they fall, we fall. Yes, we must fix the system, punish anyone who broke the law, and change the rules so this won't happen again. But that's a very big job and won't happen overnight. In the meantime, unobtainium has infected the system so badly that it needs heroic measures to stave off total collapse.
Next time I'll talk about why the fundamental rules of executive compensation created this problem, and how I think they must be changed to make sure this "never happens again".
iPhone programming: how to switch to a landscape view at the moment of your choosing
Posted on February 27, 2009 at 05:12 PM
Categories: code, mobile, iphone
Maybe someday, Apple will make it easy to rotate manually into a landscape view. But right now it's been causing me enormous headache with hideous frames issues. Running an app in landscape the whole time is easy, but doing just some views in landscape is insane, especially if you're trying to switch while in the middle of a navigation controller.
However I've found an easy solution which is to use a new window. Just reset the whole view problem. You can then fake out the navigation bar using the method of your preference. Here's the bare bones. For me, I'm going from a tableView, click on an item and get a "results view".
// In ResultsListController, a UITableView delegate:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
ResultsViewController * resultsViewController = [[[ResultsViewController alloc] initWithNibName:@"ResultsViewController" bundle:nil] autorelease];
resultsViewController._recordIndex = indexPath.row;
UIWindow * window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; // this is a leak!
window.backgroundColor = [UIColor redColor]; // just for debugging
[window addSubview:resultsViewController.view];
[window makeKeyAndVisible];
}
Now ResultsViewController has its own NIB, and the view is set to be sideways in IB.
// In ResultsViewController
- (void)viewWillAppear:(BOOL)animated; {
// First rotate the screen:
[UIApplication sharedApplication].statusBarOrientation = UIInterfaceOrientationLandscapeRight;
// Then rotate the view and re-align it:
CGAffineTransform landscapeTransform = CGAffineTransformMakeRotation( degreesToRadian(90) );
landscapeTransform = CGAffineTransformTranslate( landscapeTransform, +90.0, +90.0 );
[self.view setTransform:landscapeTransform];
}
// Connect your "back" button in the results view to this:
- (IBAction)back:sender; {
// return screen rotation to normal:
[UIApplication sharedApplication].statusBarOrientation = UIInterfaceOrientationPortrait;
// Get rid of the window, and the "normal" window will re-appear from underneath
self.view.window.hidden = YES;
[self.view.window resignKeyWindow];
}
Easy as cake!
UPDATE: There's follow-up Q&A on the iphonedevSDK forums.
The StartupCamp Report - StartupCampWaterloo5
Posted on February 26, 2009 at 06:34 PM
Categories: tech, links, business, barcamp, startupcamp
So last night was StartupCampWaterloo5—the Original Startup Camp with the Best Format(tm). We had on the order of 60-80 people in attendance. We didn't do formal count of startups this time, but there were 12 proposed demos on the whiteboard, and I know of at least 3 other groups that were represented. As usual we had a keynote speaker: Mark Evans, who among other things runs the mesh conference in Toronto. He usually talks about social media, but he focused for us on communication, highlighting good and poor first impressions and public communications strategies of various websites.
Twelve people/groups put themselves up for doing a session, and gave 30 second pitches about what they wanted to discuss on the theme of starting up. We did our approval voting, ate food (thanks sponsors!) and had time for the top 4:
Kareem Shehata showed us his new Aeryon Labs Unmanned Aerial Vehicle—sadly he did not yet have government clearance to fly it, but it's a serious piece of kit and he had some kick ass videos. It's controlled via a Google Maps style interface. We talked about business models. http://www.aeryon.com/
I led a discussion on the subject of where to get Free Money from the government. Suggestions included SR&ED, NSERC USRA, Various OCE programs, Youth Employment Strategy, Ontario Interactive Digital Media Tax Credit, MS BizSpark, Youth.gc.ca - $15K for employee < 30, OMDC, Ontario Interactive Tax Credit, Services Canada (summer jobs)... and to look at the recent techcapital blog post.
Avery Pennarun "eql=data" a project he's working on to make MS Access databases web accessible. Business model was a bit of a question mark but interesting technology and Avery gives good talks. http://eqldata.com/
Grigory Kruglov—a UBC student current on co-op at RIM - talked about his business venture Outwick.com. It's aimed at collecting information about events like concerts, cultural events, public parties etc. and making it easy for people to find events at the time & place of their choosing using data mining, tagging etc. Very interesting, and we had a cool talk about viability, how to commercialize, etc. http://outwick.com/
We also ran a live twitter stream on the main display using #watcmp. Afterwards many of us adjourned to Molly Blooms to imbibe the beverages of our choice.
Thanks to my co-instigators Jesse Rodgers and Mic Berman, and to our sponsors: Accelerator Centre, WatStart, Sun Microsystems, and Tech Capital Partners who provided space, support, and food!
PS And I almost forgot—Graham Hardie shot video and promises to put it online!
A "short" list of financial market crimes
Posted on February 11, 2009 at 06:02 PM
Categories: theories, finance
It seems like the truth is slowly emerging about all of the horrific things that went on during the boom times and are now emerging from the muck as the swamp is drained. Someone like Bernie Madoff can always cover his debts while the market is rising, but suddenly his ponzi scheme fails when it crashes. It seems that there is now a laundry list of semi-legal crap that is similarly being outed.
A lot of these terms might sound like stupid jargon but they are actually useful jargon, because they are the name for a specific thing, and that thing is fucking up your bank account and making you lose your job.
You should probably already know a few terms of useful "jargon". To start off with, "debt" is not just what you have on your house, it's something you can buy and sell. The value of the debt is based on someone (a ratings agency, a market)'s assessment of how likely to be fully paid over time, and how much the interest is. So the "best" debt (most expensive) would be say a government bond at 10%. Options (e.g. call and put), and Short Selling (which is much like a "put option"), these are both kinds of Derivatives. Briefly, options and short selling allow you to make a stock market trade where you benefit if the stock goes DOWN. Think about how evil that is for a moment, will you? Normally you only buy shares if you think they're going to go up. Derivatives is a broad category, including options, which allow you to trade things on the stock market which aren't actually company's shares. So, you can trade options, or you can trade debt, or the price of oil in 10 years, or whatever. "Downside risk" is the bad stuff that happens if the market does poorly, people default on loans, or whatever.
Secrecy
Underlying all of the below is that no-one knows what the fuck is going on. Most of these tricks don't require reporting to anyone, any market operator or regulator. You can mess with the stock market in so many ways without telling anyone. Maybe the insiders at the other big financial companies on Wall Street will figure it out or hear rumours. But the general public, and even CEOs of normal companies, rich people, readers of Wall Street Journal, normal people, poor people—know nothing until years later.
Naked Short Selling
You can short sell stock you don't own? Are you kidding me? Have a look at The Story of Deep Capture. Basically, I own a big financial company, say a hedge fund, and I want to kill your company. So I short your company and naked short sell it, which adds massive number of shares to the pool, driving down the prices of the existing shares. Then I transact my real shorts or put and make a killing while your stock suffers big time.
Credit Default Swap
OK, this one is a kind of insurance. I loan money to someone but I'm not sure if they'll pay me back. They might go bankrupt and default. So, I get "debt insurance" (like a CDS) and if the default happens, you the insurer pays me instead. Except that CDS isn't exactly like insurance, because (a) I don't actually have to be the lender and (b) you don't have to actually be a regulated insurer. In addition, there is no central place where CDSs are tracked, and you can resell them on and on, making it VERY confusing to know what they're really worth. Which is one of the reasons why banks won't borrow or lend right now, because they have no idea what their CDSs are worth. And of course, they are priced based on "normal" default rates, which go out the window when there's a crash. Why is that a big deal? Because EVERYONE has their money in them ... CDSs were recently valued at $55 TRILLION. Needless to say, Bear Stearns, Lehman and AIG were huge into credit default swaps.
Collateralized Debt Obligation
Wonderful stuff. Long ago, in a galaxy far away, the bank that loaned you money was personally responsible if you defaulted. But no longer. Now that bank can package up your loan and many others into a "CDO" and sell it to other people. Theoretically they will tell you which CDOs are good debt and which aren't so good. But, to be honest, they don't care. They sell someone else the debt, and then it's not their problem anymore if the borrower defaults. So, people get sloppy. And then, the various companies that are supposed to asses the risk in a CDO did/do a very bad job of modelling the downside risk. So when for example the housing market drops by 20% suddenly the CDOs are completely underwater and no one knows any more what they're worth. Maybe they're worth nothing. Who knows? And it doesn't help that some CDOs are actually made up of ... you guessed it ... other CDOs.
Synthetic CDO
Hey, let's kick it up a notch. The above are so boring. They're not, you know, complicated enough. So the financial geeks decided to make CDOs which contained, not actually debt, but Credit Default Swaps! Get it? Hilarious eh? Why would anyone want to do this, I don't know.
The Annual Bonus
I think this one is ultimately responsible for all the others. Financial company performance by the executives is measured on a YEARLY basis. That means, if you are CEO or whatever and you are making a decision, you think only at most ONE YEAR OUT in terms of what it will do for your company. You never think beyond a year, because you are getting paid in at most one year for your decisions, never beyond that. As long as you get your bonus before the shit hits the fan, you're laughing. I think that if these financial firms re-arrange their compensation system so that decisions have to bear fruit for a longer term—maybe 7 years—a lot of the shenanigans would never have happened. You could do that, for example, using employee stock options, locked-in shares, and I'm sure that the wizards can figure out other ways as well.
Well there you have it, my shit list for the financial market circa 200X. And if you want to read so much that your head will explode, try The Economists's Jan 22 Special Report on the Future of Finance. It's 25 pages (in the magazine) and the index is on the right side of your screen. See especially When markets turn. And don't be scared to learn a little more financial jargon. It might save us all next time.
Update 1: And let me add just one more thing. The banks don't know what their own assets are worth. In case you didn't get that above, a lot of banks own a lot of CDOs, CDSs, etc., etc. They don't know what they're worth. That's why there's a "credit crisis" ... they don't trust each other, because they don't even trust their OWN balance sheet. No one will borrow or lend. And that's just how bad it is.
Update 2: You might find useful this video on CDOs and this one on CDSs from Marketplace.
Wondeful joy! Mix Ruby and Objective-C with MacRuby
Posted on February 10, 2009 at 02:51 AM
Categories: code, mac, ruby
How great is this. You can use any language you want in your MacRuby projects. Want to add in some code you already wrote in Objective-C++? No problemo!
Check out the cool screenshot below which shows everything in action! (You might have to click on the full post view to get the picture).
Also, you might be wondering how to get full bi-directional bridge going on between Ruby and Objective-C/Cocoa. In otherwords, how do you call/access/include/import/require your own Objective-C classes from Ruby and your Ruby objects from Objective-C? It's actually done sort of automagically. If you have a Ruby class Foo and a ObjC class Bar...
(You seem to have to use NSClassFromString(@"FooController") to avoid getting a linker error. Apparently the bridge is not yet running at compile/link time. Also, you (seem to) have to type your bridged objects to id in ObjC, although maybe there's a way around both those limitations that I don't know about yet.)
# Foo.rb
class Foo
def foo
puts 'FOO'
bar = Bar.new
puts bar.bar
end
def baz
return "BAZ"
end
end
// Bar.h
#import <Cocoa/Cocoa.h>
@interface Bar : NSObject {
}
- (NSString*)bar;
@end
// Bar.m
#import "Bar.h"
@implementation Bar
- (NSString*)bar; {
id foo = [[NSClassFromString(@"FooController") alloc] init];
NSLog(@"%@", [foo baz]);
return @"BAR";
}
@end
And you will get this output when you call Foo.foo:
FOO
2009-02-10 02:46:28.017 Untitled[37257:10b] BAZ
BAR
Boing boing boing! Enjoy!!!!
How to make WYM Editor support embed objects (such as flash videos, youtube, etc.)
Posted on February 08, 2009 at 02:27 AM
Categories: code, internet
Hello! I've got a big update for this post, so skip to the end for the goodness!
I use WYM Editor for editing my posts, it's awesome, there's only just one small thing that I don't like about it, which is out of the box it doesn't allow you to copy/paste embed tags like you would use to embed a flash video, youtube video, etc. into your posts. It actually strips out embed tags if you try to put them in.
Why they would not support this, is out of my mind, I can't understand it. There doesn't seem to be any sense in it. Oh well, I know javascript and XML so I can fix it right? Sure, why not.
So, here is a patch that enables basic support. You can switch to "HTML mode" (i.e., the mode where you can see the sourc code, 2nd button from right in the standard view) and paste in some embed code, the stuff you get from YouTube that looks like this:
<object width="480" height="295"> <param name="movie" value="http://www.youtube.com/v/jzHBszZn6uo&hl=en&fs=1"></param> <param name="allowFullScreen" value="true"></param> <param name="allowscriptaccess" value="always"></param> <embed src="http://www.youtube.com/v/jzHBszZn6uo&hl=en&fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="295"></embed> </object>
The embedded item might or might not actually appear in the preview mode at that point. Don't worry about it. Save it, view the final result, it should be there.
It would be nice if the developers would take this and build it in so that you can actually copy/paste them in the "normal" way.
Here is the patch, apply it by hand, or copy/paste it into a patch file and apply using the patch command.
Index: wymeditor/jquery.wymeditor.mozilla.js
===================================================================
—- wymeditor/jquery.wymeditor.mozilla.js (revision 119)
+++ wymeditor/jquery.wymeditor.mozilla.js (working copy)
@@ -80,10 +80,11 @@
//replace em by i and strong by bold
//(designMode issue)
- html = html.replace(/<em([^>]*)>/gi, "<i$1>")
- .replace(/<\/em>/gi, "</i>")
- .replace(/<strong([^>]*)>/gi, "<b$1>")
- .replace(/<\/strong>/gi, "</b>");
+ // this messes up embed tags—changes them to ibed
+ //html = html.replace(/<em([^>]*)>/gi, "<i$1>")
+ // .replace(/<\/em>/gi, "</i>")
+ // .replace(/<strong([^>]*)>/gi, "<b$1>")
+ // .replace(/<\/strong>/gi, "</b>");
//update the html body
jQuery(this._doc.body).html(html);
Index: wymeditor/jquery.wymeditor.js
===================================================================
—- wymeditor/jquery.wymeditor.js (revision 119)
+++ wymeditor/jquery.wymeditor.js (working copy)
@@ -2068,6 +2068,17 @@
"13":"dl",
"14":"dt",
"15":"em",
+ "embed":
+ {
+ "attributes":[
+ "allowscriptaccess",
+ "allowfullscreen",
+ "height",
+ "src",
+ "type",
+ "width"
+ ]
+ },
"fieldset":
{
"inside":"form"
@@ -2243,10 +2254,11 @@
{
"attributes":
{
- "0":"type",
+ "0":"name",
+ "1":"type",
"valuetype":/^(data|ref|object)$/,
- "1":"valuetype",
- "2":"value"
+ "2":"valuetype",
+ "3":"value"
},
"required":[
"name"
@@ -3449,7 +3461,7 @@
this.block_tags = ["a", "abbr", "acronym", "address", "area", "b",
"base", "bdo", "big", "blockquote", "body", "button",
"caption", "cite", "code", "col", "colgroup", "dd", "del", "div",
- "dfn", "dl", "dt", "em", "fieldset", "form", "head", "h1", "h2",
+ "dfn", "dl", "dt", "em", "embed", "fieldset", "form", "head", "h1", "h2",
"h3", "h4", "h5", "h6", "html", "i", "ins",
"kbd", "label", "legend", "li", "map", "noscript",
"object", "ol", "optgroup", "option", "p", "param", "pre", "q",The Big Update
Thanks to Maxwell Scott-Slade for commenting and pointing to his even more improved version on his blog. I've taken his & my work, added the ability to support flashvars attribute (required for flickr embeds among others) and forked the wymeditor svn repository into GitHub. Get WYMEditor that supports flash on GitHub.
If you want to use it, just:
% git clone git://github.com/sbwoodside/wymeditor.git % cd wymeditor/trunk % make
The result will be in build/build/wymeditor.tar.gz.
How to make an iPhone button highlight (hold state)
Posted on February 05, 2009 at 07:26 PM
Categories: code, iphone
Here's how to use iPhone SDK to make a button hold it's on/highlighted state when you click on it:
- (IBAction)badButton:sender; {
badButton.highlighted = YES;
if( _hasChosen == NO ) {
_hasChosen = YES;
[NSTimer scheduledTimerWithTimeInterval:0.0 target:self selector:@selector(badButton:) userInfo:nil repeats:NO];
}
}On simulator it looks perfect, but on device there's a brief moment when it goes white before it goes blue/highlighted again.
What is the Hitch Hiker's Guide to the Galaxy really about?
Posted on February 02, 2009 at 12:32 AM
Categories: theories, film
The Hitch Hiker's Guide to the Galaxy is about life, the universe, and everything, ... and the fact that it makes no sense. Life makes no sense. Nothing that happens makes any sense. There is no purpose, to meaning, no answer, just an endless series of coincidences, catastrophes, and occasionally good times which we just have to put up with until we die. This is the thesis of HHGTTG, and also a good bit of Douglas's other work.
The story is told through the Book, or rather, the Guide. The Guide is the voice of the narrator, who spends most of his time talking about the book, that most famous of all books to come out of the great publishing houses of Ursa Minor Beta, and which the narrator notes, is the subject of the whole story in the first place. Arthur is just a new reader of the book, Ford an old writer for the book, and the other characters embody it's general philosophy: that the universe is fucked up (Marvin), and you might as well just try to have fun (Zaphod).
All of them have essentially zero control over their own lives, even when they think they do. Trillian and Ford seem to have wilfully chosen to just hang on for the ride, and Zaphod seems to be doing the bidding of unknown voices in his brain. Even the hyper-intelligent trans-dimensional aliens can't figure out what to make the answer to the Ultimate Question, or prevent a bunch of bungling bureaucrats from messing up their shot at obtaining the Question. I'm not trying to belabour the plot here, just point out that it makes sense only if you realize that Douglas is trying to tell you that it doesn't make any sense at all. The Big It. Everything. Nothing Makes Sense.
It's like that moment in the Simpson's when the lawyer invokes the Chewbacca Defence. It doesn't make sense. That what the Hitch Hiker's Guide is all about.
So you can't shoehorn that into a movie about romance and character development and happy endings. All of the best material, what Douglas created, is the ultimate joke of the pointless randomness of life. And that's not only what Douglas' story is about, but what the book inside the story is about. That's why the backbone of any good retelling of the story must make the book itself the central fixture and the backbone of the narrative. Keep as much of Douglas's precisely crafted dialogue in place as possible, and don't worry too much about plot or character development. Make sure that when the audience finds out that the answer, after all that time, searching, questing, is 42, that they laugh in the knowledge that it doesn't make any sense, and it doesn't have to, and you'll feel better if you don't worry about it and just go along for the ride.
And maybe, after the pointless early demise of the author himself, in a fashion so fitting that it ought to have been written by him, we'll eventually get an ultimate movie version that does justice and helps us all feel a bit better about losing him before he could write so many more great works.
I just realized that "Bachelor's Degree" is sexist
Posted on January 16, 2009 at 02:13 AM
Categories: theories
It was a mac shareware company that made some great games: Scramble in particular, was a lot like the current Word Challenge game on Facebook, and then there was Spin Crisis, and a CHM reader called Chimp... and now they are gone without a trace. Their old domain takes you to some band.
All I know that isn't available on google is that when I emailed them, the response was from Shawn Henry. Shawn, if you're out there—what happened?
Update: Here's Sphera Software's home page on the Wayback Machine. It identifies the following people as having been part of Sphera: Shawn Henry (head programmer, student in Ottawa), Neale McDavitt (graphic designer, Montreal), Michael Keogh (musician, Ottawa), Anca Szilagyi (wordsmith, Brooklyn). It looks like several of them were students, and maybe the company broke up when they graduated.
Unfortunately they didn't leave forwarding addresses. But I'm sure you can find some of them if you google.
iphone objective-c pain ... give me ruby, bastards!
Posted on January 11, 2009 at 02:37 AM
Categories: code, mobile, ruby
I'm writing an iPhone app in Cocoa Objective-C and really wishing that I could be writing it in Ruby instead (cocoa-ruby on iphone anyone?).
Take this one line:
if( ! [foo isEqualToString:bar] ) {Oh yeah, I can really tell what that does by glancing at it... not! But here's the equivalent ruby:
unless foo == bar
Shorter, more obvious, easier to write, easier to read and maintain. Why does Cocoa need to be so wordy? Even [foo equals:bar] would be better. But no, that would be too ... ambiguous. I don't know. isEqual: is defined in NSObject but who knows what highly dangerous or unexpected result it would have between two strings. Maybe it would only be true if they were the same pointers, or copy: results. No one in ObjC land seems to be thinking about making syntax easier for the programmers, do they? And why don't we have overloading???
For example, if we had method overloading, you could easily have different versions of equals: (or isEqual: if you must) that handle NSString*, NSWhatever*... of course this would require the compiler to be smarter, and the runtime to be smarter, and who uses Objective-C other than Apple ... no one, that's who. Hey, here's an idea—why not ditch ObjC wholesale for Ruby? It's not like Ruby is going to be, you know, slower. Well, of course it will be slower in the C sections.
At least now with "Fast Enumeration" in Objective-C 2.0 we can do something like this:
for( NSString * bird in [NSArray arrayWithObjects:@"owl", @"parrot", @"partridge", @"pigeon"] ) {Although again, it's really annoying that there's no convenience syntax for creating an array. How hard would it be? Not very hard, that's how hard. In Ruby it would be simply:
for bird in ["owl", "parrot", "partridge", "pigeon"]
At least we have convenience syntax for NSString * animal = @"Bandicoot" right? I suppose we should pray at the altar for that one and hope they never take it away...
Finally, I have to kiss good-bye to any kind of interesting use of first-order functions and closures. Technically Objective-C CAN actually do dynamic function calls at least, but it's so bloody wordy that I rarely use it unless forced to. I can't use the lovely map function in Objective-C which adds considerably to my line count.
But wait, Apple is adding closures? ... why don't they spend the effort on making Ruby Cocoa better instead? Or maybe give me garbage collection on the bloody iPhone.
Lego + Eddie Izzard = Death Star Canteen
Posted on January 11, 2009 at 02:21 AM
Categories: links, film
Evelyn Glennie is a deaf percussionist. I guess that this is possible because percussion creates vibrations that you can feel with your feet, your hands, your fingertips, maybe even your whole body. She is now one of the few or only professional solo percussionists in the world. Anyway, the TED conference gave her a 30 minute session which is reproduced here in high definition (definitely consider plugging into decent speakers or headphones). Evelyn Glennie on "How to Listen". Click on the High Definition link under the video to get the real video.
My home theatre: Audioengine 5, Airport Express, Sharp Aquos 32D64U, and a Mac Mini
Posted on December 23, 2008 at 01:17 AM
Categories: music, mac, bittorrent, film, photos
Someone asked me recently to describe my home theatre. I've put quite a lot of thought & work into it. But not a lot of money. My goal from the start was to achieve the maximum return with the minimum of complexity.
So, right from the start I knew that it was going to be as much digital as possible. I don't care about live TV and I'm a bittorrent expert so I knew I wouldn't have to mess around with cable connections. But more to the point, being digital means you don't have to worry about analog components or duplication. For example, you can concentrate on having just a single Digital/Analog Converter (DAC)... a key component in your audio set-up.
The first thing I bought was the DAC & speakers. I had a new apartment and I wanted to be able to listen to music there. In particular, I wanted to be able to do two things: listen to music coming off my Nokia N95, which functions like an iPod, and listen to music coming off my laptop, a MacBook Pro. I did a lot of research online to figure out how I could get the best sound with a budget of $400. And I wound up finding a REALLY nice pair of speakers.
I actually restricted my search strictly to powered speakers, or, as they are commonly called, "ipod speakers"... and most of them are fairly crap. Even the ones from Apple didn't really score that well when I listened to them. I'm a musician on the side and I know what good sounds like. None of the ones I could find in stores reproduced sound the way I wanted—clean, like the original, faithful. They were bass heavy and muddy. But online I read a review of AudioEngine 5, a pair of "ipod speakers" that got fabulous reviews—from audiophiles.
You probably know that audiophiles are nutcases, but there is something to be said for their discrimination and knowledge of the art. If an audiophile says something is good, then it probably rocks if you're a normal person, even a musician like me. So, I found a deal and bought the A5s for $350. And I picked up an Apple Airport Express at the same time.
Both purchases turned out better the more I learned. The A5s have built-in amplifiers, which means that I don't need to (a) buy an amp (which I planned) or (b) match the amp to the speakers. That's a relief because sound matching amp/speakers would be a LOT of work. With the Airport Express, I started to notice something odd. When I plugged my MBP directly into the speakers, it sounded OK. But when I played through the Express, it sounded GREAT. Turns out the Express has a quite good DAC inside. Sweet! The improvement is highly audible.
OK, a little digression here about speakers. Most products, you get what you pay for. Not with speakers. Speakers are in fact somehow immune to the whole mass production economics. Most audiophiles seem to agree that most, or perhaps all, consumer grade speakers are absolute shit. To get good speakers you either spend absolutely boatloads of money, buy second-hand, or ... you can buy from very small companies, even individual crafters. Audioengine falls into the last category. Even though their website may look slick, this is a small enthusiast company that just wants to make great speakers.
What's up with that? I don't know. I think partly it's the analog ecosystem. For good analog components you just cannot avoid spending a lot of money on expensive electronics to put inside. You can't skimp or replace things with digital. You have to have huge capacitors, big transistors, lots of coiled wire, heavy metal. Good speakers are HEAVY. They are made not from plastic or even titanium but MDF—that's plywood in normal english. You can't fake this stuff, you have to have it, but it's not rocket science, just good workmanship. So, buying from a small company like Audioengine is not silly, it's a great choice. End of digression.
So... now I had a REALLY good sound system and spent countless hours discovering all kinds of wonderful things about my music collection. It really makes a difference. In fact, I admit that I've poisoned my ears on lesser systems... I just need to hear the higher quality. The music is just ... better. There's more in it, detail wise, spatially, musically, tonally. Get a good pair of speakers & DAC, and you too can discover the magic.
Next up: TV. Starting out, I thought I wanted the biggest plasma I could buy. I read all of the reviews, the dark room tests, HD movies, the works. Plasma is the best, blah blah blah. Went to a big store and suddenly I realized different. Two things for me. One: I'm only about 8 feet from my screen and I don't want to be dwarfed. So, I can knock down the screen size dramatically, in fact, I went down to 32 inches. Crazy eh? Second: I have a sunny upper-floor viewing room with a window directly opposite the display, and I intend to watch during the day. That means matte screen which means LCD. Benefits are that I save money due to the small size, don't have to worry about burn in or wasting power, and I know what LCDs are like from long experience. So I wound up with the Sharp AQUOS 32D64U. This model has 1080p, which was essential for me. I have to be future proof. It's going to be a long time before there's a higher resolution than that for films.
Finally, I need something to tie it all together, and here my Mac bias definitely played a role. Mac Mini of course. Of course it helps that they are silent, small, and look very good indeed. No ugly boxes for me. I run VLC and mplayer, but mainly Plex, and awesome port of XBMC. Video goes through a DVI to HDMI converter into the TV, and sound goes analog into the speakers (A5's have two inputs). My only complaint is again, the Mini's analog audio output is not as good as the Airport Express. Eventually I will have to buy a dedicated DAC.
This setup does everything I need, and it's got a good future. If and when I want to move up to new components, all of these pieces will make excellent secondary system components for a second room. They all go together really well, look good, and look and sound great. All told the whole system was about $2K which is a reasonable price considering that I'm basically completely satisfied at this point in time.
For the future? I might—might—try out surround sound at some point. I'm not crazy about—pointless for music, but for the movies—maybe. I definitely don't need a bigger screen. A proper external DAC, driven by USB port, is probably the next item to get, and then I would begin the search for a new amp/speaker combo. Realistically though I can't upgrade my speakers (or add a sub-woofer) until I move into a house. My apartment does not have thick walls and with the A5 bookshelf-sized speakers I can crank it up any time without waking people up.
So, there you have it... complete system, as digital as it can get, and in the $2K range. I'm happy.
Mac OS X has Spotlight (Cmd-Space) which rocks for not just finding files but launching applications (just start typing the name). I just discovered it also does math, just like google. For example, try typing in 5*9+pow(sqrt(10),3) . Nifty.
Alas it doesn't do currency conversion or unit conversions. Maybe in 10.6...?
Ruby on Rails Feed/RSS Aggregator (35 lines)
Posted on December 07, 2008 at 03:17 AM
Categories: code, rails, ruby
I wrote myself a feed aggregator for my front page. And... voila! I'm finally satisfied with it to post it.
Update: I've now published this as a complete standalone rails app on github/sbwoodside/portal. The important bits are app/controllers/portal_controller.rb and config/config.yml.
For me I run this as a standalone rails app, separately from my weblog. You could do that (and redirect requests to / or /index.html with Apache or nginx/etc. Or you could integrate it into your own app. Up to you.
Features:
- Will aggregate ANY feed, no matter how badly mangled by the creators, using FeedTools (I also tried feed_normalizer and simple rss but they're not as good)
- Deals with slowness of downloading feeds, RSS, etc., and REXML by caching
- Deals with need to recache using elegant http/cron periodic system
- Display the feeds in a facebook-like news feed format, sorted by dated.
- You can easily re-label the feeds, add and renew feeds (in the code)
- Only 35 lines of controller code!
The heart of it is the controller, obviously. The best thing? It's only one page of code! Ruby rocks!
require 'feed_tools'
class PortalController < ApplicationController
layout 'site'
# Instructions: 1. Change @@secret. 2. Add a cron job to regularly call /?recache=yes&secret=XXXXXXX
# This is a feed aggregator that uses FeedTools because it handles practically any feed.
# But FeedTools is super slow in every way so this aggregator stops using it as soon as possible.
# TODO add XML feed output
@@secret = "change_this" # change this to protect your site from DoS attack
# The array of feeds you want to aggregate. If you change this then manually delete the whole cache.
@@uris = ['http://simonwoodside.com:8080/posts/rss', 'http://simonwoodside.com/comments/rss',
'http://semacode.com/posts/rss',
'http://api.flickr.com/services/feeds/photos_public.gne?id=20938094@N00&lang=en-us&format=rss_200',
'http://api.flickr.com/services/feeds/activity.gne?user_id=20938094@N00']
# A map between the "official" feed titles in the XML, and the titles you want to show when rendered.
@@title_map = { "Simon Says" => "Simon Says:", "Simon Says: Comments" => "Simon Says comment:",
"Uploads from sbwoodside" => "Flickr picture:", "Semacode" => "Semacode blog post:",
'Comments on your photostream and/or sets' => 'Flickr comment:' }
def index
if params[:recache] and @@secret == params[:secret]
cache_feeds
expire_fragment(:controller => 'portal', :action => 'index') # next load of index will re-fragment cache
render :text => "Done recaching feeds"
else
@aggregate = read_cache unless read_fragment({})
end
end
private
# This will replace cached feeds in the DB that have the same URI. Be careful not to tie up the DB connection.
def cache_feeds
puts "Caching feeds... (can be slow)"
feeds = @@uris.map do |uri|
feed = FeedTools::Feed.open( uri )
{ :uri => uri, :title => feed.title,
:items => feed.items.map { |item| {:title => item.title, :published => item.published, :link => item.link} } }
end
feeds.each { |feed|
new = CachedFeed.find_or_initialize_by_uri( feed[:uri] )
new.parsed_feed = feed
new.save!
}
end
# Make an array of hashes, each hash is { :title, :feed_item }
def read_cache
@@uris.map { |uri|
feed = CachedFeed.find_by_uri( uri ).parsed_feed
feed[:items].map { |item| {:feed_title => @@title_map[feed[:title]] || feed[:title], :feed_item => item} }
} .flatten .sort_by { |item| item[:feed_item][:published] } .reverse
end
end
It's actually pretty simple but it took me a while to get the balance just right. What you need to do is set up a cron job or other repetitive task that does an HTTP load on http://mywebsite.com/?recache=yes&secret=XXXXXXXX ... every once in a while. You can use wget or curl, or whatever. You might want to recache every minute, five minutes, hour, whatever. Since it's done as a part of the controller there's no nonsense about running backgroundRB, RubyCron and all the other nonsense at HowToRunBackgroundJobsInRails. Yay!
Here's the view:
<div id="feed-stream">
<% cache do %>
<%
lastday = -1
@aggregate.each do |item| %>
<div class="item">
<%
mydate = item[:feed_item][:published].getlocal
if mydate.yday != lastday
%><div class="item_details"><p style="text-align:right"><%= mydate.strftime('%A, %B %e') %></p></div><%
lastday = mydate.yday
end
%>
<div class="item_content">
<%= item[:feed_title] %>
<a href="<%= item[:feed_item][:link] %>"><%= item[:feed_item][:title] %></a>
</div>
</div>
<% end %>
<% end %>
</div>
My cache is all Hashes. I don't cache the FeedTools object because I discovered that even after FeedTools has parsed your feed, accessing the supposedly "final" data is incredibly slow (like maybe 10x or 100x slower than a hash).
Here's the model:
require 'feed_tools'
class CachedFeed < ActiveRecord::Base
validates_presence_of :uri, :parsed_feed
validates_uniqueness_of :uri
serialize :parsed_feed, Hash # note that if this exceeds a certain KB size, it will likely fail (thinking it's a String)
end
And the migration:
class CreateCachedFeeds < ActiveRecord::Migration
def self.up
create_table :cached_feeds do |t|
t.column :uri, :string, :limit => 2048
t.column :parsed_feed, :text, :limit => 128.kilobytes # use for serialized object
t.timestamps
end
end
def self.down
drop_table :cached_feeds
end
end
Well, that's all you need. When I started out to make this I thought I'd find a simple example out there but there wasn't anything. It turns out that there's a number of interesting challenges — picking a parser to deal with difficult feeds, XML, and malformatted XML... to deal with caching ... to deal with background processing. Took me a while to get it all just right.
It powers my own front page ... consider to be under standard ruby open source license. As the vending machine says: Share And Enjoy!
Making predictions is fun. I made some predictions a long time ago about the iPhone and it's fun to go back and see which ones came true. #1 was "Apple will design the plans, and they'll twist the arms of the carriers to make them simple to understand and attractive to Apple's users" — that seems to be accurate.
Now that Nokia has demonstrated that they can deliver a device to compete with the iPhone, the question is, can they deliver the rest of the solution to match? Not an easy thing to say. You need a lot more than good hardware to make the kind of great customer experience that Apple shines at.
So here's 9 things that Nokia needs to do to retain and win back their smartphone dominance.
1. Forget the carriers. Nokia has a great brand (outside the USA) in part because many of the carriers they deal with have virtually no control. They need to make the same deal everywhere, including the huge US market. When you get a nokia, it has to be a totally nokia experience. Just like iPhone.
2. In line with that, every unit sold must run the same firmware. Right now there are a zillion firmware versions for the N95 alone. This is insane and frustrating for users and developers. Everyone should be running the same version, just like iPhone.
3. Simplify product line. Again. Like Apple. Nokia has about fifty billion products on the market, all with insane numbers instead of names, and so none of them get any buzz. Names are good, small numbers of models are good. How about 3? Even 10 models would be a dramatic improvement, and probably enough to cover the gamut from $10 developing market to whatever is the highest in the range.
4. App store. Duh. BUT — this requires absolute cross-carrier uniformity and a way to ensure that every subscriber has a data plan...
5. Getting away from copying Apple here. How about they shape up their open source story? What they've started with is a good start, but it needs to be better. Developing for Symbian is just about the worst thing in the world. Apple's SDK is better but you still have to use Objective C. How about Nokia lets us code in a nice modern language like Ruby? They could really leverage open source excitement if they made that a possibility.
They can really jump the queue on Apple with this one, because OSS just goes against the grain at Apple. It's not that they don't like open source, but it doesn't work with the secrecy and the total control thing. But Nokia could leverage open source efforts to really turn their platform into something to care about as a programmer. Android is starting from scratch, but Nokia has a developer community already in place, loads of users, and all of those people would jump at the opportunity to make and use cool apps.
6. Open up the platform. If nokia is seriously about open sourcing Symbian, then they should let people go so far as to actually installing their own versions of Symbian OS on their phones. That would just rock, and the user mojo would be amazing. Of course the carriers will hate it, which is why 1. above is 1. And they'll probably have to keep key sections of the OS (radio functions probably) under control.
7. Continue the content creation story, and back it up with better web integration. Keep pushing the megapixels and the video capture, etc. But, I should also be able to, with no setup, upload my high resolution movies I make with my Nokia directly to a Nokia-branded website (or flickr, if I so choose). Not using some stupid PC tools, but directly, over my WiFi network. There's no reason Nokia can't do this, and they've already made a good start with the kick-ass Sports Tracker app/web site combo.
7. Keep converging. Turn by turn GPS navigation is good, I can throw out my garmin. Keep going! They'll naturally stay ahead of Apple because they are inherently conservative on features, not wanting to add too many, each one has to be perfect and the market mature enough. Nokia can stay ahead here. I only want two electronic devices — my phone and my PC. And hey, if I can get rid of my PC that's great (integrated projector??). Unlikely, maybe. But Nokia should aggressively continue to add core features.
8. Keep innovating form factors. Another nokia advantage to stay with. Although I admit this conflicts with simplifying the product line. Wild and wacky form factors ARE cool...
9. Keep drinking whatever they are drinking. Somehow Nokia is the most Apple-like company that isn't Apple, even though they are a massive decentralized conglomerate with no dictatorial genius at the helm. Whatever they feed their people, keep doing it.
Nokia N97 - the form factor that RIM should have used in Storm, and Apple never will use in iPhone
Posted on December 04, 2008 at 04:57 PM
Categories: tech, symbian, mobile
So Nokia has announced the N97 touch screen device with real keyboard—the form factor that RIM should have used for the Storm, and the Steve Jobs will never allow at Apple.
New version of FractalTrees X (FTX) 2 beta 1
Posted on December 03, 2008 at 02:28 AM
Categories: code, mac
So after something on the order of 4 years I've finally upgraded my FTX program that draws fractal trees in 2 dimensions. I'll update the program's home page later, but in the mean time, here's the download link, with source code included.
Fractal Trees X 2 beta 1 (FTX2b1)
This has the advantage over the "alpha" in that it actually works the way it's supposed to.
Why am I returning to this after so long? Well, suddenly coding for Macs is cool again, and also I was going to try out MacRuby. So... first get it working in ObjC again I guess, and then we'll see — maybe I'll port it to iPhone and sell it for $0.99 a pop :-) :-)
(NB This version probably only works on Intel / 10.5.)
Yummy FTP for Mac OS X: still good, still ignored
Posted on December 01, 2008 at 03:18 PM
Categories: mac
Yummy FTP is a great Mac FTP program with side-by-side browsing, sychronization, remote editing, etc. I'm not a huge fan of the icon but other than that it's great.
Atheists most discriminated against group in the USA
Posted on December 01, 2008 at 02:56 AM
Categories: other
Hard to believe... But so says wikipedia. I wonder why this doesn't come up more often. Would being "outed" as an atheist be as bad as being "outed" as gay or muslim or . . . whatever?
In my email:
From: root+f90z4fj9@facebookmail.com
Unfortunately, the settings that control which email notifications get sent to you were lost. We're sorry for the inconvenience.
To reset your email notification settings, go to:
http://www.facebook.com/editaccount.php?notifications
Thanks,
The Facebook Team
So this is spam right? Blatant phishing? But wait, the URL is real, not fake. I still don't believe it, so I go to Google. Apparently this is real.
OK, so the good news is that FB sent the message as plain text, but since most email programs auto convert to links, that's not helping. Every FB user in the world is now being desensitized to phishing.
They should have said "log into facebook, and go to this or that tab to fix"
Of course, why did they lose everyone's settings in the first place.
Mesh networking 5 years later
Posted on November 28, 2008 at 12:50 AM
Categories: theories, wifi, internet
The last time I blogged about mesh networks was 5 years ago (almost exactly!). I was pretty pumped about the possibilities in those days — like the idea of creating a 2nd internet using mesh protocols, routing from house to house using WiFi, circumventing ISPs.... hey, it's still a cool idea, and maybe even possible still, especially with the excess capacity that we have with e.g. 802.11n. Latency would probably be pretty high..
Anyway, back then mesh was a DREAM but now it's a REALITY. The OLPC "XO" laptop for developing nations uses it! The perfect use case actually. And we have 802.11s, etc., etc... cool.
In the long run I expect that "self-forming" (if not exactly "mesh") networks over wireless will be a VERY important part of the internet and future networks, if not the most important way that data gets moved around in local and regional areas.
Getting a "Secure Rip" (a perfect/high-quality mp3 rip of a CD) on a Mac
Posted on November 25, 2008 at 12:29 AM
Categories: music, tech, mac, bittorrent
I've been trying to figure out how to get a perfect CD rip on my mac. The problem in a nutshell is that ripping CDs is "unreliable", in other words, it is impossible to be sure when you rip a CD that you have the correct digital data. How good a copy you get depends on your drive and the software you use.
Why care? In the most extreme cases you can literally get blips and pops in your MP3 file. This might occur even with a totally unscratched disc. But more likely you will get a subtle degradation of quality which will be noticeable if you have a good sound system, and that sucks. So.
The gold standard in secure ripping is Exact Audio Copy, a Windows-only program and likely to stay that way forever. Why? Because you can run it in boot camp or Parallels or whatever. If you want to use EAC definitely follow a how-to guide such as Exact Audio Copy Guide. EAC does not come preconfigured properly.
If you must use a Mac-native program, check out Max, and have look online in how to set it up for maximum secure mode, because it doesn't come in that mode by default. Max was originally written more as a transcoding program (converting between formats) but now supports a linux-originating cd ripper called cdparanoia. Audiophiles still prefer EAC to cdparanoia, and I'm not going to tell them they're wrong, even though they are occasionally insane and overly conservative, so I would say stick with EAC.
Oh yeah, and I would also say, rip into FLAC format. Then, use something like Max to convert from FLAC to MP3 320 Kbps (using LAME "insane" mode) for import into iTunes, use on your ipod/phone/mp3 player, etc. In practise it's unlikely you will be able to hear the difference between a lossless format and a 320 mp3. If you REALLY need to you can use Apple Lossless until Apple supports FLAC, but I like FLAC better as it's the open standard and everyone uses it. Archive the FLAC files for the future. You get to keep a perfect copy but not waste GBs of space on your mobile device.
And by the way, if you download music from BitTorrent, you might as well get FLACs, and they are almost always ripped with EAC.
UPDATE: Actually X Lossless Decoder looks like a good replacement for Max. It has the added ability to split a single huge FLAC/CUE combination into multiple MP3s (or any other format) automatically. Just drag the .cue file onto XLD and you're away.
BarCampWaterloo (November 2008 Edition) roundup
Posted on November 25, 2008 at 12:18 AM
Categories: tech
Yet another BarCamp in Waterloo came and went. Phun. Saturday we talked about Windows 7, what's the best platform for mobile development, and a wide ranging debate on programming languages. Learned more about Haskell. A little bit. Was possibly only person to have heard of Scala or Groovy. Wild. Also there were other discussions too, including a nice chat I had with Ali A. (missed a presentation for that one).
Myself and Jesse Rodgers run BarCampWaterloo totally on a voluntary basis, we don't get any money, and the sponsors pay directly for whatever they are buying for us. In this case, Gary Will's WatStart bought lunch (pizza—good quality too). Waterloo Accelerator Centre donated the space! And, Tech Capital VC bought us snacks and drinks (non-alcoholic) in a wide variety of persuasions.
What I love about BarCamp is that it's totally in the hands of the people that show up. Jesse & I and the sponsors merely provide a forum and a teensy tiny bit of structure, everything else is in the hands of the participants. You arrive, if you feel like talking about something, showing something, or just raising a discussion topic (e.g. programming languages) you just write it on the whiteboard at any time. It's so freeing and wonderful.
As for who was there, we went around the room and I didn't have paper to take notes with. There was the usual ~ 30 people, including a few peeps from AideRSS (current darling of waterloo tech startups :-), other startups such as FossFactory (cool idea, and we talked about how they will make the business model work a bit), Well.ca, CastRoller, and a couple others I missed.
In addition one of the students from VeloCity, UW's experiment in high-tech oriented student residence (or else, a new metropolis for bicycle fanatics). A smart and lucky fellow. And other students, professionals at larger firms, and other authentic techies. And we had in the audience both an eeePC and the latest macbook pro, made from a single solid block of diamond.
And if all of that sounds like fun, make sure to join our BarCampWaterloo FB group to find out about the next one (or if you hate Facebook, look at the wiki page).
One of my biggest dislikes with touch-screen devices is the total lack of tactile feedback. There are other things I don't like about them, but that's a biggy. So when I played around with the BB Storm's clickable screen. I liked it. I only played with the browser, which was competent, actually quite good, and very close to as good as the iPhone. So I can't provide an overall review of the Storm. But the clicking, that's good.
That's all I have to say.
Vuze (Azureus) search template for The Pirate Bay (TPB)
Posted on October 31, 2008 at 05:55 PM
Categories: code, bittorrent
Vuze provides a built-in search function to make it easier to find bittorrent files that you want to download. And, it's extensible, so you can add new search "templates" for torrent sites beyond the ones that they support by default.
There's a Pirate Bay template floating around but it doesn't work any more, so I made up my own. And here it is:
Download The Pirate Bay (TPB) search template for Vuze.
To install this sucker, you can just double click the file. If that doesn't work, try this:
- Download it (duh)
- Do a search in Vuze
- On the right, it says "Show results from..." "All" and then some options, and then "Add/Edit". Click Add/Edit.
- Below the list, click "Import a new template"
- Browse to tpb.vuze and open it.
UPDATE: some people are having trouble. Please post your Vuze version # and operating system if it works, or doesn't.. maybe there's a pattern.
UPDATE #2: It seems that if you are running in a language other than English, this might not work. If you can confirm that I would appreciate it. Thanks.
UPDATE #3 2009-12-10: The Pirate Bay changed their format a bit, so I updated the template. Click the download link to get the new one.
Futurama, possibly one of the best TV shows ever made, say some people. And full of good advice for every day situations too.
- You were doing well until everyone died
- Don't do anything that affects anything. Unless it turns out that you were supposed to do it; in which case, for the love of God, don't not do it!
- Bodies are for hookers and fat people.
- The Dave Matthews Band doesn't rock.
- If you want a box hurled into the sun, you've got to do it yourself.
I was going to make up a sort of "All I need to know I learned in Kindergarten" kind of poster, but I need more quotes so I'll just have to re-watch more Futurama. So much good TV & Movies to watch, so little time...
A bit of torrent #6: Three Businessmen
Posted on October 23, 2008 at 11:53 PM
Categories: bittorrent, film
This week on A bit of torrent ...
...a surreal film called Three Businessmen. You may not know that you're going to like this movie. You may not thank me for making you watch this movie. But ultimately, your mind will be expanded and you will have a bit, just a bit, more sympathy for the common business-person.
Basically, you've got two businessmen, pictured, thrown together in a sort of haphazard fashion, and they go trekking across the universe (sort of) in search of a bite to eat. On the way, they have many adventures, bond, and talk a lot of silly business speak. Etc.
(Eventually there is in fact a third.)
OK, there's no plot, virtually, and no action, no violence, no sex, no nudity, no guns, no special effects, hardly any budget. But on the other hand. It's by Alan Cox, who you just might remember from Repo Man (he's also the actor on the right). And it rewards multiple viewings. And it's a bit trippy. I liked it. Will you?
Download Three Businessmen (1998) torrent from The Pirate Bay now.
Till next time: bye bye.
I just tried to open my old XCode project for FractalTrees X in XCode. No dice—XCode doesn't even recognize the "pbproj" extension any more, and that's only from 2002... Then I try to open my NIB at least? And it's totally toast. Nothing. Won't open. Won't upgrade in ibtool. Nothing.
How to program a computer, for children ... II
Posted on October 16, 2008 at 02:28 AM
Categories: links
A while ago I wrote "How to program a computer, for children". I was actually inspired by Ming's efforts along the same lines. I just read it and decided to take a slightly different tack, doing it all with math (since programming is all math anyway).
Incidentally... why has a rather bizarre system called Shoes which is apparently supposed to teach children to program but I suspect might frighten them instead. For adults, you have surely read his guide to ruby ... right?!?!?!
And here we go.
Programming a computer is a lot like writing instructions for someone really, really stupid. Imagine a person who knows nothing. They don't know how to walk, talk, read, or write. In fact, the only thing that they know to do at all is simple arithmetic. They can add, subtract, multiply, and divide any number at all. But that's all. They can't do anything else without being told how to do it in the form of math.
So, to get a computer to do something, you must turn it into math. Let's say you want to get a computer to go around the room. First you have to explain what "go" means in terms of math. Then what "around" means... in terms of math. And what is "a room" ... that's not math yet, so computers don't know what it is.
Well, let's start with "go". Let's give it a try:
How to "go":
1. increase the total number of footsteps that you have ever taken in your life, by 1.
See how I turned that into math? That's how computers think. Unfortunately, computers don't know what feet are either. But that's OK. For now, we'll assume that someone else has already built a foot for our computer, and when we tell it to increase by 1, it will know what to do. In computer language, this would be:
totalNumberOfSteps += 1
Now it's not completely true that computers can only do math. They can also repeat the same thing over and over again, like a mindless machine. It's called a "loop". If we just take one step, that's not really "going" very far. Instead let's have the computer "go" further.
How to "go":
1. totalNumberOfSteps += 1
2. do that over and over again
Since the computer is mindless, it will do this forever, so we can rewrite this into computer language like this:
1. totalNumberOfSteps += 1
2. repeat forever
OK, so now the computer goes. But will it ever stop? I don't know... if it has an atomic power plant, it might be millions of years before it stops. And in that time, it will grind its way through even the thickest of reinforced concrete walls. And it will never go "around" the room because it can only go forward.
So maybe we ought to give the computer a way to measure how far it's moved. Let's say it's got a little measuring wheel that touches the floor. Whenever it takes a step, the wheel clicks around a little more. In fact, it's just like an odometer on a car, that tells you how far the car has ever gone.
That's all fine, but how can the computer know if it moved? Remember it can only do math and repeat things. Well, the guy who made the odometer gives us two number:
odometerReadingBeforeTheStep
odometerReadingAfterTheStep
Clearly, if the "After" number is more than the "before" number, then we moved forward without hitting a wall. If not, we're stuck. We can use some fancy math to write this down:
odometerReadingAfterTheStep > odometerReadingBeforeTheStep
That just means that the number of the left is bigger (>) than the number of the right.
OK... so does that help us? How do we fit that into steps 1 and 2? Another little trick that computers can pull is to check some math before they take a step. So they can (a) do math (b) repeat things (c) check math.
It works like this:
if 1 == 1 then oneIsEqualToOne += 1
That's a pretty stupid example, but you know, 1 is "equal to" (==) 1, in math, that's true. So, oneIsEqualToOne will be put up by one number.
We can use that for our robot to. Can you see how yet?
1. totalNumberOfSteps += 1
2. repeat if ...
If what? Remember the odometer?
1. totalNumberOfSteps += 1
2. repeat if odometerReadingAfterTheStep > odometerReadingBeforeTheStep
Pretty simple. Add a step, and then do it again if the odometer shows you moved forward. If it doesn't, the computer just stops, because it has no more instructions. That's called "halting". When the program halts, you check it's progress. In this case, it will have walked into a wall. And then stopped. Always. That may not sound like much, but we're halfway to getting around the room.
I was reading the manual for my HDTV (I know, who the hell does that?) when I noticed a GPL license notice and acknowledgment for among other things, "linux kernel". Wild.
Did some fixing of the site, and got some comments!
Posted on October 14, 2008 at 01:49 AM
Categories: meta
Well I just cleaned up some bugs in the site, mainly in the static content area (so stuff in the Software and Content sections works now!!!)
Also I got some comments. For some reason I was scared of having comments on the site back in the day, but now... whatever. So I have some comments about good old FractalTreesX here and here.
Now I just need to restore all my old tags... and fix the previous/next navigation system so it's more prominent... and see if my google rank recovers...
Useful software: PDFCrack, Map.Hamilton iMapper, and Skim for PDF annotation
Posted on September 27, 2008 at 10:31 PM
Categories: links
Some miscellaneous useful software.
"Forget" your PDF password: use open-source PDFCrack. Installs easily on Mac command line (use gmake).
Looking for high-quality maps and "satellite" imagery of Hamilton? Try Map.Hamilton's iMapper. The interface takes a few minutes of experimentation to figure out, and then it's cool. Make sure you switch to Aerial Viewer (latest year) to get their ground imagery, which I think is actually generated by airplanes. It's quite a bit higher resolution than Google Earth has.
Want to annotate your PDF files? Try Skim. Seems potentially easier than using OmniGraffle... (and cheaper...)
Cool URIs should never change ... & site updates
Posted on September 15, 2008 at 01:36 AM
Categories: meta
I'm a terrible person. When I upgraded to Rails I totally broke a zillion URIs on this site, in particular most of the weblog links. I also probably lost a lot of google juice in the process. Well, now I have restored all of the weblog archive links in accordance with Cool URIs don't change (and I should practice what I preach...)
Incidentally I also made a number of other long-waiting fixes to the site, like installing the correct google analytics, fixing the top navigation links, adding a sidebar on the front page, speeding up the front page (somewhat.. still wrestling with that one). I still need to fix the tag browser so that it's as good as it used to be. And some day maybe I'll convert all of my old content over to some new CMS (well, I probably will never do that actually...)
"It should be required reading" is for idiots
Posted on September 14, 2008 at 11:16 PM
Categories: (none)
Number of books that "should be required reading": 855,000.*
I hate it when people say that something should be required reading. Do you think that your pet crap is something that everyone cares about? I don't give a shit about your agenda.
Here's my list of what should be required reading:
- Parts, at least, of the Bible, so that you can see how odd and contradictory it is. The gospels are good though
- A bit of Shakespeare
- Well, that's about it. So long suckers.
* according to Google
Best movie links (...the answer is Citizen Kane)
Posted on September 13, 2008 at 06:53 PM
Categories: tv
I just went for a walk in the rain. It was nice and mellow. Nothing with me, no keys, no wallet, and best of all, no cellphone.
Anyway, here's some nice links to lists of all time greatest movies.
The mother of all lists of course is the IMDB Top 250. IMDB has been around forever! ...it's been on the web since 1993 which is like before the web even existed. Basically any movie on this list is worth watching. And it's the popular choices, as opposed to the critics, so they aren't just chosen for originality or historical significance (like some of the below) but rather because they're good to watch.
For the "critics choices" you can use the Best of Rotten Tomatoes. Rotten Tomatoes has to be one of the worst named websites of all time. But no matter. The problem with the all time list is that it includes movies that are loved by critics but aren't necessarily very watchable. However, they have a useful feature which is to see the top movies by year. For example here is the top 10 for 1969 (I've seen 5 of the 10 so far...). It's a cool way to explore cinematic history.
For more critic's lists, try the British Film Institute top 45 list. And here's more detail on their top 10. And then there's the American Film Institute top 100 (linking to wikipedia because the AFI site requires a stupid login).
And finally here are a few more from random publications:
- The Times top 100 (UK newspaper)
- Time Magazine top 100 (US magazine)
Well, that's enough of that. It's interesting to see the differences in the list. Is the best movie of all time The Godfather? Casablanca? Citizen Kane? Or as IMDB users would have it, Shawshank? (I don't think so...). Forget about the latest releases. Watch the classics.
Yes, I use eHarmony. I have my match distance set to something like 200km so I get about 5-8 matches a day. I try to sift through them pretty quickly to separate the wheat from the chaff. Here's my current procedure:
- First pass is to eliminate people who are definitely not an option. Starting with the most recent match, I command-click (middle click) to open in a new window and then I look at the small photo:
- If they closed me, I close them, don't bother looking at photo or description.
- If there's no small photo, I close. It's not worth the hassle to request photos. A picture is worth 1000 words.
- If it looks like I wouldn't like them, I close without reading anything.
- If they look potentially interesting, I don't do anything (so they stay in the queue).
- If I closed in the above action, I switch back to the original tab, because eHarmony is too slow in closing, and also it doesn't return you to the right place in your list if you go back. Once I'm done going through everyone, I close all the tabs, reload the main page, and get ready for the 2nd pass.
- Now I'm on the second pass. All of the women left have passed the first sight test. Now I look at the photo details. I find it's very important for me that there's both a closeup face shot and a shot from father back so you can see what they look at. I include these in my profile. Without both, I close. If I don't like what I see (and this can be facial expressions, the context, as well as more normal attractiveness levels) I close without reading anything.
- OK, finally, after doing the above step for everyone, the people who are left are worth reading about. In fact, at this point I only really feel the need to skim what they wrote because as I said, your character is written all over your face and the context of the photos. So I usually contact anyone who's made it this far.
So there you are. I do this in phases, because it's annoying to be really interested in someone, and then the next 5 people are horrible. So, I save myself the pain by going in passes and only increasing how much I care after I've eliminated the uninteresting people already. After all I need to manage my own sense of involvement or I'll just get tired of it.
I actually at one point wrote a pretty nifty greasemonkey script for firefox to add various close buttons at the top of the page to make it easier to close people. But it made me nervous. A couple of times I clicked the close button when I meant to click something else. Also, I just don't like Firefox—prefer Camino. So, no more of that.
unflac.sh - Convert FLAC files into 320 kbps MP3 files
Posted on August 17, 2008 at 01:19 AM
Categories: (none)
Convert FLAC files into 320 kbps MP3 files. Someone might find this useful. I call it unflac.sh. It will take every .flac file in the current directory and convert it to MP3 using lame's "insane" preset (which shows what the lame people think about mp3...)
#!/bin/tcsh
# Deal with FLAC, CUE file to convert to high-quality MP3 with LAME
# Split a foo.cue / foo.flac combo (e.g. from EAC) into separate flac files
####cuebreakpoints *.cue | shnsplit -o flac *.flac
# convert flac to MP3
foreach f (*.flac)
flac -c -d "$f" | lame —preset insane - "${f}.mp3"
end
# Re-add the tags to the separate files
cuetag.sh *.cue *.mp3
You'll need to have flac and lame installed. It also tries to restore tags using cue but that doesn't seem to work. So sorry.
Why would I do this? Basically, because:
- my MP3 player (N95) doesn't support FLAC
- and doesn't have the room for it anyway
- and iTunes doesn't support FLAC either (stupid apple...)
Some day when I have a player that does, I'll probably switch to all FLAC, or apple lossless or whatever, but in the meantime 320 MP3s from lame are pretty good. I won't say I can't hear the difference because I haven't tried REALLY HARD, but for the listening I'm doing I can't hear the difference...
You have probably seen the book with a space cut out to hide a knife, a gun, another book... but what about a house?
(actually, hiding a book inside a book... that's a cool idea...)
Anyway, that's Olafur Eliasson has done. He cut a house into a book. There's no text. Just the house. And it's in negative space. Here's what it looks like:

Wild. I found this in grafik magazine. No website, but a real paper work of art.
Eliasson is just too cool. Have a look at what he does with white lego bricks... and just generally feast your eyes on his works.
He is apparently
Trying to sort the brilliant ideas from the lesser ones.
Unfortunately, he is not very successful. But he is trying.
He also uses SimpleLog, the best Ruby on Rails blog out there that doesn't work under Rails 2.0, has been abandoned by its author, but still works great for me.
Open Source Software for Mac. Lots of Good Stuff. Very nice.
What the hell is the Loudness War? It's music business, baby. Put it this way. Everything is getting LOUDER.
IF YOU'RE LOUD YOU GET NOTICED PEOPLE READ YOU FIRST BUT EVERYTHING STARTS TO SOUND THE SAME.
That's just a simple "visualization" of what the loudness war is doing to music (recorded music anyway).
You could perhaps lay the blame on 5-CD changers. If you had one back in the 90s, you probably noticed that whenever it switches discs, you had to adjust the volume. And then MP3 players didn't help, although now the software will automatically adjust the loudness of tracks to match each other. And car CD players, where everything has to be loud to even hear it. But really, it's the fault of computers, and in particular a device called a digital compressor.
Basically here's the problem in a nutshell. Music has variations in volume, between the quiet parts and the loud parts. If you're in a movie theatre, concert hall, or at home with a good stereo, this is exciting, it's dynamics. The music can start out quiet, and then build up and then reach out and grab you by the throat in the exciting bits. This is GOOD.
But psychological studies have shown that people subconsciously think that louder is better, and the problem comes in when you are moving from one song to another. If you go from a loud song to one that starts out really quiet, your subconscious brain is going to tell you that the quality of music just went down, and you're going to hit the skip button or change radio stations.
So the producers use the compressor to "compress" (yeah, that's why it's called a compressor...) the dynamic range so that the difference between the quiet parts and the loud parts is minute. Basically, they make everything LOUD.
A few years ago Rolling Stone had an article called The Death of High Fidelity, it's about the Loudness War, and you can see a sort-of good video about it on YouTube.
There also a a great article from IEEE Spectrum magazine: Tearing Down the Wall of Noise. Good reading.
All in all these stories demonstrate without a grain of doubt that (a) the Loudness War is real and (b) it's causing damage to the music. Constantly loud music makes you tired and ultimately isn't satisfying or good. The subconscious thing is temporary, but the damage to the music is permanent.
What can you do about it? Buy music that isn't compressed, for starters. Some artists are fighting back, like Norah Jones with Not Too Late and Dylan's Modern Times. Or, just buy OLD albums, like CDs from the 80s, the time before compressors existed. Or buy vinyl, which for physical reasons doesn't really allow compression, but to me, having to go back to old tech like that is just silly. The music industry needs to fix this on the new technology. Even if they can crank up the volume, they shouldn't turn it into pure noise.
PS: Seems that you can use "Average RMS Power" to get a rough idea of the dynamic range of a tune. And you can measure that using various tools, e.g. Amadeus Pro (Analyze > Waveform Statistics). Here are some values from my library:
- Norah Jones, Feels Like Home, Sunrise: -13.5 dB .... that's not great but it's not as bad as it could be ... I don't really listen to this much any more though, and I think it's partly because it's tiring to listen to.
- Decca Georg Solti Nibelung, Walkure Act I: -25 dB... I have no trouble with ear fatigue listenging to this one.
- Beatles, Revolver, Taxman (no idea what edition): -16 dB ... I find it a bit loud, but I guess partly that's intentional?
- Cowboy Junkies, Trinity Sessions, Blue Moon: -21 dB .... what can I say? niiiiice.
OK, so I guess pretty much everything in my collection is OK at least. Probably because I delete anything that has crap dynamics. For comparison here's some stuff I wouldn't listen to.
- Coldplay, Viva la Vida:-12.3 dB ... well, it could be worse.... a bit... this would be a lot better with better dynamics.
- Rihanna, Disturbia: -11 dB ... just looking at the waveform for this makes my ears hurt in advance.
Yeah, those are fairly hard to listen to.
Someone ought to make an average RMS database.
Azureus's stunning visualizations (Vuze)
Posted on July 18, 2008 at 07:51 PM
Categories: graphics, tech
In order to get around Bell Sympatico's bittorrent throttling I recently switched to Azureus (aka Vuze). If you switch to the "classic" UI mode, it has some stunning visualizations of what's happening with your torrents.
The main screen contains a bit more information than you might need, but if you play with the columns that are visible (right click on the headers) you can get something like this:

What you've got there is downloading torrents at the top and finished ones at the bottom. Green happy faces are currently in progress. Gray ones are queued. In the bottom right corner you can see that my total download speed is 311 kilobytes per second, and total upload is 50kB/s (I'm on ADSL).

Suppose I want to zoom in on one particular torrent — double click on it. This shows each of the peers I'm connected to. What pieces of the file do they have? How far complete are they in total? Bittorrent downloads files in chunks and it does the chunks randomly, not from start to end, so this information can be interesting.

The above shows me EVEN MORE details if I really want it (OK, some of this stuff is really excessive). It shows which of the pieces I've got (blue) and which ones are downloading (in red). Just in case you wanted to know...

Swarm (above) is an actual animation of the pieces of the file as each of your peers around the edges send the bits to you in the middle. And it also shows the reverse as well. And the pie charts show how much of the torrent each peer has. Wild stuff.
So, that's if you want to know what's happening with one particular torrent. But what if you want to know about your overall connection with all the different peers and torrents? Well, Azureus gives loads of graphs and charts for that as well.
This one is your overall bandwidth monitor:

Nice. I love staring at this one. It's a really good example about how to cleanly show multiple related variables in a time-based chart (aka histogram). For the top one, the blue filled area is your download speed. Really interesting is the gray line, which is the average download speed of the SWARM. In other words, what is your average peer getting? If you're below this line, then you're getting screwed — or there's something wrong with your configuration. If you're above it, you're doing well. It's a good way to get a quick fix on the health of your downloads as compared to other users. It also makes it really easy to see if you're being rate-limited by your ISP.
On the bottom half, you can see that I've enabled Auto-Speed and it's automatically cranking the max upload speed up and down based on measuring my bandwidth and other factors that I'm not too clear on.
There's other visualizations but those are my favourites. Some of them aren't really documented and I don't really understand exactly what they mean (transfers and vivaldi for example). Still, obviously one of the azureus open source developers is a data viz keener and s/he's done some fine work.
Hacking the java compiler: using anonymous subclasses as closures
Posted on July 10, 2008 at 11:17 PM
Categories: tech, code, java
UPDATE: new more comprehensive post on this subject: Closures with return values in Java.
In Java, closures/first-order functions are not a language feature. However, as everyone knows, you can effectively get a first-order function by using an anonymous subclass instead. Something like this:
class MyClosure {
void run() {} // override this
}
void doSomethingClosureLike() {
MyClosure closure = new MyClosure() { void run() { System.out.println("We're inside a closure!"); }};
runTheClosure(closure);
}
void runTheClosure(MyClosure closure) {
closure.run();
}
// will print We're inside a closure!
Anyway, it's simple enough, you pass the class instead of the function and there's a little extra verbage but it works!
Also you get closure-like functionality, because inside run() you can access variables from outwhere where you created it. E.g.:
void doSomethingCooler() {
final String myString = "Foo!";
MyClosure closure = new MyClosure() { void run() { System.out.println("The string is: " + myString); }};
runTheClosure(closure);
}
// will print The string is: Foo!
You can also access global variables that change over time, and the closure will use whatever is the current value WHEN THE CLOSURE RUNS.
There's just one small annoying thing, which is this particularly annoying compiler message:
local variable (WHATEVER) is accessed from within inner class; needs to be declared final
If you were do change myString to not be final, you'd get that error. Bummer. You could make myString a global variable and that would work, but that's stupid. There is a better way. Try this: UPDATE: This doesn't work, see new version at the bottom, thanks commenter the.d-stro.
void doSomethingCooler() {
String myString = "Foo!";
final String myStringFinal = myString;
myString.concat(" Bar!");
MyClosure closure = new MyClosure() { void run() { System.out.println("The string is:" + myStringFinal); }};
runTheClosure(closure);
}
// will print Foo! Bar!Now you can even change myString after you assign myStringFinal, because Java, although they say it doesn't use pointers, really does use pointers. I.e. it passes by reference. So, myStringFinal is actually just a reference to myString, and keeps pointing to it even when you change the contents of myString.
You can CHANGE it (like using concat()) but you CAN'T reassign it. That will break the pointers. It makes sense if you think about it—myString will have a new memory address, and myStringFinal will still be pointing to the old memory address (and the old string value). So, this won't work:
myString = "won't work"; // breaks myStringFinal
You can use this technique with any object (but not primitives like int).
UPDATE
The last source block is wrong because java Strings are immutable. Here's an example that will work as advertised:
void doSomethingCoolest() {
StringBuffer myString = new StringBuffer("Foo!");
final StringBuffer myStringFinal = myString;
myString.append(" Bar!");
MyClosure closure = new MyClosure() { void run() { System.out.println("The string is: " + myStringFinal); }};
runTheClosure(closure);
}
// will print The string is: Foo! Bar!
ALL NEW "Simon Says" content RIGHT HERE
Posted on July 10, 2008 at 02:52 PM
Categories: tech, meta, links, art
Wow, WYM Editor is so cool that I can just like type in a new blog post whenever I want to. Wild!
So anyway, I've been saving up a whole load of links and stuff for months until I had this new site all sorted out. So here's something.
Hmm... where did my "stuff to blog about" folder go?
Oh, here's an awesome one. Nikkei Electronics Teardown Squad. These guys kick ass. Watch as they take apart a MacBook Air and declare "No Waste Outside, Nothing but Waste Inside".
About 30 screws were used to attach the keyboard alone. "The total number of screws in the MacBook Air was several times the number used in a PC we make," one of the engineers said.
Burn, baby, burn!
OK, here's another one from the files. Nathan Fawkes Art. He's part of a network of film animators and illustrators and concept artists who all have their stuff up on blogspot.
And I'd like to remind myself particularly about this post about science fiction.
OK, here's a test of how WYMeditor works, because I'm going to try to copy/paste some code in here. I just had a little foray into my past with XSLT. I had 344 old blog posts (starting year 2000!) to convert from XML to SQL. Nothing better than XSL for the job! Here it is.
NB: I haven't restored images as of this writing.
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="xml" indent="no" omit-xml-declaration="yes" encoding="ASCII"/>
<xsl:strip-space elements="*"/>
<xsl:variable name="ucletters">ABCDEFGHIJKLMNOPQRSTUVWXYZ- </xsl:variable>
<xsl:variable name="lcletters">abcdefghijklmnopqrstuvwxyz-_</xsl:variable>
<xsl:variable name="allowed_letters">ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_ </xsl:variable>
<xsl:template match="/">
<xsl:text> USE `sw-blog-dev`;
</xsl:text>
<xsl:apply-templates select="weblog/entry"/>
</xsl:template>
<xsl:template match="entry">
<xsl:text>INSERT INTO `sw-blog-dev`.`posts` (`author_id`,`created_at`,`modified_at`,`permalink`,`title`,`synd_title`,`summary`,`body_raw`,`extended_raw`,`body`,`extended`,`is_active`,`custom_field_1`,`custom_field_2`,`custom_field_3`,`body_searchable`,`extended_searchable`,`text_filter`,`comment_status`) VALUES
</xsl:text>
<xsl:text> (2,</xsl:text> <!— author_id —>
<xsl:text>'</xsl:text><xsl:apply-templates select="date"/><xsl:text> 12:00:00',</xsl:text> <!— created_at —>
<xsl:text>'</xsl:text><xsl:apply-templates select="date"/><xsl:text> 12:00:00',</xsl:text> <!— modified_at —>
<xsl:text>'</xsl:text><xsl:apply-templates mode="PERMALINK" select="title"/><xsl:text>',</xsl:text><!— permalink —>
<xsl:text>'</xsl:text><xsl:apply-templates mode="XHTML" select="title/text()"/><xsl:text>',</xsl:text><!— title —>
<xsl:text>'</xsl:text><xsl:apply-templates mode="SYND_TITLE" select="content"/><xsl:text>',</xsl:text><!— synd_title —>
<xsl:text>'',</xsl:text><!— summary —>
<xsl:text>'</xsl:text><xsl:apply-templates mode="XHTML" select="content"/><xsl:text>',</xsl:text><!— body_raw —>
<xsl:text>'',</xsl:text><!— extended_raw —>
<xsl:text>'</xsl:text><xsl:apply-templates mode="XHTML" select="content"/><xsl:text>',</xsl:text><!— body —>
<xsl:text>'',</xsl:text><!— extended —>
<xsl:text>1,</xsl:text><!— is_active —>
<xsl:text>'',</xsl:text> <!— custom_field_1 —>
<xsl:text>'',</xsl:text> <!— custom_field_2 —>
<xsl:text>'',</xsl:text> <!— custom_field_3 —>
<xsl:text>'</xsl:text><xsl:apply-templates mode="TEXT_ONLY" select="content"/><xsl:text>',</xsl:text><!— body_searchable —>
<xsl:text>'',</xsl:text><!— extended_searchable —>
<xsl:text>'markdown',</xsl:text><!— text_filter —>
<xsl:text>1);
</xsl:text><!— comment_status —>
</xsl:template>
<!— must remember to backslash all single quotes —>
<xsl:template match="date">
<xsl:value-of select="translate(.,'/','-')" />
</xsl:template>
<xsl:template mode="PERMALINK" match="title">
<xsl:value-of select="substring(
translate(
translate(., translate(., $allowed_letters, ''), ''),
$ucletters,
$lcletters
),
0,42)"/>
</xsl:template>
<xsl:template mode="SYND_TITLE" match="content">
<xsl:call-template name="escapesinglequotes">
<xsl:with-param name="arg1"><xsl:value-of select="normalize-space( substring(.,0,42) )"/></xsl:with-param>
</xsl:call-template>
<xsl:text>...</xsl:text>
</xsl:template>
<xsl:template mode="TEXT_ONLY" match="content">
<xsl:call-template name="escapesinglequotes">
<xsl:with-param name="arg1"><xsl:value-of select="normalize-space(.)"/></xsl:with-param>
</xsl:call-template>
</xsl:template>
<xsl:template mode="XHTML" match="content">
<xsl:apply-templates mode="XHTML"/>
</xsl:template>
<xsl:template mode="XHTML" match="node()|@*">
<xsl:copy>
<xsl:apply-templates mode="XHTML" select="@*"/>
<xsl:apply-templates mode="XHTML"/>
</xsl:copy>
</xsl:template>
<xsl:template mode="XHTML" match="text()">
<xsl:call-template name="escapesinglequotes">
<xsl:with-param name="arg1"><xsl:value-of select="normalize-space(.)"/></xsl:with-param>
</xsl:call-template>
<xsl:text> </xsl:text>
</xsl:template>
<xsl:template mode="XHTML" match="@*">
<xsl:attribute name="{name()}">
<xsl:call-template name="escapesinglequotes">
<xsl:with-param name="arg1"><xsl:value-of select="normalize-space(.)"/></xsl:with-param>
</xsl:call-template>
</xsl:attribute>
</xsl:template>
<xsl:template name="escapesinglequotes">
<xsl:param name="arg1"/>
<xsl:variable name="apostrophe">'</xsl:variable>
<xsl:choose>
<!— this string has at least on single quote —>
<xsl:when test="contains($arg1, $apostrophe)">
<xsl:if test="string-length(normalize-space(substring-before($arg1, $apostrophe))) > 0"><xsl:value-of select="substring-before($arg1, $apostrophe)" disable-output-escaping="yes"/>\'</xsl:if>
<xsl:call-template name="escapesinglequotes">
<xsl:with-param name="arg1"><xsl:value-of select="substring-after($arg1, $apostrophe)" disable-output-escaping="yes"/></xsl:with-param>
</xsl:call-template>
</xsl:when>
<!— no quotes found in string, just print it —>
<xsl:when test="string-length(normalize-space($arg1)) > 0"><xsl:value-of select="normalize-space($arg1)"/></xsl:when>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
Niiiiiiice.
Hi there.
Well, I'm back. I was running this site on really ancient technology — AxKit — so 2001. Now I'm running it on modern technology, i.e. Rails 2. And doesn't it rock. Now I have a cool GUI editor to type into, I have easy programming in ruby, and I have of course polished both my design and my CSS/XHTML skillz considerably in the mean time, hopefully making this all easier to look at and navigate.
So I'm running on SimpleLog here, but it's not "stock". Oh no. Stock SimpleLog right doesn't run on Rails 2, but this one does. Also, I made it even MORE simple than it used to be:
- Support Rails 2.0 (no need to freeze an old rails)
- no themes—annoying to use anyway, and no one was publishing themes either
- replaced the editor/preview panel with WYM on Rails, which is by FAR the best WYSIWYG / GUI editor I've ever found, and the end of a long search for me
...and so on.
Since all the iptables documentation out there is super complicated, here's something really simple.
To see all of the ports that are open, run:
sudo iptables —list
To add a new rule (to open a new port, e.g. 8080):
sudo iptables -A tcp_in -p tcp -d my.hostname.com —destination-port 8080 -j allowed
That's assuming you have a chain called "tcp_in" of course...
And to delete a rule, run iptables —list,
count the number of the rule (the index #) and then:
sudo iptables -D tcp_in [index]
Simple enough....
The Quick and Easy Guide to moving your project from CVS to Subversion
Posted on March 05, 2007 at 12:00 PM
Categories: unix, code
So you want to use SVN? Fine, it's easy to move a project from one to the other.
Get cvs2svn
Go to a checked out copy of your cvs project and run cvs admin -kb filename on any binary files.
Commit to CVS.
Assuming that you've got a simple CVS project with no branches that you want to keep, do this:
./cvs2svn-1.5.1/cvs2svn —trunk-only -s project-name /path/to/cvsrepository/project-name mv project-name /path/to/svnrepository/
Tinselman is the very amusing blog of the co-creator of Myst, Robyn Miller. It's a bit iffy on a daily basis ... and very eclectic. A bit like this blog, but better.
He's got this ongoing thread about the Republic of Tinselman, which appears to be something dating back to some attempt to create a fake republic on Wikipedia, or something, but whatever. It's just stuff.
He also seems to be a big fan of Walt Disney . To be particular, Walt Disney, and Disneyland. Not necessarily the Disney company or the movies per se. In fact, thinking about it, or maybe I read this somewhere. Anyway, that he wanted Myst to be a bit like Disneyland, which I think it is.
It's worth noting that Robyn Miller is the one who did the music for Myst and Riven, and he left after Riven. It's a bit obvious looking at any of the sequels after that the original spirit isn't there. With his brother Rand, he also did pre-Myst stuff like Cosmic Osmo, which was pretty cool and all done in the absolutely brilliant and amazing but now-forgotten HyperCard . In fact, did you know that the original Myst for Mac was written and deployed in Hypercard? Amazing but true.
Actually, that reminds me of a story, which is that back when Myst was first released I was working at this rather unusual place called the Southam InfoLab . Anyway, I was mainly a HyperCard hacker and pretty damned good at it if I may say so. And I managed to hack into Myst and actually look at the source code running it. HyperCard is an interpreted language, the language is called HyperTalk, and there was no compiler for it. So, they implemented this fiendishly complex system for preventing you from breaking into debug mode and viewing the code, but I managed to hack it. I don't remember doing much with it though, because the source code for Myst was way over my head at the time.
Anyway. Robyn is clearly a very interesting an unusual person. I think it would be very interesting to meet him and peer into his brain some day. Once you get past the "oh my god he's the guy who made Myst" thing then his blog seems to be quite interesting.
A bit of torrent #5: Police Squad!
Posted on December 03, 2006 at 12:00 PM
Categories: tv, bittorrent

My name is Lieutenant Frank Drebin, Police Squad, a division of the Police Department. I just got a call from headquarters. Someone killed off a cop series in the prime of its life, and we couldn't find the body. Fortunately some new evidence turned up, and it looked like we might have found the body and it's killer.
And so begins this week's episode of A Bit of Torrent , a weekly (almost) feature of Simon Says where we highlight the absolute latest in downloadable content. This week in the crosshairs: Police Squad!
If you've ever seen Leslie Nielsen or any of the Naked Gun movies, you know what to look for. You know what I mean. Exactly. It's basically six mini-Naked Gun movies in a row.
Download Police Squad (complete) on The Pirate Bay .
Sadly, the show was cancelled before its time. Cigarette? Yes. I know.
When I first saw this, I thought, hey cool! Then I took a screenshot and when it came through in the screenshot, that was even cooler. It's not often you get something like this. Memory corruption, maybe, not terminal, and not detected by the graphics software. My laptop gets hot sometimes, maybe the memory got corrupted that way? It happened on wake from sleep. Anyway, voila.

It sort of went away when it redrew areas of the screen but not completely, so I restarted.
New features on the blog: pagination, save to digg, del.icio.us
Posted on November 17, 2006 at 12:00 PM
Categories: meta
I just added two new features. First, now you can finally page through the posts 15 at a time (or whatever # it's set to show on the front page), using the "Previous Page" and "Next Page" links at the bottom. Second, you can save a specific post to Digg or delicious by just clicking on the appropriate little icon in the meta-data at the top of the post. As if anyone would want to do that. I don't, but I saw it on a bunch of other blogs so I thought I'd do it to.
I guess in theory you could use digg to discuss the post, if everyone used digg.
Some fun with Saxite, a logo, my first "font"
Posted on October 21, 2006 at 12:00 PM
Categories: meta, art
So Saxite is the new name for my siteware project. For those of you not paying attention, it's all written in XSLT and XML and it runs on AxKit.
I decided to make an icon so I came up with this icon, below.
Like it? I was inspired by a recent issue of Computer Arts Projects (one of the fantastic UK graphic design magazines that my local Indigo store carries) that was all about fonts, to do some of my own font work. So, I had a visual idea of what I wanted the logo to look like, with the X as a white space in the middle, and then I looked for a font on my system that was very blocky and thick and wound up with Arial Black. "ITE" on Arial Black are very generic, but I really didn't think that the S worked at all for me, and the A didn't fit, and the X I didn't like either (not wide enough).

So I started with the A. I actually did the A from scratch, not even bother to look at the Arial A. It's more like half of an A anyway. Next I got the X in the shape I wanted, and filled in the negative space on the right side with the I. Getting the hole in the A to look right was tricky, right now it's actually a white copy of the shape of the A!
Oh yeah, and check out the arrow in the A too :-) (it's pointing right). And check out the angle bracket on the right side of the X :-)

I spent by far the most time on the "S". I didn't like the original Arial S and wanted to replace it the most since it's by far the most identifiable letter of the ones I used. Also it didn't look blocky and aggressive enough in my opinion. There was quite a bit of variation in the width of stroke which I didn't like, so I drew my own "S" over top of it with a more even stroke (drawn with beziers). I also didn't like the flat ends so I switched over to ends on 45-degree angles. Getting it to balance was interesting ... the bottom end of the S actually extends out beyond the curve above it, while the top end is shorter than the curve below it. Weird.
I actually tried out another one which was even more streamlined, with the top and bottom strokes ending totally horizontally (like in the Star Wars logo) but that looked too, I don't know, sci-fi?
Finally I added the hole to the right of the X, before the I. And then I redrew the rest of the letters by hand so that they would all flow together. Now there's no Arial Black left at all.
Oh yeah, and post-processing in Photoshop to give it that 3d look.
Although I love graphic design, I've never been able to get the hang of colour. I usually work in black and white. My colour palettes usually suck. The colours on this site are nice but that's a very lengthy evolution and they could still be better.
Now if I ever need a colour palette I'll just go to this flickr set by lunaryuna called quest for colour . It's bloody brilliant.
Here's a random sample, just reload to see another 4, or click through for higher-rez versions...
4 random x user_set 47745789@N00 371908 mA bit of torrent #4: The Fast Show
Posted on October 02, 2006 at 12:00 PM
Categories: tv, bittorrent
This week on "a bit of torrent" ...

Aren't british comedies brilliant? Bittorrent — isn't that brilliant? I mean, downloading TV over the internet — what will they think of next? It's fantastic. The Fast Show, isn't it great? It's a bunch of sketches but before they wear out, they start the next one. And all the sketches are brilliant. Well, not all of them, the one with the thief wasn't so good, but then they get him off the set and on to the next one. Brilliant!
Meanwhile.... nothing will ever touch the true genius of "A bit of Fry and Laurie" — seriously, don't even go there — but The Fast Show gets pretty close at times. It's called the fast show because (a revolution in comedy at the time) the sketches are short and sweet. No lengthy build-ups here. Good ones come back in the next episodes, and they have a series of really hilarious steadies like the "brilliant" guy, who thinks everything is great, even the Nazis; Ted and Ralph, who aren't really funny, and a soccer newscaster who always goes off on a tangent about "boys in the park, jumpers for goalposts, eh?"

Most of the best characters are played by Paul Whitehouse so it's weird that I've never heard of him before. He's a bit of a chameleon. He appears in two of the attached pictures but every time, it's a different voice, a completely different look, different body language. He hasn't been in a lot of movies but even so I'd not be sure that I'd spot him.
Anyway, definitely a top pick. Here are some links. There are 3 seasons. There's also some specials out there somewhere.
UPDATE: ... but don't bother with season three. It's a dog.
I just spent a whole bunch of time sorting my tags. Because I have the best tag browser ever and so I'm having some fun going through and tagging my content and making my tags better now. For example, I had no rhyme or reason for uppercase, some were mixed-case, some were uppercase, some were lowercase. I decided to make them all lowercase.
So, a bunch of tags were renamed which will break links but too bad, backwards-compatibility is for losers. Also, I don't think people have really linked to my tags yet. But they will....
Anyway, I also added some new tags and went back and tagged a bunch more old posts too. Have a look at original/prediction (my "original work" making predictions about the future). Or how about computer/wi-fi (lots of developing world stuff in there...). Or how about just meta (navel gazing fun). Yum.
dailykos uses my graphic as the "open thread" image
Posted on September 10, 2006 at 12:00 PM
Categories: meta, art
I came up with this image yesterday when I was thinking about Disney's role in the fantasyland movie that ABC just broadcast (Disney owns ABC and apparently backed the film).

To be honest, I just like the colours. I always thought this was a cool logo. But anyways, no more Mr. Nice Guy or whatever. I had a look at the font on their original logo and it looks to me like Rockwell Light so I had a go in PhotoShop and changed "Pictures" to "Politics". Now Disney can put this up on the front of all their political propaganda pieces.
It didn't make much of a splash when I posted it in my diary so I figured it wasn't that good, but I guess that there really isn't any proper correlation between Recommendations and actual merit on DKos—at least in the "long tail" of non-superstar diarists. I think that has something to do with their horrible, horrible tagging browser.
Well now I've got an even better tag browser . In fact I think it's the coolest tag browser ever. It's better than the flickr tag browser and the technorati tag browser and amazingly, even then del.icio.us tag browser . And what is delicious for if not tag browsing. Well.
Anyway, I used a sort of crazy CSS-float-left thing to make the big and small boxes all go inline together. It would have made more sense to use inline-block but it's not supported in Mozilla yet (weird).
Also, you will note that this new browser really brings out the awesomeness of my two-level tagging scheme because now for the first time you can see how the levels work. And I'm discovering that maybe I have some duplication oops, and I'm also completely inconsistent in how I capitalize. Hmm. I might edit my tags (I suppose that's bad for google though, oh well).
Anyway, the big names in the filled-in boxes are the "categories" and the names in the small white boxes are the "tags"... some day I might allow to view just the tags but I'm not quite sure what that would mean.
Note to self: I should add some category browser on the left side there.
Linkdump: cousin Suzanne, "Me", Excel little graphs, The Grooming of the Woodside Man
Posted on August 28, 2006 at 12:00 PM
Categories: graphics, tv, links, unix, art
A bunch of links and things.
Ahree Lee created (or is creating?) an amazing short film. Starting in 2001 she started to take a picture of herself, every day, in the same pose. As of 2004, she created a short film called Me in which the images are flashed at you at the rate of about one week per second. If you want to download the film, you can use mplayer (like I did...) with something like this from your unix shell. (Note that the rtsp URL might change, you can get it from AtomFilms web page / View Source.) (Also note that I had to insert a backslash in front of the exclamation mark, probably inserted by atomfilms to foil script kiddies trying to use this method.) I think you could do some cool analysis of the images over time.
mplayer -dumpfile out.rm -dumpstream 'rtsp://shockreal.edgestreams.net/real.atomshockwave-secure_!/me_300.rm?auth=caEascHb6b7dRbpdudXcLbKdibBaHbDbbdP-be81D5-cOW-REAwJrGowGoHn3wlB&aifp=123&span=10800'

My cousin Suzanne Thoma finally has a website. She still sings but mostly she's now a freelance graphic designer. My opinion: website needs some work. I'm not sure that my parents would be able to navigate it.
How to create little bar charts inside the cells of an Excel spreadsheet looks useful and pretty easy to do. Generally speaking Excel's graphing sucks, and it looks like the Excel 12 graphs aren't going to get any better. Apple's iWord graphs are somewhat better but not perfect and some important graph types are missing.
Finally, let's hear it for art: The Grooming of the Woodside Man V1 by Simon Donikian and The Grooming of the Woodside Man V4 .
Enough for now...
I can't get enough of ravenblack quizzes!
Posted on August 19, 2006 at 12:00 PM
Categories: meta, links
I just can't get enough of these ravenblack.net quizzes! They're so awesome! The author is a genius!
Wait, the author is also really weird and has a RavenBlog !
While I'm here and screwing around, here's a Googlewhack: aquaplane wimax
Also, I'm redoing some fundamental bits of the XSLT that runs my site, so things might be a bit haywire for a few days.
Some links between Republicans and Vets for Freedom
Posted on August 16, 2006 at 12:00 PM
Categories: infographics
I was just reading this article on The Vets for Freedom faux grassroots movement . If there's one think that I don't like, it's astroturfing. See why at wikipedia . Especially political astroturfing, the worst kind.
The web of connections in the article is pretty confusing so I came up with this information graphic to try to untangle it a bit.

I have large versions in Some links between Republicans and Swift Vets and Vets for Freedom (PDF) suitable for printing at any size, and also bitmaps in PNG , and JPEG .
Keep an eye on this page and / or the blog generally, as I may update the infographic if more information becomes available.
It's licensed under creative commons CC-BY-SA , so if you want the original file (in OmniGraffle ) let me know.
I cross-posted this on sbwoodside's diary on DailyKos . If you want to comment, you can do so there (or just email me).
Imagining the Tenth Dimension is a cool, flash-animated information graphic. Unlike a lot of flash graphics, this one really needs to be animated, the movement really adds to the explanation power of the graphic.
After watching it, you're supposed to understand why "String Theory" has ten dimensions and what they are. In theory, anyway.
Customizing CSS with the Sympa Mailing List manager .. and CFH 416
Posted on August 01, 2006 at 12:00 PM
Categories: meta
I recently decided to customize the CSS style sheets on my Sympa mailing list manager -based semacode.org forums . It wasn't quite as easy as I think it should have been. The "instructions" in the Sympa docs are not exactly friendly. However after puzzling through it myself I found that it wasn't too hard. Here are the notes I made in the process.
set css_path in robot.conf e.g. css_path /var/www/lists.semacode.org/css #filesystem path css_url http://lists.semacode.org/css/ #fully-qualified URL! then set chmod the css directory, chmod a+rw so that sympa can change it then on "skins admin" page do "install static css" (static = not generated on the fly by tt2, I think) it will install style.css and some other .css files in the css directory then set the css directory back to whatever permissions you want it to have then modify the "static" css files however you like
...and there you have it. So far I haven't done much, just a little bit on the archives view . Ultimately I hope to steal all the good looks from projects like phpbb and others.
Also my next appearance on Call for Help should be in episode #416, whenever that airs.
I've thought before about putting in a two-level tagging system on my blog. I guess that it comes from that I'm dissatisfied with "tags" per se. They're just not rich enough. With a simple tagging system, it's hard to organize your tags into groups, for example, which to me is a big problem.
I'm not the only one to do something about this: see also tag bundles on del.icio.us , and also "meta tags" (which are tags about tags I guess).
I think that the common "solution" is to give mix tags together, so if you're talking about developing software on OS X you'd tag with "development", "software" and "OS X". But that's an implicit, not an explicit relationship. Also, designing a tag browser that lets you see which articles are tagged with all three of those tags is a hassle. Finally, there's no sense of hierarchy.
On the other hand, going to hard in the other direction (totally formal hierarchies) is also not viable in my opinion because it's too much work. You can get stuck with a specific hierarchy that doesn't always work (like in a library catalogue), or you can get confused by deranged mazes of hierarchical relationships (like Wikipedia's categories ).
This is a problem in software development too. I remember when working at Apple. NextStep always had a single-level namespace, which meant that each and every library and application class had to have a unique name. This is a really big hassle and so people wound up prefixing their class names with two uppercase letters in order to prevent collisions. So NSThis and NSThat were the names for "NextStep" classes (provided by the system), and your own app would be MAThis and MAThat (for "My App" ...). Then of course what if two people choose the same prefix. Or what if the name of the app changes, and your prefix becomes historical and a little spurious. (Like in OS X, all of the system classes still start with NS...)
Apple introduced a two-level namespace at some point in 2001 I think, which made the problem go away (although the NS prefix remains). I think that two-level systems are good. People can remember two levels of hierarchy very easily, it's a sort of natural relationship (like having a filesystem with files and folders but no sub-folders ... wouldn't that be simple??).
So I decided to put into place a two-level tagging system here in my blog. The "top level" tag is the category and the "second level" tag is the tag . Top level categories include links , original , and a big one: dev (for software development). You can see all the categories by clicking "Browse all tags" at the top to take you to the categories and tags browser .
There's a couple more things I want to do. One is to integrate the rest of the site into the system, so that any of the pages on the site can be tagged and included in an overall tags-based browser for the site.
Also I need to improve the UE a bit ... one thing is to have the ability to see a list of each category and its sub-tags. Also, I need a page-overflow paging type system to deal with huge pages like the one for the "dev" tag.
Here's a flash app that you can test your hearing , how high it goes at higher frequencies. Best to start at the top and then notice when you can start to hear something. For me, it's 18 000 Hz which is pretty good considering how bloody old I'm getting. How about you?
This all came from a shopkeeper in england who used high frequency sound to repel teens . Fascinating and clever idea.
Oh by the way, you need a decent set of speakers or headphones to do this, otherwise you can blame your crappy speakers :-)
What have we here? You guessed, some cheesy grainy videos from San Francisco. Let's start with the big one. It's Paul. Yup. And he's not aware he's being filmed. Hmm. Then, he realizes he's being filmed, and so he insults me.
Next I give you ... what was that?
Oh, it was a sea lion. Yawn.
Please note: Many crappier videos were deleted in the making of this blog.
A bit of torrent #3: SNL best of Will Ferrell
Posted on May 22, 2006 at 12:00 PM
Categories: tv, bittorrent
I've been watching a lot of torrents lately and frankly, a lot of it has been crap. Like this "Around the world in 80 treasures" show where the host is just insufferable (deleted). Also I've been watching these SNL best of shows and they're pretty good. This one is the best so far.
Go and grab the torrent from The Pirate Bay or view the IMDB page . Until next week, enjoy your A bit of torrent !
Does that seem like a lot to you? It seems like a lot to me.
Possible circumvention method for Apple's new iTunes 6 Music Store DRM
Posted on May 19, 2006 at 12:00 PM
Categories: theories
Apple uses a form of DRM with the iTunes Music Store . While I love iTMS, I can't stand the DRM. The files come down as .m4p files which are AAC with an Apple DRM system called Fairplay .
Now with iTunes prior to version 6.0 there was a great program called JHymn which would strip the DRM from all your iTMS song automagically. Cool! It was built on reverse-engineering work by DVD John and enhanced by other people. Unfortunately, Apple messed around with FairPlay in iTunes 6.0 and JHymn no longer decrypts it.
But wait—says I—I have an old Airport Express and it plays my encrypted music just fine! It was made a long time before iTunes 6.0 came out. Is it possible that the music is being transmitted over the WiFi connection unencrypted?
The AirPort Express contains a little computer that can translate mp3, AAC, and AIFF files into an analog output. I know that it only supports certain formats, because I have audio files in other formats that iTunes will play on my computer but not on my stereo. That means that the Express must contain hardware/software that understands AAC. But it would only understand the old Fairplay, not the new one.
That means that iTunes 6.0 is taking out the new DRM before it sends it over the air to the express. And that means it should be possible to write a program that finds that stream of unencryted data and read it back into an unencrypted AAC.
Useful resources for Ultimate (the disc sport...)
Posted on May 09, 2006 at 12:00 PM
Categories: (none)
I just promised my new team that I'd post some resources about playing Ultimate that I've collected so here they are.
Ultimate is a very cool sport but it's still fairly new (I didn't hear about it until about 1998) so I'd say that people are still developing the techniques and strategies. But there are some really good websites now that have animations and things like that describing the sport.
Start with the Ultimate Players Association which is the governing organization in the US. Then have a look at the Hamilton Ultimate Club (aka HUC) , the club that I play in. HUC uses the UPA rules, 10th edition , they might seem like a dry read, but if you want to know what is and what isn't, that's where to go. Some of the more interesting bits (and perhaps less understood) are the "Captain's Clause", "The Marker", and the "Continuation Rule".
Anyway, enough with that boring stuff. That's not why you came.
Probably the best guide to ultimate right now is the Ultimate Handbook . It's got photos from flickr but best of all... flash animations of all kinds of plays, and everything. He starts with some really good advice for beginners :
Learning to throw a disc can be SUPERFRUSTRATING. This prevents many people from playing ultimate. But everyone has to go through the learning process and everyone sucks at the start. Let’s get you past that before you decide to quit.
How true. It took me ages to get just my game backhand going. There seems to be some stuff missing though from the old ultimate Handbook, such as this cool guide to throwing in the presence of a mark which is something I personally find/found difficult sometimes.
Ultimate Skills by Tom Brennan and Jonathan Potts is also very good stuff. It takes you through everything from basic to advanced throwing, zone defences, and everything in between. With pictures and diagrams.
The nearby Toronto Ultimate Club has it's own strategy pages . Wikipedia also has a page on different ultimate throws . There are of course, some weblogs dedicated to Ultimate . And finally, a guide to all of the crazy ultimate lingo (like huck, pull, outside-in, etc etc).
Last but not least... what's this "frisbee" thing? It's a disc! And the sport is called ... Ultimate.
Concert band recordings from March 19, 2006 concert "Celebrities"
Posted on April 01, 2006 at 12:00 PM
Categories: music
...and here they are, finally, the first mp3 recordings of the McMaster Concert Band ever made public. Share and enjoy.
- 1. Celebration ... composed by Donald Coakley (3:56)
- 2. Soliloquy and Dance ... composed by Philip Parker (7:28) this is the good one*
- 3. The King of Love My Shepherd Is ... composed by Alfred Reed (4:50)
- 4. The Fisher Who Died in His Bed ... composed by John Herberman (11:08)
* This is the good one ... because it features graduate student David Free playing an extensive oboe solo. In fact it's basically an oboe concerto. Also, my cheap lavalier mic picked up the oboe quite nicely.
Program notes: (1) The Coakley is a fairly obscure Canadian composition. It hasn't been recorded very much. (2) Parker is a good one in this batch, because David rocks and because of the way I mic'ed the concert. (3) Reed's piece didn't come out to well because of the auto mic gain. (4) I like this piece, and I played crotales which you can occasionally hear cutting through.
Recording notes: Basically it's not a good recording. I did it with a wireless lav mic (Sony WCS-999) and my DV camcorder. It has 16bit 44 stereo but on the other hand, I couldn't turn off the automatic sound level. So there's major distortion on sudden loud passages and the dynamics don't come out at all. Finally, it was recorded in mono. All in all, given all the technical constraints I think it came out OK.
New camino concept drawing: Bookmarks browser with preview pane
Posted on March 31, 2006 at 12:00 PM
Categories: graphics, theories
I'm always super pissed off with the Camino bookmarks browser because I can't organize my bookmarks and view the pages at the same time. (Safari is no better.) In fact I was never happy about the transition from drawer to bookmarks panel but hey, what can you do. The drawer wasn't popular.
Anyway, here's a new idea which I think would make organizing my bookmarks a lot easier . I can never remember what all my bookmarks are for, and having a little preview would make it a lot easier to sort them out. So, with this floating around in my head somewhere I was pretty impressed with the "now playing" box in iTunes where you can see a live preview of video podcasts that you've downloaded.
So, here is a concept drawing of what Camino bookmarks browser would look like if it had a preview pane. Thoughts? Email me! sbwoodside@yahoo.com (my public/spammable email address).
Looking back at an old Camino interface thingy
Posted on March 30, 2006 at 12:00 PM
Categories: graphics, theories
I actually made up a design for a unified drawer design for the Camino browser, ages ago, which I thought was pretty cool at the time. Unfortunately at this time Camino was about to ditch the drawer (against my wishes). I don't browse full screen, and I think most people don't ... but I lost that argument.
This is one of my original concept drawings. The idea was to merge the HI for three things (bookmarks, history, and tabs (aka "sessions") into a single list. One part of this design which is still innovative is that the list of tabs (or "sessions") was universal to the whole app, and it didn't matter what window you looked at them in. I thought that was cool.
A later iteration took the merging a step farther. Note that this was drawn before tabbed browsing was invented!
Finally, a contribution from someone else (sorry, I have no record of who..) which clearly is a precursor to the Omniweb thumbnail tabs. I bet Omni ripped it off... They have the guts to make this kind of leap.
A bit of torrent #2: The Planets, a miniseries, by BBC and A&E
Posted on March 04, 2006 at 12:00 PM
Categories: tv, bittorrent
Last week on 'A bit of torrent'I brought you the torrents to A bit of Fry and Laurie' . This week let's explore something a little less funny and more educational. But good. But not funny. Well, occasionally it's a bit funny. In any case, it's The Planets' , a miniseries put together about seven years ago by the combined efforts of the BBC and A&E. ( IMDB , Wikipedia .)
The Planets takes you through the formation and present state of the Solar System that we call home.
Just remember that you're standing on a planet that's evolving
And revolving at nine hundred miles an hour,
That's orbiting at nineteen miles a second, so it's reckoned,
A sun that is the source of all our power.
You'll find out in the first two episodes all about the geology of the solar system — volcanoes on Io, geysers on Titan, the resurfacing of Venus about 500 million years ago. So sorry, Mr. Python, but the sun isn't the source of all our power.
What's good about The Planets? It's got amazing archive footage that I've never seen of space exploration. It presents images as they were seen through time, so your picture of each planet progresses from the dim blobs that they knew just 40 years ago to the detailed maps that we now have from fly-bys and orbiting explorers. The computer animation is also good, although a bit of a 90s plastic feel to the solid planets. And heavy on the particle effects, which were pretty novel at the time.
My biggest problem with this series is the totally lousy music. Unlike most BBC work this has an over-the-top orchestral score by a sub-par composer. It gets annoying sometimes.
But overall the visuals are amazing, the narration is solid, the footage is fascinating, and it's pretty thorough.
The best source I found was created by MVGroup — You can get it most easily from mininova . Here's The Planets episode 1 of 8, Different Worlds ... and here's All episodes of The Planets .
Till next time, bye bye.
I'm on an enforced work holiday which gives me lots of time to blog. So aside from a lot of work on the tagging system here at Simon Says , I've been going through old bookmarks and recent news as well. Here's a good one.
Camino (the best browser for OS X) reaches 1.0 :
The Camino Project is proud to announce the Camino 1.0 web browser, the culmination of four years of work by dedicated volunteers.
Designed exclusively for Mac OS X, Camino 1.0 is built on Mozilla’s Gecko rendering engine and offers one of the fastest browsing experiences available. The only browser available that combines the rendering power of Gecko with the Aqua user interface, Camino 1.0 offers superior integration with the Mac platform and a focused feature set. Among Camino’s signature features are elegant tabbed browsing, an enhanced bookmarks manager, and built-in ad-blocking.
I helped to write that announcement. Snappy eh? Anyway, my last major involvement was back in, er, let me consult my new tag browser ... 2004 when my history patch landed . I wrote a major improvement to the history panel, which was crap before that. It's still not perfect, but just after that I got awfully busy with Semacode.
However I was with the project during a rocky time in 2003/2004 when Apple launched Safari and it looked like the game might be up for Camino. But it's definitely not up. Camino is way better than Safari. It's faster, more attractive, renders better ... it's even more "mac-like" (however you want to say it). And the crowd now involved are clearly doing a good job. All around great news.
PS. The new website looks great . Also. I still administer the mailing list .
marquetry, ancient cylinder recordings, ISOC's undemocratic board
Posted on February 18, 2006 at 12:00 PM
Categories: art, theories

First up. Could marquetry be automated? It's the process of making very complex patterns with inlaid veneer wood . I've always though of veneer as being a bit cheap, because of all the veneer particleboard furniture you can get these days, but real wood veneer can actually have aesthetic purposes if you're mixing different kinds of woods. Or, you can use it to have a surface of some very high quality wood (like oak) which would expensive to get solid. And also destructive to the environment. So, question is, could you make a machine that could automatically do inlaid veneers on a production line? As complicated as these exhibited at the Getty?
Next. University of California at Santa Barbara. Party school? No doubt. But nonetheless their library has produced this fine online collection of ancient cylinder recordings from the turn of the 20th century. Voices out of the past. Too cool.

Finally. ISOC is the Internet Society , a non-profit organization based in the US chartered to uphold the principles of the internet. It's an organization that has a slightly bizarre history, like a lot of techie organizations that try to do something non-technical. Oh well. I want to draw your attention to the year 2001. Put yourself in Salt Lake City, Utah, December 8 and 9.
Prior to that year ISOC was a membership organization . Technically speaking that means that the members have ultimate control over what the organization does. (This is non-profit lingo.) But at that meeting, the Board of Trustees of ISOC decided to change the rules. Using a virtual majority vote they exercised their power to effectively eliminate membership oversight and put in place a self-perpetuating board . Which means that the board as of that meeting can now stay on the board basically forever and maintain control of the organization perpetually.
Now you can argue plenty that the board is well meaning but the Salt Lake City meeting minutes show that only one or two of the trustees seem to have been concerned about the change.
Another point of contention is the definition of the election or nomination to the board: Manuel points out that the proposed wording would in theory allow for a self perpetuating board. This is however mitigated by the term limit provisions of the bylaws, but Marty points out the term limits allow someone to serve on the Board for six out of every seven years, and therefore a group can control the ISOC Board almost in perpetuity by having Trustees take one year off after every two consecutive terms.
Marty's analysis is correct, by the way.
Another interesting point is that if you look at ISOC documents (bylaws, etc.) from before the Salt Lake City meeting, you can do that using the Wayback Machine at the awesome Internet Archive. According to the bylaws just prior to the S.L.C. meeting , the bylaws require that notice be given of proposed changes ... presumably so that people who are concerned can raise their voices. In this case, notice was not given . So, you can easily form the opinion that the change from a membership body to a self-perpetuating board was made in a slightly undemocratic way.
[UPDATE 2006-02-19: I was wrong about notice, because the bylaws don't actually require notice of the changes to be given to anyone but the Trustees. They were (apparently) given notice.]
You might well ask "who cares?" and I for one might not care all that much, because as people have pointed out, ISOC is doing good work. Right now. However it bothers me that this change was made and it seems that ISOC doesn't want to repair it. ISOC's Board claims that they are membership-driven, and operationally, they are ... for now. But what will happen in the future? Another Salt Lake City-style power grab? It's hard to say. And they are in charge of .ORG registrations because of their speaking-for-the-public cred.
What can you do about it? Well, start by complaining, the squeaky wheel gets the grease. Or considering running for the board on a reform platform. That's what I would do if I didn't hate travelling so much (they fly you to meetings around the world).
Lauds by Ron Nelson, on mp3 ... and all the rest of it too
Posted on January 28, 2006 at 12:00 PM
Categories: (none)
That's right, I have located an mp3 for Lauds . You can download it yourself from the Farragut High School band website: Lauds by Ron Nelson MP3 file . I'd say that the recording is a bit muddy but you can get the sense of what the song is all about. The Farragut band makes a fair number of errors. For me I've been having trouble with the crazy time changes and a bit of a tricky part on Vibraphone and Marimba.
The part also calls for Crotales at parts, and boy do they cut through! Since we don't have crotales, I switched to playing the vibes with brass mallets to get the same effect. I'm also playing at the very top of the range since crotales are written two octaves below their actual pitch. But I'm off the top on one note :-(
For Children's March by Percy Grainger, the Calgary Concert Band has an excerpt of Children's March that's neatly executed and quiet too (compared to our 100 piece band anyway...). It seems impossible to find a full recording of the piece, but here's another excerpt: Cornerstone University plays an excerpt of Children's March MP3 .
Next up in the repertoire - Shenandoah by Frank Tipeli. For you, I have a recording by the Austin Symphonic Band . It's not perfect but you can't have everything... Shenandoah MP3 .
There's one more, what is it? Oh yeah, Original Suite by Gordon Jacob. Not a difficult recording to find, this one. Popular piece. I'll give you a few. First, Duke University who put in a good show but the recording isn't so great ... echoey and remote. But you can tell it's a fine performance. Duke's Original Suite MP3 . And then as the last hurrah, here's the Rockford Wind Ensemble s take, neaty cut off in the middle: Rockford's Original Suite MP3 .
Welcome to 'A bit of torrent'.
This is where I'm going to give you a link to a bittorrent file and you're going to watch it because it's cool. First the basics. A bittorrent file is a very small file that 'points'to a very large file. So a little bitty file, like, say, abit.torrent can point to a huge movie or an album or whatever.
Let's say you want to download that big movie. Well, you don't. First you download the little torrent file. It 'points'you a bunch of other people and collectively, peer2peer (P2P) you will all very quickly download the file. So to review. (A) Get the torrent file. (B) Use it to get the big file. (You need this software ).
Of course first you need to find the torrent file (or as they say, the 'torrent'). Which is not so hard if you use a good torrent search site like The Pirate Bay or isoHunt . But the best part is to find obscure cool stuff, not the pop crap that everyone's looking at but the old good stuff you can't get on TV any more (or might not think of at least). And that's where 'A bit of torrent'comes in.
Each week, or actually whatever irregular interval I feel like, I'll post a link to a torrent that I like. If you want to watch it, then you can and you don't have to search around. I'm going to start with, and explain the name of this series with, a show called A bit of Fry and Laurie' .
IMDB :
Monty Python's footballing philosophers sketch is a good example of the painful varsity guff that has been a part of British TV and radio right up until today's 'League of Gentlemen'. It isn't what Fry and Laurie do at all. They plough a completely original furrow of snatched conversation, admass and inane banter that forms an impressionistic picture of the most baffling and frustrating 'bits'of the British experience.
Basically, Hugh Laurie and Stephen Fry (who appeared together in Wooster and Jeeves and are both in a fair number of movies and TV shows), do a comedy sketch show.
Hugh: Good evening and welcome to "Realizing I've Given The Wrong Directions To...". Tonight I shall be Realizing I've Given The Wrong Directions To Rabbi Michael Leibovitz. Sadly, Rabbi Leibovitz is unable to be with us tonight. Till next time, bye bye.
Well, here's the link you've been so patiently reading for. A Bit Of Fry & Laurie - Season 1 Torrent Link . Find the other seasons at digitaldistractions .
Till next time, bye bye.
So I was just putting the finishing touches on the beginning of my wikipedia article on the History of computer science , writing about that great wronged genius Alan Turing (wronged in his own time, not ours), when I was reminded of my "famous" math NEWS cover on the subject of Turing's machine .
The cover appeared in this 1999 issue of the magazine best known for profquotes. If you've never looked before, put on your sunglasses and maybe start with The Best of mathNEWS .
Does Wikimedia Commons take cartoons?
Got some band videos here. This first video is just a brief snippet of a typical practice. Up at the front there is Keith Kinder, conductor. I always call him Dr. Kinder. He's a good conductor - he spends time not just telling us what to do, but why to do it too.
As you can tell the sound quality on the 6630 is terrible. It's OK for recording people talking but can't handle music at all. On the other hand this phone is now about a year old and I expect that the newer models are quite a bit better. I'll have to get one soon I expect.
I don't know what that first song is, but it's a rehearsal and we're starting and stopping. It's a huge band—about 100 piece. You can see in the video the three—count them—bassoons. You don't see that very often.
This second video is a bit of some classic piece that I can't remember the name of. I didn't play in it anyway. So here's an art film through the slides of a bunch of trombones. The frontmost is Joe Biro.
I came up with these six conjectures about wikipedia one night. It kept me up. I'll admit that some of them are somewhat opaque to a casual reader. I might write some commentary later.
By the way—I have no idea if any of them are true.
Conjecture 1. That the distance between any two wikipedia pages, randomly chosen, as measured by wikilinks , is on average 6.
Conjecture 2. That wikipedia is sufficiently formal and complete that you could build a useful general purpose AI knowledge base using it.
Conjecture 3. That wikipedia has low information entropy .
Conjecture 4. That the development of a wikipedia article over time occurs in a manner consistent to the biological evolution of a species .
Conjecture 5. That the relationship between the amount of material in wikipedia and the number of article views is exponential .
Conjecture 6. That wikipedia is, on average, factually accurate .
Motivational questions:
- Social networks conform to the "six degrees of separation" principle. If wikipedia does, what does that say about its social roots / the way it's constructed?
- See Cyc and others. Is there enough formally coded information in wikipedia? What about the semantic relationship between the source sentence containing a link and the summary of the linked article?
- What does "low entropy" mean anyway? More structured? Simpler? More redundant? More readable? What about the entropy across wikilinks?
- Does an article behave like DNA?
- Can we "prove" Reed's law? How do you measure the size of the content?
- Is it accurate more than average? Can you predict the accuracy of an article?
Mr Seagull here was hanging out on the lakefront of Toronto (sadly cut off from mainland by the Gardiner Expressway...) on the same day that I was. So, I made a little movie with my camera phone.
Voice in the background is Bertie talking to his wife back in England.
Mac Band - Divertimento by Roger Cichy (+ MP3s)
Posted on November 12, 2005 at 12:00 PM
Categories: music
So another concert band season is upon us (I play percussion )... and so it's time to go through the old repertoire and mine the internet for publicly available MP3s and recordings.
The only song I'm actually playing for this round (concert in a few weeks) is Divertimento for Winds and Percussion by Roger Cichy. Various people note that the song is supposed to be "jazzy", and this description of the song comes from his faculty page at Providence college :
In 1994, he was commissioned by the Des Moines Symphony for an orchestral work. The resulting composition, Divertimento for Strings, Winds and Percussion, was later transcribed for wind band and has received numerous performances from premiere college and professional wind bands in the U.S. The work has been released on a 1995 recording by the North Texas Wind Symphony, conducted by Eugene Corporan, on the Klavier label.
I don't have the Klavier recording (although presumably the estimable Dr. Keith Kinder (no home page...) does). So here I present some recordings I've found online, all of which are perfectly legal for you to download and listen to.
- The best one comes from the University of Maine Symphonic Band - unfortunately they only recorded movement III and movement IV . Still, it's pretty good stuff. And it sounds like with a few minor exceptions I'm playing the snare the same way they do. Which is always nice. In fact their snare drags a bit sometimes ;-)
- Next up is Rutgers University Orchestra but they only provide just a bit of movement I . Still, sounds good.
- Rochester "River Campus" gives us a very brash movement II (although they fall apart for a few bars near the end).
- And finally, I'll throw in a slighly less high-quality set from Norwell high school in the states - II , III , and IV .
Enjoy.
Some bookmarks are just too good to keep to myself. The Canadian Architect and Builder is an online archive of fully-scanned images of this journal, published between 1888 and 1908. They've got some really beautiful drawings. Run, do not walk, to the "plates" ... the rest is text & ads, which I find a bit dull. But the pictures rock. Especially if you then go and google for the buildings and see what they look like today vs. 100 years ago.
My CLEVER little blog now has a better tag browser , more like the one you are used to seeing in flickr and so on. Also the tag browser is finally fixed so that it actually displays all of the tags that I've used... the previous one had a little bug in it, which I will totally blame on the XSLT FAQ s article on Grouping which completely didn't work for me in this case. And their technique made no sense.
Will I ever release my siteware as open source? It could happen.. I won't say I'm not unmoved by gifts of small and valuable precious stones. Actually, I really ought to just do it. Bleh.
And finally, I still need to go through and tag some more actually.. but what I'm thinking of doing now is tagging the whole site and making RSS available for the whole site as well.
The Eden Project is a multi-biome park in England somewhere where they've built these amazing huge greenhouses for visitors using a transparent material called ETFE foil. It's a transparent polymer that's used as an architectural membrane in some new structures (although one's been around for at least 20 years) and it's tough and much, much lighter than glass. What they do is make a multi-layer pillow of the stuff and inflate it with air in the middle to give it a convex shape and good insulation properties.
I found an interesting mailing list called Greenbuilding; here are the Greenbuilding archives .
A useful concept in designing an efficient building is to know about embodied energy . The embodied energy of a material is the total amount of energy needed to create it and deliver it to you—extraction from the ground of raw material, cost of production, cost of delivery. You can use a higher embodied energy material if your building will last longer or if it will give you better efficiency in other ways (such as ongoing power costs).
Oliver Byrne's amazing information graphics
Posted on October 20, 2005 at 12:00 PM
Categories: infographics
Oliver Byrne ("Surveyor of Her Majesty's settlements in the Falkland Islands and author of numerous mathematical works") made a masterpiece of information graphics in 1847, giving forth the Elements of Euclid in a visual format.
You can see the whole entire thing (OK, actually just the first 6 books, but isn't that enough?) at the University of British Columbia s Oliver Byrne's edition of Euclid site. The pictures are very cool.
I was just reading Larry Borsato's blog (from seeing the Communitech Chapter 3 blog ...) and I saw his post about jargon . Jargon actually does have a useful function as culture. For example, recently I've been writing a business plan for my company and I've had to learn some new words, like valuation. Valuation is a bit of a jargon word since it really means the appraised price. The person on the street knows what "appraised price" means but not "valuation" ... but that's actually valuable because it's a cultural clue. If I go up to someone and start talking about valuations it tells them that I know about business culture, VC culture, and whatever.
The same thing goes for social culture... if I start talking about chavs to someone, they would probably assume I'm british (I'm not but I think it's a funny word).
There's also another strictly practical use. If I type "valuation" or some other jargon-term into google, I will restrict the field of the search to the cultural context I'm interested in, in this case, business planning, VCs, M&A, etc. If I put in "appraised price" or even "value" I would get something different.
What do you get when you mix HTML, CSS, Javascript, Asynchronous Javascript, a web server, a web browser, interprocess communication, and native application views?
I was on "vacation" during August. I only got to have 5 days of "real" vacation because some stuff cropped up for work but I did do some sort of recreational programming. And I had this idea that seemed like a good idea, and my programmer buddies didn't immediately shoot it down as being completely stupid, so, I did up a demonstration in Objective-C and it's called Bottlenose.
Bottlenose is a way to enable graphic designers, and HTML/CSS/Javascript designers, to directly create the interface for a native application. Where a "native application" is something that runs right on the computer, like a work processor (not a web app, ASP, or applet).
I might have used pure java but (a) there's no good web browser API available for free and (b) Apple's WebKit is sooo easy to use and well documented. But still - Bottlenose could easily be ported to other platforms. In fact, I want to see it especially on Linux. Because I think that on Linux it could make a big improvement in the UIs if the graphics people could write it themselves. That is, after all, the Linux philosophy.
Anyway, I have this idea of running a contest to develop UIs for the demo that are better than the one I made. I'll probably even throw in a valuable prize of some sort (some books?) for the winner, and post all of the good entries.
If you have any comments at all, or think it's a good/bad idea, feel free to contact me .
The blog finally has a name. It's CLEVER. Now when you refer to my blog, you can say, "as written on CLEVER", or "on CLEVER (by Simon Woodside)" or if you like, "on Simon Woodside's CLEVER blog" ;-)
I always resisted giving the blog a name before partly because I thought it was pretentious, but partly because I couldn't detect a strong theme to base it on. Then not too long ago I realized that a blog really should have it's own name. "So-and-so's blog" just doesn't cut it. So I started thinking again ... anyway, I decided that at least all of the things I write about are in fact clever, even if I didn't creat them myself.
For a list of topics, you can check out the index of tags by the way.
On another note, I also realized that this web site is almost 10 years old. Time flies. (My god... the blog is just over 5!)
Ewan Spence has an awesome podcast: The Edinburgh Fringe 2005 Show with MacHomer . MacHomer is this crazy guy who does impersonation of all the Simpsons characters talking about a production of MacBeth. It's hilarious. Ewan does a really good interview.
Actually this is the first podcast I've listened to that's good I think... the other ones I've listened always seem pompous and self-important.
And the MacHomer guy is Canadian :-)
OK, as a public service I'll see if I can find any online sources for the actual MacHomer show...
- Want to hear some of MacHomer's interesting voices?
- damn! that's all I can find. someone bootleg this sucker!
Look at this magnificient parrot - wonderful plumage!
I captured it on digital film at the local bird sanctuary. It seems to have a clipped tail. I assume that it sustained some injury but what do I know. Anyway, this particular parrot gets a lot more interesting around dusk when it likes to talk. It knows how to say Hello and lots of interesting whistles.
I tried to edit the video with Quicktime Pro but the transcoding really ruined the quality. Next time I'll try editing it on the phone which might give a better quality if it avoids transcoding . Also I discovered that the 3GPP video standard produces videos with an 11:9 aspect ratio which is a bit bizarre (normal TV is 4:3).
For once I agree with Cory Doctorow - Apple's DRM is no good
Posted on August 02, 2005 at 12:00 PM
Categories: mac
Cory dumps on Apple's decision to use Hardware DRM in OS X . Cory is smart but sometimes I think he's dead wrong about stuff. OK, mobile phones and mobile computing specifically. But I have to say that I share his dislike of Apple's move to hardware DRM in the official developer version of OS X on Intel. It's nasty. It's not right. It shouldn't be done.
Basically, if Apple releases new Macs with hardware DRM I will have to seriously consider switching to Linux. I just can't handle the idea that someone else gets to decide if I can use my computer and what I can do with it. What I install on it, what applications I get to run, and which I don't. It's my machine.
My prediction is that Apple WILL ship with some form of Hardware DRM. My HOPE is that it won't work. If it doesn't work, I suppose I'll buy it and disable the DRM.
If it does work? I don't know. That will be not good.
The problem is of course that I love using the Mac. Apple makes great products. Even the good OSS software that I use - like VLC and Sympa - doesn't have the high quality interface that Apple provides.
On the other hand, it might be the kick in the ass that OSS needs to get with it and put together quality interface.
Damn. Well, I'm glad at least that I'm not actually working on Marklar any more, and I don't have to feel like I'm part of this machine that's destroying the world.
Buckminster Fuller's dymaxion map of the world
Posted on August 01, 2005 at 12:00 PM
Categories: links, infographics
Buckminster Fuller was obsessed with this word "dymaxion" which I think was supposed to be a combination of "dynamic" and "maximum". He created this "dymaxion map" of the world which was intended to have the least possible distortion of the shape of the land features. Have a good look at it.
One thing that's interesting about it I think is that Africa is really much bigger than North America. The "usual" map projection (Mercator) is really terrible because it totally accentuates the size of land masses that are close to the poles. So that N.A., Europe, and Australia are all way too big. Here you can see the truth.
Another interesting discovery for me is the small size of India. I always thought that India was a bit bigger than that. The arctic is also rather small. The Himalaya is very prominent. And I like the curving shape of the islands from Alaska down the eastern side of Asia.
You can also see how the continents all seem to almost be connected into one big island surrounded by water.
The funny shape of the map is because it's designed to be folded up into a roughly spherical shape. Here's an amazing animation of the dymaxion map folding and unfolding .
And here's the Buckminster Fuller FAQ .
More flickr embedding, this time using the flickr badge
Posted on July 29, 2005 at 12:00 PM
Categories: (none)
So actually the flickr badge code is pretty flexible. More than I realized before. I think It's better than the flash thing I tried before . Here I will embed 10 random pictures from my trip to barcelona.
You can click on them and go to the flickr page for the photo.
And here's the code.
And here's some more information about those options. You embed the options as URL query parameters.
- count=8 // or any other number
- size={s,t,m} // square, thumbnail, mid-size
- layout={v,h,x} // vertical, horizontal, none
- user={#} // e.g. 20938094%40N00 for me
- source={user_tag, user_set} // maybe other options
If you set source to user_tag then you need to specify
- tag=barcelona // or some other tag
If you set source to user_set then you need to give
- set={#} // e.g. 261728 for my barcelona set
For the CSS portion, they give you all kinds of extraneous CSS when you use the badge generator that you don't need. Just set whatever you want for div.flickr_badge_image at a minimum.
In order to discover the exact formatting and CSS classes and everything, you can open the URL for the script in your browser, and then look at the source. here's mine for this particular example .
Well, ok, maybe it's not amazing. But it exists. I wish I could do all this through flickr but I can't because they suck and don't handle 3gp video. Not that I really blame them since it's still really blurry and stuff, but hey, it moves and you can hear stuff. Anyway I just implemented a way to throw these videos into my blog and pages much more easily (using the power of XSLT) so here are two that I took this last Sunday.
Steve and I went for a little walk and we saw this kick ass monarch. here's a photo of it getting away . And here is a video I made when I saw it with my trusty Nokia 6630. It tried to get away, but then it came back.
Later on at the university we saw a hawk or something. Probably a red-tailed hawk since they're pretty common around here. It was too far away to get a good photo but I have this video of Steve climbing illegally anyway.
Some interesting flickr keyword searches (or tags whatever)
Posted on July 25, 2005 at 12:00 PM
Categories: links
Just though of looking at some interesting words in flickr. I just saw some persons blog where they were talking about the power of words. Well, I'm a person with a fairly large vocabulary. Not that I deliberately use pedantic words (like in monty python:
[customer] I was just sitting the local library reading ... by Hugh Walpole when I came over all peckish [shopkeeper] Peckish sir? [c] esurient [s] eh? [c] eeoooungrylike [s] ahhh... hungry [c] precisely. And so I curtailed my walpoling activities and sallied forth to infiltrate your place of purvayance in order to negotiate the vending of some cheesy comestibles. [s] come again sir? [c] [very clearly] I want to buy some cheese.
So anyway... I decided to search for "symbol" since I'm so interested in the visual representation of information.
All flickr images tagged with "symbol"
"logo" might be worth looking at in more detail
"symbology" anyone? (people love to complexify words...)
Hmm... not as satisfying a search as I thought it might be.
I made this video of a squirrel a while back. Actually Ming was on the phone at the time. It was June 4, 2005, and I was wandering around the harbour area.
If only flickr supported 3gp videos then I wouldn't have to mess around with my own infrastructure for showing these things. But anyway, view the source to see how it's done ... it's not that hard if you put in the magic formula and sacrifice a few chickens.
I'm testing the use of an iframe to embed a flickr photo slideshow into the weblog.
[update 2005/07/24 - click on the picture to switch into a much more informative mode, and you can continue to browse by moving your mouse either to the top or the bottom. I haven't figured out how to start it in that mode yet though.]
The code is:
You'll have to substitute your own user_id and "tags" in there. Apparently you can also use nsid=", "text=", "tag_mode=", "favorites=", "group_id=", "contacts=" "frifam=", "single=", "firstIndex=" and "firstId="
I decided to revisit the mobile CSS situation today. It's actually pretty good. HTML Dog has a pretty good update as the to the situation but I'll summarize it for you.
Basically CSS comes with so-called media types which include all, screen, print, handheld and some others that presently aren't probably worth bothering about. I've already been using the print thing as you can tell if you have a recent browser and you do a print preview of this page. The styling is quite different from the screen version. It's pretty easy to do, just look at the source of this page, you just define a print.css and a screen.css and then, in each one, @include common.css which would contain basic character styling and colours that are used in all the medias.
So the point here is handheld media type, if supported correctly in the mobile browsers, can be used the same way. Is it supported correctly? Yet? Well, the test page http://htmldog.com/test/handheld.html will tell you - just point your phone browser at it. The CORRECT answer SHOULD be, "no" for the screen ones and "yes" for the handheld ones.
My Nokia 6630 incorrectly ignores all the styles. My Sony-Ericsson S710a correctly ignores the screen styles and uses the handheld styles. Yay SE.
Also notice that if you grab the Opera web browser, View menu, Small Screen, you can see the correct result as well.
So, using that I've set up a few things.
- Repeat the page title at the top of the page - useful because a lot of phone browsers don't show the full
titleon the screen - Hide a lot of the bling, like the banner, the footer - keep from spamming the small screens. I do this by defining
div#footer { display: none; }and so on in the handheld.css file - Add a "Skip navigation" link at the top of the page - add an anchor
#contentboxlink at the top of the page that only shows up in the mobile version of the page - this is so that people don't always have to scroll down every new page
That's about it for now. My pages are already really lightweight in terms of KBs and I assume the phone browsers don't bother loading images that are hidden by CSS. So the result is an HTML + CSS solution that doesn't require any browser detection, rewriting any of your pages, or server-side junk.
This thrillingly exciting unix tool also has a great page about it, Sed - An Introduction and Tutorial . It starts with "The Awful Truth about sed" which is simple ... "the documentation is terrible".
Well I changed my mind and decided to call my categories "tags" after all. Just seems to make more sense. On the other hand, my siteware allows me to use multi-word tags.
Well, it's been a long time, but I finally added categories to my blog software. You'll notice the category browser up there at the top. Also, each entry that has a category indicated will list them at the bottom in [square brackets]. So you can for example view all my posts on the subject of Apple . Or whatever.
For a long time I was wondering how to implement this. One thing is the whole keywords vs. categories thing. Well, keywords (aka tags) are just ONE WORD whereas categories (aka key phrases) are, well, multiple words allowed.
The problem with tags, which I think you can see on flickr and del.icio.us is that sometimes one word just isn't enough. For example now that J2ME is called "Java ME" (which is better than J2ME since I'm always like, what's the 2 for?). But if I tag something with "java ME" then I'm going to get TWO tags.
OK, sure, you could build some kind of tag-combination system or a search interface or what have you, but none of them have, and it sounds like a bit of a tough problem. So, I'm not going to go that route.
However I do have a vaguely in mind idea that I might try to add tags or categories or WHATEVER to the whole site, maybe using RDF or at least exporting RDF or RSS or something like that. Like making the whole site semantic in some way.
Oh yeah, one more thing, entry titles are back on the title of individual entry pages, which I lost when I did the weblog upgrade a little while ago, but now I have it back. Important stuff for google searches!
Follow das link, below, to learn why Manhattan is ultra green. Here's the first two paragraphs of the monograph. Got this from Veritas et Venustas a blog about smart growth and, if you want, US baseball.
My wife and I got married right out of college, in 1978. We were young and naive and unashamedly idealistic, and we decided to make our first home in a utopian environmentalist community in New York State. For seven years, we lived, quite contentedly, in circumstances that would strike most Americans as austere in the extreme: our living space measured just seven hundred square feet, and we didn't have a dishwasher, a garbage disposal, a lawn, or a car. We did our grocery shopping on foot, and when we needed to travel longer distances we used public transportation. Because space at home was scarce, we seldom acquired new possessions of significant size. Our electric bills worked out to about a dollar a day.
The utopian community was Manhattan. (Our apartment was on Sixty-ninth Street, between Second and Third.) Most Americans, including most New Yorkers, think of New York City as an ecological nightmare, a wasteland of concrete and garbage and diesel fumes and traffic jams, but in comparison with the rest of America it's a model of environmental responsibility. By the most significant measures, New York is the greenest community in the United States, and one of the greenest cities in the world. The most devastating damage humans have done to the environment has arisen from the heedless burning of fossil fuels, a category in which New Yorkers are practically prehistoric. The average Manhattanite consumes gasoline at a rate that the country as a whole hasn't matched since the mid-nineteen-twenties, when the most widely owned car in the United States was the Ford Model T. Eighty-two per cent of Manhattan residents travel to work by public transit, by bicycle, or on foot. That's ten times the rate for Americans in general, and eight times the rate for residents of Los Angeles County. New York City is more populous than all but eleven states; if it were granted statehood, it would rank fifty-first in per-capita energy use.
mailman RSS, and virtual hosts on localhost
Posted on June 21, 2005 at 12:00 PM
Categories: links, unix
In 2003, on the W3C www-rdf-interest mailing list, Dan Brickley wrote :
I just stumbled across this after an #rdfig discussion about adding RSS support to Mailman, the popular list management and HTML archiving package. Turns out the patch exists already (but wasn't intergrated yet). It took me less than 10 minutes to patch my Mailman installation and rebuild the archives for rdfweb-dev. I now have http://rdfweb.org/pipermail/rdfweb-dev/rss.xml generated automatically. See http://rdfig.xmlhack.com/2003/02/09/2003-02-09.html#1044813421.381747 for the (trivial to apply) patch and related info. Just cd into the Mailman/Archiver/ directory and do 'patch < ~danbri/rss.patch' or whatever, then re-run bin/arch on your archives. The markup exported is fairly basic, but sets things up nicely for future extensions—you could add in richer descriptions of the mailing lists fairly easily, though I'm not sure how best one would hook such information up to Mailman's www-based frontend.
Well, I can attest that it really is (still) that easy. Get the latest patch from the bug tracker - right now it's here . OK, the patch isn't perfect - you have to remove the mail headers at the top, and the file Defaults.py.in should be actually applied to Defaults.py . But aside from that it works really, really well.
The other thing I wanted to note is this article on ONLamp.com: Simplify Your Life with Apache Virtual Hosts because it explains how to set up virtual hosts on your home/development box. The trick is to edit /etc/hosts I guess.
It seems that AWStats is without a doubt the best stats package out there these days. And you can get it easily enough on debian with apt-get. But it still requires a bit of configuration. Here's what I've done so far.
First I have a number of virtual hosts so that I made a copy of /etc/awstats/awstats.conf to /etc/awstats/awstats.semacode.org.conf which is the blessed name for each virtual host. In that new conf file you need to have:
LogFile="/var/log/apache/access.log"LogFormat = 1- this is important because Sarge comes with apache configured to thecombinedsetting at least in my recently-made fresh install.SiteDomain="semacode.org"
Now, apt-get will already have installed a cron job for you, but you need to make sure it's working because it won't complain if it's broke. So do this: sudo /usr/lib/cgi-bin/awstats.pl -config=semacode.org and it will complain if there's anything wrong.
Finally you will need to add the following line to your httpd.conf file: Alias /awstats-icon "/usr/share/awstats/icon/" .
I also am going to add password protection to my awstats page so that the general public can't access it. Partly because it could be a security concern, but mainly because it's slooooow.
There is one good online CVS guide and manual, and it's this one: Open Source Development With CVS . It's also a real book, and although the version I'm pointing you to may well be not the latest edition, it's still really, really good.
Ming took these nifty pictures of his daily trip to EPFL, the university in Switzerland where he's doing a PhD.
RSS went away there for a while. I think that when I changed my back-end of the weblog a few months ago I broke RSS and never fixed it. Then forgot. So now I fixed it. But actually I don't know how, well, actually I did make this one change. Well.
Anyway, the link should be at the top of the Weblog page and here: RSS feed for Simon Woodside's What's New? weblog
Metro WiFi and Converged Phones slides
Posted on June 14, 2005 at 12:00 PM
Categories: meta, wifi, mobile
For my talk today, the slides are available . Lots of pretty pictures! I didn't do the three about WiMAX, WiFi mesh and WiFi though.
Downtime... I know... I'll talk about it later.
TELL THE WORLD! I was Mr. Marklar
Posted on June 06, 2005 at 12:00 PM
Categories: tech, meta, code, mac
OK, I've been waiting for four long, long years to tell you this. My "Secret Project" at Apple was Marklar aka OS X on x86, finally announced today! I'm not going to say today whether I think it's a good idea or a bad idea, or what, but I will say this. In 2001, my job at Apple was Program Manager for the Marklar project. When I started, Marklar was relatively moribund, being nursed by a handful of Core OS engineers. Lots and lots of new code had been introduced in OS X from the old Mac side, and new code written, since the last release of Rhapsody worked on Intel.
My job was to get the system working on x86 again and that's what I did. I traced dependencies like there was no tomorrow. I worked with engineers in a dozen different divisions, each time making first contact with the division manager, then finding just the right person for the job. Each time the same drill: "I'm going to tell you about a project that is Need To Know only. You can't tell anyone about this, even inside Apple. I'm not even going to tell you everything, just the minimum that you need to know in order for us to continue. If you're wondering who the hell I am and why you should listen to me, ask you manager who will just tell you to do it."
I went on leave in fall 2001 after the WTC thing, but by the time I left the Marklar team gave a demo to something like the top 100 managers of the company with a working Marklar system complete with Finder running and a whole range of apps. I kicked ass!
Obviously such an important part of my professional history, but until TODAY I haven't been allowed to breathe a word. A very SENSITIVE project, of all sensitive projects! But now, tell everyone, tell your friends!
WSIS: civil society vs. the government of Tunisia
Posted on June 05, 2005 at 12:00 PM
Categories: theories, internet
Choosing Tunisia for the 2nd phase of the ITU World Summit on the Information Society ... good move? or not?
Well, you can argue that since the other side of the digital divide definitely lives in Tunis, among other places, it's good principle to hold the summit there. There is, however, one slight disadvantage. Tunisia has a less-than-optimal record on Human Rights . In particular the government engages in internet filtering (like China) (apparently they use SmartFilter ) and has a terrible record on free expression .
Whether or not that means WSIS is a waste of time or a negative thing I'm not sure. The first WSIS was most interesting as a struggle for the civil society to claw their way into place amongst the governments and organizations. Now the 2nd one might wind up being dominated by the theme of a free internet. That might not necessarily be a bad thing.
Engadget has a good story on this new linux gadget . The question really is, why the hell did Nokia release this thing? (For a contrarian point of view, which I haven't read yet, see this PC Mag article .)
I'm inclined to think that Nokia is generally speaking on the right track these days. The Nokia N-Series , despite the horrific flash on that page, looks really, really solid. They seem to have settled on a design aesthetic that's actually pleasing again - witness the Nokia 8800 . Their open development platform strategy with Series 60 is a definitely winner.
So, the new device. It's a small tablet-style device with a substantial screen (800x480) suitable for watching TV and movies on, and surfing the web. It's got Wi-Fi and bluetooth. NB: no phone! It's got 128 MB RAM but only 64 MB flash card. It runs linux! And not only that but the whole OS, dev kit included is GPL top to bottom, and Nokia seems keen to make this into a real open source community process.
So, that's a pretty different set of specs from any other Nokia offering. It actually looks a bit more like something Apple would make.
So why is Nokia doing this? Speculation follows.
First there's the ambition angle. They want to be more than a mobile phone maker. They're breaking out into new markets. So, they leverage their ability to make clever small hardware. It's a bit odd they would choose this particular niche to move into though, because it's not a game device (PSP) and it doesn't have a hard drive (iPod) so it doesn't really seem to compete with any existing products.
They might be doing it to push forward open platforms . I think that Nokia is pretty seriously committed at this point to be pro-open and anti- walled garden . Which is good for us, whether by "us" you think I mean consumers or developers.
But the reason i think they're really doing it is a power play against the operators . One of the major underlying stories of the mobile phone arena is the power struggle between operators and manufacturers. Both want to have all the customer loyalty and make all the decisions about what goes on and in the phones. Each one has their own revenue needs which conflict, because manufacturers don't care about ARPU and carriers do.
Now, consider the Nokia N91 . I recently wrote a blog entry about Wi-Fi wireless VoIP cell phones and as it turns out (thanks Chris ;-) the Nokia N91 does everything that I asked for there. Who knew? There is of course one small problem, which is that the operators are none-too-pleased about the prospect of people stealing their ARPU by using wVoIP on home, office, and municipal Wi-Fi.
So how does that affect Nokia again? Oh yeah - they have to avoid getting slapped in the face like Apple and Motorola over the iTunes phone. If the operators feel too threatened by the N91 with both Wi-Fi, cellular, and also incidentally Skype ... which they should! Well, then, they might refuse to carry the N91. And that would be a Bad Thing.
To finally get to the point, by releasing a completely non-cellular Wi-Fi convergence 770, Nokia can make the carriers look stupid if they don't pick up the N91. Because they'll still be selling a Wi-Fi device that has Skype or whatever on it, just not through the carriers.
From Darwin to Dawkins: the science and implications of animal sentience
Posted on May 26, 2005 at 12:00 PM
Categories: theories
It was a conference held in March in London. Subject: Animal intelligence. Obviously (if you've been reading this blog) you know that it's a subject of great interest to me, particularly information entropy , or more generally, information theory . But I was concerned when I read this:
that the burden of proof should not be on those trying to prove the sentience of animals, but rather on those seeking to disprove it!
I have to say that I totally disagree with this. I'm not an "animal rights" person although I believe that animals should not be abused (and I prefer free-range meat). But I think that it's more than likely that MOST animals are not conscious, which is a good definition of sentience in my opinion.
Another way to look at it is that in order to understand and communicate with animals, we must work at it. And that would be a key step in proving that animals (or certain animals anyway) are sentient.
It really bothers me when people argue for protecting animals, or for animal intelligence, from an emotional level. What I want is scientific evidence and useful tools to communicate with them.
And of course, I think that engaging in this exercise will be very helpful in SETI .
Massive Change is a web site + travelling museum exhibit (currently in Toronto!) about ... well ...
They say it's the Future of Global Design but a lot of what's in there I wouldn't say falls under design. They talk for example about dealing with internalization in manufacturing and they also take a walk through the light spectrum and what different kinds of images are good for. The whole thing is very scientific.
More to the point, while it at first appears superficial, it rewards a deep look at any of the subjects.
It's so true .......
The best looking code I ever worked on was the BSD code from Mac OS X. Now that's what I call clean crisp code. OK, so the variable names were a bit cryptic, but they could be decoded once you got the hang of it (they were all very short..). The BSD people I've found out since are known wonks for good clean code.
These guys at Artima are pretty sharp. They're serious code geeks. I think they've talked a lot about refactoring, and if there's one new thing you've learned about coding in the 00's it's what is and how to refactor.
Google doesn't seem to be able to find these mailing list archives, so...
- axkit-dev mailing list archive - the only up-to-date archive of axkit-dev@xml.apache.org that I can find.
- axkit-users mailing list archive - this seems to be the best archive of axkit-users@axkit.org. There are others - the official one would be here but it never seems to be up to date at all.
CG people getting really really close to photoreal still people
Posted on May 05, 2005 at 12:00 PM
Categories: (none)
Follow the link to see what I mean. UPDATE: this is a computer graphic image, not a photograph!
watch out for wireless VoIP (...nokia)
Posted on May 02, 2005 at 12:00 PM
Categories: theories, wifi, mobile
Witness the first mobile phone + wVoIP . This is a mobile phone with two radios, one for GSM and the other for Wi-Fi. So when you're in a Wi-Fi hotspot, you Skype. When not, you cell. It's brilliant.
The slight problem is that mobile operators are not going to like this too much. You see, it means that when people are at home especially, and also at work, and maybe at the coffee shop, they're not going to be paying for airtime.
But so what? The technology is so compelling that the public is going to be kicking and screaming until they get it. In case you're not up to speed yet, wireless VoIP is internet telephony that runs over a Wi-Fi style network. It's also know as wVoIP and Voice over Wireless LAN (VoWLAN... keep up the crazy acronym work, people).
Now so far Microsoft looks like it's doing very poorly in the mobile arena. But, they seem to be the leading OS for Wi-Fi enabled cell phones. And there's already a not insignificant number of Pocket PC style devices that are being used for wVoIP, even if they don't have cellular yet. And you should note that this first phone, jointly developed by Skype and some tiny manufacturer called i-mate, runs... Windows Mobile.
I certainly that Nokia et al get in gear on this one, no matter how unpopular it might seem with the operators. Because otherwise they might let microsoft out of the cage that it's been so cleverly manoeuvred into.
(Some notes... of course it's already being done in Japan . And check out this announcement: Orange to offer 3G, Wi-Fi palmtop smart phone again running .... Windows Mobile.)
The official simonwoodside.com server, froodily hosted by Paul Schreiber went down at 2005/04/26 at 9:30 PM (Eastern) and came back up at 2005/04/28 at 12:40 PM, after which time the web server was still not responding for some hours. Paul is travelling and anyway he lives in California while the server is in Toronto, so there's always a bit of lag time when it needs to be physically rebooted.
On the 27th I started to change over semacode.org to be hosted by a commercial hosting company. I chose Net Direct which is more of a linux consulting shop but I met their CTO, John van Ostrand, at a Communitech event and was impressed by his knowledge of Linux and languages. I'm not keen to be my own sysadmin or manage my own hardware, but I run a bit of an unusual web server because of AxKit. So having a technically profient organization that's prepared to handle some rather unusual configuration requirements is I think a big advantage.
So, at the moment semacode.org is running temporarily on netdirect's regular server space. It's just a static mirror of the site that I generated from my powerbook. Because of that there's a few issues and I can't update the weblog (for example) as easily as normal. Hopefully over the next week we'll get a new dedicated server up and running and everything will be back to normal but much more reliable!
(Based on the last few years, Paul's server gives about 98-99% availability which means, practically speaking, 3-6 days of downtime a year. It's OK for my personal site but not really good enough for a commercial server.)
OK, I'm tired and I still haven't really started digging into my email pile, so here's my prediction of the hour. Push To Talk on mobile phones will never be popular. Mobile operators seem to want this to happen, but it's not going to. It's just an unwieldy way to communicate. It will probably keep a niche in field staff verticals but otherwise, forget about it.
I'm caught in an email death spiral. I have so many emails that I can't read them all without some serious pain. So I don't read them. Then more emails come in, and the situation gets worse!
There's lots of things that I want to do, and that I'm doing, that don't involve reading all that email. If you want to talk to me, email me again. Maybe I'll read it this time! hahaha!
Bet you've never seen this before. It's the Series 60 Red Screen of Death from my Nokia 6630.
OK, true confession: it's actually a 6630 prototype I got on loan from Forum Nokia Pro . I've never seen it on my production 6630 which works like a charm.
How to decompile and obfuscate in MIDP on OS X
Posted on April 21, 2005 at 12:00 PM
Categories: code, mac
OK, just some notes. To decompile any java jar, use something like this:
javap -c -classpath ./semacoderead.jar org.semacode.imagerec.Ecc200Decoder
I'm using mpowerplayer on OS X to do my J2ME compiling, which makes things pretty easy, except that I want to use the ProGuard obfuscator. Obviously! You NEED to obfuscate if you've got code like mine (for semacode) that needs to be protected from reverse engineering which is SUPER easy with java. It's available from fink.
HOWTO develop Symbian apps using Mac OS X
Posted on April 03, 2005 at 12:00 PM
Categories: code, symbian
I just posted a HOWTO for building Symbian C++ apps on OS X. It's based on the previous HOWTO for OS X and Linux but heavily modified. My goal has always been to do everything on OS X and now I've achieved that goal. So, check out the link to see the howto and get going with Symbian dev on OS X already.
Success! Built Symbian C++ app on OS X!
Posted on April 02, 2005 at 12:00 PM
Categories: mac, symbian
Sweet. I just build and installed and ran the series 60 "form" example app .. from Mac OS X!
I've got more or less complete notes on what I did that I'll post a little later. Now, I can finally get along to building apps that work on Nokia's S60 SDK 2.1 (aka Series 60 platform 2.1, Feature Pack 1).
I never realized this before, but you can in fact make bittorrent go a LOT faster if you are behind a NAT box by correctly configuring port forwarding. All you have to do is make sure that ports 6881-6899 (or if you like with newer versions, 6999) get forwarded to your local machine. You can get your local address, if you're on OS X, using the command ifconfig.
How to know it's working? Fire up Bram Cohen's version of BitTorrent, open the peer details window. If you see on the left column, any "r"s then it's working. If it's all "l"s then not working. L/R means the connection was started either Locally or Remotely. And only with NAT fixed can you get the remote ones.
Which basically means you can now talk to all of the other stupid people who are stuck behind a NAT and haven't fixed it yet (or can't) and you get tons more speed from them.
Part 1. Instructions
Programming a computer is a lot like writing instructions for someone really, really stupid. Imagine a person who knows nothing. They don't know how to walk, talk, read, or write. In fact, the only thing that they know to do at all is simple arithmetic. They can add, subtract, multiply, and divide any number at all. But that's all. They can't do anything else without being told how to do it.
* Things a computer knows how to do: 1. math
In order to get a computer to do something then, you must explain very carefully. Let's say you want to get a computer to go around the room. First you must explain to the computer what a room is. Then you must explain how to "go". Is it going to walk? Then you must explain how to walk as well. Let's give that a try.
How to walk:
1. lean on your right foot 2. move your left foot forward 3. lean on your left foot 4. move your right foot forward
Oops, that's not how to walk. That's how to take a single step.
That's OK though, because writing instructions for computers is like taking baby steps. In fact, this looks like pretty good instructions for taking a step. Let's make it into an object method.
What object takes a step? It's like a riddle. But the answer is, legs take a step. So we will call the object Legs .
What do the Legs do? They take a step. So, translate that into computerese, and we have,
Legs.takeAStep() { 1. lean on your right foot 2. move your left foot forward 3. lean on your left foot 4. move your right foot forward } Excellent! Try it out for yourself if you like. Now, taking a step is part of the API that you can use in your instructions. So you can add the first line of your instructions.
1. Legs.takeAStep() That's a pretty good start, but it's not going to get the computer around the room. It knows how to take a step, but it doesn't know how to walk yet. Can you tell what's next? We need to tell the computer to repeat the previous steps over and over again. Fortunately computers know how to do that too.
* Things a computer knows how to do: 1. math 2. repeat
So we can add another line to your instructions.
1. Legs.takeAStep() 2. repeat back to the beginning
So now what happens. Remember, the computer is very, very dull. In it's slow, plodding mind it will read the instruction 1, and take a step. Then it will read instruction 2, and repeat line 1 again. Then it will repeat it again, and again, and again. And so it will take many steps forward.
Now we have explained to the computer how to walk. But not very well. Remember, computers are very very stupid. If they get an instruction to repeat something, they will do it over and over again ... forever!
So now you must use your imagination, which is very important to have if you want to be a computer programmer. Imagine what will happen to the computer if you try to get it to walk around a room, using only the instructions we have written so far.
Answer? It will walk straight forward, into the wall. And then it will bounce off the wall, and walk into the wall again and again ... forever.
So, we must give the computer more instructions. The next thing to explain is how to avoid bouncing off the wall so many times. So let's add another step to your instructions.
1. Legs.takeAStep() 2. repeat back to the beginning 3. turn left
That's pretty good. Except there's one small problem. Can you guess what it is?
The computer will never reach line 3.
Why not? Because it will repeat ... forever. Only after repeating forever will it continue past line 2 and get to line 3. Forever is a long time from now. The universe might blow up by then. So now you have instructions with 3 lines, but the computer will never, ever get past the second one. This is called a bug.
It's said that back in the old days, the first computer had big wheels and gears and glass light bulbs and electrical relays. And the computer worked really well, until one day, it stopped working. So the technicians took apart all the wheels and gears and they found that a moth had flown in and got stuck and made it stop working. This was the first computer bug.
Nowadays, computers are smaller than bugs. But when something goes wrong, you still call it a bug. The name stuck too.
When you get a computer bug, you need to take apart your instructions, find the part that's stuck and fix it. The first step is to the find the bug. Where's the bug in your instructions? Well, line 1 says to take a step. That seems OK. And line 3 says to turn left. That seems OK too.
But line 2... that seems to have a problem. As we said just a minute or two ago, when the computer reads that line, it will repeat ... forever. Have you ever heard a CD skip? It goes back and plays the same bit of music over and over ... forever. Well, it's just like that. It's not good. In fact, it's bad. In fact, it's always, always a bug to repeat forever. It's also a very common bug even for the best programmers, so don't feel bad about it.
Fortunately, computers aren't quite as stupid as I said before. They do know how to do something else. They know how to pick between two different choices.
* Things a computer knows how to do: 1. math 2. repeat 3. choose
Now can you think of a way to fix the bug? Well, when you explain to the computer how to walk around the room, ask it to make a choice before it repeats any step. Ask it to check and see if it's walked into a wall. It can tell if it did... but only if you ask to make a choice.
1. Legs.takeAStep() 2. if you haven't hit a wall yet, repeat back to the beginning 3. turn left
Birds-eye views of various forts and other notable places.
Check out this amazing book "Around the World in a Flash" with Marie Neurath's brilliant information graphics.
God doesn't want anyone to steal his (or her) work.
I lived across the hall from Jason Garlough in first year university. In second year we stayed connected but then he kind of drifted off (to be a tin-smith, I think actually) ... didn't much like UW I guess and well, neither did I but I missed my cue. So now you know who's the wiser one.
Anyway he's back... Jason Garlough's weblog . It's ok.. some interesting pictures and layout. Garlough had the most amazing webpage back in 1997 although it has sadly passed away. This one's OK too.
photo of Chaska Potter by Paul Schreiber
Posted on February 17, 2005 at 12:00 PM
Categories: links, photos

Paul took this photo of Chaska Potter (of band Raining Jane ) and I think it's pretty good. Also see the original full-rez image .
Want to run some command line java app on OS X, but tired of getting the whole dock-launch app-icon thing? Just add -Djava.awt.headless=true to the java command line!
I was snooping through my logs last night and I found the following oddities. Search terms (in google): retractable claws will bring up my page on Roarians, in my ever popular (actually surprisingly...) Edion Sourcebook ; km vs miles and all the variants you can think of bring dozens a day to another part of the sourcebook ; surprisingly my nokia hs-4w review brings in a few dozen more, in fact my review is apparently the 2nd most popular page on the site at the moment.
I really ought to automate the popularity list. But anyway, the top 5 most popular pages here to date this month ... skipping the root and the weblog ...
Here's some recordings I found out there on the web for our new repertoire. Unfortunately the Hannaford Overture (which I quite like, by Canadian J. Scott Irvine), and Dance Sequence (by Marco Pütz) I can't find.
Pageant (by Vincent Persichetti) - I think I'm going to like this one. I've got a couple of recordings for you. The first one is the Northwestern University Symphonic Ensemble and it was played on Stochastic Hit Parade with Bethany Ryker on WFMU in NYC. In real audio format, and the piece in question is from 0:00 to 7:21 so ignore everything after that. RAM link to Pageant
The other recording is from the Rhode Island College Wind Ensemble s recording: Pageant - mp3 A fine recording but it's either cut off or only the first movement.
The Vanished Army (by Kenneth J. Alford) - Traditional sort of march. Recording is from the Austin Academy ... vanished Army in mp3
Armenian Dances (by Aram Khachaturian) - Coming back to Canada I found a recording by the Hart House Symphonic Band . No offense Hart House but either the recording is lousy or the band is ... well, anyway, here is I. Allegro Moderato and II. Allegro Largemente both in mp3 format.
I play in the McMaster University Concert Band. I'd really like them to release the recordings they make on the web as MP3 files.
Anyway, in the meantime, I'm going to collect some MP3s here of other bands playing the numbers we've played (or will play).
Our most recent concert we played the following pieces.
Gavorkna Fanfare by Jack Stamp. There's a great timpani solo in this song. The best mp3 I found for this is from the USAF Wind Ensemble : gavorkna.mp3 . They play it much faster than we did. I think this is pretty common in the US marching band tradition. They sound pretty good but I like it a bit slower.
Second Suite in F for Military Band by Gustov Holst. I played the tacet in this particular tune so I got to listen .. it's really good. I've had the song of the blacksmith in my head all week. The USAF Band has a recording in their collection . MP3s from the USAF:
- March - Like the others below, this one sounds a lot like we did. We took the central section somewhat slower. Which in my opinion is better.
- Song Without Words - This one is very slow and therefore challenging. There's a crescendo near the end that's hair raising when we played it at the last practice. I don't think it came out quite as well in the concert but it was still good.
- Song of the Blacksmith . - This song features an anvil. We played using metal ball peen hammers on a steel brake drum (Andrea Fraser). Their rendition sounds a lot like ours did, except that there's a section played by trumpet where we sounded way better (just before the first anvil part). Also, I have a feeling we may have played a repeat that they skipped.
- Fantasia on the 'Dargason' - This rendition is a lot lighter than ours was. Anyway, I obviously prefer ours. There's a nifty 3/2 layering in this song (6/8 on top of 4/4).
Before I start this review, I want to say that I really like Nokia's products. Nokia's stuff has a kind of overall product integrity that reminds me very much of Apple. All of the Nokia phones I've owned have had a very solid feel. Their interface design is solid too. They seem to focus on quality more than flash. Notwithstanding some funky phone designs, they went through a bad start to 2004 and are now in a strong start to 2005.

The focus of this review is the HS-4W bluetooth headset . I've owned a few headsets, notably the Sony Ericsson HBH-20 which was shite and the HBH-30 which wasn't so bad. But the HS-4W really jumps out of the pack for me.
First of all is the attractive industrial design. It's got a very sleek look. It looks good on the ear and in the hand. Also, it's a one-piece design with no moving parts. Their innovative solution to the left/right problem is a bi-directional speaker that fits both ways. I wore it for a few hours yesterday and today and so far it's been very comfortable, and very light-weight. I've never felt like it might slip off, and a shook my head a bit in front of the mirror and it stayed on solid.
The controls are also well designed. The pick-up/hang-up button is located on the boom and all the other controls are on the back of the ear. That way, there's no risk of accidentally disconnecting your party while you fiddle with the volume. The volume control is a rocker switch that feels quite different from the power button. In addition, at least with my Nokia 7610 I could control the volume from the phone as well.
Of course sound quality is the most important thing. I've used it both with OS X's iChat and with my phone and the sound quality is very high. It's as good on my end as holding the phone to the ear... maybe a bit better actually. On the other end I'm told it sounds very good, in fact my other party said he couldn't tell I was on the headset.
The boom mic may have a lot to do with that and it's one of the reasons I bought this headset. It sticks out quite a ways towards the mouth but doesn't get in the way at all.

I paid about $100 USD for this (production) unit.
Disruptive Technology unmasked
Posted on January 30, 2005 at 12:00 PM
Categories: theories, infographics, business
Disruptive technology has a bit of a buzzword reputation. On the other hand, the Christensen book is always on people's lists as a good book. So I bought it and checked it out.
As it turns out, most people seem to be either wrong or only partly right when they define disruptive tech. There's big gaps missing in the Wikipedia entry , Dvorak gets it wrong , and even Cringely (surprise surprise) misses the boat .
Based on my new understanding straight from the book, I drew up this infographic / visual explanation (click for hig-rez PDF). I decided to zoom in on camera phones, since they are clearly a disruptive tech and show signs of blowing away the digital camera business the next year or two.
The graph is basically three-dimensional. The vertical axis is megapixels. The horizontal axis is the progress of time. And the third dimension (represented here with colour) is the market.
The point is that disruptive technologies initially enter into a new market that has different values. With camera phones, the highest value is that it's always at hand, wherever you go.
The disruption occurs when the new technology suddenly meets the needs of the old market as well. Then it suddenly (and seemingly "out of nowhere") takes over completely.
Symbian programmer? Check out #symbian on freenode's IRC network.
Ever wanted to install the Nokia Symbian Series 60 SDK on your Linux or Mac OS X box? Now... you can. Follow the link for details.
I've had these notes lying around for a while with the intention of fixing them up and making a proper how to. I never have. Maybe because my whole experience with UIQ was altogether less pleasant than S60 (basically, I just don't like it). Anyway, here are the notes in the form that I made them, some time in the fall of 2004.
- installed UIQ21 on windows
- zipped it up
- transferred to linux
- got gcc539src.zip from symbian.com
- downloaded sdk2unix-1.2.tar.gz
- [target-directory] should be something like foo/bar/symbian/uiq21 or foo/bar/symbian/6.1 for series 60 toolkit
- I ran sdk2unix installer and got this error: ### Configure, compile & install mkdir obj cd obj; sh ../src/configure —prefix=../uiq21 —target=arm-epoc-pe >/dev/null 2>&1 Unexcpected error: aborting.
- I ran that command without the redirect and found that a directory name was different from what the installer expected, the directory expected was "Documentation/Packages/UIQ70" the actual name was "Documentation/Packages/UIQ2.1".
- the name change is probably the result of a patch I applied from Sony-Ericsson on the windows side
- solution: renamed the directory from UIQ2.1 to UIQ70 - problem: rcomp says: "Failed to write UIDs"
- solution - rcomp.exe needs to find uidcrc.exe and can't. I can't figure out how to set WINEPATH to point to paths outside the fake windows directory. So I did - cp uidcrc.exe ~/.wine/fakewindows/Windows/
- in fact, I copied this from symbian/6.1/Tools because it's not even included in the uiq_21 distro!!
- see: http://www.freelists.org/archives/p900/02-2004/msg00009.html for a different solution
- genaif complains unless the .aifspec file is at least 2 lines apparently ......
Anyone who's been around the internet since before the web will know the name Panix well as they were one of the very first ISPs ever. Well, their domain panix.com was hijacked yesterday by means currently unknown (see panix.net ). Check the link for NANOG thread. If this was a cracker attack it indicates a very serious infrastructural problem. If it was an administrative attack it indicates a huge domain administration problem. Either way, anyone who owns a domain should be very worried, and everyone on the internet, because:
- Panix is going to go out of business if this isn't fixed ASAP
- All of Panix's users are having their userIDs and passwords stolen as we speak
- All email to Panix's users is being intercepted as we speak
Since the world needs more bad programming puns,
Did you hear what the version control professor said to the computer language committee?
"submitting to Cvs C++ and Cvs Java arguments commits Subversion of RCS curriculum"
(if you don't get it, try saying it slowly, out loud)
Did you hear the one about the catholic closed-source programmer?
She prefers the cathedral to the bazaar.
(Where's my pocket protector? I need it to keep all my puns.)
Susan Crawford blogs Mary Ann Allison's neologism "gecybershaft". Germans are horrified . But the transition of your personal society from village, to friends and family, now to your attention and purpose groups is worth looking at. A lot of this is related to what Rheingold was saying 10 years ago with virtual communities.
Here's some really lame copy from the iWork page
Pages includes 40 Apple-designed templates for all our customers
...someone wrote that in a hurry.
No powerbooks. Hmm... I'm going to need a new one soon.
The Mac Mini is an odd beastie. It's like a rehash of the Cube. Which we all know was Steve's favorite form factor ever. (see NeXT cube). Maybe they're hoping to sell this to people who already have computers, so they'll basically replace the PC box with the Apple box and keep the same monitor that they already have. Will that work? I don't see people buying this new with a monitor and keyboard from Apple. I don't see them buying it new with a monitor and keyboard from other people either. Maybe it's supposed to be an upsell.
Oh yeah, and one more thing. iWork's Pages is the most interested of the announcements to me. I've been waiting a long time for a decent wordpro from apple. Will this one be it? I also really has to definitely, positively work with Word .docs.
The only problem is that there's no spreadsheet. So for the time being, I will still need to keep Microsoft Office around. I get a lot of Excel docs in the email.
photoshop forensics: iHome pictures fake
Posted on January 08, 2005 at 12:00 PM
Categories: graphics, mac
In response to my post Rui noted some pics of what purports to be an Apple 'iHome'. The photos aren't photoshopped, but it looks to me like a mock up. I did some "forensic analysis" in photoshop (I've been doing a lot of image processing lately).
I used photoshop's edge-detection convolution code to locate any strong/fast colour gradients in the image. This is a good way to find hard-to-see features.


This first big clue showed up using Find Edges and Levels. There's an extra horizontal line on the back of the box between what should be the top edge and the apple logo.
Also what are those vertical lines that run across the ports? They look a bit like the lines that appear in transparent shrink-wrap packaging.


This image of the front of the box shows what appear to be the edges of a card or inserted sheet of paper under a plastic wrap.
Plastic wrap might also explain the rainbow line effect that is visible across the dvd slot. Due to thin-film interference (diffraction).
For the next images I used Levels and Hue/Saturation. The blocking comes from JPEG.


Home run. There's a tell-tale colour transition on both sides between the card and the background material. The card shows up more brownish in the top pic, the background/box material as purple-ish. This indicates two different kinds of material.
I'm going to throw caution to the wind and make another prediction ( see previous ) about Apple. I think that their new headless system is going to be a PVR (like TiVo).
First, though, let me explain why it's not going to be just a cheap iMac. Basically Apple has an image to maintain. Literally. Quality imaging is very important to the brand and to Jobs personally. The vast majority of PC monitors are not really up to the kind of quality video that Apple ships with their machines. They would have to go against their established principles to ship a Mac that's intended to run with third-party monitors.
On the other hand, there are several reasons why an Apple PVR makes sense.
1. The PVR is a successful product, but also one ripe for expansion into the mainstream. Apple can dominate.
2. Most people now have an integrated Audio/Visual setup, where the TV and the stereo are connected. An Apple PVR can serve as an iTunes hub for the iPod and connect with the stereo. And it would also integrate with iPhoto with the TV screen as a slide show viewer.
3. The iApps are adaptable to a TV screen resolution. That would include iTMS.
4. If Apple's going to make a Video iPod, where's the video going to come from? Why, the iPVR, of course. Video to go, as they say.
5. One more thing: look either now or in the near future for an iTMS-like store for downloading movies.
Form factor? The usual connections, plus some kind of TV tuner and A/V spots. The software form factor will need to be set up for low-rez display and remote control input device.
I wrote an article for MobileWhack with some iPhone predictions . Amazingly enough, I'm now on the first page of google results for "iPhone" (although it may not last).
I created this small crossword the other day. It's done in the style of the NYTimes crossword, basically, but with some 2-letter words. The difficulty I would say is medium (my parents play-tested it).

Here are the clues:
ACROSS
1. Use wind
5. College for big cats?
10. Rings when struck
12. Like 7-down but more
13. Resident of the sky, maybe
14. Kind of times
15. Beginning for elflife?
16. Scholar reads it
18. Party
20. It's not you
21. Top level internet domain
24. A short, old romantic?
28. A dance when doubled
29. Common disc
30. Your father's mother's daughter-in-law
31. Killed
33. French or
35. Final frontier
38. Something to climb
41. What witches cook with?
42. '... never gonna believe this'
43. Open
44. Lincoln, Honest, et al.
DOWN
1. Element of chutzpah
2. Old cross
3. Found on universities
4. Untruth
5. One who overshadows
6. Python Eric
7. Unusual
8. Originally, in name
9. Pot that keeps its profile when turned
11. Acronym for a tram or subway
17. Chemical suffix
18. Life code
19. Australia
21. Ontario Docs belong to it
22. Email subject starter
23. Ancient board game
24. Cdn. province
25. ___ Henry!
26. Strong note
27. Infinite syllable
31. Device to make things like 31-across
32. Desert condition
33. Nasty brute
34. Takes advantage of
35. Evil UNIX Co.
36. Perspective
37. ___ Maria
39. Three vowels
40. essence of story
And finally, when you are done, here is the solution
MobileWhack saw fit to publish my article about the rumoured iPhone. Now that I haven't worked for Apple for 3 years, I can feel free to speculate madly about the company without fear that my "predictions" will actually come from prior NDA-covered knowledge.

OK... technically, this is not pr0n. It's probably about as close as you can possibly get with a bathing suit on and hands off, though. I mean, c'mon. But the real deal is the puppy. What is this? Is the puppy supposed to make it all OK? Is the puppy for women to look at? Is that the idea, that men will get the hussy with her ass in the air and women will get the puppy? And this thing is all over the net. I guess it sells...
Man, I would love to get the source for that and re-implement it in XSLT. And make it into a web service or something. Maybe I could scrape and reverse-engineer it (but copyright, copyright...).
maxfixit: how to import contacts from OS X Address Book into new Nokia phones
Posted on December 20, 2004 at 12:00 PM
Categories: (none)
Good news for Kenya's internet and VoIP
Posted on December 19, 2004 at 12:00 PM
Categories: internet
I've been tracking the efforts of Brian Longwe for a few years now (and communicated with him a few times). I just got this via Balancing Act Africa the essential african internet weekly news email.
It all hardly seemed possible for as Brian Longwe of AfrISPA remarked in the opening session: "Three years ago who would have thought that VoIP could be mentioned in public, let alone that we would be talking about the business implications of it?" But Sammy Kirui of the Kenyan regulator signalled the end of the beginning: "We have come from a regulatory environment that was dictated by—consciously or unconsciously—the protection of the incumbent's revenue. That obsession even though its revenues fell anyway was like trying to hold on to an illogical scenario...If you have restrictive clauses in your licences, bring them to us and we will delete them."
This is no joke. The domination of telecommunications by Telkom Kenya (facilitated by their tight ties to the government, which ran them until recently, and to which they used to generate major revenues) has been a major barrier to the proper deployment of any kind of communications service in Kenya and, as a matter of fact, all of Africa. Now we're seeing some strong lobbies emerge for the ISPs (like AfrISPA) and also the government in Kenya is serious about stomping out corruption and making a serious effort to liberalize telecom. It's been a long time coming, but it looks like finally the Longwe's of the world are getting somewhere. (I'm sure that holding ICANN in South Africa helped a bit too.)
Nokia will make a Series 60 phone with QWERTY keyboard
Posted on December 15, 2004 at 12:00 PM
Categories: mobile
I was just listening to Antti Vasara's talk (realaudio) from Nokia 2004 Capital Market Days . It's not on the slides but during the talk he said that
there will be Series 60 phones with QWERTY keyboardsWill these be shaped like the Nokia 6820 ? Certainly when Series 60 gains the ability to flip from horizontal to vertical, which will happen I guess in the next year, a Series 60 phone in that form factor seems likely.
my thresholding is getting pretty good
Posted on December 12, 2004 at 12:00 PM
Categories: graphics, code
My thresholding algorithm for semacode is getting pretty good I think. Check out these results on the classic "Barbara" computer graphics test image.

Next up we have my threshold of the image (adaptive, with an algorithm based on Chow and Kaneko, but the bimodal detector isn't as good as theirs)

Finally, by comparison, a threshold of the image by the person at this page . Mine is better in some places (like the fabric grain and the hand) but not as good in others (like the face).

(If you go there you can also see what you get with global threshold, which isn't as good.)
I just added some new pics to my flickr feed. BTW, you should be using flickr. You know how picky I am. It's good stuff.
So I'm hanging out on the #mobitopia channel and aeden was on there talking about his new site for .mp : Get.MP where you can register on this new TLD. Well, what do you know, there's still plenty of 3-letter domains left, so I went with the del.icio.us trent and got myself tru.mp . I don't really have any plan to use it but I figure I can sell it off at a profit someday.
So I just woke up and noticed that Russell Beattie says that Apple's going to make a smartphone. They're not going to make a smartphone.
- The smartphone business is already full of excellent products. Nokia is almost exactly like apple and has the same corporate character and sensibilities. apple can't compete against nokia. Nor can they compete against Sony-Ericsson, who make very pretty phones as well.
- apple has no experience with making cell phone radios, and it's not trivial
- cell phones are going to eat MP3 players anyway, but it's going to take some time, maybe a few years.
OK, now I'm going to look at Russ' post which I haven't read yet, and see if there's any arguments worth taking apart.
Why? Well, there's some logic, and there's also some amateur psychology involved as well. First it just makes sense. Apple is making a ton of money off of the iPod. They've already made that first step into the consumer products category and have seen how successful it has been for them. The iPod mini is really close in form factor to a modern mobile phone, so the experience in designing and building a new device like that could be used as Apple wades into the mobile phone market. Those are the logical thoughts. They're already making the iPod, a phone isn't that much of a leap (sorta), so it just makes sense, right?
Not yet.
The psychology part is this: Steve Jobs has a mobile phone. I'm not sure which mobile phone it is, but he's definltely got one. And he hates it. He curses at it every day. He hates it like he hated the original IBM PC.
Jobs probably has seen and may even have a Nokia phone (by the way, I've seen Jobs and actually at that time, his assistant carried the phone). Nokia has done as a good a job at a Smartphone OS (credit to Symbian too) as Apple could do.
I think the deal with Motorola to let them play iTunes music on new Moto phones is the key to this. Motorola is run by an Apple alum, is an American company known for its technology prowess, but doesn't have any competing products to Apple. It seems like a perfect fit. Apple iPhone, powered by Motorola technology. Can you see it?
I think the deal with Moto about iTMS was just an experiment. Motorola can't keep their quality up. Apple products all must have 100% perfect quality. No.
On the other hand... If little PalmSource can create new phones on demand for its new Cobalt OS from Asian white-label electronics manufacturers, then why couldn't Apple?
If I were to buy this scenario, which I don't, that's what Apple would do.
Add a little magic sauce like an integrated 4GB drive and iTunes integration, or something I can't even think of yet, and you have a massive hit.
And might very well kill iPod sales? How do you explain that?
- another problem is that Russ says that the apple phone would run an Apple OS. That would not be OS X. So they'd have to buy an OS, license one (symbian???), build a new one, or expand the iPod OS. A smartphone OS is far more complex than iPod which is, for example, not open to 3rd Party development and doesn't have a JVM. This is highly non-trivial. Russ is talking about a massive software R&D effort that dwarfs iPod, drains resources from OS X.
It's not going to happen.
I was dreaming about Apple again last night (which I often do, since I worked there in my capacity as a busybody). If I were in charge of apple, here's what I would do.
- their core business is selling computers. the main competition to computers is smartphones but apple is safe because smartphones have small screens. until roll-up large screens are made, apple is safe.
- they pick small markets with low-hanging fruit. Easy pickings. what's next? a video camera is next. the video cameras on the market suck. apple already has experience with optics from the iSight. they'll make a video camera
- they lose tons of money on Mac OS X. they spend upwards of $100 mil a year on it, but make almost none of it back. instead they make money from the computers. OS X is a loss leader.
- they aren't doing squat with weblogs. that needs to change.
- they will not make a cell phone. cell phones are fine, there's lots of good cellphones already on the market
iMovie to ffmpegX to DivX encoding
Posted on November 17, 2004 at 12:00 PM
Categories: tech, unix, film
How to properly use the kick-ass ffmpegX (for OS X, a wrapper for all kinds of open source tools) to encode your iMovie movies.
It is very important, that you do NOT choose the "Full Quality DV" Setting when exporting from iMovie. This just makes iMovie glueing the 2GB chunks together in which it records movies. Mencoder can't handle that. Here's what to do: Choose "Expert settings". Click "Export". Choose "Movie to Quicktime Movie". Click "Options". In "Video Settings" choose "DV PAL" (or NTSC, if you are on that TV System). In the Audio settings, choose uncompressed 48khz Stereo. Uncheck "Prepare for Internet streaming". Make sure the output file has .mov as extender. Now the recording is reencoded as a single movie which Mencoder will encode completely as AVI.
I always liked this song. Now I can play it (I mean the full orchestra version ;-) The first 4 bars (repeated 5 times). Performed by yours truly, on my powerbook keyboard, with Garageband, MidiKeys, the Steel Xylophone SoundFont from HammerSound (free), the Pizzato Strings sound from the QT library, which is lame but I can't find a SoundFont for it yet. I didn't use any quantization in order to get that live performance feel to it. I mixed the stereo so that it's like a real orchestra - Violins on the left, Cellos on the right. The Celesta is in the middle though, since it's solo. The sheet music is from mfiles (also free), that's what I worked from. The Orchestra Layout image file. The piece, is by Tchaikovsky.
I bought Myst and downloaded it too
Posted on November 12, 2004 at 12:00 PM
Categories: bittorrent, games
I bought Myst IV, Revelation from amazon.ca but you know, they're a bit slow here and it's not going to arrive until next week. So, having paid I felt no problems about logging into SuprNova and snagging the bittorrent for the game. Sure, it's taken 2 days so far and I still won't get it until tomorrow, but at least I'll be able to start playing this weekend :)
I just downloaded the Myst IV Revelation demo (it's free there) and it's very cool. It brings back memories of Myst and maybe (I can hope) it will be as good as Riven was. Anyway, I guess I'm going to buy it as soon as I'm done writing this, but first, some obligatory info on hacking the sound files out of the demo.
We're talking about the OS X version here, presumably the PC version is analogous. Go into the .app package and look for sound/data. Ignore the .snd files, they are metadata. Inside "data" you will see files with three different extensions. Here's my guide to what they are.
- .LS0 - inside the "English" folder - these are easy, they are straight OGG vorbis, just rename them with the .ogg extension and play in your favorite player.
- .SS0 - music and some backgrounds. Three of these are straight OGG vorbis files, rename as above. Some of them are ADPCM - see below.
- .SB0 - many of these are 44100 Hz, 2 channel (stereo), 4-Bit 4:1 IMA DVI ADPCM files (a common format in WAV/wave files). You can listen to them using SoundHack a free program for OS X and there's probably similar soft for PCs. Open as unknown format. Set the format to the above. Save Info. Save as. The resulting file should be listenable. NB: Many of these files contain multiple sounds. NB2: Some of them won't work using this technique, I don't know why.
Have fun.
Update: Revelator will extract just the ogg files automatically.
PS: Why all the work? They're probably just trying to make it difficult to extract the audio by stripping the normal headers from these files. They could have left the WAV headers in place and made it a lot easier.
RDF explained in a way that makes sense to XML people
Posted on November 09, 2004 at 12:00 PM
Categories: xml
Check out this sunset picture I snapped with my Nokia 7610. Not bad eh? The large sized image is HUGE... it's amazing that megapixel really does mean big. Now, it has artifacts in the dark parts of the image which I attribute to low light. I can't remember if I had night mode on or not (I think not, it seems to be geared towards REALLY dark shots). For the small sized one here, I applied some blur before I shrunk the image to make the house look better.
My version of Black & White X 5 by Bill Conti. I bought GarageBand as part of the iLife package, more to get the latest iMovie. But last night I fiddled and lifted this song from the Thomas Crown Affair soundtrack. It's a piece for piano - so I tried to play it on the piano - and then discovered it's actually a piece for five pianos. I don't have a MIDI keyboard so I used MidiKeys . Follow the link to hear it, 1:10 minutes. LAME encoded. Sigh, the second piano is way too muddy. I'd have to go back in and manually edit the AUMatrixReverb to make it work right.
And also here is the Garageband file .
Apparently, instead of taking over Canada, Americans now want to join us.
More: Really, really funny French (from France) comedy news show Guignols de l'info analysis of the vote .
I have located the satellite imagery of the Al Qa Qaa that I was looking for while writing this timeline at Wikipedia .
GlobalSecurity.org / Public Eye Satellite Imagery of Al Qa Qaa . There are almost 50 satellite photos of the facility there, and they are from 2001.
Most notably, it clearly shows the massive scale of the complex, that the 1,100 building estimate is almost certainly correct.
DigitalGlobe has also posted satellite images of the site, this time, from late 2003 and mid 2004. (warning, 4 and 5.1 MB files)
First, it's nowhere near as simple as I thought. Second, it's nowhere near as complex as I thought. Well, here's how it works. MPEG-4 is a way to define a codec. So, when you go into quicktime and it says, save as MPEG4, you're not saving as MPEG4, you're saving as "Apple's MPEG-4 codec". Which, by the way, sucks compared to basically any other option . There's actually a whole bunch of MPEG-4 codecs, including Divx, Xvid, 3ivx, and a whole bunch of high end professional codecs that cost a lot of money. In theory, any MPEG-4 player can play any MPEG-4 codec. In practice, not so much. But also, in practice, VLC and MPlayer can play them all.
Following all that, here's an enlightening discussion thread comparing various formats and explaining MPEG-4 .
Mine's Sierra Whiskey ...
After reading this Sunday Times article by Ron Suskind I realized that the best explanation for W's behaviour is that he believes what he says. In this light, I put together this information graphic of what he believes the world to be like. I don't endorse this world view; it is constructed based on the best available evidence from transcripts of his speeches and media reports. I do not believe that any of this material is controversial. If you have additional information, please email me .
Book-a-minute SF/F Read a science fiction or fantasy book in one minute. Pretty damned funny. This summary of "God Emperor of Dune" is good:
Leto II: Infinity. Reader: Ouch, my head just exploded.
More: The Processing gallery (I liked Tokyo).
The word on the street says subversion is finally ready for prime time . You may recall some bizarre IP disputes—apparently these have been resolved at this point. Apparently it's much like CVS, basically designed to be "a better CVS" and they've kept the CVS syntax except in areas where it really needed to be fixed. They've fixed versioning to work across file renames, directories, binary files, improved merging and branch support. Comparisons to the best commercial products come out favorably.
There's an OS X gui client as well : svnX from la chose interactive.
I'm a bit of a fan of her , here's a fantastic picture I just found of Esther Dyson in her office .
Virtual PC 7 is out and it supports the G5 finally. I use VPC to emulate Windows and Linux for symbian development. I mount the drive in Mac OS X so I still get to use XCode :-)
It's getting close to the 2 year anniversary of when I first started using AxKit . Ever since Matt Sargent posted his success story on axkit-users I've been thinking about my own success story with AxKit, it's been highly satisfying.
Matt followed up by saying:
Currently around 10 backend servers (two separate sites) doing about 5 million "hits" a day (almost all of that is the spam incoming from our mail servers, and is handled by a lightweight mod_perl handler, not AxKit). I say "about" because we don't monitor the traffic very carefully - we do problem based reporting - we're not interested in maximising our hits :-)
In my experience with my site having been slashdotted and boingboing'ed (I had in one day 120 000 hits and 19 000 pages without breaking a sweat) the performance has been very smooth on a minimal box. This is all due to caching - when I left caching off another time the server got totally slugged (oops) due to a boingboing'ing.
I never replied to Matt's thread but I want to say that when I picked AxKit it was partially due to the promise of fantastic scalability due to caching - and that's been borne out for me by experience.
Listen to my grandfather, Willson Woodside
Posted on September 27, 2004 at 12:00 PM
Categories: meta, links
I'm told that if you're old enough (like you were older than 16 when WWII broke out) and you live in Canada, you may remember the name Willson Woodside. He was my grandfather and gave a five-minute report every evening on the news for the CBC, from Europe, about the status of the war. He died when I was I was young, and was sick for a long time before that, but this voice out of the past still has a somewhat familiar sound (and familiar mannerisms definitely). It's an archived report on the CBC from 1950, where he analyses the Korean War. I'm happy to say that his foreshadowing of an escalation of that war failed to occur! I also just wrote an article in Wikipedia about him, and it's incomplete, so fill in the details if you know them (or email them to me and I'll do it). (Fast forward to time index 4:32 to hear him.)
This is an updated version of the graphic from this earlier version .

Also available: large GIF (100K) and also if you want the highest quality for printing, PDF file (900K) or EPS file (4.4 MB !!!!)
It says: George W. Bush / Vietnam-era Service Record / The chart data is based only on documents released by the US government.
An infographic / information graphic is a visual explanation. The point is to visualize some data, information, wisdom, story, etc, into a form that appeals to the visual centers of the brains. A well made infographic, in my opinion, can explain some concepts much better than text.
The kingpins of infographics in my opinion are Edward E. Tufte and Nigel Holmes . You can find some kick-ass examples of their graphics on their sites and even more if you dive into google's image search, I'll make it easy for you, holmes , tufte1 , and tufte2 . Tufte's specialty is in the visualization of data, and he's written a number of books on the subject that are basically famous and required reading—I almost never buy books but I just picked up "Envisioning Information". Nigel Holmes is more on the side of explaining concepts which may not be so much data but more like stories, like a lot of news stories, various technical concepts and so on.
W's air guard record in visual format
Posted on September 04, 2004 at 12:00 PM
Categories: infographics
Update: There's a new version 1.1 now that's a lot easier to read (but shows the same data).
Here's a visual explanation of W's air national guard record. I used only documents released by the military (in other words, official service documents) to build the graphic.
Also available in best quality: PDF 1.2 MB .
Most of the documents I sourced can be found either at coldfeet or through slate .
Here's an image I prepared based on a story about Karl Rover's smear campaign tactics in salon.com . My graphic illustrates the story's claims. I haven't personally fact-checked it at all.
I deliberately chose salon colours and I obviously have higher-resolution versions available.
This is really cool. It's called Block Jam and it's a sony design project . There's a video you really should watch but maybe play with the flash demo first. My comments: It's hard to learn, but once you do, it's really neat the way it works. Use lots of starter blocks to get the cool effects.
Yes, it truly is cool: paean on the OS X color picker .
Bonus: Christopher Holland posted an OS X color list (.clr file) that you can just copy into the Library/Colors folder on your disk and it will update the colors palette with a new list: the entire list of "Resene" colours from X11. While that might seem lame on the face, it's a totally great list, with for example, the following shades of gold:
- gold drop
- gold tips
- golden bell
- golden dream
- golden fizz
- golden glow
- golden sand
- golden tainoi
What's more incredible - that they have 8 shades of gold or that someone gave them all different names? Anyway, he blogged his work or you can avoid the wacky CSS layout and download the .clr file directly .
If you are an American citizen, but you live outside the US, you can still vote . Basically it's really, really easy. Just follow the link at the end of this post, and fill in the easy questions. They'll do all the work. All you have to do is add a stamp.
whee, I just unlocked my Nokia 3600 using this free nifty tool that I found using Google Groups (formerly known as USENET...). It had a SIM lock which meant that when I took my Fido SIM and stuck it in, no go I got the "SIM not valid" message. Now that's fixed. Not that Rogers should complain since I've spent so much money on them. In other cell phone news, I just bought a P900 and I'm going to sell my P800 which I never used anyway. The P900 is just better for a development platform. I should actually make back a pretty substantial amount of the money I sunk into the P800 when I sell it on eBay. I hope.
The Nokia 7610 is stil the phone I use. It has all the goodies of the 6600, plus a few, and a better screen. The keypad, which I had some serious worries about, turns out to be OK. There's a big hassle from Apple because they DON'T SUPPORT it in iSync yet, which is just ... well ... anyway, I had to manually copy 50 or so vCards.
Why lisp .
I don't know Lisp, ever since the middle years of my CS degree. I was forced to learn Scheme in a week, and it didn't take. I failed miserably. I never understood it, and generated a program that looked to me like a sea of parantheses that did I didn't know what.
But every once and a while I hear people who seem to be great programmers say that Lisp is the best thing ever. I've never heard good reasons why this should be so, but I was sucked into reading about Lisp because of this article Revenge of the Nerds about pointy haired bosses (PHBs) vs. programmers.
So I kind of managed to screw myself recently by upgrading gcc on my debian stable installation to the testing version to get gcc-3.3. ( First of all, will someone explain to me why gcc 3.3 still isn't in stable yet? That's just bizarre. ) So it turns out that the upgrade left me with a non-working symbian toolchain ( something's wrong with wine? it's hard to be certain ).
The OBVIOUS thing to do seems to be to downgrade but wait! apt-get doesn't support downgrades. Instead I'm left with a bizarre situation where somehow I have to rebuild the dependency chain from the top down using older versions of the libs that are in stable. At least now I have learned about the following useful commands.
dpkg --get-selections
tells you what packages are installed
apt-get install foobar/stable
installs specifically the stable version of the package foobar. Here's a useful thread .
Update: ( BACK UP FIRST! ) Hooray! Through a combination of apt-get remove libstdc++5 ( which I cancelled ) and looking at what it's going to kill, and going through the list looking for the keystone dependencies, I found that the trick was to install the stable version of xlibs, and libstdc++3, and maybe one or two others, but anwyay I think I have it all back to stable now.
Update #2: I also wound up needing to use these tricks especially, cd /var/cache/apt/archives/ && dpkg --force-overwrite --install [package] Note that in the last case, an apt-get clean can make it easier to find the right package.
I'm now porting my Semacode DLL SDK over to windows so that I can build a WINS (emulator) library and DLL file. Needless to say there are some small hiccups. Here's one. I'm using Visual C++ .NET, which while it apparently works, is not like the standard. They still consider VC6 to be standard I think. So when I get this error:
LNK2019: unresolved external symbol __ftol2
I'm in a bit of trouble. Fortunately I think I found the solution, which is ugly, but works. Go into the file C:Symbian6.1SharedEPOC32Toolscl_win.pm and search for the line that contains "/W4" and change it to this:
"CLFLAGS = /nologo /Zp4 /W4 /QIfist"
(so basically add /QIfist to the options). So what's the problem. I guess that symbian's tools suck?
While I'm here, remember that cls will clear the scrollback buffer when you are in the fugly DOS shell.
So I just finished sending letters of complaint to VeriSign and a certain online vendor that shall remain anonymous until I'm sure they flushed my CC number from their system. These guy are really, really stupid.
Here's what they do. They offer me an HTTPS secure connection to set up my account to buy this techno item I needed. As part of registration I HAVE to enter my credit card number, which is kind of annoying, but they're going to get it eventually anyway. They also want a password, so I choose a new secure-ish one to protect my information, right? And I note that my full CC number is visible afterwards in My Account info, which isn't great. Amazon does the right thing by only showing the last digits. But the site has this gold "Verisign Secure Site" logo so I figure I'm covered.
Then they EMAIL me IN PLAINTEXT my PASSWORD! Fools!
If I was some average idiot, I would just leave the password the way I set it and any fool who can intercept or read my email would be able to log in and suss my CC number. Not good.
So I emailed then and cc'd Verisign, and filed an abuse notice on Verisign's site. I want them to delete my account info clean from their system. And Verisign ought to do something about giving a seal to this lame security. No matter how good your security on-site is, it sucks if you leave such a gaping hole in the email response system. Sheesh.
I'll update with the name of the idiot vender once I'm sure they've removed me from the system.
The main problem with RFID is remote hacking. You can just walk by someone, or aim an antenna at them, and pick up their RFIDs. So in this example a malicious user can find out a kid's unique ID, and potentially their full identity, just by walking by the kid.
So let's say you are reading along and you want to read MIT's Technology Review article: A Remote Control For Your Life . And then they want you to pay and you don't want to pay. OK, fine but how is it that the content of the article got indexed into google in the first place? Well as it turns out, they just check the User-Agent string on the HTTP requests. So if you were clever you would just do this:
curl -O -A 'Googlebot/2.1 (+http://www.googlebot.com/bot.html)' 'http://www.technologyreview.com/articles/mann0704.asp?p=0'
and then you can read the article. There are other sites that play similar tricks.
It's not too often that there's an interesting conference on Mobile technologies in Toronto. It's also pricey ... about $1000 for both days and $500 for one day. I'm kind of hoping that one of the two days (July 21, 22) will be clearly better than the other one, and I'll just make a day trip out of it.
UPDATE: I think you can get free passes now. Contact me if you need a referral.
These sessions look kind of interesting:
- This is the only apps talk, too bad it is by microsoft Day 1, 12:30pm
- Mobile services, by Alcatel's Director of Mobile Operator Marketing . Hmm.. could be interesting, and the description and bio are both short and sweet compared to all the others. Alcatel is world wide, so they should have a clue. Day 1, 1:30pm
- Zigbee is kind of interesting because it's way lower power than bluetooth. Day 2 9am
- James Kempf of DoCoMo on 4G day 2 1:30pm
Keynote(s). So far there's only one confirmed keynote speaker, Jim Balsillie, from RIM. I'm not really pumped about that because I think I already know most of what there is to know about RIM. Also (a) there's still three empty keynote slots and (b) the time for balsillie's keynote is not told.
I think right now it looks like July 21 is the better day to go. I'm going to hang around and give demos of my software as well and hand out business cards, probably. Quite frankly, the Microsoft talk, while it's not my shoe box, might be good intel. And the Alcatel talk could be interesting. Otherwise, I think this is just going to be more of a networking thing.
XSLT code to create XML output from XML in an <xsl:variable>
Posted on July 04, 2004 at 12:00 PM
Categories: code, xml
Here's some code I just wrote in order to parse out XML from a string in XSLT. In XSLT, URL parameters are received in the string type. You can't just copy them into the output because they will be fully entity encoded. So, let's say you wanted to have a form field where someone could enter XHTML, and then you'd store that into an XML file. Of course you don't want to store <p>whatever...</p> into the file. So you have to actually process the incoming string and then create output XML elements as you go. In order to get you started here's some XSLT code that does an OK job of this:
It's pretty easy to call into, just do something like this:
<xsl:call-template name="parseXMLParam">
<xsl:with-param name="input" select="$url_content"/>
</xsl:call-template>
... and that's about it. I think it should generally work for XHTML, but I think that it may fail if there are nested elements with the same name (e.g. a para inside a para) or nested loops of names. However as I said since that doesn't happen much in XHTML it should be useful for that at least.
Did Steve Forrest start a livejournal ? Yes he did. It seems however to be mostly about the elections so I am not sure if he will ever use it again.
picturephoning writes about Fujitsu's "new" technique for embedding a barcode into an otherwise normal looking image. It has, however, already been done. At least one example, Dataglyph , was developed at least as early as 1995 (see citeseer ) and maybe earlier, I haven't tracked it all the way down yet. These techniques all amount to essentially the same thing, which is steganography . The main disadvantage of this technique for the kind of applications that Fujitsu, PARC, and others imagine is a simple matter of UE, user experience . If the users can't see the message, how do they know it's there?
On the continuous quest to make this handrolled blog work better with other people's blogs, I added today the ability to track back to other people's blogs. You can't trackback to me (yet anyway). But I can do it to you :-). So, my last post was my first trackback.
There's a lot of stuff to do. Next I need to configure it to ping Technorati as well.
How does it work? It's my special brew. ALL XSLT. All the time.
Spotcodes are kind of low bandwidth compared to semacode, but they are kind of pretty. I think the video they put out of using the phone as a mouse was kind of silly since you could just use a touchscreen. But what do I know?
Also.... tracking back for the first time!!!
So I've been dealing with this Finnish company and I have this absolutely crazy problem that I can't pronounce half of their names. I feel really bad about it but I've never seen a name like Yliharju and when I call their office I have to spell it out for the receptionist. So now I googled for "finnish pronounce" and found this awesome site, How to pronounce Finnish names . It soothes me by saying:
Many Finnish names seem quite long and contain strange letters which doesn't make figuring out how to pronounce them very easy. But now this huge problem which has bothered the greatest minds of the world for years has been finally solved :-) Just select one of the nine categories below and click on the name you want to hear and you'll soon pronounce Finnish names perfectly!
I just tried it out and I think it works. I think you pronounce it "il-ee-harr-you" or anyway when I said that the receptionist seemed to understand me.
Finally. After a week in dial-up hell, I'm finally back online for real, ethernet-style. What a relief.
A recent thread on axkit-users brought me this tip. If you have an XML data store with a large number of nodes, you can use xsl:key to pre-create an index on the table. David Nolan (of CMU) wrote (link not available, sorry)
Basically xsl:key (I mis-remembered the prefix before...) pre-creates an index on the table, based on whatever attributes/nodes you choose. For example, if your xml looks like:
<foo> <bar name="X">...</bar> <bar name="Y">...</bar> ... </foo>And you need to select "/foo/bar[@name='X']", doing so directly is cheap if your XML is small. But if its big you should create a key, especially if you're doing selections of that type often. So before your templates you do:
<xsl:key name="barby_name" match="/foo/bar" use="@name"/>Then when you need a piece of data you use "key('barbyname','X')".
You can even make up a concatenated index, if you need a multi-part search. i.e.:
and then select "key('foo',concat($fooname,'-',$foo_type))". Just make sure the string you're using to separate the search elements isn't valid as part of the content of the elements.Proper application of xsl:key can be very useful. One of our (non-AxKit) translations is taking flat database dumps with approximately 10,000 nodes and converting them to a structured format, based on the structure of our database, with approximately 145,000 nodes. Using xsltproc (which is slower than Saxon, but more widely available) that translation takes 30-40 seconds. Without keys it was taking over 10 minutes.
Finally some series 60 flip phones are coming out. Weighing in at only 95g is the panasonic x700 and the dimensions are 87 x 47 x 24 mm, 80 cc. It's a kind of standard silvery phone and it has a small external screen which is nice. Next up we have the just-announced Nokia 6260 at a much heftier 125g. Also it's kind of a monster for a flip phone, 102mm x 49mm x 23mm, 109cc. I'll have to see them both in person before I can really decide if the nokia is just too big, but I'm thinking that one of these phones is a phone that I would actually buy, for my own, personal use. That's saying a lot, since the last phone that really caught my eye (and I'm still using it) is the moto startac. All in all, it looks like the Panasonic has the advantage.
This Scopetime is a nifty flash gizmo. It's like a new way of displaying time. I like the presentation as much as the idea. I don't think we really need new ways of displaying time, but on the other hand, I think this idea does actually work, which is pretty unique in this category of "inventions". In other words, I could actually see having a clock that works like this. Anyway, I like the flash.
ACCESS ... check this out! by Marie Sester
One of the programmers on #mobitopia was kind enough to build the simple, DLL-based guiengine example from the Nokia SDK for me on windows. I'm using it to test against my linux build. I copied all of the files (the .app, .rsc, and .dll) over to the phone and it works. Then I copied over my own .app file, built against the windows .lib, and that ALSO works. Yay! Now I see that my linux build isn't making the necessary .rsc file. Why not? Oops, that's my fault, when I took out the AIF file from the makefile I also removed the RSC. I just need to remember to copy the .rss file into the src directory next time. OK, I can make a .sis file for the application side of guiengine now on linux and it works OK.
Now I have built my own DLL from the same source but on linux. If I run strings on the .lib files I see some differences. I'm not sure yet what the differences actually are. In any case, I can build the .app against the linux .lib, install it on the phone with the windows .dll still in place, and it will run. However it crashes when I attempt to draw a shape (with KERN-EXEC 3).
Finally I have renamed C:/System/Libs/shapemanager.dll to Wshapemanager.dll and copied my own linux-built DLL into that directory. And I launch the app and it runs AND works. OK finally I have built I think a DLL that runs.
Here is the makefile for the DLL. Note that U1 and U2 must ALWAYS be those values for a DLL file. U3 and USIS3 should be the same.
EPOC=/home/simon/sandbox/sdk2unix/gcc-target PATH=$(EPOC)/bin:/usr/local/er6/bin:/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin include $(EPOC)/lib/makerules/dll TARGET=shapelistmanager U1 = 10000079 U2 = 1000008d U3 = 10005b7e USIS3 = 10005b7e OBJECTS=myshapelistmanager.o shape.o rectangle.o circle.o LIBS = $(EPOCTRGREL)/euser.lib $(EPOCTRGREL)/estor.lib MTOP=\System\Libs CFLAGS+= -DHAVECONFIGH -I. -I../inc -I$(EPOC)/include/libc -DNOGLOBALS -O2 -DEPOC32 -DZLIB -Wall all:$(TARGET).sis -@mkdir -p s60 mv $(TARGET).sis $(TARGET).dll $(TARGET).Lib s60 $(TARGET).sis:$(TARGET).dll $(TARGET).pkg $(TARGET).dll:$(OBJECTS) $(TARGET).o $(TARGET).o: @echo > $(TARGET).o clean: rm -f $(GENERATED) $(TARGET).pkg: @echo "Making $(TARGET).pkg..." @echo '&EN' > $*.pkg @echo '#{"$(TARGET)"},(0x$(USIS3)),1,01,1,NC,TYPE=SISAPP' >> $*.pkg @echo '(0x101F6F88), 0, 0, 0, {"Series60ProductID"}'>> $*.pkg @echo "$(TARGET).dll"-"!:$(MTOP)\$(TARGET).dll" >> $*.pkg Here's my makefile for the app. These UID3 values, by the way, are from the example code.
EPOC=/home/simon/sandbox/sdk2unix/gcc-target PATH=$(EPOC)/bin:/usr/local/er6/bin:/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin include $(EPOC)/lib/makerules/eikon NAME=guiengine U1 = 1000007a U2 = 100039CE U3 = 10005b7d OBJECTS = guiengine.o guiengineappui.o guienginedocument.o guiengineapplication.o guiengineappview.o LIBS=$(EPOCTRGREL)/apparc.lib $(EPOCTRGREL)/avkon.lib $(EPOCTRGREL)/cone.lib $(EPOCTRGREL)/eikcore.lib $(EPOCTRGREL)/estor.lib $(EPOCTRGREL)/euser.lib $(EPOCTRGREL)/ws32.lib ../engine/s60/shapelistmanager.Lib #../../../fromwin/guiengine/shapelistmanager.lib TARGET=$(NAME).app PKGVERS=1,1 PKGFILES=$(NAME).app $(NAME).rsc # $(NAME).aif CFLAGS = -O -DNDEBUG -I. -I../inc -DUID3=0x$(U3) -DQUARTZ -DEPOC3261 -I$(EPOC)/include/libc CPPFLAGS += -DQUARTZ -DEPOC32_61 -I../inc all:$(PKGFILES) $(NAME).sis $(NAME).sis:$(NAME).app $(NAME).rsc $(NAME).pkg $(TARGET):$(OBJECTS) $(NAME).aifspec: echo "mbmfile=icon.mbm" >> $(NAME).aifspec echo "ELangEnglish=$(NAME)" >> $(NAME).aifspec semacode.o: $(NAME).rsc clean: rm -f $(GENERATED) $(NAME).aifspec
I'm still trying to figure out how to build a DLL for symbian on Linux. sdk2unix didn't do it "out of the box" so I'm learning, learning, learning about how DLLs work, how symbian builds DLLs, etc. Here's one: if you include a DLL's lib stub file in your makefile, it still won't link to the .app unless you actually use something from the DLL in your source code.
such as what the heck all those different UIDs are for . Here's a quicko primer:
- The first UID indicates the structure of the file
- The second UID indicates the outermost "interface" provided by the file
- The third UID indicates a particular instance of the object identified by the other two UIDs
So it sounds to me like: uid1=filetype, uid2=resourcetype, uid3=myuid. Or something like that.
Anyway, for a DLL, I think according to this and other docs I need to have: uid1=KDynamicLibraryUid=0x10000079, then uid2=KSharedLibraryUid=0x1000008d, then uid3=myownUID.
Hamlet meets Scooby Doo . Rather funny I thought.
Well, I finally added a graphic to my website. Do you think it looks OK? I had this sudden inspiration and here it is, weighing in at 1.4 Kb. Also, my sister's birthday present in now in Kowloon, Hong Kong. It was shipped there by accident by DHL.
Jon Udell is trying to figure out how to get random access to video streams off the net. He seems to have gotten somewhere using, amazingly, SMIL .
explanation of how Mail.app's LSA-based spam filter works
Posted on May 25, 2004 at 12:00 PM
Categories: tech, links
How Mail.app's LSA-based spam filter works . Finally an explanation I was able to comprehend. It's data mining after all :-)
"Here's a little song I wrote the other day while I was out duck hunting with a judge... It's a new song, it's dedicated to the FCC and if they broadcast it, it will cost a quarter of a million dollars."—Eric Idle
Fuck you very much the FCC Fuck you very very much for fining me Five thousand bucks a fuck, so I'm really out of luck That's more than Heidi Kleiss was charging me. [...]
That was quick. Is there some kind of unmet, pent up demand for Symbian Linux solutions? My Symbian / Linux HOWTO is now the #1 result in google if you type in symbian linux or symbian "OS X" . I've had 623 referrals from google so far this month, probably mostly for that. huh.
featured in this feature . believe it or not, progress is being made.
In other news, I wish I could make semacode popular with people without actually having to TALK to them.
HOWTO develop Symbian apps using Linux and OS X
Posted on May 09, 2004 at 12:00 PM
Categories: unix, code, mac
I finished writing up my HOWTO on using Linux to develop for Symbian. Specifically, it covers Series 60 but the tools can be used for other variantions of Symbian as well.
semacode made it to the Daypop Top 40 Links today. We're number 18 right now. With an up arrow. And some green bars below. I have no idea what that means. But other people have blue and red bars and some gray ones. I think green is probably good.
Update: Made it as high as 15. 
The blue bars are your existing score. Red bars are a decrease since the last update. Green bars are a gain since the last update. I also caught "semacode" as a wordburst, in position 17. 
I released semacode a few days ago. And it's been pretty well received so far. Here's a round up of the coverage.
Reiter's Camera Phone Report was first out of the block. I like Alan and his weblog so I put him in the first wave of announcement emails. He emailed me back with some questions which he added to the report. And my name is in the headline :-) Next up was Smart Mobs . I emailed Howard Rheingold but he must be busy because it was posted by someone else. Howard's been a fan from early on of the whole idea. Rafe at All About Symbian gave me a write up and posted a semacode for their site too.
The second wave had Boing Boing with a short write up. Probably most of today's hits came from there. It's a pretty popular site. Although I haven't actually checked yet. Also the story was picked up by TheFeature's Eric Lin which is cool because I like thefeature. And I didn't directly contact them myself so that's a good sign too. They also provided some highly accurate background info which was missing from other coverage so far. I was also contacted today by heise.de so we'll see if something comes from them. Since my site is still operational I'm assuming there's no /. link yet. So far AxKit is holding up just fine which is great.
A little bit more. Some linkage and commentary from MobileWhack : "Semacode is about as cool an app as I've come across ... You can be sure I'll be sporting the semacode equivalent of http://www.mobilewhack.com/ on the back of my scooter helmet—talk about mobile whackery." engadget has a story also.
My web counter from digits.com has just crossed 20000. Actual number, probably much higher, since digits seems to miss quite a few. While I'm at it, here are more details. I won't bother with "hits" since it's such a misleading number. But so far this month I've served about 400 pages and had about 100 visits ... per day. Maybe as much as half of those are hits on my rss.xml file though. By a long shot my biggest referrer this month has been google. With 91 hits for the search string "d" ? What does that mean. Other search strings I got a few times are "expat os x" which makes sense, "iambic quadrameter" which makes less sense. "libxml mac os x" and "sdk2unix" seem reasonable.
Here's one that's interesting. Trivia, symbian is a british company. So, you know, those crazy brits (and canadians too) spell some words differently. So when I wrote up my solution to the symbian initialized data problem, I copy/pasted from the output and they use the spelling "initialised". I got a few hits for ".app has initialised data" (I'm first in google for that) (I'm second for just "has initialised data" (with the quotes)).
How to determine an app's UID on Symbian: just download the application's .sis file and open it in a hex editor. The first four words will be the Uid in reverse order.
Programming for symbian may be a hassle, but it's kind of cool to write apps on this device. The smartphone is really a completely new platform, with new possibilities never really achieved on any other device. I mean, if you were writing for a vertical market, you could conceive of doing something like this on a PDA before but the number of net-connected was never very high. Whereas there are maybe 10 million smartphones with cameras already sold, and the number should continue to skyrocket.
The smartphone, I want to say camera phone, but I've discovered that there really is a need to distinguish between the two. There are an awful lot (100 million or more?) of camera phones out there, which take crappy small pictures and have a very limited operating system and developer platform on board. Even the Nokia Series 40 range, while it runs Symbian, is not open for C++ development. You can use the j2me API, but then you discover just how small the memory is, and of course the APIs are limited, probably don't implement MMAPI on those phones, etc., etc. Whereas the smartphone is a different beast. They still cost at least hundreds of dollars, but they are smart in part because they come with a development platform that's worth paying attention to.
Will all phones be smartphones at some point? It seems likely. As the technology gets older it will get so cheap that the makers can throw it into all their phones, as they are now doing with colour screens.
Meanwhile, there's enough of them out there, they are cheap enough, and they work in enough places (basically everywhere in the developed world has GPRS) that it's a good enough platform to write apps for. With Symbian specifically, it's geared towards open access so that the phone users can download any programs they want. That's a big contrast to the "walled garden" approach that I think will eventually fall by the wayside.
Meanwhile, although the Symbian API is a beast, it does pretty much work. You can more or less do whatever you want to be able to do. That's a big difference compared to Java at the present stage. But I fully expect java to surge forward as the implementations get better and the phones have enough memory and processor power to easily runs those apps. Right now it's marginal, but in a few years that will be a different situation.
It's pretty much a cutting edge platform. Similar to the early days of PCs and the web, when a lot of the software that gets written is a first.
I just spent like an hour debugging this stupid problem with a resource file for symbian. Turns out when you get this error:
<empty>(0) : Link name not found
you have avkon.rsg included BEFORE avkon.rh. You need to include them in the OTHER order. At least now it will be in google.
The idea that legislation is useless against spam has reappeared on my radar. It's a ridiculous notion. Many spammers are operating in the open and they need to be caught and fined and shut down. Nay-sayers on spam legislation argue that there are too many spammers, that they'll just move off-shore and make it harder to catch them. Harder? If you're not trying to catch them in the first place, there is no harder.
As for pushing them offshore, fine. That just makes it that much easier to stop the spam. If it's coming from certain countries it's easier for technological measures to identify the spam and kill it off.
Meanwhile, you get double benefit. First you get to make some government revenue off the backs of spammers. Secondly you create a situation where technological measures can actually have some teeth. It's all well and good to block spam at the local network level but it's far better to stop the spam at the source. And spam blocking tools can help identify the source and aid in prosecution.
So the idea that anti-spam law is pointless is misguided and misses the big picture. What we need is a broad spectrum approach to killing spam. Meanwhile I'll continue to appreciate the fantastic spam filter in OS X's Mail.app.
Now that I've got my semacode app marginally working. I say working, because it does actually work. You can click on a symbol (I mean, photo a barcode), and it will take out the URL and then you can launch the URL in the browser. It's slow and ugly but it works.
Anyway, now I figure I can call myself a symbian programmer. I would say that I have officially figured out strings management. I even think I've done a clever thing or two with descriptors. The whole idea that there's a class called HBufC -- for "Heap Buffer Const" -- is a little silly. Especially because you can obtain modify access to the contents so it's actually not const after all.
As for the UI model, I kind of generally grok how it works but I wouldn't trust myself to make big changes yet. I'm working off some example code that already does basically what I need so I want to keep the UI changes VERY minimal. But towards prettying up the app a bit I need to figure out how to change the icons (my attempts so far, abortive). And I'll probably have to create some kind of form field or something to give some instructions to the user. Well, the less UI work the better!
I just talked to some folk on the #mobitopia channel today and they said that the most popular symbian smartphones by far are the nokia models. 3650, and 6600 basically. I was somewhat relieved to learn that the P800 and P900 aren't so popular. That good, because it probably means that demands for a UIQ port won't be so strong. I don't think a UIQ port would be super hard, but I'd have to get a new (expensive) phone and mess around with a new UI API.
I've got some marginally useful logging code that I'll provide at some point since it might be useful to someone. I use heavy duty logging because well, there's no debugger on the device.
Direct connect is yet another p2p file sharing program. But unlike Kazaa, it's available on OS X, partly because it's an open protocol so there's a number of application developers out there writing clients and servers. It's vastly superior to Gnutella in my opinion, both in terms of the number of results you get and the speed of downloads and uploads.
There's a couple of different clients available for OS X. The first one was the NeoModus client for OS X which quite frankly, is a nice bit of work. Too bad it hasn't been updated for like 2 years or so. It's a very, very clean, sweet interface but the functionality is just sorely lacking these days. And, it's not a very popular client with the server operators, who like to see you using a more modern client with tags, and many will kick you off without them.
The newer option is the DCGui-qt client. There's a "native QT version" available which runs out of the box without any need for extra libraries or X11. As a Mac user you will most likely be highly offended by the user interface. It takes a bit of getting used to. It's, to put the brightest face on it, clumsy. But, behind that not-so-shining exterior is a heart of gold. This puppy is seriously powerful.
The power is hidden away in the search window. Type in your search term into the "Search" tab and then click on the "Hubs" tab and change it to "Public Hubs". Now go to the hubs window and make sure to update it to a fresh list. You'll see more than 10,000 public hubs listed, many with thousands of users each. DCGui lets you search all of them in one click. It's such a big search that it can take almost an hour to complete, but the results start showing up right away in the "Results" pane. Note that there is a trade-off for this power, currently, you can only perform one search at a time.
Using this feature it's possible to find very obscure videos and get enough duplicate results to make a "multi-download". This is where you are downloading from many people at once, getting a much higher speed. I can typically saturate my DSL connection and pull down files at a rate of about 150 KB/s.
The learning curve is steep. I actually gave up once on dcgui before coming back to it (and then I discovered the "public hubs" search feature). It's under active development so we can expect more good things in the future with version 0.3.
I just added more of a proper weblog archive that actually lists out all the entries in a list format, providing link-throughs to each entry on a separate page. Now you can see all of the entries at a glance. It's not as good as a by-the-year / by-the-month view would be, but it's a lot better than what I had before which was just every single entry, full text, all on one page.
I feel like I may be slowly getting on top of the symbian programming API. One thing you have to do is enable the full error codes for leaves and exceptions. There's a SIS file you can download to turn it on (sorry I don't have the link on hand). Then you can look up the errors from untrapped leaves and the system panic codes . Oddly, the term "panic" is used for user level application crashes. These would usually I think be more accurately called exception codes.
Another useful thing I've discovered is the way to grab the current free memory (in bytes). You can do something like this:
TInt memoryfree; HAL::Get(HALData::EMemoryRAMFree, memoryfree); TBuf<99> msg; msg.Format( _L("Free memory is %d"), memoryfree ); RFileLogger::Write(LOG_DIR, LOG_NAME, LOG_MODE, msg); Useful eh? You'll need to include hal.h and hal_data.h and link hal.lib. Note that this is NOT well documented! There is a better documented call that does something similar but it's deprecated.
I wish the Symbian API had string support that was more ANSI C++ strings, or just char * strings. I haven't really figured out "descriptors" yet (even though I'm using them...).
Here's some brilliant stuff from Bob Myers on Kuro5hin (who thought anything useful would ever show up there???). It's a primer for Japanese for Geeks . It presents the japanese language in BNF form and wow, it makes so much sense. You know, I took a year and a half of japanese and never understood the grammar half so well as I'm starting to now. Here's the second part and let's hope that he soon delivers part III... and maybe even more?
If like me you are forced to use Virtual PC, well maybe you still remember the good old days of Connectix. Back in those days VPC was like a badge of honour for Mac users, that a Mac company could be so clever to make it work. And you could install Linux on VPC and stick it to the man. Well, now you have to pay M$ cash to get the software but you don't have to put up with having their beige boxes and logo sitting in your dock any more. Introducing Tux'n'tosh , the perfect icon set for VPC. Personally, I chose this icon and now my screen is free of beige boxes once again.
You can download the Tux'n'tosh icons from XIcons for your personal use :-)
I just did some ego-surfing and for the first time I own the first page of results for Simon Woodside . Oh yeah, that's me baby.
Programming for symbian isn't very sexy. J2ME? That's sexy. But Symbian C++ is NOT sexy. First, at least in theory, you have to use Windows, and windows is NOT sexy. Two, it's C++, and frankly, although C++ may have had some sex-appeal in the mid-90s, it's all gone now. Three, it's poorly documented. What documentation exists is terse and seems to have been generated from header files. It rarely explains how to use the API. So for any kind of help understanding how to do it, you have to go to the examples, which are fairly limited. Next you can try NewLC: they have articles and forums . Next you might want to try searching the Forum Nokia discussion area . And finally, be sure not to miss the newsgroups. No, they're not archived anywhere on the web, which is a real pain. But you can access them through your favorite newsreader at publicnews.symbiandevnet.com . Only the NewLC postings are archived in google, which is a major hassle. There's also a small number of web pages and even some source code floating around on the web with some useful symbian C++ info. So there is some information out there, but you really need to dig to find it.
I found a solution to my long-standing VPC problem today. The trick was to add "airport" to my google queries. That quickly turned up this useful posting on macosxhints. It's a little bit complicated. You have to remember to go into VPC preferences and specify "built-in ethernet" for the network connection. For me, it's worked perfectly for both Windows 2000 and Linux (debian). I run smbd on linux, mount_smbfs the share onto the mac side, load up an XCode project for my symbian development projects, open an SSH window into the debian virtual machine to run 'make' and I'm all set with an environment that's almost like having everything on the mac.
I just got off the phone with "Daniel M."* from Microsoft technical support. I called them because I was having trouble setting up a network connection between VPC and the host Mac OS X machine. Specifically, Windows 2000 and Panther. But I also had the same problem with a Linux (debian) system I also set up on Virtual PC.
I figure Daniel is second-tier support because he called me and he doesn't have any way for me to call him back. I asked because my cell phone has a new area code and a lot of PBX systems are unable to dial it. I wanted to call him back from the cell phone so I could use the speaker-phone support it has but—no, this was not possible.
What Daniel told me is that networking is not supported by Virtual PC. "Virtual PC", he said (this conversation took place just a few minutes ago) "was only originally designed to connect to the web, the internet. Virtual Switch, for local networking, was just something added by Connectix but when Microsoft bought it, it's not really supported any more. We just left it in as a convenience. But it's not within our support boundaries. There's too many different possible network configurations."
I said, "so are you telling me that Virtual PC does not support local-area network connections?" His answer, "Yes."
Daniel is not the first tech support person I talked to. First I spoke with Michael, yesterday. Michael gave me my case number, SRX 0403 22605 XXX. For about an hour I tried to explain my problem to Michael. What I wanted to do, I said, was to do networking between the "guest" and the "host" computer. The "host" is my powerbook running OS X. The "guest" is Windows 2000 running inside Virtual PC. It seems (to me...) that it's a no-brainer that you should be able to connect between the two. But you can't. Even with Virtual Switch, you get two different IP addresses, and VPC fakes out the system with a fake ethernet address, and other computers (such as the iMac) see them as two separate machines. But you can't connect between them on my powerbook.
In fact currently in order to ssh between OS X and VPC I have to ssh first to my iMac, then back to VPC.
Not that anyone at Microsoft technical support has ever heard of ssh. They've heard of telnet though, and it just happens that Windows 2000 comes with a built-in telnet server. I could prove to Michael that it wasn't working because I could telnet from iMac to Windows 2000, but I COULD NOT telnet from powerbook OS X to powerbook Windows 2000.
Eventually, after about an hour, Michael tried to punt me to the Windows networking team. Now, I already know this is not a windows problem. Why? Because I tried the same thing in Linux and had the same problem. I knew he was trying to get rid of me and Windows people would not be able to help so I asked to speak to his supervisor. He connected me quickly. Finally, I thought, I was getting somewhere.
The supervisor's name is Kal "manager for support". Kal had the mistaken impression from Michael's write- up, that all I wanted to do was telnet. No, I patiently explained, I want to be able to do full networking back and forth between guest and host — file sharing, telnet, even browsing web servers I would set up on the opposite virtual system. Kal said he'd look into it and call me back.
That takes me to today with the call back from Daniel. Daniel was pessimistic from the start. He'd never heard of ssh either, and he wanted to try something "simpler" — windows networking. At this point I realized I wasn't going to get anywhere. He then proceeded to disclaim for a while that it wasn't really supported anyway.
So, Virtual PC doesn't support networking. Who knew? I should ask for my money back.
* last name removed to protect the maybe innocent.
Update 2004/03/23: Virtual PC Help says: "Under Mac OS X, a PC may communicate with the host Macintosh, with other PCs using the Virtual Switch, and with other computers on the network."
Update 2004/03/24: I talked to Daniel again today. He said he'd brought it up in a meeting and so I think he meant to say he was taking it seriously. I told him about reports I'd read on their own newsgroups that wireless networking was responsible for the problem. Later, I found a solution .
I think I'm travelling relatively untrodden turf with sdk2unix . So here's another thing I got hung up on and figured out. Probably someone with more makefile experience than I have would have got this instantly, but under OBJECTS you have to have applicationname.o FIRST or else it might not work. That's because the way it's set up, that particular rule will fire off the creation of the .rsg file which is some kind of generated resource file your source code needs or it won't build.
If you're writing symbian C++ code you might get an error like this from petran:
ERROR: Dll 'MENUITEMS[10008AD0].APP'has uninitialised data.
this page has a somewhat-adequate description of the problem, but you really should google for "bss segment" to find out what they're talking about. Since you can't build for symbian with this stuff in your code, you need to find and fix it. But the problem is, the error doesn't actually tell you what the offending code is. There's some stuff about .map files but they admit it won't show everything. Well I'll tell you what to do.
First off, you're looking either for an non-const global variable with no initialization e.g., int foo; or for a static local variable in a function. Now using sdk2unix add the following to your CFLAGS in the makefile: -save-temps This is the gcc flag that will save all of the intermediate files as it builds. Included is the .s files which I think are assembly language. grep these files for "bss"
grep -i "bss" *.s
If you see one, less or more the file and have a look at what comes after the .bss directive. A few lines down should be the name of the offending variable.
If you're getting "has initialised data" the solution is probably similar but you need to look for the data segment.
I was doing a quiz over at FunTrivia (which is very cool, and run by Terry Ford ), and I found out about these amazing trees, the Mountain Ash (Eucalyptus Regnans) . They grow up to 100 m tall. In this picture (left) you can see them relative to a car.
Today I ported the decoding porting of my semacode application from java to C++. As a part of the process I first went to ANSI C++, using C++ strings and couts to output to the console. Then, I make my own simple character buffer class and eliminated the C++ strings which aren't supported in Symbian. Symbian has it's own system of "descriptors" which are O-O and to my noviciate mind seem horrifyingly complex. So my software spits out its result as a simple char* C string.
Next I compiled and built the simple "helloworld" example from the nokia series 60 examples pack. It comes with the SDK. At the point where the code inserts the "Hello" literal I replaced it with a call to my decoder (which contains at this stage a test pattern). Then I turn the C-string result into a descriptor. As far as I can tell, there doesn't seem to be any API in symbian that will do this conversion for you (!!) although this page seems as though maybe it offers some hints. I can't tell. Anyway, a search in google found me this post on NewLC with some code that did the trick. I added my ported code to the helloworld code, installed the result and ran it and got a nice URL output on the screen.
I've been playing around with the site a little bit. Apart from the obvious cosmetic changes, I also implemented, finally, real permalinks for my weblog. So when you click that little # after each entry it will take you to an individual page for the entries from that day. Also, my webcounter seems to be approaching 20,000 hits. Doesn't seem like that long ago it was 10,000. here it is . In another note, google updates its image of my weblog really frequently. For example, if you enter symbian C++ linux I come up with my weblog entry as #4 at the moment. I wonder what will happen when it slides off the front page though?
Ever since the Hachette dictionnaire francais disappeared I've been hoping to find a replacement. There are plenty of good translation dictionaries available. For example there's the incomparable Grand dictionnaire terminologique where you can find technical words translated and categorized by field of endeavour. Fantastique. But now I found another source for a straight french dictionary, with definitions in french: Tresor de la langue francaise informatise . Surprisingly it's not in DMOZ yet.
Hello world! I'm typing this in using the tiny numerical keypad on my 3650 and i have to say it's pretty damn awkward! I am using putty, an ssh client for symbian.
Later: That's right, I logged into my server using ssh from a cell phone. I had to type all the commands in using the numerical keypad. I'm not quite sure that it will ever be of any use though.
After a week of messing around with windoze and linux toolkits, I finally did a successful build and run of an example app on my nokia 3650 using Symbian C++. Was it any of the toolkits I've already mentioned that I used? No, it was sdk2unix , a seemingly wonderful (hey it works!) distro by Rudolf Koenig and distributed at the Knowledge-Intelligence AG site (some kind of german company). They've got howto's for a bunch of symbian platforms, but note in particular the Series60 (SymbianOS 6.1) SDK on Linux/Unix HOWTO which is what I followed.
In addition to what they say there I would add the following notes:
- It worked for me with the 1.2 nokia SDK (it's not clear that when the howto was written 0.9 was the latest)
- when you run bin/install_gcc539 you must give absolute paths
- target-directory is the same directory for both bin/install_gcc539 and bin/install_series60_sdk
- you will have some minor troubles with case-sensitive names ... I just renamed directories that were expecting something different.
I had to do some hacking a little bit to make it all work .... I can't remember everything I did right now. I used Chris Davies'unpack-s60cppsdk to unpack the nokia SDK under linux. I found that when I went to 'make'in the series60ex/form example I had to fix the case of the include files in a bunch of .cpp files. (i.e., make them lowercase).
Overall I am VERY happy right now because this makefile system actually makes some sense. The bldmake and makmake and abld crap from symbian is just crap. So, hopefully this success with the example will be followed by me successfully writing my own little hello world program soon! :-)
The project named GnuPoc a Symbian SDK for GNU/Linux. What is this? It purports to allow you to develop all your Symbian C++ code on linux. I installed it this week on a fresh debian system. Installation, I have to say, was not exactly trivial. There didn't seem to be any particular HOWTO that covered the Nokia 1.2 SDK very closely. I installed, configured, and built the series60ex/helloworld project finally, got the thing to generate a .sis file, installed it on my 3650 and... nothing. "System Error". That's all. So what gives? I have no idea.
Now I'm starting to wonder if anyone has ever used gnupoc for a 3650 as the target. Seriously. Because all of the recent examples on google are for Sony-Ericsson phones like the p800 and p900. Dunno why that is. But apparently at least one person has used it for 7650, which is basically the same phone as the 3650, so maybe there's some hope.
Technorati Profile . I just listed my blog with technorati and they want me to put that link into as a flag for their spider or something like that. Are they trying to boost their google results or something? Who knows.
My links page has no pagerank. Neither does my writings page . But my AxKit HOWTO has 7/10. What's up with that?
After years, years of avoiding serious Windows use I'm finally having to wrestle with two Microsoft products. Windows 2000 and Virtual PC. Although the "Virtual Switch" mode of VPC is specifically intended to allow you to log into the windows box as a separate entity from the host Mac OS X box, this only kinda sorta works. I can log into VPC from a different computer—the iMac in the other room for example. No problem. But I can't log in from the same machine (the host). So for now my workaround is to create a circular connection where I mount the windows drive on my iMac and then mount that on my powerbook.
I'm also running cygwin in Windows and logging into that. Layers.
I just installed Virtual PC 6.1 and it's actually faster than 5 was by quite a bit. Also my google pagerank is 6/10. Is that high? I can't remember what it was last time I checked.
It's just an anecdote, but
When I was working with the White Marline Porpoise Circus in Port Aransas, Texas, I watched a dolphin there, named Pete (a bottlenose from Florida) do a similar thing. There was a pelican that would steal his fish if we threw them in the wrong direction, so it seemed Pete was tired of this. One day between shows, we noticed about 8 fish, about 2-6 inches under the surface, in a circular ring, fairly evenly spaced. As they would sink, Pete went around to each one, pushing each one in turn, to the surface. The pelican appeared interested and wary. After about 10 minutes of this, the pelican flew and dove for one of the fish—Pete grabbed him, and took him to the bottom and drowned him. First time I had thought of this as "tool use". This shows that the behavior occurs in tursiops as well.
The author seems to be an unusual person as well (and a PhD).
My goal with the wireless-longhaul mailing list was to create a truly global list for discussing Wi-fi over long distances. Urban and rural. This month there was an exchange that I think shows it's worked at least somewhat. Looking at whois and google, one poster is from Istanbul, one is I think in Congo, one is in New Zealand and another is in California. Four people, four continents, and all different kinds of society.
It's not the dolphins. It's the people who study them. The whole field of people who are interested in dolphins are slightly weird. It doesn't take much googling to divide into some special camps: the protesters, the romantics, the healers, the fun-seekers. The noise makes it difficult to find useful information on the web.
With that said, hopefully this article about dolphin basics will succesfully encapsulate some hard scientific evidence in an easy-to-read format. And yes, I found peer-reviewed papers for all of the claims that are in there.
How fast can dolphins swim? Very fast, as fast as the fastest boats. What's their average cruising speed? According to [1] it's about 8 km/h. They do sleep and when they sleep they don't move much. It is difficult to track dolphin travel over long periods of time but lately there's been some progress it seems. Check out this graphical view ("Track the dolphins") of three dolphins around Bermuda. Even with tracking the crew reported difficulty in actually finding the animals with their boat.
Day 3 Satellite transmission received from Ace Boy at 7:00 am placing him near the south west of Bermuda. The next transmission told us he was headed north east around Bermuda. We tried to catch up with him but we could not find him.
[1] Rohr, J. J. et al. Observations of Dolphin Swimming Speed and Strouhal Number. Space and Naval Warfare Systems Center Technical Report No. 1769 (Space and Naval Warfare Systems Center, San Diego, 1998)
I never wondered about that until yesterday. But now I have the perfect hook for one of the stories that's been swimming around in my head. Follow the link.
I got a "free gift subscription" to salon that I can give away. If you're a close friend or family ;-) email me if you want it. I don't know how long it's for though. Also I soft-reset my Nokia 3600 using Russell Beattie's instructions. Hopefully it will fix it. It was just randomly disconnecting calls for the last few days.
New way to speed read, and Axkit OS X update
Posted on February 14, 2004 at 12:00 PM
Categories: links, mac
This is amazing: A Speed Reader for some books by Cory Doctorow. It's based on some kind of PARC research. Try it out. Then compare how far you went in the normal book form. I was really surprised.
Also, I just updated my OS X HOWTO for AxKit on Panther.
I upgraded to Panther (OS X 10.3) a week or so ago and I started having troubles with my development environment. Not so much XCode, that seemed to be working fine. But I coulnd't get AxKit to work. And mozilla / camino to build (but that might be another story). So anyway I'm trying to build AxKit and getting horrible error spews when I try to install the XML::LibXML perl module. I try to debug it and I find there's just too many versions of libxml installed. I can't figure out which one it's trying to use. So after pruning out some versions, that didn't help, things seemed even worse. Finally I decided to nuke my entire fink installation. Someone said that fink gave problems when upgrading to panther.
Then I reboot my machine and it won't reboot. It hangs at a seemingly random place in the boot process. So I finally did what I should have done at first, which is forget about the "upgrade install" and just wipe out my old system and do a clean panther installation. I can do that, because I keep my home directory on a different partition. I simply create a symlink to it on the root partition. Works like a charm.
Now I'm reconstructing my system again. Hopefully this time it will work better.
I just posted the wedding movie from my cousin Dave's wedding last september. Relatives might be interested.
Mike Pinkerton, lead for Camino, just landed my history patch. This is my first major patch to go into Camino, it's about 1000 lines of code changes or so. It fixes the history view so that you get to see a flat, time-ordered listing with daily folders.
I just posted another alpha of the screen saver. This one fixes the anti-aliasing problem and adds a requested feature to speed up colour animation. Get it here.
I also posted some new gallery images. It really doesn't compare to seeing the thing in operation, but maybe you can get a taste for what it looks like. See more.
By the way the nifty gallery widget is AxKit::App::Gallery by Nik Clayton. It caches the thumbnails at smaller sizes to give the downloads a break, and it generates them automatically as well, so less work for me.
The server is back online. It was never really down, so mailing lists on openict.net kept working, and maybe some other stuff. But AxKit was down because mod_perl was down. Now apparently an update of apache has fixed the problem. I remind you that debian dist-upgrade is NOT something you should be running every week.
Do you have Mac OS X? Download my screen saver . It's powered by OpenGL. It draws about 60 000 primitives per second now on my machine. I suppose to make it any faster now I'd have to look at the math logic and method passing. Also in this version is the option to draw points instead of lines. It's on by default because I think it looks better.
So my sysadmin has broken his server again. No, this time it's just mod_perl that's broken. I think he uses debian package distupgrade without actually paying attention. Not a good idea. So none of my sites work. I have forwarded this site to my own computer for the duration of the outage.
My new screen saver is AMAZING. Not what I posted yesterday, but what I've got now. It's wow. I'm running it on my desktop right now. I'll post it later.
I just released my first ever screensaver. Get it here .
I just released a new version of FractalTreesX . It's a total alpha, complete with loads of bugs and some very odd behaviour when the size of the tree changes, but it's a LOT faster. I think it's probably about 3-4 orders of magnitude faster now. And the code is completely rewritten and I am MUCH happier about that. I would even say go and read it, because it's pretty good looking. I removed the total spaghetti that someone (initials are MYI...) told me was a good way to do it and replaced it with a nice simple multithreaded engine.
The case of the monopolized undersea cable . Fibre optic undersea cables are the backbones of the internet (and the whole telecommunications structure of the world). So what happens when they build a new one but one single company controls a monopoly over the landing station where sea meets land? Read this to find out. This same situation is occuring in Africa as well, but it's not as well documented.
This is kind of fun. The "Digital IQ Test" . I scored 196. There really isn't enough discrimination at the top. Also, apparently they think that "Most files on the Mac can be read on a PC" is true, which I would disagree with.
IE for Windows' problems would be cute if it wasn't so popular. So it turns out that @import directives in a CSS file aren't supported in IE... if they contain a media type. Which mine did ... so anyone looking at parts of the site in IE was getting a seriously garbled output. Well, I "checked" in Virtual PC just to be sure things were looking OK and they weren't. Now it's fixed. I still love that shade of red .
US government is finally taking action on spam. Now we can set up "spam bounties" ... I would love to see bounty hunters going after companies that use spam, at $1000 a pop :-)
Do you like that shade of red as much as I do?
Mike Pinkerton says that he's making some progress on the Panther drawing bug. That's good because any kind of 0.8 release of Camino would have to have that fixed. Also since I don't actually have panther yet, I hope that I don't have to upgrade to look at this problem since I'm still happy waiting for other people to make sure panther doesn't have any big stupid mistakes in it.
Imagine there were some kind of mysterious link between open source and open spectrum. Now read this .
Civil Society flexes its muscles at the WSIS
Posted on November 16, 2003 at 12:00 PM
Categories: tech
The Civil Society group at the World Summit on Information Society issued a powerful media statement today. Read it here . They basically say that the governments aren't going anywhere and that CS is going to go off and do it's own thing as a response to that. They don't need the governments ;-) For those of you just joining us, there are three main groups at WSIS: business, government, and civil society.
I just had this brainstorm that open spectrum should be thought of like an open source license. So that, the government would issue an open spectrum license for anyone to use a specific technology (e.g. spread spectrum) on a specific set of frequencies (e.g. 2.4GHz). But what would be the "Free Software Guidelines" for open spectrum? What is essential and what isn't to have open spectrum. If you're interested in the intersection of open source and open spectrum, check out (and reply to please :-) my post on the Open Spectrum mailing list at OpenICT.net .
Improving internet access in developing countries is a special report from the Development Gateway. It's special to me because they included my paper on Wi-Fi for rural communities. You can look at their copy (PDF) or at my copy (HTML).
Useful "newslog" on mesh networks
This should be required reading about IXPs (internet eXchange points): L2_Route_Reflector_IXP_v0.4.pdf
Connectivity is not the right word
Posted on November 07, 2003 at 12:00 PM
Categories: tech, theories
I was thinking recently about fate sharing in a number of contexts. One of them is this server. It goes down occasionally. What's nice is that a number of people who all have the technical expertise to make repairs share the use of the server. So, when something happens, any one of us can step in to make repairs. Each one of us is motivated because we all share the same fate. If the server is down, it's down for all of us.
Next is the context of a technology incubator. In Waterloo, there has for a long time been a desire to build a technology incubator, which is basically a building or a small campus with lots of small technology companies at one shared location. There's all kinds of good reasons for doing this. One is because all of the people and companies start to share their fate. Small technology companies fail all the time for reasons that are just "because". Not because the people weren't good enough, but just because the market is random and lots of good ideas don't work out. But, with a shared fate situation, people can graduate from one company to another easily. Reputations are known through the social networks that build up in a close environment. In addition, things like internet connections, server rooms, IT infrastructure in general can be shared and you get the same reliability gains that I get with my server.
You probably have to pay to read that. I don't know. I paid a long time ago for Salon. I think it's the only US journalism worth reading. Anyway, the story is an interview with a guy who used to work at Fox, and described the ways that they slant their news.
Lisa Rein says I'm her hero this week :) OK, yeah, it's nice to get credit :) And yeah, I was pretty patient ;-)
Check out the link. You'll see "thanks to ... simon woodside". I did ton of work on this bookmarks patch. I won't go into the gory details, maybe in a few years. One problem with being a "program manager" (ala Apple and Microsoft) is that you can't take much credit for what you do. Mostly it's "glue" work and we all know how much credit glue gets. I do like to get credit for what I do. So, in that sense, the program manager type role is kind of unfulfilling.
I don't know really what to do about that. The individuals who I work with / have worked with I think fully appreciate what I do/did as a program manager. And I say "did" because this most recent experience kind of nudged me away from taking on that kind of job again. On the other hand, it's cool to see Camino moving again. I think I played a fairly central role in that.
OK, make that funny but TRUE:
From Microsoft, we just want products that don't completely ream us. From Apple, we want the entire world to seem a little friendlier and cooler with every product release, every dot-incremenent OS update. They both disappoint us, but the expectations seem a little different...
In fact there's lots of good comments in this story about the VT Mac OS X (!!!) supercomputer (by the way it's running Mac OS X !!!!)
Read this and then ask me whether or not I'm going to insert the rdf:about attribute into my weblog's RSS 1.0 output. I'm not going to repeat the same damn link URL twice in my data just because some RDF weenies think there's a difference between a URI and a whatever even if they are both the same, character-for-character. Since the name "link" just makes more sense, and it's used by more people, I'm using that.
For some reason I've been having a mini Marilyn Monroe kick these last few days. Well, inspired (or maybe bored) by an out-of-inodes failure on cvs-mirror.mozilla.org I dashed off this little piece of contretemps: Inodes are a girl's best friends .
To log Mail.app's activity on a specific port, launch it from the Terminal. Use the option: -LogActivityOnPort ## where ## is the port number you want to watch. 25 is for smtp, 110 is for POP.
My email magically fixed itself today. The estimable Mr. Paul Schreiber is a bit miffed because he lost his error logs and now he won't get a chance to yell at Yahoo! or the Mail.app team or whoever was responsible for my emotional distress.
MIT's Media Lab has a weblog by interactive cinema group , where they use Nokia 3650 camera phones to make little videos. The videos are stored in a format that ends with .3gp and thus presumably has something to do with 3GPP. But they use the H.263 codec. The video is tiny, and the sound is poor, but it's a start.
The MMC card is a new alterative to CompactFlact and Secure Disk (SD) cards. It's a tiny little card that is designed for the cell phone market, and currently you can get up to 128MB cards. Incidentally, the Nokia 3650 accepts MMC cards. Someone uses it for something I consider a little odd Loud Thinking uses a 128MB MMC card to load simpsons and seinfeld onto the card, plugs it into the phone and watches them on the phone, on the train.
Wi-Fi networking is also creeping into the cell phone space. With 3G still in vaporware stage, people are trying to make do with 2.5G standards like EV-DO and 1xRTT. The speeds on these cell phone data standards aren't so great, and upload is quite low, maybe 40Kbps. (Thanks to Alan Reiter for some of this info and stimulating discussion). With hot spots spreading, and companies installing blanket Wi-Fi networks, people are starting to add Wi-Fi support to cell phones. Mostly these days it's for VoIP purposes, but data is data. In fact, at least one article already mentions video applications.
3GP is in my opinion too poor quality to be interesting. But, MPEG-4 ISMA layer-1 is a better looking video codec/format. I used it myself for the videos here. It runs at 50KBytes/s which is too much for a 2.5G network to handle, but fine for a Wi-Fi hot spot backed on a business DSL line. Also, the data rate is small enough that the previously mentioned 128MB MMC card could hold 45 minutes of video.
Put it all together and what you have is a "video phone" a cell phone with video capability. People might use them to capture moments on the street, with friends, at the club, etc. I don't personally have any interest in that. But lots of people already do this with their camera phones, so it seems reasonable to think they'd add video.
Ludovic Hirlimann has a weblog where he talks about Camino sometimes. And for the rest, practice your French ;-)
I'm having serious email problems receiving email. I just got off the phone with one of Apple's OS engineers who also happens to be a friend ;-) and we've determined that it's definitely not my fault ;-) I'm blaming both Apple (makers of Mail.app my client) and Yahoo (I use their paid POP access for much of my email) for screwing everything up. Not only is the POP data coming from Yahoo corrupted somehow (we looked at the protocol stream) but also Mail.app managed to actually DELETE messages and corrupt others. So, if you wrote me in the last 2-3 days, please send it again! I may have lost it...
Hopefully now I have a relatively safe (but time-intensive) workaround. But I hope that on Monday Paul can kick the *** out of whoever is responsible for this cock up.
Today I have a new movie of the World Cycling Championship up on the site. It was shot this afternoon and edited this evening in iMovie. My camera is a Sony TRV22. Here's the blurb that I wrote up for the page, and you can go straight there by clicking on the title of this entry. The music, I nicked from a 1983 german classic.
On October 11, 2003, the World Cycling Championships were held in Hamilton, Ontario. I went with my camera and shot some tape. Forthwith is the result after a bit of editing. What you see here is the Women's Elite race, actually just one of many races over the three-day championship. The leading racer in the film is Jeannie Longo-Ciprelli (France), who broke away from the pack in the 8th lap of 10 total. You can see here the racers going down the Hamilton mountain and then back up again, the final climb before the end of the race where a group from the pack are catching up to Jeannie is the last shot. For those who care to know these things (I don't really) the winner was Susanne Ljungskog (Sweden), and Jeannie came in 6th.
It wasn't exactly intentional, but it seems that my camera managed to linger on the Canadian Lyne Bessette! I have actually a couple of close ups of her, even though I didn't know it was her at the time. She's wearing a light blue jersey and shorts, and has a canadian flag and the Tim Horton's logo on her thigh. She's also 103 by the way ;-)
I've been having SERIOUS problems with Yahoo! mail in the last 24 hours. I pay extra money for their POP service. But some kind of wonky message got stuck in Mail.app on OS X and I'm pretty sure the problem is Apple's. Almost as soon as I had that working again, though, suddenly I started having trouble accessing my Yahoo mailbox, even through the web interface. I just couldn't download my messages. I've been getting partial downloads as well. It's really annoying.
I wish I knew someone who works at Yahoo. If I have trouble with Apple or Google I can just pick up the phone and start bitching to someone in the know. But not with Yahoo.
The problem is on-again, off-again and seems to coincide with failures to access on the web sometimes, like just now. I think this is Yahoo's fault.
I wrote this timeline of the UW CECS.Online project up over period of time but actually I was able to assemble most of it from past research I had done. I refrained from editorializing so far in the post on UWS (which they posted to reader-directed content without telling me...) and on uw.general but now I'm going to do it here.
If you read the document you might notice that there's a lot of predictions. In fact official sources predicted that they'd be done with CECS.Online in the following years: 1998, 1999, 2000, 2002, 2003, and now, the latest estimate is 2004. In other words, since 1997 they predicted they would be done within a year, almost every year. Estimating software completion is difficult and lots of projects take twice as long as initialy thought. CECS.Online, at latest estimate, has taken 7 times longer than initially estimated, if you accept the latest prediction.
What causes a foul-up like this? I think that the external Review of IT (PDF) was very insightful when they stated that UW no longer has an IT department capable of writing new applications. They make their point very subtly on page 6. I remember reading it initially and coming away with this implication quite clearly, but it's difficult to pull out a direct quote. I can only assume that the authors did not wish to offend anyone directly. But their conclusion is clear.
What can be done? The matter rests in the hands of the provost and the other top administrators at UW. They will be appointing a new head of IST shortly as Jay Black's term is just about up. It's tempting to wonder who in their right mind would take the position without a clear mandate to clean up the mess. If the administrators give the new IST honcho a clear mandate to implement the recommendations of the review, I think that change can be made. One major change must be in personnel, in order to sideline the IST managers who are getting in the way of progress. Another must be an increase in budget so that IST can hire and retain quality people and give them space to do their job and do it well.
IST is an organization in the trenches. From the outside, it's impossible to say for sure but they seem to have some serious personnel problems with some of their senior managers. It's extremely difficult to get rid of people in a university bureaucracy. Aside from their internal problems, they have high expectations and low levels of respect. The rest of the university community quite rightly feels that it is an expert computing community. IST can be only of the highest quality to be respected in such an environment. And equally, to satisfy what must also be high expectations for results with lots of opinionated observers who think they could do it themselves (and probably can). There may well be a long-standing siege mentality at work.
In order to crack that open and restore functional IT service at Waterloo, changes are necessary. The external IT Review is a good roadmap for those changes. It will be interesting to see if the senior administration follows through.
Taking the pulse of XML editing
It's a good article. Also, I think that XML fans are also people with big vocabularies.
After the first release of Alexandra, I discussed with several people a major flaw, which was that it did not preserve the RNG order as given in the schema when it added or changed elements. I was concerned I would need to use some sort of database update-type scheme. I wasn't keen on this as the only xml update project that seemed to be anywhere near a state of completion was XUpdate and it wasn't very complete, and also seemed like a hassle. I realized later that I could generate XSLT to do the update. More recently I was working on how to pass through the positioning information for both elements that are already instantiated and ones that aren't. I seem to have that completed now. So, at this point I believe it is possible to generate only RNG-valid instances using alexandra.
Sudhakar "Thaths" Chandra posted some amazing pics of his visit to Kenya . Wow! Via silklist
Moreover, as software is often built on the achievements of others, writing code could become a legal hurdle race. By analogy, if Haydn had patented the symphony form, Mozart would have been in trouble.
The parable of the net , a new article on ICT. The nets people use to catch fish are a lot like the nets people use to catch information. A net is a big thing made of lines with lots of holes in it.
I just updated the weblog on this site to the axblog release. In addition I have converted over the front page from displaying full blog entries to just a synopsis (just the first 200 characters for now). You can view the whole entry directly by clicking on the [...] link or view the most recent weblog entries all in one go by viewing simonwoodside.com/weblog or clicking "What's New" or whatever.
An update of AxBlog to what I use currently here and on openICT and semacode.org
By the way, my point with all of this VoIP nonsense is to point out that it's not one thing, it's two things, IP Telephony vs. Voice Chat. That's my opinion.
The VoIP paradox . Voice over IP is paradoxically both internet and telephony at the same time. Presents the paradox and background information.
A friend of mine bought me NeverWinter Nights for the Mac as it was released about two weeks ago. Well, obviously I've been playing the game ever since then, I finished it yesterday as a matter of fact. I played Barbarian. Spoilers ahead. I was very happy to be playing a berserker since it's my favorite style of play anyway. I like to just charge into combat and hack away. My solution to traps was just to walk through them, I had a huge number of hitpoints and so on. My henchperson throughout the whole game was Sharwyn, the bard.
So I didn't actually read any of the instructions because I know the D&D 3E system pretty well and I figured I'd just give it a go. I was pretty amazed overall at how well the system honours d20. It really brings it to life. Some of the rules that are too much of a hassle to use in the table-top game (like power attack) come to life, and some things I didn't recall became obvious after a while. Did you know that the barbarian retains AC bonus from dexterity even when he's flat-footed?
I have to say that my knowledge of DnD I think gave me an advantage. I found the game to be pretty easy overall. The main challenges included the bloated dire spider, which just kept knocking me over and poisoning me. This lead me to buy myself the Amulet of Health, which is a fantastic bracelet with immunity to poison, disease, and negative energy. That's a relief! Lots of easy snares for the barbarian in combat go away there. Later on I found magical items that added immunity to mind-affecting spells, damage resistance 15 to all elements, And more. In general it was a power gaming adventure. I think that my own knowledge of how all the items mixed and matched helped out as by the end I was basically immune or heavily fortified against anything a wizard could throw at me, and my character had a high AC of 35, so he was pretty hard to hit as well. I did go though magic healing potions at a high rate though.
Overall the campaign story was disappointing in my opinion. In fact, After a few of the "Waterdhavian" creatures I basically gave up and read the walkthrough. I was not surprised to find out that the plot was fairly predictable DnD pulp fiction fare. The plot in fact was nowhere near as good as Myst. The best part of the game by far was the Charwood forest, which I thought was well done. This is interesting because that's the only part of the game where your character had multiple choices to make that actually had an impact on the other characters. It may not have been significant to the campaign, but it mattered in a more personal way. The rest of the game was basically a railroad, with the illusion of choice in terms of which of the four sections you chose to explore first in each chapter. But the truth was that it didn't matter, since they would all scale to present a medium challenge no matter what order you chose.
So that's the real difference between this game and a good tabletop game—I really want to have the choice to make a serious difference in the campaign. NWN also includes the ability to play online with friends, so I'm going to see if that's any better.
For what it's worth the last games I played through to the conclusion, were Karateka , Myst , Prince of Persia and Riven . It's interesting to note that those four games were only made by two groups of people... games are like that I guess.
Not only does this virus generate annoying quantities of spam from a single source, but it also causes stupid virus scanners to generate annoying replies to the wrong people. Something along the line of "your email was rejected because it contained a virus". Don't they realize that the sender address was forged? Grr.
But then I wasn't hit so bad. I "only" got about 100 messages when the virus hit. I've seen others who got thousands. Also I'm immune since it's a microsoft email virus only.
The Cellular Operators Association of India claims that for every one percent increase in telephone penetration there is a three percent increase in GDP.
Not bad eh? There's your argument for expanding ICT programmes right there. From A social ecology of wireless technology .
I've been trying to grok the VSAT alphabet soup lately. This post on isp-satellites seems like a pretty decent summary of the different two-way VSAT flavours. Basically it sounds like SCPC and DAMA are connection-oriented protocols with call set up and dedicated bandwidth during the lifetime of the connection. Of course I'm translating into internet terminology here ;-) On the other hand, MF-TDMA, which other people call FTMDA and which is used by DVB-RCS, is more like a packet-oriented connectionless protocol. The mapping onto the cell phone networks makes sense.
Two video streamed lectures by Jun Takei also helped me understand the basics. Takei-san clearly is an expert and has lots of interesting things to say. lecture 1 is an introduction to satellite data comm. lecture 2 gets into more internet over satellite detail. His english is not fantastic but good enough. And it's a high-quality, 250Kbps stream, and you can follow along with the slides on the web. Takei has his name on a couple of RFCs as well.
I'm involved in the Camino project for Mozilla. It's a pretty face for the Gecko engine basically. Recently the whole Mozilla project was transferred to a new foundation. Mike Pinkerton was moved to a different job at AOL but he's got the nightly builds going again and I've been testing out David Haas' rewrite of the bookmarks manager. Looks good so far. It includes some novel features that I think might be cool, like a top-ten list, and Address Book integration. Could you manage all your bookmarks in the Address Book?
So I kinda sorta have a computer that's finally capable of running WinCrap32 on my powerbook, and what do you know I need to install service packs. Galore. It's so precise that it tells me exactly how many and how big they will be:
Total: 19 = 10.600000000000001 MB
What the hell is that???
Basic transit and IXP peering . Just the facts, ma'am.
Simon Woodside hacks on computers for a living. All of the computers he hacks on are his own. He has done time as a program manager for an operating system that recently won Best Product from the 2002 Technology of the Year awards from InfoWorld. Prior to that he suffered through an education. He currently pursues interests as they come to him, while trying to patch together a workable lifestyle.
What is the different between internet peering and internet transit? Peering is when you connect with another ISP for the SOLE purpose of exchanging traffic that is going DIRECTLY to that other ISP. On the other hand, Transit is a connection that will carry traffic anywhere on the internet. So, how do you choose which one, or what mix and match of the two to use? Try this 127 page thesis .
There's an original (very) short film now available from this site. It's called Still Life and you can view it right here (2.6 MB, 48s). It's encoded in MPEG-4, ISMA compatible format with a low data rate but I think the compression looks pretty good. I think you should be able to watch it on any system that has QuickTime 6 installed, Mac, or Windows. Not sure about Linux. If you are unable to view it PLEASE contact me. Enjoy.
Update: I just tried it and it plays just fine in mplayer OS X, so I think that means it will work in mplayer on Linux, etc. as well. mplayer rocks.
I might as well have called this entry voice chat != IP telephony. I've been think about Voice over IP for a while now and reflecting that the IP telephony people are kind of wandering around in the giggly weeds because they keep taking about crazy things like sending DTMF tones over the internet, and needing special hardware and all kinds of crazy stuff that totally goes against the e2e (end-to-end) principles of the internet. I mean, why bother with all that when you can just set up an e2e connection between two computers and start talking? Finally I got the answer, which is that internet telephony people are not talking about voice chat, they are talking about telephones.
Whoa, slow down. Telephones are not a best effort network, they are a guaranteed service network. The internet, if you use it, will try its best to do what you want but if it can't, hey, too bad buddy. That's a fundamental operating assumption, you can't change that without changing the nature of the internet. If you want to build a guaranteed-service network over top of the internet you're going to have a lot of trouble, because the internet is build up and down on best-effort systems — like ethernet for example.
So I think that when people talk about "Voice over IP" they need to be really clear about whether they mean a best-effort system or a telephone-like system. Some people seem to think that VoIP should keep working if the power fails. And so on, there's a lot of assumptions built in when you talk about telephony. The other side of the coin would be something more like a voice chat, where you are able to talk to someone anywhere at any time on the internet, but it's just like any other internet services, so you can expect there to be glitches. That's a fundamental part of best-effort networking, and it's also part of why it's so efficient and inexpensive.
So can VoIP be done over the internet without all kinds of crazy hacks to make it act more like the telephone system? I think so. The codecs are finally here to do reasonable voice quality over a modem connection, using Speex . IPv6 will hopefully help us get around the NAT barrier.
Got myself a new computer now. The old one was getting pretty old (2 years old almost exactly) and sloooooowwww and not enough disk space. I was actually at the point where I had to build mozilla on the other computer because I didn't have enough space. Now I've got 60 GB of space, and a nice new faster 1 GHz processor and some other nifty unexpected benefits like more pixels on the screen (although the size didn't change) and some other stuff. I think the battery lasts longer.
Anyway in the last day I've been dealing with the usual environment having to get my environment installed properly again. Camino needs glib which I didn't have installed from fink and it wasn't on the list, so I wasted a day building camino and then trying to get it to recognize that I had actually installed glib. I wound up deleting the configure output files by hand because the new camino.mk doesn't seem to clean them automatically.
And stuff.
So, I added a feature to view the docbook source for those documents that actually have it. So far it's only activated in the ICT section but I'll probably turn it on for the other parts as well. The idea is just that you can add ?show_source=YES to the end of the URL and get the DocBook (XML) source. If it's not DocBook, nothing will happen because everything else is just XHTML anyway, you might as well just view the source in the browser.
AxKit already has a way to do this using configuration directives in the apache configuration files (aka .htaccess) but I've been avoiding config directives up to now and using Processor Includes (PIs) instead. It fits with my document-centric view of how this should all work. It wasn't too hard to reproduce the function in XSLT, using a <param> and I just had to add a bit of code to Norman's XSLT for DocBook and little code in another place.
I was having all kinds of trouble with my Airport base station, the signal just wasn't cutting through the house and I would keep losing my signal and Mail would just complain and Camino would complain etc. So I switched the channel from 11 to 6, and now, no problem. I have four bars where I used to have nothing.
It's all gone. It's all AxKit now.
Everytime I read about DocBook there's one thing everyone says, it's complicated. Well I don't get it. DocBook is not complicated. I mean, sure it's got a few hundred different elements, but you don't actually need most of them. You basically need, book, article, section, title, para, ulink, table, and informallist. That's it. All of those, except for section and title, map directly onto XHTML. Section and title, are actually better than HTML once you get used to how they work, and they make the magic that makes DocBook so much better than HTML because it's structured, not just presentational. Then there's the awesome XSLT stylesheets from Norman, so all you really need to do is make a few changes in the params.xsl file and write up a CSS file, and you're set to go. It's got all kinds of nice features like automatic table of contents building, indexing, etc. And if you ever discover you need to add a reference, or a quotation, you just pull out the reference and it explains what to do (with examples). You insert the right tags, and the XSLT does a nice baseline formatting job for you automatically. You can tweak to your heart's content.
So basically if you start writing with DocBook, you get a lot of good stuff for free. It comes with a bunch of good styling transformations.
It's the technique used in Mac OS X's Mail program to catch spam, it's patented :-( and it's described in an awesome paper An Introduction to Latent Semantic Analysis (PDF) by Landauer, Foltz and Laham. Wow, check this out:
To objectively measure how well, compared to people, LSA captures synonymy, LSA's knowledge of synonyms was assessed with a standard vocabulary test. The 80 item test was taken from retired versions of the Educational Testing Service (ETS) Test of English as a Foreign Language (TOEFL: for which we are indebted to Larry Frase and ETS). To make these comparisons, LSA was trained by running the SVD analysis on a large corpus of representative English. In various studies, collections of newspaper text from the Associated Press news wire and Grolier's Academic American Encyclopedia (a work intended for students), and a representative collection of children's reading have been used. In one experiment, an SVD was performed on text segments consisting of 500 characters or less (on average 73 words, about a paragraph's worth) taken from beginning portions of each of 30,473 articles in the encyclopedia, a total of 4.5 million words of text, roughly equivalent to what a child would have read by the end of eighth grade. This resulted in a vector for each of 60 thousand words.
The TOEFL vocabulary test consists of items in which the question part is usually a single word, and there are four alternative answers, usually single words, from which the test taker is supposed to choose the one most similar in meaning. To simulate human performance, the cosine between the question word and each alternative was calculated, and the LSA model chose the alternative closest to the stem. For six test items for which the model had never met either the stem word and/or the correct alternative, it guessed with probability .25. Scored this way, LSA got 65% correct, identical to the average score of a large sample of students applying for college entrance in the United States from non-English speaking countries.
and then they go on to say this:
When LSA chose wrongly and most students chose correctly, it sometimes appeared to be because LSA is more sensitive to contextual or paradigmatic associations and less to contrastive semantic or syntagmatic features. For example, LSA slightly preferred "nurse" (cos = .47) to "doctor" (cos = .41) as an associate for "physician."
because, of course, where you find a physician, you often also find a nurse with her or him.
So is this the start of something significant? Here we have this fairly simple statistical method (alas, patented :-( ) that can do some pretty sophisticated "learning".
What I'd love to see is for someone to appy this technique to non-human signals. Like, say, dolphin signals. Is it possible that an LSA could analyse a stream of symbols representing the signals generated by dolphins? (I call them signals rather than sounds because they far exceed the limits of human hearing). Then what? You would have an LSA that would in theory embody some knowledge of the semantic relationships in dolphin language. There would be some kind of test, at a minimum, to create a system that would respond to dolphin signals in real time with related signals, and then study the reactions.
I just read Soekris Router Project . Soekris in case you haven't probably heard of it is a little company that makes these fantastic little PC-compatible chipsets that are totally solid-state, no moving parts, DC power, just the basics, a couple of ethernet ports, a PC card slot or two, a CompactFlash slot for the media, and a nifty-looking box.
And I am very impressed. I can get a Soekris , net4511 , for about $170, and a vpn1201 for about $70 and a CF card for about $50, all told, $300 for the hardware and it comes with a nifty looking box ( inside ) from Soekris. This is going to be with an extra twist from me because I want to install 6to4 support. I'll tell you why in a minute ;-)
OK, so first of all this slackwerks HOWTO is going to get me up and running with a totally secure IPSec based WiFi network. That's just cool. Instead of all this WEP/WPA/802.1x stuff I will have real end-to-end encryption running between me and my internet gateway (did I mention this magic box is going to be my gateway?). Then I set up IPv4 NAT on the soekris, and an IPv6 firewall as well, so it's now the ultimate gateway box. And, I set up 6to4 on the gateway, and configure my powerbook running OS X with ipv6. I've got a free ethernet port on the soekris to connect up local wired computers, and the wireless ethernet interface for my powerbook. What next?
Now I pull up ohPhoneX , an implementation of ohphone from the OpenH323 group which just happens to support IPv6. Since my powerbook is running over 6to4 it's not behind a NAT in IPv6, so I can send my overseas relatives and friends my powerbook's IPv6 address and they can directly connect to me. No more NAT nastiness, messing around with the DMZ, or whatever, it's a direct connection straight into my powerbook's globally addressable 6to4 address. Now I'm doing internet telephony, for free, over a wireless interface, and it's all totally autoconfigure.
It would be very sweet if lots of people got up and running with a gateway like this :-) Forget about Free World Dialup , forget about Vonage , forget about any kind of silly voice gateway. This is the end-to-end internet, not the InterNAT (or NAPT). I pay for my internet service provider to push the bits, and everything else is free. Even though most of the internet isn't running IPv6 yet, we can all use this setup (or a similar one) to build out the next-generation internet :-)
Reboot is a tiny little conference held in Denmark somewhere, but they got all kinds of cool speakers this year and made videos of them all. Based on the cartoon summary I I wanted to watch the video of Tim O'Reilly s talk. It was good .. I recommend it. He talked about open source, and the move from software- oriented world to a data-oriented world. (via multiplicity )
In a galaxy close, close by, my hit counter moved into five digits. Woo hoo!
Find out how KDE is doing at translating their system and documentation into 40 different languages, look at the pretty picture .
The COOK report interviewed David Hughes about Wi-Fi .
COOK Report: So is it safe to assume that you can buy an actual 11 megabit per second radio for under $1,000?
Hughes: Yes.
COOK Report: Way under a thousand?
Hughes: Yes. But there is a difference between buying a Base Station radio - that can handle hundreds of client radios, and a one IP/MAC address radio - for the client end. Both prices have come down rather dramatically, with client radios now below the magic 'consumer'$500 price point. Which happens to be what I had to pay for a 1200 baud Hayes Micromodem back 15 years ago.
I just released the 0.01 (pre-alpha) version of Alexandra , a roundtripping forms system that uses RNG (Relax NG), XSLT pipelining (using AxKit of course...;-) and presents in HTML forms. There's an interactive demo to play with as well.
Just for the first time, I saw a posting on slashdot signed with a female name. (It was Allison.) This is the first time I can ever remember seeing that.
Yeah, I changed the font from verdana to just sans-serif. That means you, that's right — you! — are now responsible for choosing a good default sans-serif font for your system. If you're on Mac OS X, may I recommend Gills Sans for sans-serif and Hoefler Text for serif? They look very nice.
These — special ∆ characters ∞ brought to you by the letters U, T, F and the number eight. I set the text encoding in my editor and encoding= in the XML header. No character entities have been used in the making of this entry.
I just moved the weblog stuff into /weblog, and so the RSS Feed also moved. I also lost an entry I think. Oh well. Also more stuff validates now. Though not the weblog id's I'm using. That's too bad. But I don't want to change them, because I think they are nice.
If you're coming here from slashdot you might want to look at this other site I'm involved in OpenICT.net .
I just did some major updating in the "D&D subsite" of this website and amazingly enough, after moving around a LOT of files (seriously) everything still works. And, the Edion Sourcebook is now 100% XML ... DocBook that is. Well, my aim is for Simplified DocBook but I used an automatic converter so I'm not sure. The docbook stylesheet set is huge and it takes it a few seconds to convert the docbook to XHTML but due to the magic of Axkit's caching there's no delay as long as the text doesn't change.
Anyway.
Now read this ... Steve Deering gave a brilliant talk at the 51st IETF meeting called Watching the Waist of the Protocol Hourglass . (PDF) Fundamentally it's about end-to-end networking, which relies upon a very simple, ubiquitous protocol to run the internet. A protocol that's called (believe it or not) the Internet Protocol. IP is very important. Then, when you're done reading the incredible slides, go over to this page and watch the video! 22 minutes, Real , MPEG-1 .
Heh... this site was static content for like a week there because somehow AxKit got hosed when paul tried to upgrade it using debian apt or dselect or whatever. Man! What a nightmare. The only reason the site was still here was it was delivering from cache -- content generation was totally broken. Now I've got all the code loaded into my home directory and all of the libraries and perl modules are under my home directory so now I have total control and I was able to hack it back into working shape after a few days and some fudging with the server .conf with paul. It's back!!!
(and the wiki's on openict.net too ;-)
If you don't know me very well, you will probably benefit from reading World of Ends .
Many experts like, for example, Bob Metcalfe, the inventor of Ethernet, thought the Internet would collapse. Why does the Internet not collapse? Because everyone has an incentive not to go to a court, and not to go to a government when someone is preventing their packet from getting from A to B. If their packet doesn't get from A to B, they have an incentive to route around it. The Internet treats these things as damage and routes around them. If we decentralize the decision-making process to the participants in the market in real time, as opposed to assuming that ahead of time they can decide what the value is and transact.
Kevin Werbach speaks at the Stanford Spectrum Conference.
Some recent stuff. The wireless-longhaul mailing list hosted at OpenICT.net (a new site). The Longship project to do community development on Chimera. If paul ever gets AxKit 1.6.1 installed :-P then I'll be able to update openict.net with some nifty new axkit features.
It's a bit of a ramble, but The Realities of Online Reputation Management gives a very, very intelligent cross-section analysis of why the internet changes the world.
Ceci n'est pas une pipe -- enfin je le comprends. C'etait vraiement quelques semaines que j'ai venue de comprendre le message de cette image. Voila un collection brillant des peintures Magritte, debutez-vous ici mais prenez soin de faire voire toutes les images.
I finally understood the painting "Ceci n'est pas une pipe" (This is not a pipe) a few weeks ago. Now check out this awesome collection of Magritte paintings. Start here but make sure to look at all of them.
But here is the thing you will learn from really using an OS X Macintosh, and must somehow accept on faith if that's what it takes to get you to Switch: Apple makes design decisions based on a sincere desire to make your life better. Maybe they always did, but they've gotten better at it. OS X is not just less-bad than Windows, it's Good. Yes, Apple also have sleazy marketing weasels, and the salesdrone at the Apple Store in your mall may be the same woeful grade of maladjusted cretin as the one at Best Buy that tries to sell you $49 monster cables for a $59 VCR, but somewhere in California, in the back corner of some office building where they're deciding what should appear on the screen when you click the next button, somebody is asking themselves not only what could appear on the screen that corresponds vaguely with what you nervously hoped you hit the right button to make appear, but what could jump a couple steps forward and startle and delight you.
Yeah... just made some fairly dramatic changes to the XSLT for the blog... I managed to get rid of all the custom XML tags that were being spewed as part of the HTML output, so we're a little closer to validation here. Now I just have a small problem of IDs not being well-formed.
Just successfully moved this whole site into CVS, canned the site, checked it out and here it is. Now I can access the cvs from home and it'll be so much easier to do updates and also I don't have to be paranoid about losing stuff anymore. Cool. Also, I added the Creative Commons license (Attribution) to my ICT essays . Also, yes I know this site doesn't verify as HTML right now, because some of my custom XML tags are still showing up. Keep bothering me and I'll fix it eventualy.
Some very smart stuff about software and infrastructure .
Two new chimera mockups, "Mockup5C1" and "Mockup5C2" ... they are both the same, the second one shows how the "Others..." QuickMark works. Comments welcome!
Update: Are you ready? for ... 
What do you think of this hypothetical user interface for Chimera ?
Some thoughts on Using the open source model for (ICT) development . That would be information and communications technology, and the development in this case is the "international" kind.
Looks like I'm not the only person "switching" back to HTML 4.01. Here's why I did it. Oh yeah, and because actually everything's XML on the back end now and it just gets converted into HTML 4 at the very last minute by an automatic process that's part of XSLT. Actually on the server side, all of my markup being served by AxKit is either my own custom XML or XHTML right now. If you care.
I just switched the IT@UW weblog over the AxKit . So now it has the three most recent entries on the "front" page and the "archives" page has the complete set of entries. The data is being stored in the archives page and pulled from there to the front page using XSLT .
I'm starting to see the benefits of this AxKit stuff. Now I have all of my site updates in one file ( oldnews/(index.html) ) and this index page is pulling out only the last 5 (currently) entries automatically. The code is pretty simple: <xsl:apply-templates select="entry[5>=position()]"/> in XSLT. If you go to the Old News page you see if without the select= conditional so it shows you everything.
Another benefit I get is that the code has to be valid in order for AxKit to handle it, so my pages that use AxKit will be valid HTML 4.01 as soon as I work out a couple of little bugs.
I finally grokked the difference between XSL and XSLT. XSLT is a subset of XSL that is just for transforming XML into different XML. That's basically what I'm using (XSLT). XSL adds a lot of other stuff for styling documents. I'm not using any of that (right now anyway...) and plan to continue to use CSS for presentation purposes.
You are looking at this index page generated by AxKit. This What's New entry is in XML. You can look at the what's new stuff all by itself , but you'll see HTML there too right now. I'm typing this into my own handrolled XML format that's parsed by three XSL style sheets in a pipeline before being display, all processed courtesy of AxKit .
By the way, the output appears as HTML 4.01 transitional but I'm moving to an XML backend with XHTML for content for now. I'm just converting it to HTML in the output.
Have you heard of AxKit ? Neither had I. But I'm looking at tools for developing web applications. I'm lazy so I want to do as little work as possible. AxKit seems like a possible answer. Oh yeah, and it has to use perl ;-) No php or java for me. In fact, this site is all php, but really I'm just using it for SSI. Funny thing is that my server has PHP enabled but not apache SSI. Oh well.
Another spec for my hypothetical web application is that I don't want to use SQL. OK, I realize that's completely stupid, because my web app is going to need a database. But frankly I don't like SQL, the syntax is horrid etc. etc. etc.. (thank god I discovered MyPHPadmin). So I'm looking for a way to replace as much SQL with XML as possible... maybe even to the point of writing all my schemas in XML, using some kind of XML query language instead of SQL, etc.
Another reason I'm looking at AxKit is that it's fully buzzword compliant. I'm slowly grokking XML and XSLT (as usually, they are turning out to be pretty obvious once I figure it out) and they do seem like powerful tools. EmbPerl was the other tool I was looking hard at... but there's no HOWTO for OS X, and there is one for AxKit.
In other news, I've made some discoveries about CSS that are making my life a lot easier. Instead of having to put class="foo" in each
tag, I set up a div class that applies certain styles to it's
children. And here's where I finally figured out where the "cascading" part of CSS comes from. It's not in the .css files, but in the actual content where the cascade occurs. Am I the only person in the world who didn't find that obvious from the CSS documents all over the place. So, check out the source code to this document to see how much easier my life is with this new system.
I made a mistake in the final copy of the IT Review Letter, so I corrected it and re-sent it to the Review board. Fortunately just ahead of the deadline!
Just posted the final copy of An Open Letter to the IT Review board at the University of Waterloo . It's pretty long, but apparently it's pretty interesting too... I've been getting emails about it, apparently it's making the rounds even before I finished it. In case you're wondering what it's all about, it's about the IT Review at waterloo going on pretty soon. I had some things that I wanted to say, and this seemed to be a good chance to say them to someone who might listen.
Apparently people are having trouble viewing this site on windows IE. What can I say? It's web standards compliant. Anyway, I added a little blurb to the top of the page that only shows up for me on IE for OS X, but is hidden in Mozilla/Chimera (i.e. webstandards compliant browsers). Hopefully it will show up for IE win people too. Also, I added a 404 page, that you might like. Or you might not. Anyway, you can see it by entering gibberish into the URL bar after the simonwoodside.com/
I've revised the letter to the IT review board a few times.
Draft of an Open Letter to the IT Review board at the University of Waterloo. You can print a nice copy directly from the page if you have a web-standards compliant browser (try it) that can handle CSS2.
Now I've added another style sheet to support printing. Try printing this page or just use print preview. Oh yeah, also I installed a hack on the left-hand navbox sidebar, so that it won't leave trails behind in Chimera (it's called hackbox if you care). Oh yeah, I looked at this page on a windows with IE 6 (on XP) and it was horrible. If you're on windows, check out Phoenix which is a Mozilla variant.
What the heck happened to this website? Well, if your answer is nothing, then congratulations, you are using a standards-compliant browser (XHTML and CSS2). If your answer is anything else, get a new browser. I redid the site in CSS2 and XHTML, and, wow, isn't it nice to get rid of all that tables crap? The only thing I don't like about XHTML is that I have to close all of my paragraphs. Oh yeah, I only did the root pages, so the FTX and D&D pages won't verify until I get around to them.
Added a few Imprint articles that I wrote but weren't attributed to me by name. Mostly co-op related editorials.
I just updated the flow of the site a bit by collapsing the Imprint section into the "writings" section. I also updated the Imprint section so that it's more complete and in chronological order -- so those of you interested in reading the complete archive of S.W. Imprint stories will be very pleased I'm sure.
Circumstantial evidence (in the form of emails from users...) indicates that FTX 1.5 didn't work very well on Mac OS X 10.1.5. Well, that's what I get for upgrading all of my computers to 10.2. However with me making fixes and sending off test copies to the helpful users, it seems I've squished the bugs for now. Hence the updated FractalTrees 1.5.1 release. Oh yeah, and it's open source software now too ;-)
Check out the Fractal Trees section of the site for a new version of FractalTrees X . The new version 1.5 is lots more fun to play with. Written in the only practical GUI application environment, Cocoa.
I just had this crazy idea. Could Mozilla be the next great word processor? I mean, what is there to a word processor? There's a typing interface, a data format, a display engine, and various support tools. Mozilla is a display engine that follows industry standards very well. Those standards -- especially with CSS2 support -- make HTML a fully qualified data format for a word processor. Mozilla has an HTML editor that could be modified to make a good typing interface, so all that's needed are the support tools. The documents are HTML pages with CSS, so that they can be viewed in any browser, published on the web instantly, and edited in a wide variety of editors as long as they support the standards.
D&D fans rejoice ... I just updated the Edion Sourcebook as well.
Well, the transcript project seems to be dead after getting a good 40 minutes down on paper. However, today I bring you an updated D&D subsite ... ye-haw! OK, there's no new content, but the Edion Handbook is substantially easier to navigate and read online now, and the pages are streamlined.
Microsoft / University of Waterloo EngSoc Forum transcript project . A project to transcribe the mp3 recording made by the Feds.
Updated the layout of the site and a bunch of the miscellaneous pages. I discarded some of the really old stuff. You might also want to check out Semacode . Or, you might not.
Updated the ol' site design. Yeah, it looks exactly the same in most browsers, but it's now fully good-looking in Mozilla (on OS X) and it's better designed. Most of the pages meet the W3C spec so I added that to the bottom.
FractalTrees X 1.2 is now available .




































