Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
BigPaddy
Jun 30, 2008

That night we performed the rite and opened the gate.
Halfway through, I went to fix us both a coke float.
By the time I got back, he'd gone insane.
Plus, he'd left the gate open and there was evil everywhere.


Clearly the other party to the conversation is prefers boobs.

Adbot
ADBOT LOVES YOU

Hammerite
Mar 9, 2007

And you don't remember what I said here, either, but it was pompous and stupid.
Jade Ear Joe

Xarn posted:

oh nevermind, you were just shitposting about markdown.

and I will continue to do so forever!!!

Woodsy Owl
Oct 27, 2004

Phobeste posted:

After precisely one instance of trying to tell someone "no it's fat_butt.smell_gross_farts not _own_butt.fart_doesnt_smell" and having it turn into "no it's `fatbutt.smellgross_farts not ownbutt.fartdoesntsmell`" i'm ready to throw my computer out a window i don't get why this is tough to understand or would warrant a meeting

100% this. gently caress. Teams.

Volguus
Mar 3, 2009

Phobeste posted:

After precisely one instance of trying to tell someone "no it's fat_butt.smell_gross_farts not _own_butt.fart_doesnt_smell" and having it turn into "no it's `fatbutt.smellgross_farts not ownbutt.fartdoesntsmell`" i'm ready to throw my computer out a window i don't get why this is tough to understand or would warrant a meeting

The entire point of an instant messaging system is to avoid having meetings as much as possible. As much as I despise these chat systems, they beat meetings. But if the explanation seems that it would be longer or that a longer discussion is warranted, then by all means, jump in a meeting, share your desktop/ide/whatever and go at it.

Macichne Leainig
Jul 26, 2012

by VG

Woodsy Owl posted:

100% this. gently caress. Teams.

I haven't been bit by that specific problem but I'm just popping in to echo this specific sentiment.

Startup culture is horrible, I think I have like 5 different communication apps. Slack and Teams among them. Slack is the least worst at least.

QuarkJets
Sep 8, 2008

Ola posted:

Well, the chat app wants you to write rich text quickly with wysiwyg Markdown so that's why they did it. All I'm saying is that the reasons for wanting them to remove that functionality (however much you dislike it, I know I wouldn't miss it) are bad, dumb and super easy to work around anyway.

No one is asking for the functionality to be removed they just want the ability to turn that functionality off to work more consistently.

qsvui
Aug 23, 2003
some crazy thing
We use Teams but really only for meetings. Some people in our company don't seem to use Teams for messaging so I think everyone defaults to email. Not sure which option is better.

wolfman101
Feb 8, 2004

PCXL Fanboy
I have yet to use Teams, but I would be surprised if it is worse than Symphony. gently caress that poo poo.

lifg
Dec 4, 2000
<this tag left blank>
Muldoon
Teams isn’t really built for communication. It’s built for organization. I’ve been in two jobs that moved from Slack to Teams and in each time communication went down.

D34THROW
Jan 29, 2012

RETAIL RETAIL LISTEN TO ME BITCH ABOUT RETAIL
:rant:
We use email and in-person meetings.

No Zoomer poo poo here :cloud:

redleader
Aug 18, 2005

Engage according to operational parameters

D34THROW posted:

We use email and in-person meetings.

No Zoomer poo poo here :cloud:

i bet you also make phone calls too :barf:

BigPaddy
Jun 30, 2008

That night we performed the rite and opened the gate.
Halfway through, I went to fix us both a coke float.
By the time I got back, he'd gone insane.
Plus, he'd left the gate open and there was evil everywhere.


I write memos that are distributed in an envelope with a bunch of lines to write a recipients name then cross them out once they have received it.

CPColin
Sep 9, 2003

Big ol' smile.
I used to do that with the office birthday cards, except just immediately cross off my name and hand it to the next person. It was the worst when I couldn't find a name I recognized.

redleader
Aug 18, 2005

Engage according to operational parameters
stack overflow strikes again: Can SQL Server's crash resilience be improved?


quote:

Background: The "PC" is a Windows tablet mounted on a forklift. When the user turns off the forklift, the tablet loses power. We have tried to teach the users to properly shut down Windows before turning off the forklift, but failed (probably because just turning it off "works" most of the time). We are also currently investigating other options, such as adding a UPS which signals the tablet to shut down on power loss.

Obfuscation
Jan 1, 2008
Good luck to you, I know you believe in hell
I had to check if that was someone that I know since I’ve personally written several programs that were mostly SQL running locally in a tablet mounted to a working vehicle of some kind. Not forklifts though.

Tei
Feb 19, 2011

call flush every few sec0nds?

DoctorTristan
Mar 11, 2006

I would look up into your lifeless eyes and wave, like this. Can you and your associates arrange that for me, Mr. Morden?
Coding horrors meet OSHA thread

Polio Vax Scene
Apr 5, 2009



[virtual] load-bearing forklift

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe
Can't the tablet live on battery for long enough to detect that the forklift is powered off and shut down cleanly? Presumably it has sensor input already.

QuarkJets
Sep 8, 2008

rjmccall posted:

Can't the tablet live on battery for long enough to detect that the forklift is powered off and shut down cleanly? Presumably it has sensor input already.

That was my thought too, is there some requirement that it not have a battery? I guess not, since a UPS is being considered. You can tell Windows to shut down after 5 minutes on battery power or whatever, did anyone tell the OP this

champagne posting
Apr 5, 2006

YOU ARE A BRAIN
IN A BUNKER

Polio Vax Scene posted:

[virtual] load-bearing forklift

gotta make it abstract or someone will neglect to implement it and the whole code architecture will come down

D34THROW
Jan 29, 2012

RETAIL RETAIL LISTEN TO ME BITCH ABOUT RETAIL
:rant:
More self horror! I just did this until I get multiple dispatch working.

Creating a list with list comprehension and unpacking it to pass to an *args method (which packs the arguments into a list that is then unpacked in the method).

Python code:
self.materials = combine_and_add_dicts(
            *[li.materials for li in self.line_items.values()]
        )

def combine_and_add_dicts(*dicts) -> dict:
    """
    Combines an arbitrary number of dicts, summing values where keys
    match and adding keys where they do not exist.

    :param list dicts:
        A list of `dict` objects to combine.
    :return:
        A combined dict.
    :rtype: dict
    """
    final_dict = defaultdict(int)
    for key, val in chain(((k, v) for d in dicts for (k, v) in d.items())):
        final_dict[key] += val
    return dict(final_dict)

ExcessBLarg!
Sep 1, 2001

D34THROW posted:

Creating a list with list comprehension and unpacking it to pass to an *args method
You could probably just pass a generator expression into the method and use itertools.chain.from_iterable to avoid all the packing/unpacking.

D34THROW posted:

(which packs the arguments into a list that is then unpacked in the method).
The splat operator packs the arguments into a tuple, not a list.

NihilCredo
Jun 6, 2011

iram omni possibili modo preme:
plus una illa te diffamabit, quam multæ virtutes commendabunt

Think I might need to dial down our 'retry transient / ephemeral errors' handling code just a bit:

quote:

"Exception: Retry failed (One or more errors occurred. (One or more errors occurred. (One or more errors occurred. (25P02: current transaction is aborted, commands ignored until end of transaction block)) (One or more errors occurred. (25P02: current transaction is aborted, commands ignored until end of transaction block)) (One or more errors occurred. (25P02: current transaction is aborted, commands ignored until end of transaction block)))) (One or more errors occurred. (One or more errors occurred. (One or more errors occurred. (25P02: current transaction is aborted, commands ignored until end of transaction block)) (One or more errors occurred. (25P02: current transaction is aborted, commands ignored until end of transaction block)) (One or more errors occurred. (25P02: current transaction is aborted, commands ignored until end of transaction block)))) (One or more errors occurred. (One or more errors occurred. (One or more errors occurred. (25P02: current transaction is aborted, commands ignored until end of transaction block)) (One or more errors occurred. (25P02: current transaction is aborted, commands ignored until end of transaction block)) (One or more errors occurred. (25P02: current transaction is aborted, commands ignored until end of transaction block)))) (One or more errors occurred. (One or more errors occurred. (One or more errors occurred. (25P02: current transaction is aborted, commands ignored until end of transaction block)) (One or more errors occurred. (25P02: current transaction is aborted, commands ignored until end of transaction block)) (One or more errors occurred. (25P02: current transaction is aborted, commands ignored until end of transaction block)))) (One or more errors occurred. (One or more errors occurred. (One or more errors occurred. (25P02: current transaction is aborted, commands ignored until end of transaction block)) (One or more errors occurred. (25P02: current transaction is aborted, commands ignored until end of transaction block)) (One or more errors occurred. (25P02: current transaction is aborted, commands ignored until end of transaction block)))) (One or more errors occurred. (One or more errors occurred. (One or more errors occurred. (Exception while reading from stream)) (One or more errors occurred. (25P02: current transaction is aborted, commands ignored until end of transaction block)) (One or more errors occurred. (25P02: current transaction is aborted, commands ignored until end of transaction block))))"

Or at least figure out a way to have the logs record the original exception's stack trace instead of just its message.

Sagacity
May 2, 2003
Hopefully my epitaph will be funnier than my custom title.

NihilCredo posted:

Think I might need to dial down our 'retry transient / ephemeral errors' handling code just a bit:

Or at least figure out a way to have the logs record the original exception's stack trace instead of just its message.
Hi friend, have you maybe considered checking if the current transaction is aborted?

duck monster
Dec 15, 2004

Just had the new guy at work decided to rewrite a NodeJS UDP server in loving PHP, because "NodeJS cant scale". I argued with him a bit before the boss said "Dude, let the new guy own his project". His theory is that NodeJS can't spread across multiple cores. Like, sure, but these things are deployed in containers in a kubernetes cluster, its never going to get to that stage.

The initial protype uses forks for multitasking, and periodically shits itself because he doesn't understand memory management, and he now doesnt know how to get the incoming AMQP (This thing bridges from IoT devices to our AMQP network) into those forks.

Like dude, these where all solved problems.....

Its not my project, but I cant help thinking its gonna end up mine in the aftermath.

Jazerus
May 24, 2011


when it's yours, simply revert it to the nodejs server and don't tell anyone that that's what you did

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.

duck monster posted:

Just had the new guy at work decided to rewrite a NodeJS UDP server in loving PHP, because "NodeJS cant scale". I argued with him a bit before the boss said "Dude, let the new guy own his project". His theory is that NodeJS can't spread across multiple cores. Like, sure, but these things are deployed in containers in a kubernetes cluster, its never going to get to that stage.

The initial protype uses forks for multitasking, and periodically shits itself because he doesn't understand memory management, and he now doesnt know how to get the incoming AMQP (This thing bridges from IoT devices to our AMQP network) into those forks.

Like dude, these where all solved problems.....

Its not my project, but I cant help thinking its gonna end up mine in the aftermath.

Both of those options are bad.

King Cocoa Butter
Mar 24, 2021

Don't be ashy.
Found this gem in the API for a commercial device we recently purchased:
Python code:
else:
    a = 1/0 # Force an exception

Macichne Leainig
Jul 26, 2012

by VG
raise sitting there wondering what it's done wrong

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

Protocol7 posted:

raise sitting there wondering what it's done wrong

It knows, but keeps trying to make illegal arguments.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
It's someone writing another language in Python syntax but I'm not sure which. C?

Xarn
Jun 26, 2015
Yes, except it isn't guaranteed to work in C

spiritual bypass
Feb 19, 2008

Grimey Drawer

duck monster posted:

Just had the new guy at work decided to rewrite a NodeJS UDP server in loving PHP, because "NodeJS cant scale". I argued with him a bit before the boss said "Dude, let the new guy own his project". His theory is that NodeJS can't spread across multiple cores. Like, sure, but these things are deployed in containers in a kubernetes cluster, its never going to get to that stage.

The initial protype uses forks for multitasking, and periodically shits itself because he doesn't understand memory management, and he now doesnt know how to get the incoming AMQP (This thing bridges from IoT devices to our AMQP network) into those forks.

Like dude, these where all solved problems.....

Its not my project, but I cant help thinking its gonna end up mine in the aftermath.

When it comes back your way, rewrite it in Go

Volguus
Mar 3, 2009

Xarn posted:

Yes, except it isn't guaranteed to work in C

What do you mean it isn't guaranteed to work in C? Oh, undefined behavior? Well, it looks to be well defined on Bob's computer and that's what we'll ship with the application anyway.

Zopotantor
Feb 24, 2013

...und ist er drin dann lassen wir ihn niemals wieder raus...

King Cocoa Butter posted:

Found this gem in the API for a commercial device we recently purchased:
Python code:
else:
    a = 1/0 # Force an exception

I recently wrote some C++ code doing zero division as an error case, and I'm not ashamed.




















Poor man's static_assert in C++03.
code:
enum { ERROR_FART_MUST_BE_NONZERO = 1 / (FART != 0) };

champagne posting
Apr 5, 2006

YOU ARE A BRAIN
IN A BUNKER

pokeyman posted:

It's someone writing another language in Python syntax but I'm not sure which. C?

Could be any number of languages. Only thing I'm sure of is its an old crusty electrical engineer who's never heard of 'throw'

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.

champagne posting posted:

Could be any number of languages. Only thing I'm sure of is its an old crusty electrical engineer who's never heard of 'throw'

What's "throw"? I usually just return -1 after setting errno.

Foxfire_
Nov 8, 2010

leper khan posted:

What's "throw"? I usually just return -1 after setting errno.
Hot Take: exceptions were a mistake and errno style reporting is much better for producing reliable software than "every call can potentially throw anything, hope someone documented every type it can directly or indirectly throw and kept it up to date"

Like to write a python program that writes to a file and handles all errors involves a spelunking expedition into the CPython implementation because the documentation isn't going to tell you what those calls can throw

Adbot
ADBOT LOVES YOU

ToxicFrog
Apr 26, 2008


pokeyman posted:

It's someone writing another language in Python syntax but I'm not sure which. C?

C has both abort(3) and assert(3), and if you really want to die by SIGFPE rather than SIGABRT it also has raise(3). All of these are in C89.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply