|
Xarn posted:uuuugh why not use a loving loop? Why would it be a loop? Should be a bunch of if else.
|
# ? Sep 8, 2022 21:03 |
|
|
# ? May 21, 2024 09:55 |
|
Xarn posted:uuuugh why not use a loving loop? It's called loop unrolling, scrub
|
# ? Sep 8, 2022 21:26 |
|
pokeyman posted:Why would it be a loop? Should be a bunch of if else. Given that it's looping over an array (of interval minima in descending order? sheesh, who stores intervals backwards?), yes, there should be a loop in there somewhere. I can't JS, but that entire block can basically be replaced with your local equivalent of code:
I'm surprised that switch statement even parses but apparently JS is fine with non-constant cases.
|
# ? Sep 8, 2022 22:20 |
|
duck monster posted:2 lines of code is what it replaced. For this abomination. ...Code review??
|
# ? Sep 8, 2022 22:51 |
|
duck monster posted:This is by the new recruit thats replaced our node.js TCP edge server that could handle 40K connections without breaking a sweat with a PHP abomination filled with SQL interpolations and other "Didnt PHP coders learn this lesson in the 90s?!" horrors that pegs the server on 80 connections, and nobody can convince the boss that he's incompetent. Holy poo poo, where I work checking in something that increases serving latency by 0.1ms is a Big loving Deal
|
# ? Sep 8, 2022 23:03 |
|
duck monster posted:nobody can convince the boss that he's incompetent. Are you sure he's not related to your boss? Because it sounds like he's related to your boss.
|
# ? Sep 8, 2022 23:07 |
|
Actually have you ever seen your boss and that guy in the same room at the same time?
|
# ? Sep 8, 2022 23:11 |
|
Doom Mathematic posted:...Code review?? Coding Horrors: …Code review??
|
# ? Sep 9, 2022 00:14 |
|
Oh I see, shoulda read it closer.
|
# ? Sep 9, 2022 00:34 |
|
ToxicFrog posted:Holy poo poo, where I work checking in something that increases serving latency by 0.1ms is a Big loving Deal and where i work, performance objectives are "doesn't die from the 30s sql timeout"
|
# ? Sep 9, 2022 00:51 |
|
ToxicFrog posted:Holy poo poo, where I work checking in something that increases serving latency by 0.1ms is a Big loving Deal I can't use the current profiling solution to compare two implementations of a thing because using it adds ~1ms over 10,000 iterations and that's too much noise for the data to be useful
|
# ? Sep 9, 2022 02:10 |
|
current coding horror is a new hire who wants to rename the production database because he doesn't like it. gave him the business casual "that's a stupid idea and you're on your own if it fucks everything up", luckily he works at our subsidiary and doesn't report to me lolVolmarias posted:Quietly revert the changes and get him assigned to some kind of pet project for someone who won't actually be there next year. agreed
|
# ? Sep 9, 2022 04:13 |
|
candy for breakfast posted:current coding horror is a new hire who wants to rename the production database because he doesn't like it. Is it a racial slur or something?
|
# ? Sep 9, 2022 04:17 |
|
The feels bad when you sealed and get U defiler, G defiler, and Sphinx and proceed to fail to draw G defiler at all in 5 games. The U defiler drew once the turn before you were going to win anyways and once to immediately eat removal. The Sphinx showed up in 2 wins but in the 3 losses only showed up once near the end of a game only to be hard countered by the flying deathtoucher There was also a loam elf that showed up once at the end of a game.
|
# ? Sep 9, 2022 04:27 |
|
candy for breakfast posted:current coding horror is a new hire who wants to rename the production database because he doesn't like it. i remember being young and wanting to rename things for no good reason. that's a lesson only experience can teach you.
|
# ? Sep 9, 2022 04:27 |
|
wolfman101 posted:The feels bad when you sealed and get U defiler, G defiler, and Sphinx and proceed to fail to draw G defiler at all in 5 games. The U defiler drew once the turn before you were going to win anyways and once to immediately eat removal. The Sphinx showed up in 2 wins but in the 3 losses only showed up once near the end of a game only to be hard countered by the flying deathtoucher Is this some C# poo poo?
|
# ? Sep 9, 2022 04:30 |
|
candy for breakfast posted:current coding horror is a new hire who wants to rename the production database because he doesn't like it. gave him the business casual "that's a stupid idea and you're on your own if it fucks everything up", luckily he works at our subsidiary and doesn't report to me lol Guessing "master"
|
# ? Sep 9, 2022 05:46 |
|
Absurd Alhazred posted:Is this some C# poo poo? I'm going to guess magic the gathering and wrong thread, but I'm nowhere near current on that game
|
# ? Sep 9, 2022 06:40 |
|
leper khan posted:I'm going to guess magic the gathering and wrong thread, but I'm nowhere near current on that game I've never played Magic, but my immediate thought when I read this exchange was "I bet MTG is Turing complete", and what do you know: https://arxiv.org/abs/1904.09828 https://www.murphyandhislaw.com/blog/mtg-turing-complete https://www.toothycat.net/~hologram/Turing/index.html
|
# ? Sep 9, 2022 07:34 |
|
Volmarias posted:Quietly revert the changes and get him assigned to some kind of pet project for someone who won't actually be there next year. I did, and he flipped the gently caress out and reverted it back, and then the boss yelled at me.
|
# ? Sep 9, 2022 08:03 |
|
Doom Mathematic posted:...Code review?? We do code review. This fucker codes on the production server. I cant convince the boss. ToxicFrog posted:Holy poo poo, where I work checking in something that increases serving latency by 0.1ms is a Big loving Deal I hear you. But what can I do? duck monster fucked around with this message at 08:06 on Sep 9, 2022 |
# ? Sep 9, 2022 08:04 |
|
You might find it productive to go over your boss's head to their boss. (Don't let your boss find out though). They're not going to care about this guy being a total moron (that's your boss's job to deal with, and if you complain to them about it they're mostly just going to be annoyed with you), but if you phrase it in terms of stuff they do care about you can probably get support for things like locking down production so the only thing allowed to modify it is an automated push from whatever's committed to source control. More importantly, when this guy then throws a tantrum and your boss gets on your case, you can get his boss to then put him in his place.
|
# ? Sep 9, 2022 09:26 |
|
duck monster posted:We do code review. do you not have colleagues who agree with you about this? Can't you all go to your boss and present a united front, say "coding on the production server is an extremely bad practice for (list of reasons)" If you already did and the boss is still determined to let the guy just do whatever he likes then tbh maybe it's time to
|
# ? Sep 9, 2022 09:34 |
|
duck monster posted:We do code review. Okay so, one, deploy to production over the top of this person's changes, instantly trashing any changes they've made. Do this repeatedly every time they touch production, until they get the message. You have a deployment process, right? Which this person is circumventing? Two, if your boss doesn't care who has direct access to production, then implicitly you are free to gate that access as you see fit. So do that. Don't ask. You clearly don't need permission.
|
# ? Sep 9, 2022 11:17 |
|
ToxicFrog posted:Holy poo poo, where I work checking in something that increases serving latency by 0.1ms is a Big loving Deal My team just got a mandate to prioritize a performance improvement because latency in one of our vendor integrations is costing the company $8000 a day. A process that makes ~6000 web API requests needs to run in less than 5 minutes. It currently takes about 3 hours. And the problem is clearly the fault of our own code and not a network thing
|
# ? Sep 9, 2022 13:57 |
|
DaTroof posted:My team just got a mandate to prioritize a performance improvement because latency in one of our vendor integrations is costing the company $8000 a day. A process that makes ~6000 web API requests needs to run in less than 5 minutes. It currently takes about 3 hours. And the problem is clearly the fault of our own code and not a network thing 5 minutes.. 300 seconds. 6000 request. 20 requests per second? 50ms per request? Lol isn't that typical ping latency?
|
# ? Sep 9, 2022 15:02 |
|
leper khan posted:5 minutes.. 300 seconds. 6000 request. 20 requests per second? 50ms per request? It's possible to run the requests in parallel, but right now they run consecutively at an artificial max of 1 per second.
|
# ? Sep 9, 2022 15:06 |
sounds like an easy fix as long as the requests aren't dependent on each others results and you don't need to worry about being rate limited still I would have a hard time resisting the urge to change them all into a bundled single request, throwing that many over the pipes all at once just feels dirty
|
|
# ? Sep 9, 2022 15:37 |
|
I tried to use quotes in my new title and it's almost better how it is getting all unicode hosed. Any other thoughts? I used to be Protocol7 if you hate me
|
# ? Sep 9, 2022 15:49 |
|
Polio Vax Scene posted:sounds like an easy fix as long as the requests aren't dependent on each others results and you don't need to worry about being rate limited It's mostly easy, except the results need to modify the state of an independent process. quote:still I would have a hard time resisting the urge to change them all into a bundled single request, throwing that many over the pipes all at once just feels dirty Unfortunately, that's not an option here. The vendor's API only lets us send one transaction per request, even though their own business rules are the reason we need to process hundreds of transactions per minute
|
# ? Sep 9, 2022 16:09 |
|
LOOK I AM A TURTLE posted:I've never played Magic, but my immediate thought when I read this exchange was "I bet MTG is Turing complete", and what do you know:
|
# ? Sep 9, 2022 17:27 |
|
It's not a high hurdle to clear. The x86 MOV instruction is Turing complete (PDF). quote:Thus, while it has been known for quite some time that x86 has far too many instructions, we can now contribute the novel result that it also has far too many registers.
|
# ? Sep 9, 2022 17:34 |
|
Zopotantor posted:It's not a high hurdle to clear. The x86 MOV instruction is Turing complete (PDF). That one I remember.
|
# ? Sep 9, 2022 18:36 |
|
Everything is Turing complete until proven otherwise, and those results are the really interesting ones.
|
# ? Sep 9, 2022 18:37 |
|
Zopotantor posted:It's not a high hurdle to clear. The x86 MOV instruction is Turing complete (PDF). Baba is You can implement Busy Beavers and Conway's Game of Life, either of which means it's Turing complete.
|
# ? Sep 9, 2022 19:31 |
|
ultrafilter posted:Everything is Turing complete until proven otherwise, and those results are the really interesting ones.
|
# ? Sep 9, 2022 20:23 |
|
Macichne Leainig posted:I tried to use quotes in my new title and it's almost better how it is getting all unicode hosed. It actually does look good. duck monster posted:We do code review. Whose nephew are they?
|
# ? Sep 9, 2022 20:43 |
|
ultrafilter posted:Everything is Turing complete until proven otherwise, and those results are the really interesting ones. I always liked the general recursive functions as a model of computation that illustrates how little you need to get Turing completeness. The requirements are as follows:
|
# ? Sep 9, 2022 21:22 |
|
I'm not Turing-complete. There's a bunch of computable functions I couldn't do at all.
|
# ? Sep 9, 2022 22:13 |
|
|
# ? May 21, 2024 09:55 |
|
I’m turning complete, and you’ll excuse, me I’m going to recurse myself.
|
# ? Sep 9, 2022 22:18 |