Decisions So Far

To be fair, this is not the first week that I start to work on HackingNote and other online experiments. But this is the week 1 since my decision to start documenting the progress(if any).

As for now, the sites are offline-generated static HTMLs hosted on Amazon AWS S3. It was not like this since day one though. Here are some key decisions I’ve made that lead up to today.

App or Content

I once built a simple single-page web-app, and was thrilled to post it in a relevant online forum. The reception was not bad. Then came the bug reports and feature requests. Those are the things I’d like to spend time on, at least I’m iterating on my “product”, but maintaining the databases and the servers killed all the fun.

Content seems to be easier, once created, I’m hand-free. Plus it can accumulate, and every word may pay a dividend in the long run. I’m taking notes anyways, both technical and non-technical, why not just share them online?

Third Party or Self-hosted

So how to host my content? The simple(and popular) way is to use a website like Medium, Tumblr or Blogger. You can still own your content, customize the appearance, and no worries about backing up and site availability. But be careful about the terms and conditions, you may lose some control. What if your are forced to put some ads on your page but it is not you that get the money? What if the website decide to shut down? What if the domain is totally blocked in some country?

I’ve used no less than 5 different such websites, the longest one lasts for about 3years before I migrated everything out. Then recently I realized another benefit of using thus a website: it is not just a blog host, but also a community. It can draw some traffic for your cold-start self-hosted website, instead of totally relying on organic searches.

So now somehow I’m using both.

Blog or Guide

Or should it be indexed by timeline or by content topic. Blog content can become outdated. If you see something that was written 2 years ago, even it is still relevant, you feel it is outdated. It is like paying a deprecation fee for your posts overtime. The positive side is if you look back, it is like a diary, recording every single step that you’ve made along the way.

I guess it really depends on what is your content. If it is related to the timeline, like news, or your own experiences and stories, use blog; if it is sticky, and you prefer to keep updating the content, then do not attach the date to your post. Also it depends on how often you can make an update, if regular and frequent, use blog.

Dynamic or Static

Probably WordPress is the most famous open-source blog framework, I actually prefer Ghost, it is much cleaner(and in Node.js!). Those tools provide good user interfaces, making it easy to write and update your posts. But they all store data in a database, and need a server to run. Again, hate all those maintenance work.

On the contrary, the static site generators, generate HTML locally, and you can easily upload the HTML to S3 or even Github Pages. Previously I was using nanoc and jekyll(both Ruby based). As an effort to simplify the tech stack, I converted the sites to Hexo(Node.js based)

One Site or One Site Per Topic

Once I got familiar with the tool, and the template was created, I was tempted to spawn sites for each topic that I care about. But soon it becomes unmanageable: each site a separate webmaster entry, analytics tracking code, S3 bucket etc, and to make things worse, at least for the short term, the traffic branched out from the main site.

Hierarchical or Flat

Originally content was organized by some self defined categories, like tools, languages, data science, web; then there are sub-categories in each folder. Some categories are horizontal but some are vertical. That caused some serious trouble to decide where to put each note. Should Maven under tools or under Java? Should HTML, Javascript and CSS under web or language?

Since the URL is like “/category/sub-category/sub-sub-category/topic”, every time I decided to re-categorize some notes, some links would stop working, and the new page needs some time to get indexed by search engine.

Now it is flattened. Every topic is in its own “top level” folder.

Summary

When I look back, I realize how lazy I am. Low maintenance is the theme: static content on static web hosting; avoid potentially staled content and complicated structure; centralized place to dump whatever that is beyond my brain capacity. Lazy might not be a bad word, at all.