Stupid Coding Bloopers

Sometimes when I’m coding and working on designs, my brain goes on auto-pilot and I make some of the weirdest errors in my code, without even knowing it – causing me to load the design I’m working on and then say…”WTF??” when it doesn’t work the way I think it should. I go back and look at my code and I see some pretty silly stuff that tells me I need to pay more attention to what I’m doing. Like what?

Well…

In a CSS container where I want to define a height and width of an element… the normal thing would be:
height: XX; width: XX

My blooper? weight: XX

Yes, I combine the two words and wrap it into one definition…and I do it all the damn time! Not because it makes sense. Not because that’s the way I think it should be – – it just… happens. Like my brain just wants to shortcut it.

Another? My header tags. You know – h1, h2, h3, h4…for some reason, this is my biggest blooper ever. I think my poor brain gets confused because my fingers write the tags incrementally. Huh? For example (I had to remove the regular brackets around the header tags because WordPress kept correcting my code blooper!):

h1- This is an H1 -h2

See how I started with an h1 and I closed that with an h2? That’s because 2 comes after 1, silly. Makes sense, doesn’t it?
I *think* it’s because I start in my CSS by writing:

h1, h2, h3, h4, h5, h6 {margin:0; padding:0;}

So when I’m writing the actual code in the template when I type h1 — my brain automatically wants to type h2 next…or whatever. It just happens.

Personally, I think I’m writing new world CSS over here… CSS shorthand? I’ll be discovered as genius someday. Maybe it’s code dyslexia? Got any coding bloopers, or am I just weird that way?

Posted in , ,

5 thoughts on “Stupid Coding Bloopers”

  1. lol. I feel your pain, sister!

    One of the ones I catch myself doing a LOT (probably holdover from doing inline css) is instead of writing class=”blah”, I end up using style=”blah”…then spend 2 hours trying to figure out why my classes aren’t showing. :((

  2. I do the same thing with the style/class mix up.

    I also tend to forget what I named the CSS class. For instance, I’ll name it “comments” and then reference “comment” (no s). That’s usually a solid 20 minutes of my life I can’t get back ๐Ÿ™‚

  3. I just had a coding blooper this morning! I made an image and saved it as “header_title.jpg” then I called it from the CSS as “header-title.jpg”. I spent some time refreshing the page, uploading the image, deleting the old one and re-uploading the image, but it just wouldn’t budge! I took a break, drank a glass of water, and when I came to check on the codes again I realized I typed a hyphen in the CSS instead of an underscore. Duh! The stupid hyphen got me thinking there was something wrong with my FTP software. :-w

    Should have just done a copy-paste. lols

  4. Jay – if I had a dime for everytime I’ve done the ‘comments versus comment’ thing, I’d be a rich, rich woman! haha ๐Ÿ™‚

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top
%d bloggers like this: