My computing practical exam source code.



  • Background: as part of my computing AS* exams, we're given some source code by the examiners, and told to study it for about a month. Then, in the exam, we'll be asked questions about how it works, and a couple of questions asking us to implement something new or fix a bug. Now, I wasn't expecting the code to be fantastic (after all, you're expecting students to fix it), but it is pretty bad, so I thought I'd post it for your delectation. (I especially like the Display*() subprocedures, they're just unbelievably pointless)

     Source code pastebin.

    It's a console-mode encryption program that supports (wait for it!) caesar ciphers and rail fence encryption. Apologies if it's not WTF-ey enough for here, but I thought it was probably worth posting anyway.

     

    *(Exams you take in Britain when you're 16/17, if you go to sixth form)



  • If 10% of the code you encounter in the professional life you're presumably aiming at is as straightforward and clear as that, you can consider yourself very lucky. If 90% of the code you turn out looks reminiscent of it, you can consider yourself highly skilled.

    Yes, it's pedestrian. Yes, it's verbose. No, it's not the slightest bit innovative or exciting. Nor is it amazingly efficient. But it has the rare and beautiful qualities of being very easy to understand and very easy to extend cleanly. I think you're doing both its author and yourself a disservice by thinking of it as WTF-worthy.



  • @flabdablet said:

    If 10% of the code you encounter in the professional life you're presumably aiming at is as straightforward and clear as that, you can consider yourself very lucky. If 90% of the code you turn out looks reminiscent of it, you can consider yourself highly skilled.

     

    I think I need to reconsider my career options if that's the case. I've seen some very beautiful and efficient code in open-source projects, so I kind of assumed that the professional stuff would be a little more...polished. Evidently I was mistaken!

    @flabdablet said:

    Yes, it's pedestrian. Yes, it's verbose. No, it's not the slightest bit innovative or exciting. Nor is it amazingly efficient. But it has the rare and beautiful qualities of being very easy to understand and very easy to extend cleanly



    But...whatever, okay, I bow to your experience. I just expected the exam board to at least try and impress upon students the importance of, say, error handling when opening files. And no, that's not going to be one of the questions, try/catch and file I/O error handling isn't on the course.

     @flabdablet said:

    I think you're doing both its author and yourself a disservice by thinking of it as WTF-worthy.

     

    Some of the stuff on this forum is considerably better than this. But hey, I respect your opinion and such. (I know, a shocker on this forum!)

     

     



  •  @flabdablet said:

    <experienced view>
    Agreed.



  • @MGTL said:

    I think I need to reconsider my career options if that's the case. I've seen some very beautiful and efficient code in open-source projects, so I kind of assumed that the professional stuff would be a little more...polished. Evidently I was mistaken!

    "I've seen some good code in OSS projects, therefore every single thing done in the commercial environment must be better" Aside from the fact that finding "beautiful and efficient" OSS source is probably a once in a lifetime experience that you should savour, I'd say this is a bit of a logical fallacy.

    @MGTL said:

    But...whatever, okay, I bow to your experience. I just expected the exam board to at least try and impress upon students the importance of, say, error handling when opening files. And no, that's not going to be one of the questions, try/catch and file I/O error handling isn't on the course.

     Not to mention it doesn't even really do File I/O "properly"; using the Legacy remnants from Visual Basic's darker era rather than the Framework classes and methods. (I put properly in quotes because it doesn't really matter anyway) There is no absolute need for Error/Exception handling unless you have a reasonable way to deal with it. Crashing out of the application might not be as "elegant", but it doesn't change the function either. Too many developer try to catch every single possible error, and from what I've seen, a good portion of those catch blocks are empty; all they wanted to do was stop that dark stack trace. What they ended up with was corrupted databases and data files because that Exception caused invalid initialization data which spread. I like when devs handle Disk Full Errors by logging it to a log file, apparently assuming that the disk that holds that log file will never be the full one.


     



  • @BC_Programmer said:

    "I've seen some good code in OSS projects, therefore every single thing done in the commercial environment must be better" Aside from the fact that finding "beautiful and efficient" OSS source is probably a once in a lifetime experience that you should savour, I'd say this is a bit of a logical fallacy.

     

    True, but I'd expect that with proper code review and the fact that you're being paid to do it, code quality would increase. And the 'beautiful and efficient' may have been a slight exaggeration. 'Not using a subprocedure purely to print a newline either side of a message' might be closer to the truth.

     

    Not to mention it doesn't even really do File I/O "properly"; using the
    Legacy remnants from Visual Basic's darker era rather than the Framework
    classes and methods

     The VB.NET course very definitely puts the emphasis on VB rather than .NET. Which I suppose in some ways is a blessing, in other ways, not so much.

    There is no absolute need for Error/Exception handling unless you have a reasonable way to deal with it.

    A "reasonable way to deal with it" might be printing an error message and exiting, for something as basic as this. Just an opinion.... Although I agree with the rest of your points in that paragraph.

     



  • @MGTL said:

    True, but I'd expect that with proper code review and the fact that you're being paid to do it, code quality would increase.

    You realize there's a continuum here, right? Go read up on Joel Spolsky's checklist and realize that most companies are at the 5-6 item level. If you're working at Microsoft, you're probably at 10 or 11* (no developer on Earth has quiet work area, except in rich boutique software companies like Spolsky's own, so I hardly count that.) If you're working at Joe Bob's Towing Emporium writing Tow-Master (the universal app to match up trailers with hitches!) then you're maybe at a 2 or 3, unless you go out of your way to set up the rest yourself.

    And even within the checklist, some of those are a continuum. "Do you have a spec?" Technically yes, but not one I'd consider complete. I've never seen or worked-from a spec I considered complete honestly. Maybe they don't exist. "Do you have a schedule?" Well our PM has a schedule, but it's based on the number of candy canes in fairyland and nothing in concrete reality. Etc.

    *) Actually Microsoft coders get a few items Joel doesn't have on his list, like regular and thorough security reviews and having someone else to take care of annoying tasks like internationalization and packaging.

    **) And now that I'm thinking about it, Joel's missing some things he just assumes all companies have which might be a bad assumption: like a competent IT department so developers don't have to worry about building servers and such. Joe Bob's Towing Emporium probably doesn't have that.

    @MGTL said:

    The VB.NET course very definitely puts the emphasis on VB rather than .NET. Which I suppose in some ways is a blessing, in other ways, not so much.

    I see all .net languages are being basically ".net delivery mechanisms." The magic and power is in .net, not in C#, not in F# and not in VB. Those just let you get at the power.



  • You realize there's a continuum here, right?  [...]

    Yeah, hence why I think that if you work on the exam board's Programmer Team (seriously?), you're probably at 2/3 with Joe next door in a publishing warehouse. And that if open-source project 'X' gets a rating of 1 or 2 on that list if it's lucky, the commercial stuff must be better.

     

    Actually Microsoft coders get a few items Joel doesn't have on his list,
    like regular and thorough security reviews and having someone else to
    take care of annoying tasks like internationalization and packaging. 


    Yay, another reason I need to get a job at a decent software company (or just stay out of the profession entirely...). I hate packaging stuff.

     

    I see all .net languages are being basically ".net delivery mechanisms." The magic and power is in .net, not in C#, not in F# and not in VB. Those just let you get at the power.

     

    Yeah, I'd agree with that. But it's sort of nice, given that most of the students are complete beginners, not to tie them into a particular framework. 

     



  • @MGTL said:

    It's a console-mode encryption program that supports (wait for it!) caesar ciphers and rail fence encryption.

    Eh, it's a simple program meant to test students' coding abilities, right? Something like AES would put the focus where you don't want it; Caesar ciphers seem ideally-suited for this.

    @MGTL said:

    *(Exams you take in Britain when you're 16/17, if you go to sixth form)

    What is this I don't even



  • @MGTL said:

    I've seen some very beautiful and efficient code in open-source projects...

    [citation needed]



  • @blakeyrat said:

    (no developer on Earth has quiet work area, except in rich boutique software companies like Spolsky's own, so I hardly count that.)

    I work at home and it's very quiet here. Almost too quiet.

    I get a 10-12 on that test. Arguably, the FOSS tools I use are the best FOSS tools there are, but they still suck. And I don't know what "hallway usability testing" is, but it sounds stupid.

    @blakeyrat said:

    I've never seen or worked-from a spec I considered complete honestly. Maybe they don't exist.

    I think a 100% complete spec that describes every aspect of the software would nearly be code itself. I prefer light specs, honestly, just because: 1) resources invested in the spec are useful only if you get something out of it; and 2) most people I've worked with treat specs like "This is protection against stakeholders deciding they don't like the way the software works." They seem to believe that if it's in the spec (or not in the spec), stakeholders is honor-bound to respect that and give you a pat on the back for building what's in the spec. But that's silly; if they don't like your software, they don't like your software, and no amount of pointing at the spec is going to fix that. I instead try to focus on tight iterations and getting constant feedback so what is built is what the stakeholders want.



  • @morbiuswilters said:

    I get a 10-12 on that test. Arguably, the FOSS tools I use are the best FOSS tools there are, but they still suck. And I don't know what "hallway usability testing" is, but it sounds stupid.

    If you're working with open source shit, you don't know what "usability" is, so the concept of testing it is completely foreign.

    @morbiuswilters said:

    I think a 100% complete spec that describes every aspect of the software would nearly be code itself. I prefer light specs, honestly, just because: 1) resources invested in the spec are useful only if you get something out of it; and 2) most people I've worked with treat specs like "This is protection against stakeholders deciding they don't like the way the software works."

    I hate "finishing" a project only to be told, "oh this behavior isn't correct, it should do X. And you forgot to make it to Z when the user does Y." "Are those in the spec?" "No, but I'm telling you now." "Ok then we're behind schedule by 3 weeks because I didn't code in any support for doing Z.



  • @MGTL said:

    I think I need to reconsider my career options if that's the case. I've seen some very beautiful and efficient code in open-source projects, so I kind of assumed that the professional stuff would be a little more...polished. Evidently I was mistaken!

    Writing beautiful, efficient code is hugely satisfying, Unfortunately, it's also commercial suicide.

    The simple fact is that a competent programmer who can churn out 10,000 lines of boring, pedestrian, straightforward, correct code at a predictable rate is more valuable to most employers than a genius who might take anywhere from 10% to 1000% of the expected time to generate 2,000 lines of crystalline, elegant software sculpture that achieves the same end. Elegant software is subtle, and subtlety costs time to appreciate and care to avoid fucking up in refactoring; both of these are commodities likely to be in short supply amongst your co-workers (in general, your code will not end up being maintained by you).

    If you want to be an artist you're going to need patrons, not employers. Fortunately for software artists, there is now a huge amount of online FOSS infrastructure, and Kickstarter exists. Best of luck!


  • Discourse touched me in a no-no place

    @morbiuswilters said:

    @MGTL said:
    *(Exams you take in Britain when you're 16/17, if you go to sixth form)

    What is this I don't even

    Don't bother trying. All you need to know is that it is an elective course at advanced schoolkid level, after the dumbasses drop out.



  • @blakeyrat said:

    If you're working with open source shit, you don't know what "usability" is, so the concept of testing it is completely foreign.

    Hey, that's not fair; just because I don't use usable software doesn't mean I haven't heard of it, in the same way I'm sure a lot of Indians have heard of toilets.

    @blakeyrat said:

    I hate "finishing" a project only to be told, "oh this behavior isn't correct, it should do X. And you forgot to make it to Z when the user does Y." "Are those in the spec?" "No, but I'm telling you now." "Ok then we're behind schedule by 3 weeks because I didn't code in any support for doing Z.

    Exactly. The problem is, some people think that simply "getting it all in the spec" will prevent that from happening, but the truth is, every project I've ever worked on the primary stakeholders often didn't know they even wanted these things until they used the software. So specs are a good starting point, but I'm also in favor of iterating often and having something for them to play with early on.



  • @flabdablet said:

    Elegant software is subtle, and subtlety costs time to appreciate and care to avoid fucking up in refactoring; both of these are commodities likely to be in short supply amongst your co-workers (in general, your code will not end up being maintained by you).

    If you want to be an artist you're going to need patrons, not employers. Fortunately for software artists, there is now a huge amount of online FOSS infrastructure, and Kickstarter exists. Best of luck!

    I was going to call you a name for suggesting software artistry was at all desirable, but the more I think of it, the more brilliant it seems. Rich people are often stupid and easily separated from their money; I bet if you could just find the right way to market it, you could get rich people to pay lots of money for useless, "elegant" curiosities. The patronage system has worked for centuries for artists and politicians, why shouldn't it work for me?



  • @flabdablet said:

    Writing beautiful, efficient code is hugely satisfying, Unfortunately, it's also commercial suicide.

    The simple fact is that a competent programmer who can churn out 10,000 lines of boring, pedestrian, straightforward, correct code at a predictable rate is more valuable to most employers than a genius who might take anywhere from 10% to 1000% of the expected time to generate 2,000 lines of crystalline, elegant software sculpture that achieves the same end. Elegant software is subtle, and subtlety costs time to appreciate and care to avoid fucking up in refactoring; both of these are commodities likely to be in short supply amongst your co-workers (in general, your code will not end up being maintained by you).

    I think this is something certainly academia doesn't prepare you for.

     



  • @MGTL said:

    And that if open-source project 'X' gets a rating of 1 or 2 on that list if it's lucky, the commercial stuff must be better.

     

    I'd say most OSS projects rank quite good on Joel's list.

    1. Do you use source control? --> How would it work without?
    2. Can you make a build in one step? --> Building better is easy, if you want others to contribute.
    3. Do you make daily builds?--> Not automated, but there is a good chance that after each commit, someone else will try a build.
    4. Do you have a bug database? --> Comes for free with most OSS hosting sites.

    5. Do you fix bugs before writing new code? --> this can be a problem, when everyone only does what they find interesting
    6. Do you have an up-to-date schedule?--> larger projects mostly have/ does not apply, because there is no release deadline
    7. Do you have a spec?--> larger projects mostly have
    8. Do programmers have quiet working conditions?--> people can work where they want
    9. Do you use the best tools money can buy? --> everyone has to buy their own stuff
    10. Do you have testers?--> depends on the popularity and release schedule, often some people are willing to try the latest unstable build.
    11. Do new candidates write code during their interview? --> does not apply, contributed code can be rejected
    12. Do you do hallway usability testing?--> see #10

    That gives OSS something between 6/10 for smaller and 10/11 for larger active projects (exceptions exist). You should not forget that OSS development is done by people who enjoy code and produce above-average code by default.

    I like the Display* methods, they keep the Console.readwrite schmarrn out of the business logic.

     

     

     



  • @morbiuswilters said:

    I was going to call you a name for suggesting software artistry was at all desirable

    I think it's desirable, in that I personally enjoy it. I very much appreciate elegant design in any creative field, and software design is no exception. Working and re-working and re-re-working a software design - in particular, optimizing it by finding and eliminating wasted processing effort so as to screw the maximum available performance out of the hardware - is tremendous fun. So is sitting down and turning out something wonderful and perfect in an all-night blaze of insight...

    BUT

    You'd better do that stuff on your own time.

    There's software written to scratch the artistic itch, and there's software written to serve some useful purpose, and the overlap between the two is generally pretty small. It certainly doesn't contain enough software to make it commercially important. Also, software design elegance is completely invisible to those who will actually end up using software; in and of itself it has no commercial value whatsoever. It might have some second-order value, in that a designer with an interest in design elegance might also be motivated to build something that's an elegant fit to user requirements, but this is by no means guaranteed; there have been lots of elegant solutions to irrelevant problems.

    The vast bulk of the code you will encounter as a working programmer is horrible crap apparently perpetrated by a thundering herd of clueless fools with no idea or, if you're very lucky and you find yourself in a good team, clear and totally pedestrian code written by people experienced enough to know what they're doing and why. This follows from the fact that the vast bulk of commercial software activity consists not of writing original code, but of modifying and adapting and maintaining existing code. You'll be lucky if you're even given enough time to avoid uncontrollable cruft buildup; pursuit of actual elegance is just way too expensive (see anything Snoofle has ever written here on the subject of technical debt).

    If you're getting paid to write software for other people, they will usually not care at all about whether your source code is elegant. They will care about whether the end user finds its performance satisfactory, and the predictability of the rate at which you can churn it out, and whether or not Nagesh will be able to figure out approximately how it works in a year or two when you've been moved onto other projects.

    tl;dr: If you're expecting to spend your time being Michelangelo, house painting is probably not for you.



  • you're missing the point of this code snippet. It has nothing to do with writing clean code that works, or efficient code, or robust code, or pretty much writing any code. It is there to test whether you can employ the mindset of stepping through the code AT ALL. they use sub-methods for trivial things because DisplayPlainText(x) is much easier to understand than putting the actual method there. Is it trivial? yeah, but its not bad practice either. What if you have to extend this application to etch the plain text on the moon using high powered lasers only Dr Evil could afford? you would be pretty hard pressed to read the code without that method then!



    Having sat these exams before myself (i cant remember if we had code to study, but if we did it was in Pascal), before going to university to do computer science, before becoming a professional (allegedly) programmer. This code does exactly what it needs to, it gives people like you plenty to work with to show you are capable of reading, understanding and extending code. It gives people in the middle of the pack ways to differentiate themselves from those at the bottom, and it gives those who will never be programmers and made the unfortunate mistake of taking this course thinking it would be slightly more advanced IT just enough to be able to get by based on their ability to guess at what the code is doing by virtue of it looking as close to english as possible.



    Many people who take that course will never be programmers, my class was of 8 people, I havent kept in good contact with them, but I know that most of them as super geeky as we all were, are not programmers. Most of us went on to CS or programming related degrees, but my guess is only 1 or 2 (besides me) are programmers now, and that was from a crop that all went in wanting to be programmers. That course is not there to differentiate good programmers from bad, it is there to differentiate good students from bad. good students are not good programmers, and making your exam do anything different, will kill your course.



    If the only people who could pass drama A levels were Daniel Day Lewis, Dereck Jacobi and Judi Dench, it'd be a surprisingly ENTIRELY ABSENT COURSE FROM EVERY SCHOOL AND 6TH FORM COLLEGE IN THE COUNTRY. Similarly, if your exam said "Why is this code terrible?", with the correct answer being things like "It's using terrible encryption methods, It has no error handling, Its pretty useless to end users as its a console application, It's already implemented in libraries, it only works on strings, its in VB." and the follow up question was "Rewrite it entirely, on paper, from scratch, solving all the problems you highlighted". it would be a course that basically nobody would teach.



    As it is, my class was the last one to do this course at our school.



  • @MGTL said:

    I've seen some very beautiful and efficient code in open-source projects, so I kind of assumed that the professional stuff would be a little more...polished. Evidently I was mistaken!

    I think the mistake you've made is in not considering the kind of coders who work on OSS and the kind of coders who work to get paid.



    Most people working on open source stuff are doing so because they like coding, have a personal interest in doing it, and will be coding up something or other just for the sheer hell of it throughout their lives. Typically, their level of enthusiasm means that they constantly aim to push themselves to learn and improve; they're likely to put out high quality code because the production of high quality code is an end in-and-of-itself, rather than a means to an end.



    On the other hand, a lot of professional developers are developing stuff that they're not at all interested in, and they're doing it because it is a well paid job and they have skill adequate to the task of continuing to receive a monthly pay check. If someone wasn't paying them they'd have absolutely no interest in developing that software. As a result, they're not too interested in pushing themselves (unless they're worried about getting fired), and the only way they'll ever put out high quality code is if some process MAKES them do it.



    Obviously this dichotomy isn't a real world distinction, since the former group is mostly a subset of the latter group.



  • @derari said:

    Do you have a bug database? --> Comes for free with most OSS hosting sites.

    They have (a shitty) one, but most open source projects don't use it.

    The "bug tracker" in Github is so terrible you can't even attach a file (other than a image). It hardly deserves to be called a "bug tracker".

    @derari said:

    Do you fix bugs before writing new code? --> this can be a problem, when everyone only does what they find interesting

    That is a huge problem.

    @derari said:

    Do you have an up-to-date schedule?--> larger projects mostly have/ does not apply, because there is no release deadline

    That's why OpenOffice and GIMP are still stuck somewhere in 2003. No deadlines = no progress.

    @derari said:

    Do you have testers?--> depends on the popularity and release schedule, often some people are willing to try the latest unstable build.

    Yeah and when testers post bugs in it, the developers can ignore them! It's the ciiircle of liiife!

    @derari said:

    Do you do hallway usability testing?--> see #10

    A usability bug, on an open source project, put into the bug tracker and actually getting fixed? What dragon and elf fantasy world are you living in? Because that don't happen in this world.

    Not to mention that misses the very point of usability testing, if you only do it with people who are capable of downloading, setting up the development environment, and building a complex open source project. "Look super-nerds can use our program so there's no point to make it easier! What's that? What about the other 99.99% of the population? FUCK THEM! We're open source! FUCK EVERYBODY BUT US!"



  • @eViLegion said:

    Most people working on open source stuff are doing so because they like coding, have a personal interest in doing it, and will be coding up something or other just for the sheer hell of it throughout their lives. Typically, their level of enthusiasm means that they constantly aim to push themselves to learn and improve; they're likely to put out high quality code because the production of high quality code is an end in-and-of-itself, rather than a means to an end.

    And the thing people are ignoring here is by-and-large, the quality of open source software sucks ass. Regardless of how "elegant" the code is.

    Hell who gives a shit how "elegant" the code is if your fucking open source app can't fucking draw a drop-down menu correctly? (Notepad++, Audacity.) Who gives a shit for "elegance" when your open source IDE puts 200+ MB of bullshit into the wrong named folder, DoS'ing it for other apps? (Aptana, Eclipse-in-general.) Who gives a shit if your open source app can't even fucking draw a font in fucking size 14 point? (Netbeans.)

    Make the program FUCKING WORK. Make it USABLE. Then, only then, work on making the code elegant. Which BTW does nothing but make it virtually unmaintainable by anybody other than the person who wrote it... so good luck with that, because that's not at all a terrible road to go down.

    This whole conversation is stupid.



  • @flabdablet said:

    The vast bulk of the code you will encounter as a working programmer is horrible crap apparently perpetrated by a thundering herd of clueless fools with no idea or, if you're very lucky and you find yourself in a good team, clear and totally pedestrian code written by people experienced enough to know what they're doing and why.

    This is exactly how I feel. Also I think a lot of new developers need to learn to walk before they run; Perfecting simple, concise and easily understood code is a bit of a skill before you start trying to write "beautiful code".

    Also I think there is a lot of programmers these days that think they can just copy and pasta source code off the net, without understanding what it is really doing. There is nothing wrong with googling an example of how to do something and adapt the approach to suit your needs, but I seen developers copy and pasta'd code from wherever on the web expecting it just to work (my favourite was a guy trying to get a mootools library working with jQuery).



  •  It's better than most of the code I see on a daily basis but then again the interview screening assignments I review are also better than most of the code I see on a daily basis.



  • @blakeyrat said:

    They have (a shitty) one, but most open source projects don't use it. 

    I just checked the 5 trending and 5 featured projects on GitHub. 9 made active use of their issue management, and the only one without issues had a total of 40 commits, all done within three weeks, 8 months ago.

    @blakeyrat said:

    That's why OpenOffice and GIMP are still stuck somewhere in 2003. No deadlines = no progress.
     

    More like "no one cares = no progress".

     

    @blakeyrat said:

    Not to mention that misses the very point of usability testing, if you only do it with people who are capable of downloading, setting up the development environment, and building a complex open source project. "Look super-nerds can use our program so there's no point to make it easier! What's that? What about the other 99.99% of the population? FUCK THEM! We're open source! FUCK EVERYBODY BUT US!"

     

    Where did you get the idea that an OSS project/team owes you anything? If no one of the 99.99% cares about the rest of the world, so be it. Maybe the program was made specifically for super nerds. If you care so much, feel free to change it.

     



  • @derari said:

    I just checked the 5 trending and 5 featured projects on GitHub. 9 made active use of their issue management, and the only one without issues had a total of 40 commits, all done within three weeks, 8 months ago.

    Oh yeah. They make use of it. The developer puts in a bug, then fixes his own bug, then moves on with his life. I'm saying bugs entered by the general populace (you know, the people the project's website invariably invites to submit bug reports) are completely ignored.

    With one exception: Mozilla. Putting in a bug for Firefox was the most positive open source experience I've ever had. That was years ago for Firefox 4, though, dunno if they're still that way.

    @derari said:

    More like "no one cares = no progress".

    Do you honestly believes no one cares to have an open source alternative to Microsoft Office or Adobe Photoshop? Not passing the sniff-test buddy. I think it's far, far, far more likely that tons of people care, but those projects are utterly mismanaged.

    @derari said:

    Where did you get the idea that an OSS project/team owes you anything? If no one of the 99.99% cares about the rest of the world, so be it. Maybe the program was made specifically for super nerds. If you care so much, feel free to change it.

    Goddamned. Every time someone new comes in from Slashdot we have to have this same fucking argument over and over and fucking over again.

    Someone else reply to this idiocy for me.



  • @lucas said:

    This is exactly how I feel. Also I think a lot of new developers need to learn to walk before they run; Perfecting simple, concise and easily understood code is a bit of a skill before you start trying to write "beautiful code".

    Dude.... beautiful code has nothing to do with it's aesthetic on the page/screen... simple, concise and easily understood code IS beautiful code.



  • @blakeyrat said:

    @derari said:
    Do you have an up-to-date schedule?--> larger projects mostly have/ does not apply, because there is no release deadline

    That's why OpenOffice and GIMP are still stuck somewhere in 2003. No deadlines = no progress.

    My copy of Microsoft Office 2003 is better than the newest version of Open Office.



  • @blakeyrat said:

    Someone else reply to this idiocy for me.

    Alright.

    @derari said:

    More like "no one cares = no progress".

    Er... actually a shed load of people care. So much so that when Oracle acquired Sun and started fucking everything up, all the people making Open Office left to found The Document Foundation and forked off LibreOffice instead. So, as you can see, that is entirely a mismanagement thing. Sun mismanaged everything for years (and went bankrupt) then it got passed over to Oracle who mismanaged even worse, so much so that everyone who wasn't paid by Oracle told Oracle to fuck off. Finally it has passed to Apache who've got a big committee of people who can't decide how to improve it and can't really be bothered.

    @derari said:

    Where did you get the idea that an OSS project/team owes you anything? If no one of the 99.99% cares about the rest of the world, so be it. Maybe the program was made specifically for super nerds. If you care so much, feel free to change it.

    At no point did blakey say anyone owed him anything, or even imply that. He's just pointing out the obvious flaws with a lot of OSS, and you've read it in a super angry voice thereby inferring an attitude of entitled butthurt that wasn't actually present in his posts. Plus, just because something is free, and openly available for people to change, doesn't give it special protection from the critical analysis of people who wish to criticize; their criticisms remain just as true or false regardless of the price.

    Also... you're sentences parse badly, you should look into fixing that.



  • @blakeyrat said:

    With one exception: Mozilla. Putting in a bug for Firefox was the most positive open source experience I've ever had. That was years ago for Firefox 4, though, dunno if they're still that way.

    I think so. But it's a real bitch to get properly credited.



  • @eViLegion said:

    Er... actually a shed load of people care. So much so that when Oracle acquired Sun and started fucking everything up, all the people making Open Office left to found The Document Foundation and forked off LibreOffice instead.

    So... problem solved?

    At no point did blakey say anyone owed him anything, or even imply that. He's just pointing out the obvious flaws with a lot of OSS, and you've read it in a super angry voice thereby inferring an attitude of entitled butthurt that wasn't actually present in his posts. Plus, just because something is free, and openly available for people to change, doesn't give it special protection from the critical analysis of people who wish to criticize; their criticisms remain just as true or false regardless of the price.
    Make the program FUCKING WORK. Make it USABLE. Then, only then, work on making the code elegant.

    That's not criticizing, that's giving orders. Which just does not work when people are doing it in their free time. It's also quite pointless because whoever he is addressing, they will probably never read this.

    "Look super-nerds can use our program so there's no point to make it easier! What's that? What about the other 99.99% of the population? FUCK THEM! We're open source! FUCK EVERYBODY BUT US!"
    To me, this reads like developers should care about how easy it is for other people to use their software. Because ... ? I agree that many OSS projects suck from a user's perspective. But that doesn't mean that the code is bad.
    Also... you're sentences parse badly, you should look into fixing that.
    I'm sorry, I mixed some parts of the sentence when I got distracted.


  • @derari said:

    To me, this reads like developers should care about how easy it is for other people to use their software. Because ... ?

    Seriously? Do the world a favour and kill yourself now. No, wait, kill Richard Stallman first, then turn the gun on yourself.@derari said:
    I agree that many OSS projects suck from a user's perspective. But that doesn't mean that the code is bad.
    Yes it does. By definition, code that produces a sucky result is sucky code.



  • @eViLegion said:

    @lucas said:
    This is exactly how I feel. Also I think a lot of new developers need to learn to walk before they run; Perfecting simple, concise and easily understood code is a bit of a skill before you start trying to write "beautiful code".

    Dude.... beautiful code has nothing to do with it's aesthetic on the page/screen... simple, concise and easily understood code IS beautiful code.

    I was in-directly getting at that. I think I write simple and easily understood code, elegant it is not though, usually it takes me a good few iterations to get the structure right.



  • @blakeyrat said:

    You realize there's a continuum here, right? Go read up on Joel Spolsky's checklist and realize that most companies are at the 5-6 item level. If you're working at Microsoft, you're probably at 10 or 11* (no developer on Earth has quiet work area, except in rich boutique software companies like Spolsky's own, so I hardly count that.) If you're working at Joe Bob's Towing Emporium writing Tow-Master (the universal app to match up trailers with hitches!) then you're maybe at a 2 or 3, unless you go out of your way to set up the rest yourself.
     

    I've posted an occasional WTF here in the sidebar. Here's one that's not a code snippet. We're a Fortune 50 company. My code shop scores a 1 on that test, assuming you let us get off on a technicality for one of them.To wit, we do "hallway usability testing" -- having randomly selected people see if they can comprehend the interface. We just ignore the results if we're at deadline. The rest of them? We mostly don't just fail at, we fail at gloriously.

    I'm trying to make things better, and they are a lot better here than when I started. My predecessor's code shop was so Wild West it would probably have found a way to score negative (much of his code was copypasta from Google searches; I do not believe he legitimately knew any programming language).

     



  • @derari said:

    I agree that many OSS projects suck from a user's perspective. But that doesn't mean that the code is bad.

    Uh, yeah it does.  If a piece of software sucks, that is because the code does.  Of course there is lots of things with terrible usability that aren't OSS (generally 'cause it's expensive to spend the time to do a stupid internal report or tool right instead of just slapping it together till it kinda sorta works), but if you aren't selling software it's really hard to justify the cost of doing things that aren't bad.



  • Fair enough... I'm being ultra pedantic today, because of no reason.



  • @derari said:

    I agree that many OSS projects suck from a user's perspective. But that doesn't mean that the code is bad
    The most unintentionally funny thing I've read for a while.  So what you're saying is that OSS projects are really just some sort of programmer's circle jerk where everyone just sits around admiring the code and talking about how "elegant" it is, with no regard for the fact that it doesn't actually work properly.



  • @El_Heffe said:

    @derari said:
    I agree that many OSS projects suck from a user's perspective. But that doesn't mean that the code is bad

    The most unintentionally funny thing I've read for a while.  So what you're saying is that OSS projects are really just some sort of programmer's circle jerk where everyone just sits around admiring the code and talking about how "elegant" it is, with no regard for the fact that it doesn't actually work properly.

    A bunch of philistines, all of you! Art needs no justification! Or so I'm told.

    That aside, your prejudiceshoulder aliens are adding things that he didn't say.



  • @El_Heffe said:

    My copy of Microsoft Office 2003 is better than the newest version of Open Office.

    Except Outlook.

    Nothing is better than Outlook. Quite a lot better.



  • The other day at work one of our interns wrote the most beautiful code ever.  She concicely solved a resoruce-contention issue that was causing a massive performance bottleneck.  Of course, now the code does random things because it is no longer thread-safe.  Millions of dollars in lost business, one fired senior dev that signed off on the change, a heart attack, a liability suit, and a few hundred man-hours of emergency fixes later, the code is no longer elegant, but produces the desired result.

     I'm not so foolish as to think that all OSS projects care about elegance before functionality, but you would have to be pretty braindead to insist that elegance is more important than actually performing the task correctly.  You also have to have a pretty low self-worth to think that producing software only for people that can produce software is a good idea.  Have some pride in your work and realize that you can affect a positive change in the lives of others--you can make their lives easier and more fulfilling.  If you only write software for the people that could do it themselves, you're not really adding any value and your project is actually worthless.  Your design is bad and you should feel bad.



  • @derari said:

    You should not forget that OSS development is done by people who enjoy code and produce above-average code by default.

    [citation needed]



  • @eViLegion said:

    Typically, their level of enthusiasm means that they constantly aim to push themselves to learn and improve; they're likely to put out high quality code because the production of high quality code is an end in-and-of-itself, rather than a means to an end.

    This would be an interesting hypothesis, if not for the fact that FOSS typically churns out lower-quality products. So the more fascinating conclusion is that developers, left on their own and with no real customers to satisfy, actually churn out worse code than when they are slaving away at some tedious job.



  • @derari said:

    Where did you get the idea that an OSS project/team owes you anything?

    This is the real beauty of the failed FOSS experiment. "Hey, FOSS Is making better software than commercial!" "Oh really, what about problems foo, bar and baz?" "You can't judge us by the same standard! Who said we owe you anything?? It's free, you can change it!"

    I think I'm going to start applying this reasoning to other areas of my life. I'll take some lucky lady to the Bone Zone and after 5 seconds of sweaty grunting and shrieking she's like "Oh God, are you done?" and I'll be all "Bitch, what makes you think I owe you anything?? I'm the best lover you ever had! And if you don't like it, then you can just get yourself off. Now shut that pretty mouth, Morbs and Lil' Morbs need their beauty rest."



  • @TDWTF123 said:

    @derari said:
    To me, this reads like developers should care about how easy it is for other people to use their software. Because ... ?

    Seriously?

    As a professional developer, I get paid to care about the user. As an OSS developer, I may care because I am a nice guy, am very passionate about the project, or just have nothing else to do; but that is nothing that can be demanded.

    I agree that many OSS projects suck from a user's perspective. But that doesn't mean that the code is bad.
    Yes it does.
    If the UI sucks, the UI sucks, and the application in its entirety sucks as well. But it's still possible that 95% of the code are of very high quality.

    @El_Heffe said:

    So what you're saying is that OSS projects are really just some sort of programmer's circle jerk where everyone just sits around admiring the code and talking about how "elegant" it is, with no regard for the fact that it doesn't actually work properly.
    What I'm saying is: if they choose to do so, then yes it is, and you are in no position to tell them otherwise.



  • @El_Heffe said:

    So what you're saying is that OSS projects are really just some sort of programmer's circle jerk where everyone just sits around admiring the code and talking about how "elegant" it is, with no regard for the fact that it doesn't actually work properly.

    That's exactly what he's saying. And what's even cooler is that "elegant" to them usually means "uses one less machine instruction, even if it's incomprehensible garbage littered with gotos and no variable name longer than two characters".



  • Eh, it's a simple program meant to test students' coding abilities,
    right? Something like AES would put the focus where you don't want it;
    Caesar ciphers seem ideally-suited for this.
      Well yeah, but last year they had a game. That's way more exciting (well, okay, it did involve an ASCII troll in a cave or something) for students, and it doesn't require us to understand basic cryptography in order to pass a computing exam where cryptography isn't on the course (not that I object to learning about this, it's just something I find irking. Like the fact that you had to do GCSE IT in order to do A-level computing.)

     

    What is this I don't even

    That's a fair reaction. Most of our education system is stupid. The two-year thing we do before going to university, for no apparent reason other than to filter stupid people and further knowledge in four subjects of which three you're going to drop, is just one example.

    Writing beautiful, efficient code is hugely satisfying, Unfortunately, it's also commercial suicide. <snip explanation of why it's commercial suicide>
    I see your point, I just thought software developers had a slight sense of fun and could perhaps manage the brainpower to write efficient code at a reasonable rate. That said, I've been lurking here for a while, I should know better by now.


    1. Do you use source control? --> How would it work without?
    2. Can you make a build in one step? --> Building better is easy, if you want others to contribute.
    3. Do you make daily builds?--> Not automated, but there is a good chance that after each commit, someone else will try a build.
    4. Do you have a bug database? --> Comes for free with most OSS hosting sites.

    5. Do you fix bugs before writing new code? --> this can be a problem, when everyone only does what they find interesting
    6. Do you have an up-to-date schedule?--> larger projects mostly have/ does not apply, because there is no release deadline
    7. Do you have a spec?--> larger projects mostly have
    8. Do programmers have quiet working conditions?--> people can work where they want
    9. Do you use the best tools money can buy? --> everyone has to buy their own stuff
    10. Do you have testers?--> depends on the popularity and release schedule, often some people are willing to try the latest unstable build.
    11. Do new candidates write code during their interview? --> does not apply, contributed code can be rejected
    12. Do you do hallway usability testing?--> see #10
    1. It has been known for me to ask where source code is kept and to be emailed a zip file. Admittedly not often, but often enough.
    2. Most OSS build systems are multi-stage. Usually you generate a build script, then actually use said build script, assuming the meta-build-script thing didn't fail in the meantime. 
    3. How many people do you think work on an average project? Usually one.
    4. Okay, I'll concede this one. But see #1.
    5.  
    6.  
    7. Yes. How many large OSS projects are there? Maybe hundreds. How many small ones? Probably millions.
    8. Usually in the front room with a screaming toddler, from what I've heard.
    9. Most use OSS tools. Which have...problems.
    10. #7
    11. Yes, but who actually rejects helpers unless you're really obsessive about code quality?
    12. I used to know what that meant, right now I just can't be bothered to go and find out.

    (From my point of view) 

    To the people saying that it's okay to make 'pedestrian' (I like that word, I might use it more) code if it works well, the code I posted is both pedestrian and a terrible application. 

    Hey, whatever. Nice talking to you guys, fresh opinions always welcome. Guess I'm a little pissed that I've been staring at the same code for weeks in class now while my teacher mumbles something about subprocedures vs. functions, and whether he got it right or not(!).

     



  • @morbiuswilters said:

    @eViLegion said:
    Typically, their level of enthusiasm means that they constantly aim to push themselves to learn and improve; they're likely to put out high quality code because the production of high quality code is an end in-and-of-itself, rather than a means to an end.

    This would be an interesting hypothesis, if not for the fact that FOSS typically churns out lower-quality products. So the more fascinating conclusion is that developers, left on their own and with no real customers to satisfy, actually churn out worse code than when they are slaving away at some tedious job.

    I still think this is wrong, and since you're repeating this argument, I'll briefly repeat my objection to it.

    Since FOSS projects tend to start life in the public (e.g., github, sourceforge, etc), you see a lot more of them than you do of commercial products. There are more shitty shareware applications than there are quality things like Excel or Outlook. Most of the garbage we see and talk about around here is not FOSS, but proprietary stuff.



  • @Kaosadvokit said:

    If you only write software for the people that could do it themselves, you're not really adding any value and your project is actually worthless.

    What's worse is they're usually re-inventing the same shitty, half-finished wheel over and over again. It's not like FOSS nerds are some high priest class that, due to their technical superiority, are flying around in space limousines and shit, using technologies far superior to anything "normies" might have access to. At least that might justify the attitude of "Fuck the average user, we're flying around in space limousines and fucking entire harems of hyper-sexualized, genetically-engineered fox-women!"

    No, instead we end up with a hundred shitty windowing managers, none of which is as good as Windows (or even OSX). And the GUI programs, Oh God..

    The thing is, I honestly can't think of any other industry filled with people this deluded. Do doctors get together in their spare time to perform anesthetic-free surgery on one another? Do propane over repairmen go home and cook meals over a burning garbage can?



  • @morbiuswilters said:

    I think I'm going to start applying this reasoning to other areas of my life. I'll take some lucky lady to the Bone Zone and after 5 seconds of sweaty grunting and shrieking she's like "Oh God, are you done?" and I'll be all "Bitch, what makes you think I owe you anything?? I'm the best lover you ever had! And if you don't like it, then you can just get yourself off. Now shut that pretty mouth, Morbs and Lil' Morbs need their beauty rest."

    Of course you could do that, except for "I'm the best lover you ever had!" (assuming you don't know who else she had). But then she will probably not date you again and tell her friends to avoid you, which is basically the same thing that will happen to an OSS project with that attitude, so I guess the comparison works.

    @morbiuswilters said:

    Do doctors get together in their spare time to perform anesthetic-free surgery on one another?

    I have a prosecutor in the family, but I'm not allowed to know about his work, so I can't tell you.

    Do propane over repairmen go home and cook meals over a burning garbage can?
    Those who are as passionate about propane ovens as many programmers are about programming probably do. Have you tried browsing darwinawards.com?

    @morbiuswilters said:

    What's worse is they're usually re-inventing the same shitty, half-finished wheel over and over again.

    And once more someone is complaining that other people do not do the things they* want, for free.

    The thing is, I honestly can't think of any other industry filled with people this deluded.
    What about painters? Photography exists for ages by now, and how many pictures of a sunset do we need anyway?
    *they=the complainer, not the people actually doing things

Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.