I don’t know what is happening in my sleep but I woke up with my mouth full of blanket fuzz again. I wish sleep me would stop chewing on blankets. Maybe I keep getting sexually assaulted by a hairy supernatural creature or the aliens have thick carpeting on their spaceships. I should set up cameras and go all Paranormal Activity on this mystery.
In general JS has finally adopted some of the best awesomest ideas of the LISP world. For GetGoodGat I’m using a tiny functions data first approach to composing code and it is super powerful. When you couple it with a document store you get super powers that feel a lot like working with Datascript and Clojure data structures.
You have your original set of data and all the code just changes and transforms this data until eventually outputting it. ES6 is finally capable enough of letting me code apps as state transformations. This let’s me think of apps in turns of inputs and outputs, which is extremely powerful once you grok it.
On GetGoodAt I need flexible purchase model, users need to be able purchase a variety of content; courses, articles, books etc. Instead of implementing code for each of this individually I just have a function that takes any object and purchases it. All the function needs is for the object to have a price field and pretty much that it is it. So any purchasing functionality is easy, and can be added to any content type with almost no extra labor.
I have started to do away with ORMs on most of my projects. I think they defeat the purpose of schemaless stores and remove all the flexibility and power you get from them. Instead I validate data elsewhere. Anytime I need to stick some metadata on a document or transform it in someway I can easily do it.
I split up all my code into tiny functions and let functions read the details they need from state in the objects. One explicit place for state vastly simplifies code. It makes little tiny functions possible. The clojure way.
Today I intend to be mostly work productive. But hope this evening to get around to GetGoodAt stuff.
Things I Will Do Today
- Inbox Zero
- Shut down AWS account. I need to close down the account, I no longer use S3, so it is just sitting there costing me tiny bits of money. I haven’t bothered because it is only a $2 charge a month. A years worth of that is like a large pizza though
- Publish MathAsCode ruby fork. Planned to do this a couple days ago but never got to it
- Work for 6 hours (I have little idea what my tasks are yet)
- Chop wood for 30 minutes
- Take a jog
Things I Will Not Do Today
- I will not Eat unhealthy