Skip to content

The Weird and The Wonderful

It was the best of code, it was the worst of code. Coding Horrors, Worst Practices, and flashes of brilliance

This category can be followed from the open social web via the handle the-weird-and-the-wonderful@forum.codeproject.com

1.8k Topics 20.7k Posts
  • VB6: Graphics

    graphics game-dev css help
    8
    0 Votes
    8 Posts
    51 Views
    J
    That is just the learning process. If we did not make mistakes then we would not learn anything or for that matter – get anything done. Programmers point of view: 1) Think. 2) Write something based on ideas. 3) Note possible problems – Think. 4) Rewrite – based on what you learned. 5) Think – are you satisfied (learned enough). 6) Make notes – consider improvements. Management point of view: 1) Think. 2) Write something based on ideas. 3) Does it work? 4) If yes! You are finished – because it works. 5) Stop thinking – for self preservation of sanity. 6) Recommendation – make personal notes – and go on to next subject. Note: If you do not inform management until step 4 in “Programmers point of view" is complete then you will have a better (more reliable) product. But if you must show progress based on the “Management point of view” then expect to be cut off at the knees, and learn to live with it. INTP "Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra
  • 0 Votes
    31 Posts
    286 Views
    J
    Thanks! I can never remember which systems use character sizes other than 8-bits, I just remember there are a few out there. Of course I know nothing more than that or even what language compilers support those systems. INTP "Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra
  • Could this copy/paste redundancy prove costly?

    question csharp
    7
    0 Votes
    7 Posts
    47 Views
    V
    I just posted a reply to the other thread in this message, which I guess applies to this too. http://www.codeproject.com/Feature/HallOfShame.asp?msg=2053494#xx2053494xx[^] Vasudevan Deepak Kumar Personal Homepage Tech Gossips
  • DataBase Selects and other lovely things :)

    database regex
    9
    0 Votes
    9 Posts
    58 Views
    M
    Or.... just write a function to check all your input fields before processing them? Little things... like making sure numeric values are in "int" and strings are properly quoted out and escaped before concatenating the final SQL string works fine too. Just gotta be careful.
  • what is the difference in one _gc * and two _gc *?

    question
    10
    0 Votes
    10 Posts
    55 Views
    P
    Hmmm. Coders from the hood. It's got a certain appeal to it.:-D Deja View - the feeling that you've seen this post before.
  • c++ constructor

    c++
    8
    0 Votes
    8 Posts
    51 Views
    K
    In good forums I'm used to log in, when you post a URL, it is automatically parsed and made clickable. Perhaps a matter of forum settings, I don't know... Kochise In Code we trust !
  • _GC pointers [modified]

    question c++ tutorial
    2
    0 Votes
    2 Posts
    13 Views
    M
    I don't have an answer for you, but to keep it on-topic, this confusing overloading of the meaning of * was a major flaw in MC++, and it's been fixed in C++/CLI by denoting GC handles with ^ instead. --Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ Dunder-Mifflin, this is Pam.
  • Strong Typing

    42
    0 Votes
    42 Posts
    667 Views
    R
    in the old vb6 days ctrl-f2 used to take you to a definition and ctrl-shift-f2 used to take you back to where you were before. I'm sure this must be implemented in .net but i've never found out how to do it. I used to use it all the time. Russ
  • Get rid of this programmer

    49
    0 Votes
    49 Posts
    575 Views
    L
    Functionally the code would work. Just weird, when some smarty-pants with a 4-years information system B.-degree and some >=3-years 'experience' codes crap like that. Imagine then, 4 out of 5 (internal) programmers at the company where i was emplyed, churned out crap like that, for a complex financial system. Mind you, the lead programmer was creating such code himself. I have, in my 9 years as developer came across countless exampless of coding horrors, which are created to show-off their 'skill'. Tom Moore wrote: I can't see anything wrong with that code. Attitudes like that stop people like me (Students from college) from becoming developers, because no-one wants a newbie. Catch 22. met vriendelijke groet, Michiel Erasmus
  • The Horror!

    help database com design
    11
    0 Votes
    11 Posts
    51 Views
    J
    That is the wave of the future – coding without understanding. Modern MS languages are good for business – but it requires real programmers to create the frame works first. What that means is that people who understands how it all works decreases and the number of people who know how to use it increases. Translation: If you know how it all works there are fewer jobs – If you know how to use it there are lots of jobs. INTP "Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra
  • More Than One Way To Skin A Cat

    database sysadmin testing beta-testing tools
    6
    0 Votes
    6 Posts
    62 Views
    J
    And yet not one word on cat skinning. ;P
  • String Error

    com data-structures testing beta-testing tools
    9
    0 Votes
    9 Posts
    65 Views
    M
    A possible problem with the code is that the programmer seemed to be sizing the array in a very arbitrary way. Unless of course "This is a test" is the max intended size of the array and the rest of the code isn't going over the array size. Plus it forces every programmer who looks at the code to start counting on his fingers, getting to 10 and saying, "damn" before starting over because he couldn't remember if he included the space between 'this' and 'is' ;v)
  • Joy!

    csharp database sql-server sysadmin
    15
    0 Votes
    15 Posts
    76 Views
    J
    Smart, very smart, sounds similar to my story. Quit smoking for 2 years and then started back up to piss someone off, my Ex. At 37 I was still playing pool and drinking every night for hours, but I was no longer enjoying that. I still like my glass of bourbon or some beer in the evenings, but rarely go out any more because I fall back into the old pattern and tend to stay tell closing. Suggestion: Take up running or long vigorous walks, during either and afterwards you normally do not want a smoke. It also gives you time to think without any distractions or you can just observe the world around, very relaxing if you ignore the garbage people leave along the roads and paths. Good Luck! INTP "Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra
  • 750 Line function

    14
    0 Votes
    14 Posts
    106 Views
    J
    No I wasn't joking. It's rare, but a long a function isn't always wrong. If everything is only done once, why push the stack and everything else you have to do? You're right though, it usually indicates something that hasn't been thought out properly. "Quality Software since 1983!" http://www.smoothjazzy.com/ - see the "Programming" section for freeware tools and articles.
  • Repeat After Me

    csharp winforms design testing beta-testing
    3
    0 Votes
    3 Posts
    33 Views
    J
    It is the little things that get you after a while! :laugh: INTP "Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra
  • Alien Assembly Search

    csharp dotnet visual-studio winforms lounge
    2
    0 Votes
    2 Posts
    5 Views
    J
    That happens. ;) I discovered that same thing a while back, the thing that bothers me most is having to mark side projects (tests) to no build or vise-versa. It is irritating to have all subprojects rebuilt when I only want to rebuild the current one, especially if the current one is trying to test a piece of code that is causing an error in one of the other projects. INTP "Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra
  • Need a sample code for Paging in ASP while doing printout by printer

    html
    1
    0 Votes
    1 Posts
    7 Views
    No one has replied
  • OMG... Brain Cramp

    com tools architecture question
    9
    0 Votes
    9 Posts
    84 Views
    W
    One thing is for sure... No one should ask him to provide more detail...:laugh:
  • Obfuscated code for Encryption algorithm

    algorithms security
    4
    0 Votes
    4 Posts
    31 Views
    V
    BadKarma wrote: while(pData < m_lpBufCur) byFoo = *pData++ ^= byFoo; They wanted to encrypt the encryption algorithm? :rolleyes: Cheers, Vikram. "But nowadays, it means nothing. Features are never frozen, development keeps happening, bugs never get fixed, and documentation is something you might find on wikipedia." - Marc Clifton on betas. Join the CP group at NationStates. Password: byalmightybob
  • header change on sort [modified]

    css tutorial
    2
    0 Votes
    2 Posts
    17 Views
    CPalliniC
    This is Code Horros Forum, hence you (perhaps us?) missed something... :zzz: If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.