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
  • JavaScript Frameworks....

    javascript learning
    16
    0 Votes
    16 Posts
    0 Views
    T
    abmv wrote: hundreds of frameworks Me wonders if that is an indication of the quality and viability of JavaScript as a programming language. Can't decide if it is a positive or a negative indication. #SupportHeForShe Government can give you nothing but what it takes from somebody else. A government big enough to give you everything you want is big enough to take everything you've got, including your freedom.-Ezra Taft Benson You must accept 1 of 2 basic premises: Either we are alone in the universe or we are not alone. Either way, the implications are staggering!-Wernher von Braun
  • EncodeFlags

    csharp database
    23
    0 Votes
    23 Posts
    2 Views
    T
    Ignore my previous post. I used to work with someone like that. He no longer works here. Smart guy, very capable, but continuously made "mistakes" like that. His "code" has caused us lots of grief. #SupportHeForShe Government can give you nothing but what it takes from somebody else. A government big enough to give you everything you want is big enough to take everything you've got, including your freedom.-Ezra Taft Benson You must accept 1 of 2 basic premises: Either we are alone in the universe or we are not alone. Either way, the implications are staggering!-Wernher von Braun
  • If it fails, try again

    database
    37
    0 Votes
    37 Posts
    2 Views
    R
    Member 7989122 wrote: I have fairly recently programmed a couple "try again" cases: On a quite heavily loaded file system, the number of exceptions due to confliciting accesses was higher than desired. So, when making modifications to a set of files, I make one try for each. Those failing are put into a list for retrying, and a second attempt is made once the first round was completed. Only after a second try, the user is notified. We went from too many access collisions to almost none. Sometimes, the second try came too fast, and the file was still busy. So I added a 5 ms sleep before starting a second round, and after that I haven't seen a single collision. So, you just assumed that whoever/whatever else had been writing to the file had been doing nothing worthwhile? Personally, if I detect any changes to a file I would avoid writing to it, and notify the user. Better still, open it for exclusive write. "If you don't fail at least 90 percent of the time, you're not aiming high enough." Alan Kay.
  • An example of the code I wrote before I started using CodeGen...

    tutorial
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • 0 Votes
    20 Posts
    0 Views
    K
    I had a guitar stolen off of a UPS truck in transit from the factory to the depot. (I actually think it was someone in the depot but that is another story) But the tracking label tracked it half way to my home from factory then it show as not being scanned yet (according to the UPS agent investigating). They finally fessed up and said that it had been 'Stolen off the truck'. The factory replaced it, and I got my guitar (how be it not the same guitar) but I still think this was an inside job.
  • Condo rentals Pattaya & Jomtien

    com
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • That's not nice! (disappearing files)

    sales help question career
    7
    0 Votes
    7 Posts
    0 Views
    P
    That doesn't sound familiar, but I've had Stored Procedures disappear from SQL Server before.
  • Petrovich

    question csharp html adobe architecture
    3
    0 Votes
    3 Posts
    0 Views
    enhzflepE
    David Morgan-Mar wrote: And in case you think this is entirely a joke, imagine a Petrovich layer over another operating system, such as Microsoft Windows (TM). Every time Windows does something you don't like, you could punish it, and it would never do it again... Windows is performing automatic updates. After 6 million arbitrary files have been downloaded and applied your machine will reboot. Petrovich> punish punish punish Edit: oh, and in answer to your question. Probably half a page load of lsd-25 or stronger. :laugh:
  • Just found this linked on The Daily WTF Forums...

    question adobe architecture
    3
    0 Votes
    3 Posts
    0 Views
    Y
    Cool!:cool: Now I don't need bash. ;P :laugh:
  • Very WTF worthy Mass Effect bug

    question com adobe architecture help
    2
    0 Votes
    2 Posts
    0 Views
    N
    I remember this bug from single/multi player games...in the 90's. The last time I saw this you needed a dial-up modem to pwn the plebs. "There are three kinds of lies: lies, damned lies and statistics." - Benjamin Disraeli
  • Comments Can Hurt

    database dotnet hardware tools help
    9
    0 Votes
    9 Posts
    0 Views
    G
    How is it you've lucked out and never had an IDE call you a dumb*ss? Software Zen: delete this;
  • Code a Potato Challange!

    question
    11
    0 Votes
    11 Posts
    0 Views
    C
    2kReviews has a whole system of reviewing the products we feature on our website. To make sure we are not influenced by any manufacturer or retailer, 2kReviews doesn’t buy the products from anywhere other than the shelves of everyday stores. If you are also looking to buy something then go refer 2kreviews first then go and buy something.
  • From a Tip/Trick here on CP

    csharp wpf design
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • The truth is out there

    tutorial question
    13
    0 Votes
    13 Posts
    0 Views
    H
    RyanDev wrote: True, we all care. :thumbsup: I think we all care equally. I'm retired. There's a nap for that... - Harvey
  • Wandering around The Daily WTF forums...

    question javascript com adobe architecture
    6
    0 Votes
    6 Posts
    0 Views
    H
    Maybe I should update [my web page](http://www.brydon.net/) I'm retired. There's a nap for that... - Harvey
  • 0 Votes
    30 Posts
    3 Views
    D
    Ha ha! The issue was nothing to do with Javascript, rather Microsoft's random renaming of time zones.
  • // Do not remove this try catch block.

    question com help tutorial
    22
    0 Votes
    22 Posts
    0 Views
    U
    I'm not the OP so I have no knowledge of the actual code. That was just a stupid joke on my part.
  • The Irony is Strong with W3 Schools

    html css wpf
    6
    0 Votes
    6 Posts
    0 Views
    K
    My Saturday job requires me to use an e-commerce site that still uses classic ASP, at least according to the address bar. An upgrade was promised about 4 years ago to make it compatible with IE 10/11. It used to drive me crazy that the M-F manager cleared the IE cache on Friday, unwittingly also clearing the compatibility list. I would get to the payment screen and realize that I was unable to select a payment option due to outdated javascript/css! :mad: Luckily F12 lets me emulate IE9 to get through it! This is a pretty major US business web application that still can't take payments from Safari, Chrome, Edge or IE > 9 browsers! :wtf: I have a fairly large task coming up dealing with an inventory and ordering system I wrote in classic ASP. (started before .NET and maintained until about 5 years ago) The project had been unused for a few years, then a new customer came on board a few months ago and wants it. It still works great, but it will be much better in .NET! :) Personally, I always found classic ASP easy to understand...mostly just building a page from top to bottom. Debugging was another matter. X| "Go forth into the source" - Neal Morse
  • A concise error message, one of Microsoft's fortes

    help
    4
    0 Votes
    4 Posts
    0 Views
    P
    Impressive message .. but please check your network cable, because of "...unable to make connection to the server..." which is cleverly embedded in the sea of text ... :-) Cheers,
  • How (not) to use mstest

    testing css visual-studio beta-testing help
    4
    0 Votes
    4 Posts
    0 Views
    R
    Worse is (and I'm not sure about NUnit) here, that .AreEqual uses obj.Equals for comparison by default. It has overloads for common value types, but in some cases can yield surprises. Generally, I think many test frameworks suffer from featuritis. It is better to simply have an Assert() method, taking a single Boolean expression, than have the possibility of bugs or unexpected behaviour in the test framework. "If you don't fail at least 90 percent of the time, you're not aiming high enough." Alan Kay.