Recent Articles

Bringing back the PC

If an arsenal of computers put a man on the moon in the 60s, today the USB stick dangling on your key chain could make miracles. Of course not all computers are designed to do something as great. You may be using your old PC, that some have claimed to be dead, to do mundane tasks like surfing the web or checking your email. This same computer, that first of all belongs to you, second is consistently connected to the Internet, third is relatively fast speed, can do much more than just allow you to check your email. I would like to introduce the PC 2.0 no different then the previous PC, simply re-branded for marketing purposes.

Don't create content, create Art

If there is one thing the rest of the internet and I are guilty of, it is creating content. Most people who get started on the web think the key to success is to create a website and people will pour in. Eventually they learn that no one cares about their website. SEO consulting companies always have the same recipe: link building and content. The Holy grail of the internet.

Thinking about the car horn

I was driving down Sepulveda Blvd near LAX when I stopped at a red light. It was one of those lights that just wouldn't turn green. There were very few cars, and I thought about going through the red light, but, I wasn't in a hurry.

Why programmers don't read books and why you should

As a non programmer, when you read the stories of all the famous nerds, the first thing you do is go on amazon and shop for programming books. Most titles are confusing, you only wish to know which book Zuckerburg was reading so you can create your own bookface as quick as possible. After much confusion, you call your programmer friend and ask for a book recommendation. Of course his response is to not get a book, all the stuff is on the Internet already.

Creating a simple search algorithm with PHP and MySQL

Search is an important feature on a website. When my few readers want to look for a particular passage on my blog, they use the search box. It used to be powered by Google Search, but I have since then changed it to my own home-brewed version not because I can do better but because it was an interesting challenge.

JavaScript Tips and Tricks

Get computed style

Sometimes you want to get the width of an element, and the obvious way of getting it does not work.; // (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: $_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…

Making fast cross-domain requests when the browser is leaving

There are times you want to make a very quick web request and don't care about the response looks like. It is possible to make requests using Ajax, but we still get a response. One trick you will see many people are using is…

Making a HTTP request before the page redirects

There are many ways to track when a user clicks on a link. It seems simple enough but there is something that people always forget and their code doesn't run. Let me show you an example. Click me // JS var link = document.g…