Wednesday, November 2, 2016

Tutorials - Doing them while offline


 
I'm in Jodhpur, Rajasthan, in the middle of a war. It's Diwali here; the holiday should represent the winning of light over darkness, but I guess the people are thinking the war is still going on.

My shelter is a room in a guesthouse without a name; it was just opened, but I think it has very good view of town. It sits on a cliff, very close to the fort  Mehrangarh Fort and Jaswant Thada. While hiding, my heart jumps with every boom, I thought of the subject for my next post. I have been doing a lot of programming tutorials in the past month, and most of the time I didn't have an internet connection.


This situation calls for a bit of preparation.

First, I need to choose the tutorials in which I am interested. Whether it's a blog I am reading, or post in Hashnode, or maybe some package documentation. Every tutorial that seems interesting to me, I try to save it as a PDF. Hashnode is gives some problems, but most blogs print well. And If I'm printing from GitHub, there's a site called gitprint.com – you can simply change the domain from github.com to gitprint.com. It prints GitHub documentation very well. If you can print it, you can print it to PDF. Chrome has this ability built-in, I don't know about other browsers, but if not, you can download Foxit and it will add a pdf printer to your printers.

After saving the tutorials as PDF, I try checking what online stuff every tutorial needs. First, download everything that is needed for this tutorial – e.g. npm packages, script files. Now if the app that we build using the tutorial needs to do some online requests (e.g. using some online API), we have two options. Wait to do the tutorial until I have any connection. Or try and figuring the scheme of the response, and make a small webserver that will handle our requests – but most of the time this is just too much work and I prefer to wait.

Of course, any tutorial stands by itself, and you need to figure out what to do. But these steps occur on most tutorials I do – print to pdf and download npm packages.

Short post for today,
Happy Diwali!



No comments:

Post a Comment