Timeline for I'm forced to write bad code. How do I save my face? [closed]
Current License: CC BY-SA 3.0
38 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Sep 12, 2013 at 5:32 | review | Reopen votes | |||
| Sep 12, 2013 at 10:54 | |||||
| Jan 30, 2012 at 12:50 | history | closed | CommunityBot | off topic | |
| Jan 30, 2012 at 3:33 | history | edited | user28988 | Deleted Career tag | |
| Oct 27, 2011 at 21:35 | comment | added | Billy ONeal | @Oliver: Newlines have nothing to do with more readable or cleaner code. I would call not worrying about something as insignificant as a few newlines following KISS. | |
| Oct 27, 2011 at 20:24 | comment | added | Olivier Pons | @BillyONeal: I'm just trying to say that making code that helps beginners avoiding mistakes should not be the priority, because it may leave to bad code. Maybe concentrate on writing clean code and more understandable code (KISS principle) is more important than everything else. And when you develop with Drupal it's the exact opposite of KISS. That's all what I was trying to say. (Yes I've been working on Drupal for more than 2 months and if I wasn't paid that much I would have thrown that "thing" away almost from the beginning) | |
| Oct 27, 2011 at 15:03 | comment | added | Billy ONeal | @Oliver: Leaving off the ?> is perfectly valid. It's the standard on most PHP projects I've seen. Yes, PHP interprets anything after that as HTML, and that is a mistake. But if you leave off the end tag, there's nothing treated as HTML. If you're that worried about a couple of newlines on the end of your source you've got bigger problems than PHP end tags. | |
| Oct 27, 2011 at 8:38 | comment | added | Olivier Pons | @BillyONeal: when you close your code with ?> and then let some blank lines, Php interprets those blank lines as HTML and then sends them, so you can't send headers anymore, that's why code with ?> and blank lines after may be considerered as an error, and it's a classical beginner's mistake. To avoid this, Drupal asks not to finish at all with ?>. And this is really bad for me, because it encourages to write bad code ("never mind, leave a lot of blank lines, no problem"). I hate that. | |
| Oct 26, 2011 at 19:05 | comment | added | Billy ONeal | @Olivier: Blank lines at the end are not mistakes. | |
| Oct 26, 2011 at 13:05 | comment | added | Olivier Pons | @BillyONeal: When I see that Drupal encourages not to close Php files with ?> so that beginners will never see their mistakes (lot of blank lines at the end), and I could say 10x more... I just can say you're damn right, even though I love Php. | |
| Jul 6, 2011 at 21:20 | comment | added | user7519 | @Billy, actually it isn't another argument, that is my argument :-) | |
| Jul 6, 2011 at 21:06 | comment | added | Billy ONeal | @Jarrod: As much as I hate PHP, I do have to say, it's not the language's job to encourage decent code. (PHP actually discourages decent code, which is why I hate it, but that's another argument...) | |
| Jul 6, 2011 at 18:41 | answer | added | GrandmasterB | timeline score: 0 | |
| Jul 6, 2011 at 16:49 | answer | added | Eric Darchis | timeline score: 0 | |
| Jul 6, 2011 at 14:07 | comment | added | JAB | "error reporting turned off for development" How exactly is error reporting done in PHP that this would ever be a good idea in the development stage? | |
| Jul 6, 2011 at 13:55 | comment | added | Satanicpuppy | @ashamed: Sometimes it's more important to have it quick than to have it good. (siryes.blogspot.com/2010/11/…) | |
| Jul 6, 2011 at 12:26 | history | tweeted | twitter.com/#!/StackProgrammer/status/88584615652114432 | ||
| Jul 6, 2011 at 12:20 | comment | added | Wayne Molina | Sorry but there are right and wrong ways to write code. The right way uses standard industry practices; the bad way hacks together shit and says it "works". | |
| Jul 6, 2011 at 12:16 | answer | added | keppla | timeline score: 10 | |
| Jul 6, 2011 at 11:46 | answer | added | Jeremy French | timeline score: 3 | |
| Jul 6, 2011 at 11:21 | comment | added | Ashamed One | If the examples I gave do not indicate that the code is terrible, then I'm afraid I should consider career change. | |
| Jul 6, 2011 at 11:12 | comment | added | Emil Ahlbäck | I know the feeling! I was forced to work with a really ugly codebase and a 'template system' that forced you to escape your HTML (<div class=\"some_class\">) in May. Needless to say I did not put my name in that code. Luckily the chance of this code being open sources is very slim. | |
| Jul 6, 2011 at 11:09 | comment | added | jwenting | Most times I see comments like this, it's inexperienced kids thinking they know it all, that everything that's in the least different from their preferred way the world should work is "bad". Without any indication otherwise, I have to conclude the same thing here. | |
| Jul 6, 2011 at 10:03 | answer | added | user28510 | timeline score: 2 | |
| Jul 6, 2011 at 6:12 | answer | added | tdammers | timeline score: 8 | |
| Jul 6, 2011 at 1:55 | comment | added | Michael | @Kyralessa That's so true it brings me to tears :( And I'd squeeze the time scale to something more like six months. | |
| Jul 6, 2011 at 1:30 | comment | added | user1249 | None of these are "really terrible" by themselves. | |
| Jul 6, 2011 at 1:27 | comment | added | Ashamed One | @Thorbjørn: Where do I start? require's used like function calls, if there are functions they are 1000 lines long, code reuse achieved through copy & paste, no coding standards, error reporting turned off for development, the list goes on and on, but I should not be showing the actual code. | |
| Jul 6, 2011 at 1:18 | comment | added | user7519 | face it PHP encourages "quick and dirty" by not discouraging it and making it easy to d matter of fact I would say PHP excels at "qucik and dirty" better than any other language, except maybe Perl, once that momentum is established it is hard to stop especially if management is encouraging the behavior as well. In the end code that appears to function, regardless of practices is more valuable to the company than no code at all. | |
| Jul 6, 2011 at 1:14 | answer | added | Bob Murphy | timeline score: 40 | |
| Jul 6, 2011 at 1:14 | comment | added | Kyralessa | If it's any consolation, even good code you write today will look bad to you in five years. | |
| Jul 6, 2011 at 1:14 | comment | added | user1249 | Can we see some samples of what exactly you mean with "bad code"? | |
| Jul 6, 2011 at 0:55 | answer | added | Rook | timeline score: 60 | |
| Jul 6, 2011 at 0:41 | comment | added | S.Lott | "encouraging quick and dirty hacks"? Encouraging? Which is worse. Your pride (and finding a new job) or sticking with this job. It may not be bad to stand up for what's right. What's stopping you? Threats of violence? Blackmail? Criminal proceedings? Seriously. What stops you from writing good code? Please be specific. And honest. | |
| Jul 6, 2011 at 0:38 | answer | added | Amy Anuszewski | timeline score: 132 | |
| Jul 6, 2011 at 0:36 | comment | added | Ashamed One | Boss breathing down my neck encouraging quick and dirty hacks | |
| Jul 6, 2011 at 0:33 | answer | added | user29981 | timeline score: 3 | |
| Jul 6, 2011 at 0:30 | comment | added | Thomas Owens♦ | How are you forced to write bad code? Why can't you stand up, stop putting your name to bad code, and explain the problem, the solution, the cost in terms of time, effort, and money, and the benefits of fixing the problems now to your superiors? | |
| Jul 6, 2011 at 0:24 | history | asked | Ashamed One | CC BY-SA 3.0 |