Star Wars a capella

November 12th, 2008

Just found this video on Youtube. Apparently it’s been featured a few days ago, but in my opinion it should have stayed there for a few weeks, minimum ;)

Lyrics here.

PS: John Williams is the man!

Warehouse installation tutorial

October 3rd, 2008

Today I got to the office, and the first thing that popped into my eyes when I opened Twitterrific was this:

Rick Olson announces that Warehouse goes open-source

Rick Olson announcing that Warehouse is now open-source. Damn, it HAS to be Christmas! I have always loved the products that Active Reload builds, mostly because they follow the “do more with less” and “keep it simple stupid” principles, but also because their web-applications look awesome, thanks to Justin Palmer, the self-taught and self-proclaimed Design Ninja (I’ll have to agree with him on this one).

I have always wanted to give Warehouse a spin on my projects (professional and personal), but never got around to buy it because I was afraid it could be of no use for me (you guys have to find a way to distribute trials or something). Now that it’s open-source, I am going to try and provide a guide on how to install it.

Read the rest of this entry »

You know it’s going to be a great day when…

September 29th, 2008

someone you admire starts following you on twitter.

Thanks for making my week start well, Pedro.

A note about Puzzle Quest’s randomness

August 5th, 2008

The first thing you should know about this game is that this game hates you. I don’t mean that the game is designed to go against you. I mean the game hates you. The designers of this game created the first artificial intelligence system designed to mimic the actual emotion of hate. When you are sleeping, the game is plotting your downfall with all of your other electronics. In all seriousness, you will constantly find yourself getting frustrated with the random nature of the game. Many times, you will find yourself crying foul and cheating when the game drops a +5 Skull in perfect position for your opponent. Granted, the randomness will also help you every once in a while, but you will swear that the game cheats for your enemy more than it does for you. There really isn’t much you can do about this aspect of the game. After all, this is how randomness works.

Read it here. Emphasis is mine.

When screen shots go bad

July 14th, 2008

Browsing the iTunes App Store today, I found a priceless application that turns your iPhone into a flash light. Needless to say, I went on and checked the screen shots. So, without further ado, here they are:

As Marcel Molina puts it, “I like that there are two screen shots for the Light app“. Nicely said.

Learning a new programming language

July 4th, 2008

It’s common sense in the programming circle that programmers should make an effort to learn a new language every year. Some make it their New Year’s resolution, some just do it for the fun of it, others do it to enrich their experience and their CV. So, today, I decided to grab a new language and stick with it until I MASTER the damn thing. I only had a requirement before choosing it: it had to be fun!

So, what language did I choose? None other than LOLCode.

I know what’s going through your mind now. “Why the eff is this guy even thinking about learning a new language?”, “useless”, or even “OH HAY I CAN HAS CODEZ?”. There’s a reason for that.

I tend to browse lolcats whenever I need a bit of extra motivation, romance, feeding or even inspiration. So, whenever I look at bits of code that read:

  1. HAI
  2. CAN HAS STDIO?
  3. VISIBLE "HAI WORLD!"
  4. KTHXBYE

or even

  1. ON CATURDAY
  2.  IM IN YR BED
  3.   I IZ SLEEPIN!!10
  4.   VISIBLE "Z!"
  5.  KTHX
  6. KTHXBYE

I can’t stop thinking that it’s PURE GENIUS (right before bursting into tears of laughing so hard). So, for starters, I’m going to try to understand a Brainfuck compiler written in LOLCode. Want to tag along? ;)

  1. HAI
  2. BTW This is a BrainFuck interpreter written in LOLCode
  3. BTW It accepts as input a BF program, followed by a "!", followed  by any input to the BF program.
  4. BTW Since BrainFuck is turing-complete, this proves that LOLCode is too
  5.  
  6. I HAS A INSTRUCTIONS    BTW Array for BF instructions
  7. I HAS A IPTR            BTW Pointer to first empty element in INSTRUCTIONS
  8. IPTR R 0
  9. I HAS A LOOPZ            BTW Array of loop start/end addresses
  10. I HAS A LOOPSTACKZ        BTW Loop stack for building the above two
  11. I HAS A LSPTR            BTW Pointer to first empty element of LOOPSTACKZ
  12. LSPTR R 0
  13.  
  14. BTW Read in BF instructions, terminated with "!"
  15. IM IN YR CODE
  16.   GIMMEH IPTR IN MAH INSTRUCTIONS
  17.  
  18.   BOTH SAEM IPTR IN MAH INSTRUCTIONS AN "[", O RLY?
  19.     YA RLY
  20.       LSPTR IN MAH LOOPSTACKZ R IPTR
  21.       LSPTR R SUM OF LSPTR AN 1
  22.   OIC
  23.  
  24.   BOTH SAEM IPTR IN MAH INSTRUCTIONS AN "]", O RLY?
  25.     YA RLY
  26.       I HAS A STARTPTR
  27.       LSPTR R DIFF OF LSPTR AN 1
  28.       STARTPTR R LSPTR IN MAH LOOPSTACKZ
  29.       STARTPTR IN MAH LOOPZ R IPTR
  30.       IPTR IN MAH LOOPZ R STARTPTR
  31.   OIC
  32.  
  33.   BOTH SAEM IPTR IN MAH INSTRUCTIONS AN "!", O RLY?
  34.     YA RLY
  35.       GTFO
  36.     NO WAI
  37.       IPTR R SUM OF IPTR AN 1
  38.   OIC
  39. IM OUTTA YR CODE
  40.  
  41. BTW Variables for BF's tape
  42. I HAS A LTAPE
  43. I HAS A RTAPE
  44. I HAS A LPTR
  45. LPTR R 0
  46. I HAS A RPTR
  47. RPTR R 0
  48. I HAS A CELL
  49. CELL R 0
  50.  
  51. BTW Reset instruction pointer to start
  52. IPTR R 0
  53.  
  54. BTW Start interpreting
  55. IM IN YR LOOP
  56.   I HAS A THING
  57.   THING R IPTR IN MAH INSTRUCTIONS
  58.  
  59.   BTW Move tape head right
  60.   BOTH SAEM THING AN ">", O RLY?
  61.     YA RLY
  62.       LPTR IN MAH LTAPE R CELL
  63.       LPTR R SUM OF LPTR AN 1
  64.       BOTH SAEM RPTR AN 0, O RLY?
  65.         YA RLY
  66.           CELL R 0
  67.         NO WAI
  68.           RPTR R DIFF OF RPTR AN 1
  69.           CELL R RPTR IN MAH RTAPE
  70.       OIC
  71.   OIC
  72.  
  73.   BTW Move tape head left
  74.   BOTH SAEM THING AN "<", O RLY?
  75.     YA RLY
  76.       RPTR IN MAH RTAPE R CELL
  77.       RPTR R SUM OF RPTR AN 1
  78.       BOTH SAEM LPTR AN 0, O RLY?
  79.         YA RLY
  80.           CELL R 0
  81.         NO WAI
  82.           LPTR R DIFF OF LPTR AN 1
  83.           CELL R LPTR IN MAH LTAPE
  84.       OIC
  85.   OIC
  86.  
  87.   BTW Increment
  88.   BOTH SAEM THING AN "+", O RLY?
  89.     YA RLY
  90.       CELL R SUM OF CELL AN 1
  91.   OIC
  92.  
  93.   BTW Decrement
  94.   BOTH SAEM THING AN "-", O RLY?
  95.     YA RLY
  96.       CELL R DIFF OF CELL AN 1
  97.   OIC
  98.  
  99.   BTW Output produces numbers instead of ASCII characters
  100.   BOTH SAEM THING AN ".", O RLY?
  101.     YA RLY
  102.       VISIBLE CELL!
  103.       VISIBLE " "!
  104.   OIC
  105.  
  106.   BTW Input doesn't work because we can't convert characters to integers
  107.   BTW Oh well, it doesn't stop it being turing complete
  108.  
  109.   BTW Start of loop
  110.   BOTH OF BOTH SAEM THING AN "[" AN BOTH SAEM CELL AN 0, O RLY?
  111.     YA RLY
  112.       IPTR R IPTR IN MAH LOOPZ
  113.   OIC
  114.  
  115.   BTW End of loop
  116.   BOTH OF BOTH SAEM THING AN "]" AN DIFFRINT CELL AN 0, O RLY?
  117.     YA RLY
  118.       IPTR R IPTR IN MAH LOOPZ
  119.   OIC
  120.  
  121.   BTW End of program!
  122.   BOTH SAEM THING AN "!", O RLY?
  123.     YA RLY
  124.       GTFO
  125.   OIC
  126.  
  127.   IPTR R SUM OF IPTR AN 1
  128. IM OUTTA YR LOOP
  129. KTHXBYE

Fun times await.

Best of Craigslist: “What Happened to All the Nice Guys?”

June 26th, 2008

Just wanted to share with you something that made me laugh so hard today I cried my eyes out. Here’s an excerpt:

So, if you’re looking for a nice guy, here’s what you do:

  1. Build a time machine.
  2. Go back a few years and pull your head out of your ass.
  3. Take a look at what’s right in front of you and grab ahold of it.

It’s funny how other people’s “misery”, when expressed like this, makes your day a bit better.

UPDATE: I also found this. Although not related, feels like a counter-retort, view from the opposite sex kinda thing. Pure awesomeness.

Mac OS X - Epic Fail

June 19th, 2008

While getting up to speed with Slashdot, I found an interesting article about a security breach on Mac OS X that allows user escalation through AppleScript.

Trying it on the terminal works, but, as they say, the user needs to have physical access to the machine. So, Patrício suggested trying to access through SSH to see if it works, and it did.

Slashdot member gombah99 posted a tip on how to neutralize it non-destructively:

  1. cd /System/Library/CoreServices/RemoteManagement/
  2. sudo tar -czf ARDAgent.app.gz ARDAgent.app
  3. sudo chmod 600 ARDAgent.app.gz
  4. sudo rm -r ARDAgent.app

Here’s to you, Apple Un^H^HSecurity Team!

How to build your on-demand video site with PHP

June 4th, 2008

Browsing DZone today I found an interesting article from IBM’s developerWorks site, which supposedly teaches you how to build an on-demand video site with CakePHP.

My first thought was that, being Belacena built with the same technology, I could learn one thing or two and make it run 10x as fast (OK, maybe not, but you get the point). So, I signed in (AKA got a user and password from BugMeNot), and started reading part 2 (part 1 covers the basics about video optimization for the web, creating the database tables, and extracting CakePHP). Let’s just say I was disappointed, because I have big expectations on everything that comes from IBM.

So, in sum, their 3 part tutorial teaches how to scaffold in CakePHP, tweak the views a bit, and that’s pretty much it. You can see the resulting site here. If you feel that article is worth reading, you can start here.

If you have any suggestions on more advanced topics, let me know, and I’ll consider writing about it.

Digital 9/11… or so they say

May 27th, 2008

I just read the latest press release from the European Network and Information Security Agency alerting about a possible digital 9/11. All I can say is that I’m shocked on how these people are so narrow-minded.

Now, the biggest threats on this matter seem to be botnets, spam and computer viruses.

Guys, here’s a free tip: install Linux and switch to Google Apps. Works for me (TM) ;)