jump to navigation

Learning PHP, MySQL, JavaScript, and CSS by Robin Nixon, O’Reilly Media October 2, 2012

Posted by claudio in Uncategorized.
Tags: , , , ,
add a comment

Although I was curious about this book, I had mixed expectations. I have no background in web development (beyond playing a little with Catalyst and Drupal) so getting my toes wet with popular web-related technologies can’t hurt. At the same time, I must confess I had serious doubts when I read the title out loud: “PHP”, “MySQL”, “JavaScript”, “CSS”. Learning four technologies as different as two programming languages (one server- and one client-side at that), a relational database and a style sheet language seemed like a little too much, even for a book of 556 pages.

Depending on your expectations, the book may be a hit or a miss. On one hand, if you unrealistically hoped to be a PHP, MySQL, JavaScript and CSS wizard after reading the book: no luck. You’ll need to buy several books about each subject and invest the necessary time to get to know the technologies. But, you probably know this already. If, on the other hand, you just want to scratch the surface but -this is the interesting part- you want to see how these disparate technologies interoperation, then it’s a pretty good read. In the limited space, the author manages to give attention to best practices (e.g. database normalization), something I didn’t expect. The including classical web application mini-project, that uses the 4 technologies, may be a good incentive to those that prefer a more hands-on approach.

Title: Learning PHP, MySQL, JavaScript, and CSS, 2nd Edition
By:obin Nixon
Publisher:O’Reilly Media
Print:August 2012
Pages: 584
Print ISBN: 978-1-4493-1926-7
          ISBN 10:1-4493-1926-2

Book at amazon.co.uk Book at amazon.co.uk
Book at amazon.fr Book at amazon.de

YAPC::EU 2012 August 24, 2012

Posted by claudio in Uncategorized.
Tags: , , , , ,
2 comments

While waiting on my train to Belgium, I profit from this distraction-free time (read: no Internet) to reflect on the last days at Frankfurt. But first things first: I would like to thank mdk and the Enlightened Perl Organisation for making the attending of my first YAPC possible though the Send-A-Newbie initiative. It was a wonderful experience.

Hammering Man, Frankfort

Getting to Frankfort wasn’t as easy as expected. A three hours direct trip from Brussels became a 7 hour one including six trains (including local ones), several changes and stops in the middle of nowhere because of a yet again a broken train. Being packed like sardines in the corridor of a non air-conditioned carriage for 1h30 when the temperature outside was close to 40 °C (who knows how hot it was inside): not nice. Add to that getting almost no information what so ever. Anyway, a long cold shower, a change of clothes, a walk in Frankfurt and dinner with the Belgian mongers Serge (president of Brussels.pm) and ecocode (Brussels.pm && Flanders.pm) put me back in the YAPC mood in no time. The hotel were I stayed was a half an hour walk from the venue and although there was public transportation, I preferred to walk to and from the conference: what better way to enjoy a city?

Walking to YAPC

The arrival at my first YAPC was a little schizophrenic. It was impressive to see the wide array of people of the Perl community. Different languages, accents, backgrounds… you name it. At the same time, it was fantastic to meet Perl people I already met in the past (e.g. by organising the FOSDEM Perl dev-room) and being able to link faces to irc nicks (e.g. sewi from Padre). I picked up a lot of things I can use at work, and through the presentations I got curious enough to try new things (e.g. Dancer). Also talks outside the rooms made me curious (e.g. Mojolicious). For the record: I am not a web-dev guy.

Larry Wall

Even if you weren’t there, you can probably get from the lines above that YAPC is at the same a technical and a community event. There were way too many great talks to name them all, so I’ll limit myself to the talks that left a background job running in my head. Probably in chronological order, first there was markov’s lightning talk about the “Perl Reunification summit” (summaries here and here) that was held this weekend in the town of Perl (a real town). Liz and Wendy (which I know from Flanders.pm) gathered important people from the Perl 5 and 6 community and got them… talking. If they can fulfil their plans (they are ambitious) it would be completely amazing. Time will tell. Read the summaries linked above.

markov’s talk about the Perl reunification summit

The second talk that rang a bell was Stevan Little’s talk about the new MOP (Meta Object Protocol) in Perl 5. I can not stress on how cool and important this is: Perl 5 is going strong. While a technical talk, Stevan’s talk had a strong –although implicit – community aspect. This is a huge change to the core Perl and introducing the MOP and the related syntax requires the collective effort (in code and advice) of different part of the community, including Moose and yes, Perl 6. Salve from Oslo.pm announced they are organising and sponsoring a Moose hacklaton in a few weeks. Oh, and stevan mentioned en-passant how real exceptions will look like. That would remove 2 out of 3 of the my “weakest points in Perl” list. Incredible.

stevan’s talk “A MOP for Perl”

Salve’s talk about Mongers communities

I was positively surprised by Mst’s “State of the Velociraptor [Perl 5]” as it echoes my personal stand of Perl in the wider FOSS world. First, Perl 5 trolling is so passé. Second, we should be positive about the FOSS “competition”: “Let a hundred flowers blossom” as they used to say in China :). He illustrated this by a very recognisable example from IRC when people ask (e.g. #python and #perl) what language to learn. His advise is “learn both and pick the one you like most, they are both great languages” (quoting from memory). I applaud this positive attitude of the community of the last years. It shows that we’re no longer in the defensive. In my experience this is something people appreciate.

mst’s “State of the Velociraptor”

To conclude, mdk’s last lightning talk didn’t get stuck it my head through the technical or the community aspect, but -damn it!- through the the rhythm and the melody. Like the next speaker said: “try to be the next speaker after that” :).

I don’t like Perl!

The last day I had a nice dinner with two Perl Mongers from Barcelona: Diego and Enrique. I met Diego at FOSDEM and Enrique is a co-Padre-hacker. We had a very nice and long talk on a beautiful –and luckily less hot– evening. A perfect end for my first YAPC.

But let me end by thanking the people in the yellow t-shirts, the organizers. They did a fantastic job in difficult circumstances (did I mention how hot it was? :) ). Thank you Frankfurt.pm and friends!

A big applause for the organizers!

You’ll find more (and bigger) photo’s on my flickr page.

My (photographic) impressions of YAPC::Europe 2012 August 23, 2012

Posted by claudio in Uncategorized.
add a comment
YAPC::Europe 2012. Frankfurt, GermanyFrankfurt, GermanyFrankfurt, GermanyFrankfurt, GermanyFrankfurt, GermanyYAPC::Europe 2012. Frankfurt, Germany
YAPC::Europe 2012. Frankfurt, GermanyYAPC::Europe 2012. Frankfurt, GermanyYAPC::Europe 2012. Frankfurt, GermanyYAPC::Europe 2012. Frankfurt, GermanyYAPC::Europe 2012. Frankfurt, GermanyYAPC::Europe 2012. Frankfurt, Germany
YAPC::Europe 2012. Frankfurt, GermanyYAPC::Europe 2012. Frankfurt, GermanyYAPC::Europe 2012. Frankfurt, GermanyYAPC::Europe 2012. Frankfurt, GermanyYAPC::Europe 2012. Frankfurt, GermanyYAPC::Europe 2012. Frankfurt, Germany
YAPC::Europe 2012. Frankfurt, GermanyYAPC::Europe 2012. Frankfurt, GermanyYAPC::Europe 2012. Frankfurt, GermanyYAPC::Europe 2012. Frankfurt, GermanyYAPC::Europe 2012. Frankfurt, GermanyYAPC::Europe 2012. Frankfurt, Germany

YAPC::Europe 2012, a set on Flickr.

Blogpost will follow later.

Review: Programming Perl (4th ed) by Tom Christiansen, brian d foy, Larry Wall, Jon Orwant (O’Reilly Media) August 10, 2012

Posted by claudio in Uncategorized.
Tags: , , , , ,
add a comment

Image

If you already program in Perl you know that “Programming Perl” is the de facto reference of the language. I haven’t met Perl Mongers citing randomly from it, but we are not that far from it :). If you’re new to Perl, well now you know what you will be reading soon.

 This brings us to the targeted public of this book and that’s a tricky question. In my opinion, if you’re new to Perl –or new to programming– you are better served by “Learning Perl” (or a similar book). On the other hand, if you are an experienced programmer you’ll learn Perl from “Programming Perl” with a deep understanding of the language as a bonus. But 1184 pages may be a little too much to get your feet wet.

Don’t return the book to Amazon yet if you take the tutorial-road: your copy will serve you well for years to come as reference for the less obvious aspects of the language (and let’s be honest, there are several). So, this book is not a tutorial book. It’s neither, unlike what I just wrote, a pure reference book. The book is very well written, with just enough humour (also: as not “too much”) to make the 1184 pages digestible to get a deeper insight of the language, something that can not be said of many reference books that are written in a “phone book” style.

The previous versions dates from the year 2000 and covers ancient perls preceding the Perl revival and modernisation we’re enjoying today. Well, if this book is so important for the language –the codification of the language as it were– and well written to be enjoyable, the authors should be lucky to not face trial for the Perl riots while waiting for the update of the book. More seriously, the update was indeed urgently needed and kudos to the authors: writing this kind of book (content and reputation) is hard. It helps that Larry, the creator of Perl, is part of the team. A great read.

“Programming Perl, 4th Edition” by Tom Christiansen, brian d foy, Larry Wall, Jon Orwant
O’Reilly Media, February 2012, 1184 pages
Print ISBN: 978-0-596-00492-7, ISBN 10: 0-596-00492-3
Ebook ISBN: 978-1-4493-9890-3, ISBN 10: 1-4493-9890-1
Programming Perl @amazon.co.uk

Screen Calibration on Ubuntu 12.04 with Spyder2 [workaround] May 6, 2012

Posted by claudio in Uncategorized.
Tags: , , , , , , ,
2 comments

The bad news: the default colour calibration wizard on Ubuntu 12.04 has a bug: awful magenta cast on some screens. Fine on others.

The good news: it works flawlessly using the (graphical) alternative below.

As a enthusiastic photographer (see my latest Perl Fosdem pictures) I am very positive about the colour management integration in the latest Ubuntu (12.04). Sure, colour calibration was possible before, but now it’s an integral part of the system and not a simple add-on. Ubuntu++

Once the reviews are in, I will probably buy the ColorHug open source hardware calibration device. In the meantime I borrowed an old Spyder2 (express) from my father-in-law. I do not recommend buying new devices from Colorvision. The company is known to be very antagonistic to free and open source software. But, if you already have the hardware in a drawer it’s better to use it.

Once you plug in the device, the “Calibration” button will activate and the necessary packages will be installed. However, for this HOWTO it’s easier just to install the software (and its dependencies) from a shell window:

$ sudo apt-get install gnome-color-manager

(This install argyll as a dependency that does the real calibration beneath the GUI.)

This step is only applicable if you have a Spyder 2 device. As mentioned above, the company is not FOSS-friendly and doesn’t even provide technical specifications. You will need the firmware of the device from the Windows driver. If you trust me, you can get mine here [MD5: 007ac5705a3a8ed7edf01569700e6ebf]. Put it in the .local/share/color directory in your home directory (create the needed directories if not present). It was extracted from the 2.3.6 Windows driver for the Spider2 Express (the latest at the time of writing). If you want to create the file yourself, see here. In short: you’ll need the driver CD. If you don’t have it or want/need a more up-to-date version, you’ll need to install the driver and feed the generated .dll to spyd2en: spyd2en -v ./CVSpyder.dll

In the GUI (Dash -> Applications -> Color, or simply type “color” and click the icon), if you select your screen and the “Calibrate…”, the steps offered by the wizard are straight forward. Very easy. While it worked great on the computer of my better half, the generated profile on my own laptop (attached to an external screen) had a terrible magenta cast. Not of the type “your eyes will adapt to it”.

After investigating and looking closely at the profile, it was clear that the profile used a 6500K white balance, instead of the 5000K requested in the wizard (it’s called “Photography and graphics” there). Furthermore, the wizard offered 3 calibrations options: 4, 10 and 20 minutes depending on the desired accuracy. While I chose 4 minutes for testing purposes, the calibration took a long time (an hour or longer). Also, the advanced output in the calibration window (hidden by default) categorised the screen as CRT while it’s a LCD. Because of this, I don’t think the problem is tied to the specific firmware (running the latest available) of the hardware, but rather to gnome-color-manager integration with the device and maybe certain configurations. I don’t have other calibration devices available to test. Bug reported.

dispcalGUI is a OS-agnostic alternative to gnome-color-manager and in fact – just as gnome-color-manager – and GUI on top argyll. Just download the deb (the most recent deb for Ubuntu 11.10 works fine on 12.04). If you double click it, the Ubuntu Software Manager will launch and perform the installation (or just use “dpkg -i” if you are a Debianista at heart).

Now, launch the dispcalGUI application from the Dash or just open a terminal (Ctrl + Alt + t) and type:

$ dispcalgui

Select the Photography profile, your screen (if you have a multi monitor setup) and probe your device (by clicking on the “recycle” arrows) and give your profile a more recognisable name and a location. I use brand_model_calibrationDevice, e.g. Samsung_SyncMaster2443FW_Spyder2Express). Click on Calibrate and Profile and go read a book or take some pictures (it will take a lot longer than 20 minutes, probably an hour). If you wish you can skip the white point and black level, YMMV.

Now go back to the Ubuntu Color Settings as above and add the new created profile by selecting your screen, then click “Add profile”, select other and choose the path you save the monitor profile.

Your monitor is now calibrated!

Perl devroom @FOSDEM2012: photos April 27, 2012

Posted by claudio in Uncategorized.
Tags: , , , , , , ,
1 comment so far

Finally I found the time to “develop” my Perl dev-room @ FOSDEM 2012 pictures (convert from camera RAW files to jpg). It was a very nice event. If you missed the Perl dev-room in the past year, you should really visit us in 2013. Or even better, give a talk.

In the pictures above you see Nicholas talking about Moose. He forgot his mac-VGA adaptor (ahum) so he ended up writing code on the blackboard (“the loudest syntax checker on earth”). Marc mixed some Haskell in his talk while Flavio showed some Javascript-powered Perl. Clément presented a Perl SSO solution and Erik showed us a open source accounting solution. Stefan introduced the PerlCommerce platform, while Ævar (a famous guy being the most mentioned name in Programming Perl, 4th ed!) talks about git-deploy (or rather git-undeploy :) ). Marius explained the marriage of Moose and MemCached.

As the organizer of the Perl dev-room, I had to attend to a few things during the talks. My excuses for not taking pictures of Mark’s and Guillaume’s talk (I was able to attend most of it, though). Sadly,  I didn’t had the time to photograph our fabulous Perl stand (although I have some pictures from last year): Wendy, Liz, Eric and all the other volunteers did a great job.

Thank you for a successful Perl FOSDEM presence.

The Program was as follows:

Welcome to the Perl devroom Claudio Ramirez AW1.121 09:00-09:05
Moose Primer Nicholas Perez AW1.121 09:05-09:25
Advanced Moose Techniques Nicholas Perez AW1.121 09:35-09:55
Perlude: a taste of Haskell in Perl Marc Chantreux AW1.121 10:05-10:45
Perlito Flávio Glock AW1.121 11:05-11:45
The LemonLDAP::NG Project Clément Oudot AW1.121 11:55-12:15
LedgerSMB: Open source accounting running on Perl Erik Huelsmann AW1.121 12:25-12:45
Modern PerlCommerce Stefan Hornburg AW1.121 13:25-14:05
Rapid real-world testing using git-deploy Ævar Arnfjörð Bjarmason AW1.121 14:15-14:35
POSIX::1003 Mark Overmeer AW1.121 15:00-15:40
The FusionInventory Project Guillaume Rousse AW1.121 15:50-16:10
Using Moose objects with Memcached Marius Olsthoorn AW1.121 16:20-16:40

Review: #tweetsmart by J. S. McDougall (O’Reilly Media) March 22, 2012

Posted by claudio in Uncategorized.
Tags: , , , ,
add a comment

Ok. I am new to twitter (@nxadm) and I am not sure I completely grasp the concept. So what’s more promising than a title in the form of a hashtag? The back of the book reads: “#tweetsmart provides the answer [to what to do with twitter] with 25 creative projects to help your business, cause, or organization grow. But this isn’t just another social media marketing book—it’s the anti-marketing how-to community-engagement book”. Does the book deliver? Well, it all boils down to who you are.

The good

It’s certainly a good read. I enjoyed it. It’s short (100 pages), sometimes funny and always extremely to the point, something I appreciate. McDougall is really passionate about the subject and that shows: the author’s style is enthusiastic and upbeat. If you’re a business you’ll be using the oldest marketing tricks in a digital jacket in no time. You’ll reach a much bigger audience that you thought it was possible and it will cost you peanuts. Good.

The bad

So, what if you not own a business? No problem, the back says “business, cause, or organization”, you may think. Nope. Being an free and open source enthusiast involved in a few projects (e.g. Padre, the Perl IDE) it was specifically the “cause or organisation” part that made me curious. Of the 25 recipes, isn’t there at least one applicable to smaller (not commercial) open source projects? Sadly, no. It will help you to sell coffee or burritos, but not reach new users or developers. Did I learn something I didn’t know? Again, no (I repeat: I enjoyed the book).

So the “anti-marketing how-to community-engagement book” epithet may be a little euphemistic. Let’s stick with a “not-annoying and not insulting practical online marketing book for small business”. Sure, it sounds less “cool”, but take it from me, “not annoying and not insulting” part is worth *a lot* when talking about marketing.

Conclusion

Will I recommend it? Well, it depends on who you are. The 3 of 5 stars I give to this book is just an average: it ranges from totally irrelevant for some uses to a fantastic HOWTO to get the online marketing of your business started in no time. You Mileage -May- Will Vary.

#tweetsmart
25 Twitter Projects to Help You Build Your Community
By J. S. McDougall
Publisher: O’Reilly Media
Released: February 2012
Pages: 106
http://shop.oreilly.com/product/0636920021315.do

Migrate a virtualbox VM to a bigger virtual disk March 18, 2012

Posted by claudio in Uncategorized.
Tags: , , , ,
3 comments

When a virtual machine has limited use, you don’t want to loose too much space. Sometimes, however, you get the size wrong.

In my case, I have a minimal Windows VM on my Ubuntu laptop. Once in a while I test an upcoming Padre (The Perl IDE) release or update a crappy usb device with Windows-only support. Win-modems may be gone, but we still have GPS devices that run GNU/Linux but can only be connected to Windows. (I guess seeing your market-share shrink because of smart-phones is what they call bad karma, TomTom.)

Windows being Windows, adding disks is a terrible experience (what’s up with the alphabet as a mounting point?) and moving a Windows installation to a second disk is a nightmare. Luckily, free software gets the job done:

1. Make sure your guest machine is halted properly. This is specially important for a NTFS (virtual) partition of a Windows VM.

2. Download Ubuntu (It does not matter if you use the 32- or the 64-bit version, other GNU/Linux distribution will work as well). The screenshots are from a Ubuntu 11.10 setup.

3. In the specific VM-settings, add a new disk (to the same disk controller) and a new cdrom. Load the Ubuntu iso in the virtual cdrom drive.

 

4. Make sure the VM boots from the cdrom.

 

5. “Try” Ubuntu. Once Ubuntu is loaded, launch “gparted”.

 

6. Select the old disk (normally the first one, check the size).

 

7. Right on the disk representation and “copy” it.

 

8. Select the new disk from the combo-box on the upper right (check the size).

9. Go to “Device”, choose “Create Partition Table…”. Click “Apply” in the pop-up window.

 

10. Right on the disk representation and “paste” the original disk. Click “Apply” in the pop-up window.

11. Click on the green “Apply tick” on the icon menu to apply the changes. This will take some time. Get some coffee.

 

12. Right on the disk representation and select “Manage Flags”. Enable “boot”.

13. Shut down the Ubuntu Live cd.

 

14. Remove the original disk from the VM configuration (back it up first).

 

That’s it!

Logitech Wireless Trackball M570 on Ubuntu March 1, 2012

Posted by claudio in Uncategorized.
Tags: , , , , ,
3 comments

A colleague working in our IT-helpdesk found an old Logitech TrackMan Wheel in his drawer. “Old” as in out-of-production model launched around 2002. The thing was good as new: the trackball was still in his original package and the documentation and CD package were sealed. The person that ordered the thing years ago didn’t get used to it after one try. Lucky me :).

So I gave it a try and wow… I have gone ergonomic! While it took some minutes to kill the reflex to move the mouse around, I got used to the trackball mechanism very fast. When I got home I ordered the heir of this model, the Wireless Trackball M570.

At its arrival, my Virtualbox Windows VM was ready to be booted in order to pair the mouse and the wireless adapter. Sadly, Logitech only provides a MS Windows and Mac OS X binary. Once paired, the interwebs agree on this, the combination works on whatever OS you connect it too.

Big was my surprise, when everything worked out of the box in Ubuntu (11.10). Logitech seem to do the right thing nowadays and the devices are already pre-paired. Letting the pairing to the customer seems medieval when you thing about it. Logitech++.

So, everything works fine. The trackball is fantastic. The only complain is that the scroll-wheel makes a cheap plasticky sound when clicked, and as a UNIX user, it’s something you do often. This new model has 2 additional buttons compared to the original TrackMan. Out of the box, they are configured as Back and Next (e.g. while browsing in Firefox).

I don’t care much about these buttons and not at al for the Back and Next function. They are out of the way, so if you don’t use them, they won’t drive you crazy. Anyway, while they are there, why not give them a shot and assign them a useful task: easystoke to the recue! (“sudo apt-get install easystroke” from the shell, or search for “easystroke” on the Ubuntu Software Center)

I configured the additional buttons as Page Up and Page Down, something I really do use often (I find it easier on the hand than using the scroll wheel). I followed the instructions from the Archlinux wiki. Being a wiki, I copy the short instructions in case it get removed or moved:

easystroke is a mouse gesture application, but it can be used to manage mouse buttons as well. It’s main advantage o-ver btnx is that it’s more versatile. On the other hand, it’s user-based, so any user has to configure it to reflect his own needs.

In order to set up easystroke to manage your extra mouse buttons, you’ll need to do this (example features Back/Forward mouse buttons) : run:

easystroke -g

Go to Preferences tab > Additional buttons > Add, and add any special button.

Go to Action tab > Add action, give the new action a name, as Type choose “Key”, as Details set “Alt+Left” for Back button, “Alt+Right” for Forward button, as Stroke click the proper mouse button (confirm if a warning is displayed), and voilà! Your mouse button is configured.

I add some screen-shots for your comfort that illustrate my specific configuration. Nota Bene: to get Shift+Page Up/Down working (e.g. scrolling in a terminal), you need to add the combo to easystroke.

Be nice to me and I’ll be nice to you (ebooks) February 25, 2012

Posted by claudio in Uncategorized.
Tags: , , ,
2 comments

I love it when I get a fair deal in this greedy digital world. Paying twice for the same content is something I really dislike.

Besides the content, I like chromatic’s way of doing business: you can freely download the DRM-free pdf of his book (Modern Perl) even if you don’t buy a hard copy. Guess what, I bought the book the day it came out.

Although O’Reilly does make you pay for the electronic content of a printed book you already own, they give you a very fair deal: “Upgrade to the electronic version of any print book you’ve registered at oreilly.com, for just $4.99″.

I just got the DRM-free digital version of 5 O’Reilly paper books I already own and I don’t feel cheated at all. Be careful though not to mix offers like the 5$ book “upgrade” the half price for new releases of books you own. In this case you’ll pay half price of the full ebook price instead of the 5 $.

This is how you make customers happy. Treat me with respect and I won’t mind sending some money your way once in a while.

Follow

Get every new post delivered to your Inbox.

Join 145 other followers