|
boy i had a really lame and weird dream last night where the yospos programming threads had been taken over by unironic c++ likers, crazy poo poo huh
|
![]() |
|
![]()
|
# ? Jun 6, 2023 20:03 |
|
i have just spent idk an hour trying to work out why our pre-production environment has no log entries in it after we adjusted some of our loggers to stop writing out garbage and oh boy is the answer a delight! nobody ever runs andy loving maintenance so our log db had so much stuff in it that you couldn't query it, so seeing as its all test logs i truncated the log table, so far so good. except that now nothing else is getting written to it even when there's an error, that's weird. and wait when i do a manual insert there's nothing there either, huh??? turns out there's a trigger on the loving log table that deletes the oldest record following any insert, so if you have no logs in it at all it will insert, hit the trigger and delete the log entry again because your record is now the oldest. I highly recommend this as a piece of troll code because of course, nobody ever thinks to look for loving triggers edit: OH MY loving GOD THIS WAS ADDED BY SOMEONE *AS* MAINTENANCE WHAT THE FUCCKKKKK VVV booooo_this_man.gif Powerful Two-Hander fucked around with this message at 19:02 on Jan 16, 2019 |
![]() |
|
Powerful Two-Hander posted:I highly recommend this as a piece of troll code because of course, nobody ever thinks to look for loving triggers well did you ignore the trigger warning?
|
![]() |
|
Powerful Two-Hander posted:i have just spent idk an hour trying to work out why our pre-production environment has no log entries in it after we adjusted some of our loggers to stop writing out garbage and oh boy is the answer a delight! yeah don't ever use triggers cause they're a pain in the rear end for discovery. you should run a query of your schema for any existing triggers and get rid of all of them if you can.
|
![]() |
|
Shaggar posted:yeah don't ever use triggers cause they're a pain in the rear end for discovery. you should run a query of your schema for any existing triggers and get rid of all of them if you can. agreed. there is precisely 1 valid use case for them imho which is for journalling data for audit history if you have to keep it, anything else is an abomination. i have changed the trigger to only do anything if there are more than 100,000 logs in the table and written a sarcastic comment in it even though i know pefectly well nobody else will ever read it.
|
![]() |
|
NihilCredo posted:forget "every browser", just within msft it's gonna take a few more years for netcore to become a full replacement for netfx, and probably decades for it to become a full replacement for mono yeah, i'm really wondering what the long-term strategy for netcore is. obviously part of it is "don't spook enterprises by deprecating netfx", but beyond that, ??? keeping both mono and netcore around seems like a big duplication of effort, given that they both seem so similar on the surface
|
![]() |
|
Sapozhnik posted:boy i had a really lame and weird dream last night where the yospos programming threads had been taken over by unironic c++ likers, crazy poo poo huh please do not langshame in this thread. the heart wants what the heart wants
|
![]() |
|
wow, did ya'll know starcraft 2 exposes a client protobuf protocol and c++ library that lets you program bots using all of the information and abilities the AI in starcraft 2 has?? so anyhow that's what i'm doing for a while.
|
![]() |
|
i'm going to implement sorting algorithms with sc2 units
|
![]() |
|
please make gifs
|
![]() |
|
also make an AI that sends groups of enemies in a formation spelling out "YOSPOS", tia
|
![]() |
|
CRIP EATIN BREAD posted:also make an AI that sends groups of enemies in a formation spelling out "YOSPOS", tia honestly, already planning on it
|
![]() |
|
DONT THREAD ON ME posted:i'm going to implement sorting algorithms with sc2 units nice
|
![]() |
|
CRIP EATIN BREAD posted:also make an AI that sends groups of enemies in a formation spelling out "YOSPOS", tia *spinning newspaper headline* TERRORISTS EVADE ECHELONSA USING SECRET "LOST TEMPLE" CHANNEL
|
![]() |
|
Sapozhnik posted:boy i had a really lame and weird dream last night where the yospos programming threads had been taken over by unironic c++ likers, crazy poo poo huh I miss the old days where monad lovers ruled the threads
|
![]() |
|
DONT THREAD ON ME posted:wow, did ya'll know starcraft 2 exposes a client protobuf protocol and c++ library that lets you program bots using all of the information and abilities the AI in starcraft 2 has?? I yearn for this much free time.
|
![]() |
|
step one is quit your job and live off savings for a while
|
![]() |
Sapozhnik posted:boy i had a really lame and weird dream last night where the yospos programming threads had been taken over by unironic c++ likers, crazy poo poo huh the talent deficit posted:I miss the old days where monad lovers ruled the threads why not both?
|
|
![]() |
|
the talent deficit posted:I miss the old days where monad lovers ruled the threads Anybody want to know what a monad is? I feel like I've done one post per person in the thread at this point
|
![]() |
|
monads are just monoids in the category of endofunctors
|
![]() |
|
I even got a new monad related av to spice things up a bit Real talk though I stupidly decided to do a timed job interview programming thing in Haskell after having not touched it for like 4 years and boy was that a mistake. They did not call back.
|
![]() |
|
Illusive gently caress Man posted:how can/should a programmer add this kind of detail in the exception world of that paper? A try-catch that just appends detail and re-throws sounds unwieldy to me, but that could be because I've been living in an exceptionless world for so long. sorry: Sutter-sensei posted:It is not a goal to enable distantly handled errors to contain arbitrary programmatically usable information. Distantly handled error details primarily need to be human usable (e.g., debugging and trace logging), and a .what() string is sufficient. with classic exceptions, you can easily wrap at the throw site, and keep the same catch sites, and gradually migrate the catch sites to extract the extra information. see how Boost.Exception does it: https://www.boost.org/doc/libs/1_69_0/libs/exception/doc/boost-exception.html with value exceptions as currently proposed, you can wrap just as easily, but unwrapping becomes mandatory, because they don't have multiple inheritance: every error has one piece of type-erased data and a category, no more no less. no such thing as multiple views into an object, like you can do with classes hackbunny fucked around with this message at 22:45 on Jan 16, 2019 |
![]() |
|
honestly I'm surprised that the proposal doesn't provide for user-defined error types, and a little disappointed because I was never a huge fan of funneling all error handling through errc comparisons/conversions e: my bad, §4.6.5 says it may be possible in the future, but herb sounds skeptical of its usefulness. weird because I can think of a lot of things I'd like to have that his proposed std::error can't do hackbunny fucked around with this message at 23:48 on Jan 16, 2019 |
![]() |
|
Powerful Two-Hander posted:nobody ever runs andy loving maintenance is this like norton disk doctor? I’m andy loving maintenance! howdy howdy howdy
|
![]() |
|
what the hell is a monad
|
![]() |
|
pokeyman posted:is this like norton disk doctor? he's like the blue collar dr watson i spotted that typo and just left it
|
![]() |
|
Powerful Two-Hander posted:i spotted that typo and just left it ty for your service
|
![]() |
|
My favourite trigger is one that triggers on update/create of rows for table A. What it does is it creates a new record in another table, which has two columns: classname and args. Args is a text data type but it stores XML. So what happens is there is a Cron job that would poll that table, use the language equivalent of "eval" to create a new "classname", deserialise the XML "args" and feed it into the class, then execute the class to do stuff. So when you look at the project there are all these little class files that can't be connected with "find usages"
|
![]() |
|
redleader posted:please do not langshame in this thread. the heart wants what the heart wants qntm posted:what's a monad ![]()
|
![]() |
|
floatman posted:XML could be worse... could be json
|
![]() |
|
I left out what the XML usually contains. The XML usually contains one encoded string which decodes to json. Sometimes, they store CSV strings in the json too instead of creating a json array.
|
![]() |
|
floatman posted:I left out what the XML usually contains. oh, I didn’t realise I had colleagues in this thread
|
![]() |
|
floatman posted:My favourite trigger is one that triggers on update/create of rows for table A. What it does is it creates a new record in another table, which has two columns: classname and args. Args is a text data type but it stores XML. if you use json.net to de/serialise objects that implement an interface something like this happens, because the deserialiser doesn't know what implementation its dealing with, it looks for a type property that was added by the serialiser (if you called it with the appropriate flags) and uses it to instance the proper object type then populate it with the rest of the data its actually really useful but I wouldn't want to do it in the db and involve triggers in it ![]()
|
![]() |
|
is there an idiomatic name for a two-way lookup data structure (i.e. a bijective function)? and/or a more clever design than a wrapper around two hashmaps, maybe
|
![]() |
|
floatman posted:My favourite trigger is one that triggers on update/create of rows for table A. What it does is it creates a new record in another table, which has two columns: classname and args. Args is a text data type but it stores XML. yeah but you can deploy code changes so easily now lmao
|
![]() |
|
years and years ago i had a team lead bring in a business rule engine that worked like that via reflection, his justification was "it will let us deploy code changes into prod by going through the data update approval process instead of the release process, which is easier (!) and the business analysts will be able to change the rules directly (!!!!)" it was slow as poo poo, hard to code (required a third party editor), and of course no business analysts ever touched it as soon as he left i accepted the team lead position on the condition our first project was to replace that with native c# code written and maintained by developers
|
![]() |
|
NihilCredo posted:is there an idiomatic name for a two-way lookup data structure (i.e. a bijective function)? it turns out that just having a map you can query in the forward direction, and another map you can query in the reverse direction, is actually a pretty convenient api for this sort of data structure https://github.com/google/guava/wiki/NewCollectionTypesExplained#bimap
|
![]() |
|
"bimap" is a pretty good name, thanks
|
![]() |
|
oh god converting bytestring py2 to unicode py3 just kill me
|
![]() |
|
![]()
|
# ? Jun 6, 2023 20:03 |
|
also wtf is this poo poo, could it be any more impenetrablecode:
|
![]() |