Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Programming question

Programming question

Scheduled Pinned Locked Moved The Lounge
question
79 Posts 50 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Slacker007

    If you are writing an app that no one will see (other devs), do you still follow best practices i.e. creating classes, data access layers, blah, blah, blah? or, do you say f'it and write the app like a retard? i.e. putting all 5-8K lines of code in one form class and calling it a day. I am being asked by a senior dev to do something that I feel is fundamentally wrong as a programmer but he is the "senior" dev and thus must be obeyed.

    Just along for the ride. "the meat from that butcher is just the dogs danglies, absolutely amazing cuts of beef." - DaveAuld (2011)
    "No, that is just the earthly manifestation of the Great God Retardon." - Nagy Vilmos (2011)

    G Offline
    G Offline
    GateKeeper22
    wrote on last edited by
    #36

    You have to remember that the senior developer may know the bigger picture. Best thing to do is ask them why they want you to do it this way. If they are a good senior developer they will give you a good answer and explain how/why they came to that conclusion. If they say it is just because the project isn't going to be around long than I would be a little suspicious of that. I have worked with both bad and good senior developers. The good ones always explain why they decided to do something when you ask them. The bad ones get offended usually and give you a generic answer like it is temporary or only one person will use it.

    1 Reply Last reply
    0
    • S Slacker007

      If you are writing an app that no one will see (other devs), do you still follow best practices i.e. creating classes, data access layers, blah, blah, blah? or, do you say f'it and write the app like a retard? i.e. putting all 5-8K lines of code in one form class and calling it a day. I am being asked by a senior dev to do something that I feel is fundamentally wrong as a programmer but he is the "senior" dev and thus must be obeyed.

      Just along for the ride. "the meat from that butcher is just the dogs danglies, absolutely amazing cuts of beef." - DaveAuld (2011)
      "No, that is just the earthly manifestation of the Great God Retardon." - Nagy Vilmos (2011)

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #37

      When it comes to coding, perfection is an attitude. You either have it or you don't have it, irrespective of whether others work with your code or not.

      1 Reply Last reply
      0
      • N Nagy Vilmos

        For God's sake, do it right! I have seen too many /quick jobs/ that evolved from helping one person to becoming used company wide. Where the code is shyte, the extensibility is greatly reduced and at some point the whole shedangs need to be redone. [edit] Looks like I can not spell today.


        Panic, Chaos, Destruction. My work here is done. Drink. Get drunk. Fall over - P O'H OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre I cannot live by bread alone. Bacon and ketchup are needed as well. - Trollslayer Have a bit more patience with newbies. Of course some of them act dumb - they're often *students*, for heaven's sake - Terry Pratchett

        G Offline
        G Offline
        GuyThiebaut
        wrote on last edited by
        #38

        I completely agree with your point and I would go further - if this person insists on it then: 1)get them to write an email to you making it clear it is their decision(keep this email). 2)comment the code to show it is their decision. This way when the manure hits the fan you are covered... although not in manure...

        “That which can be asserted without evidence, can be dismissed without evidence.”

        ― Christopher Hitchens

        1 Reply Last reply
        0
        • N Nagy Vilmos

          For God's sake, do it right! I have seen too many /quick jobs/ that evolved from helping one person to becoming used company wide. Where the code is shyte, the extensibility is greatly reduced and at some point the whole shedangs need to be redone. [edit] Looks like I can not spell today.


          Panic, Chaos, Destruction. My work here is done. Drink. Get drunk. Fall over - P O'H OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre I cannot live by bread alone. Bacon and ketchup are needed as well. - Trollslayer Have a bit more patience with newbies. Of course some of them act dumb - they're often *students*, for heaven's sake - Terry Pratchett

          H Offline
          H Offline
          Henry Minute
          wrote on last edited by
          #39

          Nagy Vilmos wrote:

          Looks like I can not spell today.

          Damned right! That should be 'Sac'. Apropos of your scrotum, I give you Why you can't comb a hairy ball[^]. Although it might be entertaining to get your SO to try.

          Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.” I wouldn't let CG touch my Abacus! When you're wrestling a gorilla, you don't stop when you're tired, you stop when the gorilla is.

          1 Reply Last reply
          0
          • S Slacker007

            If you are writing an app that no one will see (other devs), do you still follow best practices i.e. creating classes, data access layers, blah, blah, blah? or, do you say f'it and write the app like a retard? i.e. putting all 5-8K lines of code in one form class and calling it a day. I am being asked by a senior dev to do something that I feel is fundamentally wrong as a programmer but he is the "senior" dev and thus must be obeyed.

            Just along for the ride. "the meat from that butcher is just the dogs danglies, absolutely amazing cuts of beef." - DaveAuld (2011)
            "No, that is just the earthly manifestation of the Great God Retardon." - Nagy Vilmos (2011)

            J Offline
            J Offline
            jschell
            wrote on last edited by
            #40

            Slacker007 wrote:

            putting all 5-8K lines of code in one form class and calling it a day.

            Where "form" is a GUI of some sort right? Why would you be writing something like that where there is no possibility that another developer would ever see it? That of course means that no one else would ever use it either. Because by definition if someone else needs to use it then it becomes a supported product which means someone else we need to look at the code someday.

            Slacker007 wrote:

            I am being asked by a senior dev to do something that I feel is fundamentally wrong as a programmer

            Presumably that person is telling you to hack it rather than do it correctly. Guess it depends on the situation. One alternative is to do it right then write an app that concantenates it into one massive ill-formated mess.

            1 Reply Last reply
            0
            • S Slacker007

              If you are writing an app that no one will see (other devs), do you still follow best practices i.e. creating classes, data access layers, blah, blah, blah? or, do you say f'it and write the app like a retard? i.e. putting all 5-8K lines of code in one form class and calling it a day. I am being asked by a senior dev to do something that I feel is fundamentally wrong as a programmer but he is the "senior" dev and thus must be obeyed.

              Just along for the ride. "the meat from that butcher is just the dogs danglies, absolutely amazing cuts of beef." - DaveAuld (2011)
              "No, that is just the earthly manifestation of the Great God Retardon." - Nagy Vilmos (2011)

              F Offline
              F Offline
              fjdiewornncalwe
              wrote on last edited by
              #41

              My philosophy is to write all my code as though it is going to be put up on a screen with all my peers there to see it. It keeps me motivated to mind my p's and q's. Also, remember that given time, you may also become a senior developer and the code you write on the way up may find its way into the hands of the next more junior guy to come along. Write code that you would stand behind, or at minimum, make sure the comments are very, very clear as to why you are creating the thing in a crappy way.

              I wasn't, now I am, then I won't be anymore.

              S 1 Reply Last reply
              0
              • N Nagy Vilmos

                For God's sake, do it right! I have seen too many /quick jobs/ that evolved from helping one person to becoming used company wide. Where the code is shyte, the extensibility is greatly reduced and at some point the whole shedangs need to be redone. [edit] Looks like I can not spell today.


                Panic, Chaos, Destruction. My work here is done. Drink. Get drunk. Fall over - P O'H OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre I cannot live by bread alone. Bacon and ketchup are needed as well. - Trollslayer Have a bit more patience with newbies. Of course some of them act dumb - they're often *students*, for heaven's sake - Terry Pratchett

                F Offline
                F Offline
                fjdiewornncalwe
                wrote on last edited by
                #42

                I've seen this to. I currently support a couple "proof of concept" applications that are in live production environments.

                I wasn't, now I am, then I won't be anymore.

                D 1 Reply Last reply
                0
                • F fjdiewornncalwe

                  My philosophy is to write all my code as though it is going to be put up on a screen with all my peers there to see it. It keeps me motivated to mind my p's and q's. Also, remember that given time, you may also become a senior developer and the code you write on the way up may find its way into the hands of the next more junior guy to come along. Write code that you would stand behind, or at minimum, make sure the comments are very, very clear as to why you are creating the thing in a crappy way.

                  I wasn't, now I am, then I won't be anymore.

                  S Offline
                  S Offline
                  Slacker007
                  wrote on last edited by
                  #43

                  Marcus Kramer wrote:

                  My philosophy is to write all my code as though it is going to be put up on a screen with all my peers there to see it. It keeps me motivated to mind my p's and q's.

                  A very good philosophy at that. I agree.

                  Marcus Kramer wrote:

                  Also, remember that given time, you may also become a senior developer and the code you write on the way up may find its way into the hands of the next more junior guy to come along. Write code that you would stand behind, or at minimum, make sure the comments are very, very clear as to why you are creating the thing in a crappy way.

                  :thumbsup:

                  Just along for the ride. "the meat from that butcher is just the dogs danglies, absolutely amazing cuts of beef." - DaveAuld (2011)
                  "No, that is just the earthly manifestation of the Great God Retardon." - Nagy Vilmos (2011) "It is the celestial scrotum of good luck!" - Nagy Vilmos (2011)

                  1 Reply Last reply
                  0
                  • R realJSOP

                    Tell him you're getting a woody, and he'll leave you alone. Trust me on this. EDIT ============== 1-voted AGAIN! Geeze! And to think this isn't even the funniest thing I've posted today... :)

                    ".45 ACP - because shooting twice is just silly" - JSOP, 2010
                    -----
                    You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
                    -----
                    "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997

                    B Offline
                    B Offline
                    BillWoodruff
                    wrote on last edited by
                    #44

                    Do you think telling him you have a nine-iron could have the same effect ? best, Bill

                    "For no man lives in the external truth among salts and acids, but in the warm, phantasmagoric chamber of his brain, with the painted windows and the storied wall." Robert Louis Stevenson

                    1 Reply Last reply
                    0
                    • R realJSOP

                      Tell him you're getting a woody, and he'll leave you alone. Trust me on this. EDIT ============== 1-voted AGAIN! Geeze! And to think this isn't even the funniest thing I've posted today... :)

                      ".45 ACP - because shooting twice is just silly" - JSOP, 2010
                      -----
                      You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
                      -----
                      "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997

                      L Offline
                      L Offline
                      Lost User
                      wrote on last edited by
                      #45

                      John Simmons / outlaw programmer wrote:

                      the funniest thing I've posted today

                      now that's a matter of opinion... Just thought I'd notify you of my intention of down-voting everything you post from now on - as your responses to 1-votes are far more entertaining than your normal posts :) And if you'd told my previous project manager you were getting a woody, he would more likely ask you to attend a private scrum meeting than be put off..

                      MVVM# - See how I did MVVM my way ___________________________________________ Man, you're a god. - walterhevedeich 26/05/2011 .\\axxx (That's an 'M')

                      1 Reply Last reply
                      0
                      • C Corporal Agarn

                        Erudite_Eric wrote:

                        or die

                        Until six months later when you try and edit the code. :)

                        L Offline
                        L Offline
                        Lost User
                        wrote on last edited by
                        #46

                        See, this is where I have a problem. Loads of people say classes classes classes when talking about quality, easy to read code, yet I have ssen worse spaghetti code using classes than with procedural code.

                        ============================== Nothing to say.

                        C 1 Reply Last reply
                        0
                        • N Nagy Vilmos

                          For God's sake, do it right! I have seen too many /quick jobs/ that evolved from helping one person to becoming used company wide. Where the code is shyte, the extensibility is greatly reduced and at some point the whole shedangs need to be redone. [edit] Looks like I can not spell today.


                          Panic, Chaos, Destruction. My work here is done. Drink. Get drunk. Fall over - P O'H OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre I cannot live by bread alone. Bacon and ketchup are needed as well. - Trollslayer Have a bit more patience with newbies. Of course some of them act dumb - they're often *students*, for heaven's sake - Terry Pratchett

                          D Offline
                          D Offline
                          Donkey Master
                          wrote on last edited by
                          #47

                          I agree that many projects go from being used by one person to being used company wide. But many more don't. If what you care most is to have your program up and running ASAP, go for it. No need to setup proper security or error handling or input checking. If it turns out that the program is valuable enough to be extended and maintained, rewrite it from scratch right away. I usually write neat code, no matter what, because it always takes way more time to decide what your program is going to do, than it does to write the actual code. I care more about the code being *reusable* and understandable when I come back to it in one month, than about objects, naming conventions, magic numbers, and having the names of servers written in the code. I don't mind having one class with 4 methods, if I deem the code clear and concise.

                          "Computer Science is no more about computers than astronomy is about telescopes." - Edsger Dijkstra

                          1 Reply Last reply
                          0
                          • L Lost User

                            See, this is where I have a problem. Loads of people say classes classes classes when talking about quality, easy to read code, yet I have ssen worse spaghetti code using classes than with procedural code.

                            ============================== Nothing to say.

                            C Offline
                            C Offline
                            Corporal Agarn
                            wrote on last edited by
                            #48

                            Had a guy who loved classes so much everything was a class. We canned his code when he was asked to make a change and he could not decipher his "classes". Every variable had a class! By the way there were no comments.

                            L 1 Reply Last reply
                            0
                            • S Slacker007

                              If you are writing an app that no one will see (other devs), do you still follow best practices i.e. creating classes, data access layers, blah, blah, blah? or, do you say f'it and write the app like a retard? i.e. putting all 5-8K lines of code in one form class and calling it a day. I am being asked by a senior dev to do something that I feel is fundamentally wrong as a programmer but he is the "senior" dev and thus must be obeyed.

                              Just along for the ride. "the meat from that butcher is just the dogs danglies, absolutely amazing cuts of beef." - DaveAuld (2011)
                              "No, that is just the earthly manifestation of the Great God Retardon." - Nagy Vilmos (2011)

                              F Offline
                              F Offline
                              Fran Porretto
                              wrote on last edited by
                              #49

                              Is there a possibility that you'll be asked to maintain that app at some future time?

                              Programs have a way of confounding our expectations for "how long they'll live." I wrote what I thought was a throwaway in 1995 that's still in use today -- and I still get calls to extend it. By contrast, I put three years of my life into a microprogram that was obsoleted within four months and never used again.

                              If you can't be sure, err on the side of caution. Make it easy for you to understand and maintain, no matter how much time should pass.

                              (This message is programming you in ways you cannot detect. Be afraid.)

                              S 1 Reply Last reply
                              0
                              • F Fran Porretto

                                Is there a possibility that you'll be asked to maintain that app at some future time?

                                Programs have a way of confounding our expectations for "how long they'll live." I wrote what I thought was a throwaway in 1995 that's still in use today -- and I still get calls to extend it. By contrast, I put three years of my life into a microprogram that was obsoleted within four months and never used again.

                                If you can't be sure, err on the side of caution. Make it easy for you to understand and maintain, no matter how much time should pass.

                                (This message is programming you in ways you cannot detect. Be afraid.)

                                S Offline
                                S Offline
                                Slacker007
                                wrote on last edited by
                                #50

                                Fran Porretto wrote:

                                Is there a possibility that you'll be asked to maintain that app at some future time?

                                Absolutely. This is why I am concerned.

                                Just along for the ride. "the meat from that butcher is just the dogs danglies, absolutely amazing cuts of beef." - DaveAuld (2011)
                                "No, that is just the earthly manifestation of the Great God Retardon." - Nagy Vilmos (2011) "It is the celestial scrotum of good luck!" - Nagy Vilmos (2011)

                                1 Reply Last reply
                                0
                                • S Slacker007

                                  If you are writing an app that no one will see (other devs), do you still follow best practices i.e. creating classes, data access layers, blah, blah, blah? or, do you say f'it and write the app like a retard? i.e. putting all 5-8K lines of code in one form class and calling it a day. I am being asked by a senior dev to do something that I feel is fundamentally wrong as a programmer but he is the "senior" dev and thus must be obeyed.

                                  Just along for the ride. "the meat from that butcher is just the dogs danglies, absolutely amazing cuts of beef." - DaveAuld (2011)
                                  "No, that is just the earthly manifestation of the Great God Retardon." - Nagy Vilmos (2011)

                                  F Offline
                                  F Offline
                                  Fabio Franco
                                  wrote on last edited by
                                  #51

                                  They are called best practices for a reason. They are not made for other developers, they are made for every developer, including yourself. The initial overhead might suck, but it surely pays off on the long run. You don't want to have your own magic code come after your ass later on. And there's no such thing no one else will see. Eventually someone will see it, you never know when a project gets more people involved, or when it switches hands. Be kind to the developer that comes to support your application when you're gone. He might even give you a call to say thank you, instead of "what the hell you've done here?"

                                  "To alcohol! The cause of, and solution to, all of life's problems" - Homer Simpson

                                  S 1 Reply Last reply
                                  0
                                  • F fjdiewornncalwe

                                    I've seen this to. I currently support a couple "proof of concept" applications that are in live production environments.

                                    I wasn't, now I am, then I won't be anymore.

                                    D Offline
                                    D Offline
                                    Danny Martin
                                    wrote on last edited by
                                    #52

                                    Marcus Kramer wrote:

                                    I've seen this to. I currently support a couple...

                                    Are we talking about code or Henry's hairy balls here? :omg: Danny

                                    1 Reply Last reply
                                    0
                                    • S Slacker007

                                      If you are writing an app that no one will see (other devs), do you still follow best practices i.e. creating classes, data access layers, blah, blah, blah? or, do you say f'it and write the app like a retard? i.e. putting all 5-8K lines of code in one form class and calling it a day. I am being asked by a senior dev to do something that I feel is fundamentally wrong as a programmer but he is the "senior" dev and thus must be obeyed.

                                      Just along for the ride. "the meat from that butcher is just the dogs danglies, absolutely amazing cuts of beef." - DaveAuld (2011)
                                      "No, that is just the earthly manifestation of the Great God Retardon." - Nagy Vilmos (2011)

                                      A Offline
                                      A Offline
                                      Alexander DiMauro
                                      wrote on last edited by
                                      #53

                                      If it's throw-away code, for example, something I am just trying out, then, no, I don't always follow best practices. But, other than that, yes, I always do. Bad code will haunt you at night... :~

                                      The world is going to laugh at you anyway, might as well crack the 1st joke! My code has no bugs, it runs exactly as it was written.

                                      1 Reply Last reply
                                      0
                                      • OriginalGriffO OriginalGriff

                                        Nagy Vilmos wrote:

                                        becoming used company wide

                                        Or worse. I was asked to do a rush demo about 25 years ago - work through the weekend, hurl it together job for demo on Monday. "OK," says I "provided everyone understands it's a demo only, and we will need months to get the full thing working properly." "Yes, yes - just do it" comes the reply. Take the computer home, coffee, pizza, hack hack. Monday the demo is up and limping. What happens? The sales guys sold it and we had to maintain that POS for three years...

                                        Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water

                                        R Offline
                                        R Offline
                                        RineezTVM
                                        wrote on last edited by
                                        #54

                                        Where is that sales guy now!?

                                        OriginalGriffO 1 Reply Last reply
                                        0
                                        • R RineezTVM

                                          Where is that sales guy now!?

                                          OriginalGriffO Offline
                                          OriginalGriffO Offline
                                          OriginalGriff
                                          wrote on last edited by
                                          #55

                                          From 25 years ago? Probably dead of liver failure, given the amount "good" salesmen tend to drink...

                                          Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water

                                          "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
                                          "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups