Sunday, June 12, 2011

Automate your Android

I've been updating my Nexus S phone a few days ago (to the latest Cyanogen release) and got to check out some new apps out there. Here's a cool free app that allows you to create simple automated actions on the phone based on certain conditions or events - AutomateIt.

This app allows you to create simple "When event/condition A happens, do action B" rules, for example:
* When I come home - turn on the WiFi on my phone (so it can connect to my home WiFi)
* When I leave home - turn off the WiFi to save battery
* When I plug-in my headphones - open the music player app (since that's the next logical action anyway)
* When I unplug my headphones - close the music app (otherwise, it will continue playing on the speaker for everyone around me if I forgot to pause it first).
* When I open Waze (nagivation app) - set volume to 100%, so I can hear the driving instructions on the speaker
* When I close Waze - set volume to 50% (I always forget to lower the volume back, and next time I listen to music it starts blasting into my ears).

and so on...

It's free and simple to use - here are some more examples of useful rules for you to check out.

Friday, May 20, 2011

Take Your Music With You Everywhere Using Subsonic

I have lots of music sitting on my computer, gathered over time. Yet often when I listen to it I'm somewhere else - and as much as the storage capacity of music players and mobile phones increased over the years, it's still much too small to hold it all. Having to choose what to copy to my mobile device is annoying - I listen to one kind of music in the background when I'm working, and something else when I'm in the gym; while driving I usually prefer podcasts or audiobooks; and it's a hassle to change the selection often enough so I don't listen to the same stuff over and over.

A few days ago I finally found the perfect solution - given that my mobile phone is always connected and my home computer has ample bandwidth, why not just stream the music directly? Subsonic does just that - it's a simple media streaming software, with matching desktop, web and mobile apps that allow you to browse and listen to your music from any device with internet connection. 

After a quick setup you just point it to your music folder and it's accessible from anywhere. It has additional useful features such as creating different users, so you can share the music with friends, or transcoding on-the-fly between different formats, which allows you to convert file formats your phone might not support (such as flac, ogg, etc..) into streaming mp3. 

And there's the issue of bandwidth. When my phone is connected to WiFi I might not care about it too much but on 3G connection even my 5GB monthly data plan will come short if I'm listening all day at work. Here on-the-fly transcoding comes to help, since you can define different bitrate limits for 3G vs. WiFi connections, for different users or for mobile vs. web/desktop players. After some experimentation, I've actually configured it so stream  music to my phone in ogg format (at 112 kbs for 3G) to save bandwidth since it's a newer and more efficient encoding than mp3. Last but not least is the Offline option - the mobile app stores a cache of your downloaded music on the phone (I set it to 1GB for now), so you can listen to those tracks even when you're not connected.

So how do you get started?

Download Subsonic here and follow the guide. If you decide to get a little deeper, you can get some more details about configuring transcoding here, or - just ask me.

All I can add is not only I've been able listen to anything I want these last few days, wherever I am, I was also able to listen to many of the new albums which were waiting for me to check out but I didn't have the time for before.

Monday, March 14, 2011

Making Mobile Calls While Traveling - Without Selling The House

I am currently making plans for my next trip, to Greece.  Since I will be doing the accommodation reservations on the go, there will be more phone calls than usual when travelling. Yet when I checked the roaming call rates of my cellular provider (Orange), I was in for a surprise - above 11 NIS/min for calls inside Greece and 20 NIS/min to Israel (10.2 with a "Global Savings" program). 

Since I don't intend the phone bill to be more expensive than the flight ticket, I went looking for a better option. The short version is that getting a SIM card with the SIM 014 program by Bezeq International seems to give the best rates (2.09 NIS/min in Greece), with 013SIM by 013 Netvision being a good alternative.

Generally there are two kinds of products for international mobile calls - Pre-Paid and Post-Paid. 

Pre-Paid means you are buying a "calling card" ahead of time, charged with a certain amount of "units" or sum of money. You use a special number when calling and the card number, until you've run out of credit, and need to buy another card, or charge your account with additional sum. The advantage here is the control over your spending, since you can never pay more then the value of the card. But I don't like the more difficult process of making the call, and that you can run out of credit in the middle of a conversation. Also, you have to commit ahead of time to a certain amount of call minutes, and even if you don't use them all they expire after a while.

Post-Paid means you pay per-usage with your credit card. You buy a new SIM card (a one time charge) and just use it normally - including storing your contact numbers on it, etc. With many programs, you can buy an international SIM card once, and use it for years, from many countries. I like the simplicity of this.

There's a good article (by kamaze.co.il) comparing the different services offered in Israel. I made a online spreadsheet which summarizes the ones I liked, and compared the initial price and the calling rates from several countries which I am planning to visit in the future. Another option which is not included is buying a local Greek SIM card, which might have a little lower initial price and rates, but will only be useful inside Greece and I won't be able to use it in later trips.

In the end, the SIM 013 has the lowest initial price, but  SIM 014 program by Bezeq International has the best rates and over time will be cheaper. 


Friday, March 4, 2011

What Are You Collecting?

I've been thinking recently about stuff we tend to accumulate over time.

My father for example is quite the handyman in the house - he can fix a door, lay a cable across the apartment, fix an electrical appliance, etc. Over the years, he gathered a variety of tools and accessories for different tasks, and he always has the right one for the job as well as the skill to use it correctly.

My mother has a sewing machine, and when she has the time, can make a nice piece of clothing or fix one, or perhaps make some pretty pillow covers for the living room. And she got, stored around the house, various fabrics, magazine cutouts with designs, threads, buttons and all the other accessories.

Why am I writing this? I've just been upgrading my computer and as always, as I was preparing to put in the new parts, I got out a big storage box. There, I got a variety of parts, cables, connectors, power adapters and many other components I have accumulated over the last 15 years or more, from every computer I assembled for myself or relatives, every gadget or piece of electronics bought. And it does come very handy at times, when you need to replace a broken CPU fan, test if some component is faulty by putting another one instead, or even when you just need a rather weird type of screw for the computer case.

What do you have gathering dust in some storage box?

Sunday, February 27, 2011

Bringing Old Family Photos Back To Life

I've been going through some albums and photos recently, and found a box with a bunch of films. After a more careful look, I saw these were our old family photos - developed films from the last 20 years as well as slides that were 30 years old and more. A few of those were printed, and maybe we had them in an album somewhere, but mostly they are no longer available for us, and the means to reproduce them are disappearing with the years.

So I decided to bring them back from the confines of this box and digitize them. My options were limited however - there are several photo labs that can still scan films and slides, but the problem is cost and image resolution. The basic scan produces images of about 1.5 megapixels which is rather useless, and for a reasonable resolution of about 2000x3000 (6 megapixels) the cost to scan all we had (some 35 films and 70 single slides) would be in the thousands of shekels. 

After looking for other options, I found that although it will take some more time and effort on my part, it's better to purchase a dedicated film/slide scanner by myself and sell it second hand later when I'm done. This will be both cheaper and allow me to scan those family photos at the best possible quality. After some research, my current choice is this model - Plustek 7600i SE, which has good resolution and a mechanism for detecting and removing dust and scratches from the scan based on an additional infra-red scan of the film.

Hopefully I'll be done in a month or so, and we'll be able to look easily at our old family photos again.

Monday, January 3, 2011

Parsing a time that doesn't exist

I've been working on an integration project recently, using TIBCO BusinessWorks, and encountered an amusing bug. The code was parsing a bunch of date/time strings, and would works correctly except for a very small number of cases where it would fail with some 'Unparseable date' error. It would work for '26/03/2010 03:20' or '26/03/2010 01:20' for example, but fail for '26/03/2010 02:20'.

After some trial and error, head-scratching and Googling the problem was found - the system function used was implemented internally with java.text.SimpleDateFormat, and since the time string didn't specify the timezone the code assumed some timezone (based on locale I guess) that took DST (Daylight Saving Time) into consideration. So in this timezone, when at 26/03/2010 02:00 the clock advanced to 26/03/2010 03:00, the entire hour in between simply didn't exists and this timestamp couldn't be parsed. The solution was to specify a timezone which ignores DST, such as GMT, and in this particular case was done by appending " GMT+02:00" to the string. 

So much for the time continuity...