- Flask servers persist (or restart after) ubuntu suspension, fyi. If you close your laptop with the app running, it will continue when you reopen.
- You can have branches in alembic (just like git) for when multiple people are working on changes that modify the models. I accidentally created a branchpoint a while back on the production server. To resolve, you merge the versions (just like git). This creates a new version and migration script (mine was empty, as expected). Then you can migrate and upgrade as usual.
- For future reference – my net worth exceeded 1m at around age 28. Vested and exercised. Probably age 26 unexercised. The biggest hindrance? Taxes on illiquid assets. AMT traps are real. I paid hundreds of thousands of dollars before even seeing a cent of it. IRC 83(i) will help considerably, but the finance department shucked this novelty due to a clause where purchase offers make employees ineligible. Even…when the purchase offers are inconsistent (nondeterministic schedule), limited (you are severely capped in share sales), unknown (you have no idea when your trap hits), and infrequent (gaps longer than a year apart).
- The pycharm db browser is buggy if you start manually modifying data.
- HN
- Ya, the cookies warnings need to stop.
- “communicate in the language of options, not demands or preferences” https://news.ycombinator.com/item?id=19349676. I agree. This applies outside the workplace as well. Social issues like racism and other political debates largely stem from personal bias. A withdrawn, impartial view of options and their pros/cons would serve everyone well.
- This is really cool – basically a sed alternative for find/replace, but with machine learning. https://github.com/Inventitech/strans.
- The median age of Google/Amazon employees (software in general) is 30. The median age of american workers is 42.
- Error handlers are pretty easy in Flask. If the exception (or other code, or custom handler) is to be reached in an ajax call, however, you must do something different.
- SC
- Removed the backref from the picks table (to users). Left the FK constraint.
- Removed the points col. This will be a separate table.
- Added utilities.add_user for easy creation of new users (for testing). This obviously must be invoked from a db context (python manage.py shell), not just any old python console.
- Created and few users and made sure they were distinct.
- Moved some test dbs to backups. Merged an old db version, migrated, then upgraded my local dev db.
- Played with moving html <script> tags around to the proper template to avoid Undefined Variable errors.
- Did the ajax/flask error handling. If any of the common pick mistakes occur serverside (>5, started game, etc), it will return the traceback and flash the client! All are grouped in the InvalidPicks exception class within the view.
- Added clientside verification of “game already started” and “can only pick wed-sat”. Changed the allowable pick back from status=F to P (the proper one, pregame).
- Closed ticket #4, created #30 for the last items in the mvp: the pick view and the leaderboard view (then back population from last season’s data).
- Moved the logic for coloring to js (from html). Only applies to picks now, not all.
- Added an 18th week to the db so that people can play with the pick interface before next season.