Dragons & Demons: making your own blog website

·

3 min read

What's the best about having your own blog website?

Writing whatever you want...
Experimenting...
Doing all the crazy things that come to your mind!

My cute little baby...

But what a hell of a ride that was!!

Prelude

I work as a software engineer, python is the language I speak. I thought: why not to learn django? Why not to code my website from scratch? I'd have a sandbox to play in. I could do whatever I want.

Did anyone mention that flexibility comes with a price?

The Plan

I've spent a day or two sketching out the basic functionality of the first release. I wanted:

  1. to be able to post something;

  2. comment the posts;

  3. basic feedback system (please use it, I sweat a loooot on it);

  4. notification emails (yeah yeah, I do prenumerate my one blog...);

  5. tag system.

Nothing fancy, just enough to get started. No unnecessary features (yet). Just enough to be able to post.

And later, if I realize that writing is my life's passion, then I'll quit my job, sell the house (which I don't own), leave my wife (which I don't have), buy a van and go to the end of the world where I could stay undisturbed and build the most feature creep rocking website in the world!!!

Django

Few desperate weeks went by in the django dungeons. The learning curve was steep as a rock and I'm no mountain goat. I was going through documentation and lots of tutorials, but django has some things going on under the hood. It took time 'til I discovered what's happening behind the scenes and how things are interconnected. Until I finally had a rough idea where I can start debugging when stuff doesn't work (and the stuff constantly doesn't work, especially when you're just starting out).

As silly as it may sound, I didn't think about css in the beginning (uh, what's bootstrap?). So I had to learn that one too so that the website doesn't look terrible. I mean terrible terrible.

Few rough weeks fast forward, I have a working version on my computer. I can write an article. I can comment. I can give myself a banana (and you can too!) I'm proud of myself.

But that sqlite looks suspicious to me, let's google if I should use it.

Migrations

After a while...

Right, so google suggests postgresql. Who am I to argue?..

Oh, what about old migrations? Hmm... let's delete them. I can makemigrations anytime anyway, so what's the difference?

PS Yep, later I also did the same in my production website. As they say, no pain, no gain. Now I'm not deleting migrations anymore.

PPS At this point I didn't know anything about databases. SQL vs NoSQL? DB design? Anomalies? Just write a few lines of python in the model and it works!!

Hosting

Website - check. Database - check. Now let's find where to host my amazing website.

After a day...

Shoot, it's expensive.

After a few days...

What do you mean I can't host my website on shared hosting?

Time goes on...

Yes, I ordered a server from you, but I need admin rights to host my django app. No, I won't use your website builder. Okay, I want my money back.

...and on...

Maybe some cloud solution?

...tick tock...

What?? How much do you charge for this???

...and I started wondering...

Should I just buy a domain and host it on my local pc?

...and I'm happy I didn't...

In the end I took the cheapest VPS I could find. It was a great feeling to finally have home for my baby.

Now once I have the hosting, the real fun begins. Come over to see what I'm actually talking about!