• Pippo (unregistered)

    I refuse to write a frist comment! No! Nope!

  • Maciej (unregistered)

    I'll take "The Real WTFs" for $200.

  • BrainrotFromVB.Net (unregistered)

    This just makes med sad, especially since I frequently encounter similar frameworks. Situations where the developers don't have the toolbox or understanding of the tools in the toolbox so they write complex custom frameworks instead of using native tools. Usually they have studied design patterns, architecture etc. without bothering to learn the basic building blocks of the underlying language/runtime.

  • anon (unregistered)

    Exception AbortThreadSignalException at System.Thread.Multithread.Post: Frist already posted at HTML.Internal.Writebit at HTML.Internal.Writebyte at HTML.Internal.Parsechar at HTML.Internal.ParseLowercaseT at HTML.Internal.ParseLowercaseS at HTML.Internal.ParseLowercaseI at HTML.Internal.ParseLowercaseR at HTML.Internal.ParseLowercaseF at HTML.Internal.ParseSubstring at HTML.Internal.ParseString at HTML.Internal.ParseHTMLTag --snip---

  • Andrew (unregistered) in reply to Pippo

    Cross-thread operation not valid: Control 'Comment' accessed from a thread other than the thread it was created on.

  • (cs)

    OK, being C# illiterate I had to look it up, so I'm leaving it here for the next guy: C# Dictionaries are called Maps by Java folks and associative arrays by the rest of the world.

  • Joao Reis (unregistered)

    I don't like my car wheels being so... circular, it's the devils thing that i can go so fast. I what my wheel made by me, They should be Oval!

  • (cs) in reply to Unisol
    Unisol:
    OK, being C# illiterate I had to look it up, so I'm leaving it here for the next guy: C# Dictionaries are called Maps by Java folks and associative arrays by the rest of the world.
    You're doing God's work, son.
  • (cs) in reply to Unisol
    Unisol:
    OK, being C# illiterate I had to look it up, so I'm leaving it here for the next guy: C# Dictionaries are called Maps by Java folks and associative arrays by the rest of the world.

    The rest of the world already know all this.

    What with "dictionaries", "associative arrays" and "maps" all being interchangeable for any object class that solves "the dictionary problem", I would suggest that the word dictionary is actually pretty common.

    Wikipedia:
    In Smalltalk, Objective-C, .NET, Python, and REALbasic they are called dictionaries; in Perl and Ruby they are called hashes; in C++, Java, Go, Clojure and Scala they are called maps; in Common Lisp and Windows PowerShell they are called hash tables; in PHP all arrays can be associative; in JavaScript all objects behave as associative arrays; in Lua they are called tables; in Visual FoxPro they are called Collections
  • (cs)

    This is why encapsulation and design patterns are normally used for good, but can be used for evil in the hands of clueless madmen like The Abstractor.

  • cyborg (unregistered)

    This comment left abstract.

  • faoileag (unregistered) in reply to Joao Reis
    Joao Reis:
    I don't like my car wheels being so... circular, it's the devils thing that i can go so fast. I what my wheel made by me, They should be Oval!
    Nothing wrong with oval wheels, as long as the two radii are the same.

    The concept here is different. Think of a car. The engine's pistons drive a crankshaft, the motion of which is run through a gearbox and applied (sometimes via a differential) to the axles. That's several mechanical devices between engine and wheel. In Design Pattern parlance, these would be Adaptors, the final Adaptor being the bit where the wheel is screwed onto.

    In comes The Abstractor. He thinks that another Adaptor is needed in case he might ever want to replace the wheels with something completely different. He has several methods of converting rotation into motion in mind and, analyzing them, sees the reason for another Adaptor between his Adaptor and the desired rotation-converter. That would be the AdaptorAdaptor. And more thinking is done...

    In the end, you have a system like a big box of legos with which you could build virtually any rotation-converter to replace your wheels if you ever dug deep enough into the so-called "library" to understand it.

    "The Abstractor" was kind enough to provide a working demo, so that is pushed into production instead. Right before the bugs start coming in, "The Abstractor" leaves your company.

    I still tend to think he left because he knew that his library was unmaintainable.

  • (cs)

    Someone ought to have made that guys desk, salary and employment into abstract concepts.

  • John (unregistered) in reply to eViLegion

    In systemverilog they are called associative arrays In verilog they are called contents-addressable memory

  • Riley (unregistered)

    But... otherwise it's not enterprise enough!

  • (cs) in reply to eViLegion

    "Maps" (Java) are not necessarily hash tables. There are other implementation variants of Maps, too, e.g. TreeMap.

  • foo (unregistered) in reply to Joao Reis
    Joao Reis:
    I don't like my car wheels being so... circular, it's the devils thing that i can go so fast. I what my wheel made by me, They should be Oval!
    I originally designed my car with square wheels. Then I changed to triangular wheels. A great improvement: 25% less bumps!
  • QJo (unregistered) in reply to eViLegion
    eViLegion:
    Unisol:
    OK, being C# illiterate I had to look it up, so I'm leaving it here for the next guy: C# Dictionaries are called Maps by Java folks and associative arrays by the rest of the world.

    The rest of the world already know all this.

    What with "dictionaries", "associative arrays" and "maps" all being interchangeable for any object class that solves "the dictionary problem", I would suggest that the word dictionary is actually pretty common.

    Wikipedia:
    In Smalltalk, Objective-C, .NET, Python, and REALbasic they are called dictionaries; in Perl and Ruby they are called hashes; in C++, Java, Go, Clojure and Scala they are called maps; in Common Lisp and Windows PowerShell they are called hash tables; in PHP all arrays can be associative; in JavaScript all objects behave as associative arrays; in Lua they are called tables; in Visual FoxPro they are called Collections

    "Map" is actually the term used for this pattern in mathematics, otherwise known as a "function". Plug in a value, get another one out, which is how a map works.

    "Dictionary" is cute and understandable by muggles, but has more than three times the number of letters in it.

  • (cs) in reply to faoileag
    faoileag:
    a big box of legos

    There is no "s". Also, it's a name, so it should get a capital letter. All caps if you want to be totally proper, but most people get away with "Lego".

  • faoileag (unregistered) in reply to tin
    tin:
    faoileag:
    a big box of legos

    There is no "s". Also, it's a name, so it should get a capital letter. All caps if you want to be totally proper, but most people get away with "Lego".

    A strong case for login in to the TDWTF before writing a comment... if I had, I could now correct the post :-(

    Captcha: "tego". Probably just a strange coincidence...

  • Mike (unregistered) in reply to BrainrotFromVB.Net

    A big one I see is custom JSON serializers. They get to the point where they have some trivial problem nested several levels down a split(char) nest, just for completeness write their own XML parser too. REalize a lot of the functionality is duplicated so try to generize it then read the docs and discover that there is a JSONSerializer, and XMLSerialer in some random namespace of their tool.

    I think that is the problem with large frameworks (.Net I'm looking at you) sure it probably does it but what namespace? What do they call that feature? That is where being handy with Google is helpful but junior guys need to learn from a bit of pain that spending 30min searching for something is much better than spending "only" 15 min making it yourself since invariably there will be some subtle edge case they'll have to think about more, time for testing, generating testing data etc. vs taking something from a known tested source.

  • (cs) in reply to Mike
    Mike:
    time for testing
    Hahahahaha! Oh, you're serious? Let me laugh harder!
  • faoileag (unregistered) in reply to Mike
    Mike:
    but junior guys need to learn from a bit of pain that spending 30min searching for something is much better than spending "only" 15 min making it yourself since invariably there will be some subtle edge case they'll have to think about more, time for testing, generating testing data etc. vs taking something from a known tested source.
    But they won't get the pain. To get it there would need to be a code review by an experienced senior with the authority to tell the junior guy to redo it, but this time use <insert_existing_library> instead of something homegrown.

    With peer reviews, the junior guy might get some info ("Why didn't you use <insert_existing_library>?") but it needs a very eager junior guy to then say: "Oops, sorry, didn't know <insert_existing_library>, but I will redo the code using it".

    Oh, and of course it needs an organisation that gives him the time to redo his work.

  • sharkoftheday (unregistered) in reply to Unisol

    That's not entirely true, they're also NSDictionary/NSMutableDictionary to the Objective-C people.

    CAPTCHA: conventio Because Apple has their own special conventions that you must obey.

  • IN-HOUSE-CHAMP (unregistered)
    <sarcasm>

    Everyone knows that bigMomma would've helped Greg put it out of the park.

    </sarcasm>
  • ¯\(°_o)/¯ I DUNNO LOL (unregistered) in reply to Joao Reis
    Joao Reis:
    I don't like my car wheels being so... circular, it's the devils thing that i can go so fast. I what my wheel made by me, They should be Oval!
    Ovals? What a noob. The Abstractor can make them out of jigsaw puzzles!

    Everyone repeat after me: XML IS NOT A DATABASE.

  • (cs) in reply to foo
    foo:
    Joao Reis:
    I don't like my car wheels being so... circular, it's the devils thing that i can go so fast. I what my wheel made by me, They should be Oval!
    I originally designed my car with square wheels. Then I changed to triangular wheels. A great improvement: 25% less bumps!

    That is not possible. A trangle or square would give same number of bumps, but trangle will have to be replaced sooner.

    Try out this simple exercise: Take one trangle and move it along 1 feet of space. Count bumps. Take one square and move it along 1 feet of space. Count bumps.

    25% less is just PPT talk.

    PPT = Powerpoint (salesmen's presentation).

  • faoileag (unregistered) in reply to Nagesh
    Nagesh:
    Try out this simple exercise: Take one trangle and move it along 1 feet of space. Count bumps. Take one square and move it along 1 feet of space. Count bumps.

    25% less is just PPT talk.

    PPT = Powerpoint (salesmen's presentation).

    One square wheel, sidelength 11 inches: 1 bump. One triangular wheel, sidelength 5 inches: 2 bumps.

    That's 100% more bumps for the triangular wheel! You are right!

    I'll use gimp as the weapon of choice to fight the salesman's Powerpoint presentation...

  • JeffB (unregistered) in reply to Nagesh

    That depends on whether the one triangle and one square have the same perimeter.

  • (cs) in reply to Nagesh

    Did Nagesh just say something clever?

  • trololo (unregistered)

    Just think if it would be possible to use abstraction in real life.

  • Paul (unregistered)

    I do hope the "was a contractor" is now true and he has since been shown the door?

    Bad code and not learning when someone does it differently because of personal hangups about technologies is not good.

    Each method should be assessed and the better one chosen.

    His took 3 days, the new one 15 minutes. He should have learnt and if not been shown the door for wasting oxygen.

  • Paul (unregistered) in reply to Joao Reis
    Joao Reis:
    I don't like my car wheels being so... circular, it's the devils thing that i can go so fast. I what my wheel made by me, They should be Oval!

    You'll get seasick

  • synp (unregistered) in reply to Maciej
    Maciej:
    I'll take "The Real WTFs" for $200.

    What is C# ?

  • JPW (unregistered) in reply to Unisol

    They're called Hashes in Perl, and they are awesome.

  • (cs) in reply to synp
    synp:
    Maciej:
    I'll take "The Real WTFs" for $200.

    What is C# ?

    C# is lazy man's java! If you're lazy and want to code in language that used to resembel java, then C# is for you.

  • (cs)
    While The Abstractor tended to stay away from any code that involved business logic due to his time being too valuable to be spent researching anything

    Isn't the point to write business logic? After all, you can't make money by constructing a God object. Only code that actually solves a business problem is valuable. Sure, the God object might come in useful for solving a business problem; but the code should be driven by the business needs, and not just a thing in itself.

  • qbolec (unregistered)

    I am worried by the fact that the Abstractor has implemented MS.Internals.

    And that a solution which takes 15 minutes for something presumably O(n) with n=500000 was accepted.

  • (cs) in reply to Mike
    Mike:
    spending 30min searching for something is much better than spending "only" 15 min making it yourself since invariably there will be some subtle edge case they'll have to think about more, time for testing, generating testing data etc. vs taking something from a known tested source.

    YES!!! the best line of code you write is the one you DONT write (because you refactored the code, used a library call, pulled a bunch of code from the web, etc).

    A line of code you write needs to be tested (so unit tests, manual tests, etc); run through QA; bugs against the code need to be retested, a fix created, retested by QA, etc etc etc.

    A line of code you don't write needs none of these things.

    Consider (for c# people) writing a loop, vs using a linq statement. Linq provides tight, concise code with very little that could go wrong, vs a loop with lots of statements, control structures etc.

  • (cs)

    Converting a Java process to C# also takes it from 3 days to run down to 15 minutes.

  • (cs) in reply to DrPepper
    DrPepper:
    YES!!! the best line of code you write is the one you DONT write
    And sometimes that's the WORST line of code.
  • Josh (unregistered) in reply to Paul
    Paul:
    Joao Reis:
    I don't like my car wheels being so... circular, it's the devils thing that i can go so fast. I what my wheel made by me, They should be Oval!

    You'll get seasick

    Depending on the shape of the road, it could be smooth sailing.

  • n_slash_a (unregistered) in reply to faoileag
    faoileag:
    Joao Reis:
    I don't like my car wheels being so... circular, it's the devils thing that i can go so fast. I what my wheel made by me, They should be Oval!
    Nothing wrong with oval wheels, as long as the two radii are the same.

    The concept here is different. Think of a car. The engine's pistons drive a crankshaft, the motion of which is run through a gearbox and applied (sometimes via a differential) to the axles. That's several mechanical devices between engine and wheel. In Design Pattern parlance, these would be Adaptors, the final Adaptor being the bit where the wheel is screwed onto.

    In comes The Abstractor. He thinks that another Adaptor is needed in case he might ever want to replace the wheels with something completely different. He has several methods of converting rotation into motion in mind and, analyzing them, sees the reason for another Adaptor between his Adaptor and the desired rotation-converter. That would be the AdaptorAdaptor. And more thinking is done...

    In the end, you have a system like a big box of legos with which you could build virtually any rotation-converter to replace your wheels if you ever dug deep enough into the so-called "library" to understand it.

    "The Abstractor" was kind enough to provide a working demo, so that is pushed into production instead. Right before the bugs start coming in, "The Abstractor" leaves your company.

    I still tend to think he left because he knew that his library was unmaintainable.

    All minor WTFs. The really big WTF is that the next company to hire him won't both to ask for references to previous companies he worked for, and even if they did, wouldn't both to call said companies and ask if he was competent.
  • (cs) in reply to foo
    foo:
    Joao Reis:
    I don't like my car wheels being so... circular, it's the devils thing that i can go so fast. I what my wheel made by me, They should be Oval!
    I originally designed my car with square wheels. Then I changed to triangular wheels. A great improvement: 25% less bumps!
    Mythbusters tried square wheels. It was bumpy at slow speeds, somewhat better as they sped up.

    You know those big steel bolts that hold the wheel onto the end of the axle? About 30 seconds into the test one of them sheared, the wheel fell off, and the ride was over.

  • Sprinter (unregistered)

    So long as the code was hidden behind an abstraction, it's not so big a deal. Agile is about delivering value to the customer early. You can refactor for optimization later. This is Agile 101, folks.

  • (cs) in reply to foo
    foo:
    Joao Reis:
    I don't like my car wheels being so... circular, it's the devils thing that i can go so fast. I what my wheel made by me, They should be Oval!
    I originally designed my car with square wheels. Then I changed to triangular wheels. A great improvement: 25% less bumps!
    Then having an infinite number of "bumps" would be a 'bad thing', so no circular wheels for you!!
  • (cs) in reply to Sprinter
    Sprinter:
    So long as the code was hidden behind an abstraction, it's not so big a deal. Agile is about delivering value to the customer early. You can refactor for optimization later. This is Agile 101, folks.
    The records for each and every product needed to be updated every 30 minutes.

    I honestly don't want to know what your definition of "value" is, but I have a feeling it's similar to that of the Abstractor's.

  • Someone (unregistered) in reply to Unisol
    Unisol:
    OK, being C# illiterate I had to look it up, so I'm leaving it here for the next guy: C# Dictionaries are called Maps by Java folks and associative arrays by the rest of the world.
    "Dictionary" may be the least common of the three terms, but it's not even remotely uncommon, as others have said.
  • Someone (unregistered) in reply to QJo
    QJo:
    "Map" is actually the term used for this pattern in mathematics, otherwise known as a "function". Plug in a value, get another one out, which is how a map works.

    "Dictionary" is cute and understandable by muggles, but has more than three times the number of letters in it.

    You could make a case that the mathematical term isn't what you should use, because math folks don't have destructive updates and don't talk about things with side effects and such. Said another way, a CS "map" supports a wider range of operations than a math "map".

  • (cs) in reply to Someone
    Someone:
    QJo:
    "Map" is actually the term used for this pattern in mathematics, otherwise known as a "function". Plug in a value, get another one out, which is how a map works.

    "Dictionary" is cute and understandable by muggles, but has more than three times the number of letters in it.

    You could make a case that the mathematical term isn't what you should use, because math folks don't have destructive updates and don't talk about things with side effects and such. Said another way, a CS "map" supports a wider range of operations than a math "map".

    Indeed, not all math majors know what a KeyNotFoundException is.

Leave a comment on “From Three Days to 15 Minutes”

Log In or post as a guest

Replying to comment #:

« Return to Article