June 5, 2009, 10:59 am
It is not too often in the real world that you have to implement your own sort. Generally, whatever language you are using has a library with this functionality built in. If the occasion does arise, however, it is important to understand which algorithms are applicable in which situations. As with most choices, there is no absolute correct answer; there are many trade offs to consider. When choosing an algorithm there are three things you should consider: performance, overhead, and ease of implementation.
You should give equal consideration to each of these factors, disregarding any one of them can… Read More | 1 Comment
June 3, 2009, 12:00 pm
If you’ve ever read a magazine you’ve probably noticed that often the first character on a page stands out. Usually its larger, a different color, or stylized in some way. This effect is called an initial or a drop cap. Using CSS it is fairly simple to achieve this effect. CSS supports the pseudo element “first-letter” which allows you to modify the appearance on the first letter of a paragraph… Read More | 5 Comments
June 3, 2009, 12:00 am
I often see people asking how to do things with a given programming language that it was not intended to do. Recently I read a post from someone who wanted to know how to take a java program and compile it to a .exe. For anyone who is not aware, Java programs are not compiled in the same way a C++ program is compiled. The java source code is first compiled to bytecode. That bytecode is then interpreted by the java virtual machine. The writer was intending to get a performance boost by having the code compiled rather than interpreted… Read More
June 2, 2009, 10:20 am
If you are at all familiar with PHP you are probably aware that you can put variables inside double quotes. For example: Read More | 2 Comments
May 28, 2009, 8:15 pm
If you are a programmer you should do yourself, and anyone else working with your code, a favor: stop using copy and paste. If there is a case where you need to use the exact same, or very similar, code in multiple places, that is a sign that you should be using a function, object, or other structure. I say this not for the sake of ‘proper coding practices’, but to save you and anyone else dealing with your code a massive headache.
I admit that there have been cases where I have copied code (I was young! I… Read More | 1 Comment
May 28, 2009, 9:37 am
After hearing some noise about Google having updated page rank, I got curious and decided to check the PR of this site. I launched this site shortly before the last update, when it was assigned the rank of zero. This time around, to my surprise, I found that the index, as well as one other page was ranked 4. This was surprising because I have not made any deliberate effort to increase the rank of this site. I didn’t submit to directories, I haven’t purchased links, spammed blogs or forums, or consulted with an ‘SEO Expert’.
So, how then… Read More
May 24, 2009, 11:57 am
My previous entry will suggest to the reader (and by suggest I mean scream aloud) that I am not fond of IE. In addition to this I mention that I use Opera as my primary browser. Typically for windows users, if you are not using IE you are using Firefox. Opera is a less popular browser, but I think much more useful for developers. Read More | 1 Comment
May 23, 2009, 2:48 pm
I haven’t used IE as my primary browser for a long time. I switched from IE to Opera several years ago. Until recently, however, I’ve always had Internet Explorer installed. This is because there always seemed to be some website that either insisted on users using IE, or was coded in such a way that it only worked in IE. It seems counter-intuitive to me that the browser that is the least standards complient should be the one that everyone codes there website to work with, even at the expense of all of the other browsers, but that was the reality of the industry for a long time. Only now do I believe that that era is almost over; it is now possible to uninstall IE permanently. Read More
May 22, 2009, 11:46 am
I’ve seen a lot of questions and false assumptions regarding strings and output. Here is a short review of some common questions:
print vs. echo
I often see people suggesting that others should use echo as opposed to print for performance reasons. While it is true that echo is faster than print, the difference is insignificant. The reason echo is faster is because print behaves like a function (even though it’s a language construct) and sets a return value. This being the case, there are some important differences between the two, and there are a few cases where… Read More
May 20, 2009, 1:46 pm
A few years ago AMD released the Athlon 64 processor. Though this processor was not the first 64-bit processor, it was the first aimed toward general consumers. Chances are, if your computer was manufactured in the last few years, you have a 64-bit compatible processor. You may be wondering what the difference is and what this means to you. If you’ve looked into the issue in the past, you’ve probably determined that the most significant differences is that in order to have more than 4GB of RAM, you need a 64-bit processor. The reasons for this and its implications may not be so clear, so I’ll do my best to clear things up. Read More | 2 Comments