The single worst line of code I have written

As much as I would love to think I am the perfect programmer who makes no mistakes and whose code is 100% bug free… I am reminded way too well that I am not all that and make lots of code mistakes. I was reminded by this sad truth ever so clearly while working on some older JavaScript on the 29th of May. After extensive testing and analyzing, I concluded that a single line of code in the script was the single worst line of code I had ever written. Are you ready for it?

Continue reading

Overusing z-index

z-index is a fascinating CSS property with complicated interworkings. For most Web designers, myself included, z-index is the ticket to getting certain page elements to “sit” on top of or float behind other elements. It especially shines when creating navigation bars that stick to the top of the page when scrolling and the “scroll to top” buttons, just to name two common examples.

However, in my travels and quest for Website design tips, tricks, knowledge, and useful libraries, I have found instances where z-index is abused. While the reasoning behind it may have been sound to begin with, Web design trends change, and what made sense then may not anymore, meaning such z-index usage might now be considered overuse or even abuse.

Continue reading

Blocks v2.1.0

It is yet again time for another release of Blocks, version 2.1.0!

As you may recall, the last Blocks release was v1.0.0. Why such a large version jump? Well, I did this to make up for my failure in releasing v1.0.0. You see, I essentially rewrote Blocks in v1.0.0. It was without a doubt the biggest changes I ever made in the program’s lifetime. v0.9.1 was really and truly the v1.0.0 release, and with the large changes I made last time I should have called it v2.0.0. Thus in this version, I am rectifying my mistake + the changes I made this time around. That explains the version increase. :)

With that bit past, I can move on to the biggest news in this release.

Continue reading

The ethics of selling open source

A few months ago on Twitter I read of an iOS app, which was freely available on the Apple App Store, had reportedly been lifted from the public GitHub repository, had minor modifications made (app name, creator, icon), and was being resold on the App Store for $9.99 USD. Quite predictably, the plaintiff (to use legal terminology) was rather upset, for his months of free work was stolen and published for profit on a market where such clones are not allowed by strict policy. He was outraged that the defendant would act so unethically. The people who initially replied were supportive of the plaintiff, even discovering the defendant was buying Twitter ads to promote the clone.

Continue reading

Google, I Already Hated You

Notice

This is a rant from October and November 2013. I was furious with Google and the deceptive tricks they pulled around that time in an attempt to force YouTube users to join their Google+ social media platform. This was my way of venting about the craziness they pulled. Since this writing, things have gotten better. I have not seen Google attempt such shady practices since then. However, I still do not use Google+. I let WordPress post messages that I have published a new post, but that is it.

I am publishing this rant almost as a record of Google’s actions and my feelings towards them and various Google products, many of which still apply. Feel free to mentally agree/disagree with me, but discussion is closed for this post. :)

Continue reading

You want to be a programmer?

Fun fact: this post has been stuck in drafting hell since 24 August, 2013!

I am not sure if there is an uptick in the number of people saying this or I am just around more people, but I have been hearing this 6 word phrase (and its variations) a lot more than I used to:

How do I become a programmer?

Before I begin, I must define what a programmer is. In my book, a programmer is one who writes and creates desktop, mobile, or web applications using any recognized programming language, such as Python, JavaScript, C#, C++, etc.

Continue reading

Creating Hangman in PHP and JavaScript

It is a fact: my advisor/primary instructor likes making games for his programming classes projects. Last semester, I developed a Tic-tac-toe game in JavaScript for him. Although it was part of the class, I created a game of Battleship in JavaScript, and he and I talked about how he once made the game using PHP and radio buttons. So when my final project in PHP class came in on 10 March, I was not very surprised to see the suggested projects:

Continue reading