Programming Contract Work – Tips on Protecting Yourself

I did contract work for three or four years before I finally threw in the towel. It’s a lot of work, and very frustrating at times. I was very fortunate in that I never got screwed over, but many people have. Here’s my tips on the subject: Everything must be in writing. Especially the points […]

Boolean and 0.00

ARG. I encountered another potential issue in PHP that is due to loose types that is common if you are using a database back end. $amount = 0.00; if($amount) Versus $amount = ‘0.00’; // how data from databases comes if($amount) Guess what happens. Well, most people might say both should be TRUE, but that’s not […]

Clean Coding

Consider the following source code: $uSess = uLogin($uName, $pwd); That’s a fictional piece of code that might exist in a login script. The uLogin function, short for “user login” versus, perhaps, aLogin for “admin login”, accepts two parameters: a username and a password and assigns the result to a session variable called “uSess”. This sort of […]

Left Join Snafu

How embarrassing. I learned something new today that I really should have known for some number of years now. Left joins can increase the result set size.  Here’s what I thought left joins do: When you combine two tables together with a left join, the source table (the one on the left) becomes the “anchor” […]