This blog is currently powered by a Python script that reads from Dropbox Paper, Airtable and Dropbox to generate pages and publish onto various sites all at once. However, I am also looking to do some additional things in the future such as support landing pages, full websites with frontend components that interact with APIs and rendering Jupyter Notebooks. I like Python as of now because it has a good standard library and has the appropriate libraries however I feel like I might hit a wall soon.

  1. JavaScript just has a lot more frontend tooling and support even for something that is makeshift like I want to call GatsbyJS dynamically.
  2. JavaScript is better able to handle the frontend tasks a bit more user friendly way than Python. React components can be called in the frontend.
  3. Python is pretty terse and JavaScript seems a lot more verbose to construct those changes.

Iono, it seems like it really doesn’t matter but since it is frontend stuff maybe I should just do it in JavaScript anyways. It’ll be a good way to learn the ecosystem a bit more as I will be keeping the backend completely in Python for now.

Python and Typescript

Some Updates (12/17/2019)

I rewrote the script in Typescript. Some notes:

  • It is a pain to get everything setup correctly even with Typescript. There are so many random configuration files.
  • Python was much simpler to code and reason about as it is a matter of sequential execution. Javascript promises and etc. do require a much different way to think through a problem since everything is not blocking. It is actually much more akin to Scheme in that regard plus asynchronous operations. It took a while to get used to.
  • Code is faster in Node than Python, but writing speed was much faster with Python. Javascript just feels hacky and you can feel as if the language had stuff bolted on top. Example, Hashes not have a .map operator.
  • I think even though execution is slower Python may be a better language overall for doing backend tasks, APIs I can go either way but I could see it being a perfect use case of Node and it is why it is likely used quite a bit.
  • JSX is pretty nice even on the backend. 90% of why I moved to this new model since it will allow me to use React Components.
  • I think Python may be a better language for default programming tasks as it takes less to reason about.