• Introduction to the IT world

    Because of my job, I am in contact with dozens of people that on a daily basis ask me how they can start a career in IT or even how to understand if they are “cut for the job” or not.

    First of all,images I think that one of the most important things that an IT enthusiast or “wannabe” is the skill to teach themselves and to be curious about everything. IT is a big word that contains too many different aspects, jobs and roles to clearly and easily understand if you can cope with it, unless you try for yourself many times until you succeed.

    Do you want to be a programmer? A DB admin? Onsite engineer? No matter what is tickling inside yourself, you need to try it out and feel how it feels. Hands on experience is what will make you understand if you can make it (and keep it up) or not.

    When I was younger it was easier, as the lack of GUI gave you only one option: a command line. You liked the command line? Were you able to spend hours over hours without getting crazy or suffering from major headache? Then you can do it. No matter which area, you can do it. You will need to study, practice and bang your head against the screen, but you will make it.

    Modern OSes are quite user friendly and have become launchers for the software we need. There is not so much to tweak or modify (respect of what was the standard 20 – 25 years ago). Self healing systems, able to preserve your data and allowing a complete reimage in minutes is becoming common.

    A few years ago you had no Internet, no immediate way to ask for help, you had problems and you had to fix them. Alone. Yes, you had BBSes and networks like Fidonet to find information, but you needed the time and patience to wait for days for an answer (not always, but in many cases).

    So in these days I’ve stumbled across the Synchronet BBS software, that has been created in 1992 and it’s still under development and to be honest, it’s an amazing and impressive software that includes:

    1. BBS software

    2. Web server

    3. FTP server

    4. Telnet/SSH server

    5. IRC server

    6. Mail server (SMTP/POP3)

    7. Usenet Server (NNTP)

    There are even more servers, but those are the main ones. Basically you can install your copy of Synchronet and configure a Webserver, Mailserver, FTP server using just one platform.

    When I’ve seen this, I had to try to make it working on one of my RaspberryPi and this has been quite easy (as it’s just a matter of following the instructions to compile it from CVS.

    Then I had the pleasure to have to modify many text files, use a couple of text based GUIs and slowly see my BBS starting breath and live. I used to maintain a BBS in the 90’s so it has been quite easy to grasp the basics, however this software is not based on the Internet protocols (and supports the standard modem connections), so I had to read many guides and manuals, but now I have a the BBS up and running, together with the Mail, Web, IRC, Telnet, SSH and FTP servers. Now I’m going to create some ANSI art and see if I want to advert this BBS to the world…

    I’ve spent hours doing this, still using the command line, and enjoyed every moment of it. Therefore I thought that the next time asks me if IT is something that he/she could master, I will probably ask them to prepare a *nix machine and install Synchronet on it.

    You don’t know what Linux or a BBS is? You don’t know how to use the command line? You want to receive a perfect training on all these things? You are not the one for the job. Are you going to surf the Internet for hours, break your machines dozens of times, document what you’ve learned, call a friend on the other side of the planet to ask him how to do something and, most of all, are you going to read (and understand) the manual and the instructions?

    Welcome to IT.

    funny

  • Ubuntu: How to automatically launch scripts/software upon inserting USB devices

    Have you ever thought about performing a custom action or launch a specific software when plugging your favorite USB device on Ubuntu?

    USB Cable

    I’ve been investigating this possibility recently and I’ve found a quite satisfactory solution. The idea has born when reading this blog about how to read udev rules. Udev is the device manager introduced with Kernel 2.6.13 and it manages all the /dev devices dynamically. Using upstart rules, we can use specific files (rules) to tell to our OS that a specific action/script should be run when a device (or a specific device) is attached to the system. The files are

    So I thought that it would be good to launch a simple script when I attach my Palm Pre2 to my Ubuntu via USB and run a rsync that will maintain a local backup of my USB partition on the phone.

    Thanks to the work done at stackoverflow I was able to understand how to create the rules, tailoring them for my device and then use notify-send to have a graphical view of what the script is doing.

    First thing to do is to identify your device:

    launch from a terminal window the command: udevadm monitor –env

    This will monitor the ports of your machine and when you plug a device like an usb pen, you’ll see a few lines identifying different pieces of information.

    What you need to write down are: ID_SERIAL_SHORT, idVendor and product.

    For example our ID_SERIAL_SHORT can be something like: 156aab412740f93d04869cac6c0837229d48456e, the idVendor a small number like “8332” like the product “8045”.

    Now that we have this information, we can create our upstart rule by creating a file named like 91-backup.rules in /etc/udev/rules.d (please note that the file should start with two digits and having an higher number of the other files in the same directory, so you’ll be sure that it’s executed first).

    Mine looks like:

    SUBSYSTEM==”block”, ID_SERIAL_SHORT==156aab412740f93d04869cac6c0837229d48456e, NAME=”PALM PRE”, SYSFS{idVendor}=”8332″, SYSFS{product}=”8045″,

    RUN+=”/home/user/backup/copy.sh”

    Please note the last line that calls a specific script, but you can choose a software or anything else.

    In my case, the content of that “copy.sh” is:

    #!/bin/sh

    sleep 2 #wait for the system to mount the drive

     if [ -d /media/PALM PRE/ ] # if the drive has been mounted

    then

     su stefano -c “DISPLAY=”:0.0″ notify-send “Mount” “Palm_PRE2 ready” -t 2000 -i “/home/user/backup/pre.jpeg”” #show on the OSD a specific message with icon

     rsync -ru /media/PALM PRE/ /home/user/backup/PRE/ #do a backup of my external media using rsync

            su stefano -c “DISPLAY=”:0.0″ notify-send “Palm_PRE2” “Syncronization_complete” -t 2000 -i “/home/user/backup/images.jpeg”” #reports that the backup is completed on the OSD

    fi

    I hope that this information will help you in doing something similar (and useful!) on your system. Enjoy!

  • Which is the perfect web browser for your HTML5 implementation

    Are you on the way to implement new websites or web applications and you want to see if Internet Explorer 9 will behave better than Firefox 6?

    Up in the sky

    The most obvious performance/support test would be to use the HTML5 application and see how well reacts within different browsers but… What if you don’t have the application ready for testing yet?

    Bear in mind that the HTML5 standard definitions are not completely standardized yet.

    I’ve found a very good Microsoft website that has put different HTML5 support and benchmarks tests in one place. The site has been designed to see the level of support and speed of Internet Explorer 10 against older IE or other browser.

    The page can be used to see which of your browsers with your addins/plugins behave better with different HTML5 pages.

    https://stefanoprenna.com/wp-content/uploads/2011/09/menu1.jpg

    Every test on the page is explained so you can even ask to the HTML5 developers inside your company which specific features they are implementing and see if you can test that in the Microsoft Testdrive page.

    I did a few tests myself and saw how differently behave different browsers with very different speed and visibility results for each.

    Now is your turn to surf into this interesting site and see which will be your favourite browser! Which is the winner for you and your company?

    HTML5 Menu 2