Softcore software development
It's all about the cycles
  • Home
  • About

Blackberry Bold 9780 and Content Protection

hugs Comments Off

A few weeks ago I purchased a Blackberry Bold 9780 and switched to WIND mobile from Rogers Pay as you Go. A process which did not go nearly as smoothly as I had hoped. My Blackberry has also caused some problems, one of those relating to BBM.

Every once in a while, instead of a message I got the dreaded phrase “<Content Protection is Enabled>”. Not only was the Internet entirely unhelpful, but so was Blackberry. I have read somewhere it had to do with encryption, but no reason as to why.

Today after it reared its ugly head again. This time however, I noticed that the message occurred when my phone was locked. On a new lead, I Googled “blackberry messenger password lock content protection” and found a useless blackberry article. I figured I might as well try “Content Protection” on the BlackBerry site and hit this gem:

Content protection is designed to encrypt your BlackBerry® device data. When content protection is turned on, your device uses a private key to encrypt data as it is stored on the device, including data that your device receives when it is locked. Your device decrypts data as you access it.

You can set content protection to include or exclude your contacts. If you turn on content protection for contacts and you receive a call when the device is locked, the caller name does not appear on the screen.

When you lock your device, an open lock indicator appears in the device status section of the screen to indicate that your device is deleting a copy of the private key from the temporary device memory. A lock indicator appears when the device has deleted the key.

This makes sense. When your phone is password locked, the private key is removed. I don’t know whether Blackberry uses a symmetrical or asymmetrical key. If the former, than the message is in limbo until it is written somewhere (which it cannot do with the private key). Makes sense if it’s the latter, which means the message is written but cannot be viewed until password is entered. This is stupid however, as message preview has no issue showing you the message. It seems that BBM does not go back and decrypt the message once the password has been entered.


August 21st, 2011 |

Tags: blackberry, stupid, UX




A fine day in Toronto

Living, personal 2 Comments »

This is my third month back in Ontario’s capital, and my third day living in my new apartment. People have since long stopped asking me whether it is great to be back. I think it is because them assume it is a yes because I am still here ;) But it is apples and oranges. And my answer would not be so black and white. This blog post is not about that, but about how AWESOME the weather is.

I am glad to finally be out of my parent’s place and living in the heart of the Annex. No longer will it take me 1-1.5 hours to get downtown. But I will need a bike to make affordable, lest I drop $120+ down on a metropass each month. Though picking a bike is becoming a job in itself. No use in spending good money on something that will likely get stolen. Moving downtown is a major improvement on quality of life for me, and something I am blessed to afford.

I hope it only gets better. We still have to finalize office space in the co-working space, and I get to throw a house-warming party.

And did I mention that my view is fantastic?
view of downtown toronto


June 20th, 2011 |



Back to square one

personal Comments Off

On November 2010 near the end of my contract at NetSecure Technologies, I asked for and received the ok to relocate and continue working from Toronto (and obviously, a renewal. Otherwise this blog post would be short and 2 months overdue). What was supposed to be a yearly adventure was extended a bit as they didn’t want me to leave immediately. I am obligated to stay in Regina until April 1st, but will likely stay for a few days/weeks after (depending on a number of other factors).

I have mixed feeling about this. While I do enjoy the city and would love another year to explore some more, I have had some difficulty adjusting to the different expectations of small(er) town life. I cannot see myself growing and enjoying some of things I did back in the big city, and I cannot make the same close friends that I did back in Toronto. But I think I have adjusted better in these last few months than I did all year.

That said, I will miss the good quality of life I have in the QC. Here, with my present salary I can enjoy the privilege of a car and owning my own one bedroom. Maybe after another year or two to finally buying my own place or a condo.

In Toronto, I’ll probably have to give up the car or share a apartment, or both if I want to live somewhere downtown.

It’s a fairly difficult decision for me to make. But I know that this decision will put me in the right direction in life. Even if going back to Toronto doesn’t work out, this experience leaves me hopeful that I can just pack my bags and find somewhere new to call home.


January 31st, 2011 |

Tags: hugs, personal, regina, toronto




Movies

hugs Comments Off

This has been my movie decision flowchart for the past while:

Movie buying decision flowchart

Right now, I own a total of 1 movie that I made an exception to this chart. I apply this to games and movies as well. Though, I have a lack of games so another exception was made on Christmas :)

While entertainment isn’t a big enough sacrifice to be worth complaining about (first-world problems), I wonder whether refusing to buy something that is only available on DRM can justify pirating it since the creators won’t be seeing your money anyways. And personally, the amount of garbage put into most DVD movies (FBI warnings, trailers that you cannot skip, more threats of impending lawsuits) is almost tempting enough to download it just to stick it to the man.

I do rent movies. Most or all of them have DRM, so I might not be making a difference at all :(


December 29th, 2010 |

Tags: activism, drm




Firefox Synchronisation Extension

addons Comments Off

Found this as an installed add-on in my Firefox browser. It didn’t seem related to Firefox sync/weave, so after some tracking it turns out to be a Nokia extension. It is one binary component.

I don’t like the name Nokia chose. It gives no indication that it comes from them, and it gives the impression that it comes directly from Firefox.


December 3rd, 2010 |

Tags: UX




Beatport wav converter

hugs Comments Off

A while ago, I began purchasing music off of beatport. Unfortunately they do not offer FLAC downloads, so I pay the extra dollar to download wav files. The downside is that I have to manually enter metadata. This is painful, so I created a quick python script using their almost invisible api that does it all for me (the wav files must have kept their original filenames, because the numbers in front represent the track id).


November 13th, 2010 |

Tags: beatport, python




Firefox extension logging

addons, programming Comments Off

Last week, I was tasked at work to create a quick prototype extension. This machine had a few other extensions, including the very verbose SmartSwipe extension. SmartSwipe extension logs almost everything to the error console as messages. Which in turns makes it a pretty bad choice for any other extension who wants to use the error console as a logging service (incidentally, I am the main developer of the SmartSwipe extension, so this is entirely my fault).

Despite Firefox extensions growing more complex, there are two areas of extension development that are still a pain to deal with: debugging and logging.

What pains me is that extensions have a pretty crappy choice of methods to use for logging purposes. There is dump(), Components.utils.reportError(), FUEL’s Application.console.log(), and maybe some others I am missing (ChromeBug is another possibility, but I haven’t used it). But these methods of logging don’t scale very well. If you have more than 1 extension using the same logging service, you introduce noise that can be difficult to sort through.

It striked me that there was nothing simple to capture and filter your logging information. Since this problem was annoying me, I decided to create an extension to deal with this.

Introducing Debug Log

The extension is uncreatively called Debug Log (unrelated to Jeremy Gillick’s DebugLogger). It shows a Windows-style event viewer with basic filtering. To use it is really easy. First I will show how it is used, and next how to use it when the Debug Log extension isn’t installed:

var log = {};
(function() {
        var modules = {};
        Components.utils.import("chrome://debuglog/content/DebugLog.jsm",
        modules);
        log = new modules.DebugLog("my_extension_slug_name");
        log.info("Hello")
        log.warn("Trimming to 8 characters. String : " + s);
        log.error("MyTerribleFunction", exception);
        log.assert(foo != null, "foo should never be null");
})();

Which results in the following:
screenshot

Assert is a bit different from typical assertion in other languages. It will not quit the application, nor would it throw an exception (unless you passed a wrong parameter to assert).

To use it properly, you must also account for times when DebugLog is not installed.

var logging = {};
(function() {
        try
        {
                var modules = {};
                Components.utils.import("chrome://debuglog/content/DebugLog.jsm",
                modules);
                logging = new modules.DebugLog("JavascriptPlusPlus");
        }
        catch (e)
        {
                logging.assert = logging.warn = logging.info = logging.error = function() {}
        }
})()
logging.info("Starting...");

The extension still has a lot of work to be done, but it’s useable now. So now is the time to release and it is available at https://addons.mozilla.org/en-US/firefox/addon/246799/. Enjoy!


October 26th, 2010 |

Tags: debug, extension, logging




Reordering the tab key – tabcomplete

addons Comments Off

I am in the process of creating a new Firefox add-on that will hopefully change a bit how we navigate some sites. Until now, keyboard navigation for the vast majority of sites has been simply unusable. Even though websites have a layout that can easily use a keyboard, it often relies on either remembering shortcuts or tabbing through. You are almost exclusively limited to a mouse when using a full-featured browser such as Firefox, Chrome, and IE.

Personally, I hate using the trackpad on my laptop. After extended use, the heat and the friction take a toll on my fingers. I have an external USB mouse, but that often becomes a bother as the laptop is moved around from one location to another. Yes, wireless mice, but again we’re not really fixing the problem.

For simple navigation, it’s almost a crime that I cannot tab between links and major components of a web site’s navigation.

The tabindex HTML attribute has gone largely unused when browsing the web. Perhaps for a myriad of reasons – it’s hard to re-order manually, and for many web developers it’s not worth the time or effort.

Even for everyday use, it becomes ridiculous how crappy it the tab key can be. Think about this:

  • For a Google search result, the tab key must be hit 12 times before it focuses on your search text. Another 3 tab strikes before it takes you to the first result. Another 5 times or more to get to the second result – not counting Google’s quick links.
  • For planet.mozilla.org, each tab key will go through every anchor link in each person’s blog post. Oh, and it takes 6 tab keystrokes to go to the first article.
  • For reddit, it can be a little better. If you just use tab, you’ll go through each “share” link first. Which is stupid. If you activate “jump to content” it will go through image->link->domain->usersubreddit->comments. Which is still a lot for one result.

This is how I would order the tab key on a Google search result:

Possible tab order on google

Possible tab order on google

I would probably use the top Google bar the least when doing a google search. Each time you hit tab, it will cycle through the search box, 1st result, 2nd result, etc. until you hit n-th result.

This would be great in an ideal world. A Firefox extension could do this, but for my purposes my extension does not do this. It doesn’t map the tab key. It instead uses the key right above it. Like tab, CTRL+` will cycle forward and SHIFT+~ will cycle backwards.

I call it tabcomplete. It’s not as pretty as tabcandy. I think a large part of my user-base wouldn’t be most users. Users seem content on using the mouse, and that’s fine. But for a guy who works in vim, this is a nice to have extension.


July 31st, 2010 |

Tags: extension, hugs, keyboard, tab, tabcomplete




(Almost) Can’t touch that new music

personal Comments Off

I’ve been listening to a few music podcasts, mainly TATW and ASOT, and am really enjoying some tracks (were have you been all my life Bart Classen? Oh. In the Netherlands…). And I really want to have some in my iPod Cowon iAudio 9.

This was not easy.

I really do wish to support artists, I really do. I purchased a ton of CDs (400+ songs, and yeah it cost me >$400) because I can’t always go to their concerts. I want to avoid having to illegally acquire this stuff. But it feels that I can only do it on their terms, for crappy technical boner-inducing-big-brother reasons, and I have to sacrifice my requirements.

What are my requirements? High bitrate MP3/WAV/FLAC. No DRM. I vote with my wallet a lot, and this is something I can get behind.

Really, I want to pay you. I was even willing to pay trackitdown.net a premiuum of $2.50USD for a WAV (for something I probably can’t hear the difference between). Oh, until I found this little gem :

All of the tracks downloaded through our website are ‘watermarked’ with a special form of copy protection that uniquely identifies the owner of each track.

– trackitdown.net HowTo (How to suck apparently)

I know I’m a little bit of a niche. Forgive me for going against the status quo and not buying on iTunes and wanting it under a free (as in speech) lossless codec. But honestly, anyone who wants your music for free gets it for free. I’m going out of my way to try to pay you and be fair to both of us about it.

Luckily, I have found BeatPort, which almost fits my needs. I dislike their flash-only website, having manually to convert wav to flac and fill in metadata, and the unfortunate restricted tracks for some songs. But they seem to be the most fair – to me at least.


July 21st, 2010 |

Tags: beatport, frustrating, music




Endianness, how I loathe you

programming Comments Off

(originally posted in February, but got lost in time)

I have been busy making my own implementation of SHA-1. To better learn about why so many people depend on it for basically everything from SSL to tamper detection mechanism. I have a bigger project idea, but that is not important right now. What is important is that SHA-1 does everything in big endian, and I am on x86-64 which is a little endian machine.

Remember that a big endian machine has the most significant byte first, and little endian has the most significant byte last.

For example, let’s say I want a 64-bit integer to hold the number 1. This is how it’ll be stored:
Big endian:
1 = 0000 0000 0000 0000 0000 0000 0000 0001
Little endian:
1 = 0001 0000 0000 0000 0000 0000 0000 0000

SHA-1 stores the size of the message as a 64-bit integer in the last block during padding (each block is 512 bits). Since I have a little-endian machine, I wrote a function that correctly switches endian and now, the 1 appears as the as it should.

However, SHA-1 loops through each block in 32-bit integers.

*((unsigned int*)0000 0000 0000 0000) = 0
*((unsigned int*)0000 0000 0000 0001) = 16 million and change on little endian machine instead of 1 as I expect

so the second time, I have to do another endian change, this time a 32-bit endian change, so that it appears as :
0001 0000 0000 0000

so I get back 1.

This is a PITA, and a frustrating one. Mainly because I couldn’t figure it out for a few days. But feel so accomplished for figuring it out. Accomplished and embarrassed.


May 13th, 2010 |

Tags: do'h, endian, hash, sha1




Previous Entries
Next Entries
  • Categories

    • addons
    • beatport5
    • hugs
    • Living
    • personal
    • programming
    • Uncategorized
    • Web
  • Recent Posts

    • A breakdown of building Firefox
    • Waking up your computer at a certain time
    • Image prefetching
    • Sharing a django project
    • Flash, Silverlight, and the future of the web
  • Tags

    "open source" activism audio beatport browser compatibility bug chrome editor extension fennec google chrome house html5 hugs ie intern jquery json konqueror lazy microblog microsoft mozilla music nsid opera personal prism python regina ria safari security seneca shaving shoes sleep svg tinderbox tip toronto UX Web wildon windows error
  • Archives

    • January 2012
    • December 2011
    • November 2011
    • October 2011
    • September 2011
    • August 2011
    • June 2011
    • January 2011
    • December 2010
    • November 2010
    • October 2010
    • July 2010
    • May 2010
    • February 2010
    • December 2009
    • November 2009
    • October 2009
    • August 2009
    • July 2009
    • February 2009
    • January 2009
    • November 2008
    • October 2008
    • September 2008
    • August 2008
    • July 2008
    • June 2008
    • May 2008
    • April 2008
RSS XHTML CSS Log in
Copyright © 2012 Softcore software development All Rights Reserved
Wp Theme by i Software Reviews
Proudly Powered by Wordpress