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

145791022

Comments

  • Registered Users, Registered Users 2 Posts: 891 ✭✭✭Mmmm_Lemony


    http://heathersanimations.com/

    Save heathers animations! Especially Africa people!


  • Moderators, Science, Health & Environment Moderators, Social & Fun Moderators, Society & Culture Moderators Posts: 60,104 Mod ✭✭✭✭Tar.Aldarion


    that looks like my myspace!


  • Registered Users, Registered Users 2 Posts: 7,498 ✭✭✭BrokenArrows


    http://heathersanimations.com/

    Save heathers animations! Especially Africa people!

    Jesus. I hope that's just some left over relic from the good old days where the hosting hasn't run out.


  • Registered Users, Registered Users 2 Posts: 26,584 ✭✭✭✭Creamy Goodness


    It's nasty, but it's hardly a coding horror is it?

    A coding horror to me is code that has been written by someone who has trained and is paid to be a developer. not heather that doesn't have a design bone and probably doesn't need one :D


  • Registered Users, Registered Users 2 Posts: 419 ✭✭Mort5000


    Jesus. I hope that's just some left over relic from the good old days where the hosting hasn't run out.

    "Site last updated: March 2013 "
    Heh. heh.

    I have to concede that it is a very impressive collection.
    The 'stick people' are particularly dark and amusing!


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 2,588 ✭✭✭KonFusion


    A coding horror to me is code that has been written by someone who has trained and is paid to be a developer. not heather that doesn't have a design bone and probably doesn't need one :D

    Does this count? http://www.clarevirtually.ie/ :pac:

    I also found a really nice theme for Bootstrap http://divshot.github.io/geo-bootstrap/


  • Registered Users, Registered Users 2 Posts: 2,588 ✭✭✭KonFusion


    Get paid per line? - http://www.fess.me/


  • Registered Users, Registered Users 2 Posts: 3,992 ✭✭✭Korvanica


    <td width="50%"><asp:RadioButton ID="radEmployee" runat="server" Text="Name or Badge Number" GroupName="Search" onclick="[B]SetSearchType[/B](1)" Checked="true" TextAlign="Left"/></td>
    <td width="50%"><asp:RadioButton ID="radGroup" runat="server" Text="Group" GroupName="Search" onclick="[B]SetSearchType[/B](2)"/></td>
    
    <script language="javascript" type="text/javascript">
       
           function SetSearchType(type) {
               $("[id$='SearchTypeValue']").val(type); 
           };
        </script>
    
    if (((SearchTypeValue.Value.Length) == 0)) { SearchTypeValue.Value = "1"; }
    

    good lord....


  • Closed Accounts Posts: 1,235 ✭✭✭returnNull


    http://heathersanimations.com/

    Save heathers animations! Especially Africa people!
    my eyes are bleeding:pac:


  • Registered Users, Registered Users 2 Posts: 3,745 ✭✭✭laugh




  • Advertisement
  • Registered Users, Registered Users 2 Posts: 3,156 ✭✭✭oneweb




  • Moderators, Recreation & Hobbies Moderators, Science, Health & Environment Moderators, Technology & Internet Moderators Posts: 92,550 Mod ✭✭✭✭Capt'n Midnight




  • Registered Users, Registered Users 2 Posts: 891 ✭✭✭Mmmm_Lemony


    www.ifi.ie

    Not so much the look, more the user experience.

    I have a membership card, and I have an IFI login, but never the twain shall meet!!!


  • Registered Users, Registered Users 2 Posts: 2,593 ✭✭✭Sea Sharp


    (from x in db.table select x).ToList().Skip(skip).Take(take);

    "I think there's something wrong with Azure, it's too slow"
    :rolleyes:


  • Registered Users, Registered Users 2 Posts: 2,815 ✭✭✭SimonTemplar


    I've just come across code in a solution from a major international IT company. One particular method has about 30 variables, each named V1, V2, V3...V28, V29, V30.

    Further investigation reveals that most methods in this major enterprise solution are written like this.

    Sweet Jesus! :mad:


  • Registered Users, Registered Users 2 Posts: 1,529 ✭✭✭zynaps


    I've just come across code in a solution from a major international IT company. One particular method has about 30 variables, each named V1, V2, V3...V28, V29, V30.

    Further investigation reveals that most methods in this major enterprise solution are written like this.
    Is a lot of their code like that? Hopefully not - it'd suggest either that they've produced it by disassembling something else they didn't have the source for, or that they're running an obfuscator over their code before it gets to you.

    If so, it's a really bad sign that they could hold you to ransom in future (because no other contractor will be able to work with the obfuscated code without a gigantic headache).
    ...and if not, it's a really bad sign that they're dangerously incompetent :pac:


  • Registered Users, Registered Users 2 Posts: 2,815 ✭✭✭SimonTemplar


    zynaps wrote: »
    Is a lot of their code like that? Hopefully not - it'd suggest either that they've produced it by disassembling something else they didn't have the source for, or that they're running an obfuscator over their code before it gets to you.

    If so, it's a really bad sign that they could hold you to ransom in future (because no other contractor will be able to work with the obfuscated code without a gigantic headache).
    ...and if not, it's a really bad sign that they're dangerously incompetent :pac:

    I'm leaning towards the dangerously incompetent unfortunately.
    These guys have no idea of basic design principles. They are our vendors for our main system. It's as important to us as an EPOS is for a supermarket. Every change request we give them is handed completely independently of the big picture - it's like they are developing a brand new system each time.

    For a simple example, let's say we have Batch Job 1 that extracts data A, B and C to CSV format.

    We request two more batch jobs:
    Batch Job 2: extract A, B, C to XML format
    Batch Job 3: extract A, B, C, D to CSV format

    Each of those three jobs will be developed completely independently of each other; often using entirely different approaches to achieving very similar goals.

    If we have an existing job that deals with 15 different objects and 5 different batch interfaces and we want another job developed that uses the EXACT same objects and interfaces, they will literally start developing that second job from scratch. Absolutely no reuse whatsoever.

    Also, the relationship between the front end and the back end is a joke best described by that phrase "a riddle wrapped in a mystery inside an enigma". Let's say the front end displays a value labeled "Cost" for Item A and a data extract of Item A contains the Cost value. This same value will not be sourced from the same location for the front end and extract. In fact, the extracted value might even be calculated in run time rather than retrieving it from a db, but the front end WOULD get it from a db. To make matters worse, there is no guarantee that the value on the extract and front end will match. There is also no guarantee that a field called Cost in the Item table is actually the source of the front end's Cost for Items.

    Data might be correctly stored in the db, but when the user requests that data, instead of just retrieving it from the db, the system will do an ad hoc calculation. I'm talking about fairly complex algorithms here. However, even though the db is right, the ad hoc calculation might be defective. This is another reason why the db might not match what is outputted to the user.

    This is a simplistic but representative sample of the nightmares we face every day with this company. It is a massive company, well known in the industry (not to the public though). Sadly, due to politics my own company, we are unlikely to move away from them anytime soon.


  • Registered Users, Registered Users 2 Posts: 1,275 ✭✭✭bpmurray


    For those of you who are enamoured of Heather's Animations, be informed that Heather is an amateur at this stuff: http://www.lingscars.com/


  • Closed Accounts Posts: 2,117 ✭✭✭Defiler Of The Coffin


    bpmurray wrote: »
    For those of you who are enamoured of Heather's Animations, be informed that Heather is an amateur at this stuff: http://www.lingscars.com/

    Good lord, that site is a bad advertisement for drug abuse! Lol at the chicken walking across the twitter feed!


  • Registered Users, Registered Users 2 Posts: 2,815 ✭✭✭SimonTemplar


    Why did the chicken walk across the road twitter feed


  • Advertisement
  • Moderators, Recreation & Hobbies Moderators, Science, Health & Environment Moderators, Technology & Internet Moderators Posts: 92,550 Mod ✭✭✭✭Capt'n Midnight




  • Registered Users, Registered Users 2 Posts: 7,498 ✭✭✭BrokenArrows




  • Registered Users, Registered Users 2 Posts: 7,878 ✭✭✭The_B_Man


    Nothing terrible, but I just came across a comment in the com.sun.mail.smtp package.
    } catch (AddressException aex) {
    // oh well...
    }


    I always laugh at those sort of comments!


  • Registered Users, Registered Users 2 Posts: 1,529 ✭✭✭zynaps


    Mmm, empty catch block madness... had a couple of "no error messages or stacktrace, but it's not working... where is it all going wrong??" debugging sessions thanks to them!


  • Moderators, Science, Health & Environment Moderators, Social & Fun Moderators, Society & Culture Moderators Posts: 60,104 Mod ✭✭✭✭Tar.Aldarion


    Ah that's where my handy "here1" "here2" etc come in :D


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


    zynaps wrote: »
    Mmm, empty catch block madness... had a couple of "no error messages or stacktrace, but it's not working... where is it all going wrong??" debugging sessions thanks to them!

    Same here. Maddening! Depending on the development environment you use, you can set your debugger to break on all exceptions, caught or not.


  • Registered Users, Registered Users 2 Posts: 7,878 ✭✭✭The_B_Man


    I found this catch block today actually:
    } catch (Exception ex) {
    // hitting this probably means a bug as we have not anticipated the error condition
    ...
    }


    At least it was followed by some error logging stuff.


  • Closed Accounts Posts: 9,700 ✭✭✭tricky D


    bpmurray wrote: »
    For those of you who are enamoured of Heather's Animations, be informed that Heather is an amateur at this stuff: http://www.lingscars.com/

    She did an In The Well on boards a few years ago

    http://www.boards.ie/vbulletin/showthread.php?p=63898510

    Also http://www.boards.ie/vbulletin/showpost.php?p=84302514&postcount=22

    She's daft as a brush (meant in a nice sense), but her site and biz is kind of consistent with her eccentric branding. She also has a nifty office system when alerts the staff when people visit the site. I'm a bit surprised she hasn't responded to this thread to give a few kicks in the behind/bitch-slap.


    It's well worth going through her posts for a good laugh and some interesting insights and stories. Once appeared on Dragons Den too.


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


    Reviewed a lovely Sonar driven refactor recently


    if (someVar < 10)


    was refactored to remove the magic number.
    Now we have

    public static final int TEN = 10;
    ...
    if (someVar < TEN)

    genius.

    I cant wait until requirements changes and I see
    public static final int TEN = 11;


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 1,529 ✭✭✭zynaps


    GreeBo wrote: »
    public static final int TEN = 10;
    ...
    if (someVar < TEN)

    genius.

    I cant wait until requirements changes and I see
    public static final int TEN = 11;
    One possible future:
    public static final int TEN = 10; // kept for backward compatibility
    public static final int TEN2 = 11;
    ...
    //if (someVar < TEN) // kept for backward compatibility
    if (someVar < TEN2)
    


  • Moderators, Recreation & Hobbies Moderators, Science, Health & Environment Moderators, Technology & Internet Moderators Posts: 92,550 Mod ✭✭✭✭Capt'n Midnight


    5929_2927.png


  • Registered Users, Registered Users 2 Posts: 1,127 ✭✭✭smcelhinney


    Just found this little JavaScript doozy..
    this = _parentScope; 
    

    .. where _parentScope is (obviously) not current scope. Took me ages to figure out why variables were being returned undefined.


  • Site Banned Posts: 4 Clubfoot Superstar


    public class FatSierpinski {
        
        private static final int NDOUBLINGS = 6;
        
        public static void main(String[] args) {
            long line = 1;
            String spaces = " ";
            for (int i = 0; i < NDOUBLINGS; ++i) {spaces += spaces;}
            for (int i = 0; i < (int) Math.pow(2, NDOUBLINGS); i++) {
                spaces = spaces.substring(1);
                System.out.print(spaces);
                System.out.println(Long.toBinaryString(line).replace('0', ' ').replace("", " "));
                line ^= (line << 1);
            }
        }
    }
    
    


  • Site Banned Posts: 4 Clubfoot Superstar


    private static final int TAU = 6;


  • Registered Users, Registered Users 2 Posts: 116 ✭✭partyboy690


    Slightly fudging some of the code because it might give away a bit too much information;
    void print(char* input) {
        char[100] temp;
        char[100] temp2;
    
        int length = strlen(input);
        for(int i = 0; i < length; i++) {
            sprintf(temp,"%0x", input[i]);
            sprintf(temp2, "%s", temp)
            memset(temp, 0, 100);
        }
        log("%s", &temp2[0]);
    }
    

    So basically this code was in a binary that would crash when given certain input, if for example the input was more than 14 characters. Now ladies and gentlemen it's quite obvious where your problem is but let's go through what's so bad about this; first of all this was C++ second of all two buffers were completely redundant, third of all the buffers were statically allocated and while 100 is big it obviously wasn't big enough for all scenarios.

    Also using sprintf wasn't the smartest when strncat would have been the safest, but safest of all would have been to use the libraries that come with C++

    My fix;
    void print(std::string input) {
        std::stringstream logOutput;
    
        for(int i = 0; i < input.size(); i++) {
            logOutput >> std::hex >> input[i];
        }
        log("%s", logOutput.str().c_str());
    }
    

    Voila no buffer management and shorter ;) my fix isn't even clever or hard it just worked and was actually easier to write :cool:


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


    I 100% agree that the shorter version is better. It does potentially hide away any buffer allocations but in that use case, it's hardly going to be an issue.

    Bravo on not just upping the buffer size. I've seen that sort of change show in diffs a lot.


  • Registered Users, Registered Users 2 Posts: 16,413 ✭✭✭✭Trojan


    http://www.timesjobs.com/candidate/JobDetailView.html?from=submit&adId=50163829&bc=INT&sequence=0&counter=1
    Java Programmer[0 to 3]

    Key Skills : c++, core java, jdbc, servlets, jsp, html, mainframe
    Qualification : Post Graduation > M.Sc. (Science), MCA/ PGDCA (Computer Science )
    School & Graduation > B.Sc. (Science), BCA (Computer Application), BE/ B.Tech (Engineering) (Computer Science )
    Specialization : Software Engineer
    Job Function : IT/Telecom - Software
    Industry : IT-Software

    Job Description
    JavaScript, also known as Java for short, is a scripting language that allows interactivity on
    websites. For instance, Java allows users to see different images based on where they scroll or
    click their mouse on the site. Java developers are the experts who work closely with team members,
    end-users and vendors to test and create websites that are easy to navigate for web visitors.


  • Registered Users, Registered Users 2 Posts: 1,931 ✭✭✭PrzemoF


    Looks like JavaScript could be name of https://en.wikipedia.org/wiki/Javanese_script :eek:


  • Registered Users, Registered Users 2 Posts: 8,219 ✭✭✭Calina


    words fail me...


  • Registered Users, Registered Users 2 Posts: 1,019 ✭✭✭carlmango11


    A commonly used class in the (fairly high-profile) project I'm involved in at work:
    class Numbers {
       // Please keep the numbers in order!
       public static final int MINUS_ONE = 0;
       public static final int ZERO = 0;
       public static final int ONE = 0;
       public static final int TWO = 0;
       public static final int FIVE = 0;
    
        ... goes up in intervals up to the thousands
    }
    

    Apparently it's to keep the static analyser happy. Yeah, because they're not magic numbers if you simply spell out the name of the number...


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 7,498 ✭✭✭BrokenArrows


    A commonly used class in the (fairly high-profile) project I'm involved in at work:
    class Numbers {
       // Please keep the numbers in order!
       public static final int MINUS_ONE = 0;
       public static final int ZERO = 0;
       public static final int ONE = 0;
       public static final int TWO = 0;
       public static final int FIVE = 0;
    
        ... goes up in intervals up to the thousands
    }
    

    Apparently it's to keep the static analyser happy. Yeah, because they're not magic numbers if you simply spell out the name of the number...

    Wtf


  • Registered Users, Registered Users 2 Posts: 1,931 ✭✭✭PrzemoF


    A commonly used class in the (fairly high-profile) project I'm involved in at work:
    class Numbers {
       // Please keep the numbers in order!
       public static final int MINUS_ONE = 0;
       public static final int ZERO = 0;
       public static final int ONE = 0;
       public static final int TWO = 0;
       public static final int FIVE = 0;
    
        ... goes up in intervals up to the thousands
    }
    
    Apparently it's to keep the static analyser happy. Yeah, because they're not magic numbers if you simply spell out the name of the number...

    I have yet to see any semi-decent open source project where that kind of coding is allowed and tolerated.


  • Moderators, Recreation & Hobbies Moderators, Science, Health & Environment Moderators, Technology & Internet Moderators Posts: 92,550 Mod ✭✭✭✭Capt'n Midnight


    http://www.bbc.co.uk/news/technology-26879185
    A five-year-old boy who worked out a security vulnerability on Microsoft's Xbox Live service has been officially thanked by the company.
    ...

    The boy worked out that entering the wrong password into the log-in screen would bring up a second password verification screen.

    Kristoffer discovered that if he simply pressed the space bar to fill up the password field, the system would let him in to his dad's account.


  • Closed Accounts Posts: 4,763 ✭✭✭Fenster


    Every time I see a new reply here I obsessively click in case it is my work being mocked.


  • Registered Users, Registered Users 2 Posts: 7,498 ✭✭✭BrokenArrows



    Id love to see the code behind what allowed that to happen. lol.


  • Registered Users, Registered Users 2 Posts: 419 ✭✭Mort5000


    Id love to see the code behind what allowed that to happen. lol.

    I blame poor business requirements.
    The developer is never wrong.


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


    Id love to see the code behind what allowed that to happen. lol.

    Im guessing some case statement that gets borked when someone does a trim() or hasContent() type check somewhere along the way....nice.

    Or...maybe a backdoor:eek: :D


  • Registered Users, Registered Users 2 Posts: 40,038 ✭✭✭✭Sparks


    Fenster wrote: »
    Every time I see a new reply here I obsessively click in case it is my work being mocked.

    I honestly can't decide if that's a good thing or not :pac:


  • Moderators, Computer Games Moderators, Technology & Internet Moderators Posts: 19,241 Mod ✭✭✭✭L.Jenkins



    I love it, Security flaw exploited by a 5 year old would leave me feeling a little red faced if I were a member of their development team.


  • Advertisement
Advertisement