Turning 29 and other things in June

This month has been a quick one, I can’t believe it’s already the 18th as I type this. Below is a short review of the month and my 29th year.

Continuing my habit building for reading, I’ve been making steady progress reading books and listening to audiobooks. This month, I finished up 3 books and one audiobook so far. The books were Guards! Guards! by Terry Pratchett, Fear and Loathing in Las Vegas by Hunter S. Thompson, and How to Invent Everything by Ryan North. Each of these books is pretty different each other which kept me engaged the whole time. I was reading How to Invent Everything on my iPhone any time I was bored or had a few minutes, in a couple of months, I finished it which actually surprised me how little effort was required to finish it. I wanted to read a fantasy book that’s different than what I was into before (mostly Game of Thrones and Witcher lore) and Guards! Guards! is a good departure from that. I took a trip to Las Vegas and Los Angeles last week and so I read Fear and Loathing in Las Vegas. My experience in Vegas was pretty tame and wildly different than Thompson’s characters’ but it was still a fun read.

In my last post, I stated that I’m stopping work on Bookends and over the past couple of weeks, I’ve been thinking a lot about what I want to do next with my personal time at home. One of the big goals is to become more aware of myself, meaning more time spent being healthy which includes mental and physical health. I haven’t talked about this before on my blog but around the end of last year, I started seeing a therapist and it has helped my mental health a lot. I’m becoming more aware of myself and others around me. One of my main weaknesses is lack of empathy and I’m trying to hone that part of my brain. I’m also feeling less down all the time and excited (not just motivated in bursts) to work on new things. After I built some parts of Bookends and also my go link shortener, I realized that some things just take time and others will come with time, e.g. building a useful version of the link shortener took a couple of iterations but spending time learning node.js and some javascript concepts I didn’t understand helped me move ahead with confidence.

For learning in programming, I want to start focusing on ruby mainly because I use it at work and secondly because I want to build things using a different technology stack (rails, Sinatra, non-JS tools). The next few months are going to be focused on learning ruby and trying to build some tools with ruby.

In other aspects of my life, nothing major is going on. I am hoping to spend more time become self-aware and introspecting. Thank you for reading!

Goodbye Bookends, for now

Today, I’m stopping work on Bookends. In this post, I’d like to reflect on why I’m stopping work on it, what I’ve learned, and what’s next.

Bookend’s purpose is to help track and discover books. So far, I don’t think I’ve solved this.

What I’ve learned

When I started the project, I had a simple understanding of how to build a web application using Node.js, working on Bookends has helped me learn or solidify my understanding about routing, authentication, hashing, async calls, promises, and building an API. These are just Node related things, there are other things like how to deploy a staging and production server and how to keep a simple deployment flow have been one of the most delightful thing about Bookends.

Developing a project on your own is boring, hard, and slow. That’s one of the biggest lessons I’ve learned. It’s hard to keep going when there’s no users who want to use your product. It’s boring because every time you work on something, there’s no user feedback. And it’s slow because you have nobody to think with.

The tech stack I chose was familiar to me but it’s not very productive to build an application for the first time with a bunch of tools glued together. I chose node.js with express, vue.js, and sequelize as my main stack. Each of these tools, I’ve learned to use and build with better throughout my year with Bookends but it was still slower because there is no convention guiding best practices with any of them apart from the documentation.

Building an app that relies on third party data is tough, all the book info on Bookends was sourced from public APIs like OpenLibrary and that resulted in lower quality results in the end.

Bookends is currently not solving a problem for anyone and I’ve seen myself become detached from it.

Why I’m moving on

The past few weeks have been pretty hard by myself, inside my mind there have been conflicting thoughts that if I stop this, I’m giving up and at the same time, if I stop this I’m buying myself time to do something else. Up until last night, I was working on small features but even after stopping for the night, I felt like I wasn’t happy with the progress for the day. Fighting against my tools every time I work on it has been draining me to the point where I’m unable to go on my personal computer and concentrate on anything else. As you can see with hardly any posts in the past month.

What’s next

I’ve been using ruby and rails at work. I’m in a reverse tech cycle here, most people are moving to node.js and a modern front-end framework like vue.js or react while I’m moving to a more conventional web app framework like ruby on rails. I want to spend more time learning ruby, building things with ruby, and learning better habits for myself as a web developer. There are so many things I still would like to become proficient at like testing, iterating on product ideas, solving real world problems, learning deployment best practices, moving away from weekend projects for a change.

I might come back to working on Bookends when I have more experience building web apps.


Below are some screenshots of the most recent deploy on https://bookends.app. Depending on when you’re reading this, the site might still be up or not.

April showers bring May flowers

This post is just a summary of my month of April. I was in a lull at the beginning of the month but I started to get more aware of myself and started reading, writing, and doing things to get myself out of that initial lull.

Books

I finished listening to At Home by Bill Bryson in April which was a nice listen. It was a good summary of the past 250 years of history about things around the house. Like why we have different rooms like closet, kitchen, and bedroom. Where do we get the concept of having lawns? There were so many interesting facts in this book, I couldn’t keep up!
I also listened to Astrophysics for People in a Hurry by Neil deGrasse Tyson. It was a fun and quick listen, it’s a great intro book for astrophysics and the author makes everything pretty approachable for a non-astrophysicist.
I finished reading Aladdin by Yasmine Seale which I didn’t enjoy as much I was hoping to. It’s too simplistic and that might be because of the original book and not the translation itself.

Health + fitness

I’ve been getting more active recently. I started doing about 10 minutes of yoga every morning and I’m trying to get back to riding the bike about 1-2 times a week.
I’m also trying to be more conscious of what I eat but that hasn’t been a huge concern for me. I try to limit myself to some meat throughout the week and not everyday.

Code + side projects

I worked a bit on Bookends in April but I didn’t make a huge dent in all the things I’d like to get done before I consider the app ready to be used. I am deploying as many small changes as I can. Each time I am adding something new, I’m having to rethink about the models I’ve already set. Once I got search working, things have gotten a bit easier to work with. Next is just getting a nice user flow going and not removing all new user data on each deploy, I am doing this to avoid any unforeseen issues since I’m treating the current version of the app at bookends.app as an alpha release.
I’m hoping to spend more time learning Ruby in May as I’ve gotten super busy at work and haven’t been able to spend any time learning concepts and language specific oddities.

Thinking back to 1919, a 100 years ago today

I was recently reading about an event that shaped the future in which I live in and was born in. A hundred years ago, what is currently India was occupied by the British crown and producing the highest amounts of tea and other resources for the crown. I am not a historian but I wanted to highlight an event today, the Jallianwala Bagh massacre. Here’s the wikipedia page on it:

Jallianwala Bagh massacre on Wikipedia

The massacre was a horrific act of mistreatment that’s concentrated in one day but was not uncommon in the British Raj. The native people were treated like servants, slaves, or less-than-human just because they were natives. The events of the massacre are not for the weak of heart, because the British officers took no mercy and later were not given any consequences.

Revolutionaries like Bhagat Singh and Lala Lajpat Rai are not highlighted as often in the Western world but their actions did have strong effects on removing the British from India as they showed that even with a massacre like this one, they would continue pushing toward a free and independent India.

This is an example of the inhumanity that took place just 100 years ago and we forget to think about how peaceful of a world we live in today and I am thankful for each day that brings everyone closer to living peacefully.

Bookends update – April 2019

It’s a beautiful day in San Francisco, I got up and made some coffee today. I wrote a short tutorial on how to serve Vue.js apps through Github Pages and then I stepped away from the computer for a bit. But now, I’ve been sitting at my computer for about 2 hours and I have barely anything to show for it except a list Stack Overflow answers that were the correct answers for the questions but my problem was not solved by them.

So a few days ago, I finally got book search and user accounts working on Bookends. You can check it out here: bookends.app. So after this, I wanted to try something else. I want to be able to track a book when I’m reading it and update the progress as I go on and mark it finished at the end. There are a few new things for me to consider, one is making a composite table of users and their books, this proved to be a simple enough exercise thanks for Sequelize.

Next, I wanted to start tracking through the UI. And this is where I’m just flabbergasted! Okay so this is my route:

/api/tracking/start?bookId=[id]&userId=[id]

Simple enough, so I tried it in Postman, works as expected. I try accessing the page and it works as expected. Then I tried to put it on the Bookpage so when a user clicks “Start reading” the book gets tracked…

Well, I thought this would work but it didn’t. And well, fair enough, our good ole pal CORS was what I thought was causing the issue because usually that’s what messes up local dev if you’re serving Vue.js on one post and the server on another port. Well, after spending about an hour trying differen things, cleaning up my routes and looking at each character in my URL to make sure I’m not making a dumb human mistake, it turned out that it wasn’t the issue.

The issue was that for some reason, express routing doesn’t work past the 2nd nesting…I’m not even sure if that’s a legit problem. But at some point, I decided to try this URL instead:

/api/tracking-start

And bam! No cors issues, no network errors, and everything worked. 😐

I’m frustrated with some basic things about Express.js and Node.js together and I’m wondering how long my patience will last. The small jolts of energy I get from getting something work are cool but I don’t know when the negatives will outweigh those.

Serving Vue.js apps on Github Pages

I wanted to share a pretty simple setup on how to serve a Vue.js app using Github Pages. I’m writing this because I had to search around online for awhile before I stumbled upon the Vue.js docs and then had to play with some settings in Github.

For this exercise, I’ll use a sample project you can find here: https://github.com/usmanity/serve-vue-app

So let’s start from the beginning. Let’s use Vue CLI to create an app.

  • Install Vue CLI: https://cli.vuejs.org/
  • Create an app using the above (instructions on the above page): vue create sample-vue-app
  • When you’re prompted with the options for the app, you can choose whatever you want, I went with the default (eslint, babel) setup.
  • After the app is created, cd into the directory and then run npm run serve. If you see the following page, you’re good to go:
  • At this point, let’s configure the vue.config.js file. For reference, I’m using this documentation to set this up: https://cli.vuejs.org/config
  • Your config should look like the following
module.exports = {
  publicPath: "/serve-vue-app",
  outputDir: "docs"
};
  • Save the file and run npm run serve. You should see the localhost URL change to include the publicPath as part of it. This is one way to confirm it’s working.
  • Next, we’ll set up github to serve this. Commit the files and push up to github.
  • After you’ve pushed up the files, go to the repo’s settings
  • Look for the “Github Pages” section and you’ll see something like the following
  • You’ll see the option to serve from the master branch but not from the “master branch /docs folder”. This is because we haven’t built anything for the app.
  • To fix this, just run npm run build in the app folder on your computer.
  • After the build runs, you’ll see a new folder created (it should be called docs).
  • Add this to git, commit and push up. Then you’ll see the docs option available:

After you select this, give github 2-3 minutes to finish building the page and then it will have the URL in the header or just go to whatever URL you configured and keep refreshing 😛.

That’s it, you’re done! Please leave comments if you run into any issues or caught an error with my steps. Thanks!

With love from Novigrad

Novigrad docks

This is not a game review but more of a collection of thoughts about a game in a very subjective and personal way. This contains spoilers about the game!

For this past Christmas, Kristen surprised me with an Xbox One X and I also got The Witcher 3: Wild Hunt gifted to me.

At first, I was really excited to play Battlefield V on the Xbox, since the specs are better than PS4 and videos of the gameplay looked very nice on Xbox compared to PS4. But this excitement quickly died down as I realized that BFV isn’t what I expected it to be. For the month or so I toiled through BFV, I didn’t even touch The Witcher 3.

I had gotten the recommendation to play the Witcher series from my brother and a couple of friends. I even listened to the soundtrack before I played the game because I didn’t buy into the hype.

Well, the hype had died down a long time ago, since I started playing at the beginning of 2019 and the game had come out in 2015. If you read any game reviews between 2015 and 2017, you would’ve seen The Witcher 3 mentioned and still I didn’t care for what it was. This is mostly because the last major game like this that was hyped for me was The Last of Us which is a great game but I didn’t like it.

Well, on to the actual game and what this post is about. I am now about 3+ months into playing the game and there have been a couple of weekends where I spent most of the weekend in front of my TV playing Witcher and if I wasn’t playing it, I was thinking about it.

The game has such a rich gameplay and story that I couldn’t get my mind off of it. There are tons of characters that are developed so well, you start to miss them if they’re not in the game for some time.

Geralt is the best developed game hero I’ve ever played with (Master Chief is second). His personality is dynamic yet deep and interesting. The concept of a witcher in general is great, I didn’t know before the game about the word witcher but essentially it means a male witch (even though that’s a wizard). A witcher is like a superhuman because early on in their life, they go through training to “transformed” or changed into a witcher. Witchers are also longer living than regular humans so Geralt is estimated at somewhere between 90-95 in the game.

The game is based off of books and the whole of the witcher world is set in the 12th century. It feels very medieval and in a very accurate way, in my opinion. The world isn’t the brightest or happiest places, there is war, disease, witchcraft, many different kinds of monsters, haunted places, dark swamps, evil spirits, madmen, power hungry kings, and many other things that go very well with a medieval world.

There are times when you’re so entrenched in something you forget all that’s around you and for the witcher, there are many elements that play with this. Perfect game engine, game play, and obstacles are one thing. The graphics are great for being an almost 4 year old game but the very uniquely amazing thing that this game has is the coupled music. The soundtrack is a work of art on its own but within the game, at the perfect moment, the music just adds to the overall game play so much more. There are some songs that come on when you’re in the swamps and dark forests, the long lonely caves, and the elven ruins that will haunt me for awhile. I won’t share those as there are a lot of those from the official soundtrack.

Before I go on, the game is focused on finding a girl named Ciri who is like Geralt’s goddaughter and also a very important person to the world of witcher. With her, the end of the world is coming. She is being hunted by group of evil “people” (idk what they really are) called the Wild Hunt (where the name of the game comes from).

Gwent

There is one thing to say that the Witcher universe is rich in jokes, jibes, natural dialogue, deep cultural expressions, and many other things that aren’t required of a typical game but it goes a step farther by introducing a card game within the overall game. This card is called Gwent and you can read more about its rules here: https://gwent.fandom.com/wiki/Rules.

At first, I was aversive to playing Gwent as I wanted to get through the main story quests as quickly as possible but this all changed with the Kaer Morhen quest. More on the quest later. Gwent is a simple card game where there are unit cards and special cards, unit cards have strength that helps you fight against your opponent’s unit cards, special cards change the weather or strength of your unit cards. At first, I was really bad at the game but I quickly started realizing the basic strategies until I got to a point where I was winning almost every game if I tried to be strategic about it.

Kaer Morhen, Novigrad, Velen, et al.

Geralt and Vesemir in Velen (image credit)

You start the game in Velen aka “no man’s land” which is a large rural area filled with various kinds of monsters, most pretty weak (since its where you’re starting out). Velen is my least favorite since it’s so depressing, scary, and dark all around. When I started out, I didn’t know about Novigrad or any other places so I went along with it and as most games go, you kind of have to get through the first few levels and quests to make sense of the world you’re in. After I found other places, I didn’t like going back to Velen. There were a few days when I played primarily in Velen, doing the contracts and going through the swamps, dark forests, and empty villages. It’s so well done that I still get goosebumps thinking about some of the weird wraiths that would pop up when I would be going through an abandoned village.

Kaer Morhen is the place where witchers used to train, it’s a fortified castle with not much going on in it. Think of Winterfell from Game of Thrones with a lot less people. You’re taken to Kaer Morhen once when you start the game (basically a tutorial) and again when you find Ciri. Without getting too much into the actual story of the game, Kaer Morhen to me is like an old home of Geralt that is now long abandoned by most people. The world of the Witcher is an empty and lonely place but Kaer Morhen has an atmosphere of long forgotten mightiness. Vesemir is probably the person who trained Geralt and he’s also the caretaker of Kaer Morhen. Spoiler ahead, skip to next paragraph if you don’t want to see the spoiler. When the battle of Kaer Morhen happens after finding Ciri, this is about 3/4th of the way into the main quests of the story, you are fighting the Wild Hunt and amidst the fighting, you’re surrounded by most of Geralt’s companions from the rest of the game like Yennefer, Triss, Zalton, etc. Amongst these is Vesemir who isn’t a major part of the fight until the end when Ciri is almost caught by the Wild Hunt. At this point, some guy from the Wild Hunt proceeds to kill Vesemir and Ciri is outraged, and so was I. I was very saddened by this. It was so unexpected since Vesemir is an all around good guy!

My favorite place of them all is Novigrad, a medieval city full of many different characters. Merchants, thugs, beggars, and drunks all around! The city has a perfect Kings Landing feel to it and especially since it’s the city part you get to experience more than the palaces and grand buildings of any kind. Novigrad is a big city (according to medieval standards), it has tons of peoples and a lot of things happening in it. About half the story missions are here. You meet up with previously met friends like Zalton and Dandelion. Dandelion is a flamboyant and funny guy who runs an inn, I loved going in here just for the music. In Novigrad, you also can find the best weapons blacksmith. There’s the Hierarch Square in which you can find the people of the Eternal Fire preaching to city dwellers.
Whenever I did a mission that required me to be in the swamps of Velen or the caves of Skillege, after finishing the mission, I would fast travel to Novigrad’s Hierarch Square to just feel “safe” even though it’s all a game, the music, people walking around, and some times the sunny sights would be so much better than wherever I had just left.
Geralt can get a haircut, drink some beer, buy food to eat, play gwent, and so many more things in Novigrad, I never wanted to leave it.

The last place you visit is Skillege. A group of islands that reminds me of the roughness of Viking era settlements and superstition to match the time period. It’s a desolate place with a lot of cloudy, rainy, and snowy days. Geralt travels to Skillege in search for Ciri and ends up meeting a lot of interesting characters along the way, like the future queen of the isles who ends up befriending Geralt and eventually helps me out here and there. There are different traditions on Skillege, there are clans that only abide by rules set on the islands and not on the mainland. I liked playing here for a bit but then I would resign back to the mainland as traveling from one small island to another was a depressing experience since most islands were nearly abandoned with tales of ghosts, wraiths, and other creatures haunting each new place.

Aftermath

After you find Ciri, there is a little of the game left in regards to the main quests and as I wound down the game, I felt a bit nostalgic and a connection I’ve never really felt with another game before. It’s an insanely well develop game that contains intuitive controls, beautiful environments, amazing storyline, and so many small details I couldn’t get over it. This game was release almost 4 years ago (May 2015) and I’m raving about it in 2019! That’s an amazing feat for a game released in the current gaming world. Most games will have a long lifecycle but will require constant updates and DLCs while The Witcher 3 only had some initial expansions, not much to keep people coming back and still there’s a strong follower base.

I would recommend playing this game if you’re looking for a casual yet fun game that requires some time, because you can’t finish it in one day. I played over 60 hours in total by the time I had finished the game. That’s a lot for me. The only other game I’ve played more hours on is Battlefield 1 with about 200 hours.

There’s a new Netflix series coming out so be sure to check that out too!

Timeline by Michael Crichton

⏱⌇🏰

I just finished listening to the audiobook version of Timeline by Michael Crichton, narrated by Stephen Lang. It’s another novel I had no idea about going in and the last one I did that with was Dragon Teeth also by Michael Crichton. I was blown away by Dragon Teeth since it was so engaging and it felt like an odd prequel to Jurassic Park even though it had nothing to do with it.

Overall, this has to be one of my less liked book by Michael Crichton as the world building in the beginning was pretty great, especially the first few chapters but eventually it became a bit too sparse for my liking. I like to listen to fiction as audiobooks because if the book contains a lot of world building, it feels very immersive to me. This did feel like that at first but as the novel progressed, especially when the characters were in a new environment, the world building had subsided too much for my liking.

If I was to recommend books by Michael Crichton, this wouldn’t make the list. ☹️

Setting up Fathom for all my sites

So yesterday, I was learning about how nginx works and how to serve multiple sites (web apps even) from the same machine at different URLs. I wanted to do this because I don’t know much about nginx so I thought of it as an experiment to try.

So after I got it working, I remembered that back in February, I had tried using Fathom for basic analytics as it’s not as deeply detailed as Google Analytics. So I went ahead and did the 1-click install then I realized that the install won’t work as it’s not available for multiple sites. How did I come to this conclusion? I had missed a step during the initial setup that asks you if you’d like your analytics to be public or password protected, and because I didn’t care about the analytics being public, I selected that. This shortcut me to the end of the setup and I was able to check out the analytics. Then I realized, I could only have one site, and that wasn’t what I wanted.

Well later, 2-3 hours of messing around, learning a bit about nginx and other things, I come to a point where I had multiple instances of Fathom running on a single DigitalOcean box and I came across some issue which I thought was worth googling, this then led me to a Github issue which revealed to me that I was logged out the whole time on my original 1-click install.

So, I turned around and did the 1-click install again. And this all to say that I’m moving away from Google Analytics and trying to use Fathom analytics now. 😊

Bookends update, March 2019 #2

💥📖🌷

I’m standing here at my mac mini, with my head in my hands, frustrated yet laughing at myself. It’s been more than 3 months or whatever since I started working on this project and each time I finish working on a small feature, a bigger issue arises.

A couple of days ago, I rewrote the BookModel which was initially tightly coupled with the Amazon response but I realized I should make it less reliant on Amazon and more on the local cache I had already set up. Well, today, I was working on it and I realized it was so stupid of me to rely on Amazon at all. They’ve throttled my request for book search even though I was making something between 10-20 requests an hour if that, and all while doing development so maybe 200-300 request every week.

Well, I don’t want to just rant about Amazon. I have decided to start using OpenLibrary as it’s available to use and I will just need to update the BookModel slightly instead of rewriting it this time.

Onwards!

If you’d like to checkout Bookends right now, you can go to https://bookends.app. It’s not ready to be used by you’ll see updates from me here and there.