Friday, 26 October 2012

So one of my coworkers bought a surface tablet recently and I got a chance to play around with it. The first thing which struck me was the touchcover integration- it clips so seamlessly. The typing itself feels weird. The keys don't depress, so you don't get that typing "feel". It still beats touch typing on the surface (its is way too wide to touch type efficiently). The kickstand is brilliant and totally inconspicuous. The hardware is top notch and it really is a beautiful piece of work.

The software is lagging though, both figuratively and literally. When you run a bunch of updates, typing becomes a hassle because the lag is almost prohibitive. I'm sure the Microsoft devs will fix such bugs though. The resolution is not as high as you'd expect and many of the apps aren't optimized for the tablet. Plus, Windows 8 RT ain't Windows 8.

Overall, its a unique piece of work. Its pretty expensive though, and I wouldn't buy the current version. Its probably worth waiting another couple of months for the next revision (which runs on Windows 8) while the software devs fix the bugs.

Monday, 22 October 2012

Amazon did it again. Their US-East-1 Region EBS experienced "degraded performance" this morning, even affecting applications managed by my company. Makes me wonder why I chose to go with EBS for my side-project. Meh, I'll probably have a bigger reason to complain if I actually get any traffic.

Sunday, 21 October 2012

So I attended the hacking health event yesterday. I was thoroughly exhausted by the time I actually got to the event so I couldn't have much fun. Plus, there was no break at all during the idea pitches and presentation. Nevertheless, I jotted down the projects which seemed interesting.

The event itself was well attended, given that it was held on a Friday, when most normal people would be chilling at home or at a bar. I'll admit that I was only interested in hearing about the ideas. I don't expect to actually hack an app this weekend (pretty busy this weekend). Many of the ideas dealt with some form of image processing, and many others were iPhone/iPad based.

Some of the ones I liked: pill identification using images, wound detector for diabetic patients and reducing patient waiting times.

Wednesday, 17 October 2012

Following the instructions provided here, I was able to get XBMC running on my device (which runs on the "Raspbian" OS). XBMC is an open source media center solution. You can watch movies, view pictures and listen to music using the player. You can also choose to install "add ons" within the app (e.g., CBS News, MTV, TED Talks, Youtube, etc) and use these to download short video podcasts directly from the servers. What I like about the player is that even when you navigate away from the video you're watching, the video still plays in the background, which is a nice touch.

The installation process itself took a really long time. I had to leave my Raspberry Pi on overnight while the code compiled. Without any overclocking, the menu navigation is somewhat laggy, but not prohibitively so (the interface looks great though). One really cool feature is to enable the XBMC web server (Go to Settings -> System -> Web Server), and use your Android or iOS device as a remote to navigate the interface (you will need to download the free XBMC app on your mobile phone).

The video playback is really smooth though, so if you're watching HD movies on your Raspberry Pi, there shouldn't be any problem. All in all, it's definitely worth installing XBMC if you can afford the storage.

Tuesday, 16 October 2012

I had a really enjoyable time at the Data Science Meetup at the Mozilla Toronto office where about 40 of us gathered to network and have technical discussions. Christopher gave a talk on selecting an optimization objective, which was more of a general lecture. Many of us were already familiar with the basics of machine learning, but nevertheless, the Q&A session was quite informative and the lecture was interesting. Afterwards, a whole bunch of us left for drinks. I got to meet some really intelligent people in the meetup. Overall, it was an evening well spent and I'm looking forward to our next meeting.

Monday, 15 October 2012

So I followed Shea Silverman's blog post, but could not get gngeo to work properly. The gngeo GUI would hang whenever a game was loaded or it was exited. Following this comment from the Raspberry Pi forums, I decided that compiling gngeo from the source would be a better option. Unfortunately, that comment doesn't explain the full process and what's required to get started. After messing around a bit, here is the complete series of things you would need to do:

Download neogeo.zip (which is the neogeo rom) and whatever game roms you need, unzip inside /usr/share/local/gngeo:

cd ~/.gngeo/

wget http://sheasilverman.com/rpi/gngeorc (Note that this file needs to be saved as gngeorc, not gngeorc.txt)

You might need to unzip neogeo.zip inside the folder "/usr/share/local/gngeo" if gngeo complains that it is missing a couple of files.

Run "arm-linux-gngeo -i ~/ ~/gamename.zip" to actually play your game.

For fullscreen:

type "sudo vim ~/.gngeo/gngeorc"

change the line "effect none" to "effect scale 2x50"

change the line "fullscreen false" to "fullscreen true"

A couple of helpful commands you might use: scp (I used this copy roms over from my mac to the Raspberry Pi after having sshed in), wget. I managed to get metal slug x, art of fighting 3 and king of fighters 97 working.

Always use ArrayDeque instead of Stack because it is likely to be faster than a Stack when used as a stack (also faster than LinkedList when used as a queue, but this is obvious since LinkedLists need to allocate memory for each insert, c.f., array backed ArrayDeque).

ArrayDeque is backed by ArrayLists (which are backed by resizable arrays), as opposed to Stack, which is backed by Vectors (also backed by resizable arrays). Vectors are synchronized. The unsynchronized, and thus, faster, ArrayLists have made Vectors redundant. I expect this is where the gains come from by using ArrayDeque instead of Stack.

Monday, 8 October 2012

Most Java developers aren't familiar with mixins. Basically, a mixin is an abstract method. Multiple mixins can be inherited by a subclass (i.e., multiple inheritance). But I guess the key difference here is that mixins are used to collect functionality, as opposed to being specialized by their subclass. This seems like a nuanced philosophical difference.

In Ruby, you can't define instance methods within mixins, but if you include a mixin within a class, the mixin methods become instance methods of that class. The mixin essentially behaves as a superclass. Unfortunately, Java doesn't officially support mixin's or multiple inheritance, but it's something worth knowing.

Wednesday, 3 October 2012

My current company is excellent at scrum. We have daily meetings, which rarely last more than 5-10 mins. Meetings are focused, and everyone is amiable and enthusiastic. There is a scrum master who manages the flow of the meeting and also checks up on deadlines.

Interestingly, my experience with scrum was not always this positive. Scrum was just this fancy buzz word, ostensibly paraded as an "agile" methodology, when in fact, it was often a painful processes consisting of endless, irregular and unfocused sessions. I personally feel that implementing scrum correctly is an important factor in maintaining the morale of employees. Done wrongly, its almost poisonous.

Any company which claims to follow agile methodologies should take note- please keep scrums short and painless.

Tuesday, 2 October 2012

I decided to embrace my inner explorer and visit the hacklab.to "headquarters" today (they have open house Tuesdays). Basically the members of hacklab.to are software devs and hardware hackers who meet up and work on side projects. The meeting place (in Kensington) is a small room, embellished with all sorts of gadgets and machines. There were roughly 15 hackers in all. Most of them were working on Raspberry Pi devices, though there were a couple of teenagers who were engaging in other things (picking locks anybody?).

It was interesting. I didn't really get to talk to many of these hackers. They're the shy types, a fairly standard character trait. These things take time anyway. In any case, I intend to visit next Tuesday, and with my laptop this time. Hopefully my Raspberry Pi would've arrived too.