Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi all! We have been experiencing an issue on site where threads have been missing the latest postings. The platform host Vanilla are working on this issue. A workaround that has been used by some is to navigate back from 1 to 10+ pages to re-sync the thread and this will then show the latest posts. Thanks, Mike.
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Coding Horror

13132333436

Comments

  • Registered Users, Registered Users 2 Posts: 4,325 ✭✭✭iLikeWaffles


    test



  • Registered Users, Registered Users 2 Posts: 4,325 ✭✭✭iLikeWaffles


    test
    
    
    test
    


  • Registered Users, Registered Users 2 Posts: 4,325 ✭✭✭iLikeWaffles


    test



  • Registered Users, Registered Users 2 Posts: 4,325 ✭✭✭iLikeWaffles


    lol




  • Registered Users, Registered Users 2 Posts: 4,325 ✭✭✭iLikeWaffles


    tset



  • Advertisement
  • Registered Users, Registered Users 2 Posts: 4,325 ✭✭✭iLikeWaffles


    feel free to delete no issue in this on this page of the thread with a codeblock. Unless it is the use of multiple codeblocks in a thread?!



  • Registered Users, Registered Users 2 Posts: 11,864 ✭✭✭✭the_amazing_raisin


    I was wondering if this thread was becoming the definition of it's title 😁

    "The internet never fails to misremember" - Sebastian Ruiz, aka Frost



  • Registered Users, Registered Users 2 Posts: 1,465 ✭✭✭Anesthetize


    ^ Was that the forum equivalent of adding "Here" print statements while trying to debug your code? 😄



  • Registered Users, Registered Users 2 Posts: 17,639 ✭✭✭✭Mr. CooL ICE


    DATEADD(day, -6+14, getdate())
    

    Like, it being a parameter in dateadd(), I assume it has to be 6 days before a two week period, but writing this way must have meant something to the developer (long gone) who wrote this. But why not just put in 8 and add a comment? Bizarre



  • Registered Users, Registered Users 2 Posts: 798 ✭✭✭FobleAsNuck



    >The music files you purchase from the Apple Music Store (AMS; formerly the iTunes Music Store) contain approximately 6 % of the digital equivalent of nothingness. I’m not referring to silence, but continuous blocks of empty space set aside inside the files. It serves no purpose other than to pad the files to make them 0,5 MB larger.



  • Advertisement
  • Registered Users, Registered Users 2 Posts: 17,639 ✭✭✭✭Mr. CooL ICE


    Again, less a horror and more a jaded previous developer. In this case, a simple RETURN -1 could have sufficed:


    IF TRUE
    	-- Do SQL-ey stuff
    ELSE
    BEGIN
    	PRINT 'today is not the day to do this';
    END;
    


  • Registered Users Posts: 49 d mc


    public class Order
    {
        public int Id { get; set; }
        public int Quantity { get; set }
    }
    

    Somewhere in a PR....

    David, your code coverage has dropped.....

    ...

    But I only added one class...

    ...

    But we can't let our coverage drop ...

    *deep sigh*

    [Test]
    public void DumbestFuckingTestOnEarth()
    {
        var order = new Order 
        {
            Id = 7,
            Quantity = 100
        };
    
        Assert.Equal(order.Id, 7);
        Assert.Equal(order.Quantity, 100);
    }
    


    Great job David!




  • Registered Users, Registered Users 2 Posts: 2,801 ✭✭✭PommieBast


    A few companies ago we were told that the code coverage was too low. Turned out the devel who got the best increase in coverage did so by stripping out various sanity checks. 😖



  • Registered Users, Registered Users 2 Posts: 1,465 ✭✭✭Anesthetize


    I assume that the class(es) that are using that new Order class already have their own unit tests? Did the code you modified to use an Order object not already have unit test coverage?

    It looks like an issue with existing test coverage.



  • Registered Users Posts: 49 d mc


    My point was - the tests I had to add to raise coverage was effectvely unit testing the get set properties provider by .net... completely useless

    var x = 5

    Assert.Equal(x, 5)



  • Registered Users, Registered Users 2 Posts: 2,029 ✭✭✭Colonel Panic


    So are there tests that use the Order POCO or not? Apart from the pointless ones you list.



  • Registered Users, Registered Users 2 Posts: 599 ✭✭✭RickBlaine


    Not the worst offense but I was looking at a method I wrote myself in a personal project a few months ago and found code structured like this:

    if (myObject is null)
    {
       myObject = new myObject();
       DoSomething(myObject);
    } else 
    {
       DoSomething(myObject);
    }
    

    Not sure what I was thinking at the time. I guess I wasn't thinking clearly in the middle of a late night coding session. I refactored it to:

    if (myObject is null)
    {
       myObject = new myObject();
    }
    DoSomething(myObject);
    


  • Registered Users, Registered Users 2 Posts: 11,864 ✭✭✭✭the_amazing_raisin


    There's a point where caffeine can no longer help 😂

    "The internet never fails to misremember" - Sebastian Ruiz, aka Frost



  • Registered Users, Registered Users 2 Posts: 27,246 ✭✭✭✭GreeBo


    Trying to debug an issue this week and found that the code has been deliberately changed from the original code to create the bug.

    Checked the git commit message to find:

    "Making the code changes as per the user story"

    No mention of the story of course. FML.



  • Registered Users, Registered Users 2 Posts: 11,864 ✭✭✭✭the_amazing_raisin


    Ah, this is what you call job security. Write deliberately buggy or poorly optimised code for the initial release

    Then in the weeks before your annual review you suddenly roll out a bunch of "improvements" and put down a 500% performance enhancement as your accomplishments for the year

    I'm guessing since you're fixing someone else's code that strategy didn't work for them 😂

    "The internet never fails to misremember" - Sebastian Ruiz, aka Frost



  • Advertisement
  • Registered Users, Registered Users 2 Posts: 27,246 ✭✭✭✭GreeBo


    Well when I say "deliberately changed" I dont mean they made a bug on purpose. More that the result was the expected result.

    But now no one knows why as the requirement is unavailable.


    Its people like this who dont have any understanding of why we have coding and check-in standards and they get annoyed when the commit hook fails their check-in so they just put in rubbish.



  • Registered Users, Registered Users 2 Posts: 6,523 ✭✭✭daymobrew


    Was the company paying people to fix bugs per the Dilbert classic: https://www.reddit.com/r/ProgrammerHumor/comments/k5hka0/bug_free_programs_a_dilbert_classic/



  • Registered Users, Registered Users 2 Posts: 27,246 ✭✭✭✭GreeBo


    No, it was part of another requirements change....just no one know what or why now, since the commit comment doesnt refer to anything.



  • Registered Users, Registered Users 2 Posts: 9,559 ✭✭✭DublinWriter


    I worked as a 'code monkey' for most of my career, before landing a hands-on IT Project Leader for a big multinational in the mid-90s.

    In the second week there, the IT Manager came in and plonked a bill from Eircom for £20,000IEP for a months worth of usage on an ISDN line we had linking our Dublin office to our Belfast office so they could run a terminal session to our IBM AS/400.

    A week later, the Belfast office get a £17,000GBP bill from BT for the same ISDN line for the same period.

    The link should be costing the company around £400 a month to operate, but suddenly it's now £40,000.

    Just before I joined, the company had employed a small two-man Dublin based company to set up the ISDN network link between the two offices and the Netware file server in the Belfast office.

    I contact the initial two man company who set up the link, but they're next to useless.

    Coming from a coding background, I pull out the gigantic ring-binder manual for the Cisco router and get cracking. I also get hold of some packet sniffing software. It's all new to me and totally daunting.

    Again, this is going to turn into a long IT war-story, so let me know if you want Part II.





  • Rather a dated technology and evidently extremely bad value for a slow (in modern terms) data packet transfer.



  • Registered Users, Registered Users 2 Posts: 5,885 ✭✭✭Charles Babbage


    Not a dated technology in the mid 90s when the poster was doing this.

    I expect that both lines were dialling into America or some such, but it would be interesting to know if this was a code error or bad design.

    Post edited by Boards.ie: Paul on


  • Registered Users, Registered Users 2 Posts: 22,482 ✭✭✭✭Esel


    Jebus, I knew ISDN lines were expensive back in the day, but that's crazy!

    Not your ornery onager





  • Lol, got the timeline wrong 🤣 was wondering what a company was doing with such a line in modern times



  • Registered Users, Registered Users 2 Posts: 5,885 ✭✭✭Charles Babbage


    The past was a different place, at least in relation to technology


    Post edited by Boards.ie: Paul on


  • Advertisement
  • Technology & Internet Moderators Posts: 28,820 Mod ✭✭✭✭oscarBravo


    ...let me know if you want Part II.

    I, for one, need closure on this anecdote.



Advertisement