@bckohan@fosstodon.org
@bckohan@fosstodon.org avatar

bckohan

@bckohan@fosstodon.org

I am an engineer @ NASA/JPL. I love both Python and C++ and am always looking for opportunities to donate my skills to pro-social endeavors. Hit me up!

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

ehmatthes, to random
@ehmatthes@fosstodon.org avatar

Is there anyone at #PyConUS with a background in seismology?

I'm wondering if it's possible to recognize landslides from seismic data. If so, it would help identify exactly when some landslides in our community happened.

bckohan,
@bckohan@fosstodon.org avatar

@ehmatthes dunno if there are any public data sets but I bet a landslide that close to the ocean would also show up in underwater acoustic sensors

bckohan,
@bckohan@fosstodon.org avatar

@ehmatthes probably have a similar noise problem for smaller slides like with the seismometer data, maybe reach out to the LIGO folks lol

bckohan,
@bckohan@fosstodon.org avatar

@ehmatthes ooo but since you know the precise location of the slide if you have multiple sensors you could triangulate the location to help with the noise

ehmatthes, to random
@ehmatthes@fosstodon.org avatar

If you're at #PyConUs, I'll be speaking at 5pm on Saturday about using Python to build a real-time tool for monitoring landslide risk.

Hope to see some of you there!

https://us.pycon.org/2024/schedule/presentation/54/

bckohan,
@bckohan@fosstodon.org avatar

@ehmatthes I'll be there!

webology, to random
@webology@mastodon.social avatar

🤔 Instead of creating new terms/words for AI and LLMs that have run amuck, I think “AI bullshit” and “LLM bullshit” both roll off the tongue rather well. You may optionally shorten bullshit to “BS” or even the 💩 emoji if you prefer. I encourage you to call people out on their bullshit when they are abusing this autocompletion technology.

bckohan,
@bckohan@fosstodon.org avatar

@harry_karadimas @webology I'm partial to "slop". Slop doesn't necessarily have to be incorrect as connoted by BS but its hardly ever what you actually want.

ehmatthes, to random
@ehmatthes@fosstodon.org avatar

I've had a great father-son southwest trip this past week. :)

looking out over Bryce Canyon
selfie at Bryce

bckohan,
@bckohan@fosstodon.org avatar

@ehmatthes So fun!! Did ya'll see the narrows?

bckohan, to random
@bckohan@fosstodon.org avatar

I was excited to integrate django-typer into some production projects so I could add tab-completion to some of my often used management commands. I've been thwarted by slow bootstrapping times. Profiling reveals most time is just spent loading python code. In some of my beefer projects bootstrapping is approaching 3 seconds. 0.5 seconds is spent building classes! Meta magic in dynamic languages does have some runtime cost unfortunately.

bckohan,
@bckohan@fosstodon.org avatar

Though, uploading python profiling data to chatgpt and asking it to explain it to me has been a revelation.

bckohan,
@bckohan@fosstodon.org avatar

@webology Hitting tab and waiting 3 seconds is not exactly the UX I was looking for. My main use case for this is a system that assigns UUIDs to gps data users upload for processing. As an experimental system its constantly barfing so I do a lot of "wtf is wrong with 12345678-1234-5678-1234-567812345678" investigations. An embarrassingly significant part of the motivation for django-typer was the dream of being able to type 123-tab haha. The cut/paste workflow is < 3 seconds.

bckohan,
@bckohan@fosstodon.org avatar

@webology I'm still digging - but right now it just seems like mostly disk I/O associated with loading modules and a half second of class building. The app stack is beefy, but I haven't been able to find a particular bit of app code thats executed on load thats slowing everything down other than this issue with split settings which I found yesterday and has already been merged (thanks Nikita): https://github.com/wemake-services/django-split-settings/issues/532

bckohan,
@bckohan@fosstodon.org avatar

@webology Im just using manage.py —help to generate the profile, so other than the meta class stuff from Django-typer its the normal bootstrap. I guess it’s not that hard for me to believe that the bootstrapping could run that long for a beefy app stack? It also pulls in a bunch of Django-cms modules. It’s also 2x as fast on my laptop with a new SSD which also points to disk I/O.

shoq, to random
@shoq@mastodon.social avatar

I swear, we are still talking about this platform stuff all wrong. There is absolutely no comparison between my mastodon engagements and those anywhere else. People here are just far more interested in engaging people and ideas than any other site where the biggest activity seems to be following celebrity accounts and popular influencers discussing very little. It’s a completely different kind of experience.

bckohan,
@bckohan@fosstodon.org avatar

@shoq It gives real usenet before the AOL merger vibes. I think this is almost entirely an artifact of mastodon bering perceived as "hard to use" during the first major twitter exodus. Its nice here because there's a selection bias for nerds.

webology, to random
@webology@mastodon.social avatar

🤔 I am genuinely curious: what are the general feelings about people stopping by to approve pull requests who are not contributors to an open-source project?

Is this helpful?

Is this common place?

Do you have feelings about it?

bckohan,
@bckohan@fosstodon.org avatar

@carlton @webology

I'm thrilled when anyone does any amount of free labor, even if its not of the best quality. But yes, just clicking a button isn't exactly labor.

bckohan, to random
@bckohan@fosstodon.org avatar

Anyone ever seen pypi spit this error back at you?

Invalid API Token: token with user restriction without a user

I have not changed my setup since the last time this worked, also tried generating a new key - getting this from twine and poetry.

ehmatthes, to random
@ehmatthes@fosstodon.org avatar

I finally used the walrus operator last night, and now I'm using it in a lot of places. I'll be curious to see if it's particularly applicable to this project, or if I start to use it more regularly.

It's another good use of GPT. "Can I use the walrus operator to improve this code?" was much more efficient than reading through docs to use it for the first time.

Of course, I was only aware of the possibility from having read the docs in the first place.

bckohan,
@bckohan@fosstodon.org avatar

@webology @ehmatthes I stan the walrus!

Sometimes I feel like my obsession with eliminating lines of code is counter productive and potentially obfuscating but I think in lots of cases the walrus truly makes things more readable. I can understand why some folks worry about feature creep in a language devolving it into endless harder to learn complexity - but this particular operator is worth it!

oliverandrich, to random
@oliverandrich@fosstodon.org avatar

Played around with django_typer in the last few days and really love what @bckohan has built. So I took the decision to reimplement the management command for my django-tailwind-cli project using it. The code feels much cleaner now. I hope the users are okay with the extra dependency.

https://github.com/oliverandrich/django-tailwind-cli/releases/tag/2.9.0

#django #python #typer

bckohan,
@bckohan@fosstodon.org avatar

@josh @oliverandrich Glad you're liking it Oliver. I have a similar hesitance adding third party dependencies so I spent a lot of time ameliorating the kinds of concerns I would have. Mostly with django-typer this meant making the TyperCommand interface compatible with BaseCommand not only so everything just works from the Django perspective but also so conversions from BaseCommand and reversions back to BaseCommand are as straightforward as possible.

ehmatthes, to random
@ehmatthes@fosstodon.org avatar

I've been wanting to see better code blocks in email newsletters for a long time. I'm hoping Ghost makes that possible.

I'm trying to show it's possible with this week's post. Here's a default Ghost code block, and a revised version that seems to work:

Same code block, with highlighting applied.

bckohan,
@bckohan@fosstodon.org avatar

@ehmatthes @webology Cool! Is all the styling inline and simple? I seem to recall massive headaches trying to style html emails because CSS support is so scattershot

wsvincent, to random
@wsvincent@fosstodon.org avatar

I took a stab at an all-in-one tutorial on Getting Started With Django.

https://learndjango.com/tutorials/getting-started-django-tutorial

bckohan,
@bckohan@fosstodon.org avatar

@wsvincent This is really great Will. Exactly the level of information I'd be looking for to get my head around some new tool or framework. Forwarding to some colleagues...

bckohan, to django
@bckohan@fosstodon.org avatar

🚨New Django Package🚨

Use typer (i.e. type hints) to define your Django management command CLI!

https://github.com/bckohan/django-typer

Python makes it easy to fit square pegs into round holes, and this was certainly an exercise in doing that 😅

#django #DjangoNews #python

anthrocypher, to random
@anthrocypher@hachyderm.io avatar

One of these days I’ll have to do some long-form writing about how at Stack Overflow, during the peak of our rise, barely any improvements were made to our Q&A product

and how that eventually led users to turn their frustrations with the platform on each other.

bckohan,
@bckohan@fosstodon.org avatar

@luis_in_brief @anthrocypher Frankly, I'm just salivating at the idea of ever getting to "good enough".

davidism, to random
@davidism@mas.to avatar

The stress of knowing that anything I do in projects I maintain could cause angry messages has led to burnout multiple times. Don't ever suggest that I'm not thinking about or aware of the effects of my decisions. It weighs incredibly heavily on me.

bckohan,
@bckohan@fosstodon.org avatar

@davidism 🤗

bckohan, to random
@bckohan@fosstodon.org avatar

I've finally published version 2 of https://github.com/bckohan/django-render-static. This library is a Django app that transpiles the urls.reverse() function to javascript as well as Python Enums and defines. It also formalizes the concept of a pre-collectstatic rendering step for any static files that need to be generated at package or deployment time. Thanks to the sprint @ #djangocon !!

bckohan, to random
@bckohan@fosstodon.org avatar

Hello world.

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