Segmentation Fault
Analyzing the core
  • Home
  • About

Archive for October, 2008

Now for something completely different

Web, hugs No Comments »

This post is a mashup of a few things I have been tinkering with over the last week that I think is fun to share. So if it seems I have been unfocused or whatever, this is pretty much why.

The first project I started doing for fun was working on canvas. This was different then some canvas stuff I have done in the past, The interesting people at nihilogic did a sepia filter using canvas. I wondered if it was possible to do filter so you can see an image with a red-green colour blindness. After some substandard research, I finally managed to do it. Though the quality is poor because it tends to be inaccurate. YMMV.

I wondered if you can do something like this for an entire webpage. So I moved the Javascript to an extension so I can use canvas’ drawWindow() method and take a picture of the entire website. Though I noticed that doing this on large image was computationally expensive and locking up the UI for an unreasonable amount of time.

I then tried to move all the calculations out of the main thread into a DOM worker thread. It was an interesting experience. I noticed though that while the main thread (and therefore, the UI) did not lock up, it was still sluggish and impractical to use. So I decided not to develop the extension further.

Image under Deuteranopia colour-blindness
You can see the full demo here.

I then thought about what this would look like on other browsers. I didn’t expect anything requiring DOM worker threads to work on Safari/Opera. And sure enough, it didn’t. But I found out that DOM worker threads was based off of Google gears! So I looked into that and made a separate webpage that uses gears. Unfortunately, I found out that my efforts were largely wasted, as it only increased support to Firefox 2 and Mac Safari (Gears isn’t compatible with Windows Safari or Opera, and IE doesn’t have canvas support).

Either way, I made the Gears version available here.

Going away from canvas, I spent most of another day working on Google Maps API. The problem I was trying to solve was to see if I can highlight a 1 square kilometre radius from a pinpoint. This was difficult, as points on a map had a latitude, longitude co-ordinate, and I had to blindly figure out how much to reposition for a half-kilometre. Finding the distance between two points was also helpful, but hard getting a good formula for.


Of course, I am highlighting all the accomplishments and not mentioning the frustrating obstacles. There were several lessons learn on the way. Including a lot about incompatibility and how much I still don’t know how to do the kind of algorithmic research that you sometimes need. I’m starting to wonder if the BSD course taught me more than just to be a code monkey with a business touch, and made me wonder whether the theoretical/mathematical part will ever stop me doing something because “I just won’t get it”. Though, at the same time, I wasn’t willing to put the time and effort of research into pet projects. So this will probably be a problem for almost everyone, and not just me (honestly, mapping out longitude and latitude to distance is not something you learn anywhere).


October 30th, 2008 |

Tags: html5, ria, Web




New Editor tool finally landed on AMO

addons 5 Comments »

I made a post several months ago about an diffing zippy files on the web. While that stuff landed, it was difficult to use because I deferred actually showing what files changed to a later date. oops

Well, that made it nearly useless, because it was less effort to download each xpi file and do a diff locally.

Well, I’m glad to say that I’ve right a worlds wrong. Some stuff I was working on finally landed recently (can’t remember when. But it wasn’t working two days ago. So somewhere between Monday and today). So you may notice a few changes.

The first being the side panel that shows all the files. Any files that were modified appear italicized. Which is a bit subtle, but is the only indication I could give that wouldn’t make it stick out like a bad rash, or a honda element. Suggestions welcome.

side panel
Side Panel

So this pretty much completes what was started. Only some minor improvements were made since the last post. Including a wikipedia colour style diff :

full screen image of the xpi diff
Full screen view

I hope that this will be useful to AMO editors and help speed up the reviews. Which is in much better shape than they were two months ago.


October 9th, 2008 |

Tags: editor, mozilla, seneca




Calvin and Hobbes

hugs 1 Comment »

Someone on digg made a post to a collection of Calvin and Hobbes comics. Which was a bad idea, cause I spent at least two hours looking through it.

1990/09/18's comic


October 9th, 2008 |

Tags: lazy




Nuit Blanche

hugs 2 Comments »

Toronto was transformed at night on Saturday October 5th for some art thing called nuit blanche. Basically, it’s an event open all night with gallery’s across the city open for the public. Tom, Lucy and I spent all Saturday night and Sunday morning making trips to these exhibits, and had breakfast at 6-7am with Mike.

I was also surprised by meeting Armen there, and his brothers. It makes sense now.

While loads of fun (I didn’t know what we were doing when we met up. And I didn’t know how much I would enjoy it when I found out. But it turned out to be a great way to spend a Saturday night), I didn’t get home until later in the morning, where I crashed in my bed and didn’t wake up until 16:00 today. I didn’t manage to get any pictures because I didn’t bring my camera, but I did get a video of blinkenlights on my cell. They took over City Hall, and it was an entertaining light show. They also had it rigged up to play pong and tetris, but it was not well executed.

You can view the video directly in the browser if you had a browser that supports the video tag. You’re stuck with downloading it :)


October 5th, 2008 |

Tags: seneca, sleep, toronto




ohai

hugs 2 Comments »

One internet phenomena that seems to be popular at Mozilla (at least, for some people) is rediculously cute animals and broken english in both in spelling and grammar known as lolspeak. So much so that Paul O’Shannessy (zpao if the name doesn’t ring a bell) created the bookmarklet that takes flickr images and turns them into canvas drawing overlaying text to it (called LOLify). The bookmarklet was based off of flolcatr, which brings more lols (well, some of the time anyways. The true lols come of the pics of middle-aged women).

Using that as inspiration, I worked on turning into a Firefox extension. Particularly because I wanted more flexibility out of it. For example, right now the bookmarklet takes random stuff out of the flickr comment and puts them into the image. But I wanted to add in my own stuff to either the top, middle, or bottom of the image and be able to align it left, centre, or right.

After spending all night doing it (I was afraid I would lose interest or get lazy if it took more than one day to complete), I uploaded what I had to addons.mozilla.org. After a good nap, I went back and fixed some pretty ugly errors and uploaded a much better version. I ended up with the name of kyoote (cutie), because it’s one of the words used to describe a fennec. And fennecs are extremely unrepresented as cute animals, even though they are adorable. And from today forward, let friday also be known as fen[nec]day.

lolfennec
Original image taken from deadstardro

So sit back this fenday and enjoy a meowtini :)

Update: Clarification based on comment


October 1st, 2008 |

Tags: extension, fennec, sleep




  • Pages

    • About
  • Recent Posts

    • NSILHNFHDwxyz
    • deprecate this
    • Cross browser tidbits
    • A lot has changed in 4 years
    • addParser.py
  • Tags

    browser compatibility bug chrome editor extension fennec google chrome html5 ie intern jquery json konqueror lazy mozilla nsid opera personal prism python ria safari security seneca shaving sleep svg tinderbox tip toronto Web wildon
  • Archives

    • January 2009
    • November 2008
    • October 2008
    • September 2008
    • August 2008
    • July 2008
    • June 2008
    • May 2008
    • April 2008
  • Meta

    • Log in
    • Entries RSS
    • Comments RSS
    • WordPress.org
  • Blogroll

    • Andrew Smith
    • Anthony Hughes
    • Michael Mullin
  • Links

    • My Gallery
    • My Repository
RSS XHTML CSS Log in
Copyright © 2009 Segmentation Fault All Rights Reserved
Wp Theme by i Software Reviews
Proudly Powered by Wordpress