|
revmoo posted:Just remembered an old coding horror, complements of a colleague. He got a ticket to add the current time, with seconds, to a page in an app. So he wrote js/php to query the server every second and get the current time. Nobody ever noticed until I happened to be looking at the code for the page in question months later. What if the client time doesn't match the server time? What then!?
|
# ? Apr 24, 2014 19:56 |
|
|
# ? May 27, 2024 19:13 |
|
Today I learned that one of our important customer facing webapps (of which there are zero people left who know about it, and is written in a language we don't use anywhere else) relies on an interstitial page that has both a <meta refresh="some file download"> and a timed javascript onLoad window.location="next page" in the same page. The app apparently slowed down enough that the file download wouldn't get established before javascript changed the page, which broke everything. The only reason it worked before is that until recent releases of Chrome and Firefox, browsers wouldn't cancel a file download started by <meta refresh> if javascript changed window.location.
|
# ? Apr 24, 2014 21:15 |
|
necrotic posted:What if the client time doesn't match the server time? What then!? Well, that's why you check, obviously!
|
# ? Apr 24, 2014 22:33 |
|
revmoo posted:Just remembered an old coding horror, complements of a colleague. He got a ticket to add the current time, with seconds, to a page in an app. So he wrote js/php to query the server every second and get the current time. Nobody ever noticed until I happened to be looking at the code for the page in question months later. At least you know what time the Internet stopped if anything bad happened like uh, a cut in internet or something.
|
# ? Apr 25, 2014 15:45 |
|
Inherited yet another codebase of dubious quality. Why are users bitching about poo poo being broken constantly, data being corrupted, and not a goddamn thing showing up in the logfiles or system event log? What the shi...Visual Studio posted:Find all "catch (Exception) { }", Subfolders, Find Results 1, "Entire Solution" I guess 'ignore them and hope they go away' is a kind of exception handling strategy.
|
# ? Apr 25, 2014 15:49 |
|
Verloc posted:Inherited yet another codebase of dubious quality. Why are users bitching about poo poo being broken constantly, data being corrupted, and not a goddamn thing showing up in the logfiles or system event log? What the shi... What's really fun is when you test out how the application behaves when you replace the empty catches with catch (Exception) { throw; } and see what horrors immediately spring to the surface.
|
# ? Apr 25, 2014 15:57 |
|
Ithaqua posted:What's really fun is when you test out how the application behaves when you replace the empty catches with catch (Exception) { throw; } and see what horrors immediately spring to the surface.
|
# ? Apr 25, 2014 16:22 |
|
Verloc posted:I spent about 4 hours setting up log4net (instead of their cackhanded homegrown file logger), and wiring logging into all those silent catches. On my local test runs I'm averaging about 5-7kb worth of exception logs per page load. Turning that thundering herd of exceptions loose to run up the stack would be even more inducing I think. I am so glad I have not experienced a work environment where people are this bad at programming. I've seen some bad poo poo, but wow.
|
# ? Apr 25, 2014 17:49 |
|
There's an app where I work where instead of try-catch-ignore it's try-catch-messagebox. So basically it's a messagebox with the root cause exception message and then about 10 more messageboxes for null reference exceptions as it moves up the stack.
|
# ? Apr 25, 2014 17:54 |
|
"TFS meltdown." What?!?!?! "... I'm about to have a TFS meltdown." Oh my loving god no.
|
# ? Apr 25, 2014 18:45 |
|
2banks1swap.avi posted:"TFS meltdown." ...what?
|
# ? Apr 25, 2014 18:51 |
|
Ithaqua posted:...what? Their Microsoft proprietary version control is about to go all to hell.
|
# ? Apr 25, 2014 18:58 |
|
ultramiraculous posted:Their Microsoft proprietary version control is about to go all to hell. This is a job where our client (A STATE GOVERNMENT) loving had a fat-finger-delete of 60+ VMs, including our development environments, services, and so on.
|
# ? Apr 25, 2014 19:04 |
|
2banks1swap.avi posted:This is a job where our client (A STATE GOVERNMENT) loving had a fat-finger-delete of 60+ VMs, including our development environments, services, and so on. Backups: a thing that needs to be done
|
# ? Apr 25, 2014 19:05 |
|
One of many things you should always ask a prospective employer about!
|
# ? Apr 25, 2014 19:16 |
|
ultramiraculous posted:Their Microsoft proprietary version control is about to go all to hell. Yeah, I'm familiar with TFS, I just didn't get what the horror was.
|
# ? Apr 25, 2014 19:27 |
|
Ithaqua posted:Yeah, I'm familiar with TFS, I just didn't get what the horror was. I thought Microsoft required a nuclear reactor to power TFS and we were about to witness the next Fukushoma. How sad it's someone just deleted a bunch of VMs with no backups.
|
# ? Apr 25, 2014 19:33 |
|
The meltdown was "...it's not working, I can't push, I can't publish, what the gently caress, I just did new workspaces, oh god..." until "oh it works." I have no idea what was wrong. But it was a horror to hear that source control is starting to act screwy.
|
# ? Apr 25, 2014 19:47 |
|
2banks1swap.avi posted:The meltdown was "...it's not working, I can't push, I can't publish, what the gently caress, I just did new workspaces, oh god..." until "oh it works." I have no idea what was wrong. That's TFS (just kidding it's not that bad but it frustrates me a lot too with poo poo like that, but we're also using the hosted TFS stuff so we're kind of asking for it)
|
# ? Apr 25, 2014 19:50 |
|
Sometimes I wonder why it's still not SOP to have a physical RAID sitting in your drat office (and colo'd) with your source files. Seriously, HDDs are cheap.
|
# ? Apr 25, 2014 20:12 |
|
2banks1swap.avi posted:
TFS has pretty good support for DR scenarios, too.
|
# ? Apr 25, 2014 20:16 |
|
No Safe Word posted:Backups: a thing that needs to be done And if you aren't making sure you can restore correctly, you aren't doing backups, you're just filling media. I worked on a filesystem for a medium-sized (~1000 node) cluster a long time ago, and after a maintenance window to move to new rack config interconnect the tech brought the storage nodes...with the storage ports cross-connected. No big deal, the filesystem detected that and refused to mount because the underlying storage UUIDs and the ports didn't line up (chasing the UUIDs automatically was a recipe for different disaster in the past), and even gave the support number to call to get help. Oh, except that the tech then decided to use his initiative while waiting less than half an hour for me to get paged out of bed as oncall, and forced a filesystem repair. I hope you weren't using those 15,000 machine-days of simulation results, Mr Nuclear Security Administration scientist sir.
|
# ? Apr 25, 2014 20:38 |
2banks1swap.avi posted:
Working in a highly regulated industry, it's actually against federal regulations for our code to be in the same building as us. Everyone remotes into a server. I actually had to fight to get a real computer instead of a thin client.
|
|
# ? Apr 25, 2014 21:06 |
|
No Safe Word posted:That's TFS Speaking of TFS and horrors, I got a new workstation late last year and renamed the old one so I could keep it on the network while moving to the new one which got the name I was used to. When I remoted into the old one to double-check I hadn't left anything behind in TFS, it refused to touch the local the local copy because it wasn't supposed to exist on this machine name (or something to that effect). Easily the silliest loving VCS design decision I can think of that isn't a total deal-breaker like VSS's willingness to delete old copies of files that in a real VCS would just be marked deleted.
|
# ? Apr 25, 2014 21:08 |
|
Ego Trip posted:Working in a highly regulated industry, it's actually against federal regulations for our code to be in the same building as us. May I ask where? I've done plenty of bullshit through a VM and dealt with input lag (and learned to get good at vim motions as a result) and am actually remoting into my home PC through remote from work right now. Nevertheless, trying to DEVELOP remotely was always extremely frustrating.
|
# ? Apr 25, 2014 21:10 |
|
Munkeymon posted:Speaking of TFS and horrors, I got a new workstation late last year and renamed the old one so I could keep it on the network while moving to the new one which got the name I was used to. When I remoted into the old one to double-check I hadn't left anything behind in TFS, it refused to touch the local the local copy because it wasn't supposed to exist on this machine name (or something to that effect). Easily the silliest loving VCS design decision I can think of that isn't a total deal-breaker like VSS's willingness to delete old copies of files that in a real VCS would just be marked deleted. My favorite thing with TFS and deletes is you can't simply mark items to be deleted without actually getting them first. Especially fun when it's like an entire branch and you just want to clean stuff up. I end up doing a non-recursive get from the command line and then deleting, but it's a pain in the rear end.
|
# ? Apr 25, 2014 21:22 |
|
Munkeymon posted:Speaking of TFS and horrors, I got a new workstation late last year and renamed the old one so I could keep it on the network while moving to the new one which got the name I was used to. When I remoted into the old one to double-check I hadn't left anything behind in TFS, it refused to touch the local the local copy because it wasn't supposed to exist on this machine name (or something to that effect). Easily the silliest loving VCS design decision I can think of that isn't a total deal-breaker like VSS's willingness to delete old copies of files that in a real VCS would just be marked deleted.
|
# ? Apr 25, 2014 21:26 |
|
Verloc posted:I just recently 'd into a TFS shop. Coming from an exclusively git and subversion (Ok well there was some *shudder* Visual Sourcesafe back in the before times, but we don't talk about then) background it seems like a really well behaved VCS except for when it comes to workspaces. Look at a workspace funny and TFS immediately goes into 'back off I will loving cut you' mode. Local workspaces make things easier if you're on VS/TFS2012+.
|
# ? Apr 25, 2014 21:38 |
2banks1swap.avi posted:May I ask where? I've done plenty of bullshit through a VM and dealt with input lag (and learned to get good at vim motions as a result) and am actually remoting into my home PC through remote from work right now. Nevertheless, trying to DEVELOP remotely was always extremely frustrating. I work for a small HR company. We have a bunch of personally identifiable information, including social security numbers. Our building isn't secure enough to house the data or source code. Considering that it's easier to get into the server room than it is the lunch room, I'm glad that no one is trying to store anything important here. Aside from all of the hardcopies of that PII in the basement, of course. I've had this job for 2 years and I haven't written a single line on the PC sitting on my desk. Interview on Monday, though.
|
|
# ? Apr 25, 2014 21:51 |
|
Speaking of backups, I've been using Microsoft SyncToy on my home machine to back up files from one disk to another. It's actually extremely easy to use and well-designed. So the opposite of a coding horror, I guess e: I mean I could just do this with a cron'd rsync or something, but since Windows doesn't have that...
|
# ? Apr 25, 2014 21:51 |
QuarkJets posted:Speaking of backups, I've been using Microsoft SyncToy on my home machine to back up files from one disk to another. It's actually extremely easy to use and well-designed. So the opposite of a coding horror, I guess Is that really a backup though if the disks are in the same physical location?
|
|
# ? Apr 25, 2014 21:53 |
|
fletcher posted:Is that really a backup though if the disks are in the same physical location? It is if you care about drive failure or human error, it's not if you care about large fires.
|
# ? Apr 25, 2014 22:03 |
|
fletcher posted:Is that really a backup though if the disks are in the same physical location? It's a good thing to have, not the only thing you should have.
|
# ? Apr 25, 2014 23:52 |
|
Westie posted:At least you know what time the Internet stopped if anything bad happened like uh, a cut in internet or something. Back in the days of 56k when I used to play team fortress the main UK isp British Telecom ran a few servers through a dedicated service called wireplay, one day every server went down and when they came back up the status page said something like "yeah so all our servers are set to ping Microsoft.com to check they've got an internet connection and Microsoft stopped responding to pings so the servers crashed". BT is still a major UK isp and last time I checked bt.com doesn't respond to pings.
|
# ? Apr 26, 2014 01:08 |
|
fletcher posted:Is that really a backup though if the disks are in the same physical location? I don't understand your question. Are you asking whether I'm just mirroring between partitions on a single disk? I'm using different physical disks, which is a hell of a lot better than doing nothing at all
|
# ? Apr 26, 2014 03:39 |
|
Goddamnit, backups are important: Onsite, offsite, third party service; Pick three. RAID is not backup, it's availability, and not to be relied on at all. Make sure you can actually restore backups without having to cherry-pick through a file dump. Daily backups with your primary service, preferably with on-the-fly for at least one of them (most online backup services offer this). Anything less than this and you are a building a time bomb.
|
# ? Apr 26, 2014 03:48 |
|
Deus Rex posted:Is Postgres the only SQL DB that can do indexes on expressions? I wasn't that surprised to see MySQL was lacking them, but SQL Server is supposed to be good You can use functional indexes in Oracle.
|
# ? Apr 26, 2014 05:19 |
|
necrotic posted:I am so glad I have not experienced a work environment where people are this bad at programming. I've seen some bad poo poo, but wow. Verloc fucked around with this message at 06:58 on Apr 26, 2014 |
# ? Apr 26, 2014 06:54 |
|
Verloc posted:After diving a little deeper, I've come to the conclusion that about 1/3 of the silent catches are legit poo poo-that-should-be-caught stuff. The rest seem to mostly be a byproduct of the original author not really getting how nullables work. About 190 of those catches are basically flow control statements as written by a moron. Instead of null-checking any nullable value that he passes into code that will eat poo poo spectacularly if handed a null(formatted datetimes, ternary operators, string splits, property accessors, etc. etc.), everything is just wrapped in try/catch blocks and if said null intolerant code gets a null and buttfucks itself out of existence, just keep on' truckin'. I'm still grappling with the fact that almost a hundred silent catches on legit exceptions qualifies as 'a drastic improvement over what I initially assessed' however. That's awful. It's a painful thing to do, but you could consider replacing them with try { ... } catch (NullReferenceException) { }, so at least they only catch what they're supposed to catch. Clearly it would be better to make sure the exceptions don't happen to begin with, but from the sound of it that's going to be a challenge.
|
# ? Apr 26, 2014 13:17 |
|
|
# ? May 27, 2024 19:13 |
|
LOOK I AM A TURTLE posted:That's awful. It's a painful thing to do, but you could consider replacing them with try { ... } catch (NullReferenceException) { }, so at least they only catch what they're supposed to catch. Clearly it would be better to make sure the exceptions don't happen to begin with, but from the sound of it that's going to be a challenge. At least he's not catching an exception and then EVERY SUPERCLASS OF THAT EXCEPTION with the exact same code in the catch block. Because that would be crazy town.
|
# ? Apr 26, 2014 13:34 |