Programming and Technology Related Stuff

A Twitter View of a Tragedy

There was a mass shooting at a Toronto block party last night, leaving (at current reports) 2 dead and 19 injured.

This is a sad and terrible event, and very unnerving as it went down at a family event. I’m sure this will be the subject of news pieces and debates in Toronto for sometime.

But one development on reddit (/r/toronto) also caught my attention. In a self.toronto post about the event, one Redditor apparently spent a fair bit of effort compiling, Random portraits of the situation gleaned from twitter.

His comment included links to various twitter accounts of the shooting victims as well as community members and their outrage and responses. It is an incredibly intimate and personal view of the event, filled with the pain and anger. It is very odd and unsettling, but also very interesting to see all of this being broadcast publicly on the web for anyone who takes the time to search. Perhaps the most unsettling and morbid aspect is being able to search for, and find, twitter accounts of now dead victims even when the names have not yet been released. Some of the posts also imply that some suspected trouble, and other suspecting retaliation (all of which, the Redditor points points out is not “concrete evidence of anything’s having happened or anyone’s involvement in the shootings”).

This is just another example of how technology and the web (specifically in this case social networks) has changed and is changing media and events. We have been seeing this more and more in recent years, but this event struck at me more personally as it was much closer to home than things like Occupy Wall Street or the Arab Spring. This is a level of detail that is just not conveyed through a newspaper or news channel. It’s almost like having a mini documentary filmed and presented to you real time.

The Redditor (“archivist”?) responded with this when asked if he was a journalist:

Not a professional journo, nope. Just a guy who thinks mainstream media coverage of almost everything is woefully inadequate. I’m always digging through user-driven media sites during ‘news events’, just figured I’d post my findings publicly this time. No claims to accuracy or anything, just relaying what I find.

I don’t really have any deep insight, or even a strong opinion on with trend, and what effect it will have over the next few years, but I am finding the developments interesting.

Oh, and trust reddit for having a comment post going into this much detail on something.

The Final Frontier

First, this post is not strictly programming or tech related, but it features a python script and xkcd, so I think that counts. Also, if you don’t read xkcd, you should really give it a try.

With that out of the way:

Randall posted yesterday about a somewhat morbid interest in actuarial tables which led to him writing a Python script one evening to calculate death probabilities for collections of people.

The script is included in the post, and he also demonstrated with sample output of both the remaining nine people who have walked on the moon as well as some of the key Star Wars actors.

I figured I would show Star Trek some love by running his script against the cast of both the original series and The Next Generation.

Liferay Browser Launcher

Since we deployed our Liferay 6.1 environment at work, we’ve noticed that tomcat refused to shutdown cleanly. When executing the shutdown script, it would hang for a while before killing itself. We finally came up with a solution that appears to work, so I decided to share.

In Liferay 6.1, by default when the portal has initialized it will launch your system’s default browser and go to the portal home. This behaviour can be disabled and altered by adding this config to your file:

#Enter a URL to automatically launch a browser to that URL when the portal has fully initialized.
#Enter a blank URL to disable this feature.

This simple line fixed our issues. Our theory? Well our Liferay instance is running on a linux server with no desktop environment and no installed browser. It seems like at startup a process goes off to open the browser, never finishes, and thus hangs around preventing a clean shutdown.

Seems like a bug as it should clearly not hang when no browser if found.

Hope that helps someone out there.

My First Android Phone

Just got myself an Android phone earlier this week and it’s been interesting experiencing so far.

I’ve owned several iOS devices (though never an iPhone; this is my first smartphone), and so have a good feel for it. With Android on the other hand, though I’ve paid a lot of attention to the OS and the ecosystem and know a fair bit about it, I’ve had little actual hands on usage.

So, after two days, here are my first impressions:

  • I’m starting to get used to the multiple buttons at the bottom. In Android, there’s always a “Home button” AND a “back button” at the bottom (as well as a task switcher!). At first I kept moving my finger towards the top left of the screen looking for links in the apps to go back a screen, which is very common in iOS (the occasional app in Android follows this convention too). I’d say after the second day I’ve started finding myself by default heading for the bottom right where the Android button is.

  • I also keep finding myself surprised (and happy) when I reopen apps and they’re right there in the state where I left them, with no long reloads or anything. Despite the multitasking now in iOS, there still seem to be not enough iOS apps doing this. It makes (or makes it feel like anyway) switching tasks on Android much faster.

  • I love the share menu. iOS now has Twitter (and will soon have Facebook) integration, but the share menu in Android can work with anything! So far, I’m particularly fond of using it to send things to Instapaper. In iOS, if my particular app hadn’t built in an Instapaper link, then I’d have to open it in Safari and use a bookmarklet (which was a little annoying to setup).

  • I really like widgets. iOS is sorely lacking here. Maybe to some it’s not that big a thing on a phone form factor, but I still find it very useful to have some concise and useful data just there on the screen without needing to open an app. However, I think widgets are amazing with a tablet-sized screen. The amount of screen space I think just feels wasted when just filled with app icons. To me widgets for a tablet really makes Android feel like more like a “real computer” OS as opposed to iOS on an iPad, which just seems like a big iPod. Of course, on the flip side, there are a lot of iOS apps out there optimized for the larger screen with separate window panes, tabs, and menus, and while there’s no reason Android can’t and won’t have this more in the future, there are fewer apps doing it so far.

So, these are the things I’ve been noticing and thinking about with Android so far. It will be interesting to see what else I find I notice, what I really like, and what I find I miss from iOS as things go on.

Dedication and Paranoia

One of our main projects has still been sitting in CVS for some time. Everything else under active development either started in, or was moved to SVN for some time now. But, this particular project always has something on the go, usually with several developers, and so just never got moved due to time constraints and hassle. So, we recently put aside the time and migrated it over to SVN (using cvs2svn)

Everything seemed to go smoothly at first. Examining the code and comparing the fresh SVN checkout with my old CVS working copy didn’t show anything amiss. It compiled fine as well. However, it became clear there was a problem when after starting up, nothing would load and there were exceptions in the logs including a lot of “class def not found” exceptions.

A bit of hunting and we eventually determined that one of the included libraries was corrupted (confirmed by the md5sum not matching). We’re not sure how that had happened in the migration (we checked and it was indeed committed as a binary file in CVS), but we replaced it with the pre-migration jar and things seemed to start up fine. We conducted some tests, and couldn’t find any further issues, but my coworker was not feeling entirely comfortable calling it done and successful after our little jar issue.

Checksums of the other jars didn’t show anything wrong, but we unfortunately we couldn’t compare our code itself because most of our files had CVS keyword tags in them, which had expanded differently causing every source file to be different. A little stumped, we decided that since the testing didn’t find anything, and since it was getting late, we’d call it done.

Later in the night, I get this email: