Friday, September 6, 2019

  • Researched a pattern for automatic injection of season and week into all db calls. Flask's g object already has season and week from my default value params, but I was hoping there would be a clean pattern where I didn't have to pass them explicitly into every db call. There are some precompile event ways in sqlalchmey, and there's a "BakedQuery" but none do exactly what I wanted. There's no harm in being explicit in every query for now. Once the user table adopts season as well, I might be able to just have a wrapper around db.session.query which inserts season and week everywhere, but it's not important for now. I was surprised a normative solution for this wasn't more common/apparent.
  • Sell orders completed in Robinhood. Transferred to BoA.
  • Chiro. Feel much better.
  • I don't agree with this article: https://abe-winter.github.io/2019/09/03/orms-backwards.html. ORMs are of good convenience to the majority of users, like any high-level abstraction. Most database interactions of not of the complexity/difference that would require raw SQL for integrity.
  • Blog.
    • In the spirit of retention, I thought it would be a good idea to start a morning habit of rereading my previous blog posts. If I go back a week, this will take about 5 minutes. Every item will be ingrained 7 times, which should be enough to remember most details.
    • Changed the main page to only show 7 days, so I just read the whole site every day.
    • Redesigned. Simply black now. Better font sizes. Cleaner organization. Removed some gadgets.
  • The pgadmin getting started docs are some of the worst I've ever seen. Very verbose, and none of the content I want. How do you install? Give me one sentence with options.
    • The web interface allows you some conveniences. You can run the pgadmin server in a container and localhost:5050 gets a web application. You can create users, tables, modify data, etc.
    • Any package that requires you to wget a wheel and install it  manually is...not going to get any attention. Upload your modules to pypi like a normal human being pls.
    • I've been satisfied with psql so far; I'm not going to use pgadmin because of these unnecessary deterrents. PSQL forces me to practice my sql anyway.
  • Supercontest.
    • Added a repeat-x niners svg to the jumbotron.
    • Parsed and put the rules on a new site tab. Used webcomponents and zero-md to convert the md in source to html.
    • Closed https://github.com/brianmahlstedt/supercontest/issues/66.
    • Started working on the Season table, ticket 68.
    • Verified that the remote backup to local, and then restore local from local, correctly syncs the production db to my dev machine.
  • Where sqlalchemy would usually have you declare a base, manage the session, etc - flask_sqlalchemy is what I use and it abstracts a lot of that away, simply giving you a db object to do the most common tasks with.
  • Met with Art about pharma:
    • Recap from my old notes:
      • utm params can identify the majority of traffic we generate.
      • Universal application to be approved as pharmacy. Standardizing this API would be valuable for everyone, marketplace or not.
      • Kayak model: redirect them, don't buy/sell directly. Pros: Simpler. Easier.
      • Amazon/Orbitz model: allow buy/sell through our website. Pros: You can generate aggregate purchase orders. Paperwork is a big aspect. You can also hold the money and do a billing cycle.
      • Could offer a small client to serve smaller vendor's prices, putting them online.
      • Exit strategy is not to monopolize, it's to sell to Amazon (like PillPack for 753m).
    • Now actions:
      • Build the mvp site.
        • Get domain name and host.
        • Populate with fake data from multiple vendors. You might be able to get some public data for generics. Some sites even list their rx, like https://auromedics.com/products/ampicillin-and-sulbactam/.
        • Write template API that we'll encourage vendors to use. Write client from excel sheet.
        • Add basic user login which protects the price comp tool endpoint.
        • Add basic landing page which describes the benefits for (a) pharmacies and (b) vendors.
      • We are going with the orbitz model, the buy-through-us model. This gives a few benefits:
        • One stop shop. One invoice. 
        • Can include generics, prescriptions, and med supplies in the same order.
        • We can basically give credit, where pharmacies can go on a monthly billing cycle, and we pay in the meantime.
      • Go speak with vendors. Get them onboard and get their data.
        • Here is where you can search for some vendors: https://search.dca.ca.gov/
        • Med supply vendors are huge.
        • Collect what percentage? Do research, seek financial expertise here.
      • Standardized universal application.
        • Vendors have to be cool with us giving their data out. This should be fine; it's free marketing.
      • Go speak with pharmacies once you have a good selection of vendors and products. Get them to start using it.
      • Exit sell to Amazon like PillPack for 753m.
  • Met with Nel's dad about the pathplanning app. Notes coming tomorrow after I do more research.