Monday, December 22, 2008

Linux shoe store

This has blown me away laughing :D


seen here

Saturday, December 20, 2008

Need help find open ports and its process owners on Linux?!


Try this:

sudo lsof -i
sudo netstat -lptu

Thursday, December 18, 2008

If Programming languages were Religions

I red this at the Portuguese Java User Groups (PTJUG), and could not help to share it here.
I must say that i'm a Java and Python programmer, and a convict atheist :)


*C* would be *Judaism* - it's old and restrictive, but most of the world is
familiar with its laws and respects them. The catch is, you can't convert
into it - you're either into it from the start, or you will think that it's
insanity. Also, when things go wrong, many people are willing to blame the
problems of the world on it.

*Java* would be *Fundamentalist Christianity* - it's theoretically based on
C, but it voids so many of the old laws that it doesn't feel like the
original at all. Instead, it adds its own set of rigid rules, which its
followers believe to be far superior to the original. Not only are they
certain that it's the best language in the world, but they're willing to
burn those who disagree at the stake.

*PHP* would be *Cafeteria Christianity* - Fights with Java for the web
market. It draws a few concepts from C and Java, but only those that it
really likes. Maybe it's not as coherent as other languages, but at least it
leaves you with much more freedom and ostensibly keeps the core idea of the
whole thing. Also, the whole concept of "goto hell" was abandoned.

*C++* would be *Islam* - It takes C and not only keeps all its laws, but
adds a very complex new set of laws on top of it. It's so versatile that it
can be used to be the foundation of anything, from great atrocities to
beautiful works of art. Its followers are convinced that it is the ultimate
universal language, and may be angered by those who disagree. Also, if you
insult it or its founder, you'll probably be threatened with death by more
radical followers.

*C#* would be *Mormonism* - At first glance, it's the same as Java, but at a
closer look you realize that it's controlled by a single corporation (which
many Java followers believe to be evil), and that many theological concepts
are quite different. You suspect that it'd probably be nice, if only all the
followers of Java wouldn't discriminate so much against you for following
it.

*Lisp* would be *Zen Buddhism* - There is no syntax, there is no
centralization of dogma, there are no deities to worship. The entire
universe is there at your reach - if only you are enlightened enough to
grasp it. Some say that it's not a language at all; others say that it's the
only language that makes sense.

*Haskell* would be *Taoism* - It is so different from other languages that
many people don't understand how can anyone use it to produce anything
useful. Its followers believe that it's the true path to wisdom, but that
wisdom is beyond the grasp of most mortals.

*Erlang *would be *Hinduism* - It's another strange language that doesn't
look like it could be used for anything, but unlike most other modern
languages, it's built around the concept of multiple simultaneous deities.

*Perl* would be *Voodoo* - An incomprehensible series of arcane incantations
that involve the blood of goats and permanently corrupt your soul. Often
used when your boss requires you to do an urgent task at 21:00 on friday
night.

*Lua* would be *Wicca* - A pantheistic language that can easily be adapted
for different cultures and locations. Its code is very liberal, and allows
for the use of techniques that might be described as magical by those used
to more traditional languages. It has a strong connection to the moon.

*Ruby *would be *Neo-Paganism* - A mixture of different languages and ideas
that was beaten together into something that might be identified as a
language. Its adherents are growing fast, and although most people look at
them suspiciously, they are mostly well-meaning people with no intention of
harming anyone.

*Python* would be *Humanism*: It's simple, unrestrictive, and all you need
to follow it is common sense. Many of the followers claim to feel relieved
from all the burden imposed by other languages, and that they have
rediscovered the joy of programming. There are some who say that it is a
form of pseudo-code.

*COBOL* would be *Ancient Paganism* - There was once a time when it ruled
over a vast region and was important, but nowadays it's almost dead, for the
good of us all. Although many were scarred by the rituals demanded by its
deities, there are some who insist on keeping it alive even today.

*APL* would be *Scientology* - There are many people who claim to follow it,
but you've always suspected that it's a huge and elaborate prank that got
out of control.

*LOLCODE* would be *Pastafarianism* - An esoteric, Internet-born belief that
nobody really takes seriously, despite all the efforts to develop and spread
it.

*Visual Basic* would be *Satanism *- Except that you don't REALLY need to
sell your soul to be a Satanist...

Wednesday, December 10, 2008

Localizz TMN

This is a bit of advertisement but it's also to announce my first big development at work! :D


Sunday, November 30, 2008

Lorem ipsum

Lorem ipsum et eruditi dolorum sententiae est, ius oporteat inimicus conclusionemque ea. Ex quodsi eripuit senserit nam, ex vocent constituto sit. Et vel summo nominati corrumpit, elit fugit legimus his an. Utamur percipitur disputationi an mei, an elitr saperet vivendum sed, iudico animal scripta id vel. Eos ei solum tantas vivendo, eu eos mandamus consetetur argumentum. Ut pro dolor animal.


I'm doing some web development so I was looking for some dummy text to place inside the web templates I'm doing. I came across some sites and realised they all had the same type of dummy text to exemplify the content, like the above, so I questioned myself "Is there any site that generates this nonsense text?". And the answer to my question was, "Yes there is!!".

In fact this piece of random text, is not that much of a nonsense, and it is based on a piece of classical Latin literature from 45 BC, which makes it more than 2000 years old! Lorem Ipsum has been the industry's standard dummy text ever since the 1500, truly amazing!

You can find a website that tells the whole story and generates some Lorem Ipsum for you, at http://www.lipsum.com/

Other place, and maybe a more fancy generator, can be found at http://www.lorem-ipsum.info/generator3

Saturday, November 22, 2008

Daniel Tammet one of the great Savants

Yesterday David, my work colleague, told me about a BBC show he watched some time ago about savants. This show in particular was about Daniel Tammet, an autistic savant who has fantastic mathematical and linguistic learning facility. After all the things David told me about this man, i was really curious about what he could do, and watched the entire show at youtube. And i can tell you, this guy is amazing! He knows seven different languages and can learning one in about a week, like he did with Icelandic to be interviewed on national TV. But in fact he's even more skilled at maths, as he can make huge number calculations only using his mind, and used his memory to recite 22,514 digits of pi.
But the more curious fact about this guy, is that beside the fact that he has all the autistic characteristics, he is still capable of maintaining social relationships, which is not common on a person who suffers from autism.
You also see some other cases, like Kim Peek, the men that inspired the movie Rain Man, that can read, well i would call it "absorb", a page of a book in 8 to 10 seconds, and use his photographic memory to "store" its content.

You should follow my advice and watch this show, it will worth every minute, and i bet you will be as amazed as i was.

1/5 http://www.youtube.com/watch?v=AbASOc...
2/5 http://www.youtube.com/watch?v=WfoGsX...
3/5 http://www.youtube.com/watch?v=o7oEdE...
4/5 http://www.youtube.com/watch?v=UqLzoi...
5/5 http://www.youtube.com/watch?v=qMz3gj...


http://en.wikipedia.org/wiki/Daniel_Tammet

Thursday, November 20, 2008

CodeIgniter - a PHP web framework






Last friday at Sapo Codebits i had the chance to get involved in a project that uses a PHP web framework. Well, this is quite a novelty to me, since i don't do any web development for about 3 or 4 years, and the last time i did it, it was for a university project using PHP in the most horrible way i've ever seen, sticking all the code directly in the html file.

These new web frameworks out there (CodeIgniter, CakePHP, Django, Ruby on Rails, etc.), give a refreshing way to build your applications. Using the MVC model, you can separate what is background operation from what is presented to the user. This might not be new for you, but it is for me :) .

CodeIgniter is in my opinion a pretty good web framework, and ables you to develop a simple application from scratch very quickly. It is oriented to performance and small footprint, and it is ideal for people that don't want to loose a lot time configuring everything and be forced to restrictive syntax rules like in CakePHP.

Starting to develop is very simple, you just download the tar.gz or zip file, extract it, and copy it to your web directory root, modify a couple of files to reflect your database configuration and site url, and your ready to start some really awesome code typing!

The site has some video tutorials that i truly recommend if you what to try it, and good and clean documentation. It has also links to tutorials and more videos made by community users, with contents ranging from initial setup and basic introduction to web 2.0, ajax, and advanced features.

Oh and i forgot to mention that CodeIgniter is Open Source, so you can download it, use it and modify it if you like. Well for me this is quite important :)

I recommend it! Give a look at:

Wednesday, November 12, 2008

Sapo Codebits 2008


Indeed, it starts tomorrow!! And i'll be there!

Sunday, November 9, 2008

Windows Vista in 2 minutes

Pretty simple way to install Windows Vista on your machine.
He had some problems at the beginning but everything went fine afterwards.

Today's ephemerids

Well, just some of them...

1888 - Jack, the Ripper, makes his fifth victim: Mary Jane Kelly.
1918 - Germany becomes a Republic (see Weimar Republic and Reichstag).
1948 - Luiz Felipe Scolari, Brazilian football coach.
1989 - Fall of the Berlin wall.
1995 - Bill Watterson, Calvin and Hobbes creator , retires and dedicates himself to panting.
2004 - Internet browser Mozilla Firefox 1.0 was launched.

Note: all links point to Portuguese sites.

Make magazine

Have you heard of Make magazine?!






From the site:

About MAKE

MAKE Magazine brings the do-it-yourself mindset to all the technology in your life. MAKE is loaded with exciting projects that help you make the most of your technology at home and away from home. We celebrate your right to tweak, hack, and bend any technology to your own will.

Published as a quarterly since February 2005, MAKE is a hybrid magazine/book (known as a mook in Japan). MAKE comes from O'Reilly, the Publisher of Record for geeks and tech enthusiasts everywhere. It follows in line with the Hacks books and Hardware Hacking Projects for Geeks, but it takes a highly visual and personal approach.

Our premiere issue showed you how to get involved in kite aerial photography — taking pictures with a camera suspended from a kite — and how to build an inexpensive rig to hold your camera.


This is a really cool magazine and site for people that know something about electronics, are just curious about it, or just like to watch some insane stuff that you can do, for example, with mint cans (like me!).

These are some examples of what these guys are doing,

A lunch box guitar:


Something i can't quite understand what it is :P

And many more.

Take a look at the site, it has lots of videos, pdf tutorials, and give it a try in one of the weekend projects!

http://www.makezine.com/

Thursday, November 6, 2008

Rednecks for Obama

This picture just made me laugh.
So this is the change they were talking about!

Shouldn't these guys be voting for Mccain?!

Wednesday, November 5, 2008

20 month old kid and IPhone

I'm really not a iFan but this videos surprised me a lot.
It's fun to see such a young kid interacting with a sophisticated device.





Fernando Afonso must be a great dad! :D

Saturday, November 1, 2008

Mouse Pad Warmers?!

Some hours ago i thought to myself "Man! my hands are really cold! They're always cold when i'm at the computer, there should be something to keep my hands warm!". And then i thought "I'm certain that some idiot (a person with great ideas) invented something to handle this situation".

Well it's true someone has invented a USB Mouse Pad Warmer!

You can take a look for yourself.


I'm not sure if this object is practical, but if it keeps my hands warm maybe i'll give it a try.
Anyway in my opinion it's a great idea!

Happy veganism day!

Since the fiftiest anniversary of the Vegan Society (UK vegan and vegetarian society) in 1994, that in the 1st of November is celebrated the «world vegan day».
So for all of you out there that are vegan or vegetarian, HAPPY VEGAN DAY!!

More information at:

http://en.wikipedia.org/wiki/World_Vegan_Day
http://en.wikipedia.org/wiki/Veganism
http://en.wikipedia.org/wiki/Lacto-ovo_vegetarianism

Friday, October 31, 2008

Ubuntu Linux 8.10 is out

In case you have noticed, because you've been out of internet service, don't have friends or still believe that a computer is box with a monitor and some ordinary windows ( :P ), the new version Ubuntu Linux is out. It came out yesterday afternoon, and it's available for download for free!! «True story!» (Quoting Barney from "How i met your mother").

If you dont know what Linux or Ubuntu is, or you've gone to the dark side of the force again, here are some links to consult:
http://en.wikipedia.org/wiki/Linux
http://www.ubuntu.com/products/whatisubuntu
http://en.wikipedia.org/wiki/Ubuntu

The downlink for the new version is http://www.ubuntu.com/getubuntu

Wednesday, October 29, 2008

Project Euler

If you like challenges and solving problems related to mathematics and computer science, this may be the site for you :)

http://projecteuler.net/
"Project Euler is a series of challenging mathematical/computer programming problems that will require more than just mathematical insights to solve. Although mathematics will help you arrive at elegant and efficient methods, the use of a computer and programming skills will be required to solve most problems.

The motivation for starting Project Euler, and its continuation, is to provide a platform for the inquiring mind to delve into unfamiliar areas and learn new concepts in a fun and recreational context."
I have solved some problems myself, but i really don't have the time at this moment to do more, but anyway i recommend it!

Tuesday, October 28, 2008

Pillow Fight Club

On the 1st of November, grab your pillow and go to Alameda Dom Afonso Henriques, Lisboa, and join the Pillow fight flash mob!!!

More information about this event here (Portuguese).

Site of event:

Monday, October 27, 2008

Programming Language Examples Alike Cookbook

This is a great project allocated at sourceforge, that i consult frequently while at work or doing some code at home.
Quoting the project description is the best way to describe it's aim.

"Following the great Perl Cookbook (by Tom Christiansen & Nathan Torkington, published by O'Reilly; you can freely browse an excerpt of the book here) which presents a suite of common programming problems solved in the Perl language, this project aims to implement the solutions in other programming languages."
At the project site you can consult lots of code examples on many languages, most of them are scripting languages, like Perl (obviously...), Python, Ruby, Groovy, Haskell and so on... Recipes like, reading file contents, string operations, hastables operations, regular expressions examples, etc.

And if you want to contribute in some way, like adding your favourite language, you can do it also by accessing the discussion lists.

You can access the site here and take a look at the great day-to-day examples, very useful in my opinion.

Hi all!

Hi everyone,
this is yet another blog of a guy that have plenty to do, but still has time to write some nonsenses and some useful information for someone out there that is willing to waste (or invest...) some time reading this.
Enjoy!