Tuesday, August 31, 2010

read.air : How to sort a "Vacances" worth of pictures on-the-go ?

This is the story of a pet project I called read.air.

So the holidays are nearing the end, and I am so happy that I am back to Tokyo for the hot days. When I say I am going to take 3 weeks off, people here dub it "vacances" (read: bakansu) because apparently French people are customary to long holidays, so much so that the name has been borrowed.

More alarmingly, my wife has been gone for 2 months with a borrowed SLR digital camera (thanks to the generous sponsor by the way). So this means that instead of having thousand of pictures piling up in the iphone camera roll, they are now piling up on SD cards. She took around 4 or 5 of these 4Gb cards and since she is experimenting with the camera a lot, there are many many blurry, over/under-exposed, or just failed pictures.

As convenient as the back panel LCD might be, it is not as efficient as handling them from a much more powerful touch device, however I hate it. Also, the designers of the iphone did a perfect job at crippling it as far as interoperation is concerned. So how do you read a SD card with an iphone ? You don't.

Friday, July 2, 2010

Floating point (of no return)

As the song goes "No return, from the other side of Heaven". And indeed, welcome to Floating Point Hell !

I recently got involved in GSoC (Google Summer of Code, ask Google web search for the homepage) helping a student make Wideband audio codec become a reality in Sip Communicator. Which is a Java application.

And as expected from such a mathematical object, one needs to do all kind of clever calculations to compress a high rate audio source to a low rate bitstream. Of course, nowadays we receive a lot of support from the FPU making this all a piece of cake, with respect to calculation speed.

So, what's the big deal ? Let's see, as usual, it all begins with a standard. And a good one at that, the IEEE 754 standard. The problem with this standard is how it defines several bit format for floating point numbers, and how people decided, or not, to implement them.

Thursday, May 6, 2010

Debian, IPv6 and ... Java ?

Today is the first time for me to talk about Debian. It has been my favorite Linux flavor for quite some time now. I would say at least ten years, when compiling stuff became less fun and more painful, or my spare time ran out. I don't know exactly.

But whatever the cause, I ditched compiling everything in favor of the flexibility (and frustrating nature at times) of a packaging system. At that time, RPM did not prove better than Slackware's plain .tar.gz packaging and although dselect could be stubborn at times, it soon got better with apt-get and friends.

Let's add IPv6 to this landscape.

Monday, March 15, 2010

Howto get a list of network interfaces in Linux, part 3

Here we are, this is the ultimate post from these series. Thanks both previous posts, we are now able to get a list of interfaces using any language from shell script to whatever language which can speak ''sockets''.

However, as we could realize earlier, the ioctl-based method does not work exactly the way we want, because it does only report IP enabled devices. So if you want to deal with network interfaces before they start running, you are stuck with the /proc method. There must be another way. Remember that man netdevice we did last week. They mentioned netlink... What are those ?

Netlink sockets are sockets from the AF_NETLINK family. Being sockets, they are used to communicate between two addresses. The fun part is, netlink communications are local. And they usually (in the most simple scenario) link a user process with the kernel, especially the networking stack of the kernel.

Friday, February 19, 2010

Howto get a list of network interfaces in Linux, part 2

Welcome back, networkers !

Now, we are able to loop over all network interfaces within a shell script. How about we do it in C ? Let's make a first attempt using syscalls, shall we ? The alert reader already guessed that like all major things, there will be three parts (talking about major things, Google suggests me that there are three little pigs, stooges, musketeers. But Rs beat them all with 3 billion hits, what an ignorant fool I was, to not even know about RRR).

So, whenever it comes to system and kernel stuff, system calls are your friends, and thus we naturally turn to ioctl and friends, in order to find out more about the network interfaces. A quick "man ioctl"  reveals that there is a manual page that knows them all ioctls. So, let's summon it right away by doing "man ioctl_list".  Now that you have it in front of your eyes in it's full glory, you will just trust me and use SIOCGIFCONF to know about network interfaces. Because that manual page was rather obscure, wasn't it ?

Howto get a list of network interfaces in Linux, part 1

Hi folks,

Today we are going to become a little bit more technical. Some of you might wonder how to get a list of the network interfaces. For our first part, we are going to consider the shell script case.

Little disclaimer first, I am not an expert at shell-scripts at all, my abilities are limited to understanding the random scripts I encounter during my daily use of Linux on my computers, and writing the occasional script that saves some time when having to automate some boring tasks (converting a few gigs of  videos is boring).

Tuesday, January 19, 2010

Standards : How do you like them Apple ? (continued)

So, we are back to our iphone standards woes. If, like my wife, you shoot between 100 and 500 pictures a months, it will still take 20 to 100 months to fill up the camera roll. But that's still a lot to scroll through, so I am making a few Album folders within iTunes, and grouping the pictures by month. Which means that I remove the old pictures from the camera roll. Which also means that when the "10000 glitch" appeared, the camera roll was looking empty for some time until the update. Had to plug the phone to the comp to be sure everything was still there.

So here's the big question : how could we reach 10'000 pictures in the camera roll so quickly ? The answer is, broken software. As I am suspecting more and more after seeing this "10000 glitch", the software quality is much below the anticipated quality from a company as notorious as Apple. I have never owned a Mac, out of hatred. But I have always heard good feedback and was looking forward to that phone from a software point of view.

Wednesday, January 13, 2010

Standards : How do you like them Apple ?

Okay I have been trying hard to find some funny way to introduce this post, don't worry if you don't think it is (funny).

Actually, there are two reasons why I wanted that funny start, the first one being because it has been a long time since I posted anything -or since I posted at all- and the second one because, I am still not sure if I should post it. I have been wrestling with myself over this, but I believe that accumulated frustration finally triggered the whole thing, so let's go. I will try to explain here how I am getting more and more disappointed by an overrated phone...