Recent Articles

So you want to buy a Mac Computer

If you want to buy a mac, ask a mac user. There is no such thing as an unbiased user. I use windows, mac and linux on a regular basis. Note how none of those names are capitalized, that's because I am the supposedly unbiased user. I am to treat those three equally.

Writer's block

2am. The day has gone by and none of the things set to be accomplished are put to rest. When the day started I promised myself, "One blog post. One blog post damn it." It's very easy to make that promise but then the time comes to write it, and nothing happens.

Why is php turning my string into 0

One thing I am learning the hard way is, if you don't write it down you will forget it. I always think I will remember my thoughts. But nope. The next day, my mind is blank and I am frustrated. So there is an simple issue I ran into in MySQL and PHP and I am making sure I writing down this time before I forget it.

Ah, programming

When I type 2 + 2 on a compiler I know there is no way the computer will give me an answer other than 4. Computers are precise, accurate. They don't make mistakes.

Year of the spam

At Google, they say they don't need Captcha anymore. If I had an iframe on virtually every website on the web, I could probably claim the same. I assume that if this is a factor in the method they use, then Facebook could also claim the same capability.

My 2014 reading list

In 2014 I have decided to do less consuming and more producing. But with the nature of the internet, you can't help but sometime read other stuff. Yes, the internet can be a huge waste of time. But let's not forget, there is some amazing content that make it all worthwhile.

The best SEO trick

This short article was originally posted on April 21 2011 on my old blog which is now defunct. It is the only one I can still access via archive.org. So enjoy.

List of laptops that support Ubuntu

Ubuntu is one of my favorite OS. It is very user friendly, perfect for surfing the web, for music, for movies and even gaming. At the same time you have all the power of Linux behind it so I can also use it for working on my projects. Recently, I bought a new laptop and unfortunately I found myself returning it because it was a just a giant hardware dongle. I was hoping to dual boot Windows and Ubuntu but it only accepted a new windows OS. I learned my lesson and from now on I do extensive research before buying any new laptop.


JavaScript Tips and Tricks

My variables are set to the last index in JavaScript

JavaScript is known to host some quirky behavior. Most of the time however, all it takes is getting familiar with it to understand what is really happening and how to work with it. New and experienced users sometimes run int…

Calling a function out of scope

With the advent of jQuery, coding in JavaScript became accessible to almost everybody. But with it came some very fundamental errors that could have been avoided if the person read the very basic of java script. Users define…

Get computed style

Sometimes you want to get the width of an element, and the obvious way of getting it does not work. element.style.width; // (empty string) Yeah, I know it should be this easy but it is not. Instead we have to get the comp…

Accessing URL parameters in JavaScript

I have worked with PHP extensively and it is very convenient to have all the URL parameters automatically assigned to the global array $_GET. Here is an example: http://www.example.org/?foo=bar $_GET['foo']; // bar I wish …

Calling a function that has no name

You can make use of recursion easily in JavaScript. Let's try it with factorials: function factorial(num){ if (num < 0) { return -1; } else if (num == 0) { return 1; } return (num * fa…