@sergi@floss.social
@sergi@floss.social avatar

sergi

@sergi@floss.social

🐍 Python aficionado
🕸 Web dev tinkerer
🎲🕹 Gaming enthusiast
🗣 English, Catalan, Spanish, Italian

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

sergi, to RSS
@sergi@floss.social avatar

@matthiasott I was reading your latest newsletter and would like to mention as a reader: https://miniflux.app/

I've been very happy with the hosted version so far!

imajeanpeace, to random

If your argument relies heavily on your identity, your argument is weak. Starting your argument with "as a insert identity here means that you are trying to "appeal to authority". This meane that you assert that your claim is true just because of who you are, rather than presenting evidence or reasoning. Sure, your identity gives you unique insights and I value that, but those insights need to be supported by logical reasoning and evidence-based statements.

Your argument should stand alone even if this 'identity' is removed. And starting with one's identity esp where you signal to others that only people of that identity can engage with the issue or have a valid perspective overshadows the content of the argument itself. The focus goes from the merits of the argument to the identity of the speaker. This just leads to the argument not being taken on its own merits.

And for the libs who will shame me for this stance, let me use my identity card the way you love to use it:

I am queer, gender diverse woman who speaks English as third language. Im brown and have chronic illness.

I could go on and on. The question remains, are my arguments strong enough to stand alone without banking on my identities? You tell me.

sergi,
@sergi@floss.social avatar

@imajeanpeace that reminds me of people who introduce themselves at work with "I am X and I have Y years of experience in Z". They love remarking that amount of years.

glyph, to python
@glyph@mastodon.social avatar

New version of Fritter today, <https://pypi.org/project/fritter/0.0.7/>, my library for interacting with the passage of time in a generalized way, for both civil and physical times (i.e.: datetimes and epoch-second timestamps).

This software is proudly ZeroVer <https://0ver.org> right now, as I am rapidly evolving its interfaces and documentation without a compatibility policy yet, trying to make sure I'm comfortable committing to it. But as of today it has 100% test coverage.

sergi,
@sergi@floss.social avatar

@glyph please add to the repo a link to the docs. I just saw the post with the GitHub link, clicked on it, and having 0 examples or detailed docs on the Readme was a big turn off.

Then I decided to examine if the post was part of a thread and indeed it was. But be aware that we are lazy.

imajeanpeace, to random

Otaku of the fediverse, I am looking for mystery, psych thriller, horror anime. I welcome any recommendations.

Context: my favourite anime are the following (not exhaustive) : Evangelion, Erased, Perfect Blue, Elfen Lied, Madoka, Attack on Titan, FMA Brotherhood, Hellsing, Hellgirl, Boogiepop, Higurashi

sergi,
@sergi@floss.social avatar

@imajeanpeace I haven't watch the anime adaptation, but the mange Monster ticks on mystery and psych thriller. Maybe even horror?

And it's a great piece!

hynek, to python
@hynek@mastodon.social avatar

Nothing lets me feel like an alien visiting earth like the popular state of data validation in .

I have an elaborate blog post in me, but I’m just gonna leave here that trying to shoehorn your validation models into your data model is the biggest attractive nuisance I’ve seen in a LONG time.

Whenever I try it anyway, I run into unsolvable problems within minutes & have to start adding hacks until I give up. I really don’t know what to make out of all the bright-eyed excitement.

sergi,
@sergi@floss.social avatar

@hynek what about using an ORM to interact with the DB, but then having your business logic ride on top of that. So the objects of the business layer use the objects of the storage layer (ORM), but they don't need to be the same.

That way yo still benefit from the easy query writing and other extras provided by ORM, while maintaining full control of your domain objects.

matthiasott, to random
@matthiasott@mastodon.social avatar

Playing the harmonica with the kids. With our noses 😂✌️

sergi,
@sergi@floss.social avatar

@matthiasott amazing childhood memory unlocked

schizanon, (edited ) to webdev
@schizanon@mas.to avatar

If there was an element that changes it's content when users interact with other elements on the page, what name would it have?

PLEASE NOTE: I am not suggesting that this element needs to exist; I am only asking what it would be called. I'm building a CustomElement, I just want it to have a name that makes sense.

Vote and suggest others in replies. Please boost for reach!

sergi,
@sergi@floss.social avatar

@schizanon @wiverson I coincide that this feature is not what defines the element, but it's just an attribute of it.

I see it as asking "what would you call an element that can be hidden". Well, I want all elements to support the hidden attribute, not have a specific element for that.

None of the options of the poll reflect that, so I can't provide an answer except for a comment.

mandrasch, to webdev
@mandrasch@social.tchncs.de avatar

Small coding challenge for

How would you solve the following in 2024?

  • Server provides a list of destinations (JSON or data-xyz="" attributes), no pagination
  • rendered as card grid
  • JS: on click --> open modal with more details

Codepen: https://codepen.io/matthias_vie/pen/KKEeMLr

Would love to use Svelte, but want to achieve it without extra build step (legacy project).

Thought about and Template Fragments https://htmx.org/essays/template-fragments/? Any recommendations for a clean solution?

sergi,
@sergi@floss.social avatar

@mandrasch I would pick whatever backend I feel more comfortable with, and render the html there. As you said, generating the dialogs as HTML fragments loaded on demand.

sergi, to python
@sergi@floss.social avatar

Best practice for importing the datetime module in : https://sergiswriting.com/import-datetime/

sergi, to random
@sergi@floss.social avatar
tbroyer, to random
@tbroyer@piaille.fr avatar

Tell me you don't understand REST and HTTP without saying you don't understand REST and HTTP.

sergi,
@sergi@floss.social avatar

@mw @tbroyer I'm also missing the message.

sergi,
@sergi@floss.social avatar

@tbroyer @mw I don't agree with your interpretation then. A DELETE could be deleting the data. That link you shared says:

> If the target resource has one or more current representations, they might or might not be destroyed by the origin server, and the associated storage might or might not be reclaimed, depending entirely on the nature of the resource and its implementation by the origin server (which are beyond the scope of this specification).

sergi,
@sergi@floss.social avatar

@tbroyer @mw so it's the server to decide if that DELETE actually deletes the data, or just makes it inaccessible on that URI.

hjwp, to random
@hjwp@fosstodon.org avatar

wow i just had my first truly horrible experience with the Python match/case statement, where attempting to match by class ends up calling a side-effect causing @property.

sergi,
@sergi@floss.social avatar

@hjwp a @property causing a side effect seems to be the issue there 😬

Unless as side effect you mean running some computation or I/O? Maybe a good candidate for @cached_property instead?

sergi, to random
@sergi@floss.social avatar

New release of Jinja Fragments is out with support for Litestar thanks to @pythonbynight !

https://pypi.org/project/jinja2-fragments/

sergi, to linux
@sergi@floss.social avatar
sergi, to react
@sergi@floss.social avatar

"React is legacy tech from 2013 when browsers didn’t have template strings or a BFCache."

https://johan.hal.se/wrote/2024/01/24/concatenating-text/

davidbisset, to javascript
@davidbisset@phpc.social avatar

Listening to a episode about . Learning about it for the first time, but based on all the hate i'm seeing from folks on about it, it's worth seeing that this is.

https://changelog.com/jsparty/307

sergi,
@sergi@floss.social avatar

@cferdinandi @davidbisset what do you mean with vendor lock-in in this case?

sergi,
@sergi@floss.social avatar

@cferdinandi @davidbisset yeah, the only feature that would allow breaking away from it with 0 changes is if you only use hx-boosted to avoid page refreshes.

sergi,
@sergi@floss.social avatar

@cferdinandi @davidbisset that said, I can't imagine any library/framework that enhances how HTML is rendered not causing that vendor lock-in.

Even if you create your own JS, you have "locked in" yourself to that, as removing that code will break how the site is supposed to work.

sergi, to retrogaming
@sergi@floss.social avatar
grumpygamer, (edited ) to random
@grumpygamer@mastodon.gamedev.place avatar

If you have a group of tasks to do and one of them you hate, do you...

sergi,
@sergi@floss.social avatar

@grumpygamer priority depends on how important it is, not how much I like it.

If I hate it but it's the most important item, well, it goes first.

hynek, to random
@hynek@mastodon.social avatar

As someone who’s neither a fan of “Clean Code” nor of “A Philosophy of Software Design” I have come to really like Kent Beck’s “Tidy First?”.

It doesn’t try to be an all-encompassing tome, but gives some easily digestible hyper-local advice. Things like guard clauses. I haven’t really learned anything from reading its short ~100 pages, but I think it’s a great resource for beginners and intermediates who want to improve their craft.

https://www.goodreads.com/book/show/171691901

sergi,
@sergi@floss.social avatar

@hynek thanks for the recommendation! That will me my read this Friday night :)

sergi,
@sergi@floss.social avatar

@hvdklauw maybe you can find it on a library?

samwilson, to random
@samwilson@wikis.world avatar

@simon I recommend https://www.borgbackup.org/ (and I don't recommend ).

sergi,
@sergi@floss.social avatar

@samwilson @simon why you don't recommend SpiderOak? I've been using it for a long time, but I wonder if I should jump ship?

  • All
  • Subscribed
  • Moderated
  • Favorites
  • JUstTest
  • tacticalgear
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • Durango
  • cubers
  • Youngstown
  • mdbf
  • slotface
  • rosin
  • ngwrru68w68
  • kavyap
  • GTA5RPClips
  • provamag3
  • ethstaker
  • InstantRegret
  • Leos
  • normalnudes
  • everett
  • khanakhh
  • osvaldo12
  • cisconetworking
  • modclub
  • anitta
  • tester
  • megavids
  • lostlight
  • All magazines