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

2456722

Comments

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


    Evil Phil wrote: »
    If you remember the name of it zynaps can you post it here? Sounds really good.
    After a bit of googling, I remembered there were two that we used, along with
    • "Checkstyle" (and corresponding Eclipse plugin, sadly not updated since 2006)
    • "Findbugs", seems more recently updated, but some of the website is down anyway :rolleyes:

    In fact, both of these (as well as a Cobertura test coverage report) were generated automatically by Maven whenever we were thinking about checking in some changes to the SVN repo. Kind of amazing how powerful coding tools (especially free, open source ones!) have become in the last decade! :) Needs a lot of horror to compensate for all that goodness...

    [edit]
    Actually I think we used a third (!) static code analyser, PMD for some reason... :P


  • Registered Users, Registered Users 2 Posts: 3,553 ✭✭✭lmimmfn


    zynaps wrote: »
    After a bit of googling, I remembered there were two that we used, along with
    • "Checkstyle" (and corresponding Eclipse plugin, sadly not updated since 2006)
    • "Findbugs", seems more recently updated, but some of the website is down anyway :rolleyes:

    In fact, both of these (as well as a Cobertura test coverage report) were generated automatically by Maven whenever we were thinking about checking in some changes to the SVN repo. Kind of amazing how powerful coding tools (especially free, open source ones!) have become in the last decade! :) Needs a lot of horror to compensate for all that goodness...

    [edit]
    Actually I think we used a third (!) static code analyser, PMD for some reason... :P
    yeah we use all of those, PMD is quite good apart from it moaning about silly things like creating objects in loops or complaing about too many if statements. However if a project is run well and code reviewed and all PMD errors have to be ok'd to insert a NO PMD comment beforehand then it works out quite well.

    On the horror story, i cant believe people cant distinguish between unit tests and integration tests and the need for both. My current project has integration tests and unit tests all thrown into the one test directory, the integration tests require a huge db import( and no one knows now at this stage what data is in it ffs ) and its a pain to setup. No xml's for data just needed for 1 test and remove it afterwards, arrghhh lol

    Ignoring idiots who comment "far right" because they don't even know what it means



  • Closed Accounts Posts: 12 edbar2


    Sparks wrote: »
    SQL also seems to be immune from even efforts at version control and deployment controls. The number of times I've seen a dev team working on one SQL codebase only to find there's a different codebase on the live server...

    I've been doing sql since MSSQL 1.0 when Microsoft partnered with Ashton Tate and agree there is NO formal standard. I've seen some real hack jobs, like creating databases and tables directly in the query box instead of maintaining source files.


  • Closed Accounts Posts: 18,056 ✭✭✭✭BostonB


    Last app I inherited there was no handover, and it was a few weeks before I discovered there was about 3 versions of the application and another 3 versions of the database, none of which matched the live app or database, no comments, no notes. Located across different machines, none of which backup up to source safe, or on the network.


  • Closed Accounts Posts: 12 edbar2


    BostonB wrote: »
    Last app I inherited there was no handover, and it was a few weeks before I discovered there was about 3 versions of the application and another 3 versions of the database, none of which matched the live app or database, no comments, no notes. Located across different machines, none of which backup up to source safe, or on the network.

    What kills you is the guy who created all of that garbage probably got stock options for all of his wonderful (sic) work, and then moved on. Leaving all of that unmaintainable garbage behind.

    I actually knew someone like that.

    Then his replacement came in, thinking "oh boy, I'm at Microsoft, now I'll get stock". Instead he gets nothing, because you don't get stock options for sitting around doing maintenance / fixing bugs in old code, all of the time.


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


    Is that their idea of seo maybe? :D


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


    I just had to share this one. I was working on an ecommerce site a couple of months back. The original coders charged an arm, a leg, and a good chunk of torso for this site, so you'd hope it'd be well coded. No such luck :)

    It's a kind of specialist ecommerce site, can't say which, but you might be able to guess. When a customer views a product, they need to select from a list of basic options.

    Now we needed to change this list of options, remove and simplify the list to tidy it up a bit, make the labels clearer to the end user what each one did for usability and conversion.

    We removed a couple of the options, no problem, obviously we didn't change element id's. But when we changed the text titles on the form input elements, the whole page broke!

    On investigating the problem, I discovered that the back end of the options code looked like as follows:
    if($_value->getTitle() == "None") { /* do stuff */ }
    else if($_value->getTitle() == "Basic Widget") { /* do stuff */ }
    else if($_value->getTitle() == "More Expensive Widget A" || $_value->getTitle() == "More Expensive Widget B") { /* do stuff */ }
    else if($_value->getTitle() == "Contact my specialist, I do not have XXXX") { /* do stuff */ }
    else if($_value->getTitle() == "I will fax a copy to +353 (0)123 4567890" 
    	|| $_value->getTitle() == "You already have my details on file" 
    	|| $_value->getTitle() == "I will scan and email a copy to <a href='mailto:info@12345672222domain.com'>info@12345672222domain.com</a>" 
    	|| $_value->getTitle() == "I will fax a copy to 1890 123456")  { /* do stuff */ }
    else if($_value->getTitle() == "I will be responsible for my details and i will input it below")  { /* do stuff */ }
    

    There are several ways to reference an input in HTML forms -> PHP, but hardcoding the title text in has got be one of the dumbest. In this case, if the company had changed their fax number, their ecommerce processing would break.

    This site cost approximately a junior developer's entire annual salary. *boggle*


  • Registered Users, Registered Users 2 Posts: 1,829 ✭✭✭lil_lisa


    That's quite horrific. I get scolded if I hard code even the slightest thing. Somehow people with this coding "in"ability manage to squeeze their way to the top!


  • Registered Users, Registered Users 2 Posts: 7,468 ✭✭✭Evil Phil


    The next time a company gets named I'm deleting this thread and banning the offender.


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 1,829 ✭✭✭lil_lisa


    Someone discovered this over in AH in the source code of a website:

    [HTML]<!--
    -\-
    \-- \-
    \ - -\
    \ \\
    \ \
    \ \\
    \ \\
    \ \\
    \ \\\
    \ \\
    \ \\
    \. . \\
    \ . \\
    \ . \\
    \ . \\
    \ . \\
    \ <=)
    \ <==)
    \ <=)
    \ .\\ _-
    \ . \\ _-//
    \ . \\ _-_/ /
    \ . . . \\ _--_/ _/
    \ \\ _- _/ _/
    \ \\ ___-(O) _/ _/
    \ \ __-- __ /_ / ***********************************
    \ \\ ____--__---- / \_ I AM A MOTHER****ING PTERODACTYL!
    \ \\
    / \_ \_ HERE TO PTERO-YOU A NEW ASSHOLE
    \ \ // // \__ \_ [url]HTTP://PTERODACTYL.ME[/url]
    \ \\ // // \_ \_ **********************************
    \ \\ /// // \__-
    \ - \\///////// //
    \ - \_ //
    / - //
    / - ///
    / - //
    __--/ ///
    __________/ // |
    //-_________ ___ //// |
    ____\__--/ ///// |
    ______ -/---________//// |
    _______/ --/ \ |
    /_________-/ \ |
    // \ /
    \. /
    \ . /
    \ . /
    \\ . /
    \ /
    \ __|
    \ ==/
    / //
    / . //
    / . . //
    /. /
    / //
    / /
    / //
    / //
    --/ /
    / //
    //// //
    ///_________////


    -->[/HTML]

    **Phil, I'm assuming since we shouldn't name companies, the same goes for websites?


  • Registered Users, Registered Users 2 Posts: 7,231 ✭✭✭Fad


    lil_lisa wrote: »
    Someone discovered this over in AH in the source code of a website:

    [HTML]<!--
    -\-
    \-- \-
    \ - -\
    \ \\
    \ \
    \ \\
    \ \\
    \ \\
    \ \\\
    \ \\
    \ \\
    \. . \\
    \ . \\
    \ . \\
    \ . \\
    \ . \\
    \ <=)
    \ <==)
    \ <=)
    \ .\\ _-
    \ . \\ _-//
    \ . \\ _-_/ /
    \ . . . \\ _--_/ _/
    \ \\ _- _/ _/
    \ \\ ___-(O) _/ _/
    \ \ __-- __ /_ / ***********************************
    \ \\ ____--__---- / \_ I AM A MOTHER****ING PTERODACTYL!
    \ \\
    / \_ \_ HERE TO PTERO-YOU A NEW ASSHOLE
    \ \ // // \__ \_ [url]HTTP://PTERODACTYL.ME[/url]
    \ \\ // // \_ \_ **********************************
    \ \\ /// // \__-
    \ - \\///////// //
    \ - \_ //
    / - //
    / - ///
    / - //
    __--/ ///
    __________/ // |
    //-_________ ___ //// |
    ____\__--/ ///// |
    ______ -/---________//// |
    _______/ --/ \ |
    /_________-/ \ |
    // \ /
    \. /
    \ . /
    \ . /
    \\ . /
    \ /
    \ __|
    \ ==/
    / //
    / . //
    / . . //
    /. /
    / //
    / /
    / //
    / //
    --/ /
    / //
    //// //
    ///_________////


    -->[/HTML]

    **Phil, I'm assuming since we shouldn't name companies, the same goes for websites?

    It does unless you want to get banned for a week >_>


  • Registered Users Posts: 1,407 ✭✭✭Promac


    Not a coding thing as such but a developer with 20-odd years experience just asked me what "ide" we used for java development. Not IDE, the accronym, but "ide", as in rhymes with "hide".


  • Registered Users, Registered Users 2 Posts: 981 ✭✭✭fasty


    I know a developer who didn't get passing by reference and immutable objects.


  • Registered Users Posts: 20 dropstar


    Hi there

    I'm a software developer for a small company. I've been working here for about 18 months, and it's only now that some of the flaws in the way we do things have become apparent.

    Our codebase is very large - about 900,000 LOC, in mostly C++, though a lot of new projects are being written as .NET DLL plugins and the thing is patched together using COM interop. I say patched because it's a crappy, flimsy way to architect and you spend as much time fixing DLL-hell related issues such as interface registration, multiple side-by-side DLL versions and so on as you do implementing new code.

    We have 4 other full-time developers and two QA staff. So that works out at 180,000 lines of code per developer.
    I accept that most of the changes that take place are centred around a much smaller subset of that code, but it still seems like a ridiculous ratio. The codebase smacks of mid-90's Windows apps - a mess of C++, COM and ActiveX components and MFC-based UI, and this trend continues, due to the amount of legacy code that new features must interoperate with, and long-time developers being stuck in their ways.

    Our current project was due to be released three weeks ago - we're still here fixing bugs though. Every time we are about to hit RC status, QA find a new showstopper that forces us to perform another build. This I believe is due to a mixture of undirected feature creep/poor project planning, the codebase having reached critical mass, and understaffing. In fairness to QA, they are punching well above their weight in terms of the thoroughness with which they test our code. Given that there are only two of them, they apply due diligence at all stages of testing.

    There was no official spec for our current project; each developer was just emailed individually with the details of the features assigned to them. No group meetings between development (the people who know the codebase) and management (the people who don't) to discuss the feasibility and implications of changes needed for new features. Mind you, requirements were not set in stone either - they are big fans of "verbally speccing" new features i.e. just sitting down and firing ideas back and forth and going "yeah, let's change that, that sounds good". I worked late nights for weeks on end, and the process became increasingly annoying as when I got so far, repeatedly mgmt would pull the rug out from underneath my feet and say "hmmmmm, maybe we were on the wrong path here - let's change X to do Y instead." This makes the late nights feel like a waste of time, and it feels like trying to shoot a moving target while blindfolded. Your code is destined to deteriorate too as deadlines loom and you're subjecting it to rewrite after rewrite.

    It's a totally ad-hoc, trial-and-error implementation methodology. I know requirements gathering is hard, but hell we have dedicated sales and support teams, they KNOW what customers want to a degree that a formal spec can be delivered, mgmt don't seem to listen to them enough though.

    A great example was last week, when we were about to go RC, and our CEO comes over to our development team lead and suggests a new feature - while we're testing to go RC. The mental thing is, they put it in. So we're writing new code while testing what is supposedly a finished product. That flies in the face of everything I know about sound development methodologies. No cut-off point for new code, just fling it in there. Because our codebase is at critical mass, inevitably those changes create more bugs, which may take another couple of build-QA iterations to fix.


    Anyway, rant over - I needed to get that out of my system. Does anyone have any comment on or had to similar experiences to what I've described?


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


    dropstar wrote: »
    A great example was last week, when we were about to go RC, and our CEO comes over to our development team lead and suggests a new feature - while we're testing to go RC. The mental thing is, they put it in. So we're writing new code while testing what is supposedly a finished product.
    Argh! I would go nuts at the team lead for doing this and pretty much derailing the development/release process. He/she should have said "no, but we can add it to the list for the next release", unless it was absolutely critical (in which case, why didn't the team know about it weeks/months ago?).

    If middle/upper management are going to constantly move the goalposts and literally waste hours or days of your time, nobody should be putting in overtime - because the mess can continue for an unbounded length of time and unbounded overtime = major stress, major demotivation and even relationship and health problems.

    I hope things turn around or people start saying "no" to unreasonable requests a bit more often!


  • Advertisement
  • Closed Accounts Posts: 18,056 ✭✭✭✭BostonB


    I've seen all that and then it all mirrored on the database with DBA's on MS SQL or Oracle. I'd have to agree that saying no, is the solution. But too often its one specific manager that can't no and won't stop developing and start managing.

    I was asked recently how we could get out of a similar firefighting rut. The only answer I could think was to stop all development. Because it was just causing more work rather than reducing it. Especially certain people who just broke every rule in the book with every line of code. Causing two bugs for everyone they fixed.

    So I'd qualify that, stop all development except development that reduces the workload. But it has to have metrics on it, that are measurable.


  • Registered Users, Registered Users 2 Posts: 7,182 ✭✭✭Genghiz Cohen


    Gentlemen,
    I come to you as your king.
    This code crashes with an exception. (message sent to dealloc'd instance)
    Brought to you in part, by Objective-C.
    	//checkIData is an NSMutableArray alloc'd elsewhere
    	if (checkIData != nil) 
    	{
    		@try
    		{
    			NSLog(@"RC: %i",[checkIData retainCount]);//I crash here!
    			[checkIData release];
    			
    		}
    		@catch (id e) {
    			//wtf!
    			int i = 0;
    		}
    	}
    
    Srsly, if anyone knows what's up with an 'if' check and a 'try' block failing, let me know.


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


    Gentlemen,
    I come to you as your king.
    This code crashes with an exception. (message sent to dealloc'd instance)
    I don't know Obj-C, but could checkIData not have been deallocated (or never initialised), so it would pass the not-nil check and then crash?
    Or is the wtf that it's uncaught?


  • Registered Users, Registered Users 2 Posts: 5,618 ✭✭✭Civilian_Target


    Ooof - I was adding some new features to old code the other day (in java), and I came across an entire class, implementing an interface, defined.... in a method call!

    I mean, you can, but WHY?!


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


    dropstar wrote: »
    I'm a software developer for a small company. I've been working here for about 18 months, and it's only now that some of the flaws in the way we do things have become apparent... Does anyone have any comment on or had to similar experiences to what I've described?

    Polish up the CV and move before you get tainted so badly by the experience that you become a poor software developer by osmosis.

    I'm surprise the company is still in business, but then again the sales guys might be world class (Oracle in the 80s/90s).


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


    Ooof - I was adding some new features to old code the other day (in java), and I came across an entire class, implementing an interface, defined.... in a method call!

    I mean, you can, but WHY?!

    Years ago I remember seeing UNIX implemented in 2 LOC (a while and a for loop), can't find it on a quick search but it was an interesting demonstration.


  • Closed Accounts Posts: 2,930 ✭✭✭COYW


    Trojan wrote: »
    Polish up the CV and move before you get tainted so badly by the experience that you become a poor software developer by osmosis.

    I'm surprise the company is still in business, but then again the sales guys might be world class (Oracle in the 80s/90s).

    I agree in relation to the OP. Educate yourself in your own time and get up to speed with the latest technologies while you have get your CV out and about. I too have come to breaking point with my current company.


  • Registered Users, Registered Users 2 Posts: 1,235 ✭✭✭Odaise Gaelach


    I worked for one semester as an assistant demonstrator in a computer lab for a university.

    The students were learning data structures in Java, so almost everyone was using BlueJ or Net Beans. Except for this one guy who insisted on writing everything in Notepad and compiling it in the command prompt. Every second line was a system.out.println() call.

    I asked him why he wasn't using a proper IDE. He said that when he starts work for a company he would have to learn another IDE. Then he asked me for help to see why his code wasn't working. The bloody stuff was impossible to read with no indentations and '{' brackets all over the place.

    The first thing he asked my help for was a compiler error. Notepad, of course, doesn't have line numbers so I had to count down the lines until I came to the right one. A few minutes later he asked for my help again since his code was throwing an Exception. I ran it two or three times, gave up and told him to use an actual IDE with a debugger. I don't think he was that impressed. :)


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


    The first thing he asked my help for was a compiler error. Notepad, of course, doesn't have line numbers so I had to count down the lines until I came to the right one. A few minutes later he asked for my help again since his code was throwing an Exception. I ran it two or three times, gave up and told him to use an actual IDE with a debugger. I don't think he was that impressed. :)
    Actually... Notepad does have a "Goto line" function if you turn word wrap off.

    But yeah, from similar lab tutoring work I noticed a very strong correlation between people who used IDEs (even EditPlus or another decent editor, and batch scripts and other simple tools) passing and those who insisted on using Notepad not passing. It might actually be an interesting study...

    If I was lecturing a programming course, I'd probably mandate the use of a text editor and command prompt only for the first lab or two, then the use of an IDE (almost any one) for all subsequent labs.


  • Closed Accounts Posts: 18,056 ✭✭✭✭BostonB


    They should be taught to use an IDE with some source control.


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


    I thought you were supposed to learn the basics in a text editor without syntax highlighting so you would learn it better.

    Still gedit or notepad2 might sort out a lot of basic stuff before they start on an IDE


  • Registered Users, Registered Users 2 Posts: 856 ✭✭✭firefly08


    Emacs

    Only text editor/IDE you'll ever need.


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


    firefly08 wrote: »
    Emacs

    Only text editor/IDE you'll ever need.

    "emacs is a great operating system, but lacks a decent text editor"


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


    I thought you were supposed to learn the basics in a text editor without syntax highlighting so you would learn it better.

    Still gedit or notepad2 might sort out a lot of basic stuff before they start on an IDE

    We learned on notepad initially, recommended move to Editplus shortly afterwards. This was about 7 years ago mind. Shortly after that I discovered Eclipse and Netbeans. Then I stopped writing anything more modern than assembler.

    Looking at dusting off the Java and downloaded Eclipse and Netbeans. Get the impression that while Eclipse was the star the last time I was looking at it, Netbeans appears to better now.

    While I can understand the need to learn how to write code down at the coalface, I can't understand why people don't format their code properly, even in Notepad. At least then you see if there is any reasonable structure to it.


  • Closed Accounts Posts: 8,199 ✭✭✭G-Money


    Perl. I hate it.

    It is very hard to read and some of the code editors add in full stops instead of spaces/tabs so sometimes I can't tell if I'm looking at a tab/space or specially written code (I think Perl uses a full stop to concatenate strings just to confuse matters).

    Also annoying to be working in a development environment that I don't understand with perl modules all over the place and no good test environment with which to test my changes.

    A massively, massively frustrating experience.


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 558 ✭✭✭wobbles-grogan


    Perl. I hate it.

    It is very hard to read and some of the code editors add in full stops instead of spaces/tabs so sometimes I can't tell if I'm looking at a tab/space or specially written code (I think Perl uses a full stop to concatenate strings just to confuse matters).

    Also annoying to be working in a development environment that I don't understand with perl modules all over the place and no good test environment with which to test my changes.

    A massively, massively frustrating experience.

    You should probably tell your boss you dont understand the environment properly and to get someone to show you the works.

    He'll probably like you a lot more for asking than he would when you make a breaking change :-)


  • Registered Users, Registered Users 2 Posts: 2,534 ✭✭✭FruitLover


    You should probably tell your boss you dont understand the environment properly and to get someone to show you the works.

    Sounds like you've never been involved in a Perl team :rolleyes:


  • Closed Accounts Posts: 8,199 ✭✭✭G-Money


    FruitLover wrote: »
    Sounds like you've never been involved in a Perl team :rolleyes:

    This is ironically not far off the truth I think.


  • Registered Users, Registered Users 2 Posts: 1,109 ✭✭✭Skrynesaver


    Perl. I hate it.
    Then use a different language
    It is very hard to read
    Only if the person writing it doesn't write clearly, any language can suffer from obfuscation
    and some of the code editors add in full stops instead of spaces/tabs so sometimes I can't tell if I'm looking at a tab/space or specially written code (I think Perl uses a full stop to concatenate strings just to confuse matters).
    Don't show non printing characters, should be a configurable setting in most editors
    Also annoying to be working in a development environment that I don't understand
    that could be the issue alright
    with perl modules all over the place
    There are core modules that are part of the standard distribution and additional modules that can be added via CPAN, these additional modules can be packaged with the code you are writing for distribution.
    and no good test environment with which to test my changes.
    Test::More is a core module, try
    perldoc Test::More
    
    A massively, massively frustrating experience.

    Sorry to hear that, but it sounds as though you were dropped into a dev environment that you are unprepared for, I would ask for training if I were you.

    I work in a Perl environment and love it myself, can't stand that Java muck though but that might be because I haven't used it as much as I have Perl


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


    Only if the person writing it doesn't write clearly, any language can suffer from obfuscation
    While that's completely true, it's also completely true that Perl suffers from write-only coding a lot more than other languages.
    Sorry to hear that, but it sounds as though you were dropped into a dev environment that you are unprepared for, I would ask for training if I were you.
    +1
    You can't be expected to operate in a custom dev environment that doesn't exist outside of your company without some degree of training!


  • Registered Users, Registered Users 2 Posts: 1,109 ✭✭✭Skrynesaver


    Sparks wrote: »
    While that's completely true, it's also completely true that Perl suffers from write-only coding a lot more than other languages.

    This is true, however if some one commits an illegible ragbag of fancy tricks I will rip the face off them and tell them to take it to an entertainment forum.

    You can write code that is legible in Perl, there are some aspects of the current default operand and special variables that can reduce your typing time by 5 minutes and add days to each iteration of maintenance so write explicit code and "use English" (a little module that is one of the core modules) which allows you refer to the current line number of the file open for input as $INPUT_LINE_NUMBER as opposed to $.


  • Registered Users, Registered Users 2 Posts: 14,714 ✭✭✭✭Earthhorse


    Joseph... wrote: »
    dont bring troubles
    Joseph... wrote: »
    *trouble

    Thanks for the pointer.


  • Registered Users, Registered Users 2 Posts: 1,657 ✭✭✭komodosp


    I'm sick of code that's not properly indented! FFS, D********r has the ability to indent a block of code at a time so you've no excuses

    And maybe there's something I don't get here, but why have a <?php .... ?> on every line of php code? It makes it very hard to read and edit - just have a <?php at the start and ?> at the end of the block of code.


  • Registered Users, Registered Users 2 Posts: 7,157 ✭✭✭srsly78


    komodosp wrote: »
    I'm sick of code that's not properly indented! FFS, D********r has the ability to indent a block of code at a time so you've no excuses

    And maybe there's something I don't get here, but why have a <?php .... ?> on every line of php code? It makes it very hard to read and edit - just have a <?php at the start and ?> at the end of the block of code.

    Of all things to rage about :rolleyes: You realise most editors will just let you hit ctrl+I or whatever to autoindent everything? Stop using notepad ffs.

    Also perl is terrible and only good for writing hacky scripts. There is no such thing as a perl programmer, just jumped-up sysadmins.


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


    WHY CANT PEOPLE COMMENT CODE!

    F**K SAKE...

    started a new job a while ago, NONE of the code is commented.... 80k lines of code? Lovely thanks for that...


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


    Korvanica wrote: »
    started a new job a while ago, NONE of the code is commented.... 80k lines of code? Lovely thanks for that...
    And then when stuff is commented, there's a good chance it's:
    populateResultMap(); // get the result map
    int i = map.get("val"); // get val from the new map
    if(i > -1)
      params[i+1] = true; // set the appropriate parameter
    return dance(params); // do a dance
    
    etc :P


  • Registered Users, Registered Users 2 Posts: 1,657 ✭✭✭komodosp


    srsly78 wrote: »
    Of all things to rage about :rolleyes: You realise most editors will just let you hit ctrl+I or whatever to autoindent everything? Stop using notepad ffs.

    Also perl is terrible and only good for writing hacky scripts. There is no such thing as a perl programmer, just jumped-up sysadmins.

    Well if this exists in Dreamweaver (CS5) I'd like to know where it is!


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


    komodosp wrote: »
    Well if this exists in Dreamweaver (CS5) I'd like to know where it is!
    http://stackoverflow.com/questions/2146862/is-it-possible-to-auto-format-your-code-in-dreamweaver
    A quick Google search turns up these two possibilities:

    * Commands > Apply Formatting
    * Commands > Clean up HTML


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


    srsly78 wrote: »
    Of all things to rage about :rolleyes: You realise most editors will just let you hit ctrl+I or whatever to autoindent everything?
    And then you check in the code with clearcase, and someone else goes to findmerge in your changes and suddenly has thousands of merge fixes that they have to do by hand because clearcase doesn't know how to cope with changes in whitespace sanely.
    Also perl is terrible and only good for writing hacky scripts. There is no such thing as a perl programmer, just jumped-up sysadmins.
    Really? I've seen fortune 500 companies whose entire test teams did all their work in Perl. I think they might disagree with you. But you wouldn't know, because your email would have mysteriously stopped working :D

    I may hate Perl with a new-found passion, but at least I know it's a real language and does a lot of work that keeps things ticking over...


  • Registered Users, Registered Users 2 Posts: 981 ✭✭✭fasty


    +1 for Wrath of Khan (and as such Shakespeare?) paraphrasing!


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


    Also a wonderful threat to cow-orkers:
    Go away or I will replace you with 3 lines of perl.


  • Registered Users, Registered Users 2 Posts: 5,618 ✭✭✭Civilian_Target


    Sparks wrote: »
    And then you check in the code with clearcase, and someone else goes to findmerge in your changes and suddenly has thousands of merge fixes that they have to do by hand because clearcase doesn't know how to cope with changes in whitespace sanely..

    Top tip - you can install KDiff3 as your CC Merge tool and configure it to automatically manage whitespace merges.


  • Moderators, Education Moderators, Technology & Internet Moderators Posts: 35,100 Mod ✭✭✭✭AlmightyCushion


    Korvanica wrote: »
    WHY CANT PEOPLE COMMENT CODE!

    F**K SAKE...

    started a new job a while ago, NONE of the code is commented.... 80k lines of code? Lovely thanks for that...

    Had that in a job I worked at before. It was an old program written in vb6 and there was barely a comment in sight. It was used by a boat load of people and it had loads of bugs which meant every month without fail there was about half a dozen bugs reported for it. Guess who had the joy of sorting most of those bug fixes. I tried commenting as much as I could as I went along but it was like pissing on a house fire. There was talk of replacing it but it kept getting put off for various reasons. I hope for the sake of everyone there that they eventually done it.


  • Registered Users, Registered Users 2 Posts: 21,264 ✭✭✭✭Hobbes


    Korvanica wrote: »
    WHY CANT PEOPLE COMMENT CODE!
    dim n as integer ' variable used for for loop.
    for n = 1 to 10 ' This is the start of a for loop.
      call method()  ' Calling method. 
    next n              ' Continue until 10 iterations.
    ' END OF LOOP!
    

    :) That is worse.


  • Registered Users, Registered Users 2 Posts: 2,150 ✭✭✭dazberry


    {-------------------------------------------------------------------------------
    Name        : TfrmQueue.tvUnderWriterCollapsing
    Description : Don't allow the list to be collapsed
    Input       : Sender: TObject
                  Node: TTreeNode
    In-/Output  : AllowCollapse: Boolean
    Author      : *********
    Date        : 10/01/200*
    Revision history:
    ! Date       ! Sign   ! Description                                     !
    ! 10/01/200* ! *********
    -------------------------------------------------------------------------------}
    
    procedure TMain.tvAgentsCollapsing( Sender: TObject;
      Node: TTreeNode; var AllowCollapse: Boolean );
    begin
      inherited;
     // AllowCollapse := false;
    end;
    
    

    This sort of comment drives me nuts, 12 lines that tells me practically nothing, just takes up space, date and author in there twice. Comment doesn't reflect what the code actually does, and it's boiler plate code anyway, but ********* obviously had it as a template, and put if f**king everywhere. Actual code wasn't any better.

    I'm a great believer in SoC. It drives me mad when someone is adding something to my code and they drop say a query component on a form and embed SQL in the UI layer, and these are so called senior guys stuck in the 90s RAD paradigm :mad: :mad: :mad:

    D.


  • Advertisement
Advertisement