F
farmdev
farmdev.com · Personal blog · on HN since 2008
farmdev is the site of a Python developer who writes about Unicode, testing, remote work, and Python internals like frame hacking.
What HN saysHN commenters recommend its Unicode talk as a great explanation that helped them during Python 2 to 3 migration, and link its frame hacking tricks.
18HN people shared it
6linked it in comments
14stories submitted
140story points
4 years agolast shared
2008people per year2026
Most-shared posts
- 1Unicode In Python, Completely Demystified11 people · 132 points · first shared 2008 · 19 comments on HN
- 2Secrets of Frame Hacking in Python2 people · 1 points · first shared 2017 · discussion on HN
- 3Index2 people · first shared 2015
- 4Some Tips on Working Remotely1 people · 2 points · first shared 2018 · discussion on HN
- 5Let's buy lobbyists to save the Internet1 people · 2 points · first shared 2012 · discussion on HN
- 6Safer Unit Testing in React with TypeScript1 people · 1 points · first shared 2019 · discussion on HN
- 7How to protect against Heartbleed and future vulnerabilities1 people · 1 points · first shared 2014 · discussion on HN
- 8Unicode In Python, Completely Demystified [2008]1 people · 1 points · first shared 2012 · discussion on HN
- 9Using fixture with pylons1 people · first shared 2011
What HN people wrote when they linked it
UpdatedFolders · 2020-08-14
I personally had a good time re-reading this over and over again when I was migrating python 2 to python 3, it's a great resource: http://farmdev.com/talks/unicode/
mace · 2009-05-23
Here's another great explanation of Unicode from PyCon '08:
http://farmdev.com/talks/unicode/
It is really helpful in understanding Unicode handling in Python pre 3.0.
anthonyb · 2011-10-18
The issue that I have with that attitude (as an experienced Python and Django developer) is that there's a lot more to it than just "swapping out Django's DB and replacing it with SQLAlchemy". You miss out on most of the infrastructure around Django's database stuff that makes it so easy and worthwhile to use.
For example, fixtures. In Django, you can include them in your tests and have it All Just Work(TM):
https://docs.djangoproject.com/en/dev/topics/testing/#fixture-loading
You can also use them outside of testing, too:
https://docs.djangoproject.com/en/dev/howto/initial-data/#providing-in…
Fixtures in Flask/SQLAlchemy? Not so much - you have to roll your own (crappy) implementation:
http://farmdev.com/projects/fixture/using-fixture-with-pylons.html
http://flask.pocoo.org/mailinglist/archive/2011/3/6/flask-sqlalchemy-a…
Also note that, while I'm picking on fixtures here, Django also has a bunch of other database related features, like introspecting a pre-existing database, and generating a bunch of Model classes from it. Combine that with South and you're 90% of the way there when migrating the data from a legacy system.
This has turned into a bit of a rant, but I've seen a lot of half-baked reimplementations in "pluggable" architectures of stuff which Django just gets right.
sitkack · 2022-05-08
You golf a lambda and then deride walrus in the same comment? Please explain yourself.
And if you really want to make the perfect lambda, you can do that with code generation and frame walking/patching.
http://farmdev.com/src/secrets/framehack/index.html
resiros · 2015-07-17
Cool tricks. This lead me to read about the subject of frames in python (http://farmdev.com/src/secrets/framehack/index.html).
Can anybody suggest advanced Python books to dig out more in such matters?
sukhbir · 2011-12-02
To add to this, Kumar McMillan's talk, "Unicode In Python, Completely Demystified" (http://farmdev.com/talks/unicode/) is really good.