Monday, 18 May 2009

Lessons learnt #1

Not a real surprise, but useful to write it down...

- If you have data that varies depending on the platform or environment you're using, be sure to have it in a separate file, marked as config file (for example using debian/conffiles if you build debian packages)

- Be sure to have a clear way to handle dependencies - Write them down and whenever possible use automated tools, as debian/control if applicable)

Friday, 15 May 2009

I'm cellphone only

Now that I think about it, it's since 2000 that I don't have a fixed telephone line in the house where I live. Cell phone and ADSL or 3G data connection meant to replace it (with some limitations in terms of service availability and emergency calling).

It's probably a known trend: in the US 20% of people have made the same choice.

And look how many families are adopting wireless phone services only! I'll write on this topic and on interesting solutions.

VOIPBLOG.IT reported it in Italian.

Thursday, 14 May 2009

2700 blogs available on the Kindle Store (and a digression)

Quite amazing to see how many blogs you can subscribe to from the Kindle Store.
Prices go from 0 to $1.99.

By the way, digging a little bit in the past (March 2008), I've found an interesting rumor from Apple about a tablet from Mac:
A little birdy tells me that Apple will announce a 12 or 13-inch tablet in the fall of this year. Most likely in the September or October time frame.


That was rumored one year earlier as well (January 2007).

I could go even further in the past, but the good news seems to be that this time, eventually, we'll get the mega tablet from Mac on the next Fall... maybe.

Wednesday, 13 May 2009

curl for HTTPS (and Twitter)

curl is a powerful library available on different platforms - I use it on Linux debian.

You can use it just to get http pages, or to post data and get a response from a server.
HTTPS is available too.

An example:

curl -k --data @request.xml https://127.0.0.1/service

posts the XML data contained by request.xml using a HTTPS connection (and ignoring invalid certificates, option '-k' - just for testing purposes).

This is a more interesting usage: it's nice to get info from Twitter or even send messages ("update your status") with just a command line:

Get status:
curl http://twitter.com/users/show.xml?screen_name=giavac

Send a message:
curl -u user:password -d "status=describing how to use the Twitter API" http://twitter.com/statuses/update.xml

To install curl on debian:

apt-get install libcurl3

(install dependencies too, and I suggest to include libcurl3-gnutls-dev)

Tuesday, 12 May 2009

How many different tea times do you have?

Just realized that in UK you can refer to the "last or almost last meal of the day" as "Tea".

This just makes sense, considering that while driving you have to keep the left, but on the escalator you have to keep the right if you're standing, and the left if you're walking.

Not mentioning that your weight can be measured in stones, but in the gym weights are in pounds OR kilos, while when you buy food they use ounces.

I'll have a twentieth of gallon of tea before going home for the tea...

41.5% of Italians don't use Internet

...even if Facebook looks very crowded!

Source IlSole24Ore.

Sunday, 10 May 2009

Touching art with an iPod


Positively surprised to experience that the so-called audio guides have been replaced by iPod Touch at Tate Modern.

Advantages are:
- You can see movies and pictures together with the audio presentations
- Easier to use - no need to enter a number to select an argument
- Lighter

Disavantages:
- Even if you're a Tate member, and you're paying for the guide, you have to leave an ID...

e-readers and advertising on newspapers


Yesterday I wrote a quick note on Kindle DX, the new e-reader from Amazon, and today on The Independent I've found an article titled "Hold the front page: newspapers have a future" (see picture, taken this afternoon from Tate Modern).


Statistics say clearly that advertising in newspapers is going down rapidly (starting well before the 2008 internation crisis), so in this area, like on the web, there's more and more focus on context advertising. Less costs, higher conversion rates.

e-readers can be, more than just an interesting gadget, a tool to access "custom" advertising and ad-hoc contents. It would be nice to read your favorite magazine, select some additional content, find deals on what you're interested in and... buy it straigth away!

But I was also thinking: is an e-reader really needed? Or maybe manufacturer of mobile devices, already accessing Internet via WiFi and 3G, should just provide a big, plug&play screen, optimized for reading? Rather than spending 350P for the Kindle DX, I'd spend half of it for a portable screen to attach to an iPhone...

Friday, 8 May 2009

Kindle DX - Cool but expensive, and won't replace books (I hope)

The title says almost everything I wanted to write about the new Amazon e-reader.

A detailed article from BBC News.

When the prices will start dropping, I'll take it into serious account.

VoIP banned from MS MarketPlace (MS style)

That's the way MS wants to compete on the Mobile applications against the AppStore: banning VoIP from the allowed applications.

It's the 4th point in their Prohibited Application Types document.

Topic followed through VOIPBLOG.it and thestandard.com.

Thursday, 7 May 2009

Where cloud computing is going

Just finished reading an interesting article by Paul Bennet on Cloud Computing.
It really looks like we're going in that direction, with security and data privacy as key points.
Furthermore, in UK as well you can get notebooks for free with a monthly data contract!
The OS is not a problem, however the availability of VPN clients will be extremely important.

Wednesday, 6 May 2009

MySQL - Last INSERT id

If you want to know which is the ID of the last INSERT been made from the current connection, when auto_increment is active, use this:

SELECT LAST_INSERT_ID();


A few lines in non-optimized perl:

my $sel_last = "SELECT LAST_INSERT_ID();";
my $sth = $dbh->prepare($sel_last)
or die "Couldn't prepare statement: " . $dbh->errstr;

$sth->execute()
or die "Couldn't execute statement: " . $sth->errstr;

my @data;
while (@data = $sth->fetchrow_array())
{
print "Last ID was.... $data[0]";
}

More details here for the MySQL statement and here for the perl DBI.

Friday, 1 May 2009

MS and Verizon to fight the iPhone

'Pink' is the code name for a new mobile device aiming to compete with the iPhone.

Key points are:
- Touchscreen (surprise)
- More powerful OS (extending Windows Mobile)
- More applications (maybe with the same iPhone Apps approach?)
- An online store (Windows Marketplace for Mobile)
- WiFi (in collaboration with Verizon Wireless)

News from the Online Wall Street Journal, reported in Italian for IlSole24Ore.

Wireshark setting to interpret UDP as RTP automatically

 Before I forget again, a Wireshark setting that can help saving time by trying to interpret any UDP as RTP, if possible: Analyze --> Ena...