@anze3db@fosstodon.org
@anze3db@fosstodon.org avatar

anze3db

@anze3db@fosstodon.org

Writing Python :python:, Django :django: and surfing waves 🏄‍♂️

Projects:
🧪 https://flakytest.dev tame your test suite flakiness
🧑‍💻 https://fedidevs.com find awesome devs across the fediverse
💻 https://github.com/anze3db/django-tui a TUI for all your Django commands

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

anze3db, to random
@anze3db@fosstodon.org avatar

Oh sweet, Fedidevs is listing over 11k developers as of today!

From what I can tell, the fediverse gains about 25 new developer accounts every day. 🚀

anze3db,
@anze3db@fosstodon.org avatar

I had a bug that messed up the stats between Sep 24 and Sep 26 so that's why there was no change on those dates 😅

anze3db, to random
@anze3db@fosstodon.org avatar

This is way too accurate.

anze3db, to random
@anze3db@fosstodon.org avatar

I have to admit that GitHub Copilot is amazing at writing Django ORM annotations.

I don't write annotations often so I'd have to lookup ExpressionWrapper/Count/Case etc in the docs, but with Copilot I only had to write the name of the annotation and it filled in the rest 🤯

anze3db, to random
@anze3db@fosstodon.org avatar

I've just run the ruff format on a codebase with 2000+ files.

It finished in 3.6s 🤯

For comparison, black takes 152s to format the same project.

anze3db, to random
@anze3db@fosstodon.org avatar

TIL: Flaky tests are also known as flappers 😆

Does anyone actually use this term?

anze3db,
@anze3db@fosstodon.org avatar

@adamchainz Hm... I haven't heard someone say "is flapping" and refer to servers. Interesting!

Flappers came up in this blog post at CircleCI so it could just be an internal CircleCI gag? 😆

https://circleci.com/blog/reducing-flaky-test-failures/

anze3db, to random
@anze3db@fosstodon.org avatar

“Because AI-By-Learning is intractable (formally, NP-hard under randomized reductions), the sample-and-time requirements grow non-polynomially (e.g. exponentially or worse) in n.”

https://irisvanrooijcogsci.com/2023/09/17/debunking-agi-inevitability-claims/

hynek, to random
@hynek@mastodon.social avatar

Wow so iOS 17’s predictive typing/autocorrect is worth the update alone. Been using it for two days and it’s incredible.

anze3db,
@anze3db@fosstodon.org avatar

@hynek interesting. I didn’t find it that useful. I wonder if it’s because I’m using an older iPhone SE, but it rarely autocompletes and when it does it’s only a latter or two that usually faster to type than press space twice.

felixxm, to django
@felixxm@fosstodon.org avatar

The award for finding the first Django 5.0 release blocker goes to 🥁 ... me 😆 Join the club, test, and find your own release blocker! 🥊 🔥

https://www.djangoproject.com/weblog/2023/sep/18/django-50-alpha-1-released/

anze3db,
@anze3db@fosstodon.org avatar

@felixxm looks like Sentry's Django integration is broken in 5.0a1. It's because they are using Signal._live_receivers(), but the function has changed and now returns a tuple of sync and async receivers.

I’ll open a ticket over at sentry-sdk's github repo about this, but let me know if you'd like a Django ticket as well.

anze3db,
@anze3db@fosstodon.org avatar
anze3db, to random
@anze3db@fosstodon.org avatar

I've just redesigned fedidevs.com!

It's now easier to switch between seeing accounts and posts, and I replaced the awkward side-scrolling accounts table with fancy cards.

image/png
image/png
image/png

anze3db, to random
@anze3db@fosstodon.org avatar

Today we are driving for one hour hoping this surf forecast is accurate.

The cams don’t look good, but if you can't trust the surf forecast that says that the waves will get bigger who can you trust? 🙃

anze3db,
@anze3db@fosstodon.org avatar

Still looking small, so now we are hoping it will get bigger while we are in the water

anze3db, to random
@anze3db@fosstodon.org avatar

I've written a blog post on fedidevs posts!

https://blog.pecar.me/fedidevs-posts

anze3db, to random
@anze3db@fosstodon.org avatar

I'm working on a redesign for fedidevs.com.

The goal is to add tabs for switching between accounts and posts, but I also fell down a rabbit hole of trying to reduce verticle space clutter. 😅

Thoughts?

Before After

image/png

anze3db,
@anze3db@fosstodon.org avatar

@hmhackmaster yes, good point. This is something I've gone back and forth on as well. I might try to do a single line of the filters instead of 3 or more, but then the filters would have to scroll horizontally which is also not ideal 🤔

anze3db,
@anze3db@fosstodon.org avatar

@hmhackmaster Thanks again for the feedback, I've decided to keep the filter buttons! (live now)

adamchainz, to django
@adamchainz@fosstodon.org avatar

✍️ New post on taking advantage of templates’ "builtins" option.

https://adamj.eu/tech/2023/09/15/django-move-template-tag-library-builtins/

anze3db,
@anze3db@fosstodon.org avatar

@adamchainz great post and perfect timing, because I was just thinking about adding icons to my project earlier today. I didn’t know about heroicons before so thank you for mentioning them!

felixxm, to django
@felixxm@fosstodon.org avatar

My latest article shows how to smoothly propagate Database Changes in Blue-Green Deployments 💙 ➡️ 💚 using migrations :django: Check and share!

https://fly.io/django-beats/smooth-database-changes-in-blue-green-deployments/

anze3db,
@anze3db@fosstodon.org avatar

@felixxm This looks like a much cleaner solution than what we came up with at work (redefining the apply method 😅).

As others commented, it would be incredible if this workflow was supported by Django out of the box!

pamelafox, to random
@pamelafox@fosstodon.org avatar

Is there a formatter for Python that does everything black does but doesn't bother with line length? (I know I can set line-length to 300+ but then black rewrites existing code into longer lines. I just want to leave those lines alone)

anze3db,
@anze3db@fosstodon.org avatar

@pamelafox since you are already introducing change to the codebase it's probably best to stick with Black defaults and not try to minimize the diff. Using a less popular formatter might introduce even more change further down the line if the project stops being maintained.

PS: Adding the commit hash to a .git-blame-ignore-revs file helps avoid the formatting changes when using git blame.

mariatta, to random
@mariatta@fosstodon.org avatar

The new Slack UI really makes it difficult for people who work in more than one workspace 😥
Switching workspaces is now a multi-click process.

Are they trying to make us move to Discord?

anze3db,
@anze3db@fosstodon.org avatar

@mariatta I haven’t seen the new UI yet, but do the cmd+1, cmd+2, … shortcuts still work to switch between workspaces? If so then that might be a way to avoid multi-clicks 🤔

anze3db, to random
@anze3db@fosstodon.org avatar

I've just launched Fedidevs Posts! 🚀

It lists the best posts made by developers across the fediverse.

http://fedidevs.com/posts/

anze3db, to random
@anze3db@fosstodon.org avatar

I keep googling how to enable WAL mode for a SQLite database when using Django, but it isn't a "connection" setting, so Django doesn't need to know about it.

You enable WAL on the db file, and it will persist:

sqlite3 db.sqlite3 'PRAGMA journal_mode=WAL;'

anze3db,
@anze3db@fosstodon.org avatar

@jbeimler That's a good idea, yes! I'm hoping that this ticket will be resoled at some point and you'll be able to add the PRAGMAs to the init command.

https://code.djangoproject.com/ticket/24018

anze3db,
@anze3db@fosstodon.org avatar

@kennethd Yeah, the PRAGMA commands are probably noops so it shouldn't be a problem. I'm still hoping that this 9 year old ticket will get resolved at some point and we'll be able to set these settings with an initi_command

https://code.djangoproject.com/ticket/24018

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