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.

Kedly , in Boomeram

Ok Boomer?

x4740N , in Boomeram

Boomeramg

Hupf , in Boomeram

0K boomer

buddascrayon , in No common rube

As someone who’s an IT person I can tell you the vibe is actually, “Well shit, I guess I’m going to actually have to diagnose something.”

littlecolt , (edited )

As an IT person, I assure you, I do not believe that you actually restarted it.

positiveWHAT ,

I do believe you restarted the PC, but the program that has frozen is on the cloud, so we’ll have to restart the cloud.

PieMePlenty ,

Yup. User probably put the pc to sleep and woke it up.

TheFogan ,

Or turned off the monitor and turned it back on.

Pazuzu ,

Or they shutdown and turn it back on, which doesn’t count in windows as restarting unless you disable fast-startup. So you get annoyed tech support thinking the user is a liar and an annoyed end user that knows they turned it off and on again.

thermal_shock ,

I usually just explain why we have to do a restart again, which is what you described cause I run into that a lot

nucleative ,

The amount of time I reset it myself and the problem went away is too damn high.

Usually the end user kinda smirks and says huh, weird, I tried that! You must be magic!

Ironfacebuster ,

With a lot of solar equipment, the tech support has access to a lot of settings us installers don’t, so we’ve had times where we tell the tech that we’ve done everything we can, including restarting it (and with my experience with Generac inverters, restarting them can and will break something!), and sometimes it really feels like they do click a magic button, say “how about now?”, then it works

MrShankles ,

As someone who has been asked to restart the computer, even though I already did that before calling IT support… I internally sigh, but begrudgingly do it again just to appease their process. Because I assume plenty of people don’t do it and make y’alls life a tiny bit harder, when a restart would’ve fixed it

Also, how many are solved by making sure the power cable is not just plugged into the wall, but seated into the back of the computer as well?

thermal_shock ,

well shutdown isn’t a full restart anymore, it literally saves your issues and reloads it when it turns on. so we have to doublecheck that too. it should count as restart, but doesn’t.

MrShankles ,

Honestly, I would try the restart first (cause it was easier/more automated), and then a full shutdown and power-up. It’s been many years since I called any IT support though, but that was mu process. Cause I hated having to call for help lol

thermal_shock ,

but a shutdown is NOT a restart anymore and doesn’t quit and restart processes

youtu.be/OBGxt8zhbRk?si=BE17RFGEzen5WM8n

MrShankles ,

I hear ya, and appreciate the info because I didn’t know that. I was saying that I would do both before calling, and then again when they asked me

But this was back in like 2004-ish, so I’m not sure what was best practice back then. I would just try it all before calling lol… going so far as to shut down and unplug for a few seconds or more

Localhorst86 ,

As someone working as on-site IT support for over 15 years, I can’t tell you how often I have asked people to restart their computer over the phone and they swore they did (“multiple times even”), only for me to eventually come around to their desk and having them actually reboot the device in my presence and for the problem to actually fix itself.

One Lady I asked to restart their computer said “all right, hold on.” only to respond not even 10 seconds (!) later "I did, its still not working„ and after the third time I went to her desk and asked her to show me what she did. She leaned forward, turned off the monitor, then turned it back on. “I did this 10 times already, and its still not working”.

Some people just lie about rebooting, some simply don’t actually know how to reboot properly. After a few months, you get to know who’s lying, who’s doesn’t know better and who’s actually telling you the truth, you get to know your coworkers.

MrShankles ,

She leaned forward, turned off the monitor, then turned it back on. “I did this 10 times already, and its still not working”.

And this is why I couldn’t work in IT support; I just don’t have the patience for certain things. I always love teaching people new things, but most people don’t care when it comes to computers; they just want it to work effortlessly even when they’re the one screwing it up.

And especially working on-site! Oh my life, I bet there’s that same few people… just constantly failing to even try lmao

Sylvartas ,

I swear I could hear the call center employee (probably not really an IT guy at this stage) sweating when I called them after a thunderstorm fried my router’s entry port and I read them the list of troubleshooting I already went through before calling them.

deegeese , in Seriously how many times does this have to happen

If I had a dollar for every API key inside a config.json…

marcos ,

Here’s the thing, config.json should have been on the project’s .gitignore.

Not exactly because of credentials. But, how do you change it to test with different settings?

deegeese ,

For a lot of my projects, there is a config-<env>.json that is selected at startup based the environment.

Nothing secure in those, however.

MajorHavoc , (edited )

But, how do you change it to test with different settings?

When it’s really messy, we:

  • check in a template file,
  • securely share a .env file (and .gitignore it)
  • and check in one line script that inflates the real config file (which we also .gitignore).
MajorHavoc ,

I actually do have a dollar for every API key I or my team have committed inside a config file.

And…I’m doing pretty well.

Also, I’ve built some close friendships with our Cybersecurity team.

fmstrat ,

Can I have a dollar for every public S3 bucket?

deegeese ,

Just might make enough to pay your AWS bill this month.

cupcakezealot , in Seriously how many times does this have to happen
@cupcakezealot@lemmy.blahaj.zone avatar

don’t commit credentials; split them up and place each part in a different place in the code and use code comments as a treasure map and make them work for it.

dbx12 ,

Ah, the horcrux technique.

NigelFrobisher , in Seriously how many times does this have to happen

I mean, turns out it is pretty easy actually, Boromir.

carrylex OP , (edited ) in Seriously how many times does this have to happen
@carrylex@lemmy.world avatar

I also personally ask myself how a PyPI Admin & Director of Infrastructure can miss out on so many basic coding and security relevant aspects:

  • Hardcoding credentials and not using dedicated secret files, environment variable or other secret stores
  • For any source that you compile you have to assume that - in one way or another - it ends up in the final artifact - Apparently this was not fully understood (“.pyc files containing the compiled bytecode weren’t considered”)
  • Not using a isolated build process e.g. a CI with an isolated VM or a container - This will inevitable lead to “works on my machine” scenarios
  • Needing the built artifact (containerimage) only locally but pushing it into a publicly available registry
  • Using a access token that has full admin permissions for everything, despite only requiring it to bypass rate limits
  • Apparently using a single access token for everything
    • When you use Git locally and want to push to GitHub you need an access token. The fact that article says “the one and only GitHub access token related to my account” likely indicates that this token was at least also used for this
  • One of the takeaways of the article says “set aggressive expiration dates for API tokens” - This won’t help much if you don’t understand how to handle them properly in the first place. An attacker can still use them before they expire or simply extract updated tokens from newer artifacts.

On the other hand what went well:

  • When this was reported it was reacted upon within a few minutes
  • Some of my above points of criticism now appear to be taken into account (“Takeaways”)
onlinepersona ,

To err is to be human… right?

To be honest, this doesn’t instill me with much confidence, but who am I? If someone looked at my OpSec, probably they’d be horrified.

Anti Commercial-AI license

bleistift2 ,

This will inevitable lead to “works on my machine” scenarios

Isn’t that what Python is all about?

MajorHavoc ,

I feel seen.

dohpaz42 ,
@dohpaz42@lemmy.world avatar

Yes kids, the only stuff in ANY repo (public or otherwise) should be source code.

If it is compiled, built, or otherwise modified by any process outside of you the developer typing in your source code editor, it needs to be excluded/ignored from being committed. No excuses. None. Nope, not even that one.

No. 👏 Excuses. 👏

bleistift2 ,

Two choices: Either the production software isn’t in the exact state the repo was when the software was built. Or I can’t get build timestamps in the software.

dan ,
@dan@upvote.au avatar

This will inevitable lead to “works on my machine” scenarios

Isn’t this why Docker exists? It’s “works on my machine”-as-a-service.

Jayjader ,

When you use Git locally and want to push to GitHub you need an access token.

I don’t understand; I can push to GitHub using https creds or an ssh key without creating access tokens.

MHanak , in Seriously how many times does this have to happen

This reminds me of that one time when i pushed with my github token as my username (dw i revoked it)

Fades , in Always try sudo

WHY IS THE HEALTH INPUT PARAMETER A GODDAMN STRING???

Why are you passing ‘%’ inside said goddamn string?!?! Not to mention the static reference instead of the actual instance.

Shame on you

lud ,

It’s not his fault the world is made this way.

He just has to follow it or else that man dies.

explodicle ,

Found the legacy support person

FilthyShrooms ,

They use a look-up table with every value from 0% to 100%

Mesa ,
@Mesa@programming.dev avatar

Floating points included for thoroughness!

FatTony , (edited )
@FatTony@lemmy.world avatar

Honestly, if someone were to try to safe my life. And I find out he uses a string as a parameter to do so. Just let me die right there.

jdaxe ,

Also putting sudo in front of what looks like Java code not shell.

veganpizza69 ,
@veganpizza69@lemmy.world avatar

The high level setter function should be made to handle both string and numeric values.

If it contains “%” it’s a percentage value.

If it’s a string without a “%” it’s an absolute value and needs to be normalized.

If it’s a numeric value, it’s an absolute value.

If it’s a numeric 100, it’s 100%.

If it’s a subunitary numeric value, it’s a percentage.

NTripleOne ,

If it’s a numeric 100, it’s 100%.

absolute lunacy

veganpizza69 ,
@veganpizza69@lemmy.world avatar
sandbox ,

yeah I’m gonna go ahead and reject your PR, please change this function to accept a decimal value between 0 and 1

ChickenLadyLovesLife ,

Ironically, the worst thing I ever saw a coworker do was to change a function that accepted an Integer value between 0 and 32767 to one that accepted a Float between 0.0 and 1.0. Perfectly sensible change except that it resulted in a 120 mph knuckleball fired a foot above a 10 year old kid’s head, followed by a fist fight between the client and my boss.

jaybone ,

That sounds like something that should have been caught by QA, integration tests or unit tests long before it was launching balls at ten year olds.

ChickenLadyLovesLife ,

Yes, testing the new Little League control module on a field full of Little Leaguers was not the best plan.

jaybone ,

What is a little league control module?

ChickenLadyLovesLife ,

You push a button and it makes Little Leaguers do whatever you tell them to do. Very potent, should never be misused.

skulblaka ,
@skulblaka@sh.itjust.works avatar

The Big League Control Modules are called contracts.

funkless_eck ,

yeah every engineer knows you gotta set KidHeadKnuckleballClearance waaay higher than that, it’s compsci 101

iAvicenna ,
@iAvicenna@lemmy.world avatar

"5%1 "

veganpizza69 ,
@veganpizza69@lemmy.world avatar

…ends with. And there are more ways to parse.

Skates ,

Oldman.setHealth(“dicktits”); //normalize pls

Oldman.setHealth(“-100±1%”); //make percentage pls

Oldman.setHealth(0.0); //it is subunitary, but undefined behavior - will it access the ‘numeric value’ overload, or the ‘subunitary numeric value’ overload?

Don’t write your own code just yet.

veganpizza69 ,
@veganpizza69@lemmy.world avatar

Oldman.setHealth(“dicktits”); //normalize pls

0

Oldman.setHealth(“-100±1%”); //make percentage pls

Reject operations.

Use absolute number to remove the minus. Math.abs()

Oldman.setHealth(0.0); //it is subunitary, but undefined behavior - will it access the ‘numeric value’ overload, or the ‘subunitary numeric value’ overload?

Same result either way, so whatever if branch is first.

Understand the purpose. If you want to kill the old man with 0, then there’s no point to leaving it as 0.9%, understand the non-linear characteristics of life and death.

When you’re dealing with the low level functions, sure, you can keep it simple. When you’re reaching the surface of user input, you’re either going to waste time with validation and error reporting, or you’re going to waste time with interfaces that can handle more shit without complaining. There’s no fool proof either way, but good luck pissing users off with endless docs.

Don’t write your own code just yet.

If your goal in programming is just to be a traffic cop between the user input and the database, all you’re doing is building a virtual bureaucracy, the kind that people really hate and is easily generated with coding tools. Or you’re just deferring the “smoothing out” burden to the UI developers.

blind3rdeye ,

I guess its just a reminder that getting a PhD is often more about dedication than it is about practical knowledge.

cupcakezealot ,
@cupcakezealot@lemmy.blahaj.zone avatar

OldMan.setHealth(“Robert’); DROP TABLE Students;–”)

Fades ,

Finally someone with some wisdom

devfuuu ,

Smells like JavaScript.

Buddahriffic ,

Because the meme wasn’t made by someone with a doctorate in CS or even a bachelor’s.

MonkderDritte ,

Yeah, in Ren’py games usually it’s character_health=100 or something.

Fades ,

Yes absolutely, the parameter even if not in a strongly typed language should be a specific number and the unit should be implied. Overload the method to support different units if necessary or provide a unit as an additional parameter instead of forcing the method to parse the string for any unit type hints that may or may not be there

NegativeLookBehind , in They did not reply.
@NegativeLookBehind@lemmy.world avatar

Take me down to the PropertyCity where the SelectFoliage is and the HumanFemales.young(pretty)

Stupidmanager ,

I’m more of a mountain guy so or really do it for me. But hey, you do you.

ChickenLadyLovesLife ,

Not really relevant, but I used to think Axl was singing “take me down to the very last city”.

sundray ,

New Destiny lore just dropped.

ibasaw ,

Oh won’t you please take me 127.0.0.1

i_am_hiding ,

Oh won’t you please take me localhost??

snugglebutt ,
@snugglebutt@lemmy.blahaj.zone avatar

no place like ~/

Fades ,

Why are females typed differently than males instead of a base class human with a gender identity parameter? Why would human anything have a function called young?? What would that function even do???

purplemonkeymad ,

HumanFemales and HumanM both inherit from the Ape base class, it’s from an older java code base. We tried to change it once but it turned out the person that had written had retired and any changes we made just broke stuff.

Fades ,

Haha, I like this answer!

cheddar ,
@cheddar@programming.dev avatar

The young method returns a boolean parameter. Females have a different type for obvious biological discrepancies that require extra functionality.

Fades ,

I can accept your second point, but in your PR I would absolutely request you to rename the method to isYoung, and then in making said comment I would then ask… what value isYoung providing, and where is the line between young and !young ultimately for trying to get the dev to reevaluate the design. It’s hyper specific in an obtuse manner and I think it hints at design flaws especially with the perspective of product evolution

qarbone ,

Could be a subclass. However, it should just be an ‘is’ method which is passed the array of [young, pretty] as input

leonard , in Seriously how many times does this have to happen
@leonard@social.menzel.lol avatar

@carrylex git should be password manager aware and refuse to commit if changes include a password

carrylex OP , (edited )
@carrylex@lemmy.world avatar

Well from my personal PoV there are a few problems with that

  1. You can’t detect all credentials reliably, they could be encoded in base64 for example
  2. I think it’s kind of okay to commit credentials and configuration used for the local dev environment (and ONLY the local one). E.g. when you require some infrastructure like a database inside a container for your app. Not every dev wants to manually set a few dozen configuration entries when they quickly want to checkout and run the app
bleistift2 ,

You can’t detect all credentials reliably,

Easy. You check in the password file first. Then you can check if the codebase contains any entry on the blacklist.

Wait…

dohpaz42 ,
@dohpaz42@lemmy.world avatar

I think it’s kind of okay to commit credentials and configuration used for the local dev environment (and ONLY the local one).

No. Never.

E.g. when you require some infrastructure like a database inside a container for your app. Not every dev wants to manually set a few dozen configuration entries when they quickly want to checkout and run the app

In this situation, it would be better to write a simple script that can generate fresh and unique values for the dev.

Laziness is not an excuse.

dohpaz42 ,
@dohpaz42@lemmy.world avatar

They do. But, as they say,ake it idiot-proof, and someone will make a better idiot.

docAvid ,

Github != Git

dohpaz42 ,
@dohpaz42@lemmy.world avatar

You’re right. I do that sometimes.

ArbitraryValue , in Seriously how many times does this have to happen

On the contrary, one can commit or compile credentials quite simply… Maybe Boromir isn’t the right person to ask.

marcos ,

Are you doubting Boromir’s programming ability?

RonSijm , in They did not reply.
@RonSijm@programming.dev avatar

Hmm, I’m thinking - We should place a bunch properties and just name them something like “${username}” - “${password}” and variations of that, and see we can “find/replace” cross-site script them into sending their bots details

oo1 , in Always try sudo

Can he also fix alzheimer’s by hunting down memory leaks.

victorz ,

👏🤝

ramjambamalam ,

Yeah, he reimplemented it in Java to get garbage collection. The Alzheimer’s is cured but he takes ten minutes to pour a glass of water.

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