Updates

HTML Validation is (still) pointless!

November 23rd, 2010

Ok, so we all know that we should write “valid”* HTML, and yet, less than 5% of websites validate for one reason or another.  Now this statistic can be a bit misleading as a comment from a user that didn’t use valid markup could invalidate the website, so granted, there is some play with the stats (per the usual), but let’s again assume that number is close.

Why?  Why do we not write perfect HTML?  Surely with the free validator on the authority’s website there is no excuse to write code that wont validate against the standard.

The answer there is simple, if and when all the major browsers (Firefox, Safari, IE, Opera, Chrome) all render a page according to the standard, then I will finally start caring about the validation of my websites.  Until then, I will continue to write code that works across the board, and just not care if it is “valid”.

To be real though, most of the browsers work pretty well, however the 800lb gorilla in the room, IE, does not.  Microsoft continually changes the standards by which they will render a page, like promising CSS 2 support in IE7 then bailing on that promise 6 months before release.  And let us not forget the horribly pathetic Javascript rendering engine, JScript, that the rest of us just ignore because it can’t be trusted to behave reliably.

So, like even on this website, we find ourselves writing “valid” code, and at the same time having to redefine valid to mean “Code that works in all the browsers”, not “Code that the W3C says is valid even though it looks like crap in IE6″.  Just to maintain a semblance of order and sanity, we use the handy IE CSS hacks where IE on Windows will actually arbitrarly execute code depending on the version of the IE browser being used.  Does that sound like an admission of guilt on the part of MS to anyone else?  OK Bill, repeat after me, “I know my browser sucks, so, instead of fixing it which would severely hamper my marketing and legal budgets, I will just allow hacks in order to ensure you nerdy web guys can still make pretty pages”.  There, was that so hard!?

So, someone feel free to run the validate against any of my websites.  Don’t bother sending me the results because I don’t care.  The sites work, the code looks good, documented, and is maintainable, so, what exactly was the complaint?

*valid code is extremely subjective, but let’s assume here I mean W3C “valid” code.
Reblog this post [with Zemanta]

Programming Standards are NOT pointless

November 19th, 2010

It seems some people took my other article a bit too seriously.  While I was very serious and feel strongly about my convictions when it comes to HTML “validation”, the same cannot be said of programming standards.

For those of you that have never programming professionally, this stuff may be very new to you.  However, trust me, it is extremely important.  Programming standards are not stupid, are not corners to be cut, and must be strict, otherwise they ARE pointless.

There are standards when it comes to documenting your code, and I wont get into them.  But if you are interested there are programs out there which more or less set the standard if you want to use them.  JavaDoc, PHPDoc, and for those MS folks….. .  Go check out their websites for good advice on how to format your comments in your code.

Now, for actually coding, I have my own set of standards, developed over the years, to make the code both readable, but also hopefully logical.  Most people I run into think my code is pretty readable, some languages more than others.  Let’s face it, Perl code will never, ever, be as readable or “pretty” as Python.  It just isn’t going to happen.  Sorry you old UNIX guys, but Perl just isn’t very pretty.  The OO languages are much easier on the eyes.

So, other than for documentation reasons, readability (which leads to maintainability), are there actually other reasons to program to a standard?  Only if you want to use your code in some sort of portfolio.  But those first two reasons are EXTREMELY important.  Everyone out there that has programmed professionally will know exactly what I mean.

Tabs or spaces?  Braces at the end of a line or on their own line?  Spaces between concatenation or operators?  Double quotes or single quotes?  Print to buffer or hold in variables?  Globals or object variables?  Arguments or variables?

There are a ton of questions, and I cant answer them all.  But think about why you do something, and if you cant come up with a good reason, probably time to stop doing it.

Enhanced by Zemanta

Why Drupal Views make so little sense

November 14th, 2010

I recently had a very short contract gig working for a company that creates websites using Drupal.  While that doesn’t sound very interesting or even hard, to make it more so of both, these guys used Views for every

Drupal
Image via Wikipedia

thing.  Which I just don’t get.

If you are a programming, why would you use views?  It is adding a layer of abstraction between the logic and database in an interpreted language with a framework that is already bloated beyond all recognition.  I know when I write plugins for WordPress, I want the plugin to be quick, precise, and add the least amount of overhead possible.  Views just seem to be a way to do all the opposites of those, just for the hell of it.

If you are not very technically inclined, I understand.  Using views is a lot like using MS Access.  You can create fairly complex queries yourself, without having to get someone that actually understands it involved.  And that is the trade off.  You can do it yourself, and eat the extra overhead, or pay/hire/bribe/cajole someone else into doing it for you, specialized, and thus, in theory at least, more efficiently.

These folks claimed to be programmers though, so I just don’t get it.  Why are you depending on someone else’s plugin, that extends functionality that is inefficient and clumsy, can’t do everything, and still requires custom code to be written or even more plugins to be added.  Where exactly does that circular line stop?

The Drupal “framework” and I use that term loosely since it is really a CMS that can just be extended, has enough problems and bloat in it, why exactly are views worth adding more?  Again, assuming you know SQL and PHP on even a basic level.

It just doesnt make any sense.  Query writers and views are one thing if you are working directly with the database, (e.g. phpMyAdmin or TOAD), but adding it as a layer to a “custom” application that you will be supporting when you claim to be capable of actual programming!!??  Please explain that one to me.

To be fair, I dont use Drupal much, I like WP much better.  The OO approach is much more appealing than the very Perl-esque (read: old) way of doing things Drupal does with its modules. But I still don’t get what the big deal is about Views.

Enhanced by Zemanta

Holiday Hours

November 11th, 2010

With the holidays rapidly approaching, I wanted to take a moment to go over office closures and such for XM Tek’s Flower Mound office.

XM Tek’s Flower Mound office will be closed the following dates:

November 15-19 for travel
November 24-26 for Thanksgiving

December 23 – January 3 for Christmas and New Years

Emergency numbers are in place and we can be contacted using them for outages or other critical emergencies.  Otherwise, please call or email and we will get back to you.

Amateur Web Design

November 3rd, 2010

There are a lot of amateur web designers out there.  They post on forums, and advertise freakishly cheap prices, like $150 for a website.  The differences between them and those of us that do this professionally are too many to be named.  Obviously the pricing is a huge difference, they charge for an entire website what my hourly rate is.  But then again, I don’t really make just the brochure 4 page websites, we actually write custom applications that do very complex things ranging from e-commerce to mission critical business processes.

Another huge difference is the professionals actually stick to standards and try to keep up with trends and new technology, unlike the 15 year old designers working from mom’s house.  I found out recently about this “company” (LR Web Design).  First, they call HTML “coding” which is a complete misnomer.  And then talked down Dreamweaver, and yet their “code” is at least 10 years out of date.  No CSS, inline font tags, UPPERCASE tags, image maps for menus, and tables for very basic positioning.  Here is another one of their websites: http://knbcolo.webs.com/ .  They don’t even use a true host, but a free website company.  Let me fill you in, none of this is what you want your company to have on its website.  It is unprofessional and doesn’t really put your best foot forward.  But if you want a slow loading website on a free host with no custom anything, by all means go with one of these people.  Otherwise, go with someone with training, experience, and credentials, as well as a portfolio with real clients you have heard of.

Like wine & cars, you get what you pay for with websites.  I wouldn’t want my company looking cheap.

Enhanced by Zemanta

How to fix WP ECommerce

October 30th, 2010

On front end pages with no ecommerce functionality, this plugin adds over 220+ database queries.  The more I messed with the code trying to make it behave, the more I understood just how horribly written this plugin is.

Now, as someone that has been doing development long enough to know, there are times that code just gets away from the development team and becomes a mess unto itself.  It happens, especially in the OSS world where code reviews are few if ever.  But, as I read the forums for this thing, the developers are just fooling themselves thinking the code is in good shape.

Here are a few basic suggestions:
1) Check to see if the page needs to execute the plugin.  If it doesnt, dont do it.  There is no reason to increase the number of queries by an order of magantuide when I am on a page that has no WP Ecommerce functionality.
2) Clean up the queries.  For example:
SELECT `id` FROM `wp_product_list` WHERE `active` IN(’1′)
should be
SELECT `id` FROM `wp_product_list` WHERE `active` = 1
It is more effiecent.

3) Index the tables!  The query above doesnt use an index.  That is right folks, the field “active” in product_list is not indexed.  This is easy and simple.

4) Use arrays or some other data structure for complex data.  Dont use the same basic query over and over again.  Example:

Freelancer.com ? Really?

October 26th, 2010

I have been wandering around some of the freelancer websites looking for some programming/project management gigs to keep me busy, and I ran across this one on Freelancer.com:

“Want to make a website which features a different picture of a babe everyday.

Successful candidate:

  • Must create and design the website
  • Logo creation
  • Provide 3000 original large, high quality photos with my watermarked logo
  • These photos must be legal
  • All copyright will belong to me
  • Photos must automatically change as of 12:00 PM MST
  • Must be able to and will be responsible for setting up the website with advertising program to ensure money is made from visitors”

The poster gave a max budget of $250….

Really!!!???

Let me make sure I understand…You want me to develop the software to power the site (admittedly very simple), design the look and feel of the site, create a logo, and come up with 3000 original photos of “babes” and then sign it all over to you, all for $250?  Then you want me to market it and advertise it?  What the heck do I need you for?  Let’s face it, you cant get 3000 images, even non-original ones for that price, but I have no idea what the photo shoots required would cost…maybe $25000?  For that many images there are going to be a lot of different girls, doing a lot of different things, in a lot of different places.  $25000 may be extremely cheap I don’t know.

I do know the person that posted this is delusional.  He/She wants to pay a paltry sum for someone to do ALL the work.  Usually clients have ideas, content, and know how to market their own stuff, but not in this case.  Maybe this person works in politics and thinks this is how the real work actually operates.

Enhanced by Zemanta

New Hosting Packages and Prices

October 19th, 2010

First of all, thank you for being an XM Tek customer, we really appreciate your business.

This has been an exciting year for us as we have grown and developed new products and offerings to help your business. One of these new offerings is managed hosting.

Most of you have been enjoying the benefits of managed hosting all along, but due to time and server costs increases, we face the hard issue of having to charge for it starting January 1, 2011.

With managed hosting, we will take care of all your systems administration tasks, at least once a month to ensure everything you have on our servers is running at its most secure and most efficient. If you have WordPress, Joomla, Drupal, PHPX, or other software installed, we will continue to keep it up to date and secure, in addition to managing your email accounts and databases. In fact, little will change from a service standpoint other than we will be more diligent about it as it is now a charged service.

If you do not have any software installed above what came with the server, or do not require us to manage it for you, then nothing will change. The prices for un-managed services are remaining the same.

To view our new packages and prices, please go to our Web Hosting page.

If you would like a good example of another hosting company that does managed hosting, especially WordPress, please check out Media Temple.  I do not think though, they actually keep your WP install up to date, they just support it better than most hoses.

If you wish to keep being a managed hosting customer, your price would normally increase by around 100%, but since you are a valued customer, the price increase will be only 50%. This offer is only valid for current customers electing to move to managed hosting effective Jan. 1 2011.

In December, we will be sending the annual invoices. The new prices will be reflected there. If you do not wish to keep all the same great services, please let us know, and will make sure to drop your account to un-managed hosting to keep your price the same, but also move the responsibly of administration to you.

Also, effective Jan 1 2011, all support requests must go through our support portal. You will be emailed a username and password in December. This system allows us to better track and respond to your requests, as well as ensure someone is watching the queue versus emailing someone (usually Ryan) directly.

Thank you for your business, have a great holiday season, and we look forward to being your IT partner in 2011.

Regards,

The XM Tek Team
Ryan, Jessica, Von, Tony, and Illianna

Enhanced by Zemanta

Stop invading my ears!

October 18th, 2010

To everyone out there that thinks it is “cool” or “neat” to put music on your website, do the rest of us a favor, and don’t.  While I understand the aesthetic nature of some sound,  for the most part it is just annoying.  When online, I usually listen to iTunes, and the last thing I want is some hideously encoded streaming .wav file repeating the same 6 seconds of music over and over again.  Unless I really need to be on your website, I hit back on my mouse and try to immediately start repressing the memory that is your website.

At the end of the day, music requires a lot of bandwidth for those of you hosting the music files, a lot more than even a complex page (assuming your images are optimized, but don’t get me started on that today).  And for every Pro:fx out there, there are a 100 Hampsterdance websites.

If you aren’t an amazing DJ, or awesome Flash/Shockwave/Silverlight developer, do us all a favor, and leave the music off your website.  I like my thousands of MP3‘s, and I don’t force you to listen to them.

Enhanced by Zemanta

For the Love of God, Optimize those Images!

October 7th, 2010

Time for another lesson in web design: Image Optimization!  Yes, as we all know it is really pretty to have a huge header on your website.  Hey, look at this website, I have large images on my front page.  But, you don’t have to make that experience painful for your users, especially those on *gasp* dial-up!

The solution is simple: optimize your images.  I use Fireworks, but Photoshop has it built in these days as well.  It is basically a way of taking the image you want to use, and removes unwanted data, making the image size smaller, and hence, faster to load.  The web is a horrible medium for images, the 72dpi resolution of most monitors is just not that great.  But, it is all we have right now, and that is probably a good thing since anything more and the image just gets bigger and bigger.

By optimizing, your look stays intact, and everyone can enjoy it faster.  And it is cheaper on your wallet since it requires less bandwidth and less CPU to serve a smaller file.  Speaking of cheap, for those of you that do not have the Adobe suite, there is a pretty spiffy free online optimizer here.  Enjoy, and for the love of all things holy, optimize!

If you want to read more on the topic: HTMLSource.

Enhanced by Zemanta