Blog
1

Stop invading my ears!

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
Share
Tags: ,
1

Why Drupal Views make so little sense

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
Share
6

For the Love of God, Optimize those Images!

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
Share
4

SEO…It really isn't hard

Search Engine Optimization (SEO) really isnt a new concept although the buzzword is fairly new.  It is basically the process of ensuring your site has on it that which search engines (e.g. Google) index, hence making your search engine rankings higher and presumably driving more traffic to your website.  I still remember doing this in the mid-90′s when we had a huge number of search engines ranging from Hotbot to Alta Vista to AOL that mattered and each one needed to be submitted to and then your site massaged in order to get anything resembling a decent ranking.

Times have changed, the index bots are much more sophisticated than 10+ years ago, and are far less likely to be fooled by the tricks (like using keywords hidden in your background by using the same color for both).

I often get asked, “How can I improve my search results?”.  I usually try to resist rolling my eyes for two reasons: 1) the sheer amount of resources out there covering this topic are just overwhelming and 2) it isnt that hard!  So, to those hosting with me and everyone else reading this, here are a few short tips on how to get your site SEOized!

Content, Content, Content
The more content you have, and I dont mean junk, I mean actual meaningful content, the higher your rank.  So sharpen your pencils and start writing.

New Content, New Images, New Stuff
Daily blog posts or news releases will really help you get noticed by the bots.  But again, dont post junk, otherwise your ranking will drop due to noone visiting.

Network
You must network your site.  Join a few groups, post on them, use WordPress or similar software, embrace RSS, use MySpace or Facebook and link to your site.  These will only drive traffic to your site, increase the relevancy of your keywords and get you the rankings you want.

Use decent HTML/CSS
I say decent, since I still think the entire validation thing is a scam (I will post more on that later).  Your page should work in all major browsers, use alt tags in your images, name your pages something relevant, and avoid a lot of Flash or Images (for now) since they still aren’t fully indexed.    Do not use an image for text blocks, it will not index!

See, not hard.  Enjoy adding quality content, dont overuse images or the other spiffy technologies (Silverlight, Flash, etc…) and have fun watching your traffic come to you for a change.

Enhanced by Zemanta
Share
3

Web Design at its Worst

I admit, I like to find gigs on Craigslist.  There are horrible things on there, and some stupid requests (“I need a PMP certified Project Manager with 12 years industry experience that can start today for $12/hr.”), but every now and then, something decent appears.

I was browsing, wondering about competition and stumbled on this website : LeoScorp, LLC .  What a bad name for a company, but when you first look at the site, you are amazed they claim to be in the website building business.  Bad use of colors, background image is distracting, and let’s face it, picking something like Astrology to base your company name/theme/logo on could actually turn people off, especially down here in the Bible Belt.

Assuming you make it past all that, check out their About Us.  Does anyone care they swam together at a public pool?  Does that make them better developers/designers?  If this was their homepage, sure knock yourself out, but on a business site, keep it professional.

Then go to the Services page, where they have a stupid little computer extremely slowing typing out the content.  First, it is slow, I type much faster than that and read WAY faster.  Let’s go already.  I don’t have time to sit there and be annoyed at a little graphic you thought was cute.  Furthermore, doing that stuff isn’t even close to SEO helpful, so maybe it is a good thing you are on Craigslist looking for jobs since Google just isn’t working out for you.

But let’s face it, no matter how bad a site is, it could always be worse.

Enhanced by Zemanta
Share
Tags: ,
4

Programmers, do you have Insurance?

Calling all programmers, those of you that do it professionally at least.  Do you have your own personal errors and omissions insurance?  Should you?  Probably.

I have been in development for a long time time, about 12 years, and for the web development world I live in, that makes me ancient.  I carry my own errors and omission insurance for personal projects, just in case the GPL can’t protect me well enough.  What is this insurance you ask?

There is a good article over at Insurance Journal that goes over exactly what it is and why you might need it.  My question is a bit more complex though.  If you are a professional programming, working on someone else’s payroll, do you need this insurance?  If you are fired for incompetence, or laid off, and the company you used to work for finds a bug that has cost them $1M a week since it was implemented 2 quarters ago, do they have the right, or abililtty, to sue you for that loss?  Perhaps.  It all depends on where you live, what company, and the situation.

Being sued for something you did on the job, in the best interest of the company, under the leadership of someone else, is extremely rare.  Most likely because it requires the company to admit they were less than diligent, didn’t do a very good job managing, and then makes them liable to their stakeholders since they are basically admitting an agent of their company screwed up.  Companies don’t like to do that.

However, if you are working on a 1099 or a third party W2, you need to make sure you are covered.  If you are on 1099 or doing corp-to-corp, you had better have insurance.  You are liable in that case, in the absence of another contract, for everything you do and write.  While you probably wouldn’t be found guilty of anything (I hope), it would be expensive to fight it, and better let the insurance company do it.

If you are on a third party W2, make sure the folks you are actually workign for have E&O insurance as an add on or rider to their general liablity.  You could need them to protect you for something you did in their employ on behalf of one of their clients.

So, do you have insurance?  Do you need it?  I am not a lawyer, so none of this should be taken and blindly run with, but, ask yourself if you are covered, and if you have questions or doubts, find someone that knows and ask.  It never hurts and could save you a lot of trouble later.

Related articles by Zemanta
Enhanced by Zemanta
Share
0

Types of Programming Bugs

In a recent project I have been working on, I took over another’s code base, based in Drupal, and have been working to both fix issues and add functionality.  It has been a lot of fun learning Drupal, and working with this interesting application.  And finding different types of bugs.  If you are a programmer, you know there are bugs that are different and behave oddly.   Here are some types of programming bugs I have come across recently.

Heisenbug
Named for the Heisenberg uncertainty principle, this type of bug is only appears when you aren’t looking.  You know the kind, the kind you swear you can’t replicate, but yet, the users day after day report them happening.  If you try to measure this type of bug, you will inevitably alter your results.  They are the worst to track down, because a lot of the time you end up making changes just to hope they go away, even though you still aren’t sure exactly what caused them.

Keyser Söze Bug
These actually arent even bugs, but they make you think they are, and are a complete pain in the neck.  Basically, it is a “bug” that is causing a huge problem for you, but as you learn, and dig and dig, you figure out it isnt a bug, just a “feature”.  It may be stupid, illogical, or incorrect, but the code itself is working just as design and written.  So, in essence, it isnt a bug, only made you think it was.

WTF Bug
This is one of those that you swear up and down you have fixed, several times, yet is still there.  The most common one of these is when a customer’s ISP or internal firewall have cached old versions, so the damn thing is still cropping up on you, but you know it isn’t there anymore.  Another time these happen is when you change one part of the code, only to figure out that those methods were depreciated 8 versions ago, and now all that logic is somewhere else.  Yes you changed it, yes you committed it, but the bug is still there.

Enhanced by Zemanta
Share
1

Programming Standards are NOT pointless

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
Share
0

How to fix WP ECommerce

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:

Share
2

Is God Pro-Life? I doubt it.

If you, like us, spend any time driving in rural parts of Texas and New Mexico, you have seen the deluge of Pro-Life billboards and parenting ads.  I assume that out in the sticks there isn’t anything else for the teenagers to do but make babies, so the prevalence is a lot higher out there.

On our recent vacation I saw one that said “God is Pro-Life”, and man did that annoy me.  Is God Pro-Life?  If you are answering unequivocally “yes”, how the heck do you know?  Did you ask him?  Did he blog it?  Did you get the memo?  Last I looked we, humans, were given free choice by God, so the facts would tend to lead to the conclusion he is Pro-Choice.

For those of you that don’t know, I am Pro-Choice.  I don’t see it as my place to tell others what to do in their relationship, with their bodies, or with their lives.  That is a decision everyone should make on their own, and the consequences, one way or another, are between you and God.  No one else.  That same outlook also makes me for Gay Marriage, since again, who am I to condemn someone’s way of life.  If they are happy and not making me or mine unhappy, I don’t care who or what they do.

I am also pretty damn sure the Bible said do not judge people, love everyone, and treat everyone (and by extension their beliefs) with respect and generosity.

So to those of you running around all pissed at me now for saying God is actually Pro-Choice…why do you care?  Are you, personally, going to adopt each possible abortion?  If not, you don’t have a pony in the race and should sit down.

Enhanced by Zemanta
Share