Category: web

New personal website

After a friend (thanks, Smash) presenting me Bootstrap, I decided to give it a look, as it might be interesting to bootstrap new projects design quickly. Given my lack of design qualities, having somebody doing it for my is great. To test Bootstrap I chose to do a redesign of my personal website, that was looking too much like last century, and making it more modern and, given I am using the default Bootstrap look, very similar to any other project using Bootstrap.

I still need to perform some arrangements (namely on the publications list, where I want to generate the citations automatically,  in the teaching page where I’ll link some teaching material I’ve been preparing and, probably, in the presentations page, where I need to recompute all thumbnails, as the ones made available by SlideShare suck).

If you want to give it a look

Dotcloud and Perl Versions

Today I waste all my afternoon trying to solve a problem with Perl versions and DotCloud. I say I wasted the afternoon because I could not solve the issue during the afternoon, only in the beginning of the night.

Enough complain, and let me explain what was going on. Yes, this post is a little as a complain to the DotCloud tech guys, but also as a guide to someone that stumble in a similar situation.

I had a service running with Dancer. It worked, it connected perfectly to the database. Next step was to set up a cron job to fetch some data from the Web. I added its dependencies in the Makefile.PL file for the website, and hoped that the deploy system would install them. But the cron job continued failing. I tried to force its installation, but the deploy system said it was up to date. Something wrong was going on. I forced a little more the installation, adding the URL to the module tarball. This way the deploy system could not guess its version, and therefore, would install the module anyway. It worked, but the deploy system continued complaining about other and other module.

It got stranger when the cron job complained about the lack of the DBI module. Hey, how can it be, if the website is running and using it? Well, DBI is based on C code, so probably I am missing to include a sub-folder of the local module installation. And then, it got clearer: the cron job complained that the version of DBI.so could not be loaded into Perl because of unresolved symbols. Aha! Then, there are two Perl versions.

And indeed, the web application was running Perl 5.14.x (I requested it on my DotCloud configuration file) and the Perl used by the cron job was Perl 5.10.x. Basically, DotCloud folks keep the system Perl, and install custom Perl versions under /opt/perl5, and creates some symlinks there, so that /opt/perl5/perls/current points to the Perl version requested.

So, the solution is to make the cron job use the correct Perl version. In my case I set the full path, but you could change the PATH environment variable in your .bashrc-like file.

This wasn’t that hard, but it was quite time consuming, because deploys take some time. Probably I could get faster if I remembered to test Perl versions right ahead, but I forgot to.

I suggest DotCloud guys to do one of two things: or document this in the same doc where it is explained how to request a specific Perl version, or fix the damn environment so that cron jobs and other code uses the same Perl version as the one requested by the system.

Google Docs: Presentation

Some time ago Google Docs (gdocs for short) was advertising their new presentation editor. Yesterday and today I decided to prepare two small presentations for a mini-meeting tomorrow, and use gdocs for that. The editor is not anything extraordinary, mostly a pair of text areas where one can write the slides content. As my slides are mostly items on lists, this is enough. I got in the end happy with my prepared presentation.

It all was fine if I didn’t want to export the presentation to PDF, so I can get it in a flash drive and use it during the meeting. Unfortunately gdocs presentation export system is completely broken.

First, let’s see how a slide appears in the online editor:

And this is how this same slide looks in the exported PDF document:

Cute, huh?

A lot of Google results to be paged

Sometimes Google has so many document hits that he needs to paginate them. Some other times, Google has so few documents hits… that he needs to paginate… huh? something strange here…

Google paging no results...

 

Tags: ,

categories web

Firefox vs Safari on Mac OS X

I confess I use Firefox, and I really prefer firefox user interface. But this is just stupid! I never had problems with Firefox before, and now that I have a fast machine and 8 GB of RAM Flash acts like this? OK, I know it is Flash.. but.. :-/

Also, no idea why I can’t get my Quicktime plugin to manage .mov files. It just does nothing. Check below how it behaves in Firefox and in Safari.

Hiding the bird’s guts

Probably this is a stupid rant/question. If so, please clarify me. I can live without the insults. Really 🙂

OK, on to the relevant stuff. Twitter has a new OAuth authentication mechanism. To write an application able to post on twitter your application need to be registered and have a consumer key. That key is used to identify your application to twitter when requesting permissions to a user to post using her credentials.

Now, the problem is when your application is written in a scripting language, like Perl, Python, Ruby or anything similar. Will you insert this key verbatim in the source code? Then, when shipping your app, others can grab that token and use it as if it were your app. You can encrypt it, but you need to ship the decryption algorithm as well, so, making the key verbatim.

One of two things can be happening: or twitter guys are not good on this API thing, or I am being totally stupid.

CSS Cheat Sheet

CSS Cheat Sheet

CSS Cheat Sheet

I teach XML, DTD and the like, and I teach (or show and make students use) CSS for XML. It doesn’t work properly on all browsers, it doesn’t work consistently on all browsers, it doesn’t do everything web publishing needs. But it is a good approach to add some style and usefulness to XML without teaching XSLT.

Normally I give my students a CSS Cheat Sheet. Usually it is the CSS Cheat Sheet v2 from Added Bytes. This time I googled some more time searching for a better one. Basically, Added Bytes cheat sheet present keywords for CSS properties, but doesn’t describe valid values.

In this quest, I found what I think it the best (ok, one of the best) CSS Cheat Sheet available in the Internet. It is from “A Coding Fool” webpage. It is two pages but I do not see that as a problem, given now most printers do duplex and, if it doesn’t, you can always do that manually. Is just one sheet of paper…

Google Indexes TTL

I really would like to know what is the time to live (TTL) of Google indexes. This blog of me changed design and back end in July (OK, end of July). We are in the beginning of February. Being a nice boy, this counts as six months.

And, after six months, I still have lots of lots of missed hits to posts that were published in the old engine and that are, yet, live in Google servers. What I need to do to make Google update their indexes and remove all this crap from there?

Great Captcha

captchaJust found this captcha from the Public Knowledge Project a great idea. It not just removes the necessity to render a image as it works on text browsers like Lynx or Links.

I am tempted to start using this kind of Captcha in my sites. Just need to check if there is any patent about it… hehehe

Tags:

categories web

Google Wave first impressions

google_wave_logoReceived today the invitation to join Google Wave project. Sincerely, I had no idea about what was Google Wave when I asked a friend for the invitation. But Google has nice projects and I like to know them (and use them when I think they can help on my everyday life).

I did not have much time to use digging out Google Wave. Just used it for twenty to thirty minutes. I think it is a nice JavaScript application, in the sense that explores JavaScript, explores asynchronous calls, and real time. But I can not find any other relevant application of it on my everyday life. I do not think it is useful for writing documents cooperatively (it is too much confusion to do so in a thread like approach), I do not think it gets anything new to common forum applications (only the JavaScript thing, probably) and do not think it is better than common IM for user communication. Probably it can be good to record a discussion on some sort of topic, like a forum, but in a faster way. But I am not sure.

For now, I think it is a good way to waste memory and CPU cycles. My Firefox (under Mac) did not like much the experience, and we had just 4 simultaneous users.