|
ExcessBLarg! posted:It's quite common for large projects to be partitioned into modules that have different maintainers. You generally have commit access to the modules you maintain, but if you need to make changes elsewhere you'll have to submit those changes to a maintainer for review. Code review by primary developer isn't the same thing as requiring that the primary developer commit. (It can be close if you use pull requests, but doesn't have to be.)
|
# ? Sep 29, 2015 17:52 |
|
|
# ? Jun 5, 2024 08:14 |
|
Nitrocat posted:not necessarily a "horror", but very accurate and incredibly, painfully true. Best line: code:
|
# ? Sep 29, 2015 18:07 |
|
(Restricted commit also conflicts with a very important rule of keeping multi-developer projects on the rails: "the correct response to a failing test is immediate remorseless back-out, and anyone can/should do so".)
|
# ? Sep 29, 2015 18:15 |
|
Weird, up to a couple of weeks ago I'd never heard of Cache until I visited a friend who also works in healthcare. And now I come across it on SA forums. Weird how that works.....
|
# ? Sep 29, 2015 18:37 |
|
Mr Shiny Pants posted:Weird, up to a couple of weeks ago I'd never heard of Cache until I visited a friend who also works in healthcare. And now I come across it on SA forums. Lots of the big health care IT companies have been around forever, and since MUMPS was initially created by a hospital for use in medical databases, lots of us have been on some flavor of MUMPS forever. Caché happens to be the most powerful and well-supported implementation of MUMPS so lots of us use it these days.
|
# ? Sep 29, 2015 18:44 |
|
programming 101 protip. print this and post it everywhere, live it, breathe it, cry over it.
|
# ? Sep 29, 2015 18:49 |
|
"It doesn't happen on your dev server? Great, we'll send a billion users to your dev server then."
|
# ? Sep 29, 2015 19:04 |
|
Subjunctive posted:"It doesn't happen on your dev server? Great, we'll send a billion users to your dev server then." I've had no fewer than 3 bosses tell that same story with minor variations. "What's that? Works on your laptop? Well, pack it up and ship it to the customer then!"
|
# ? Sep 29, 2015 19:49 |
|
No Safe Word posted:I've had no fewer than 3 bosses tell that same story with minor variations. er, that seems extremely hostile. I have some bugs that I really, really want to fix but literally cannot reproduce no matter how many times a user tells me. It's not that I don't believe them, it's just that I can't track it down until I have more info.
|
# ? Sep 29, 2015 19:56 |
|
Yeah to be clear it wasn't in response to me directly. It was always anecdotal and usually not passive-aggressively directed at failed debugging efforts, but more of a tongue-in-cheek thing said when someone was struggling to reproduce something.
|
# ? Sep 29, 2015 20:06 |
|
You don't necessarily need to reproduce a bug to fix it. The endgame of the JIT project I worked on was identifying and fixing bugs (often timing-sensitive) based on metadata in crash reports. Even without the ability to find the root cause, you can often find a mitigation that's cheap/solid enough to ship. The vast majority of browser crashes don't have repro for the developer, I expect. You do need good error reporting though.
|
# ? Sep 29, 2015 20:28 |
|
Subjunctive posted:You don't necessarily need to reproduce a bug to fix it. The endgame of the JIT project I worked on was identifying and fixing bugs (often timing-sensitive) based on metadata in crash reports. Even without the ability to find the root cause, you can often find a mitigation that's cheap/solid enough to ship. This is the area of software development that's still somewhat sorcery to me. I'm just starting to get comfortable kind muddling my way through .net stack traces and such to debug, but I'm still pretty lost without the ability to step through code most of the time. People who can actually design robust and usable error reporting systems are like wizards to me.
|
# ? Sep 29, 2015 20:41 |
|
Subjunctive posted:You don't necessarily need to reproduce a bug to fix it. The endgame of the JIT project I worked on was identifying and fixing bugs (often timing-sensitive) based on metadata in crash reports. Even without the ability to find the root cause, you can often find a mitigation that's cheap/solid enough to ship. I'd be happy if most of my bug reports had stack traces attached. Error reporting is hard when your core product is, by design, not always online.
|
# ? Sep 29, 2015 21:04 |
|
I'm now trying to find the cause of a bug that only manifests when two drivers are active at once (one is mine). And the symptoms are random memory corruptions with stack traces like below that don't contain any of the two drivers' code:code:
|
# ? Sep 29, 2015 21:12 |
|
Suspicious Dish posted:I'd be happy if most of my bug reports had stack traces attached. Error reporting is hard when your core product is, by design, not always online. Oh, there are ways around that, if you're sufficiently... creative. "Sir, your exception."
|
# ? Sep 29, 2015 21:37 |
|
NihilCredo posted:Oh, there are ways around that, if you're sufficiently... creative. Heh. I noticed some links disappeared when I was checking my credit card account online. I decided to see what they were. (Truncated version) code:
Couple more tidbits I found: code:
JavaScript code:
JavaScript code:
code:
Knyteguy fucked around with this message at 23:22 on Sep 29, 2015 |
# ? Sep 29, 2015 23:03 |
|
I think the biggest horror is that people were being confused by the arcane term "Transfer money".
|
# ? Sep 30, 2015 13:19 |
|
HardDisk posted:I think the biggest horror is that people were being confused by the arcane term "Transfer money". What makes you say that?
|
# ? Sep 30, 2015 19:41 |
|
edit: I just realized that this was posted in the wrong thread...
FoiledAgain fucked around with this message at 16:27 on Oct 1, 2015 |
# ? Oct 1, 2015 03:41 |
|
No Safe Word posted:I've had no fewer than 3 bosses tell that same story with minor variations. That's douche-y. The correct response is to canary your change and make you watch as 100k requests fail.
|
# ? Oct 1, 2015 06:58 |
|
Dessert Rose posted:What makes you say that? Because I misread it. I noticed that the div with the transfer money had display:none set, but I didn't see that it was commented out.
|
# ? Oct 1, 2015 13:29 |
|
loin: Why did you delete all of the "volatile" keywords in that file? [Java] co-worker: I didn't know what they meant loin:
|
# ? Oct 2, 2015 03:34 |
|
loinburger posted:loin: Why did you delete all of the "volatile" keywords in that file? [Java] What exactly does volatile do in Java? Was it some interop with native code?
|
# ? Oct 2, 2015 12:40 |
|
omeg posted:What exactly does volatile do in Java? Was it some interop with native code? It gives you a stricter memory model to play with, which in turn makes it possible to write correct multithreaded code with fewer explicit locks. Remove the "volatile" bits, and your formerly-safe code is now full of race conditions. Using it outside of a handful of well-known patterns is very probably wrong, though.
|
# ? Oct 2, 2015 12:44 |
|
omeg posted:What exactly does volatile do in Java? Was it some interop with native code? When you write something to a variable the new value will only be in the registers and cache of the core running the thread. Using volatile makes sure it is consistent across threads. You could also explicitly lock and unlock the variable before reading from or writing to it. On a plain old x86 architecture it is not necessary because the CPU doesn't make the kind of cache optimizations that volatile negates.
|
# ? Oct 2, 2015 13:09 |
|
Jarl posted:When you write something to a variable the new value will only be in the registers and cache of the core running the thread. Using volatile makes sure it is consistent across threads. Yeah, I know what it does in C/C++, just didn't think it was needed in a managed language like Java.
|
# ? Oct 2, 2015 13:42 |
|
omeg posted:Yeah, I know what it does in C/C++, just didn't think it was needed in a managed language like Java. This does not have anything to do with whether a language is managed or not. Edit: Well, it could be. But I think it would be a bad idea. Jarl fucked around with this message at 14:54 on Oct 2, 2015 |
# ? Oct 2, 2015 14:52 |
|
omeg posted:Yeah, I know what it does in C/C++, just didn't think it was needed in a managed language like Java. It's the same underlying concept but for a different purpose. In C/C++, volatile is used for memory mapped IO like writing to hardware registers. However it is not usable for multithreading because it doesn't guarantee that the operations are atomic and it's not a memory barrier. In other words it can rearrange operations so that a write to another variable goes afterward. In pseudocode one thread could do: code:
code:
|
# ? Oct 2, 2015 15:18 |
|
Jarl posted:On a plain old x86 architecture it is not necessary because the CPU doesn't make the kind of cache optimizations that volatile negates. It is absolutely still necessary to use volatile on x86 in Java; the JVM is otherwise free to change the order in which it performs memory accesses, as well as to use instructions (like non-temporal stores) with weaker memory ordering rules than the default. If anything, the strength of x86's memory ordering makes not using volatile properly worse, because it is both much cheaper to use liberally and much more likely to allow a race condition bug to escape into production because it doesn't show up until the nth-tier JIT reorders a couple of stores.
|
# ? Oct 3, 2015 06:47 |
|
rjmccall posted:It is absolutely still necessary to use volatile on x86 in Java; the JVM is otherwise free to change the order in which it performs memory accesses, as well as to use instructions (like non-temporal stores) with weaker memory ordering rules than the default. If anything, the strength of x86's memory ordering makes not using volatile properly worse, because it is both much cheaper to use liberally and much more likely to allow a race condition bug to escape into production because it doesn't show up until the nth-tier JIT reorders a couple of stores. Of course, makes sense JVM would exploit it - as it should.
|
# ? Oct 3, 2015 08:26 |
|
The "volatile" stuff was a bandage for a database cache that I'm probably going to just wind up getting rid of. It used to consist of about a half dozen of thesecode:
code:
|
# ? Oct 3, 2015 14:55 |
|
If your problem was that multiple threads are touching the cache concurrently and it was stuffing up, just making it volatile doesn't necessarily solve your problem... For example, you still have a race that ends up with the cache "stuck" holding on to an old value.
|
# ? Oct 3, 2015 15:20 |
|
I hadn't considered that, but it's a lovely bandaid for a lovely cache; for example, "Foo" is mutable so somebody could still gently caress with my "ImmutableList<Foo>". The best solution is to just get rid of the stupid thing, but I've got to do some performance testing first to justify deleting somebody else's code.
|
# ? Oct 3, 2015 15:46 |
|
Deleting other people's code is never wrong.
|
# ? Oct 3, 2015 16:08 |
|
It's likely that nobody will notice or care, but if they do I'd rather say "I deleted the cache because it wasn't performant" or whatever as opposed to "I deleted the cache because it had a race condition and I'm too lazy to fix it" Though realistically, "not performant" in this case means something like "didn't give at least a 3x performance boost," because it's not worth maintaining this code for anything less than that loinburger fucked around with this message at 16:44 on Oct 3, 2015 |
# ? Oct 3, 2015 16:40 |
|
Just tell them you measured it, it's not like anyone's going to check
|
# ? Oct 3, 2015 17:03 |
|
Good point
|
# ? Oct 3, 2015 17:10 |
|
What happens when someone writes an IRC bot in COBOL and then passes "output intermediate C only" to see what it generates before passing the intermediate to GCC? https://gist.github.com/heddwch/8dbd1d5bf0af21f643b3 This nightmare.
|
# ? Oct 3, 2015 20:05 |
|
That's actually extremely readable for a C-as-IR. IIRC, there was a Haskell or similar that generated C, compiled the C to assembly, and then textually transformed the assembly source before assembling it into the final object.
|
# ? Oct 3, 2015 20:12 |
|
|
# ? Jun 5, 2024 08:14 |
|
pseudorandom name posted:That's actually extremely readable for a C-as-IR. GHC did this in the past. It involved a Perl script called the "evil munger" or something like that.
|
# ? Oct 3, 2015 21:18 |