Archive for the 'PHP' Category

15
Feb

Magento Installation Guide for Dreamhost

I’ve been watching the Magento e-commerce project for about the last month and a half - since Ben sent me a link to it. It’s an open-source e-commerce package, that primarily aims to pickup and improve where OSCommerce, Joomla + VirtueMart, and ZenCart have left off - streamlining a CMS (Content Management Sytem) and E-commerce shopping cart. This also means built-in SEO (Search Engine Optimization), Google Checkout integration, varied customer groups, and much more…. straight out of the box. The problem appears to be that there are a lot of people on the Magento forums who are running into problems, and don’t have a clue on how to get it running under their Dreamhost hosting account. Unfortunately it also looks like the previous article(s) for Magento+Dreamhost installs have disappeared, or are outdated. And that’s where this article comes in… Continue reading ‘Magento Installation Guide for Dreamhost’

27
Sep

Creating Recursive SQL Calls for Tables with Parent-Child Relationships

Recursive SQL CallsI 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’

24
Sep

Top 10 Texter Uses for Code Monkeys

Texter for writing codeI’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’

23
Sep

Functional Testing in PHP using Selenium IDE

Functional Tests in PHP With Selenium IDEWhat 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’

20
Sep

Conditional Assignment Efficiency in PHP

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’

18
Sep

Tutorial Series: Nailing down Doctypes

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?

Doctype Image

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’




Close
E-mail It