|
HoboMan posted:just managed to take 3000 line sql query no one ever wanted to look at that is central to how our poo poo works and make it go from 15 second run time to sub 1 second. i had to yell at everyone because they were pulling related entities one by one in a for loop instead of getting all the IDs and pulling it in a single call. went from 45 seconds to 30ms.
|
# ? Sep 20, 2017 17:13 |
|
|
# ? May 10, 2024 12:28 |
|
ThePeavstenator posted:cjs: bringing speakers to work to plug into your computer should be a crime punishable by death what????
|
# ? Sep 20, 2017 18:40 |
|
CRIP EATIN BREAD posted:i had to yell at everyone because they were pulling related entities one by one in a for loop instead of getting all the IDs and pulling it in a single call. this is a constant struggle here
|
# ? Sep 20, 2017 18:42 |
|
MALE SHOEGAZE posted:what???? When you plug speakers into a computer, it's able to better project sound in a larger area. Headphones/earbuds also allow you to get more volume while not forcing your coworkers to hear your Irish pirate metal playlist. No I did not pull that example out of my rear end.
|
# ? Sep 20, 2017 19:00 |
|
do u just mean he played that one irish pirate metal song on loop like every uninspired bar does on st pattys day although that song makes me want to watch the departed again
|
# ? Sep 20, 2017 19:15 |
|
[quote="“ThePeavstenator”" post="“476588170”"] When you plug speakers into a computer, it’s able to better project sound in a larger area. Headphones/earbuds also allow you to get more volume while not forcing your coworkers to hear your Irish pirate metal playlist. No I did not pull that example out of my rear end. [/quote] i get it im just stunned that anyone would do this
|
# ? Sep 20, 2017 19:20 |
MALE SHOEGAZE posted:i get it im just stunned that anyone would do this just lol if you don't practice on bagpipes while your programs are compiling
|
|
# ? Sep 20, 2017 19:21 |
|
This is from the same person who defended google memo guy. I'm glad that I barely have to be in the office anymore.
|
# ? Sep 20, 2017 19:24 |
|
i am terrified of the day i accidentally unplug my headphones and my shameful taste in music is blasted across the office
|
# ? Sep 20, 2017 20:27 |
HoboMan posted:i am terrified of the day i accidentally unplug my headphones and my shameful taste in music is blasted across the office im p sure my music taste matches with head legal in our office so i got this scenario covered. now if dude who watches kripparian videos at work will unplug his by accident though...
|
|
# ? Sep 20, 2017 20:34 |
|
team lead is out on vacation this week and his manager is trying to force me to make database schema changes to enable AUTOINCREMENT of primary keys in client databases the client database records, including the id, get uploaded to a server :/ the manager looks at the server database frequently and orders by client db id when he wants to see what's happening in client logs when ids recycled he got confused and was convinced there's a bug in sqlite until I showed him the docs. I told him ids are an opaque identifier that shouldn't be depended on to have any property except uniqueness in a specific table and that it's a mistake to send them to the server. manager is like nah it's fine since it's only humans that rely on ids to be sequential, I'm going to change the schema myself! this just feels like awful duct tape over larger issues with our client databases and a piling on of more technical debt I already found db purging code that assumes lower ids are older records am I in the wrong here?
|
# ? Sep 20, 2017 21:25 |
|
HoboMan posted:i am terrified of the day i accidentally unplug my headphones and my shameful taste in music is blasted across the office my old headphones were garbage and one day i was cranking painkiller and was asked very nicely to turn it down because everyone could hear it. i should have said "you're welcome" though
|
# ? Sep 20, 2017 21:56 |
|
meatpotato posted:am I in the wrong here? yes because you continue to work there
|
# ? Sep 21, 2017 00:05 |
|
meatpotato posted:am I in the wrong here? not entirely but it sounds like the damage is done like if you can go back and make the keys *obviously* not monotonically increasing and then fix any breakage then fine, but why have something that looks deceptively like an unique increasing id but is not when you can fix it with a schema change? people will just write more code like the purge code you found
|
# ? Sep 21, 2017 00:08 |
|
FamDav posted:yes because you continue to work there ohhhhhhhhhhhhhhh.
|
# ? Sep 21, 2017 00:13 |
|
not that i can say a drat thing, our db is super shameful.
|
# ? Sep 21, 2017 00:15 |
|
FamDav posted:yes because you continue to work there I know, I've been trying to leave for two years
|
# ? Sep 21, 2017 00:27 |
|
we abuse the gently caress out of jsonb for all sorts of poo poo. supposedly we're going to talk about formalizing the schema but im not holding my breath
|
# ? Sep 21, 2017 00:49 |
|
ctps: spent five hours tracking down a weird bug to me forgetting a break in a switch statement
|
# ? Sep 21, 2017 00:52 |
|
HoboMan posted:just managed to take 3000 line sql query no one ever wanted to look at that is central to how our poo poo works and make it go from 15 second run time to sub 1 second. this, but two table variables and from 45 min to effectively instantaneous. it wasn't 3000 lines though i'm dealing with a totally loving inscrutable 1500 line function, which implements some core functionality. i alternate between fantasizing about just walking out and never returning, and praying for death
|
# ? Sep 21, 2017 01:12 |
|
got shown the head programmer's c++ program to create a single master record of every device on the (extremely complex) network: 1. do a full sql dump of every record in every table of all our different monitoring softwares, DO NOT USE THEIR APIs. tab-delimit everything, including the manual entries 2. make sure that the first row in the giant table is the name of the text file that the sql dump went to, named useful things like acronym1.txt, acronym2.txt, acronym3.txt..... acronym22.txt 3. include every column from every table. so we have 3-6 different "IP" fields, across the giant table, which is of course mostly empty. no, we can't just grab the records one by one from each table and try to do something useful with them 4. apparently making sense of this and figuring out what rows/records match what? that's where i come in met with another programmer on the project (more of a DB person these days) and we shared our deep misgivings also i freely admit i have essentially zero c++ , but is this kind of thing... idiomatic? code:
|
# ? Sep 21, 2017 01:21 |
|
like i got no idea what variable "sc" is, but is this considered kinda par for the course in c++ ?
|
# ? Sep 21, 2017 01:23 |
|
that's a c programmer who happens to be using a c++ compiler for sure.
|
# ? Sep 21, 2017 01:28 |
|
okay Jaguar, now that I know translation and scale matrix multiplication works, let's try rotation. rotate this square 45 degrees on the Z axis no. that is completely wrong.
|
# ? Sep 21, 2017 01:30 |
|
Luigi Thirty posted:okay Jaguar, now that I know translation and scale matrix multiplication works, let's try rotation. rotate this square 45 degrees on the Z axis i'm the texture from wolfenstein 3d
|
# ? Sep 21, 2017 01:34 |
|
terrible programmer status: confused about fixed point again I need to multiply a positive number by a negative number. sin(45 degrees) = 0.707 = 0x0000B504 X coordinate = -20 = 0xFFEC0000 0000B504 * FFEC0000 = B4F5 DBB00000 it overflows and shifting the result 16 bits to the right results in garbage (-20 * 0.707 is not 14,000-something) what do I need to do to counteract the overflow?
|
# ? Sep 21, 2017 04:08 |
|
HoboMan posted:i am terrified of the day i accidentally unplug my headphones and my shameful taste in music is blasted across the office let me guess, vengaboys on repeat?
|
# ? Sep 21, 2017 06:37 |
|
Luigi Thirty posted:terrible programmer status: confused about fixed point again what's the answer you want -0xE2450 = FFF1DBB0?
|
# ? Sep 21, 2017 06:46 |
|
Are you sign-extending the negative number when you convert it to 64 bits for the multiplication?
|
# ? Sep 21, 2017 09:10 |
|
Uncle Enzo posted:
Thats C and probably unidiomatic because it needlessly initializes all variables.
|
# ? Sep 21, 2017 11:28 |
|
Luigi Thirty posted:okay Jaguar, now that I know translation and scale matrix multiplication works, let's try rotation. rotate this square 45 degrees on the Z axis maybe the code is right, but the jaguar does it wrong because of a hardware bug...
|
# ? Sep 21, 2017 12:05 |
|
Sweevo posted:maybe the code is right, but the jaguar does it wrong because of a hardware bug... this seems likely lol
|
# ? Sep 21, 2017 13:09 |
|
Jabor posted:Are you sign-extending the negative number when you convert it to 64 bits for the multiplication? no and this is probably it [quote="“JawnV6”" post="“476608027”"] what’s the answer you want -0xE2450 = FFF1DBB0? [/quote] yes, it's twos complement
|
# ? Sep 21, 2017 13:44 |
|
I just tried running unit tests for an open source project using MySQL. 2 hours later and it's not even halfway done. I had to switch to postgres (which then ran to completion in 45 minutes) Why is MySQL so ShitSql?
|
# ? Sep 21, 2017 14:43 |
|
what are you testing that takes that long? are you moving a bunch of data?
|
# ? Sep 21, 2017 16:23 |
Uncle Enzo posted:like i got no idea what variable "sc" is, but is this considered kinda par for the course in c++ ? Not really. That person is programming C++ as if it were C, which is really only idiomatic if you are using some library which only has a C API. Usually you would use a std::string (or something similar) instead of a char pointer, and you would be declaring your variables close to when you first use them, instead of all at the top of the function. IMO the fact that this person does that latter part kind of outs them as someone who learned K&R C and never really updated their programming style since.
|
|
# ? Sep 21, 2017 17:54 |
|
the idiomatic way to solve this problem in c++ would be to not use c++ because querying a bunch of heterogeneous databases and then assembling text records that summarize the results is one of the worst uses of c++ i can think of
|
# ? Sep 21, 2017 17:59 |
|
[quote="“Sapozhnik”" post="“476619279”"] the idiomatic way to solve this problem in c++ would be to not use c++ because querying a bunch of heterogeneous databases and then assembling text records that summarize the results is one of the worst uses of c++ i can think of [/quote] I'd use REXX before I used C++ for database manipulation
|
# ? Sep 21, 2017 18:37 |
|
ctps: just learned about blue-green deployment and i feel like a idiot for not thinking of this myself it solves basically all of our deployment problems
|
# ? Sep 21, 2017 20:40 |
|
|
# ? May 10, 2024 12:28 |
|
HoboMan posted:ctps: just learned about blue-green deployment and i feel like a idiot for not thinking of this myself depending on a few things about your system it can be real hard to pull off in practice but it's great when you can do it.
|
# ? Sep 21, 2017 22:49 |