CF WTF



  • I love ColdFusion, no really. I love developing applications using it. The way it prefixes everything with CF gets a little old, but for the most part, I love the language.
    Legacy code is, well, everyone knows. This one piece however, it made do a double take, then a triple take, shake my head again, then straight to this forum.

    cfif ACCOUNT_TYPE eq "PC"
    	cfset account_type = "PC"
    cfelseif ACCOUNT_TYPE neq "PC"
    	cfset account_type = "PC"
    /cfif
    

    And no, variable names are not case sensitive in ColdFusion.

    EDIT: Had to take out carats for code to display, Imatard.



  • Languages with the "set" or "let" construct have always amused me.  I remember when I was a young programmer and first learned that, in BASIC, "LET X = 2" was the same as "X = 2"... my world was shaken on that day. 

    With the construct, it always feels as through you are asking the permission of the programming language to modify a variable, rather than simply declaring it such.  I truly felt the power of programming when I could say "X = 0" and my will was done.

    I would like to ask the permission of the programming language to make this WTF go away, though.



  •  Why does this thing appends a CF to everything, it's sooooo stupid.



  •  @ubersoldat said:

     Why does this thing appends a CF to everything, it's sooooo stupid.

    brand awareness?



  • @ubersoldat said:

     Why does this thing appends a CF to everything, it's sooooo stupid.

    Where does it append CF to anything?



  • @Lingerance said:

    @ubersoldat said:

     Why does this thing appends a CF to everything, it's sooooo stupid.

    Where does it append CF to anything?

    Clearly, it's appending CF to any character immediately preceding a keyword...



  • I think this prefixing is rather smart. This way, you can define functions called "if" without getting into hell's kitchen.



  • @North Bus said:

    Languages with the "set" or "let" construct have always amused me.  I remember when I was a young programmer and first learned that, in BASIC, "LET X = 2" was the same as "X = 2"... my world was shaken on that day. 

    With the construct, it always feels as through you are asking the permission of the programming language to modify a variable, rather than simply declaring it such.  I truly felt the power of programming when I could say "X = 0" and my will was done.

    I would like to ask the permission of the programming language to make this WTF go away, though.

     

    I used to TA for CS101 and CS201 for my college and I can't tell you how many students would have been helped by the LET statement.  The idea of assignment always tripped up beginners, it seems so simple when you've been doing it for years, but if you just saw

    x = y 

    sitting on a line without any knowledge of how programming works, maybe just a basic idea of high school mathematics, I could see how some people could be confused, of course those people should come to grips with this quickly or leave the profession (or stay and produce more WTFs for our amusement).  



  • @AJAXdrivenBuzzwords said:

    The idea of assignment always tripped up beginners
     

    I don't know why, but the idea of assignment has never tripped me up, not even the very first time I saw an assignment. It was like,  "right, that value goes into X".

    Most people don't suffer from a failure to think in the abstract, but from a failure to realise they already often do, whenever they say the words "some amount"or a similar phrase denoting an undetermined quantity. It is that lack of awareness that puzzles me most.



  • @AJAXdrivenBuzzwords said:

    @North Bus said:

    Languages with the "set" or "let" construct have always amused me.  I remember when I was a young programmer and first learned that, in BASIC, "LET X = 2" was the same as "X = 2"... my world was shaken on that day. 

    With the construct, it always feels as through you are asking the permission of the programming language to modify a variable, rather than simply declaring it such.  I truly felt the power of programming when I could say "X = 0" and my will was done.

    I would like to ask the permission of the programming language to make this WTF go away, though.

     

    I used to TA for CS101 and CS201 for my college and I can't tell you how many students would have been helped by the LET statement.  The idea of assignment always tripped up beginners, it seems so simple when you've been doing it for years, but if you just saw

    x = y 

    sitting on a line without any knowledge of how programming works, maybe just a basic idea of high school mathematics, I could see how some people could be confused, of course those people should come to grips with this quickly or leave the profession (or stay and produce more WTFs for our amusement).  

     Just wait till you show them "i = i + 1".



  • @dhromed said:

    It is that lack of awareness that puzzles me most.
     

    Considering the staggering amount of WTFery you can see just by walking out of your house and down the street, this should puzzle you not at all.



  • @Smitty said:

    Considering the staggering amount of WTFery you can see just by walking out of your house and down the street, this should puzzle you not at all.
     

    Perhaps.

    I will anxiously await the completion of the strange infrastructural item down the block, that might best be described as a "crossabout" or "rounding", with diminished right-turning capabilities for cyclists coming from the south.

    O_O



  • @dhromed said:

    with diminished right-turning capabilities for cyclists coming from the south.

    @dhromed said:

    O_O
    Oh, no!  Your bicycle has flipped over completely.  That really is a diminished capability.



  • @bstorer said:

    Oh, no!  Your bicycle has flipped over completely.  That really is a diminished capability.
     

    Ha! Ha!

    You are witty!

    I like this, for I am amused and also visibly smiling.

    :D



  • @AJAXdrivenBuzzwords said:

    but if you just saw

    x = y 

    sitting on a line without any knowledge of how programming works, maybe just a basic idea of high school mathematics, I could see how some people could be confused

    Well, there is the reason, then.  I started working with PCjr BASIC when I was 8, well before I could be confused by the similarity to an algebraic equation. 



  • @North Bus said:

    @AJAXdrivenBuzzwords said:

    but if you just saw

    x = y 

    sitting on a line without any knowledge of how programming works, maybe just a basic idea of high school mathematics, I could see how some people could be confused

    Well, there is the reason, then.  I started working with PCjr BASIC when I was 8, well before I could be confused by the similarity to an algebraic equation. 

     

    x = y never confused me. It was only when I went from Basic dialects to other languages (C/C++, Perl, Java, etc) and found out that my good old friend = might be =, ==, eq, .equals() or strcmp() (to name but a few) that my mind was blown.



  • @somedude said:

    I love ColdFusion, no really. I love developing applications using it. The way it prefixes everything with CF gets a little old, but for the most part, I love the language.
    Legacy code is, well, everyone knows. This one piece however, it made do a double take, then a triple take, shake my head again, then straight to this forum.

    <cfif ACCOUNT_TYPE eq "PC">
    	<cfset account_type = "PC">
    <cfelseif ACCOUNT_TYPE neq "PC">
    	<cfset account_type = "PC">
    </cfif>
    

    And no, variable names are not case sensitive in ColdFusion.

    EDIT: I write HTML but I don't remember how to escape the damned carats in it, Imatard.


    FTFY

    (they are angle brackets, anyway)



  • This is a caret: (you may need to zoom in)

    Or this: ^

    Or even this: <blink>|</blink>



  • @Thief^ said:

    This is a caret: (you may need to zoom in)

    Or this: ^

    Or even this: |

    Or this:



  • I'm not sure what that is, and I'm not sure I want to.



  • @Thief^ said:

    I'm not sure what that is, and I'm not sure I want to.

    It's Caret Top, silly!



  • Apparently it's an American plastic surgery victim.



  • @morbiuswilters said:

    @Thief^ said:

    This is a caret: (you may need to zoom in)

    Or this: ^

    Or even this: |

    Or this:

    Wow.  When did Kathy Griffin start working out?


  •  Woa. What kind of unhuman is that?



  • @morbiuswilters said:

    @Thief^ said:

    This is a caret: (you may need to zoom in)

    Or this: ^

    Or even this: |

    Or this:

    This is what happens when Low Self Esteem and Steroids mix.


  • @morbiuswilters said:

    Or this:
     

    You know what his name is?  Scott Thompson.  The same as that very gay Canadian actor from the Kids in the Hall.

    He said that's why he started going as Carrot Top.


  • Discourse touched me in a no-no place

    @belgariontheking said:

    @morbiuswilters said:

    Or this:
     

    You know what his name is?  Scott Thompson.  The same as that very gay Canadian actor from the Kids in the Hall.

    He said that's why he started going as Carrot Top.

    Is he any relation to Jocelyn Wildenstein?



  • @PJH said:

    Is he any relation to Jocelyn Wildenstein?
     

    ARRRRRRGHHHH

    I never heard of that woman (yes, I know, I live in a cave) and frankly, it was better that way.


  • Discourse touched me in a no-no place

    @b_redeker said:

    @PJH said:

    Is he any relation to Jocelyn
    Wildenstein?
     

    ARRRRRRGHHHH

    I never heard of that woman

    Wot? Do you live in a cave or something?...
    @b_redeker said:
    (yes, I know, I live in a cave) and frankly, it was better that way.
    Ah. I see you do. Better not Google Amanda LePore then.


  • @PJH said:

    Better not Google Amanda LePore then.

    I'd still hit it.



  • @morbiuswilters said:

    @PJH said:

    Better not Google Amanda LePore then.

    I'd still hit it.

    Well, sure, you would.  You'd hit anything that with a Y chromosome, like dhromed or btk's mom or that angry male gorilla down at the zoo.


  • @bstorer said:

    @morbiuswilters said:

    @PJH said:

    Better not Google Amanda LePore then.

    I'd still hit it.

    Well, sure, you would.  You'd hit anything that with a Y chromosome, like dhromed or btk's mom or that angry male gorilla down at the zoo.

    Wait, it's a tranny?  Aw fuck naw.



  • @morbiuswilters said:

    I only spray Y chromosomes--I don't accept them.<input name="ctl00$ctl00$bcr$bcr$ctl00$PostList$ctl33$ctl23$ctl01" id="ctl00_ctl00_bcr_bcr_ctl00_PostList_ctl33_ctl23_ctl01_State" value="value:Filed%20under%3A%20%3Ca%20href%3D%22%2Ftags%2FI%2Bonly%2Bspray%2BY%2Bchromosomes--I%2Bdon_2700_t%2Baccept%2Bthem_2E00_%2Fdefault.aspx%22%20rel%3D%22tag%22%3EI%20only%20spray%20Y%20chromosomes--I%20don't%20accept%20them.%3C%2Fa%3E" type="hidden">
     

    You bold-faced liar.

    >:\



  • @dhromed said:

    You bold-faced liar.
    Does that his lies are all in a boldface font for emphasis?  Or does it mean this:

    <b><b>



  • @bstorer said:

    Does that his lies are all in a boldface font for emphasis?  Or does it mean this:

    <b><b>

     

    I'm in two minds about you posting while drunk.

    To be clear; while you are drunk.


Log in to reply