I ran into an interesting problem today while considering how to find out where subordinate employees fit into an organizational chart. The problem was that I need to list every employee that was “under” a given employee, but could only really do this in SQL - if I were to try and do this from within PHP, it would have made a single exception case where we build an SQL query based on another query - something I’d rather not have to do. Let’s see if this little graph can more adequately describe what the issue was:
Continue reading ‘Creating Recursive SQL Calls for Tables with Parent-Child Relationships’
Need a color scheme, but suck at that whole hexadecimal - where - the - hell - is - the - next - shade - of - blue thing? No biggie, I’ve got you covered. From eyedroppers, to scheme generators, to color blindness tools, below you’ll find my latest list of color tools that make my “Web Developer Must Have” list. While you’re playing with these, please do me a favor and keep in mind that the level of contrast you come up with is directly proportional to how much I’ll probably hate your site. No excuses, really now, if you want me to go into an epileptic shock (which you very well may), you’ll ignore my warning.
Continue reading ‘Top 10 Free Color Tools for Web Designers’
I’m sure all of our readers can type 70+ words a minute (right?), so no one really cares to make writing any quicker. That is, except for the fact that we’re a bunch of lazy bastards that hate data-entry tedium and loathe trying to grab snippets out of our clunky IDE’s. Even Zend’s snippet IDE leaves a lot to be desired - and it’s one of the best we’ve come across. To help alleviate the problem, LifeHacker’s got a tool called Texter built on the Autohotkey framework.
What Texter does is fairly simple - you write a “function” in Texter that keeps an eye out for when you type certain keywords. If you type a keyword then hit the trigger key, your keyword gets replaced with the function you wrote in Texter. It’s fun, really!
Continue reading ‘Top 10 Texter Uses for Code Monkeys’
I recently ran into some problems with our Linux mail cluster after a bad power bump. (Electricity. Hmph! Sooo 20th Century.) Apparently servers don’t enjoy it when you tell them it’s not working out and proceed to find more servers to fulfill your needs. After three cases of Dr. Pepper and several hours of interweb searching, here’s what I found out about the NFS implementation in Debian. It’s actually quite simple… honest.
Continue reading ‘NFS Mounting Problems on Debian Linux’
What a title, eh? Yeah, it might sound a bit like buzzword after buzzword, but functional testing in PHP is a serious topic - sometimes it means the difference between spending fifteen minutes doing a bug check and several hours depending on the size of your site. Now, it’s important to mention that functional tests are different from unit tests - we’re not going to be testing individual functions or methods, but rather we’re going to be making sure that the site works the way our users expect it to from their point of view. This means that we can check our site for error messages and verify that they pop up when they should, and stay hidden when they shouldn’t.
Continue reading ‘Functional Testing in PHP using Selenium IDE’
I got curious and did a little experiment today, which was by no means thoroughly scientific, but it did show some interesting results. I started by considering one of my favorite operators - the ternary conditional operator, and wondering if it was as efficient as the alternative if-else statement.
What I ended up setting up was a cute little piece of code that looks like this:
Continue reading ‘Conditional Assignment Efficiency in PHP’
Sure, you can use Photoshop, the Gimp, or any number of tools to make pretty Web 2.0 stripes for you. It will probably take you anywhere from 5 to 30 minutes to get what you like, depending on how many hilarious “LOL CLONE STAMP” creations you’ve done in the past week, though I think I prefer having things automated for me.
StripeGenerator.com has a cool tool that lets you create some pretty wild stripe patterns, though I think I’d shy away from the drop shadow since it adds too much contrast for my taste. Take a look, they’ve got a whole collection of stripes you can customize or create from scratch.
Doctype - that mysterious tag at the top of everyone’s code that not a lot of us really understand. Sure, it’s supposed to be there, but just what the hell is it, and why?

Perhaps a good place to start is with the misconception that a lot of new web developers and designers have - that code is code and really, if it’s in ‘HTML’ then it should look fine anywhere, right? Not quite. First, we have a plethora of different browsers - Firefox, Internet Explorer, Safari, Opera, Lynx, the mobile versions of these, and a ton of secondary browsers (okay, if you’re still using Lynx, you’re a bit SOL). Following this whole browser variable, there are different languages you can code in, and I’m not referring to scripting. HTML isn’t the same as XHTML, and there are different modes for both. So how does the browser decide how to render each differently? By using doctypes!
Continue reading ‘Tutorial Series: Nailing down Doctypes’
Recent Comments