Hating on Internet Explorer, again

April 15, 2010

I was at a sales meeting this morning when I loaded my personal site to access links to some other customer websites I had done previously. The client uses Internet Explorer and when I brought my site up the menu bar was all screwed up. Instead of being horizontal the menu items were staggered, stair-stepping down until hidden behind the content area. Half the menu items weren’t even visible.

Grrr! Whats more frustrating is that this site uses the same theme and menu system and this menu looks fine.

I made a change to the menu several weeks ago and obviously I neglected to view the changes in Internet Explorer. I do not know how many times I have to relearn this lesson, but as a matter of policy one should always check any change they make to a site — no matter how trivial — to be sure it displays correctly in Internet Explorer.

  • Share/Bookmark

WordPress Mu: BDP RSS Aggregator download

April 14, 2010

I was in a discussion on the LinkedIn WordPress group where I recommended the BDP RSS Aggregator plugin for a user who wanted to do site wide post aggregation on a summary page. The I found out the plugin is no longer available from the original site and was thought to be dead.

Well, it might be dead but Jim Groom reports at the link above that BDP RSS Aggregator still works on WPMu 2.8.4 and I have it working on WPMu 2.9.1.1 so it’s a travesty for others not to be able to use this most excellent piece of work.

I can’t offer any support for the plugin (unless I work for you) nor can I say whether it will work with any future versions of WPMu but nonetheless, here ya go.

Download the BDP RSS aggregator plugin:
bdp-rssaggregator-0-6-3

  • Share/Bookmark

Career insight from Monster

March 23, 2010

When checking the Monster job boards, you will be presented periodically with a “Special Offer” when first hitting a page. Today’s Special Offer started:

Do you ever have that thought as you contemplate your current employment (or lack thereof) status?

You’ve worked your entire career to build the skills necessary to make you valuable to your employer. You work hard.

You keep thinking that once “this” is all over things will get back to “normal”. Or, if you’re not currently employed, you’re probably thinking that you can’t wait to get back to work, once this crazy recession goes away and the economy “settles down” and gets back on track…

So what exactly is “normal” anyway?

Many people are finding that there is no returning to the way things used to be. They also realize that now the timing is right for them to create their own “normal” and control their own destiny as a business owner. Many of them choose to do that through franchise ownership.

I don’t know if franchise ownership is right for everyone but the insight is dead on, I think. I came to the same conclusion two years ago: My normal IT career the way it used to be is gone forever–along with the earning capability.

  • Share/Bookmark

I think it’s broken

February 16, 2010

When you have a new site that normally gets several hundred views a month and your weekly report comes in like this

sitemeter-gctphotoreport

You can be sure something is broken and it probably has something to do with Google not sending you any traffic. Its always something. This is a site that I haven’t been working because I want to move it from PixelPost to WordPress before investing any more time, but still… I like some traffic coming in.

  • Share/Bookmark

Bing looks better and better

February 12, 2010

This is what I got for my first order of business today…

google-sorry

In case the image is too small it reads:

We’re sorry…

… but your computer or network may be sending automated queries. To protect our users, we can’t process your request right now.

To continue searching, please type the characters you see below:

I know I work fast but this is ridiculous. AVG is up-to-date and reports no infection and AntiMalware Bytes is running right now but I am 99.99% certain I am not infected with anything doing automated Google queries.

I was having problems with GoDady last night while uploading some WordPress Updates to a client’s account but that seems to have been a GoDaddy problem. Of course CMA Acces high-speed Internet cable here in Angleton sux the big one and I recommend avoid the service if you can get DSL. The added speed of cable is substantially mitigated by the continual Connection Reset By Peer errors. In many cases wireless Internet is faster than CMA Access Cable Internet. Getting a reset error really fast is hardly worth it. And they charge twice as much for worse service.

As I thought, AntiMalware Bytes also reports nothing.

I hope this is a one-off and I don’t need to start worrying about entering captcha codes to use Google search. I get the codes wrong about 1 out of 3 times.

  • Share/Bookmark

Advanced CSS web design is not for the faint of heart or the easily annoyed

January 31, 2010

cssHow many times have you looked at a block of CSS being used on your site and wondered what in the heck is going on with all that? Is all that stuff really necessary? Did whoever put all this crap together really know what they were doing? Should I dare modify it?

Though quite functional with CSS technology, I am far from being a CSS expert but after looking at many style sheets I am left wondering what ever happened to the concepts of code reuse (at the very least implying readability,) compactness, and maintainability.

I’ve seen WordPress themes that come with 2000 plus lines of CSS. Through experience I now tend to avoid those like the plague as they tend to break when upgrading browsers or your CMS software. Clean, compact, straightforward CSS is what you want. Granted, a lot of different fancy web design features will require a lot of CSS and in those instances look for adequate documentation.

If you simply load a nice theme you like with no plans of ever customizing it, these concerns may not seem important. But if you like to continuously improve or customize your site, rule out those themes with unruly style sheets regardless of how much you like how it looks. Follow this advice and you will save yourself a ton of headache down the road.

And speaking of analyzing CSS…

In technology terms, Douglass Bowman’s article Sliding Doors of CSS written way back in 2002 is an ancient document. However, if you are interested in a great CSS tutorial that steps you through the mind-numbing intricacies involved in developing an advanced design feature using CSS the article is one of the best I’ve read. I gained useful insight into the shenanigans used by these CSS gurus to accomplish cool web design layouts.

On the other hand, this excerpt…

Keen eyes may have noticed white tab corners showing up in the previous example. These opaque corners are currently preventing the image in the back from showing through the left corner of the image in front. In theory, we could attempt to match the corners of the tab images with a portion of the background behind them. But our tabs can grow in height, which pushes the background behind them lower, shifting the background color we tried to match. Instead, we change the images, making the corners of our tabs transparent. If the curves are anti-aliased, we matte the edges to an average of the background color behind them.

Now that the corners are transparent, a piece of the right-side image shows through the corner of the left-side image. To compensate for this, we add a small amount of left padding to the list item equivalent to the width of the left-side image (9px). Since padding was added to the list item, we need to remove that same amount from the anchor to keep the text centered (15px – 9px = 6px):

…clearly demonstrates why I don’t create CSS layouts from scratch.

  • Share/Bookmark

WordPress drill-down admin pages II

January 18, 2010

wordpress-logo-300x300I never did do a follow-up on the WordPress drill-down admin menus post. A lot of people continue to hit that article so I’ll take the time to give an example of how I easily resolved the issue.

The problem was that after an upgrade to WordPress Mu v 2.8.4a all my dynamically created, drill-down admin pages quit working because they now needed to be registered with WordPress for — completely understandable — security reasons.  As far as I can tell, the only way to register an admin page is through the menu system. Since I don’t want my drill down pages to be on the menu I needed a better way to do it.

One solution suggested was to just use the registered menu page as the callback to handle requests and that is for the most part what I did. The only issue with the solution is that the callback page has to also serve all the content since it can’t request an admin page that is not registered. Using one page to parse all requests and serve the appropriate content will get unwieldy for anything but the simplest of applications and if your application was that simple you wouldn’t be trying to figure out how to add custom drill-down admin menus.

I like modularity and easily managed code so my philosophy is that multiple small files are better than one huge file. I needed a way to solve the problem without breaking my philosophy or changing a lot of my existing code, which was already in multiple small files.

The idea is to build a container page to register on the admin menu and have the container page decide on which code to include based on analyzing the url. The included code can then handle and GET or POST requests and serve the appropriate page output.

<?php
/*
 * Descrition: gcgc admin page. This is the main container page
 * for all admin panels. All POSTS and GETS from all pages route
 * through this page and are handled by the appropriate included file.
*/
global $gcgc_Manager;
echo $gcgc_Manager->getHeader();
//analyze the url to determine which page to load

if (isset($_GET['panel'])){
    switch ($_GET['panel']){

    	case 'cache-admin' :
    	    include (dirname(__FILE__)."/gcgc-admin-cache.php");
    			break;

    	case 'vector-admin' :
           include (dirname(__FILE__)."/gcgc-admin-vector.php");
           break;

    	default :
           include (dirname(__FILE__)."/gcgc-admin-home.php");
    }
}else{
    include (dirname(__FILE__)."/gcgc-admin-home.php");
}

$gcgc_Manager->getFooter();
?>

I kept the above example brief but you can imagine that there can be an unlimited number of admin pages. And this way I didn’t have to change the included files at all — all I had to do was add the ‘&panel=’ parameter to existing request urls and problem solved.

  • Share/Bookmark

iPhone, Droid, Pre, Nexus One breakdown and comparison

January 6, 2010

Courtesy of BillShrink.com

Nexus One vs iPhone, Droid & Palm Pre

Short and sweet: The multitasking is going to be an issue with the iPhone as well as the lack of expandable memory.  I would expect both issues to be addressed in a soon-to-be-released upgrade. I mean, they pretty much have to, right?

Also if you take photos with your phone 5 megapixels is a significant improvement over 3 mp. Don’t let anyone tell you different. There may not be a big difference between 12 megapixels and 10 but if you take a lot of pictures you will be happier with more resolution at image editing time,especially when cropping.  If you don’t take pictures don’t say you never will; camera phones take ridiculously good images in many situations.

Total cost of ownership is kinda surprising since I’ve never seen the figures before.  T-Mobile’s Nexus One  with its outrageous talk time seems to be the best deal if the network is decent in your area.

Seen on Twitter

  • Share/Bookmark

The Internet is my snippets database

January 3, 2010

Like everyone who codes for a living I will lift a snippet of code from a website. Usually it’s very generic code — as most code is — and I never give it a second thought. There are only so many ways to iterate an object. A good portion of my Internet code searching is to look for code I need not because I don’t know how to do it from scratch but because I don’t want to have to figure out how to do it from scratch in yet a new language.

Although there is no reason for most programmers to ever write a sort since sorting is built in to everything these days, a sort would be a good example. Back in the day a programmer would find him or herself needing to sort things all the time and you could not make a decent living typing out a brand spanking new quicksort every time you needed one. So you figured out how to write any particular sort only once per language and saved the code for later reuse.

A more modern example would be something like this:

    defaultHandler=function(defaults,params) {
      var i;
      for (i in params) {
          defaults[i]=params[i];
      }
      return defaults;
    }

This powerful little bit of Javascript can be dropped anywhere you need a list of default parameters to be merged with a list of user submitted settings. If you are being efficient about your work you are not going to re-type that code every time you use it; you are going to cut and paste it.

So, like many older professional coders, I have a database with reusable code snippets that I have built up over the course of more than two decades in the business. I have snippets for every sort algorithm you can name: the quicksort, heap sort, bubble sort, merge sort, selection sort, insertion sort ; name and address validators/formatters; date/timezone transformations; list processing; form validation; dynamic tables; and cool tricks. When I need to do something which I have done already a dozen times I simply copy and paste from my vast snippets database, never wasting time re-writing the same code more than once.

That was then; this is now. The problem is that I have all these snippets archived in @formula language, LotusScript, VB, and a bit of Javascript whereas today I need PHP, Perl, Java, and advanced Javascript frameworks like jQuery. I could find the code in my snippets database that does the same thing and then port it over to the new language but why do that when almost any code snippet can be found in under a minute with a deft Google search? I haven’t even used my snippets database in half a decade. The Internet is now my snippets database. I found the above Javascript snippet here, for example, while looking for some sample JavaScript to pass different object types as function parameters.

I haven’t carried a technical reference book to work in almost ten years. I don’t even use them at home anymore. The Internet is now my technical reference library.

  • Share/Bookmark

Firefox session restore: Just a little bit sweeter

December 19, 2009

The new Firefox session restore functionality that popped up a couple of updates ago is quite nice and has introduced a slight improvement to my workflow.

I don’t know about most of you but the minimum Firefox windows I have open is four and the aggregated number of open tabs is near a dozen. And that’s just at start up. After a few hours, not mention a day or two, I may have 30, 40, 50 tabs open in the four windows. Probably not more than 50 but I don’t know for sure.

This hyper surfing results from researching technical issues and when I find applicable information I want to leave it up for reference until the issue is resolved or until the info is deemed not relevant. There is nothing worse than having to waste time re-finding a drop of information in the ocean of technical documentation through which you have been wading for the past several hours, or days.

Well no software is perfect and as good as it is, Firefox and the applications it hosts do leak memory. Some a lot more than others. System requirements at startup are about 400 Meg of available RAM. At the height of a work session, with many open tabs, RAM usage will swell to 600-800M. After a few days without restarting RAM usage will go above a Gig and closing everything but the startup configuration still consumes over 600 Meg. The leakage filled up a 200 Meg barrel.

fire-kill-process

For this reason, as you all know, you have to restart Firefox from time to time to keep things perky, and operational. This is where the Firefox session restore comes in handy.

What I use to do when I needed to restart was go through every tab and close all the pages that I no longer needed, bookmarking ones that I might need again (which I hate doing because it results in a bookmark nightmare over time.) Then instead of closing Firefox normally — this is the little trick — open the task manager, click the processes tab, and kill the Firefox process. Firefox will immediately close.

When Firefox restarts it thinks it is recovering from a crash and will give you the option to restore the previous session, opening all your windows and pages they way you left them. Pretty sweet huh. There may be another way to accomplish this same thing, but it cant be as easy as this method.

And it just got a little easier with a simple check-box prompt improvement. Now I don’t have to go through the tedious process of closing the tabs I don’t need prior to restarting. At startup after a crash, Firefox now prompts with a selection of pages that were open at the “crash” and you can tick off the ones you don’t want.

firefox-session-restore

Just a little bit sweeter.

  • Share/Bookmark