@davidfstr@mastodon.world
@davidfstr@mastodon.world avatar

davidfstr

@davidfstr@mastodon.world

Software sculptor. Writer. Teacher. Inquiring mind. Bringing world-class computer science education to K-12 schools, teachers, and students at https://techsmart.codes

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

davidfstr, to random
@davidfstr@mastodon.world avatar

I’ll be at PyCon US in Pittsburgh starting tomorrow (Thurs 5/16). If you’re there and want to meet up, let me know. #PyConUS

davidfstr, to python
@davidfstr@mastodon.world avatar

TypeIs[], an improved alternative to TypeGuard[] in Python, has been accepted by the Steering Council for Python 3.13 🎉

I'm hoping to combine this functionality with the upcoming TypeForm[] to better support runtime in .

https://peps.python.org/pep-0742/

webology, to random
@webology@mastodon.social avatar

The Django apps I actually use (rough cut): https://micro.webology.dev/2024/02/04/the-django-apps.html

davidfstr,
@davidfstr@mastodon.world avatar

@webology Thanks for listing the Django apps you find useful! If you have a few extra moments, just a one sentence summary of each app on the list would be helpful ✨

brettcannon, to random
@brettcannon@fosstodon.org avatar

Announcing a proof-of-concept record type for Python https://snarky.ca/my-proof-of-concept-record-type/

If you happen to remember my struct syntax proposal, this is effectively implementing that idea via a function decorator. If there's enough positive feedback I will consider writing a PEP to propose this as syntax.

davidfstr,
@davidfstr@mastodon.world avatar

@brettcannon The PoC seems like a curious combo of a dataclass (always with frozen=True, eq=True) and a TypedDict (structural subtyping). Not different enough from either to be worth introducing IMHO.

I'd be very hesitant to propose syntax for any record type without there already being broad usage. We don't even have syntax support for dataclasses yet.

brianokken, to random
@brianokken@fosstodon.org avatar

Do you think you should write more automated tests?
If so, why do you think that? What are your barriers to doing so? What would enough look like?
If not, what gives you that confidence?

I’d like to explore this topic more, so any RTs appreciated.

davidfstr,
@davidfstr@mastodon.world avatar

@brianokken I’m satisfied with the (relatively high) quality/number of automated tests for my 2 biggest projects. Confidence is high because of some policies: (1) Always write covering automated tests alongside new features. (2) When modifying an old feature, always check test coverage first and backfill if inadequate. (3) Prefer acceptance tests, starting at UI / API level, over all other test types. Avoid tests starting at internal API. (4) Prefer Fakes over Mocks.

blong, to python
@blong@fosstodon.org avatar

In addition to using #mypy , can anyone share any guidance, tooling, or blogs that may help steer a #python application towards the "TypeState" pattern? I'm also curious if there are references comparing the "State" pattern to the "TypeState" pattern (Rust).

I suppose I'm looking specifically for Python comparisons with #rust, e.g. if there were a part 2 for the article here:

https://kobzol.github.io/rust/python/2023/05/20/writing-python-like-its-rust.html

Forgive my ignorance, I'm trying to learn 😬

cc/ @adamchainz @davidfstr

davidfstr,
@davidfstr@mastodon.world avatar

@blong The “type state pattern” from #rust [^1] isn’t really implementable in #python ‘s current type system because Python doesn’t have any concept of “moving” values in a way that prevents use of the old reference. — [^1]: http://cliffle.com/blog/rust-typestate/

stargirl, to random
@stargirl@hachyderm.io avatar

Thinking about starting a decomp project but god I literally have no idea how to start. Reversing a 4mb win32 exe just feels ... beyond me. I don't even know how I'd go about re-building the exe in a way I could verify my progress.

davidfstr,
@davidfstr@mastodon.world avatar

@stargirl I managed to put together a Java decompiler while in high school. (So you can do it too!) — My simple measure of success was: What % of the Java standard library .class files could I both decompile & recompile without a crash or syntax error. — If you get to reconstructing a program’s control flow, my second decompiler paper has some ideas you might find interesting. https://dafoster.net/prism/projects/decomp/ #decompiler #java

davidfstr, to windows
@davidfstr@mastodon.world avatar

Reality check: Windows is in fact is quite popular for development despite me seeing very few Windows laptops at conferences compared with macOS. https://lp.jetbrains.com/python-developers-survey-2022/ #windows #programming

phire, to random
@phire@phire.place avatar

deleted_by_author

  • Loading...
  • davidfstr,
    @davidfstr@mastodon.world avatar

    Reminder to self: It's important to make time for creative tasks that give energy. They are not a waste of time. https://phire.place/@phire/110860499783872150

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