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.

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.

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

I used to tell people that John McAfee always exited a room by jumping through a window while yelling, “MCAFEE RULES!” Which he didn’t, but maybe he did? Anyway, I miss that crazy motherfucker. Sometimes nuts make the world more fun.

Buddahriffic ,

He was an interesting one but not a good one.

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

aeronmelon , in Average CSS

“Some coders just want to watch the word burn get colored white and/or lime.”

And if you delete one or the other, or condense the code into a single command, the whole site breaks.

TechieDamien , in Average CSS

Client: “Can you switch these two colours, you have 1 minute to fix it or you’re fired!”

Result:

dosuser123456 ,
@dosuser123456@lemmy.sdf.org avatar

my eyes

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

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

hendrik , in Average CSS
color: lime !important;
z-index: 1000000;

xmunk ,

I love the superstitious z-index just in case it does something to help.

independantiste ,
@independantiste@sh.itjust.works avatar

At least that’s actually easy and quick to do and is the only way of doing it. Centering a div however has 81639393 ways and it seems the one that works is different every time

CodexArcanum ,

Bro its so easy bro, just use flexboxgridcolumns its been a standard since 2010 just flex it bro you haven’t learned to flex yet just check w3c schools and add a flex you can polyfill it but don’t use that hacked one use the good flexpolyfill then { content-align-middle-child-elements: center-middle-true-neutral } so easy with flex bro

Cosmonaut_Collin ,
@Cosmonaut_Collin@lemmy.world avatar

Dude, stop flexing on him. You’re gonna make him cry.

CatLikeLemming ,
@CatLikeLemming@lemmy.blahaj.zone avatar

I know you meant this sarcastically, but yes, flex is a good option for centering something. Either that or setting the left and right margins of the element to auto, which is generally even easier.

Basically, if you’re in a flex container use flex, if you’re in a grid use grid, and if neither of those apply set the left and right margins to auto.

marcos ,

Also seriously, anybody having problems with flexbox should try this:

flexboxfroggy.com

I’m not sure there’s any version of it for grids, but IMO grids are inherently more intuitive, so it may not be needed. Flexbox is the one that is hard to learn.

davidgro ,

I don’t know any CSS (despite reading memes about it like this) but I do know that the bottom of that page has a link to something called Grid Garden

CatLikeLemming ,
@CatLikeLemming@lemmy.blahaj.zone avatar

Well, flexbox and grid have different purposes in my opinion/experience. Personally I use grid for “top level” layouts like the layout of the whole site, while I tend to prefer flexbox for layouts inside the grid. Of course that’s just a rule of thumb, there are absolutely cases where this isn’t the best option.

bleistift2 ,

Also exists as Tower Defense

independantiste ,
@independantiste@sh.itjust.works avatar

You’ve perfectly captured twitter tech bro energy it’s kind of incredible actually

drathvedro ,

It’s 2024 and flexboxes still don’t work that well with vertical direction and wraparound…

bleistift2 ,

Do you have an example?

drathvedro ,

Sure. Here you go. The green container should cover all red boxes in both cases. I’ve been bashing my head against this issue for a while, but, as far as I understand, this is a bug that’s never going to be fixed. Which sucks, because I wanted to re-design some of the apps in the horizontal metro-style scrolling manner for the bottom screen on my zephyrus duo, but this effectively prevents me from doing so (Unless I use grids and set positions manually).

bleistift2 ,

That’s interesting. Chrome displays it as you intended, Firefox doesn’t. I guess it’s required that the vertical flex be inline-flex?

drathvedro ,

Huh, neat. The last time I looked, chrome was also plagued by this. Might actually re-start some projects I had, but it sucks to have to use chrome.

inline-flex is indeed necessary since we’re growing left to right and flex would take the entire/fixed width, unless it’s also inside a flexbox.

bleistift2 ,

it sucks to have to use chrome

I also hate to admit it, but Chrome currently is the superior browser.

drathvedro ,

Chromium is a superior engine, yes. But Chrome itself, at least in my eyes, looks to be the least capable browser out of the bunch. I’d rather Vivaldi if I had to switch.

Aux ,

Inline is never needed and you already know that.

drathvedro , (edited )

https://lemm.ee/pictrs/image/c44d0f23-815c-473b-848a-6cdc84d56376.png

https://lemm.ee/pictrs/image/2027b9e1-f534-4e91-a859-15d96b64f67e.png

EDIT: Alright, this is a terrible case because the parent element has flex and therefore no inline-flex is necessary there, but I’d argue it’s the parent element being flex that is redundant, rather than child element being inline.

Aux ,

Inline means that your element should be treated like text. If your element is not text, then you shouldn’t use inline. In this screenshot the element is text, so it’s ok.

kamen ,

It’s a good indicator that someone is desperate and/or doesn’t know what they’re doing.

starman , in Mcafee accidentally made users call the devs of SQLite and complain.
@starman@programming.dev avatar

There’s a solution for this McAfee problem:

m.youtube.com/watch?v=bKgf5PaBzyg

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

John McAfee would be spinning like a rotisserie chicken in his grave. Or at least he would be if McAfee Software hadn’t already turned to shit long before his death.

So the temp files are still identified, but anybody smart enough to figure out the code is also likely smart enough to know that calling the developer will not help get rid of the file.

Don’t underestimate the stupidity of your average person.

ruk_n_rul ,

Was gonna say, this wouldn’t happen on John’s watch. /S

Thcdenton , in Mcafee accidentally made users call the devs of SQLite and complain.
yetAnotherUser , in Mcafee accidentally made users call the devs of SQLite and complain.
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

snaggen , in How programmers comment their code
@snaggen@programming.dev avatar

Comment about image

Fargeol ,

answer: the answer

const ,
@const@sh.itjust.works avatar

Reply about comment about image

bleistift2 , (edited ) in Mcafee accidentally made users call the devs of SQLite and complain.

Forgive my ignorance. SQLite is a database software. Why would McAffee create lots of database files?

[Edit:] I’m not asking why a program needs to store data. I’m asking why that necessitates many files. One database file (or one per table) should be enough, right?

Zorsith ,
@Zorsith@lemmy.blahaj.zone avatar

Virus definitions?

bleistift2 ,

Does sqlite create a file for every page in the table or what?

Shadow ,
@Shadow@lemmy.ca avatar

No, but developers are free to implement things in whatever crazy way they can dream up.

Zorsith ,
@Zorsith@lemmy.blahaj.zone avatar

Nobody ever accused McTrellix of being efficient software 😆

qaz ,

Many programs use SQLite internally and McAfee decided to store the database files in C:/Temp

7uWqKj ,

No, these are sqlite temp files, not the database files. McAfee had no control over the temp files.

towerful ,

Sqlite is a great embedded database.
If you are storing lots and lots of information in a JSON file, CSV file, or coming up with your own serialisation… Chances are, sqlite is going to do it better.
I know loads of android apps use sqlite for storage. I’ve also managed to open quite a few programmes “proprietary” file format in sqlite.

anton ,

A yes, the two genders of binary file formats: renamed sqlite file and renamed zip folder.

ElderWendigo ,

Aren’t sqilte files themselves (like most other things) just fancy text files?

FooBarrington ,

Nah, only actual string data is stored as text. Everything else is stored as binary: www.sqlite.org/fileformat.html#record_format

The file also isn’t written sequentially, it’s stored in blocks (pages), where sometimes later data can be inserted in the middle (e.g. when data was deleted).

ElderWendigo ,

I did say fancy.

FooBarrington ,

Then I guess my laptop is just a fancy boat.

tofubl ,

Haven’t seen your laptop, but if it’s anything like mine it’s a very lousy boat.

Laser ,

Ahoy sailor

sunbeam60 ,
shotgun_crab ,

Don’t forget renamed and compressed xml + zip

GBU_28 ,

Al sorts of applications would enjoy a database to log all sorts of stuff, store results, capture events, etc.

SQLite is great because it doesn’t necessitate another infra dependency as it is stored to file

Michal ,

The program needs to store multiple temporary files (one per virus definition update, or scan results or whatever purpose).

It looks like they simply picked sqlite as a format because the data has a structured format and that way they leverage databases robustness, easiness to read and query the data.

The comment appears to be from 2006. Sqlite mightve had some limitations then that necessitated creating a new (temporary) database file as a subset of larger database for performance reasons or to allow multiple processes to read/write them and then consolidate data back into the single database.

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