Say what you want about Microsoft, I’ve used Macs for 2o years along side PCs.  I’d never buy a Mac, it’s just my personal preference.  Sure, 20 years ago Macs had the edge in desktop publishing when QuarkXPress dominated the publishing and layout seen.  Adobe Photoshop had a few more features and was more convenient to use than the clunky Windows version.  Let’s not forget that Adobe entire video suite took a 5 year hiatus from Macs so being a video producer these past 15 years that could have also swayed my affinity towards PCs. But now, are you kidding me?  When you can get so much more CPU, memory and power under the hood on a PC compared to a Mac, why spend more?  Security?  Keep your virus protection up to date.  I spent $420 on my Samsung quad core laptop and it serves me well, I can’t complain — it’s installed with Windows 7 and is very reliable.  I edit videos with Adobe Premiere Pro and After Effects, I render some pretty complex 3D animations in 3D Studio Max on it — it hooked up to the network in 5 minutes.  Can’t get much easier than that. By the way, when you hear “it’s easier on a Mac” do you Mac homers get a little tired of saying and hearing that?  Isn’t it a little insulting, it’s like saying “youuuu  havvvve  toooo speeeaaakkkkk slllooowwwerrrr sooo it’sssss eeeeeasssssierrrrr forrrrr themmmmm?!”  After all, we need to make it “easier” for Mac users, I guess. I hear “Macs are easier to use” a lot, too.  Really?  The mouse is easier to move?  Yes, some of the chassis designs are curvier and the different colors Macs come in are lovely.  However, I’ve opened up plenty of software programs and the buttons were in the same place on both a Mac and  PC.  Honestly, I think it tells me more that if someone is so stubborn about what computer they are going to require to do a job when the same software runs on either machine almost identically, they definitely don’t get any sympathy from me.

Conclusion

Personally, I can use either machine and OS, but I would never spend the extra money on a Mac.  A $500 savings on a computer that can do more comes in handy.  The worst part is when Apple upgrades their OS you have to upgrade all your software.  That’s not only a fun filled day you never quite put on your calendar in pen — and it can get very expensive very quickly.  For all you “only Mac” people, I won’t call you lazy, unadaptive or inflexible….  Okay, I just did.

Full disclosure:  This author personally owns stock in Adobe and Microsoft.


In WordPress, I think utilities should be categorized and placed in a different location than plug-ins.  The difference between the two is, of course, they’re installed like plug-ins but a utility does not affect the processing of content to live pages, plug-ins do.  Often, these routines you run as utilities don’t affect anything else until they are actually run.

Then they lay dormant again, taking up space in your plug-in list, subjecting you to the ridicule of “Whoa, another plug-in, I see.  Do you web developers even write code anymore?”  Funny, you wouldn’t ask the car engineers to build the tires to test the design, but often those who don’t understand web development, the process, the tools and available frameworks and libraries readily available would ask web developers essentially to “build the tires” to go on the car each and every time.

The next time a non-developer wants to perhaps pass judgement or criticize their web development team, someone should ask them if the car design team at Toyota should allocate any of their time and talent dedicated to working on things that are unnecessary, like making tires for the new car?!  That would be absurd, right?

Why?  When you take time away from your web development team to work on things where solutions are already available, you take time and energy away from allowing them to focus on solving actual challenges unique to your company.

Also, criticizing others about their work is never a good idea, you are welcoming closer scrutiny of your own, this applies to any workplace environment.  So, unless you have a firm grasp and understanding of the technical aspects of the tasks involved, perhaps instead of assuming your web development team is incompetent, think about how you will feel when others judge your work without knowing all the facts or understanding what you do.  It’s never a good idea to criticize, especially openly, your co-workers, but in this market especially, perhaps trying to ask, learn and understand the work involved in web development will perhaps give those non-developers a better understanding and appreciation of the web development teams’ skills, knowledge, and experience.


If you have a team of content contributors, users who are also posting content as authors, your WordPress post database will likely fill up with more records storing these revisions that will probably never see the light of day.  I can see keeping the revisions for pages around, maybe up to 5 revisions back, but the auto save feature in WordPress is often a little too vigilant in my opinion.Optimize WordPress Database plug-in screenshot

That’s where the “Optimize Database After Deleting Revisions” plug-in comes in.  It’s a great utility.  There are plenty of useful options to automatically empty trashed items, schedule running this optimization at time intervals, and even keeping a specified number of revisions.

You know, sometimes I think WordPress should keep plug-ins separate from these type of utilities.  Utilities like this may not be used everyday and are independent of your site’s functions of delivering content to the public.

Which leads me to a separate article:  So, why not separate plug-ins and these type of utilities?

 


Sometimes, things don’t make sense on the surface until you dig deeper.  Don’t worry, no one knows everything in their particular profession, and I am know exception.  A client of ours uses “OpenX” to manage their ads.  This ad delivery framework is pretty straightforward, but what happens if you are delivering ads into a CMS like WordPress from the OpenX framework API and all you want to do, depending on the type of page, post, or feed to dynamically move the ad banner to the ideal position within the content?

For instance, this client wanted all ads in posts to show up at the bottom of short posts or the third paragraph down of those longer than 3 paragraphs.  You don’t want your content writers to have to worry about placing ad snippets within their posts, that would be a lot of extra work riddled with many potential issues for workflow and be very counter productive.

I though my solution was simple, so I’ll explain what I first set out to do before I realized there was even a simpler solution.  My goal was to make sure all ads were delivered within a div tag that I could assign a specific class, say “openx-ad”, then, upon loading, I had a fancy jQuery script that could identify any openx-ad class then I would grab the html via


jQuery(".openx-ad").each(function(){  ad_html=jQuery(this).html();});

then after grabbing the html I would then remove the ad via:


jQuery(this).remove();

After cleaning the page and storing the ad into memory, I would then find the proper div to insert the html into by:


jQuery(".post-content p:nth-child(3)").after(ad_html);

Of course, the actual selector was a little more complicated than using “nth-child(3)” but you get where I’m going with this.  The problem came from the fact that moving elements  in your web page that were completely loaded in the DOM already can’t be cut and pasted somewhere into the DOM — the script will actual run again and the browser will execute it twice.  This caused all sorts of issues.  The solution came with “prependTo”, instead of doing all this cutting and pasting of html from one div into another, all you need is the source of what you want moved and a selector to tell it where to move it to.  In this case,


jQuery(".openx-ad").prepentTo(".post-content p:nth-child(3)");

was the only line needed to successfully move elements so any script tags within would not execute.  Yes, I could have removed the <script> </script> tags before moving, but often you will not want to remove behaviors.  “appendTo” would move the element to the point after the selector, in case any of you were wondering.


Sometimes you will need to alter your WordPress site to accommodate custom behaviors, custom folders, and rewrite handlers for certain scripts.  Things might start acting weird, so what do you do?  You, or someone from your team has probably altered something in the .htaccess file.  Rename the existing one to “htaccess.txt” then create a new file called .htaccess and paste these lines in the file and reupload it to your web root folder (usually in /public_html/):


<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

When you get the “white screen of death” on a WordPress site, this is one of your usual suspects.  Often, when someone runs WordPress from a subfolder instead of the root of your website (like installing WordPress in /public_html/wordpress/) some developers may believe they need to alter the .htaccess in order for WordPress to operate, be seen, and show files to omit the /wordpress/ trailing path.  This is not the case, however, the handling of paths and sub paths all go back to the fact that WordPress, like many frameworks and websites designed with the MVC pattern, all run off a single index.php that is located in the root directory.  No matter what pages or scripts you run, WordPress treats them as if they are being run from the web root.

Here is a diagram that may help you understand the basic structure of WordPress code.  It is oversimplified but it should help you visualize how WordPress is organized under the hood:

wordpress-code-pyramid

Open the index.php file WordPress runs on, notice in the configuration instructions you have to update the path to wp-blog-header.php by prepending it with the subfolder WordPress is contained in?  That’s why.  Since the index.php file in your web root folder is the file that loads all other files, your code always knows where “root” and “home” is.  This makes it much easier to navigate and organize your code without worrying about sub paths and relative paths.  If you imagine your code is organized much like a pyramid where, at the top is always this main index.php file handler, you will be able to better understand how WordPress works so you can more effectively troubleshoot problems later.