Added: 4 years ago
From: codingkriggs
Views: 3,381
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (9)

Sign In or Sign Up now to post a comment!
  • I love using public attributes you can access directly! My objects are not shy. It's about time consumption. Most of time I can't figure out what the disadvantage would be to not spend the extra time.  Also a lot of times good design comes from the "first make it work, then make it pretty" approach. Sometimes It's easier to see how to do it "right" from the vantage point of having done it "wrong."

  • I'd rather work on code that has too many comments than otherwise. Time spent placing a short comment on a line one time, is later paid off many times over when others have to work on it.

    I agree with being flexible with brace indentation, etc. But I do think variables should have meaningful names, even if they are long. I'd much rather see "current_coin_weight_estimate" instead of stuff like "ccowe" which has driven me nuts in the past.

  • I hate it when people think they NEED to comment everything. I totally agree with you in this regards, only complex algorithms need commenting. Comments should explain the logic, NOT THE SYNTAX!

    Code everything in pieces and then CORRECT IT, so you can test each piece independently. Otherwise you will end up debugging your program for hours.

    To Janis2006: UML is not a way to think! UML is a way to document your work.

  • About the Singleton and passing arguments: Would you propose passing a DB handler, or a connection string, to every method in an application that needs data from a DB?

  • DB handler. Because a DB is system external to your application (ie. implementation of DBMS is outside of your control), you will want to abstract away implementation-specific details, such as connection strings, into your DB handler. That connection string would be specified in the DB handler's constructor. You would likely only call the constructor once in the whole program, making it a de facto singleton, without necessarily all the fancy singleton code.

  • I Agree Comments in CODE are a wast of time.

    !Real Developers dont Document if it was hard to write it should be hard to understand! as per TGeek

  • Code without comments? What the hell are you doing with it - coding it and then throwing it in the trash?!

    Engineers come back to code sometimes 15 years after they've written it. Try to decipher your intentions on a video driver you wrote ...while on a deadline!

  • Team sharing a common coding standard: This would actually help in a large program as it makes it easier to continue another programmers work if there are helpful things like comments. comments could also include revised code so it assists the progress made. it's not necessary to comment all lines but long functions which can be used elsewhere should be commented and if it's a formal project that needs to be assessed it would make this easier.

  • In response to: "languages need to be able to restrict ranges on parameters"

    Languages DO exist that handle this. Look at Ada

  • 7.. in csharp you have interfaces

    and we just use comments like //get set make

    1.. uml is the best way to do it. i think ..

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more