Hacker News new | past | comments | ask | show | jobs | submit | pokipoke's comments login

I haven't seen such bad Python code (fasthtml repo) for a long time. It feels like its written in 2008 using Python2


I started grasping for air once I saw hand-parsing data coming from configuration file written by the same authors!

Then I realized that part of the Python code in the repo is generated from notebooks...

I'm not a Web programmer, so just took a peak out of curiosity. I'm just a little bit happier now that I'm not a Web programmer.


It doesn't look like they use a formatter or linter. I hope I'm wrong but I feel like that and their use of nbdev are really going to hurt adoption. :(


You still need to install hypopg which is C extension



Elixir beating python in the machine learning wars, or at least becoming a competitive option, is something I dream of.

Is anybody using Elixir for ML who could comment on the state of it? How usable is it now?

Last I heard, for new projects/models/etc it was great, but so much existing stuff (that you want to reuse or expand on) is dependent on python, making it hard unless you are starting from scratch.


You are wrong. Just checked Django part. No annotations, `__all__` in serializers, exists+get instead just calling .first(), etc. It's no way a good Django codebase.


Also noticing copious use of select distinct within the views, which indicates issues with the schema. It may also partially be due to the somewhat limiting API provided by Django Rest Framework, which I personally tend to avoid. All things can be improved though.


Why do you avoid DRF? It's what keeps me coming back to Django over .NET Core or other API stacks (although I have yet to tilt at RoR in earnest/anger).


I just want to start by acknowledging the demo of basic functionality is fantastic and feels very magical, and–perhaps crucially–it has been a couple years since I gave up on DRF completely. With that out of the way, I've run into issues with it when building actual applications. DRF serializers were absurdly slow. Relations were handled poorly. It steers you away from many of Django's standard features, including the forms interface, which is one of Django's best features. The documentation was lacking for rough patches in the API.


It might not be perfect, or live up to whatever expectations you personally possess, but it legitimately is a pretty good example of a clean and straightforward Django application.


What are your favorite repos that are built with Django that have good practices.


https://github.com/builtwithdjango/builtwithdjango

This is not the best practice codebase as I wrote it when I was learning Django. But is it very applied. Any beginner should be able to understand this.


> Any beginner should be able to understand this Was thinking more along the lines of non-beginner stuff.


Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: