Programming question
-
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
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
-
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.
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.
-
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)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.)
-
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.)
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) -
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)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
-
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.
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
-
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)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.
-
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
-
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
-
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)We don't follow good coding practices to show others! We follow those for our own sake. He is probably a Senior dev by accident. You may write such crappy code if you are sure you will never ever have to maintain any part of it. But remember God is watching u. :)
-
It is the celestial scrotum of good luck!
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
Rotflmfao
-
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
well said and very true.
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) -
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)Always do it right. If the "senior" says you need to do it wrong... Make sure it is known by other people that he ordered you to do it wrong. And protest heavily. That's what I would do.
-
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) -
wout de zeeuw wrote:
Someday a guy younger than you will come along and think you're the idiot.
not a chance in hell. :cool:
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)that makes me older than you. ;P
-
Yep. you really pissed someone off. I gave you a fiver to compensate.
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)The funny thing is that the rating system 'downrates' outliers anyway, so the assembled 'make up for' 5ers may actually cause a higher rating in the end! :D
-
Erudite_Eric wrote:
or die
Until six months later when you try and edit the code. :)
Why edit? Refactor!
-
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)Of course. I'll have to look at it again some day even if no one else does.
-
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)Rigth, you can do your app without follow best practices. Even you can do it without follow any practice at all. But, unless the app would be for your personal use, or you're the company owner, you can't be absolutely sure that somebody else should have to modify your code one day. And regardless if you or someone else will modify the app after, it's a good thing to use a practice instead of do the things at fly, or in spaghetti style, because although you delay more time to do the app today, you could be saving to shoot your feet in the future. In other hand, if setting the title of 'senior' to every developer could make them good developers, that will solve all the development issues in the IT world ;P . P.D.: The first lesson of a good teacher is that he NOT always is right.
-
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)Integrity is what you do when no one is watching