Jan
4
2010
I’m looking for a junior-mid level python and javascript developer for a contract position. Must be a good problem solver and write quality code.
Exposure and/or experience with Django and ExtJS is a big bonus.
Position is based in Kentish Town (London UK) and is for a unique and interesting project.
Post CVs to careers@thisisglow.com
****PLEASE no Agencies****
no comments | posted in JavaScript, Python
Aug
7
2009
I’ve been looking for a dojo textarea (dijit.form.SimpleTextarea) that supports the same validation as dijit.form.ValidationTextBox but all I could find is other people looking for the same thing.
So I’ve come up with this solution, which works well. Its basically a simple extension of SimpleTextarea, with the ValidationTextBox mixed in before it (its important to make sure ValidationTextBox is used before the SimpleTextarea otherwise this won’t work). I overrode the validate, onFocus and onBlur methods to force the popup of the invalidMessage.
To call this, use:
<textarea name=”field_name” rows=”4″ cols=”80″ dojoType=”ValidationTextarea” required=”true”></textarea>
You can also add other validation attributes you’d normaly use in ValidationTextBox, like regExp to validate based on a regular expression.
The dojo component:
dojo.provide("ValidationTextarea");
dojo.require("dijit.form.SimpleTextarea");
dojo.require("dijit.form.ValidationTextBox");
dojo.declare(
"ValidationTextarea",
[dijit.form.ValidationTextBox,dijit.form.SimpleTextarea],
{
invalidMessage: "This field is required",
postCreate: function() {
this.inherited(arguments);
},
validate: function() {
this.inherited(arguments);
if (arguments.length==0) this.validate(true);
},
onFocus: function() {
if (!this.isValid()) {
this.displayMessage(this.getErrorMessage());
}
},
onBlur: function() {
this.validate(false);
}
}
);
6 comments | tags: dojo, JavaScript | posted in JavaScript, dojo
Jul
19
2009
Using Windows for anything more serious than playing games (i.e., business) is like sending James Bond on an uber-mission but instead of Q’s gadgets, giving him a free run at the Fischer Price shelf in Toys R Us…
no comments | posted in Random Thoughts, Software Development
Jun
2
2009
I’ve had a private theory about Hollywood and how it works behind the scenes for quite some time now, and recently I thought about it using a design pattern approach, and noticed it fits nicely.
Lets start with the theory itself:
I noticed that sometimes I’ll meet people and think “this guy/girl look a bit like Hollywood actor X or Y”. This happened quite a bit. Sometimes its very subtle, and sometimes its very obvious. Some actors have many ‘lookalikes’ and some very few. And as the exception to the rule, a small number of people seem to be absolutely unique look wise.
I always thought that human look can be classified. I don’t mean it in a ‘cattle herding’ way. I mean that we all know someone who looks like this or that person etc. When we think about why they look like that other person, its usually “because they have a similar shape of mouth, or similar shape of cheekbone structure” etc. Some people are unclassifiable, which to me is another type of classification.
It appeared to me that consciously or not, Hollywood raise actors to glory based on their look-class. Since we attract to things that feel somewhat ’similar’ or ‘familiar’, by covering as many look-classes they generate larger following in bulk, thus larger revenues etc.
Let me give two examples I find more obvious than others: Take Cameron Diaz. I’ve seen and met quite a few girls that look like Ms Diaz. I don’t mean they are spitting images of her, but they do bear a resemblance. Now take whatshername from Spiderman… hmm… Whatever, you know who I mean – I’ve seen and met quite a few girls that look like her. Maybe “like her” is not accurate, but at least they looked like her “look class”. They had similar shape mouth, or similar shape of head etc. A movie that stars those two actors will potentially attract people who are in it for the movie, but also those who get that worm familiar fuzzy feeling when they see Ms Diaz or Ms Whatshername-from-Spiderman. They would feel they can ‘relate’ to those actresses or actors.
What Hollywood is doing here is coding to interfaces. They have created an Actor interface over the years. Polished it till it sparkled like a super nova. They even used Real Actors (TM) to do the R&D for this interface. That was before the millennium. Some say before the 90s. Some say before the 80s. Then they started implementing the interface using different Look & Feel implementations, being the currently ‘hot’ actor. Each implementation covered a different look class. So we got our Cameroon Diazes and our Whatshernames-from-Spiderman, and our Sandra’s Bollocks, and of course, our many many uncategorized look-like-him/her-self. Of course occasionally a new interface is being created to serve as the template for future generations. And we take those concrete classes of look&feels actors and consume them till we’re blue in the face. Then we cast them away once a new concrete implementation is released and so on, ad nauseum.
Gotta love show bussiness…
1 comment | posted in Random Thoughts, Software Development
May
31
2009
The Google Android OS is the best mobile Operating System I’ve used, and the HTC G1/Magic phones are really excellent machines. They become even more excellent when you can take films and TV shows with you on your morning/evening commute. The train ride will never be the same again.
I’ve had to look up quite a bit to find the right and easy way to convert videos for the phone, and ended up collecting all the information I found into a neat and handy Bash script. I assume this could work for any other phone using the 3GPP / H263 video decoder/codec/type, but I haven’t tested it (you’re welcome to try it out and let me know).
Please remember that I’ve done this for myself mainly, so it assumes you’re using a Debian based distro for the setup portion of the script. If you don’t have apt, you’ll have to do the leg work and get all the pre-equisites sorted out yourself.
The script has two main parts: Setup and Conversion. The conversion is pretty straight forward. To convert 3 files you simple do:
./androvideo videofile1 videofile2 videofile3
However, converting to the phone requires the h263 decode/encode libs and ffmpeg to be compiled against them. When you perform the Setup portion (via ./androvideo -s) the script will attempt to do all for you. Attempt is the key word here. NO promises it will work for you (it does for me, but I’m special
).
During setup, what is supposed to happen is:
- Get all build dependencies for ffmpeg via apt.
- Get a few libs ffmpeg will need, subversion, checkinstall and build-essentials
- Downloads the amr shared libs from and attempt to compile/install
- Get latest ffmpeg from svn and attempts to compile/install with the amr libs included
- Get rid of temp dir, all downloaded files and compiled pre-install stuff
Download the script (right click and Save Link As)
You’ll have to “chmod +x androvideo” after you download it to make it executable
I could not have done this without the very good help from these resources:
http://www.linuxquestions.org/questions/linux-mobile-81/androidg1-and-video-converted-via-ffmpeg-h263-687163/
http://po-ru.com/diary/up-to-date-ffmpeg-on-ubuntu-hardy/
http://tldp.org/LDP/abs/html/
http://www.penguin.cz/~utx/amr
15 comments | tags: Android, Bash, video | posted in Android, Bash, Linux
May
27
2009
Not far from Covent Garden is this little place, showing death is no excuse for lack of optimism. With that attitude they’re sure to get me as a future customer…

Death is no excuse - so Cheer up!
no comments | posted in WTF
Apr
21
2009
mySql’s time zone tables have a few zones named ’slightly’ differently than what you might expect. This is mostly a discrepancy between Java’s icu4j time zones and the ones in the tzdata package which is used by mysql to populate its own time zone tables. When you pass a standard Java icu4j time zone which does not correspond to a tzdata one, it causes NULL to be returned from the CONVERT_TZ mySql function.
I’ve made a short list of some of the time zone’s in Java and their corresponding tzdata zones. If I find more (or if you know of any) let me know and I’ll add them to the list.
Java icu4j => mySql (tzdata)
IST => Asia/Calcutta
PST => PST8PDT
US/Pacific-New => US/Pacific
CST => CST6CDT
no comments | posted in Java, Software Development, databases, mySql
Apr
20
2009
I’ve dabbled with internet start-ups during my career, and I know its a tough adventure to kick off a company. 95% of such adventures end in sudden death without killing the bad guy or saving the girl. There are many experts with rules and advice out there. But I have 3 pence to contribute in the form of 3 simple rules:
- Never EVER hire your friend/buddy/chum/pal/mate of yours to run your company or for that matter – to work for or with you. Its OK to befriend your colleagues, but don’t start business on the basis of friendship. It rarely works, and you’re more likely to loose your friend. No venture is worth a good friendship.
- Never EVER take VC money unless its absolutely the last resort. And even then, reconsider and wait a little bit more. By taking investor money you essentially give up your venture. Usually you’ll be offered a seeminlgy very large amount of money for a huge chunk of the company, and then likely to treat you as a liability, not an asset. Keep that in mind.
- Be Organic, Grow Organic. Don’t try to grow into Microsoft over night. Stay calm and if you have a good business model, growth will come on its own accord. It sure does taste better without the chemicals… That also applies to fruit, veg and meat!
I raise a glass of mead in memory of all the start-ups that are no longer with us.
no comments | posted in Business, Random Thoughts
Apr
15
2009
This is not really new, as this boat has been moored not far from my home for a good while now, but its an excellent demonstration of honest selling. Its still on the market accepting offers. Go on, buy Gordon’s boat and save the world…


1 comment | posted in WTF
Mar
10
2009
There seems to be a few IE7 JavaScript caveats which are outside the usual non-standards rubbish. I’ll use this post to list them as I find them (so I will be updating it occasionally). If that’s the dominant browser gods help us all. One would have thought that if a company goes and releases a dominant browser which is flawed in so many ways, that they would also release a decent set of debugging tools to go with it… But no… no such luck. So:
- Don’t use JavaScript keywords like ‘return’ as an associative array’s (or object’s) keys. If you do, don’t refer to them in dot notation. Use the associative array way of obj['key']. IE will not like it. Not one bit.
- When you return JSON formatted data, remember to use strings as keys. While Firefox will accept JSON with non stringed keys (i.e., {key:’value’}, IE requires them to be properly stringed, i.e., {‘key’:'value’}
- Don’t add an extra comma after the last object property:
object = { prop:val, prop2:val, prop3:val , };
That last comma after prop3:val will make IE sad.
- Install that dreadful Microsoft Script Debugger… It’s not very good. Strike that – its pretty bad and will make general web surfing a nightmare but its the best you’re going to get.
1 comment | posted in JavaScript