Encrypted Backups Using Duplicity & Google Cloud Storage

I came across this utility called Duplicity couple of days ago and found it to be very useful. I’ll use this little post to write about what it is and how can it be used to create encrypted backups of not so frequently accessed data on servers that you do not trust. If you only care about the tool, jump to the Usage section.

Use Case

I was working on a little project that involved setting RAID 1 using some spare 500 gig drives and Raspberry Pi as the raid controller. My problem was that I only had two drives, say A and B, and I needed to backup the data on one of the drives (say A) before setting up the raid in case something breaks. I tried to use a friend’s external hard disk but didn’t succeed getting it to work. Finally, I did find another hard disk (say C) in the ‘trash’ laptop a friend of mine gave me. So now I could get the data off the primary disk (A) onto this new disk (C), and I did manage to succeed in that. But this exposed a deeper question of how am I supposed to take care of around 400 GB of backup data, and is having a single copy of it even safe. Of course not.

If you remember my NextCloud solution on DigitalOcean, that worked great as a lightweight cloud, for easy backups of current set of camera pictures and maybe contacts and such. But when it comes to archiving data, DigitalOcean would get a bit too expensive (~USD 10 for 100GB and so on with their block storage). However, their object store was relatively cheap and costed around USD 5 for 250GB of data per month. I needed something like this.

The second problem was speed of upload. I own a modest 2.5Mbps connection, so uploading data off my Internet was out of question. Since I had Google Peering, I could make use of that. I looked up Google Cloud’s solutions and found Google Cloud Storage, which was AWS S3 like object store. They also offered USD 300 free credits to begin with for a year, so I decided to test it out. It worked great, and I got transfer speeds in excess of 24Mbps, which is what Google Peering does.

The last hurdle was finding an automated script to manage sync. I was already a huge fan of rsync and was searching for a way of doing incremental backups (although not strictly required for archiving data) while doing some sort of encryption as well. That is where Duplicity came in.

Enter Duplicity

Duplicity is a tool that uses rsync algorithm for incremental bandwidth efficient backups that are compressed into tarballs and encrypted with GPG. The tool supports a wide range of servers and protocols, and will work with anything from AWS S3, Google Drive/Cloud to WebDAV or plain SSH. In the typical *nix fashion, it does a little thing well and the use cases are only limited to your creativity.

Usage

The setup requires you to install Google Cloud SDK and Python 2’s Boto that will serve as an interface to Google Cloud Storage. Then go ahead, sign up with Google Cloud if you haven’t already and set up a new cloud storage project (say my_backup). Make sure you enable Interoperable Access in /project/settings/interoperability and create a new access-key/secret-key pair. You’ll need to copy these into the ~/.boto config file under gs_access_key_id and gs_secret_access_key respectively.

The last step is to test drive the entire setup. Create a directory with a couple of sample files (probably a slightly large video file as well), and run duplicity with the following command.

$ duplicity ~/backup_directory gs://my_backup

Enter the password when prompted. If all goes well, you’ll see some transfer stats after the command finishes execution (time taken depending on your transfer speed etc), and in your GC console under your storage project’s browser, you’ll see something like in the following image (of course, not a hundred difftars like mine. I’m in the process of backing up my archive).

If you do, then congrats! Those are the encrypted tar volumes of your data. Now just to be sure, make a little change in one of the files and run that command again. You’ll see that this time it takes almost no time, and if you refresh the GC storage’s browser, you’ll see couple of new files over there. Those are I believe the diff files.



To recover the archived files, just do a reverse of the command above and you’ll all your files magically in the ~/backup_directory (after you enter the correct password, that is).

$ duplicity gs://my_backup ~/backup_directory

The next step after the initial backup would to be to run this command every hour or so, so that regular backups of our directory keeps happening. I haven’t tested it yet but something like

0 * * * *  duplicity /home/abhishek/backup_dir gs://backup_dir >> /dev/null

should do the trick.

If you found this article interesting, make sure you read up more about Duplicity on their webpage and in the man pages. There are tonnes of config options. Thank you for reading!

The LaughGuru Experience

So today is my last day here at LaughGuru, my first company. I might still be working with them after this point, but most of the active development would stop and the role of the tech-team will be reduced to just maintenance of existing systems and the like. My plans for the time after my dose of Laughter Guru is still away from total clarity, so won’t really write them here. What I do have some clarity on is how I spent the three quarters of my last year as, and that is what I’ll write on in this little post.

The journey to LaughGuru

Around this time last year, my final sems were in progress. I had no job in hand (that was a thing in the final year, everyone asked everyone else if they had a job. I used to called myself berozgaar, and that is what I’ll call myself from tomorrow). I had some direction, but nothing in particular. My friend Abhishek was my gateway to the world of startups, because I knew of none and planning the future wasn’t my strongest game. So borrowing his experience and startup wisdom, I made a little list of companies that I could apply to and look forward to spending some good time learning and building software and making new friends. Those were literally my only criteria when selecting the organizations that I was going to write to. One of them was LaughGuru, the company Abhishek was then working for.

I wrote an email to the co-founder of the company sometime in mid-May. The communication was initiated through Abhishek, and I was effectively an ’employee referred’ candidate. The conversation went well, and I learned that this person is also the product and engineering manager at the company. He seemed nice. I learned that I’ll be working with ReactJS and the formal interview will start sometime after my exams were done. In the meanwhile, I also spoke with other companies that I knew of then, and most of the experience was pleasant. The people I spoke to were interesting, were open to the idea of accepting a college fresher into their teams and in general open to helping. While the entire experience was intimidating, and the idea of talking about yourself and your ‘achievements’ in front of (some very successful) people was not something I was very comfortable with (but yeah, on this blog it is okay :P), in hindsight it was a great experience into the startup world. Most importantly, I learned that getting a job at some startup is very easy. Getting a good job, at some good startup? That’s the trick.

After my exams and after some really interesting adventures on Indian roads, I got back to the business of adulthood. The company gave me an assignment, which was an interactive card game. The challenging bit was that it had to be implemented in ReactJS that I had little idea about until then. I made a decent looking version of it in around 4 days and the call for interview round 1 came sometime after that. I’m not sure about the type of that interview, but there was a mix of questions, technical and the others. It lasted some two-two and a half hours, and went well. I felt comfortable with the team, and while they seemed like nice people in general, it definitely didn’t seem like a place full of elite programmers working extra hard to bring something of a dream to reality (that is how I naively imagined startups to be like).

A week later, my second on-site interview round was conducted. This time the frontend lead was present, with whom I would be working if I get selected. The second round was much more casual than the first, and not many technical questions were asked. We spoke about my personal projects a bit and then for sometime about the technical assignment. It didn’t last very long, and the casualness of round two meant either very good or very bad news. Couple of days later, I received a call from the company and they had decided to offer me a job. I was happy. We negotiated on the offer a bit, and then I bought a day’s time to think. Not just think but I also had other interviews in progress that I had to close if I was going to take the offer up. Did that and I accepted LaughGuru’s offer. The offer date was not announced then, but I was okay with it. It was supposed to be, as some people described it, my last big vacation (which turned out to not be very true, or at least not as scary as it sounds). After the interview, I waited for another two months for the job to start. I used that time to explore my deeper interests, work on some good projects, read books about my newly found interest in cryptographic engineering and spend some good time at home in general.

Joining LaughGuru – Initial Impressions

My first day at LaughGuru was filled with mixed feelings. It wasn’t all scary as was my first day at Samagra. Back then, I didn’t know what was expected of me, and if I’ll be able to live up to the expectations of my mentors and friends. This time, there was no such feeling. I knew I was hired to write Javascript, build frontends, collaborate with an even more experienced developer and hence, I had a clear idea of what I had gotten myself into. I was not a hundred percent happy, and that was because of the sinking feeling of adulthood starting, that I was into frontend engineering which wasn’t a long term interest of mine (nor did I plan on making it that) and just plain dejection that the long vacation was over and I’ll no longer be able to spend time on the things that I wanted to. All of that aside, the day went okay, and they gave me company email accounts and added me to the comms channels. It felt good.

Since I had worked a bit before this, I couldn’t help but notice the contrasts in the way both the companies and their people operated. I missed the ‘hello’s and ‘good morning’s when people came into the office everyday wearing a wide smile, lunch sharing, office hangouts and town halls, a family like environment and a CEO who actually speaks to you and hears you. On the plus side, I was working in an actual ‘tech team’ with people who knew more about most things than me, although people weren’t into tech, I could have decent technical conversations, learn about patterns and best practices and more. The ‘working in a tech startup’ dream had become a reality and I was naturally happy about it.

Given that the company wasn’t very fast paced and our manager was very considerate about deadlines, the work load was very low. Due to that, I could do quite a few things on the side, read after coming back home and the weekends were entirely free (I only had to work during the weekends during my last couple of weeks). I managed to squeeze enough time to learn Haskell, build a nice speaker, write on this blog regularly, learn applied cryptography and implement algorithms, read books and travel to some extent (Jagriti Yatra was during this time). Another perks of working for LaughGuru (or any tech startup in general) is, you get paid decently well. And when you get paid well, you can buy time with it (I got myself a nice house close to the office to ease commute), or service some of your expensive hobbies and interests (a paid VPN and email provider, a fancy laptop, lots of paperback books etc).

Last 4 Months

So after the initial month’s dust settled and things started to become natural to me, I started to enjoy my job a lot more. The work that I did (mostly writing ReactJS and lots of CSS which I had recently picked up) had become second nature to me, and as a result I could put in more thought about what I was doing, why I was doing what I was doing, asking questions and learning things from a product and even business perspective rather than just the frontend or tech perspective which I did in the initial months. Along with the work part, I was also hanging out with my office friends, seeing and learning things outside of tech, hanging out at nice places and exchanging stories. Due to a weird turn of events, the frontend lead (whom I used to report) and Abhishek (my friend who had referred me to LaughGuru) had to leave the company. It was not a very happy time for me, for I was very close with both of these people and had become very comfortable with having them around. Guess it is part of being in a professional setting, people come and go.

Things were different after that, not necessarily better or worse. I was reporting directly to the manager (also the product guy). He gave me all the product ‘gyaan’ that he had accumulated over the years, we discussed tech during work and checked out other company’s products and borrowed inspiration from them. Since I was the only person on the frontend of our product, I had to put in some thinking before jumping into code, and that was a very important lesson that I knew I needed to learn. Towards the end of my time at LaughGuru, I was doing more thinking about how to implement a feature, the data flow, handling edge cases and basic optimization than I was actually coding. I had also simultaneously read the novel ‘The Mythical Man Month’ and was realizing its importance.

Our manager was a very smart guy and quite friendly. Another one of my colleagues, the person who took care of the content, had also become a good friend. I would really miss the nice lunch and coffee conversations with these two. Both of them were math, history and science nerds, and it was always fun to listen to them talk. I went to a star gazing session with one of them, and a mid night cycling event earlier in the year and it was very cool hanging out with them. Will definitely miss that as well.

Closing the LaughGuru Chapter

While the departure of my friends was heartbreaking, I had decided to continue my work on the awesome product that we were building, especially now that I was in total control of the codebase of the frontend. It was delightful to see the frontend take shape and become usable as each day passed. We were building a lot of new features, and I felt extremely proud to be able to deliver them end to end. It was similar to my time in Samagra where I would get to build the entire projects end to end, only here I was much more mature. Because of all of this, or maybe not because of it but because of my own sluggishness, my personal studies were taking a hit. I wasn’t making much progress in that direction.

It was sometime during March that I found the time I gave to my personal studies inadequate. I also had a very clear understanding that nows the time to experiment and risk it for a dream, and it will only get harder the longer I wait. Talking to some people and thinking thoroughly about this, I told my manager that I needed time to study and hence I’d be discontinuing (at least full time) with my role as an engineer at this organization. The discussions that followed lead to this day today and all of it sailed very smoothly. Last few weeks were very busy; vacating my rented flat, working to get the product in decent shape, the nostalgia of my amazing time spent here and the anticipation for a brighter future filled with happiness. I’ll be unemployed again soon, will look for a way to sustain myself but most importantly, do something that I’ll never get tired of doing. That’s the simple end goal here.

Good Experiences & Learnings

I think working with some very smart people has been the best part of the experience. It gives you a benchmark to look up to with regards to everything, from books to humor. You learn a lot in the everyday conversations, the occasional outings and the way they work. That was one thing I couldn’t do sitting at home (I would’ve anyway written code or learned a new technology, so that’s not something particular to LaughGuru). I read some really nice books and articles thanks to my colleagues. My understanding of tech products has matured a lot during the last couple of months, and I think this will come in handy for my personal projects.

One thing that I’m proud of learning in tech is CSS. This is genuinely something that I wouldn’t have learned if not for LaughGuru. As a result, I’m writing it here. CSS is already coming in handy at many places. From fixing random things on my blog, to the other websites that I manage, to even modifying some random theme’s stylesheets found on the Internet to suit my requirements. The CSS I wrote at LaughGuru was strictly mobile responsive, was interactive and used many of the newer CSS3 semantics. Now, because of that, writing a much simpler static blog’s CSS feels quite easy (not talking about this one. Obviously). Learning CSS, maybe not the most pleasant thing, was, in hindsight, a great investment of my time.

Before joining LaughGuru, I scored myself a solid 8 out of 10 for Javascript. But then, I learned so much more here, from service workers, caching, index DB, shadow dom, es6 and 7, abstraction for Javascript components (the OO way), the list goes on and on. Now I’ll hardly score myself a 6, because I’m pretty sure the more I dig, the more there will be to learn and it is in my best interest to stay modest, haha!

I’ve made some friends here. Not just here, but at every place I’ve interacted for the job, I made a conscious effort to be nice and likable (how well that went, I can’t tell), tech can come in second. I was horrible with my social skills in junior college. Things changed a bit in engineering, but I still was around a select few, not interacting much (if at all) with the rest of the class. This time, I made it a point to speak out honestly what I thought, and not just to the few friends. It has been successful so far, and no one has called me a weirdo yet. The Jagriti Yatra really helped me in this regard, and boasted my confidence on many fronts, most important of which was that even if you take the tech out of the conversation, I can still keep the chat going and not disseminate into silence.

Useful Lessons Learned

I’ve learned some lessons during my time here at LaughGuru, some of them the hard way. I’ll start with the one I personally felt very good after learning. It was about the way of the society. For the better part of teenage and until the end of engineering, I always did whatever I did with computers for myself, for the fun and satisfaction. Then suddenly, I got into this fast paced world of startups where your career came before anything and growing professionally was of prime importance; where you become your job description, and I became a React engineer. I had almost fallen for this, taken this to be what adulthood was meant to be. But I am so glad I was wrong. And I decided to again go back to the basics, to doing things that I enjoyed doing. I don’t know how this will turn out, but at least I’ll be happy.

I learned that one has to be smart, not academic but the street smart. While people in general are nice, occasionally you’ll find someone who’s just there to use you. And that is fine while you get a fair return (rewarded in some way), but not without that. There will be people who take the word ‘resource’ a bit too literally and act that way. The important bit for me was realizing that I’m dealing with such a person and taking control of the situation. It is funny how I’ve read about the paranoid mindset all the time in the infosec world, and it seems obvious there, but I had to ‘learn’ it separately when it came to people and the world outside computers.

I learned how powerful negativity is, and how important it is to distance oneself from such forces. Negativity around you is never healthy, and in a profession where your job is to think, plan and create, negativity is a disaster for productivity.

Things To Look Forward To

While LaughGuru was a great place to be at, there are some things I really look forward to for my next gig. First, given my interests, I’ll try to find a job at a place that understands and encourages free software, and that the work I’ll be doing will be open for the world to see. ‘Open Source’ started as just a word for me, then it quickly became an idea that I’d want to be part of sometime in the distant future, and now after working for a for-profit startup and writing proprietary code (which I honestly believe is a perfectly valid thing to do), I realized how integral had the idea of writing free software become to me. For this reason, I’ll try to find a place where I’ll fit ideologically just as well as technically and socially.

I look forward to working for an organization where the chief(s) officers are in touch with the employees and have conversations with them regularly. I feel this is important to the entire growth feedback loop, growth for the organization as well as the employee. This, unfortunately, never happened at LaughGuru. I saw the CEO for the first time three months into my time at his company and as far as I can remember, we never had a meaningful conversation during my time there. Maybe I could’ve tried more, or maybe I need to work on my communication skills more. I’m sure there must’ve been good reasons for that (the obvious one being I simply wasn’t important enough). Whatever might’ve been the reason, that’s past, and for the future I’ll see to it that I have a conversation with the chiefs of the organization before joining and get to know them (I realize that it isn’t feasible for even the slightly larger organizations, let alone the medium to big ones, but I think it is a good personal objective to have).

Money is the root of many evils that happen in an organization. Delayed salaries, pending bonuses, unmet commitments regarding finances and many such things lead to decay of trust between an employee and employer, however good the other relations are, and that is really unfortunate. One thing I’ve realized here is that speaking out the truth upfront rather than giving away excuse after excuse can save quite a few things to both the parties. Going out of business will inevitably happen to many, if not most companies. It is how the situation is handled by the employee and the employer that makes the difference. And I look forward to seeing better ways of that being done.

In Closing

There’s so much more to write, but one can never fully express eight good months of adventures, learning and building through a little blog post, can one? I hope you found this article interesting. If you have any comments, feel free to write them to me at my email address. Thank you for reading.

Lenovo Thinkpad T440 – Ebay Refurbished Laptop Review

Refurbishment is the distribution of products usually electronics and electricals that have been previously returned to a manufacturer or vendor for various reasons. Refurbished products are normally tested for functionality and defects before they are sold. – Wikipedia

I’ve not bought anything refurbished ever before, but then, I’d never needed to. It was after deciding to get myself a new laptop, given Misty’s faulty hinge, that I made a list of things to prioritize for in this upcoming purchase, and had to decide between a new machine and something used. That was when I learned refurbished was an option.

The Requirements

My modest requirements for the new machine were a result of the learnings from my previous computer buying experience. After using Misty for about 30 months, I’ve learnt a few things about my own behavior regarding laptops, and I decided to make use of that experience while listing down my own requirements, in order of priority.

  • Required: Sturdy built quality, something better than a flexing plastic body (Main problem with misty was the broken hinge that was plasticy)
  • Required: 8GB RAM – anything more is overkill
  • Required: SSD, SATA III or better, 128GB or more
  • Required: i3, Good to have: i5, 4th gen or better
  • Good to have: Total cost less than INR 25,000
  • Dream: Something better than a TFT 1366×768 display
  • Dream: Backlight keyboard

The Search

A quick search on Flipkart and Amazon made it clear that if I’m going to go for a new laptop, I’ll be paying at least INR 30,000 for something like a Dell or HP. Processor was the easiest to get, could squeeze in the 8GB ram part, SSD was out of sight for anything below 40k, and good quality display and backlight keyboard, I’m asking for a bit too much at the price point. That was that, and the search moved to Ebay, Olx and Quickr

Ebay was very welcoming for my requirements. There were a lot of sellers selling what they call ‘seller refurbished’ laptops. Theses machines supposedly came from the big corporations which gave away their old laptops in bulk. My friends working for a few MNCs here made it clear that they weren’t bluffing. My friends said that their companies used these same laptops but newer models. That made sense.

Giving up on Olx and Quickr (most laptops looked quite old and still expensive, and it was difficult to differentiate the quality listings from the shit ones), I concentrated my search on Ebay, chatting with all the sellers that had good reviews and ratings. That helped me separate the big sellers from the ones with just a few laptops to sell. Shortlisting a couple of sellers (Infotech Divya and Rent-O-PC were both top rated sellers and good with communication and had laptops in my budget, recommended) and making sure they had multiple models and versions of a given laptop series, I asked the sellers about the condition of the machines, learned about a metric called ‘grade’ of these laptops and that they were priced depending on the specs AND the grade, ‘A’ being the best, almost new, to ‘C’ with physical damage and major cracks.

Finally, talking to these sellers about my requirements also helped gather their opinion on what laptop was, in their opinion, the best for my needs. This process lasted for about a month (yes, I spent a good deal of time talking to these sellers, and then taking second opinions from my hardware nerd friends). The final list consisted of these following laptops with their major specs and approx price, all A grade.

  1. Lenovo T440 – i5, 8GB, 128GB, 14″ TFT 768p – INR 24.5k
  2. Lenovo T440 – i5, 8GB, 256GB, 14″ IPS HD+ Touch with backlight keyboard – INR 27.6k
  3. Lenovo X240 – i5, 8GB, 128GB, 12.5″ TFT 768p with backlight keyboard – INR 23.5k
  4. HP Elitebook 820 – i7, 16GB, 512GB SSD, 14″ Full HD Touch IPS with Backlight keyboard – INR 34.5k
  5. Lenovo X1 Carbon 2nd Gen – i7, 8GB, 240GB, 14″ 1440p IPS touch with backlight keyboard – INR 33.5k

Except for the HP, all are 4th gen Intel Haswell processors. The HP is a 5th gen i7. Too good to be true at 34.5k, right? But that would’ve been the definition of overkill right there. Hence HP was out. X1 carbon was very close to my heart, but it being a proper 1.3kg Macbook Air like profiled ultrabook, I feared that I wouldn’t be able to afford the repairs, nor will I be able to find spares for it, plus at that price, I had stretched my budget by almost 8k. Hence I ditched it. I did consider the X240 strongly for its smaller profile, but then feared it would be a bit too small. Some 10 youtube videos later, I decided it was a bit too small for almost the same price, plus it wasn’t as much upgradable. Finally left with the two Thinkpad T440s. The cheaper one would’ve been fine, but the delta and the difference in the features (larger SSD, touch screen, HD display and backlight keyboard vs INR 3k saving) was too small.

All things considered, I ordered the T440 with a touchscreen.

The Laptop

  • i5 4th Gen, 1.9 Ghz with turbo boost upto 2.9 Ghz
  • 8GB DDR3 memory
  • 240GB SSD
  • 14″ HD+ 1600×900 IPS touch screen
  • Backlight keyboard
  • 2 USB 3.0, VGA, mini Display, gigabit ethernet
  • HD webcam, a weird trackpad that can be pressed and has nice multi finger gesture support, mini keyboard
  • 1.8 Kgs, around 2″ thick










The laptop came two days after ordering in a properly packed box, much smaller than what I had expected, with Ebay branding and all that. Removing all the tape, inside there was my laptop in 3 layers of bubble wrap and an unwrapped Lenovo charger. The laptop looked flawless, not a single scratch or color fade. If it’d came out of a branded box, I wouldn’t have been able to tell it from brand new. It was that new. My excitements knew no bounds, for the build quality was nothing I had ever seen on a laptop. It felt hard and stiff, like a sheet of metal, better than the Macbook Air of my manager that I had always adored. It was amazing.

Upon opening it, I tried the keyboard. It was good. Nice key travel, click click sounds, nice touchpad and that red mouse-like functioning button. Overall, I was extremely happy with the initial impressions. I looked at the screen, and could see some decoloration, but decided to ignore it. Turned it on, there was a licensed Windows 8.1 or something (does it make a difference?). The touch was good, responsive, screen brightness was good and text was crisper than what I was used to, thanks to the bump in resolution from my previous laptop. Text felt a bit too small to my liking though.

Here’s a discovery. I had never planned on using the touch feature, and just got it as something that came for free with the other benefits. But to my surprise, I found myself surfing the web with the touch screen, clicking on links, scrolling, pinching and all those gestures that we’re used to doing on our phones. It was amazing. The laptop was snappy, quiet and overall near perfection.

I switched off the laptop, and again noticed the white tint (see image 9). What is it, I wondered. I connected the charger and that made things clear. It was some white light leaking from the LCD panel from the bottom that was causing the problem. My heart sank. This thing was almost perfect, almost. I whatsapp’d the seller who asked for a video of the problem. Upon submitting, he concluded that it was an actual issue, and gave me two options; 1. Ignore the issue and get a compensation for the damaged component, or 2. Get a replacement. I took replacement.

The replacement came 36 hours later in a similar but branding less box. There was 2 layers of bubble wrap and the laptop was in a similar but more worn condition. It was very identical to the first laptop but on a closer inspection, you could tell it was used (which, while obvious, wasn’t the case with the first laptop). I had my Arch linux usb stick ready, so I flashed the computer with Arch and XFCE but XFCE refused to work. I settled for GNOME and discovered that using GNOME was a much better, much pleasant experience with high res display and touch. Nice!

Everything after this point was a positive experience. I missed my full sized numeric keypad at times, but got used to this mini sized keyboard layout. And man, typing on this keyboard is an experience in itself. The webcam is HD, which I’m not sure if it will ever help but a good to have anyway. The backlight of the keyboard has brightness levels (I’m sorry if that’s a standard feature, just new to it) which is useful, and this laptop has two batteries, one external and one internal. Combined, they offer a usage time of around 6 hours (used laptops usually have less than half of the original battery life) which is adequate. Overall, if nothing else breaks in the next few days and there are no new issues, I’m extremely happy with this purchase, and would definitely opt for a refurbished laptop over a new one again.

Conclusion

I planned to make this more than a laptop review. This was a refurbished laptop review, which for many of you, like it was for me, is a very new thing. It was something I was very scared of, after all, 27,000 is a lot of money for anyone, and giving it to someone who has just promised you things is a risk to say the least. I hope to have given you some clarity regarding refurbished electronics, at least laptops. I’ve read some quite scary (to the extent of misleading) posts on Reddit about how sellers con people. While I’m sure there must’ve been cases of that, it is important to do your research and use some common sense. A seller who’s listing seems too good to be true is probably a lie. A seller who takes 24 hours to reply to your messages about enquiries will probably not bother replying at all after selling you the thing. A seller with just 10 review, all 5 stars and robotic feedback messages is probably a scam. Yes, it takes time to find the right sellers and the right product, but it is much better than buying the wrong or defective product. Spend that additional week researching your needs, talking to sellers and formally stating your requirements. You’ll save yourself a lot of money and time in the long run.

If all this seems too daunting, or if you think your time is worth more than the time spent on this (which is what I’m expecting half of you to be wondering at this point) then prefer buying the product new. It is perfectly reasonable to make that tradeoff plus you get a real warranty, absolutely new product, a branded box and peace of mind. In a parallel universe where I would’ve had a lot of money, a new laptop is what I’d have bought. On this one, I think refurbished is just fine. Thank you for reading!

Fujitsu Lifebook A514 Review (30 Months Later)

For the very few who followed this blog two and a half years ago, I wrote a review of the Fujitsu Lifebook A514 notebook computer I had bought back then. I called her Misty, after the character in Pokemon. Misty was my first laptop computer, something I had been dreaming of owning ever since my friend from school had demonstrated his Sony Vaio (a beautiful machine with 2 GB of ram and 250 GB of hard disk space for a staggering INR 80,000 price tag). To a 13 year old, a laptop was magical, especially the trackpad. You can just touch it and the cursor moved. Amazing.

So there was november of 2015, I ordered my Fujitsu, a brand I’d not heard before that moment. The only reason I had bought it was that it was the only laptop with 8 GB of RAM, decent processor, half a terabyte of hard disk for a price point of INR 21,000. I got an SSD separately and replaced the stock hard disk with that (this was a day after receiving her). Effectively, I had a laptop with lots of RAM and an SSD for less than INR 25,000 with a 500 GB 2.5″ drive to spare for other projects (remember my Raspberry Pi cloud setup?).

Debian was what it had for almost 20 months and Arch for the last 10, XFCE all along. The hardware resources were adequate and I almost never felt short on anything (except for maybe when I was working with VMs). The screen was ordinary, TFT panel with an anti reflecting matt finish, 768p and lots of flex. The keyboard was nice and feedback, although a bit spongy, was decent enough for a lot of typing (all articles on this blog after that point were written on that laptop, except for this one, which I’ll come to in a minute). The best bit about that laptop was that it never had any hardware problems, and was very reliable as a work and play laptop. In all of the 30 months, I only had to reinstall my OS twice, and one of them was intentional. In other words, the setup was stable (or maybe I was experimenting a lot less).

The review that I wrote for the laptop got somewhat popular, and my blog had started to list on first page for keywords like ‘Fujitsu review’, ‘Fujitsu lifebook’ and others. Naturally, there were a lot of queries in the form of comments and emails asking me how the laptop was doing, and this is the answer to that; Misty was fine until a month or two ago when the right side hinge started to loosen eventually giving up. Now Misty has become non-mobile because I never close her lid to not risk breaking the wires to the display and webcam. Overall, I feel that the laptop was a good investment, and not to forget, she’s still going strong, just not mobile anymore.

Learnings From Misty




Although I still believe that Misty was and is a very fine laptop, I realized that from a programmer’s perspective, the priority list while getting a new laptop has changed a bit, like for example, build quality and reliability matter more than the raw features. I’m now happy with a 4 year old processor and decent RAM, but the laptop has to be something I can rely on, that can take the jerks of Mumbai local train travel everyday but still keep working the way it is supposed to, battery life can be compromised, since I’m mostly at some or the other desk while working. It doesn’t have to be ultra light or ultra thin, but it has to be hackable, repairable and the spare parts have to be available in abundance, and 14 inches is more than enough for everything. This is what I’ve learnt after using my first laptop for 30 months, and I used this data to help myself with a new laptop that I’ll write about in the next post.

Also, a word about warranty. I did get a one year warranty with Misty, but there are absolutely no Fujitsu service centers around (the ones that exist are just outsourced local stores), and after warranty services are a big No. Given Fujitsu’s business facing nature, the services are extremely expensive and parts will cost you more than the laptop itself (the cost of a hinge replacement was quoted at around INR 13,500; ~60% the cost of the new laptop. That’s just Apple crazy). This was something I wanted to keep in mind. Either get a non fancy laptop that you or any laptop shop around the corner can repair, or get a laptop with extended warranty with service centers around.

In Closing

If you are interested in review of the new laptop, keep checking this blog or subscribe to the RSS feeds. I’ll write more about the decision making process and other things about the new purchase there. Thanks for reading.

Book Review – Sapiens By Yuval Noah Harari

The motivation for reading this book came during the Jagriti Yatra when I was recommended this book, not once or twice, but thrice during the 15 days by three independent people. I’d only heard about this book before that. So on returning, I made it a point to buy a paperback and read this book and see for myself what all the fuss it about. I wasn’t disappointed!

As the name suggests, the book is about us, humans (unless you’re a cat, in which case it is about your beloved owner). The author starts off by giving a description of what our species was like a hundred thousand years ago. From there, he describes the major events or changes, in his opinion, that shaped the world as we see it today. The book is divided into four major parts, namely; Cognitive revolution, Agricultural revolution, unification of humankind and Scientific revolution. Each part focuses on a change in the way of life of humans that carved the way things moved forward, until this very day. The main idea is that humans have learnt how to collaborate in large numbers by believing in a common ‘myth’, a concept that the author nicely explains with the example of Peugeot Company.

The book is really well written for a wide range of audience. If you have the slightest interest in historical events, pick this book up. If you have ever awed at the accomplishments of humans, telescopes in space, footsteps on Moon and on Everest top and deep down in the Mariana trench, give this book a shot. Love biology, or psychology or just reading about cultures? This book is for you. In short, the content is so widespread that it leaves you wondering how much must the author had researched to write this book.

One thing that you must consciously realize is that, if you leave out the first part, the next three contain huge amounts of opinions of the author. Initially, I made this small mistake of reading this book as a fact book, which my manager accurately pointed out, this book isn’t. This book is a novel (even the author mentions it), and not a history book, and as such, while most things are accurate, the inferences are author’s own and so are many other things. But that’s okay. You cannot possible fit in the entire human history in 450 odd pages, and hence there will be some subjectivity and biases (even history, for that matter, is biased based on who is recording the events), but on the whole, if you’re a person with an open mind, you’ll really appreciate the writing.

And there’s a lot to learn from even the author’s inferences. The entire book is like you taking a step away and zooming out on life. Why are things the way they are? Author tries to give you a reasonable perspective, based on historical evidence.

And it really widens your own thought horizon. Knowing about the lives of our ancestors, the hunters and foragers in the plains of Africa, then the farmers and all the dynasts and dictators, the wars and the discoveries, you inevitably question yourself, your priorities and the fundamental questions of life itself. It is as if, you knew many of these things only intuitively, but the author takes it a step further and explains them by joining the dots and drawing conclusions. Reading it from the author’s POV, understanding the ideas of liberalism and how it is very different from what Buddhism teaches, ideas of communism, of capitalism and the various religions that we identify ourselves with, is a good experience.

I’d highly recommend this book. An experience that you shouldn’t miss.

Phone Review – Nokia 105

But why a new phone?

Not many people buy a Nokia 105 for reviewing. I certainly didn’t. My Samsung phone had developed this weird syndrome that it would randomly decide not to let me hear the other person’s voice in a phone call. And while I was okay with something as minor as that, many of my friends and family members weren’t so much. I mean, it worked fine for 95% for the things, except for making a phone call, which I average at around 1-2 every day.

So after couple of months of this struggle, I decided that I had two options. Either fix the phone (which involved flashing stock rom, do some A-B testing and if it still doesn’t work, visit the service centre), which was a lot of work and may require money, or get a new phone just for calling, which was easy but definitely required money. After thinking for a bit, I went with this nice phone that I found on Amazon. The deal was in around INR 948, which felt decently cheap, so I bought it.

Review

In a nutshell: FM radio, a 3.5 mm headphone jack, torch, Micro USB connector for charging and a removable battery that lasts more than a week of normal usage.

I opened up the box and the phone instantly felt nice, something new, something interesting to look at, to start, to go through the menu. It was like the first time I went through an Android phone. Nowadays, everything is either Android and iOS, and there’s not much to look at in your colleague’s new phone. But this felt new. The phone doesn’t lag, and key-press to ready-for-operation time is negligible. They keypad is backlitted, and keys are soft to touch and takes some getting used to, not exactly my most preferred keyboard, but works fine for most things (which is just texting and dialing numbers, to be honest).

The display is QQVGA, which is quarter of a quarter of a VGA. For comparison, Apple Watch has 6.3 times more pixels on its screen than this phone. And just for the heck of it, Samsung’s current flagship phone, the Galaxy S9 has 222 times more pixels. Yes, two hundred and twenty two times. But here’s the thing, it more than works for most purposes. It has 4MB of RAM and 4MB of ROM. You can even play Snake on this thing. Isn’t that super cool?

It has a very dim torch too, but works fine and can be switched on from homescreen with a double click on the top arrow key. The features that set it apart from the many phones I’ve seen and tried in the recent times are the FM radio, 3.5 mm headphone jack and a week long battery life. In all honesty, I charged this phone last Sunday afternoon, and today is exactly a week since that. The battery indicator is still around 30-40%, and I’m certain it will last 2-3 more days. Isn’t that plain insane? The sizes of battery may have improved but so have the components that will drain it. And then suddenly you have a phone with a decent battery size (around 800mAh) but nothing to actually drain it and it feels like a phone from another planet. Thumbs up for that.

Conclusion

The phone is good, the quality is decent, most importantly, it just works. If you need a secondary phone that won’t die out in the middle of the day, this phone can take that spot. If you just want to get away from the habits of checking your social apps during commute, then you might consider using this as your primary phone and using that smart phone as an mp3 player cum ebook reader. It is a win win win; 1. You have a phone with amazing battery life. 2. You don’t get distracted and can finish reading that book without the urge of checking reddit/replying whatsapp. 3. Your smartphone’s battery life improves quite a bit without a SIM and data connection.

Thank you for reading

Book Review – The Mythical Man Month – Fred Brooks

Probably one of the highest recommended books in the software world, this isn’t your typical tutorial/guide/reference book on programming or software engineering. Rather, this book is a series of ideas, more or less independent, on large software projects.

I’ll have to admit that you should get some actual software development/management time under your belt before picking up this book, otherwise it is very difficult to make the right connections, which is very important given this is a book full of essays from the 70s software development era. Details might have gone outdated, and many other things won’t really work in today’s fast paced startups who live by the fail fast mantra. Nevertheless, the human aspect of software is very accurately depicted in the text. Why software projects are difficult to manage? Why does adding man power to an already late project only makes it ‘later’? Why is communication important? These are some of the interesting questions that the author addresses in the text with his opinions and experiences.

I won’t go into the content of the book, as I would never be able to do justice to it. If you’re looking for a short summary, refer the Wikipedia page for the book. Highly recommended if you’re a software developer and would like to read one of the rare kind of books in our field, a book on the human aspect of software engineering.

Myths About Frontend Engineering

I’ve met a lot of young programmers in the recent past. When I say young, I don’t mean by age or accumulated experience, because that way even I am young. I mean the people who’re starting out in the world of software development, putting their first few footprints in this virgin new land. I’ve noticed this one thing in particular, discomfort about working on the frontend of a web/hybrid application, writing Javascript and CSS.

And if I am completely honest, even I was amongst those people just about a year ago. I consider myself an accidental frontend engineer and now, having worked in that trade for the past 6 months, I feel I’m in a position of debunking some of the myths that I believed in before starting out, and probably help those of you who try to stay away from frontend engineering due to some of these undue fears.

Myth #1: CSS is difficult

This is something that I hear most often. People hate CSS because they feel it is hard/illogical/browser-dependant/just-trial-and-error/not-really-programming and more. In fact, none of that is true in modern browsers. Now since IE has died, and we have build tools for most of the things, any project using a modern build tool like webpack is a joy to work with. We have auto prefixers, polyfills and things that minimize the need for writing browser specific CSS. You spend less time wrestling with your tools and more time solving the actual problem of designing the interface.

Then there are CSS preprocessors that add loops, variables and control statements to vanilla CSS to make it more programming-like and easy to write/maintain. I’ve not been a huge fan of these, but is definitely something I’d want to checkout. There’s also this new shift in style of writing CSS in Javascript itself and there are libraries like styled components that assist you with that. While the correctness of this approach is arguable, I feel writing CSS wrapped in JS has it’s own advantages, something you can explore as well.

Myth #2: Javascript is broken

Here’s the thing. It is very easy to mess things up with Javascript, or any other forgiving language. And JS is right there at the top in the list of languages that are extremely forgiving, making it very easy to shoot yourself in the foot if you’re not careful. And apart from all of that, bashing JS is the part time hobby of half of the Internet, and while there may have been reasons to do that in the past, the current language specification is pretty good and useful. With the new ES6 and upcoming ES7 standard additions to the language, it is very much possible to write good quality tight code that is maintainable for years.

As the language does not enforce tightness upon you, much of the responsibility of not messing up the codebase falls on your shoulders. There are tonnes of libraries that assist you with immutable data structures, code linting to avoid common coercion bugs, following functional programming paradigms to enforce side-effect free code etc. Once you’re comfortable with these good practices, writing clean and maintainable code in JS feels just as natural as writing it in any other language.

Myth #3: There’s no logic in frontend

Again, this is totally not true. Your typical frontend these days has a lot of business logic thanks to the onset of single page applications. You have persistent storage on the frontend in the form of LocalStorage, you have indexDB for a client side database, you have service workers for hijacking API requests and servicing them right on the client, webworkers for additional computational needs, websockets for real time event based bidirectional communication, databases like CouchDB on the backend mated with PouchDB on the frontend which have nice syncing capabilities.

In short, there’s more to do on the frontend than ever, and most of these things involve solving tough challenges, both from an infrastructure and programming perspective, and needless to say, this is apart from the beautiful application that people will use, structured and styled in HTML and CSS respectively, that is also part of the frontend.

Myth #4: There’s no computer science in frontend

I’ve spent more time in my current work place not making new features but optimizing the ones that were inefficiently implemented. Computation/memory resources are very precious on the end user devices, given that the application has to run on a wide range of devices, and you cannot just assume what runs smoothly in your desktop browser on your 10 Mbits connection will run just as smoothly on that three generations old phone running a 1 Mbit connection. This particular thought process has embedded a mindset within me that makes me write side effect free functions, save data that comes to the application locally, avoid iterations, think about efficient data structures and about reducing any IO that might cause my application to slow down. If I don’t, then my beautiful application goes crashing down in old mobile browsers.

You don’t need to know computer science per se, and while you can get away with not knowing where a graph should be used or what tail recursion is in most case, knowing it only helps. And it definitely helps in optimization, if your application is particularly heavy and has to run on mobile phones. I recently fixed a bug that required knowledge of JS event loop and call stack (thanks Philip Roberts!) and I would’ve had a hard time figuring it out had I lacked this particular piece of knowledge. The point is, there’s always scope to apply your core knowledge no matter what your profile is.

Myth #5: Libraries/Frameworks on the frontend go extinct fast

It feels bad when a framework that you spent a lot of time learning goes out of active development. While that is surely the case with many frameworks/libraries in the Javascript land (new libraries are literally getting written ever other hour), some of the popular ones like React and Angular stay supported for years. And while that still is less compared to Django in Python or Qt in C++, these JS libraries are also relatively easy to pick up and master, requiring fraction of the effort it would take the same engineer to get that kind of confidence in Django. Adaptability is a critical programmer quality, and learning a new framework once every two years is not that bad a deal given how dynamic the frontend web development scene is.

Myth #6: The support tools are not mature

I used to argue that there are no good debuggers available for the frontend, that the IDEs are not that great, that CSS debugging is just trial and error and JS debugging is just console.logs all over the place. I was obviously wrong. Our tech lead demonstrated the use of node’s debugger which can be integrated into VS Code and WebStorm, setting breakpoints and analysing application state at that point. Then there’s Chrome’s own developer tools which has this performance tab that you can use to check which part of the code is slowing down the application. Using these tools will probably take up an article of their own, but the point is, like with anything else, you have to look around for new things if you want to master the art, otherwise you don’t learn anything new.

In Closing

I am convinced that frontend development is nothing less than any other form of software development, with its own set of challenges and perks, and if you have any deeper interests like core computer science, cyber security, distributed computing etc, you can learn those things separately and apply them here. There’s always scope for that, like in other developer profiles. Plus, in all the above points, we never mentioned the perks of being a frontend developer. Yes, it is an extremely rewarding profile. Just last week, I was showing off our web application to my mom. She was quite impressed. I went over all the pages, the search design and many other little things that I’m proud of, on my phone. Sometime during this, I noticed that I’m not connected to the Internet, and the application never made me feel like I wasn’t, thanks to the amazing browser side technologies like indexDB and service workers that make progressive web apps possible. Now even I was impressed, haha. Also, explaining your work to someone not from the tech background is simple, and ‘I create beautiful websites’ is a nice description of the kind of work you do, no matter what the audience is.

I don’t think an article can change anyone’s mind regarding frontend engineering, but at the least, if you were unfriendly towards frontend development, I hope to have given you some content to start considering frontend engineering as one of the profiles that you might want to someday work as.

Thank you for reading.

Hum Developers Kab Banenge?

I was sitting at my office desk as usual, besides the window enjoying the cool breeze of post 6 pm friday evening of a summer day, 7 floors in the sky, at our office. We’re now 2 regulars in the office, and while it does get a little boring at times, there are also times when I appreciate the silence, the sound of wind through the little window on my left, the occasional rattling of helicopters passing by. That desk and that window are really interesting, my gateway to a different world where I just sit 15 minutes at a stretch staring at a distant building, the lights on its terrace blinking harmoniously. The occasional helicopter, and the people inside of it. Where must they be heading? Are they appreciating the fact that they’re inside that bird that countless individuals like me adore from the ground. I don’t know.

And just like that, I get to think about my own self. My thoughts four and a half years ago, in the first year of my college. There was so much excitement of getting into computers formally, finally. Now I could actually read interesting stuff off the Internet all day long and call it studying, without raising my mum’s eyebrows. I had a friend with whom I could share my technical side, which wasn’t much then, to be honest. Programming was the new thing and we knew we needed to learn this wizardry. Why and how we never thought of. There wasn’t a lot of knowledge within, not even speaking of wisdom, startups were unheard of, and life’s goals were defined in terms of what to learn next and ‘let’s see if we can solve this interesting puzzle with code’. It just was this raw energy that we had then, a kind of purity towards learning, the way opposite magnetic poles attract; no stray intentions.

It always brings a smile on my face thinking of those days. That purity towards the thing that you love, not asking why or if it will help me figure things out in the ‘big picture’ or will it look good on my portfolio, just that desire to go do it, to learn that absurd thing that has been obsolete for half a decade; why, because why not. I clearly, very clearly remember the happiness I felt after learning enough C to write basic programs, enough Python to flaunt my first ‘full stack’ web application. I learnt much later what full stack was, and even later that it was a job title. It was nice being able to make those things. We did whatever we thought was cool at that moment, anything that would tickle our curiosity.

In the midst of all of this, there was always a question I remember asking myself and my friend: ‘Hum developers kab banenge?’ All we knew was that a ‘software developer’ gets paid to do the kind of things that we do as hobbies. We had seen in total one software developer by then. He was Asa Dotzler from Mozilla. He was a nice person, but then we saw him as God because he could write code, you know. We kept on asking the question, but then sometime later, we stopped. Life got busy, everyone dashed towards their personal goals, the bigger picture and all that adulthood stuff. Suddenly, all of us were identified as developers, got hired as software engineers and started working for a monthly paycheck.

We were there before we even knew we were, and things aren’t much different on this side of the fence. Only now, you have to work whether or not you feel like working, your hobbies come in secondary to your professional goals and your life starts to revolve around this weird hierarchy of going from bottom of this growth ladder towards the top, occasionally changing the ladder. I guess that was all part of the package that we never bothered to explore properly. Or perhaps all of this is the optional bit that we took because everyone else was taking it, and maybe, with some courage we can get rid of this extra weight slowing us down and be those balls of raw energy that we were in college, being the ‘developers’ that we always wanted to be. I don’t know which one it is, but I guess we’ll eventually find out.

Thank you for reading.

Recommended: Career Advice – Moxie Marlinspike

Home

I’ve not stayed away from home during college to experience the hostel life, so I never learnt what it was like to go back home after a long time, the ‘ghar ja raha hu’ feeling. What makes one house our home and the other just a place we live in. Why do we get attached to some walls and a roof more than the others that we stay in. What makes some immaterial things more dear to us than others. I was randomly wondering about these little things in the past couple of weeks. Why?

Around 3 months ago, I moved away from home, to this new place. It eased my commute to work. But it was still just a place away from home where I was residing, paying rent in return, not really home. How does one turn such a shelter into something we call home? What makes a home? From my experience so far at this place, the memories are what gives everything a personal touch. Four walls and a roof don’t make a place home. The people visiting you, the moments lived in it, both good and bad, are what creates memories out of nothing. These memories get tied to these four walls. The way data gets tied to a unique entity via a foreign key, our memories get tied to a place, time, to people, to emotions. That’s why college is special. Not for what you gain there, but it is a place for many of our most memorable events.

I had my college friends come over yesterday. There was a lot of chaos as one would expect with a bunch of loud people packed into my little apartment. There were jokes, laughter, swearing, music, planning, silence and lots of other things that we associate with life. Similarly, I have my parents over today. My life becomes very comfortable when Mom and Dad come over as I get good food and snacks right in my hands all day long. Not something I’m very proud of, before you point it out.

Once you have regular visitors to your place, you try to keep it decently clean, organized and keep essential food handy. It isn’t just a place you reside any more, it is your home. You take care of it the same way you care for your real home. You wear a smile when you leave the house, you greet the neighbours and the security guard. Slowly, the brain starts to think of it as that comfy place you go to after a tiring day, home.

I miss my real home, but not as much as I would have if I had not accepted this as my second home. Mom asked me yesterday, ‘What will you do after the contract for this house expires?’, and I didn’t have an answer. Sometimes, things feel so permanent that we don’t think about being without them, and then suddenly, just at the thought of having to let something go, you realize the amount of love you have for it. That finally brings me to this thing of getting attached to non living things. ‘How could you name your things?’ I get asked for personifying my laptop, my car and many other things that are dear to me. I haven’t got the slightest regret for my affection towards these ‘things’, after all, they’ve made me, just like the real people have.

Thank you for reading.