First Post

June 14, 2021 · 2 minutes to read

Tags: GatsbyPythonWeb development

Hi there, welcome to my blog!

This site has been a long time coming…I registered the domain warrenchisholm.com a couple of years ago with the intention of starting a blog. I started this blog for a few reasons:

  • I wanted to share some of the ideas that I come across during my technical work as an environmental consultant.
  • I’m interested in computer programming, and creating this site seemed like a great way to learn about web development.
  • Shameless self-promotion.

Starting with a language named after a comedy troupe…

I’m a self-taught programmer, and I really like programming with Python. So when I was looking for a website framework I went to the Python “ecosystem”. I’d previously worked with Django and Flask for making small web applications, but I wanted to make this blog a static site after learning about their benefits, such as:

  • lower maintenance - no server-side app to look after,
  • security - no server-side app vulnerabilities, and
  • performance - no server-side rendering in response to requests, as all the pages are rendered at build time.

I’d initially built this site with Lektor, which is a static site generator written for Python. However, I found the main reason I went with Lektor - I like Python - wasn’t really that useful. Lektor did pretty much everything I wanted “out-of-the-box”, so I never needed to write any Python…almost all of the coding was HTML in templates, CSS and a sprinking of JavaScript.

…to the great Gatsby

So I decided to create the site in a different framework. After looking at a number if static site generators, I decided to use Gatsby because:

  • it’s widely used and actively maintained - I’m confident it’ll be around for a while.
  • it’s built on React - an opportunity for me to learn a popular JavaScript framework.
  • it can source content from MarkDown files - I didn’t want to use a headless CMS and I already had content in MarkDown.
  • simple hosting - I can deploy the site to Netlify straight from the GitHub repository.

So off to the Gatsby site I went and began working my way through the tutorials. I found I really like the component-based approach of Gatsby (and React). It makes it easy to re-use components, and building the site by composing discrete components makes it easy to reason about the structure of pages.

I initally hesitated a little about mixing HTML, CSS and JavaScript within components, as it breaks the separation of concerns. However, I can see the benefits of this approach after working with Gatsby, such scoping of CSS to components. It’s easy to run with a more traditional appraoch to styling if I wanted to though.

I hope you enjoy your visit, whatever this site ends up being.


Profile picture

Written by Warren Chisholm, an environmental consultant and marine scientist living in Perth, Western Australia. Check out Warren's LinkedIn profile and Twitter.