June 12, 2011
Joy Machine

  Royalty free music for professional licensing

This Polish band is simply awesome: pure 80s hard rock/heavy metal, licensed Creative Commons BY-SA. Check their latest album …to be rock and to roll… (distributed by Jamendo).

Apparently they failed to find a distributor for their work, I guess this kind of music is not commercial any more (because it was commercial, some examples are Mötley Crüe, Skid Row or the early Guns N’ Roses). I’ve never been interested in charts and billboards, but I wonder what kind of music sells today. It looks to me like there’s no place in the mainstream for sharp guitars and guys screaming in their glam rock pants.

It’s a pity, because I think they’re really good. Seems that after failing to release the album in a more conventional way, the singer left the band and it’s not clear if there’s any future for them beyond …to be rock and to roll….

Needles to say I strongly recommend you the album!

May 30, 2011
"I decided to just bite the bullet, and call the next version 3.0. It will get released close enough to the 20-year mark, which is excuse enough for me, although honestly, the real reason is just that I can no longer comfortably count as high as 40."

From Linux Torlavds on Linux 3.0-rc1.

It’s just a numbering change, so don’t expect anything special beyond the usual stuff. The mail is quite funny, it’s reading is fully recommended.

May 28, 2011
"Install Apache with your web application running under mod_php, mod_perl or some other persistence engine for your language. Then you get famous and start getting emails about people not being able to access your website."

From How to handle 1000′s of concurrent users on a 360MB VPS.

Seriously, Apache + mod_php (and probably MySQL) is the easier way to start serving web pages, but it is also the easier way to start having problems when your server is under some load.

Some customers ask us stuff like how many web sites can I host in a 512MB RAM VPS?, as if there was a simple answer for that. But, actually… there is a simple answer: if you’re asking that question, probably none.

I’ve seen so many times people blaming Wordpress, Dokeos, Magento, etc, when the problem is Apache. Oh, I know… it isn’t Apache but the system administrator behind it, but there should be some amount of responsibility when correctly configuring Apache seems to be so complicated…

May 14, 2011
Bring a Box!

Today we attended to the May Bring a Box meeting of the Surrey Linux User Group, and it was great!

We got a lot of interesting chit-chat and a couple of talks/demos at Nokia Southwood (nice venue, thanks Nokia guys!).

One of the talks was about VoIP alternatives to Skype, I guess because of the recent news of Microsoft acquiring Skype.

I was kind of disappointed by the approach to this topic, because instead of focusing on open protocols and applications using those protocols, the guy pointed to other “free as free beer” closed systems (or open, but they don’t tell you what are they using). Sincerely, I can’t see the benefits of switching from a closed system that actually works to another closed system that does a worse job.

He did a good work looking for SIP providers, but I think the open source clients were poorly represented (he failed to make Ekiga work, and he didn’t mention that Empathy, the Gnome default IM application, has actually a quite decent support thanks to telepathy components).

Then we had a demo of Gnome 3, going through its main features, and I offered myself to do a demo of Unity (I’m using it at work, and Alex has it installed in her netbook).


Hidden feature

The first thing I’ve noted is that most of the users don’t really know how to use the new desktop environments. I mean that there is stuff that you can’t know without actually reading some documentation (I showed how to make the Power off menu appear in Gnome 3, and it was a big surprise to everybody!).

I took my time to learn how to use Unity, because Alex and I wanted to seriously test it before discarding it completely. Alex was happily using Ubuntu before Unity and I got my laptop at work with Ubuntu installed, so both want to stick with Ubuntu in those machines as long as possible.

The second thing is that I would say that nobody likes Gnome 3 or Unity, although sometimes is a tittle bit unfair because users aren’t dealing with the change in the right way. Most of the attendees were happy Gnome 2 users, with Ubuntu mostly (I saw only one guy running Fedora, and there were some Red Hat guys).

Anyway, again that’s a problem of the desktops… if the functionality it’s not evident, they should find a way to show (or teach!) the users how it works, otherwise you’re very likely to refuse to use something that you don’t understand.

It was a nice day, with nice people. Thanks everybody!

May 10, 2011
Scan With your Deskjet F2400 Series

I hate when I forget these kind of things, and scanning with my HP Deskjet F2480 is probably my favourite.

Printing with this all in one printer is so easy with Fedora, but today when I tried to use the scanner functionality, Simple Scan application was unable to detect the scanner (actually it was using my webcam!).

I think I always follow the same steps:

  • Check the dmesg, and the printer is there (of course, as I said it prints).
  • Then I try scanimage -L and… I can see only the webcam:
    device `v4l:/dev/video0' is a Noname Laptop_Integrated_Webcam_1.3M virtual device
  • Although this time I’m not using the sane frontend, I try sane-find-scanner anyway:
      # sane-find-scanner will now attempt to detect your scanner. If the
      # result is different from what you expected, first make sure your
      # scanner is powered up and properly connected to your computer.
    
      # No SCSI scanners found. If you expected something different, make sure that
      # you have loaded a kernel SCSI driver for your SCSI adapter.
    
    found USB scanner (vendor=0x03f0 [HP], product=0x7611 [Deskjet F2400 series]) at libusb:002:011
      # Your USB scanner was (probably) detected. It may or may not be supported by
      # SANE. Try scanimage -L and read the backend's manpage.
    
      # Not checking for parallel port scanners.
    
      # Most Scanners connected to the parallel port or other proprietary ports
      # can't be detected by this program.
    
      # You may want to run this program as root to find all devices. Once you
      # found the scanner devices, be sure to adjust access permissions as
      # necessary.

    Yes, it is there. WTF.

  • And then I remember… the last time I had to install a library so sane can talk with the HP scanner: libsane-hpaio.

Then the scanimage will show the scanner as expected, and obviously Simple Scan detects the device and everything works like a charm.

I guess I’ll need to go through all of this again in the foreseeable future, so I hope that me from the future will check the blog before going into troubleshooting mode and wasting half an hour with this thing (again).

May 8, 2011
In last week Have I Got News for You (BBC One, we watched it yesterday night, thanks to iPlayer),  the guest publication was Nuts and Bolts Magazine, and one of the questions featured Linux.
So, Do you know of any software that allows you to program PIC chips from within Linux? And apparently, and according to the magazine, there’s no one!
I’m not that sure: pic programmer linux :D.

In last week Have I Got News for You (BBC One, we watched it yesterday night, thanks to iPlayer), the guest publication was Nuts and Bolts Magazine, and one of the questions featured Linux.

So, Do you know of any software that allows you to program PIC chips from within Linux? And apparently, and according to the magazine, there’s no one!

I’m not that sure: pic programmer linux :D.

May 6, 2011
"OpenShift, is a portfolio of free, portable cloud services for deploying and managing applications in the cloud. Currently there are three application deployment services offered as part of OpenShift; Express, Flex, & Power."

From FAQ on OpenShift.

So Red Hat wants to be a PaaS provider with OpenShift. That’s interesting, but the fact they support PHP, Python, Ruby and Java it’s surprising! I mean, I would have expected Java (Red Hat owns Jboss), but not PHP, Python and Ruby.

The only thing that is slightly confusing it’s the name… because it’s OpenShift, but it doesn’t look like open source. That’s something bad coming from Red Hat, because they know what is OPEN and what is abusing the open buzzword. In which way is OpenShift more open than, let’s say, Cloud Foundry?

May 3, 2011
"Because JavaScript is pretty free-form, consistent coding style and unit tests are critical to give it some structure and keep it readable.

We propose that all GNOME usage of JavaScript conform to the style guide in doc/Style_Guide.txt to help keep things sane."

From README of GNOME Spidermonkey Javascript binding.

I think this README file sums up my opinion about Javascript in Gnome 3: I can’t understand why Javascript is used in the shell and not a more suitable language (such as Python). It was a very good opportunity to open the desktop to new developers, but… Javascript?

April 30, 2011
PIL Error Saving a JPEG Image

This bug has been very difficult to identify and workaround, so I’m writing this post for the record.

When I tried to save a JPEG encoded image using optimize option, I was getting the following error with some images:

Traceback (most recent call last):

  File "/usr/local/lib/python2.6/dist-packages/django/core/handlers/base.py", line 100, in get_response
    response = callback(request, *callback_args, **callback_kwargs)

  File "/home/motivator/../motivator/public/views.py", line 227, in creator_done_view
    img.copy().resize((480, 480*h/w), Image.ANTIALIAS).save(fd, 'JPEG', optimize=True)

  File "/usr/lib/python2.6/dist-packages/PIL/Image.py", line 1439, in save
    save_handler(self, fp, filename)

  File "/usr/lib/python2.6/dist-packages/PIL/JpegImagePlugin.py", line 471, in _save
    ImageFile._save(im, fp, [("jpeg", (0,0)+im.size, 0, rawmode)])

  File "/usr/lib/python2.6/dist-packages/PIL/ImageFile.py", line 501, in _save
    raise IOError("encoder error %d when writing image file" % s)

IOError: encoder error -2 when writing image file

The weird thing is that it was happening with a couple of images, and I couldn’t find a pattern (although the image size seemed to be relevant).

The problem looks related to libjpeg (the library PIL is using) and the way PIL is encoding the JPEG, and after trying blindly to tweak the saving process, I managed to get it to work setting ImageFile.MAXBLOCK to a big value (by default it’s using 64KB).

 # before saving, increase MAXBLOCK
from PIL import ImageFile
    ImageFile.MAXBLOCK = 1024*1024

I don’t know what block size works best, because I certainly don’t know what kind of image is making PIL to crash, but 1MB it’s been working fine for me so far.

When I was looking for information about this bug I’ve found that there’s some people not very happy with PIL because of the JPEG support. It’s working OK for me now, but I’m not 100% happy with the workaround.

April 27, 2011
77 Million Accounts Stolen From Playstation Network

More information at PSN blog: Update on PlayStation Network and Qriocity.

I don’t know how I would feel if I had a PSN account, with personal details, billing and credit card information, but I wouldn’t be happy. Not at all.

The thing is that I trust a couple of providers that currently have more or less all this kind of information (I don’t think I have provided personal details to the same people that have my credit card information, but nevermind). So it could happen to me. It’s scary.

Could this happen to you? If your answer is no, think again.