• Java Refugee (unregistered) in reply to Java Refugee

    I mean this move: http://bit.ly/aggHw7

  • Bim Job (unregistered) in reply to Buddy
    Buddy:
    Bim Job:
    Entirely different from Cobol, Algol, Pascal/ModulaX, dum dum dum Java, C#, and Pascal then.

    Not to mention PHP (which is woeful) and Perl (which is the very definition of <100%).

    You got a problem with this?

    |S| does not have an impact on whether A is a member of S.

    Well, you've got me on set theory there.

    Want to try refuting my supposition that "Bloody hell, C++ can go fuck itself" is plain and entirely un-mathematical bigotry?

    (The last incidence of "Pascal" was meant to be "Python," btw.)

    Oh noes, we can't have programmers using a language without 100% certifiable understanding. That would be naughty! And don't ever, ever, mention libraries, because them's an entirely different kettle of squid.

    Fuck it. I use C++ and it works. I'm probably at the 95% level. I also use Perl and Python, and I'm somewhere around the 85% level (which is possibly above the median).

    Just goddamn test the stuff, for Christ's sake. Failing that, employ an infallible genius.

  • fanha (unregistered)

    Conjunction Junction, why won't you work with this function?

  • Silverhill (unregistered) in reply to Anon
    Anon:
    Hope there's no October Road in Scunthorpe.
    Here's another one for the Clbuttic Filter. It should, in order to be Teddibly Propah, be "Svaginahorpe".

    CAPTCHA: minim -- I'd rather have a dram, at least; preferably a gill or even a pint...

  • FromCanada (unregistered)

    Wake me up when October ends. (I have to turn right.)

  • (cs)

    Well this is some of the worst validation code ever. The biggest WTF is that the month array is broken into four lines! Why? It should fit on one or two.

  • A Pedantic Bastard (unregistered)
    I’m not exactly sure what thought process lead to this

    IT'S "LED". NOT "LEAD". "LED".

    Normally I wouldn't be so picky, but 1) I see this mistake so often I want to bash my head in the wall, and 2) none of you guys seemed to even notice in over 100 comments, even though some of you have picked apart the same sentence.

    Here's a table, because I'm convinced that soon the world is going to need one:

    Spelling | Pronunciation | Meaning
    -----------------------------------
      lead   |     leed      | present tense of verb "to lead"
      led    |     led       | past tense of verb "to lead"
      lead   |     led       | a poisonous metal, element #82, symbol Pb
      LED    |   el ee dee   | light-emitting diode
      Led    |     led       | a kind of zeppelin from 1968-1980
    
  • PRM (unregistered)

    Speaking of careless substitutions, there is a Lane Street close to where I live; I've seen it rendered on a map as "Ln. St."

  • fjf (unregistered) in reply to lolwtf
    lolwtf:
    Well this is some of the worst validation code ever. The biggest WTF is that the month array is broken into four lines! Why? It should have been broken into twelve.
    FTFY. (Not paid by LOC?)
  • fjf (unregistered) in reply to A Pedantic Bastard
    A Pedantic Bastard:
    I’m not exactly sure what thought process lead to this

    IT'S "LED". NOT "LEAD". "LED".

    Normally I wouldn't be so picky, but 1) I see this mistake so often I want to bash my head in the wall, and 2) none of you guys seemed to even notice in over 100 comments, even though some of you have picked apart the same sentence.

    Come on, just led it be.
  • Buddy (unregistered) in reply to Bim Job
    Bim Job:
    Well, you've got me on set theory there.

    Want to try refuting my supposition that "Bloody hell, C++ can go fuck itself" is plain and entirely un-mathematical bigotry?

    (The last incidence of "Pascal" was meant to be "Python," btw.)

    Oh noes, we can't have programmers using a language without 100% certifiable understanding. That would be naughty! And don't ever, ever, mention libraries, because them's an entirely different kettle of squid.

    Fuck it. I use C++ and it works. I'm probably at the 95% level. I also use Perl and Python, and I'm somewhere around the 85% level (which is possibly above the median).

    Just goddamn test the stuff, for Christ's sake. Failing that, employ an infallible genius.

    S = set of languages that can go fuck themselves, according to Buddy

    A = C++, a member of S

    whether |S| > |{A}| has no impact on A being a member of S.

    Also,

    http://www.sciencedirect.com/science?_ob=ArticleURL&_udi=B6V5T-4X8BPBV-1&_user=10&_coverDate=01%2F31%2F2010&_rdoc=1&_fmt=high&_orig=search&_sort=d&_docanchor=&view=c&_searchStrId=1232061545&_rerunOrigin=google&_acct=C000050221&_version=1&_urlVersion=0&_userid=10&md5=b7f43c4c3a4e85ea7b8070a83f100ef2

    or if it breaks, this links to the same:

    http://tinyurl.com/ybegrow

    Leave it to the reader to make the appropriate analogy.

  • (cs) in reply to toshir0
    toshir0:
    Couldn't it also be written in D ? (although this one hasn't been used a lot ^^)

    I'd prefer to see it ported into PL/2.

    Or Fivetran.

  • Aaron Silver (unregistered) in reply to Anon Ymous
    Anon Ymous:
    Clearly, the addresses are copied and pasted from an Excel spreadsheet, which has the annoying habit of converting things that are not dates to date format.
    Bingo. It was done by a support programmer in response to a helpdesk call and bugged me enough that I correlated the cvs history with the hd calls that he was dealing with at the time. Its a java process that imports excel spreadsheets submitted by the user and the call was to do with addresses like: 12/5 Whatever Street Somewhere ending up in the database as 12/May Whatever Street Somewhere Rather than fix the problem in the import stage they decided to put this in at the validation stage.
  • (cs) in reply to A Pedantic Bastard
    A Pedantic Bastard:
    Normally I wouldn't be so picky, but 1) I see this mistake so often I want to bash my head in the wall, and 2) none of you guys seemed to even notice in over 100 comments, even though some of you have picked apart the same sentence.

    Here's a table, because I'm convinced that soon the world is going to need one:

    Spelling | Pronunciation | Meaning
    -----------------------------------
      lead   |     leed      | present tense of verb "to lead"
      led    |     led       | past tense of verb "to lead"
      lead   |     led       | a poisonous metal, element #82, symbol Pb
      LED    |   el ee dee   | light-emitting diode
      Led    |     led       | a kind of zeppelin from 1968-1980
    
    English is insane. Why not make the same table with "read"?
    Spelling | Pronunciation | Meaning
    ---------|---------------|---------
    read     | reed          | present tense of verb "to read"
    read     | red           | past tense of verb "to read"
    red      | red           | colo(u)r
    Red      | red           | some kind of zebra
    
  • (cs) in reply to toth
    toth:
    I suspect the intent of this code is to scold the user if they accidentally fill in the address line 1 with a date (i.e. the field above is a date field and they occasionally run into issues with people misaligning their information).

    I think they're importing data from a flat text file (CSV) and they check if the fields are in the correct column.

  • Anonymous (unregistered) in reply to schmitter
    schmitter:
    Two things, first I can't remember the last time I had to type in a month into any form, since they are all pull down selections, making this whole thing null and void.
    But this wasn't a month field, it was an address field. Are you suggesting they should provide a drop-down that contains every street name, every city name and every country name in the world? How else would you enter an address with drop-downs? I'm I missing something or are you?
  • SR (unregistered) in reply to bjolling
    bjolling:
    English is insane. Why not make the same table with "read"?
    Spelling | Pronunciation | Meaning
    ---------|---------------|---------
    read     | reed          | present tense of verb "to read"
    read     | red           | past tense of verb "to read"
    red      | red           | colo(u)r
    Red      | red           | some kind of zebra
    

    It's true. In the UK there are 8 different ways to pronounce "ough". A prize for whoever gets em all! ;o)

  • Anonymous (unregistered) in reply to bjolling
    bjolling:
    English is insane. Why not make the same table with "read"?
    Spelling | Pronunciation | Meaning
    ---------|---------------|---------
    read     | reed          | present tense of verb "to read"
    read     | red           | past tense of verb "to read"
    red      | red           | colo(u)r
    Red      | red           | some kind of zebra
    
    Or even "bread":
    Spelling | Pronunciation | Meaning
    ---------|---------------|---------
    bread    | bred          | present tense of verb "to bread"
    breaded  | bred-ed       | past tense of verb "to bread"
    bred     | bred          | verb to make baby
    breded   | bred-ed       | past tense verb to made baby
    
  • Paul (unregistered) in reply to Buddy
    Buddy:
    Bloody hell, C++ can go fuck itself. Is there anyone on the planet who understands and uses 100% of its features? It's like marching the Chinese in single file, you'll never reach the end.

    I suggest you learn x86 assembler then - that has a much smaller set of operations (which doesn't change very often), which you can use to do ANYTHING that C++ (any variant) (or C#, PHP, Lisp, Java, Prolog or any other programming language ) can do. That should be much easier...

  • AdT (unregistered) in reply to Anonymous
    Anonymous:
    That first IsNullOrEmpty prevents the block from executing if nothing has been entered into the address Line1 field.

    That is incorrect, you let your expectations interfere with your perception.

    There are some interesting psychological experiments about this phenomenon… asked to read grammatically incorrect sentences like "The early bird catches the the worm." aloud, most people will correct the mistake without even consciously noticing.

    Anonymous:
    Not sure what you mean about every string containing the empty string.

    Obviously just what it says, in pseudo predicate logical form: For each s in the set of all strings holds: s.Contains("")

  • Anonymous (unregistered) in reply to AdT
    AdT:
    Anonymous:
    That first IsNullOrEmpty prevents the block from executing if nothing has been entered into the address Line1 field.

    That is incorrect, you let your expectations interfere with your perception.

    There are some interesting psychological experiments about this phenomenon… asked to read grammatically incorrect sentences like "The early bird catches the the worm." aloud, most people will correct the mistake without even consciously noticing.

    Anonymous:
    Not sure what you mean about every string containing the empty string.

    Obviously just what it says, in pseudo predicate logical form: For each s in the set of all strings holds: s.Contains("")

    If you bothered to read the previous comments you would realise that your remarks are entirely superfluous to requirements.

  • Sam (unregistered) in reply to bjolling
    bjolling:
    English is insane. Why not make the same table with "read"?
    Spelling | Pronunciation | Meaning
    ---------|---------------|---------
    read     | reed          | present tense of verb "to read"
    read     | red           | past tense of verb "to read"
    red      | red           | colo(u)r
    Red      | red           | some kind of zebra
    

    [code] Spelling | Pronunciation | Meaning ---------|---------------|-------- Reading | reeding | Present participle of verb "to read" Reading | redding | Town in southern England

  • fjf (unregistered) in reply to AdT
    AdT:
    That is incorrect, you let your expectations interfere with your perception.

    There are some interesting psychological experiments about this phenomenon… asked to read grammatically incorrect sentences like "The early bird catches the the worm." aloud, most people will correct the mistake without even consciously noticing.

    Which is why proofreading is hard. (Which is actually not so OT on this site ...)

  • Kef Schecter (unregistered) in reply to Paul
    Paul:
    I suggest you learn x86 assembler then - that has a much smaller set of operations (which doesn't change very often), which you can use to do ANYTHING that C++ (any variant) (or C#, PHP, Lisp, Java, Prolog or any other programming language ) can do.

    Anything? What about "run on multiple platforms, regardless of CPU"? ;)

    Now if we were talk about, say, Parrot assembly language...

  • Pragmatopian (unregistered) in reply to bannedfromcoding
    bannedfromcoding:
    Pragmatopian:
    <Useless Trivia>

    Other Prague street names doubling up as dates include:

    5 Kvetna (5 May)

    and

    17 Listopadu (17 November.

    Various streets are named after public holidays.

    </Useless Trivia>

    "Kvetna" would be "of April", I'm quite sure of that. Even tho I don't speak Czech, only a similiar Slavic language.

    Nope. Definitely May in Czech.

  • djb (unregistered)

    WTF!

  • Andrew (unregistered) in reply to A Pedantic Bastard
    A Pedantic Bastard:
    I’m not exactly sure what thought process lead to this

    IT'S "LED". NOT "LEAD". "LED".

    Normally I wouldn't be so picky, but 1) I see this mistake so often I want to bash my head in the wall, and 2) none of you guys seemed to even notice in over 100 comments, even though some of you have picked apart the same sentence.

    Here's a table, because I'm convinced that soon the world is going to need one:

    Spelling | Pronunciation | Meaning
    -----------------------------------
      lead   |     leed      | present tense of verb "to lead"
      led    |     led       | past tense of verb "to lead"
      lead   |     led       | a poisonous metal, element #82, symbol Pb
      LED    |   el ee dee   | light-emitting diode
      Led    |     led       | a kind of zeppelin from 1968-1980
    

    Well sed.

  • (cs) in reply to Paul
    Paul:
    Buddy:
    Bloody hell, C++ can go fuck itself. Is there anyone on the planet who understands and uses 100% of its features? It's like marching the Chinese in single file, you'll never reach the end.

    I suggest you learn x86 assembler then - that has a much smaller set of operations (which doesn't change very often), which you can use to do ANYTHING that C++ (any variant) (or C#, PHP, Lisp, Java, Prolog or any other programming language ) can do. That should be much easier...

    rep++

    More features = more ease of use, not less. If you don't need a feature, don't use it. No need to feel threatened.

  • fjf (unregistered) in reply to frits
    frits:
    Paul:
    Buddy:
    Bloody hell, C++ can go fuck itself. Is there anyone on the planet who understands and uses 100% of its features? It's like marching the Chinese in single file, you'll never reach the end.

    I suggest you learn x86 assembler then - that has a much smaller set of operations (which doesn't change very often), which you can use to do ANYTHING that C++ (any variant) (or C#, PHP, Lisp, Java, Prolog or any other programming language ) can do. That should be much easier...

    rep++

    More features = more ease of use, not less. If you don't need a feature, don't use it. No need to feel threatened.

    I guess they feel threatened because it makes it harder for them to put "100% C++" on their resumes. Also more ease of use = less job security.

  • Buddy (unregistered) in reply to fjf

    Regarding more features:

    http://www.sciencedirect.com/science?_ob=ArticleURL&_udi=B6V5T-4X8BPBV-1&_user=10&_coverDate=01%2F31%2F2010&_rdoc=1&_fmt=high&_orig=search&_sort=d&_docanchor=&view=c&_searchStrId=1232061545&_rerunOrigin=google&_acct=C000050221&_version=1&_urlVersion=0&_userid=10&md5=b7f43c4c3a4e85ea7b8070a83f100ef2

    or if it breaks, this links to the same:

    http://tinyurl.com/ybegrow

    [In summary, you're wrong.]

    Remember maintenance is where most of the time and cost of software eventually ends.

    If it takes more effort to debug than to write, then by definition no one can debug his cleverest code.

    Does anyone know who will be maintaining their stuff? Likely someone not as smart as you.

    If you use a feature that's not within one sigma of your community, it will get removed. The farther it is away from the mean the more aggressively it will be brought in line.

    Your efficient overloaded and polymorphic class structure? Commented out and replaced by static functions. Your amazingly compact and efficient STL code? Commented out and replaced by char, int and void *.

    In short - K.I.S.S.

  • (cs) in reply to Buddy
    Buddy:
    Regarding more features:

    http://www.sciencedirect.com/science?_ob=ArticleURL&_udi=B6V5T-4X8BPBV-1&_user=10&_coverDate=01%2F31%2F2010&_rdoc=1&_fmt=high&_orig=search&_sort=d&_docanchor=&view=c&_searchStrId=1232061545&_rerunOrigin=google&_acct=C000050221&_version=1&_urlVersion=0&_userid=10&md5=b7f43c4c3a4e85ea7b8070a83f100ef2

    or if it breaks, this links to the same:

    http://tinyurl.com/ybegrow

    [In summary, you're wrong.]

    Remember maintenance is where most of the time and cost of software eventually ends.

    If it takes more effort to debug than to write, then by definition no one can debug his cleverest code.

    Does anyone know who will be maintaining their stuff? Likely someone not as smart as you.

    If you use a feature that's not within one sigma of your community, it will get removed. The farther it is away from the mean the more aggressively it will be brought in line.

    Your efficient overloaded and polymorphic class structure? Commented out and replaced by static functions. Your amazingly compact and efficient STL code? Commented out and replaced by char, int and void *.

    In short - K.I.S.S.

    You're right. C++ was a huge failure.

  • fjf (unregistered) in reply to Buddy
    Buddy:
    Regarding more features:

    http://www.sciencedirect.com/science?_ob=ArticleURL&_udi=B6V5T-4X8BPBV-1&_user=10&_coverDate=01%2F31%2F2010&_rdoc=1&_fmt=high&_orig=search&_sort=d&_docanchor=&view=c&_searchStrId=1232061545&_rerunOrigin=google&_acct=C000050221&_version=1&_urlVersion=0&_userid=10&md5=b7f43c4c3a4e85ea7b8070a83f100ef2

    or if it breaks, this links to the same:

    http://tinyurl.com/ybegrow

    Did you actually read the arcticle or just googled for a few seemingly relevant keywords? Just reading the abstract suggests to me that it's not so relevant: "post-choice satisfaction" is not really the main goal in programming, among other things.
    Buddy:
    [In summary, you're wrong.]

    Yeah, right.

    Buddy:
    Remember maintenance is where most of the time and cost of software eventually ends.

    If it takes more effort to debug than to write, then by definition no one can debug his cleverest code.

    Does anyone know who will be maintaining their stuff? Likely someone not as smart as you.

    If you use a feature that's not within one sigma of your community, it will get removed. The farther it is away from the mean the more aggressively it will be brought in line.

    Your efficient overloaded and polymorphic class structure? Commented out and replaced by static functions. Your amazingly compact and efficient STL code? Commented out and replaced by char, int and void *.

    In short - K.I.S.S.

    I don't think this means what you think it does. A hand-made list using void * etc. is hardly easier to write, leave alone to debug (think memory leaks, stray pointers, ...) than just using an STL list. Just because the STL containers are internally more complex doesn't mean they're harder to use -- quite the opposite in fact.

  • Buddy (unregistered) in reply to fjf

    Think outside the box.

  • fjf (unregistered) in reply to Buddy
    Buddy:
    [quote irrelevant paper]

    ... within one sigma of your community ...

    Think outside the box.

    [other buzzwordy meaningless phrases]

    Damn, I fell for a chatbot!
  • (cs) in reply to A Pedantic Bastard
    A Pedantic Bastard:
    Spelling | Pronunciation | Meaning
    -----------------------------------
      lead   |     leed      | present tense of verb "to lead"
      led    |     led       | past tense of verb "to lead"
      lead   |     led       | a poisonous metal, element #82, symbol Pb
      LED    |   el ee dee   | light-emitting diode
      Led    |     led       | a kind of zeppelin from 1968-1980
      lead   |     leed      | noun; a wire
      lead   |     leed      | adjective (i.e. the lead singer)
      lead   |     leed      | abstract noun ("I have a lead over the second-place person")
    

    The Oxford dictionary has a good few more, too...

  • Dave Parker (unregistered)

    "... instead, they&rsqou;re painted orange .” Please learn how to use apostrophe's when putting 'text' on a a 'website'. Also, please learn how to use apostrophe's when putting 'text' on a a 'website'.

  • AdT (unregistered) in reply to Anonymous
    Anonymous:
    If you bothered to read the previous comments you would realise that your remarks are entirely superfluous to requirements.

    If you had bothered to quote the comment(s) that you think made mine superfluous then we would have something concrete to talk about. However, I'm not in the mood for trying to read your mind and, besides, there are comments which indicate that the meaning of string containment was still misunderstood, e.g.

    toth:
    In some sense it's trivially true that it contains the empty string (that is, you can find a substring that matches the empty string--take any zero-length substring), but it's not necessarily a useful test. From what you said, it seems that it returns false.

    With respect to this comment: If it's trivially true, the function should return true, not false. Also, as a programmer, I like to rely on invariants, e.g. (a + b).Contains(b) should always be true. With b="", it follows that for any string a, a.Contains("") should be true. Fortunately, the programming platforms I know of behave in this way.

    The other remark was, admittedly, mostly for sharing the anecdote about the reading experiments which I hoped someone might appreciate.

    Rootbeer:
    1. Non-existent character entity 'rsqou' 2. Even if it were spelled correctly, it should be an 'apos' rather than an 'rsquo'. 3. Superfluous space before terminating period. 4. Metaphor nonsensical.
    1. Use of triple dots instead of a horizontal ellipsis. That is so ASCII… No, I'm just kidding. But I like the ellipsis character anyway.
  • (cs)

    I live in the Jan Steenstraat!

  • Tim Rowe (unregistered) in reply to Anon

    I have friends in Mayfield Road.

  • (cs) in reply to Pragmatopian
    Pragmatopian:
    bannedfromcoding:

    "Kvetna" would be "of April", I'm quite sure of that. Even tho I don't speak Czech, only a similiar Slavic language.

    Nope. Definitely May in Czech.

    O_o

    Czech: Leden | Únor | Březen | Duben | Květen | Červen | Červenec | Srpen | Září | Říjen | Listopad | Prosinec

    Polish: styczeń • luty • marzec • kwiecień • maj • czerwiec • lipiec • sierpień • wrzesień • październik • listopad • grudzień

    As both the names (probably) refer to flowers, hmm... maybe they get full-blown Spring a bit latter in the South? (Sounds unlikely.)

    Gah, the interlaguage absurdity, it burnssss... dies

  • (cs) in reply to fjf
    fjf:
    Buddy:
    [quote irrelevant paper]

    ... within one sigma of your community ...

    Think outside the box.

    [other buzzwordy meaningless phrases]

    Damn, I fell for a chatbot!

    See what happens when people post their Captchas.

  • JL (unregistered) in reply to Nibh

    Nor drinking milk from a saucer!

  • anon (unregistered) in reply to softwarebear

    Re rsquo: which raises the question as to why a simple ASCII apostrophe was not sufficient.

    Stupid smart quotes. Bah.

  • (cs) in reply to Anonymous
    Anonymous:
    bjolling:
    English is insane. Why not make the same table with "read"?
    Spelling | Pronunciation | Meaning
    ---------|---------------|---------
    read     | reed          | present tense of verb "to read"
    read     | red           | past tense of verb "to read"
    red      | red           | colo(u)r
    Red      | red           | some kind of zebra
    
    Or even "bread":
    Spelling | Pronunciation | Meaning
    ---------|---------------|---------
    bread    | bred          | present tense of verb "to bread"
    breaded  | bred-ed       | past tense of verb "to bread"
    bred     | bred          | verb to make baby
    breded   | bred-ed       | past tense verb to made baby
    
    TRWTF is you people putting this stuff on your databases.
  • Peter da Silva (unregistered) in reply to Seminymous Coward

    But that's what makes it work, since it means this code will only fire if someone has filled in the street address but left the first line blank!

  • iMalc (unregistered)

    I actually happen to own a rental property on May street. (Actually June street comes off that street also) Man are our tennants screwed or what.

  • (cs) in reply to Anonymous
    Anonymous:
    bjolling:
    English is insane. Why not make the same table with "read"?
    Spelling | Pronunciation | Meaning
    ---------|---------------|---------
    read     | reed          | present tense of verb "to read"
    read     | red           | past tense of verb "to read"
    red      | red           | colo(u)r
    Red      | red           | some kind of zebra
    
    Or even "bread":
    Spelling | Pronunciation | Meaning
    ---------|---------------|---------
    bread    | bred          | present tense of verb "to bread"
    breaded  | bred-ed       | past tense of verb "to bread"
    bred     | bred          | verb to make baby
    breded   | bred-ed       | past tense verb to made baby
    
    How is "to made babby" formed? How verb get conjugate?
  • (cs) in reply to Paul
    Paul:
    Buddy:
    Bloody hell, C++ can go fuck itself. Is there anyone on the planet who understands and uses 100% of its features? It's like marching the Chinese in single file, you'll never reach the end.

    I suggest you learn x86 assembler then - that has a much smaller set of operations (which doesn't change very often), which you can use to do ANYTHING that C++ (any variant) (or C#, PHP, Lisp, Java, Prolog or any other programming language ) can do. That should be much easier...

    That is in fact not true. There's a whole bunch of things that cannot be done at all in most assembly languages! Anything that involves nontrivial computation on constant addresses that get assigned at link time is pretty much a no-no. Most object file formats do not have a facility for storing abstract syntax trees for constant address expressions. Such things occasionally come in handy when you want to, say, load a nibble of the address of some buffer into, say, a weirdly-aligned DMA start/stop register. This mostly applies to 8 bit micros, but is a real problem. Instead of doing this:

    .segment data
    buffer1 ds 100
    buffer2 ds 100
    .segment code
    ; DMAH contains high address nibbles for both DMA channels
    mov dmah, #(((buffer1>>8)<<4)&F0h) | ((buffer2>>8)&Fh)

    you have to pretend to be a linker and do something like this:

    .segment data
    org 0
    buffer1 ds 100
    org 100
    buffer2 ds 100
    .segment code
    mov dmah, #(((buffer1>>8)<<4)&F0h) | ((buffer2>>8)&Fh)

    There are assemblers out there that will accept code from the first snippet and silently produce invalid object code, whereas the second snippet produces correct object code as expected.

    Admittedly, some micro designer (Zilog, cough, cough) was hard pressed to save a whopping 4 bits in a register somewhere, but well -- this just proves the point that assemblers are not all that almighty at all.

    You can generate arbitrary machine code with an assembler only if you hand-assemble it using db statements. The more you depend on the assembler and linker, the less flexible it gets. There are plenty of embedded systems where you pretty much have to pre-generate constant tables (bunches of lines with EQUs) using a separate script, since the macro assembler may be too dumb to do something that is commonplace in a higher level language such as LISP!

    So it's not generally true that assembler gives you more power than a higher level language would. Or one could argue that LISP is, at a certain level, lower level than assembly. Well, it certainly exposes more of the underlying language machinery should you need it.

    What other languages, besides LISP, provide for useful, imperative-style compile-time computation? By "imperative style" I mean no hacks like C++ metaprogramming, please. I know of D's compile-time computation, but that's the only thing that comes to my mind so far.

  • (cs) in reply to fjf
    Buddy:
    Remember maintenance is where most of the time and cost of software eventually ends.

    If it takes more effort to debug than to write, then by definition no one can debug his cleverest code.

    Does anyone know who will be maintaining their stuff? Likely someone not as smart as you.

    If you use a feature that's not within one sigma of your community, it will get removed. The farther it is away from the mean the more aggressively it will be brought in line.

    Your efficient overloaded and polymorphic class structure? Commented out and replaced by static functions. Your amazingly compact and efficient STL code? Commented out and replaced by char, int and void *.

    In short - K.I.S.S.

    I don't think you know what K.I.S.S. means. It doesn't mean "keep it stupid, stupid". That's what you imply, though. If the "community" of developers I'd have to deal with doesn't get rather basic C++ constructs, then I don't want to have anything to do with them. They need to educate themselves, or get fired. There's plenty of good books out there that pretty much hammer into your head what good C++ practices are, and how you should be using the constructs of the language so that your code is maintainable. Either you're a C programmer or a C++ programmer. If the code you produce is C even though it's supposed to be C++, then you're the wrong person for the job.

    What you propose is bastardization and reducing to the least common denominator. If other developers can't keep up with good practices, they have no place in the company IMHO. We're not talking about doing template metaprogramming here. What you describe is pretty much everyday stuff that noone thinks about too much. Take a look at LyX code base -- just off the top of my head. Noone uses char, int and void* there just because they are too stupid to do the right thing.

    I do understand that many companies have developer staff that just isn't up to par with their tools, and plays pretend C++ game. That's no excuse. Yes, it does happen, perhaps too commonly for anyone's liking, but that cannot and should not be called "keeping it simple". What you describe is "keeping it stupid". Stupid people should be fired.

  • Josh (unregistered)

    There are 56,463 people in the US and Canada who live on streets named after months. There are 24 people who live on a street named October Road. For each month:

    January: 1242 February: 392 March: 4519 April: 6620 May: 24944 June: 9745 July: 958 August: 3839 September: 1780 October: 1309 November: 714 December: 401

Leave a comment on “October Road”

Log In or post as a guest

Replying to comment #:

« Return to Article