Archive for the ‘Knowledge’ Category

Still getting client-error-document-format-not-supported ?

Sunday, October 5th, 2008

I’ve wanted to set up a shared printer in my office where I run mixed boxes (both windows and linux), in particular I wanted to allow a windows box to print to a printer attached to a linux box.

Guess what? Error! Error! The document was in the queue but the printer kept idling.

CUPS “error_log” showed

Print-Job client-error-document-format-not-supported: Unsupported format ‘application/octet-stream’!

If you search that message you’ll find thousands of people telling you to uncomment two lines in CUPS configuration (even thou with recent Ubuntu it shouldn’t be necessary).
Problem is: that’s not enough!

The solution came reading this post in the ubuntuforums.

It seems that having the right driver on both boxes fools CUPS.
As I wanted the right driver on the linux box (it is its only local printer), I told windows to use a rawer one, “MS Publisher Imagesetter”, and that did the job.

printer_small.png

Gentoo: bad for the environmentalist, good for the developer

Sunday, June 15th, 2008

Gentoo is a source based distro: usually, every software you need will be downloaded in source code form and compiled right on your box.
This opens up a whole set of optimizations, making Gentoo usually a bit faster than other distros, as it is more specialized and can take advantage of your own CPU instruction sets (think about MMX, SSE and 3DNow!).

These optimizations make some guy see Gentoo as an environment friendly distro: software is optimized, therefore less energy is required to accomplish the same task.

But even the less intuitive can understand that having a computer stuck at 100%, compiling for hours, it’s not really good for the environment.

Nonetheless, I still use Gentoo and I suggest using it to my coworkers. To me Gentoo is the perfect distro for every developer as it helps you understanding your box (and even the differences with other’s boxes, if you start contributing your ebuilds)
Understanding the main tool you (as a developer) use, will make you more efficient: you’ll start having answers to others questions, because you have seen your installation growing up, step by step.

That’s my point in using Gentoo: my box is in the palm of my hand. I know almost anything of it. I usually know why things happen, on the contrary of my coworkers, that waste time and productivity finding workarounds to things they don’t know.

Something that reflects the quality of their job, as they produce software that sometimes misbehaves.

If you want to be a good developer, start understanding your box now. Whatever operating system you use, shit is unlikely to happen: everything happens for a reason. If you think your OS makes it hard to understand, try another.

Juggling rhythm and motion

Wednesday, June 4th, 2008

I’ve just watched this beautiful video on TED.
If your eyes will closely follow the things he uses, you’ll be amazed by the 3D shapes he’s drawing in the air.
And you’ll learn something about learning, maybe recalling some old feeling.
Don’t want to anticipate, just sit and watch it

This friday is a python friday

Tuesday, May 20th, 2008

This friday, May 23rd, I’ll be at the Underscore _TO* Hacklab, the local hackers club, learning Python.

I’ve always been too lazy to start learning it, while always being attracted by it.

If you are interested, follow the signs (courses are in Italian).

VirtualBox and Host interface

Friday, April 25th, 2008

I’ve run into this problem two times so I need to take note of the solution for further reference.

If you are trying to host a virtual machine with a public IP address and you are experiencing the
-3100 (VERR_HOSTIF_INIT_FAILED)
error message, then all you need to do is running the following command as root
tunctl -t vbox0 -u YOUR_NON_ROOT_USERNAME

vbox0 is the name of your tap interface. If you follow the almighty gentoo-wiki instructions, it will be vbox0.

My script for having everything set up on demand is

modprobe vboxdrv
chown root:vboxusers /dev/net/tun
chmod g+rw /dev/net/tun
tunctl -t vbox0 -u federico

I run it whenever I need to work with VirtualBox.

Migrating to linux

Monday, April 14th, 2008

As you may know, I’m on a new business, that’s something like bringing a company back to the present days, technologically speaking.

Since it will be quite hard to “attack” the software part and since the technologies that I’ll use will be all open source, I’m working to give my coworkers proof about the actual value and reliability of OSS technologies in general, replacing windows boxes with linux ones.

The aim is: if it has worked when switching from windows to linux, it would probably work when we’ll switch from VB to Java.

It’s a matter of trust. If they don’t trust me, I’m not the right man for the job.

The first thing was setting up a decent networking. I’ve found an old and noisy box, perfect for such critical tasks such as DHCP and DNS ;)
So everybody now has a fully qualified hostname, with Bind caching DNS queries.

Then I’ve chopped the Vista server. Wait a minute: Vista server? Yes. It’s a Dell box, bought right after the release of Vista: it was cheap but equipped with the most useless operating system ever.
I have proof (even if it’s too long and boring for writing it down here) that it has the useless networking ever: something like a hardcoded limit of 5 TCP connections… and people cracking it to surf the web faster… can’t be real…
Well: chopped. Samba is doing the job right now: faster (and therefore more productive) and cheaper. Indeed I’ve found another old box, plugged in two brand new hard drives, set up software raid 1 and voilĂ : 30 megabytes is the average memory occupied.

How many Gs do you have on your Vista notebook!? Ahahah, bye bye!

Safari on Linux: here we go again…

Monday, February 4th, 2008

After a long time, I finally managed to get Safari working again and steadily. Well, almost. Still something breaks here and there, but definitely usable.

So, to recap:

  • Ensure you got the latest wine installed (wine-0.9.54 here)
  • Download Safari from the Apple website and install it
  • HERE’S THE MISSING STEP: install corefonts then copy the installed TTF files into your $HOME/.wine/drive_c/Programmi/windows/fonts folder (”Programmi” is definitely italian, so translate it)
  • Run Safari with an easy “wine Safari” in the console (I suggest to use the console just to look at what it’s doing and to check if it’s complaining somehow)

Enjoy!

I’ve found the Safari.exe process is not correctly terminated when you close all its windows, so you’ll have to kill it manually. Also, go immediately to youtube (you’ll find the link in the bookmarks bar) and head over to Adobe to install the flash player (or you’ll experience some ugly white boxes while surfing)

And thanks to these guys.

JUG Torino January meeting over: thank you!

Wednesday, January 30th, 2008

Despite my deficiencies as a meeting organizer, the January meeting (the very first one this year) has just been closed and it was a good one.

I finally managed to study SoapUI and to briefly show its functionalities in the quickie, while Bruno showed us the new features of Java SE 6: scripting could be real fun… I have to look deeper into it, especially considering my previous post.

As always, all the bits (slides and code) showed and used during the meeting will be available on the JUG wiki page in the coming days.

Now come nearer the monitor, because I prefer to whisper this: next meeting we’ll probably have a new location! Sshhhh!!! Don’t tell anybody!

Will we ever have a Next Big Language? No…

Sunday, January 6th, 2008

Today I’ve had the pleasure to read InfoQ[0] and its comments about Ola Bini’s[1] opinion about the coming or not of a Next Big Language.

I share Ola’s opinion: no big language for your future, forget it.

Newer apps will be built with a mix of different languages, because each tool is born to solve one or few problems, and usually they are very good at it. Increasing software complexity will lead to a finer grained choice about which language best fits the problem to solve.

Question is: how do these languages communicate? Ola thinks they are all going to live on top of a JVM. That’s probably what will happen. Because that will make things easier.

That leads to the next question: will Java die? No. If we are going to stay in the JVM (and there is already evidence of it: JRuby, Groovy, Scala, Jython…) then we will gently move to these new worlds while keeping on using, developing, improving and investing on our solid code base.

I think no one can really predict the death of a language. We could only throw thoughts about what could change.

Language interoperability and polyglot programming could be good guesses.

Back from JavaPolis ‘07

Sunday, December 16th, 2007

Very good week, very good talks, very nice venue, wonderful croissants, very nice people, ugly photos! (photographer’s fault)

One nice note: a good number of talks was related to agile and there were always quite a crowd of people attending.