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.

laserm , in Old timers know

I deploy my apps with SFTP command line .

livingcoder , in Mcafee accidentally made users call the devs of SQLite and complain.

I love how the solution didn’t involve changing the prefix to “mcaffee_”. Now users don’t know who to blame. Great. That’s so nice of them.

camr_on ,
@camr_on@lemmy.world avatar

Then mcaffee_ would be appearing in unrelated sqlite-using applications

livingcoder ,

Oh, I thought that the temp files were named by the user. If that’s not the case, that these are not databases created specifically by McAfee in the temp directory, then I’m not sure what the appropriate solution should be. Obscuring the file type and how the file is used from users is still a bad practice.

Daxtron2 ,

Why would sqlite put references to an unrelated product in their codebase?

Hawke ,

The same reason that McAfee did?

dgriffith ,

McAfee wrote a program that used the Sqlite library for database storage.

When going about its data storage business for McAfee’s program, the Sqlite library was storing files in C:\temp with prefixes like sqlite_3726371.

Users see that and get angry, and bug the Sqlite developers.

Now probably when initialising the Sqlite library McAfee could have given it the location of a directory to keep it’s temp files. Then they could have been tucked away somewhere along with the rest of the McAfee code base and be more easily recognised as belonging to them, but they didn’t.

So because of a bit of careless programming on McAfee’s part, Sqlite developers were getting the heat because the files were easily recognisable as belonging to them.

Because the Sqlite developers don’t have control of what McAfee was doing, the most expedient way to solve the problem was to obfuscate the name a bit.

livingcoder ,

Yeah, if it’s purely a Sqlite implementation detail to create temp files, that’s on them to own and fix. I thoroughly dislike that the files are obscured from users.

dan ,
@dan@upvote.au avatar

McAfee might be doing something weird with the database, for example not closing it properly.

Daxtron2 ,

McAfee didn’t, sqlite produces that name on its own. Its McAfee that stored them weirdly

SwordInStone ,

the solution is not on the mcafee side but on sqlite

MostlyBlindGamer , in Mcafee accidentally made users call the devs of SQLite and complain.
@MostlyBlindGamer@rblind.com avatar

Wasn’t there a story about people calling curl devs because of car issues?

For what it’s worth, I’m sure the SQLite devs could help somebody clean up their temp files. They just really shouldn’t have to.

ABasilPlant OP ,

Are you talking about this: I have toyota corola?

MostlyBlindGamer ,
@MostlyBlindGamer@rblind.com avatar

Yes! Hahaha, it’s so good.

Number 2 needs to flick the little switch on the SD card.

where_am_i ,

and so the internet wisdom has solved the person’s problem. Alas they will never find out

DogWater ,

Their issue is that the card has the physical lock switched on on the SD card?

MostlyBlindGamer ,
@MostlyBlindGamer@rblind.com avatar

Chances are, right? At least it’s the first thing I’d check.

DogWater ,

Ha that’s a good point.

RedStrider , in Average CSS
@RedStrider@lemmy.world avatar

the userstyle experience:

Ephera ,

Yeah, userstyles are wild. You learn so many ways how to not use CSS. Everything is !important and rather than adjusting the HTML to change the structure, you get to do it all in CSS. 🫠

RedStrider ,
@RedStrider@lemmy.world avatar

flex-direction:row-reverse; my beloved

zerofk , in How programmers comment their code

Our code base is filled with “//constructor”, “//destructor”, “//assignment”, or the ever enlightening “Foo GetFoo(); // GetFoo”.

This is not what they mean by self-documenting code.

dohpaz42 , in Mcafee accidentally made users call the devs of SQLite and complain.
@dohpaz42@lemmy.world avatar

Hm. The first hit on DuckDuckGo is a single entry for a guy and all it says is Contact the Business Inquiries.

You would think a better solution to this problem would be to put a message on that page stating that if you’re a McAfee user looking for information about SQLite files in your temp folder, to call the McAfee support line.

But hey what do I know, right?

Killing_Spark ,

Did you just expect people that call random devs at random times to actually read any information on a website?

dohpaz42 ,
@dohpaz42@lemmy.world avatar

If that information said something like “McAfee users concerned about temp files, call (800) 123-4567”, then yes. Did I suggest anything more than that? No. 🙄

cm0002 ,

Lol you never worked customer service or hell desk have you?

The kinds of people who need this message, you would have lost the second you said “temp files”

tyler ,

Well these people making these calls are finding the temp folder

cm0002 ,

Irrelevant, these people will find their way into folders they have no business in and no idea what it’s doing and break shit

It’s a big reason MS started hiding the windows folder after Win 98 (maybe 95)

dohpaz42 ,
@dohpaz42@lemmy.world avatar

How is that irrelevant? The folder is literally called Temp. Doesn’t matter anything else. You said, and I quote, “The kinds of people who need this message, you would have lost the second you said “temp files”.”

Obviously not sure, given where the files were located. 🤦‍♂️

And of course they didn’t know what the files were for; probably why they went searching for it, and eventually found the contact info for Richard Hipp.

Me thinks you just want to shit on people for no other reason than to make yourself feel superior to them. 👏 Congrats!

T156 ,

Assuming that they went out to look for it, and didn’t just poke google with (“sqlite hacked my computer”) until they found a phone number.

If they had gotten the phone number for a company called Super Queasy Lite and Easy/SQLitE instead of the developers, the company might well have received the calls instead.

tyler ,

Assuming that they went out to look for it, and didn’t just poke google with (“sqlite hacked my computer”) until they found a phone number.

and how in the world did they know to type the word “sqlite” in. Dude, the files are in the temp folder. The only way they know the name “sqlite” is if they literally visited the folder and looked there.

T156 ,

Error message? McAfee can’t write to the drive because it’s full of photos of their grandchildren and dogs, so it clicks up “can’t write to c:\temp\sqlite_arcane_computer_magic.log: Disk is full”, and it goes from there?

dohpaz42 ,
@dohpaz42@lemmy.world avatar

You do realize that these people were looking up contact info from a company they found because they were … wait for it … looking at files inside the temp folder … otherwise known as … are you sitting down? You really should sit for this … temp files!

Imaging that. 😳 🤣

By the way, I worked technical support for my local dialup ISP, Adobe, Best Buy (before they were called Geek Squad), and OnStar.

But sure, what you said… 😉

relevants ,

looking at files inside the temp folder … otherwise known as … are you sitting down? You really should sit for this … temp files!

The point OP is making is that those people would not put 2 and 2 together to understand that the files they were looking at are called temp files, just because that’s the folder they found them in. They may not even remember the name of the folder, only that it contains a bunch of files with a prefix they’re now googling.

Not sure why I’m bothering explaining this to you, the way you responded makes you look absolutely insufferable, but maybe someone else who comes across this will find it useful.

randint ,

hell desk

Brilliant.

ricecake ,

Yup, you found the developer. That’s his phone number.

It’s not exactly a new change either. In 2006 people weren’t going to the specific page from duckduckgo, they were probably finding the sqlite homepage, and then tracking down the contact info.

20 years later it’s probably better to maintain consistency with the prefix than to change it even if it’s weird.

poke ,

Update the site with mcafees phone number and only have the real one behind a click through you have to read

ricecake ,

So, sure that might work. More likely they forgot this bit is even here on account of it being 20 years old.

Also, never doubt the persistence of a sufficiently motivated and impatient user. I don’t think needing to read something has ever stopped one.
You can literally put animated flaming text and people will click right past.

mr_satan , (edited )
@mr_satan@monyet.cc avatar

During my time in a call center people would often call for invoices or messages they received. Most of my work there was reading the thing together with them. Nothing more was necessary, I just read alound their itemized invoice that they had received and it would solve their problem.

Click through pop-ups are even worse in this regard. I myself usually just automatically click No before I understand what just happened.

ricecake ,

I worked for a developer at a Web hosting company for a while. I really wish my story about flaming text wasn’t true, and that the words weren’t “permanent unrecoverable data loss”, and the audience wasn’t internal support technicians.

Gotta have a way to delete a vps, and there’s only so much you can do to get someone to check that they have the right one.

vcmj ,

The way I understand the users didn’t necessarily realize McAfee is responsible, just that a bunch of sqlite files appeared in temp so they might not connect the dots here anyway. Or even know McAfee is installed considering their shady practices.

dohpaz42 ,
@dohpaz42@lemmy.world avatar

Fair point about not knowing McAfee if involved. But at the same time, it beats having your dev getting phone calls at all hours because McAfee’s devs were to lazy to ready the source file and learn how to change the freaking prefix of the file.

SlopppyEngineer , in How programmers comment their code

Best comment ever was “It used to work like this but person at client demanded it work like that on this date” when the client complained it shouldn’t work like that.

0x0 ,

The best comments are “why” comments, the runner up is “how” comments if high-level enough, and maybe just don’t write “what” comments at all because everyone reading your code knows how to read code.

conciselyverbose ,

That’s basically what comments are most useful for. When you’re doing something that’s not obvious, and want to make sure the “why” doesn’t get lost to time.

kubica ,

// I'm not really that dumb, there is a reason.

DarkDarkHouse ,
@DarkDarkHouse@lemmy.sdf.org avatar

// narrator: the reason was management

NotMyOldRedditName ,

<span style="color:#323232;">// I told them I'd do this but only if they gave me time next sprint to fix it  - 12-03-1997
</span>
MostlyBlindGamer ,
@MostlyBlindGamer@rblind.com avatar

[flashbacks to the backlog being wiped out because “the client already signed off on the release”]

ChickenLadyLovesLife ,

I spent a year making my company’s iOS apps accessible (meaning usable for the blind and people with vision disabilities). I had to do a lot of weird shit either because of bugs in Apple’s VoiceOver technology or because of the strange way in which our code base was broken up into modules (some of which I did not have access to) and I would always put in comments explaining why I was doing what I was doing. The guy doing code review and merges would always just remove my comments (without any other changes) because he felt that not only were comments unnecessary but also they were a “code smell” indicating professional incompetence. I feel sorry for whoever had to deal with that stuff at a later point.

sukhmel ,

Well, this is shitty

I hope the reviewer did not also squash commits, and the next programmer would be able to at least dig what was there.

Doing changes after some rockstar dev implemented some really complex service, but left no clues as to what does what is so frustrating, and I can never be sure that I don’t break anything in a different place completely

ChickenLadyLovesLife ,

I meant to say commits and not merges, and yes he removed the comments before committing. It made no difference in long run because every new release broke all the accessibility stuff anyway. It’s amazing how little developers can be made to care about blind people - almost as little as managers. The only reason my company cared at all was they were facing million-dollar-a-month fines from the FCC.

recursive_recursion ,
@recursive_recursion@programming.dev avatar

this seems like a great idea as it provides proof in writing just in case the stakeholder complains later on about the thing you implemented at their request

jaybone ,

That’s actually the perfect comment, because if anyone ever comes back to fuck with you about it, it’s explained right there. Then you turn it right back around on management and watch them run around like chickens with their heads cut off.

sukhmel ,

Out management used to tell us, that even if head of department had committed to doing something some way, there’s no way or need to hold them accountable. It’s just that situation has changed, and nobody should bat an eye.

To be fair, they also did not pressure us much for the missed deadlines or missing features, because it was indeed the result of the situation described in the first paragraph

tiredofsametab ,

I was porting our old code from PHP to Go at a previous company. I laughed as I copied my then-six-year-old comment "I'm promised by xxxxx that this is a temporary measure <link to slack convo>".

navi , in How programmers comment their code
@navi@lemmy.tespia.org avatar

A real comment in our junior year game engine codebase.

https://lemmy.tespia.org/pictrs/image/df24b62c-f86a-41ac-adec-5ca86041a086.png

tiredofsametab ,

visiblen't

Johanno , in How programmers comment their code

I write such comments because I have to.

Company policy.

Also we have to specify every line of code and what it should do…

jas0n ,

Lol leave. That is so many levels of braindead.

explodicle ,

I would smash everything into a handful of overly-complicated lines.

MystikIncarnate ,

I loved doing this is school, just trying to mess up my teachers.

jaybone ,

Sometimes I think after i retire, I should teach. In the hopes that i could inspire people to write good code, instead of a lot of the garbage i see in the industry. This comment makes me sad.

MystikIncarnate ,

I just want to be clear, this was like highschool cs classes. I took things a bit more seriously in college.

I never wrote messy code or illogical code, or any code that didn’t work. We were learning C++ in those days and if you know anything about C++, you can basically cram an entire program into a single line. You can also do some shorthand stuff for calculations and updates to variables… So while the class was instructed to use whitespace and comments and update variables like “var = var + #” I would do var += #… I wouldn’t comment it, mainly out of hubris.

I was pretty good at it but I was lazy as all hell with it.

ulterno ,
@ulterno@lemmy.kde.social avatar

I feel like I am going to have to do the same thing in the end, to get my hand-over accepted.
Should I just copy the line of code and make a comment next to it with:


<span style="font-style:italic;color:#969896;">// It does <paste line of code>
</span>

CC BY-NC-SA 4.0

VOwOxel ,

Do you license every comment of yours? If yes, why? Tbh i’m just curious

ulterno ,
@ulterno@lemmy.kde.social avatar

Not every. The quick, very-low effort ones, I just leave.

Why:
I saw another post with “Anti Commercial AI License”, then wen on to read the license and went, “Neat!”.

  • It makes it easier for anyone to decide what to do if they want to use my comment/post (in cases where it actually has something useful)
  • It makes life just a bit harder for people data-mining for AI
    • That way, some data entry worker will probably ask for a raise and probably even get it and maybe some entrepreneur going “AI everywhere!” will think twice.
    • Or there will be a chatbot spouting “Anti Commercial AI License” or “CC By-NC-SA” in their answer text, which would be hilarious.

CC BY-NC-SA 4.0

communism ,
@communism@lemmy.ml avatar

How are you inserting your signature? is it manually? Do you have some kind of keyboard shortcut to insert it?

ulterno ,
@ulterno@lemmy.kde.social avatar

For now, I have just saved it in my clipboard application, so I copy-paste.
When it goes out of history, I just open a file, where I have saved it and copy from there. So it’s pretty crude.

I was hoping that either the KDE Social web interface would add a “Signature” feature or I would pick some Lemmy application that would allow that, but for now it’s just this.

Perhaps, if I feel like it’s being too frequent, I may set a compose key for it.

CC BY-NC-SA 4.0

AlexanderESmith ,

It's cute that you think data miners give a fuck about the license of anything they scrape.

ulterno ,
@ulterno@lemmy.kde.social avatar

It’s unfortunate that despite explaining as properly as I could, my point was misinterpreted as me relying upon someone caring about licenses.

CC BY-NC-SA 4.0

jaybone ,

// this line increments the value of i by 1

i++;

AdNecrias ,

I hope they get paid per line of code.

jaybone ,

I hope i never have to work with you.

AdNecrias ,

It’s fine, I wouldn’t want to work with someone who enjoys being forced to comment every line.

rushaction , in "No way to prevent this" say users of only language where this regularly happens - 07/01/2024

… the only language where 90% of the world’s memory safety vulnerabilities have occurred in the last 50 years

Yeah… That’s a shit post alright.

I’m not a C developer myself, but that’s just a low blow. Also, uncited ;).

5C5C5C ,

Yeah the only way it would be that high is if it lumps C and C++ together. But at that point it may be an underestimate.

verstra , (edited )

This is an overstatement, definitely. C is one of the few (mainstream) languages where memory safety vulnerabilities are even possible. So if you batch C and C++ together, they probably cover more than 90% of all the memory unsafe cove written in last 50 years, which is a strong implication that they will contribute to 90% of memory vulnerabilities.

All that said, memory vulnerabilities are about 65% of all high implact vulnerabilities on Chromium project^1 and about 70% of vulnerabilities at Microsoft ^2.

calcopiritus ,

So we’d only fix 70% of vulnerabilities by switching to rust? Not enough! Better keep writing C/C++!

0x0 , in "No way to prevent this" say users of only language where this regularly happens - 07/01/2024

The “C is bad trope” is getting way too old. I’m surprised the author didn’t plug Rust.

the only programming language in the world where these vulnerabilities regularly happen

Maybe because it’s one of the most widely used languages in the world…

sukhmel ,

Well, one of the most widely used that allows to do low-level stuff. The most widely used one is by far JavaScript but good luck making an OS or a device driver with it

fuzzzerd ,

I’m sure there are projects covering those areas written in JavaScript.

echindod ,

Oh gawd. That would be so horrible! Is there a project o compile JavaScript to bytecode? With like LLVM? There must be, but I haven’t heard of it. I shouldn’t even say anything because I will be better off pretending it doesn’t exist.

calcopiritus ,

Just bundle a JavaScript interpreter with the JavaScript code. No need to compile JavaScript.

OutsideNo1877 ,

Just because you can doesn’t mean you should and i hope that is not a thing

BatmanAoD ,

The trope will be “old” once the mainstream view is no longer that C-style memory management is “good enough”.

That said, this particular vulnerability was primarily due to how signals work, which I understand to be kind of unavoidably terrible in any language.

5C5C5C ,

A better language wouldn’t have any need to use POSIX signals in this way.

BatmanAoD ,

I’m not totally clear on why signals are used here in the first place. Arguably most C code doesn’t “need” to use signals in complex ways, either.

KillingTimeItself , in How programmers comment their code

this is why i very varely comment with descriptive comments. If you’re reading my code and don’t understand what it is, even with how shit it is, you have no business reading whatever fucking crackpot shit im writing.

potustheplant ,

You must be fun to work with.

KillingTimeItself ,

you say this like im the type of person to write code with other people.

potustheplant ,

Doesn’t matter. Even if it’s your code, you might revisit something you made months or a year after doing it and having comments will speed up your work. It’s a very basic good practice.

KillingTimeItself ,

i do have comments, for some things, but there are a lot of “commenting” standards that are just shit. I find i don’t care what the actual piece of code is doing, i care more about it’s place in the rest of the code, and i’d much rather have “anti comments” instead.

bloubz , in Average CSS

I guess the class matches the color of the background (applied on a parent element), and the text is the opposite color?

Ephera ,

My guess would be that they initially named the classes like the colors and then decided to swap those two colors.

bloubz ,

Pretty good guess

communism ,
@communism@lemmy.ml avatar

Lime text with a white background or vice versa sounds horrifying and illegible

bleistift2 , in Average CSS

The author should be killed for indentation alone.

mosiacmango ,

I know, right? Needs more tab.

afox ,

We are witnessing a hate crime.

9point6 , in Average CSS

Not allowed to credit the site in your text editor?

Is the owner in the room with you now?

GregorTacTac OP ,
@GregorTacTac@lemm.ee avatar

This screenshot is not mine, it was sent to me via Matrix

Natanael ,

You get used to it. I don’t even see the code

GregorTacTac OP ,
@GregorTacTac@lemm.ee avatar

Do you have a built-in browser in your brain that renders it?

dohpaz42 ,
@dohpaz42@lemmy.world avatar

All I see is blonde, brunette, redhead. Hey uh, you want a drink?

GregorTacTac OP ,
@GregorTacTac@lemm.ee avatar

Free drink? Absolutely

dohpaz42 ,
@dohpaz42@lemmy.world avatar

It’s good for two things: De-greasing engines and killing brain cells.

GregorTacTac OP ,
@GregorTacTac@lemm.ee avatar
GregorTacTac OP ,
@GregorTacTac@lemm.ee avatar

It’s only now that I realise that I understood that reference so late

roguetrick ,

Took ya a bit Keanu, but you got there.

nifty ,
@nifty@lemmy.world avatar

…it was sent to me via Matrix

That’s how they do pull requests there

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