A new website
Steve Jobs once said:
You’ve got to start with the customer experience and work backwards to the technology.
I believe this is the right approach to doing most things. Start by thinking about the outcome you want, then figure out the how. The common mistake is to instead look at the skills and resources available, then figure out what can be created given those constraints.
I had 3 goals for this new website.
- I want the site to be fast.
- I want it to be cheap to run.
- I want all my stuff to live in a central hub I control.
10 years on the Mac
The Macintosh is an example of a product where the people who made it first thought about the outcome, the user experience, then figured out the technology (like rounded rects) that were required to get there.
The process of building this website reminded me of all the reasons why I love the Mac. All the tools I need are easily available - either pre-installed, or a simple
brew install $WHATEVER command away.
For example, OS X runs on top of Unix. The open web is usually some flavour of Unix1. Developing for the web on the Mac is a joy because most concepts and commands are the same (e.g. file systems, permissions, tools like
rsync). Everything feels native and familiar. When I open up the Mac terminal app and SSH into my web server it’s the same environment I’m familiar with on my Mac. Ruby, Apache, ￼Bash￼…it’s just all there and it’s all the same.
The past 10 years on the Mac have been the most creative of my life simply because there is so much support out there for making things on the Mac. Beyond the tutorials, the available apps are best of breed and usually open-source. I learned photography, video editing and programming all on the Mac.
I hope the Mac and OS X continue to evolve and stay true to themselves2.
It’s just some implementation detail, don’t worry about it…
Execution is everything.
This site is far from great. But I believe a lot of the fundamental architecture and design decisions are ok.
Solving for outcome 1 - speed
The problem with the web in 2015 is it’s slow and bloated. Many popular sites are full of ads and tracking that make pages load slowly, suck your phone battery dry and blast noise from autoplaying videos you don’t want to watch.
You can see below from a simple test I did on the SMH homepage I found 22 trackers active - a lot of them are advertising related. These trackers each fire off their own scripts and make additional network requests - often running long after the main webpage has loaded - chewing up battery life unnecessarily.
I did two things to tackle this problem.
<header> of the HTML because I don’t want anything taking priority over the rendering of the content.
A lot of blogs use a CMS like Wordpress. I like Wordpress. My previous effort ran on Wordpress and I have been using it for almost 10 years. The problem with Wordpress is that I believe a CMS is overkill for a blog. There is no need for a server to put together a blog post for the user every time a page is requested. The page is going to be the same for every visitor!
But I don’t want to craft every single page like an animal - programming can help with that.
I built this site using Middleman which is a static site generator. It programatically pieces together each page and every possible permutation of a page. That way, I can build once and then deploy.
Middleman is quite capable so far, easy to use7 and very customisable. It has dedicated blogging tools and plenty of modules to add-on functionality later.
Some tidbits about the design:
- I designed the site from the ground up and wrote a lot of custom CSS to get it looking how I wanted. The foundation is Bootstrap so I didn’t have to worry too much about mobile vs desktop rendering and sizes.
- Why orange? I wanted the background to be white because I wanted images to blend easily into the page. I didn’t want the usual boring blue highlight colours so I opted for orange which goes well with white, I think.
As a great side benefit of the static site approach, it means there is significantly less demand on the server’s resources and hence only minimum computing power is required bringing down costs and brings me to the next outcome required…
Solving for outcome 2 - server running costs
My choice in using a static site also results in minimum server requirements.
I am using a VPS that costs $5/month with 512MB of memory and uses SSDs for storage. SSDs are fairly cheap now in a VPS environment, and given the limited memory, the storage performance must be top notch.
The VPS also hosts all my other content from the robertwli.com and robli.org domains.
Solving for outcome 3 - central hub
I find the web is moving to a place where everyone’s content is stored and owned by private companies like Facebook, Google and Apple. This in itself is not a bad thing. They provide great services.
I am a believer in the power of the open web. A web where you control, store and serve your own content over the internet.
My About page lists all the stuff I have worked on past and present. Hopefully, I will keep adding to this page as I tackle new projects.
I also finally have a place for my photos that I’m fairly happy with. Ironically, I started to learn programming because I was not happy with any of the templates the typical photo portfolio websites offered. After getting side-tracked with programming for 2 years, I circled back to the original task.
I will be adding progressively to this as well.
usually linux ↩
Afterall, it’s the existence of the Mac that allows the next generaiton of computing devices like iOS devices to have the freedom to stay simple and be true to themselves. ↩
like this ↩
On the bright side, chances are you already have 4 different versions of jQuery cached on your computer. ↩
Why? I don’t know, I guess I like to know what’s going on with the site. ↩
if you’re experienced with the Ruby/Rails conventions ↩