|
gold brick posted:
I'm going to guess that this is part of an API which a lot of customers use?
|
# ? Aug 21, 2012 16:51 |
|
|
# ? Apr 29, 2024 02:51 |
|
gold brick posted:
Avatar/Post Combo Seriously how could such a long as comment be completely wrong?
|
# ? Aug 21, 2012 17:06 |
|
Optimus Prime Ribs posted:The morons whom my boss picked to host our servers have kept up their reputation of being incompetently unreliable; just came into work to find this on every site: (Then again, I can't figure out which is worse; no error logging at all or publicly visible error messages. I guess it depends on how many other horrors are present.)
|
# ? Aug 21, 2012 17:30 |
|
Zamujasa posted:Not redirecting error logging to a file in production is the real horror. You redirect logging to a file? Not syslog?
|
# ? Aug 21, 2012 18:28 |
|
Doctor w-rw-rw- posted:You redirect logging to a file? Not syslog? /dev/log
|
# ? Aug 21, 2012 19:04 |
|
Zamujasa posted:Not redirecting error logging to a file in production is the real horror. Yeah, I know I shouldn't be doing it, but everything about the system I work with (which is outside of my control) is a horribly broken mess, so I just said "gently caress it" since at that point it would pretty much just be putting lipstick on a pig. I don't like where I work.
|
# ? Aug 21, 2012 19:24 |
|
Doctor w-rw-rw- posted:You redirect logging to a file? Not syslog? I mostly meant switching PHP from "puke errors onto webpage" to using error_log; not necessarily one or the other. The important part is getting it out of the webpage and into a place you can track/review without interfering with the end-user, I guess. Optimus Prime Ribs posted:Yeah, I know I shouldn't be doing it, but everything about the system I work with (which is outside of my control) is a horribly broken mess, so I just said "gently caress it" since at that point it would pretty much just be putting lipstick on a pig. You aren't alone. Pretty much all of the files on our server have error_reporting(0) (or a similar equivalent using ini_set) glued to the top. I've given up on trying to fix the problems. You might be able to get away with putting a .htaccess file with logging settings in the root of your web files if you can't modify php.ini for whatever reason, though. If you're not using Apache, there might be other ways. Speaking of copy-paste cargo-culting, my boss recently stuffed some random <meta> tag into a bunch of our Ajax results because there was some problem with IE9 or whatever. I don't think he understands how these things work... It's a good thing we always return raw HTML (Then again, this is the same person who wanted to add some hack to every page to stop Chrome from offering to translate from Czech instead of spelling his words right.)
|
# ? Aug 21, 2012 19:47 |
|
Zamujasa posted:You might be able to get away with putting a .htaccess file with logging settings in the root of your web files if you can't modify php.ini for whatever reason, though. Don't have access to php.ini, any server settings, or even the www folder; I also don't have a dev environment. Crap like that is why I don't have the motivation to do proper error logging, and even if I did I don't know where error_log logs the errors to; it's certainly not in any directory that I have access to.
|
# ? Aug 21, 2012 20:02 |
|
That sounds like institutionalized editing in production. I don't think I could tell someone that that's sufficient to do my job. I'd feel responsible to change that procedure or, if that's not possible, find another job. If that sounds like too strong a reaction, think about it once more.
|
# ? Aug 21, 2012 20:27 |
|
Yeah, if I were in that spot I'd be campaigning for changes to those
|
# ? Aug 22, 2012 00:06 |
|
Optimus Prime Ribs posted:Don't have access to php.ini, any server settings, or even the www folder; I also don't have a dev environment. Do you guys at least have a svn repo or something? Spin up a VM if you can and try and migrate people to a deployment cycle.
|
# ? Aug 22, 2012 04:10 |
|
pokeyman posted:That sounds like institutionalized editing in production. I've been doing this for a while; we only recently moved to using some version control as an in-between and my boss is almost always angry that he can't SFTP his files any more. And that's ignoring that most of his commits had been "a", "1", or some random mush of letters. Of course everything is live, and rather than have a real development environment we just stick some letters to the end of the live folder and use that. (Bonus points: the files are often not kept in sync, and using version control with this kind of setup just makes everything even better.) Judging from the sounds of things, I'd be willing to guess that there are a lot of hard-coded paths or other crap that would be hard to replicate, especially if he doesn't even have access to any of the files that control the options... and good luck getting anybody else onto a version control platform. Another PHP horror from me. Apparently uncaught exceptions don't actually cause any sort of error logging to occur, or at least didn't on our server; the script just silently died and I had to manually root out where it was happening by peppering the entire script with something effectively boiling down to print "at point 3"; everywhere. I don't know what would cause this because we don't have any exception-handling code (it came from an external module) and all other errors, warnings, notices, etc. were being logged just fine. That sent me on a nice wild goose chase for a few hours... it really didn't help that the rest of the code was about as solid as a Jenga tower, either.
|
# ? Aug 22, 2012 08:10 |
|
Currently looking through a function that is liberally sprinkled with C# code:
|
# ? Aug 22, 2012 12:18 |
|
redleader posted:
|
# ? Aug 22, 2012 12:54 |
|
Zamujasa posted:I've been doing this for a while; we only recently moved to using some version control as an in-between and my boss is almost always angry that he can't SFTP his files any more. And that's ignoring that most of his commits had been "a", "1", or some random mush of letters. Of course everything is live, and rather than have a real development environment we just stick some letters to the end of the live folder and use that. (Bonus points: the files are often not kept in sync, and using version control with this kind of setup just makes everything even better.) If you're having problems with uncaught/unlogged exceptions everywhere, you could use register_shutdown_function. Set it up so it sends an email or writes to a log if the script terminates abnormally- at least then you'll have some idea of what's going on. This is assuming that your pile of code has some sort of bootstrap script you can drop it into and be assured that it will always be registered.
|
# ? Aug 22, 2012 13:21 |
|
Not to mention I think you can fiddle with it so that by default the errors are logged in /var/log/httpd/error_log even if php doesn't feel like cooperating.
|
# ? Aug 22, 2012 14:21 |
|
Wozbo posted:Do you guys at least have a svn repo or something? Spin up a VM if you can and try and migrate people to a deployment cycle. Nope. No version control of any kind; I doubt anyone else working here has even heard of SVN or Git. I don't plan on being here for much longer, so I'm not going to try to fix any of this mess.
|
# ? Aug 22, 2012 15:09 |
|
Optimus Prime Ribs posted:Nope. No version control of any kind; I doubt anyone else working here has even heard of SVN or Git. There is no big enough. Have you ever set up a repo before? If not, this might be good experience. Where are your backups for code? I can't believe that a hard drive crash could potentially nuke your service.
|
# ? Aug 22, 2012 15:32 |
|
Wozbo posted:There is no big enough. Have you ever set up a repo before? If not, this might be good experience. Where are your backups for code? I can't believe that a hard drive crash could potentially nuke your service. It wouldn't! It's all "in the cloud".
|
# ? Aug 22, 2012 16:03 |
|
Good lord, I would make a repo just because the second that poo poo pile does break I'd probably be blamed and not find out about it till the well was poisoned at any other job that calls in to ask (</Totally not paranoid about that poo poo>).
|
# ? Aug 22, 2012 16:18 |
|
Null Set posted:If you're having problems with uncaught/unlogged exceptions everywhere, you could use register_shutdown_function. Set it up so it sends an email or writes to a log if the script terminates abnormally- at least then you'll have some idea of what's going on. Only in one spot (we didn't even have a functions include until a few days ago ). Error logging is on and logs everything fine, but for some reason the uncaught exception terminated the script without any idea why. Optimus Prime Ribs posted:Nope. No version control of any kind; I doubt anyone else working here has even heard of SVN or Git. Wozbo posted:Good lord, I would make a repo just because the second that poo poo pile does break I'd probably be blamed and not find out about it till the well was poisoned at any other job that calls in to ask (</Totally not paranoid about that poo poo>). Just a lovely situation all around, no doubt.
|
# ? Aug 22, 2012 19:32 |
|
I really hope I'm not the only person who mostly reads this thread to regain perspective and feel better about their own workplace and craftsmanship. It's like the CoC equivalent of the Darfur War Orphan.
|
# ? Aug 22, 2012 19:35 |
|
For me it's half that. The "it could be worse" angle. The other half is me thinking "what have I done that should be in this thread".
|
# ? Aug 22, 2012 19:41 |
|
e: ^^^ Optimus Prime Ribs posted:Nope. No version control of any kind; I doubt anyone else working here has even heard of SVN or Git. Losing the will to live like this is surprisingly liberating. Until you find a new job I predict days of video gaming and forums trolling. Enjoy. Doc Hawkins posted:I really hope I'm not the only person who mostly reads this thread to regain perspective and feel better about their own workplace and craftsmanship. It's like the CoC equivalent of the Darfur War Orphan. Every time I think about something stupid I've done or seen, I get happier after realizing I'm not being forced to push out unversioned changes to production. But then I think about all the massively stupid things I've done that I need to post here...
|
# ? Aug 22, 2012 19:43 |
|
I guess I should be pretty thankful I haven't worked at companies that do _really_ stupid poo poo like no version control.
|
# ? Aug 22, 2012 21:40 |
|
Strong Sauce posted:I guess I should be pretty thankful I haven't worked at companies that do _really_ stupid poo poo like no version control. Don't remind me.
|
# ? Aug 22, 2012 22:12 |
|
Strong Sauce posted:I guess I should be pretty thankful I haven't worked at companies that do _really_ stupid poo poo like no version control. Both places I've had the distinction of working at had no version control. The one before this actually made all developers install a Zend Guard-ed version of their software, and would only hand out HTML mockups of pages that needed to be coded. (You were also expected to hand in archived copies of your code, and would often not see it again if any changes needed to be made by the lead.) Needless to say, it's really fun to work on code when any sort of error (including a mistyped MySQL query*, of course) would dump you on a totally different page by Header redirect, so the back button wouldn't work for that extra middle finger. Trying to track down Fatal Error: Call to undefined function d2NXGpqscYNJATOiybAH in IJDk9X99jHGNOxBt0tx4 on line 0 is a whole bunch of fun when you can't even see what the hell is going on. Even better, it makes everything entirely obtuse, so that there's no way to see if there's a function that already does what you need, for that extra development-lengthening challenge. * No OOP or prepared functions here, just a bunch of crap like this: code:
|
# ? Aug 22, 2012 23:19 |
|
I feel like I should post this here as well.NovemberMike posted:A co-worker decided to be helpful and remove all the extra whitespace inside the jquery selectors.
|
# ? Aug 22, 2012 23:20 |
|
Was it some home-brewed sed/awk script gone awry and he didn't notice, or just ?
|
# ? Aug 23, 2012 00:57 |
|
Pure . I got a note from QA telling me that one of the pages wasn't grabbing data from a dropdown menu correctly and I go to look at the source. I pretty much went from "oh hey, I don't remember adding those extra lines of whitespace to organize the code" to "WHO THE gently caress DELETED THE SPACES FROM MY JQUERY" in about 10 seconds. It's not a huge deal in the long run but I'm not sure how you think that changing anything that's in quotes is a good idea when you don't want to change the functionality of the code.
|
# ? Aug 23, 2012 01:20 |
|
What possible benefit can be had by deleting spaces from a selector? Even assuming you've memorized the grammar and can thus do the deletions without affecting functionality, you've, what, shaved a couple of bytes?
|
# ? Aug 23, 2012 02:03 |
|
For the record, in connection with the FizzBuzz thread, this is why. This is why companies don't take some noob's word that he can rewrite the company's code better.
|
# ? Aug 23, 2012 04:23 |
|
pokeyman posted:What possible benefit can be had by deleting spaces from a selector? Even assuming you've memorized the grammar and can thus do the deletions without affecting functionality, you've, what, shaved a couple of bytes? The last company I was at, I cut bandwidth costs by some ridiculous number and greatly increased page responsiveness...by replacing all of the <!-- --> comments in index.php with <?php /* */ ?>. 3 megs of them. Don't ask. In this case, I'd assume someone probably was just preoptimizing with s/\s+//g, instead of explicitly only removing spaces from jquery selectors, which makes a bit more sense. A bit.
|
# ? Aug 23, 2012 05:33 |
|
Ursine Asylum posted:
Nope. We're talking about a net increase in file size, he was just reorganizing so it looked prettier.
|
# ? Aug 23, 2012 14:06 |
|
Hunh. Well, I don't have an appropriate smiley for that then. Carry on.
|
# ? Aug 23, 2012 17:42 |
|
Apparently it also looks cleaner if you delete my variables, create your own variables with different names and forget the correct syntax for initializing variables.
|
# ? Aug 23, 2012 17:43 |
|
NovemberMike posted:Apparently it also looks cleaner if you delete my variables, create your own variables with different names and forget the correct syntax for initializing variables. This is...still javascript, right? That language where you don't even need semicolons? How do you forget initialization syntax
|
# ? Aug 23, 2012 17:51 |
|
JavaScript code:
|
# ? Aug 23, 2012 17:53 |
|
Suspicious Dish posted:
Fixed that for you.
|
# ? Aug 23, 2012 17:54 |
|
|
# ? Apr 29, 2024 02:51 |
|
KARMA! posted:It wouldn't! It's all "in the cloud". Running on an Amazon EBS volume I'm sure. Those things neeeever fail.
|
# ? Aug 23, 2012 20:51 |