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: