There have been multiple accounts created with the sole purpose of posting advertisement posts or replies containing unsolicited advertising.

Accounts which solely post advertisements, or persistently post them may be terminated.

programmer_humor

This magazine is from a federated server and may be incomplete. Browse more on the original instance.

nyan , in Always try sudo

bash: sudo: command not found

After all, we don’t know that he has it installed, especially if he’s running a really old distro.

PhlubbaDubba , in Always try sudo

See that’s the issue, he should have tried stopping the cardiac arrest process instead of just resetting the man to the beginning of it

jol ,

Patient HP kept dropping to zero after resetting, but we don’t have budget to investigate why and this was supposed to be worth only 1 story point, so we set up a microservice that runs a job every 200ms to set HP back to 100. So long as nothing shuts down the service, patient should be fine. Marking as Done.

ramjambamalam ,

Whoops, stopped the lungs process instead of the cardiac arrest process.

Actually you really want to restart the heart service, right? sudo systemd restart heart

PhlubbaDubba ,

Depends on who’s working the terminal, nano vs vim difference

Dufurson , in Always try sudo
@Dufurson@sh.itjust.works avatar

btw I use Arch

CodexArcanum , in Always try sudo

That command syntax looks kind of like how Skyrim’s scripting console works, and gods help us if reality is a Bethesda game! (Kind of, if you added string-parsing based overloads and, for some reason, a command-syntax sudo keyword.

explodicle ,

Need something?

Mercury , in Always try sudo

Goddamn, the joke gets worse the more I inspect each panel.

johannesvanderwhales ,

XKCD 149 but worse.

Obi ,
@Obi@sopuli.xyz avatar

Link for the lazy.

guemax ,

Thank you very much!

Linkerbaan ,
@Linkerbaan@lemmy.world avatar

The font changes like 3 times 👌

jol ,

They are a doctor of computer science, not a doctor of design. You need a design phd to pick correct fonts.

MonkderDritte , in They did not reply.

A bug in the bot. Block the number.

6mementomori , in Programming as a hobby means I can do whatever I want!

I don’t nearly know enough to understand this but is anyone willing to help me get the thing on the top :>

Thelie OP ,

To first give you some context, the thing on the top is from The “Representable Functors” chapter of Category Theory for Programmers. So technically, you only need to read 230 Pages of a maths textbook to get it ;)

But this isn’t exactly what you asked for, so I’ll try to help you get it as best I can with my limited understanding of the subject. First of all it would be helpful to know what your prior knowledge in Maths, especially Set theory, is?

anton , in Programming as a hobby means I can do whatever I want!

Instead of


<span style="color:#323232;">if let Some(a_) = a{
</span><span style="color:#323232;">    ()
</span><span style="color:#323232;">} else if let Some(b_)=b{
</span><span style="color:#323232;">    ()
</span><span style="color:#323232;">} else {
</span><span style="color:#323232;">    dostuff 
</span><span style="color:#323232;">}
</span>

you could just use


<span style="color:#323232;">if a.isNone()&&b.isNone(){
</span><span style="color:#323232;">    dostuff
</span><span style="color:#323232;">}
</span>

Also if you don’t use the value in a match just use _

jimitsoni18 ,

Also you can use enums insteas of string literals

Thelie OP ,

I’m not sure how I would go about this in an elegant way since I’m matching the string I get from a message…

jimitsoni18 ,

If the message used enums for actions/procedures like SPAM_MEMES, then using enums would be more performant

Thelie OP ,

I think you’d be happy to know that I’ve gone for a bit of an overkill and used Pest to parse the commands, which automagically gets me an enum to match against in this position.

The sad part is, I haven’t gotten the Media upload to work, so the project is on ice for a little while…

Thelie OP ,

That’s a good point, thanks. Maybe I’ll go without the if entirely, the (janky) code is still very much in flux ;)

guemax , in Always try sudo

https://lemmy.today/pictrs/image/e45b0cbf-a9ef-4f33-8252-2e907d3bbf03.png

HeLlOoOoO, wHaT nOw? It’S a Do Or DiE sItUaTiOn, HuRrY!

ByteJunk , in Implementing RFC 3339 shouldn't really be that hard...
@ByteJunk@lemmy.world avatar

It should be implemented in people’s brains.

How this goes, usually, is:

Them:…before 6PM.

Me: 6PM… Ours? The server’s? The user’s?

Them: GMT, of course.

Me: So that’s 7PM London right now, and changes to 6PM in November?

Them: What no are you stupid. Always 6PM GMT.

Me:* jumps off a cliff*

Klear ,

Reminds me of a LARP I was on one time. A group of people I was doing stuff with ended up always meeting at 10 because we redefined “10” to mean “whenever we all meet”.

jaybone ,

Don’t get it. Is this implying GMT has daylight savings?

Ephera ,

GMT doesn’t have daylight savings, but most people won’t be as precise in language. Here in Germany, we might also tell people “GMT+2”, even though it changes to GMT+1 in winter. Like, I don’t even know what the correct shorthand would be for our timezone…

jaybone ,

CET?

abcd ,

It’s CET/CEST (MEZ/MESZ in German)

en.m.wikipedia.org/wiki/Central_European_Time

ByteJunk ,
@ByteJunk@lemmy.world avatar

I use TZ identifiers, and confirm the expected behaviour (“Berlin time, correct?”), as then I know how I should handle DST changes.

schnurrito ,

That is why lots of time zone selectors allow you to select “Europe/Berlin”: then it is clear that depending on the time of year this is UTC+1 or UTC+2.

firelizzard ,
@firelizzard@programming.dev avatar

GMT doesn’t have daylight savings but London does

mox ,

Them: GMT, of course.

Me: So that’s 7PM London right now, and changes to 6PM in November?

Them: What no are you stupid. Always 6PM GMT.

Me:* jumps off a cliff*

Sorry, but are you under the impression that GMT means London time, or that it observes British Summer Time?

caden ,

I too was similarly confused by the original comment at first, but I think they’re referring to the fact that 6pm GMT is 7pm in London during the summer (BST), and 6pm in London the rest of the year. It seems OP and “them” are both correct in that hypothetical exchange.

my_hat_stinks ,

UK is under BST (UTC+1) for half the year but people are usually just taught that the UK is GMT (UTC+0) which is based in the time in Greenwich, withought mentioning DST. I suppose it’s also possible everyone is taught BST and just forgets about it because daylight savings sucks, but either way most people seem to think GMT and UK time are the same thing.

This means you’ll get people asking for GMT times when they want BST or UK local time.

nyctre ,

Can confirm. Thought UK was always gmt+0, Paris/Amsterdam/whatever GMT+1, etc. (thought it was the clock that changed, not the timezone, if you know what I mean)

ruk_n_rul ,

The term UT is specifically created to divorce universal timekeeping from whatever UK’s timezone is doing, whether DST is on or not, etc. and the derived term UTC for when started adding leap seconds.

GMT hasn’t been a thing since UTC. It should be scrubbed from the vocabulary and old farts still using it should be shunned and reeducated.

YourPrivatHater , in Companies updating their websites

When they don’t update it, im legally allowed to go into the inspect elements and copy all the code.

mexicancartel ,

view-source:https://url for easy copying.

cupcakezealot , in Companies updating their websites
@cupcakezealot@lemmy.blahaj.zone avatar

that’s where date(‘Y’) comes in

moon ,

Year of the tiddies

Kit ,

I read this as boobs.

mexicancartel ,

Is that your date?

lone_faerie , in No common rube

Contacting IT is always my last line of defense and I get unreasonably frustrated when they refuse to help without walking me through basic troubleshooting. It’s like, I’ve already figured out the cause of the problem, just tell me where the button is to fix it. The worst was when I had to RMA my Pixel phone and they made me go through every step I’d already been through just to come to the same conclusion I initially came to them with.

psud ,

Me to Google support for a problem with my brand new pixel 3 back when the 3 was the new hotness

Me: my camera only works for one photo, then doesn’t work again until I reboot it. Then it again works only for one photo, then it gives the error “camera [number] is locked” (screenshot)

Support: that sounds like a fault. Could you reboot your phone and tell me what happens?

Me: ok. … Right I’m back. Just like for all the ten photos I took before contacting you, it worked for one photo then that same error. That makes eleven times I rebooted my phone today.

lone_faerie ,

The worst for me was with the Nexus 6P, the last phone before they rebranded to Pixel. There was a known issue with the battery, where it would die when the phone said it was at like 50%. I jumped through all their troubleshooting hoops when it was obviously a hardware issue. They eventually agreed to send out a replacement and I was assured it wouldn’t have the issue. Lo and behold, it did the exact same thing as soon as I got it. I went through all the trouble shooting again and they sent ANOTHER replacement that still had the issue. I was so fed up and just kept requesting to talk to someone higher up and they eventually just sent me a Pixel 1 to shut me up.

IMongoose ,

They sent out so many Pixel 1s for that. Same exact thing happened to me.

CrabLangEnjoyer ,

Google support is a joke, I had to RMA a tablet, obviously went through all the troubleshooting before (factory reset included). The dude on the Hotline was like: “fantastic you did everything I would have told you. Unfortunately our system doesn’t accept that way of working I need to send you an email with the same troubleshooting steps you already did and you need to call again in a few minutes and confirm to a new support agent that you followed what the email told you”

To their credit it was accepted afterwards with no issues but that whole process is more than braindead

LotrOrc ,

Having worked in IT about 12 to 15 years ago I can honestly say I just stopped believing people when they told me they did things or checked things because 99% of the time it was just a flat out lie.

And taking them at their word meant wasting my own time because usually it was just a quick fix that I suggested in the first place.

It quickly, quickly taught me that 99% of people are fucking idiots, and that even the smart ones who actually knew what they were doing with a computer could be idiots too.

rottingleaf ,

because 99% of the time it was just a flat out lie.

What I don’t understand is why they lie about something directly causal to the resolution.

LotrOrc ,

Pride and not wanting to sound like a dummy basically

IMongoose ,

My buddy had google support tell him to send a screenshot of his phones screen burn in. They took a good amount of convincing before they admitted that that wouldn’t work.

lone_faerie ,

Lol wait, I’ve had to do that too. I think it was for a dead pixel.

Theharpyeagle ,

To be fair even the most technically adept person can have tunnel vision where they start digging before ruling out all the simple stuff. Yes it can feel tedious and a little condescending to follow all those steps, but you get humbled the first time it really is just an unplugged cable.

Zink ,

Any time you’re working with somebody who has to deal with the general public(or general workforce) though, you gotta be understanding.

They have to sort through the clueless people who turned off their monitor, and they have to deal with the Dunning-Kruger people who lie about what they did because they think they’re so damn smart.

And if it’s the first contact level 1 type support, they may not have the expertise to tell the difference and have to rely on the scripts.

lone_faerie ,

Yeah, for sure. As frustrating as it may be, I’m always understanding with the support agent. They’re just doing their job, it’s not their fault there’s a procedure they need to follow.

Ookami38 ,

Depending on what you’re needing done, a lot of times IT has to cover their asses. If it didn’t happen on that phone call, it didn’t happen. I always appreciate the gumption, you probably saved us like, 30 call just from figuring out other issues yourself. If it’s anything that will cost the company money, though, like replacing hardware - if I don’t take due diligence in making sure those earlier steps are done, it’s my ass on the line.

You know you’re smart enough to do the troubleshooting, but that technician has probably 1000+ users that rotate weekly, they can’t keep a log book of which ones are good and which ones will land them in the shit. I totally get the frustration, but the ones who lie about doing simple troubleshooting ruin it for everyone.

Ironfacebuster , in No common rube

I have a dark secret. I used to have CenturyLink DSL around 5 years ago, and the tech asked me if I had restarted the modem during one of the many stints where I would get bits per second rather than the “10mbps” we were supposed to get

I lied every time. I’m sorry CenturyLink tech support employee, but man did CenturyLink suck, and man am I absolutely sure that it never fixed the issue.

At one point I filed a complaint with the FCC and got a letter from CenturyLink telling me that they knew about the complaint!

PaintedSnail ,

We know when you lie. We can see uptime stats.

Ironfacebuster ,

Well no wonder I never had more bandwidth, it’s all your metrics eating it up!

PaintedSnail ,

The metrics are the only important part! How else are we supposed to know how good the line is unless we constantly stress test the line by collecting data? Your ability to use the line is not a useful metric, so we don’t worry about that.

onlinepersona , in Writing documentation

I don’t see a meme 🤔 Did you forget to post it?

Anti Commercial-AI license

abbadon420 ,

There is no meme, there is only documentation about the meme

sbv ,

M E T A

bleistift2 OP ,

Yes, thanks for pointing it out.

MostlyBlindGamer ,
@MostlyBlindGamer@rblind.com avatar

Looks perfect to me!

  • All
  • Subscribed
  • Moderated
  • Favorites
  • [email protected]
  • random
  • lifeLocal
  • goranko
  • All magazines