EasyCFM.COM ColdFusion Forums / General Discussion / blond code moments

   Reply to Discussion | New Discussion << previous || next >> 
Posted By Discussion Topic: blond code moments -- page: 1 2 3

book mark this topic Printer-friendly Version  send this discussion to a friend  new posts last

Lossed
04-03-2007 @ 5:13 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Senior Member
Posts: 1095
Joined: Apr 2004

We all have 'em, don't we? Please tell me I'm not alone in continually making either the same, basic coding or simply retarded errors.

Some of mine are:

1. using == in cfml and = in js.
2. using = instead of eq
3. I used cflocation after an update query but inside a transaction tag and it took me ages to figure out why the query wasn't updating. Like...duh...

What are your brain-dead coding erros most likely to be?

Lossed
---------------------------
When the only tool you have is a hammer, everything looks like a nail Smile
-----------------------------

kicker
04-03-2007 @ 5:50 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Moderator
Posts: 717
Joined: Oct 2004

Your not alone. Here are mine

using EQ/NEQ/GT/LT in actionscript and == != > < in cfif statements.

using .text in cfset statements (used in actionscript)

Using # in actionscript

writing out an if or switch statement and forget to surround in in <cfscript> tags

Writing a cfc and forgetting to pass the arguments to it or passing the wrong variables(I usually end up looking at my cfc for hours trying to figure out what is wrong)

Probably my biggest and most common brain dead thing I do is I will write script out and have all these variables in play and forget to set them or omit them from what I want to do. Frown

So now that I am mortified with my blunders I will go.  Playful

Craig
Clearcg.com

louissto56
04-03-2007 @ 9:15 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Moderator
Posts: 1149
Joined: Jan 2007

Mine are:

EQ and =. I always forget that in an IF you need EQ and in SET you need =.

Forgetting to put double hashes in hex codes in a cfoutput. e.g. <cfoutput>bgcolor=#FFFFFF</cfoutput>

I bet there are thousands of others. lol

Louis

Notice-Board in NZ has now been released. Check it out at www.notice-board.co.nz!!

Lossed
04-05-2007 @ 9:17 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Senior Member
Posts: 1095
Joined: Apr 2004

Hello everyone.
My name is Lossed and I'm a recovering stupidCode-aholic.
It's been two hours since my last blond code moment/s.
That being forgetting to close the if() statements in cfscript when i have a function inside them: eg: if(len(){}. I do that all the time Frown

Lossed
---------------------------
When the only tool you have is a hammer, everything looks like a nail Smile
-----------------------------

louissto56
04-05-2007 @ 11:25 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Moderator
Posts: 1149
Joined: Jan 2007

Hi Lossed. I'm Louis and I too just made another blonde code moment. I was stuck for hours wondering why <cfif IsDefined('Form.submit')> wasn't working when hours later I realised my form button was called "Submit2" Frown

Louis

Notice-Board in NZ has now been released. Check it out at www.notice-board.co.nz !!

GrowlyBear
04-06-2007 @ 12:16 AM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Moderator
Posts: 1314
Joined: May 2004

Hi Everyone, my name is Growly Bear, I'm a blonde Moment junkie. *hangs head in shame*
*leaves head hanging as it is cool to see a head floating in mid-air*
I just discovered how blonde I am. I was busily editing a function, hitting the refresh button on the browser and wondering why nothing happened.
Then after 10 minutes, yes 10 as i was looking for a ibuprofin to ease the headache from banging a keyboard against my skull, I noticed I was viewing the "Live" site and not the "production version" I was working on.

~~~~~~~~~~~~~~~~~~~
CF Blogger
http://www.cfblogger.com

louissto56
04-06-2007 @ 1:32 AM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Moderator
Posts: 1149
Joined: Jan 2007

*claps at your honesty and courage to tell us this story*

Well done Growly. The first step is admiting your problem.

But never mind. I am sure plenty other ENGLISH programmers do the same *cough*maulins*cough*. Smile

Louis

Notice-Board in NZ has now been released. Check it out at www.notice-board.co.nz !!

JJfutbol
04-06-2007 @ 3:05 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Moderator
Posts: 1250
Joined: Nov 2004

And you call yourselves CF developers! For shame! CF developers only write flawless code. ...Well thats what I like to think but probably nowhere near true. Smile

I have had my fair share of blond code moments but I can't think of some of them now. ... Actually I had one today just recently where I was adding a new property to a bean, adding the input field for it in a form, entering data and saving. When I would view my change it would not show up because I missed a step: Update all queries (CRUD) and add the field to the database. Smile  Doh!

----------------------------------------------------
Some free CF applications available at my site, such as the popular CFC Validator www.javier-julio.com My new site design is up!! Let me know what you all think! Working on a fully accessible Forum, which validates as full CSS and XHTML 1.0 Strict.

louissto56
04-10-2007 @ 12:46 AM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Moderator
Posts: 1149
Joined: Jan 2007

Oh I thought of a new one.

colour instead of color in HTML code. I am Australian and speak REAL ENGLISH so I am used to spelling it
C O L O U R

Louis

Notice-Board in NZ has now been released. Check it out at www.notice-board.co.nz !!

SirRawlins
04-11-2007 @ 6:05 AM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
Moderator
Posts: 951
Joined: Mar 2006

Well, I've just spent the last hour trying to solve what CF was telling me was a 'syntax error' in one of my queries, only to find out that it was because my table was called 'user', which is a reserved word ... DOH!

Maulin

PAGE: 1 2 3

Website Designed and Developed by Pablo Varando.