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
  • If at first you don't succeed...

    database debugging help
    10
    0 Votes
    10 Posts
    20 Views
    S
    You might want to create a trouble ticket for that error.... but i suggest you use a different program to log it :) just in case theres a problem when you initialize it :)
  • Well, no one is insured :)

    help
    2
    0 Votes
    2 Posts
    6 Views
    D
    Georgi Atanasov wrote: Obviously the line OnCommandExecuting(e) was missing Uh, yeah. :rolleyes: "A good athlete is the result of a good and worthy opponent." - David Crow "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
  • Type conversion

    com question
    8
    0 Votes
    8 Posts
    14 Views
    W
    Hahaha, FxCop thought otherwise. ;P WM. What about weapons of mass-construction? "What? Its an Apple MacBook Pro. They are sexy!" - Paul Watson My blog
  • Get me a count....

    tools question
    26
    0 Votes
    26 Posts
    79 Views
    P
    We are looking to replace a developer who left recently.
  • parsing string for int sqlParameter

    json
    2
    0 Votes
    2 Posts
    4 Views
    P
    Easy enough to fix at least.
  • Horror from an article in CP

    question
    13
    0 Votes
    13 Posts
    24 Views
    M
    Vasudevan Deepak Kumar wrote: I would say you should have pointed out in the article's own message board so that the author can address this and give you a more quality tool. Well Said. Best Regards, Mushq Mushtaque Ahmed Nizamani Software Engineer Ultimus Pakistan
  • OOP 101

    java
    5
    0 Votes
    5 Posts
    5 Views
    L
    He's obviously object-disoriented. ----- If atheism is a religion, then not collecting stamps is a hobby. -- Unknown God is the only being who, to rule, does not need to exist. -- Charles Baudelaire
  • Don't tell me how to declare a string!

    database tutorial
    25
    0 Votes
    25 Posts
    84 Views
    L
    Ri Qen-Sin wrote: Does this feature count as encouraging bad coding practices? Most people dont need to be encouraged in the wrong direction. Compiler optimizations typically improve the simple cases, and seldom drastically improve the complex cases (where most could be gained!). So staying vigilent would pay off frequently. :) Luc Pattyn [Forum Guidelines] [My Articles] this weeks tips: - make Visual display line numbers: Tools/Options/TextEditor/... - show exceptions with ToString() to see all information - before you ask a question here, search CodeProject, then Google
  • I came across this one too

    database
    2
    0 Votes
    2 Posts
    4 Views
    P
    Make another version that takes a string, redirect the current one to the new one, and mark the current one as Obsolete. See who complains. :)
  • Excel

    help com sysadmin windows-admin
    3
    0 Votes
    3 Posts
    5 Views
    C
    I've dealt with this one. dang what was it. it was an easy fix. Here it is: System.Data.OleDb.OleDbConnection("provider=Microsoft.Jet.OLEDB.4.0;" & _ "data source=" & result & ";Extended Properties='Excel 8.0;IMEX=1';") note the use of the extended properties and how they have single quotes. [edit] the above treats everything as a string, but does solve the null issue. I found the code from when I had to do a similar program a while back.
  • Infrastructure... just because.

    csharp database design sysadmin business
    3
    0 Votes
    3 Posts
    9 Views
    B
    Wow! talking about doing unnecessary extra work! We have to build a software with an sql Database that will have to check for Orders in our ERP DB (Oracle) So, what was my boss idea? He made us create a trigger that each time an order was created or modified a record with it's primary key was added in a table, Then we had an oracle process that run each 10' that looked at that table, recollected all the order information and saved it to another table in oracle, hen he made us install Oracle Gateway so we can access the sql server from oracle, So when there was New orders in the processed table oracle would connect to Sql Server and add a record to a Sql Tabla that said there was new data,Then we had another process in sql server that checked this table every 1' if the table said there was new data then another process was run that read the now processed tables with the order informations in oracle and extracted the data, once it extracted the data the process checked for modification o inserts against the Final Sql Server Orders Table! So after all that we Could access the sql server table from the Software and just list the content of the table.. When i told my boss why don't we just Access the orders table in Oracle from the software he told me: Noooo, if they change their TnsNames.ora file it would stop working!!! :wtf:
  • My boss! [modified]

    13
    0 Votes
    13 Posts
    26 Views
    V
    thany.org wrote: In fact he hired you because you're the better programmer True. The recruitment process should weigh the most optimistics ones and how best it can be benefit for the organization's growth besides helping out the candidate's career mutually. Vasudevan Deepak Kumar Personal Homepage Tech Gossips
  • Wow

    ruby
    6
    0 Votes
    6 Posts
    9 Views
    L
    Maybe to determine whether "HasSubstatus" full loading of an object is required AND the object itself is not used anymore AND the useSubStatus is used later. Anyway, nothing justifies writing if (new Project(pid).HasSubstatus) useSubStatus = true; else useSubStatus = false; instead of useSubStatus = new Project(pid).HasSubstatus; :-) Greetings - Gajatko
  • Have I gone completely mad? [modified]

    csharp c++ asp-net database help
    17
    0 Votes
    17 Posts
    26 Views
    R
    No, actually I was just trying to access a node's index in the TreeNodeCollection in order to be able to insert another node before or after it in the collection. I just noticed the somewhat incomprehensible code in the Managed C++ section of the MSDN help for that method while I was browsing around. Please don't bother me... I'm hacking code right now. Doesn't anybody remember what "hacking" really means? :sigh:
  • Not exactly code, but a horror none the less...

    html css
    11
    0 Votes
    11 Posts
    17 Views
    E
    Wow! BOS being loaded with MSW using front end loader.
  • String in hands of dumb****s

    database oracle com sales help
    7
    0 Votes
    7 Posts
    10 Views
    L
    First time I saw this post I quickly searched Wikipedia what is a "WTF"... (English is a foreign language anyway). Greetings - Gajatko
  • VS turns up nose at my code...

    visual-studio com tools question
    9
    0 Votes
    9 Posts
    18 Views
    D
    Ahhh sales guys... they always get the good stuff. The company I work for decided to use Java for their programming applications and UI into the system. Someone should be flogged, keel hauled, or both for that decision. Uptight Ex-Military Republican married to a Commie Lib - How weird is that?
  • Visual Basic 6: Public versus Private Function

    debugging question
    15
    0 Votes
    15 Posts
    35 Views
    realJSOPR
    Try #define public private "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
  • GOSUB .NET

    csharp
    12
    0 Votes
    12 Posts
    19 Views
    L
    Don't remind me THAT... Please? Greetings - Gajatko
  • When normalization goes wrong. Horribly.

    database sql-server sysadmin help tutorial
    23
    0 Votes
    23 Posts
    79 Views
    D
    I'm sort of going off on a tangent here, but this reminds me of a most excellent Dilbert stripe a while ago. The pointy-haired boss has called an engineer into his office and says: Boss: My spreadsheet shows your job performance hasn't been very good lately. Engineer: Perhaps your spreadsheet is poorly conceived and does not capture the complexity of the real world. Boss: (silence) Engineer: And let's not forget the near certainty that your formulae are pointing to the wrong cells. Cracked me up! :D