John Squibb

PHP Security Tips

Security is one of the most important aspects of any web application, and there are lot of steps you can take to spruce up your code to make it more secure. This week, we'll address some basic security pitfalls and go over some strategies that anyone can employ. Make your application more secure, trustworthy, and resistent to hackery! [Read Full Article]

Introducing PHP Appliances

My goal, was simply to create some PHP objects, based on real-world household appliances, that rely on their own tightly knit set of interfaces, classes, and helpers. [Read Full Article]

Mr. Singleton, a Singleton for all Singletons

If you are familiar with the [Singleton] pattern, and like me, have grown tired of adding getInstance() to all your classes and privatizing their constructors, then say hello to the Singleton class, known among his inner circle, as Mr. Singleton. [Read Full Article]

Overcoming Magic Numbers Through the Use of Constants

Magic Numbers are unnamed numerical constants that appear directly in code, inhibiting the reader from immediately understanding the intended purpose of the value. They litter the best of code, and often creep in with quick modifications, one-offs, tweaks, and so forth. The good news is, Reducing them can be as easy as adding a few extra variable declartions. For developers using Object-Oriented PHP, class constants can provide a quick and easy escape from the evil, universe-imploding doominess of Magic Numbers. [Read Full Article]

Bash Image Resize with Image Magick

Whenever I have to put travel photos up on the website, or send a bunch to family and friends, I find that the downloaded size from the digital camera is a bit much for general use. I rarely need my photos in the 3648x2736 resolution that my 10MP camera stores to the memory card. There a lot of GUI utilities out there for Windows/Mac/Linux that will import, resize, crop, and do a gazillion other things with downloaded photos, but generally, I just need a quick batch resize on a folder full of pics. Enter Bash and it's trusty sidekick, the Image Magick convert utility. [Read Full Article]

Fun with PHP 5.3

Version 5.3 has been out a little over two months, so it's nigh time I dug into into it! It's surprising that I've waited this long to get around to installing it, as it contains some tidbits that I have been eagerly awaiting since talk about PHP 6 began a couple years ago. In addition to the usual bug fixes, this version includes support for two features of particular interest to me: namespaces and variable static method calls. [Read Full Article]

Google Linux Search

As an everyday Linux user and programmer, I am constantly on the prowl for articles, new shiny applications, forums, distro updates, and the like. Most of all, like any regular computer user, I am always trying to streamline my processes. I've got iGoogle, complete with my favorite Linux and programming widgets and a fancy planet theme. I've got the Google Toolbar. I've got Google set as the default search provider in all my browsers. I'm all Googled-up, yet I still yearn for more Google customization. Enter Google Special Search. [Read Full Article]

Suggested Reading

MySQL in a Nutshell

by Russel Dyer

MySQL in a Nutshell, like all nutshell books by O'Reilly, is a great reference guide to the multitude of available MySQL functions, administrator tasks, and programming APIs. It organizes the functions by category -- string, date, mathematical, and so forth -- and provides a quick rundown of each function's usage. It also has a great set of appendices, my personal favorite being Appendix A, which provides a concise list of data types and their storage limitations.

Tags: Bash,image,resize,imagemagick,php 5.3,google linux search,class constants, magic numbers
Short URL: http://sqb.in/O2tG