this post was submitted on 22 Jul 2024
515 points (99.2% liked)

Programmer Humor

25395 readers
1717 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
 

My sister started a new position that involves HTML. She tried to explain an issue to me, but I'm not a web guy. I told her to send it to me on Monday and she sent this...

you are viewing a single comment's thread
view the rest of the comments
[–] xmunk@sh.itjust.works 96 points 1 year ago (2 children)

Oh, that's an excellent way to start if you're building a database in CSS.

[–] ByteOnBikes@slrpnk.net 56 points 1 year ago (2 children)

https://css-tricks.com/css-database-queries/

  1. Use a hand-modified-to-ESM version of SQL.js, which is SQLite in JavaScript.
  2. Get a database ready that SQL.js can query.
  3. Build a Houdini PaintWorklet that executes queries in JavaScript and paints the results back to the screen in that -y way that PaintWorklets do.
  4. Pass the query you want to run into the worklet by way of a CSS custom property.
[–] herrcaptain@lemmy.ca 62 points 1 year ago* (last edited 1 year ago) (4 children)
  1. Go straight to jail.

Edit: No idea what's up with the formatting. In my app this shows as step 5 but it seems to render as step 1. Is the Lemmy DB done in CSS?

[–] morrowind@lemmy.ml 32 points 1 year ago

Lemmy is fine, it depends on the markdown parser/renderer. Markdown allows you to use any numbers for numbered lists and the renderer is supposed to display them corrected.

As you can imagine that leaves a lot of ambiguity

[–] OpenStars@discuss.online 19 points 1 year ago (1 children)

For me it shows as step 5, in Firefox on Android using web browser interface. Also I can view your source which shows as simply "5. Go...", so it is definitely your app.

[–] herrcaptain@lemmy.ca 5 points 1 year ago (2 children)

Weird! Thanks for letting me know. I guess that's what I get for using an app (Sync) that the developer abandons for months at a time.

Problem in this case is the specification is vague on what the 'correct' thing to display is.

[–] OpenStars@discuss.online 2 points 1 year ago

It's not the best UI, but you can also view your comment from a standard web browser, just to see how it looks. The advantage to the web browser is that it is always by definition maximally up-to-date:-) - though its baseline functionality may still be lower than an app if the latter is done well.

[–] melvisntnormal@feddit.uk 7 points 1 year ago

Put a slash before the dot, like 5\.:

5. Go straight to jail.

This is a Markdown issue really. Starting a line with a number and then a dot turns that line into an item in an ordered list. The most common behaviour (that I've seen) is to start that list from 1, regardless of what number is used. The intent is to make it easy to add items later without renumbering everything, for living documents at least.

[–] Diplomjodler3@lemmy.world 23 points 1 year ago (2 children)

What colour do you want your database to be?

[–] Whelks_chance@lemmy.world 18 points 1 year ago (1 children)
[–] odium@programming.dev 11 points 1 year ago (1 children)

That's fine as long as you don't need it to be centered.

[–] Opisek@lemmy.world 3 points 1 year ago

Vertically AND horizontally, please.

[–] MajorHavoc@programming.dev 5 points 1 year ago

"And do people want fire that can be fitted nasally?"