Let’s Talk About The Disadvantages Of Living Close To Work

My recent post was about finally getting a permanent flat in Berlin, especially one within walking distance of my workplace, which must’ve been a dream of many. It certainly was one of mine. Coming from Mumbai, where a commute of an hour or two is no biggie, Berlin has been a pleasant surprise.

None of my commute here has been more than 30 minutes one side, and the current one is 12 minutes walk, 7 on bike. My one day’s commute distance in Mumbai would now be equal to 3.75 working months, or roughly 75 days of commute here in Berlin (of course, I took a train, but you get the idea). But that’s also partly because I travelled an insane distance from home to work back in Mumbai.

So while everything sounds all sunshine, I could see some disadvantages of this setting after living here for three weeks. A thing to note here, before we get into the fun stuff, is that when I say disadvantages and problems, I say that in a purely first world problems sense. It really is a privilege to even have such problems, and no, this is in no way comparable to the struggle of trying to push your body inside an overcrowded Mumbai local train on Ghatkoper station at 8 in the evening after a tiring workday.

So, having taken care of the internal guilt, let’s get started.

No time to read

My college commute was a good 90 minutes in a single direction. And I was lucky because I’d just get in the train, grab a good seat and start reading. It would either be a physical book or a PDF in my phone. That’s the best part of having long commutes. It is so boring that you don’t need to tell yourself to read, it just happens.

Now, my days are exactly of the same length and I am working for roughly the same number of hours. But I have no idea where those extra hours that I’d spend in trains went. They say gas molecules take up all the space available to them. Guess that’s true of work and time as well. I’m barely left with time to read, and when I do, I don’t (unless I force myself, which isn’t the best long term strategy).

Fewer food options

When you live at one place, and work at the other, you essentially have two different worlds. So during the week, you go to one set of restaurants, and over the weekend, you’re free to try the other set. But when you live so close, you end up going to the same places even during the weekends. It is just a weird feeling to be walking the same paths and going to the same places to eat that you would during the weekdays with your colleagues.

No alternate mode of transport

Living at all the other places, I would have the default option of taking the subway. Sometimes, I’d take one of those rented bikes. Occasionally, when the day is good, I’d just walk. Now, it is just walk or bike, which, while not a terrible thing, doesn’t leave much room for variation. There’s no place in between work and home where you’d just stop by to grab a bite, or a river where you’d spend ten minutes just looking at the boats passing. It’s just Home > Work > Home.

Less motivation to WFH

There used to be good reasons to work from home. I could save commute time, have different food options and probably go to a park in the evening. Now, not much time saved and I end up eating at the same place.

More frequently late to work

I always knew this would be the case, even back in college. The people who were super late to classes were the ones who lived the closest. I can feel the same happening to me now. I find it more difficult to reach the office at a particular time than when I used to commute by subway. During college, since I took the same train everyday, I’d reach perfectly at the time I had planned (unless the trains messed it up, which wasn’t unusual). I guess even this is more of a discipline issue which I need to fix.

In closing

If I sounded like a spoilt teenager in this post, that’s probably fair. If you find a place to live close to your workplace, take it by all means. It is worth it, and will be a good test of discipline and time management for you. Plus, not having to take public transport or having a place to grab a bite on my way from work, I manage to save good money.

Finally, working full time and reaching home at 5 in the evening is a dream for a tech worker. It is like you have another day after you get back. I use mine to learn a new language, which is only feasible in a setting like mine. I hope you found this article fun to read, that’s what I meant it to be.

Thank you for reading.

HTML For Semantics, CSS For Visual

The best way to learn is to teach, they say. I totally agree, and that’s one reason I have so many articles on my blog explaining random topics. Part of the goal was always to understand the topic better myself.

I got reminded of it while I was preparing for a workshop on introduction to web technologies for my fellow Berliners who wish to get into tech. Then something interesting happened. I found the root of a problem that I was struggling with for some time at work. I will jot down some notes of this entire experience, and try to tell you about the lessons learned.

Our Styleguide

We maintain a frontend styleguide (think: company-specific UI library). We have many HTML elements and CSS classes that make our text, buttons and cards look the way we want them to look across the webapps. There’s a little issue. Most textual styles are defined on HTML elements. So to get a large heading styled with our predefined font-size, font-family, color and a bunch of other styles, one would just use h1 (notice: no class needed).

This worked for us until now, and wherever a big heading was required, we would just throw in an h1. Similarly for paragraphs, lists and other textual elements. This made a lot of sense in the past as accessibility or SEO weren’t a concern. But things changed.

Multiple h1s

It all started when our contracted SEO agency told us that we had two h1s on a page. We looked at the page, and it made total sense. There were two ‘headings’ of super large size, and our styleguide’s h1 made total sense from a purely visual perspective. But the second heading was just a title in large font. It had no semantic significance. Now, our product’s main title and some random text have the same precedence on the page.

This is bad for SEO, no doubt, but this is also bad for screen readers and all mini browsers (like Apple Watch and the like) which rely on the HTML to convey semantic information, and not visual.

Thinking and problem solving

I went to our designers and had a discussion. I could just hack and overwrite the styles, but that wasn’t the point. I asked what could be done. We could change the design, create a new class the resembles heading-1s and then use that on a span and so on. But we couldn’t think of why we’ve met with this problem. Maybe we’re missing something, something obvious, we thought.

Conference on web basics

I attended a developer conference a couple of weeks ago. There we had the good fortune of listening to Hakun Lie and Bruce Lawson. What struck me, apart from how much they cared about web standards and saving the web from the bloat hell that we’re hurtling towards, is how much one can accomplish just by sticking to web standards. One of the examples used was of the Apple Watch, and the website in question was developed much before anyone imagined a browser on your wrist. If one just uses semantic HTML, one can be sure that their website would work on any device, whether in existence or yet to arrive. And just like that, millions of well-designed websites started to work on the special Apple Watch browser.

This is important to note because there are usually multiple ways of doing something on the web. More often than not, there are a couple of right and many wrong ways. Part of our job as web developers is to ensure that our website isn’t just pretty visually but also correct semantically and structurally. This is to futureproof our creation.

The workshop

I was preparing for this workshop and thinking of various ways I could introduce web development to complete beginners. I referred to some nice articles and tried to understand the meaning of HTML and CSS myself. I tried to understand why reset.css and normalize.css are used, even though I’ve been using them for years. I came up with interesting analogies to explain the basic pillars of the web and as a result, improved my understanding of these constructs.

Lightbulb moment

After the workshop, when I went back to my codebase, I could see the problem staring right back at me. We had styled the HTML elements, and not created separate classes that we could then attach to our elements. This is the result of forgetting the basics and doing something the wrong way because it saves you from writing class="" for every HTML element, which to be fair, doesn’t seem that bad when you don’t differentiate between HTML and CSS and use a combination of the two to get the design right.

Conclusion

There are a couple of conclusions for me from this article. One is to learn and follow web standards. Semantic HTML is not at all hard, just some 120 tags in total. Then, understand what a markup language means, and how the semantics of a document is different from how it looks or works. Learn the rules of CSS selectors and how cascading works. Learn that HTML and CSS are declarative, and use them as much as possible. Only where it makes sense, introduce Javascript. In general, keep abstractions to a minimum.

Thank you for reading.

Berlin Flat Search Experience

I arrived in Berlin some six months ago. From that point until now, I have lived in three different parts of the city and I’ve finally found my permanent nest in the fourth one. I want to share some things about this entire journey, from my Airbnb to this flat, and retrospect some interesting experiences and observations I had along the way.

So yes, that’s four moving-ins that we’re talking about in the span of 6 months. Four times I had to pack, carry, unpack, repack my 40-ish kg mini-world. To be honest, I didn’t quite enjoy any of the shifting experience at all, possibly because I was doing it using public transport and possibly because those aren’t enjoyable experiences in general.

That said, I really loved all of those flats and their respective neighborhoods. Berlin has many colors, and you only see them when you live in its different districts. We’ll get into some of those later on in this post, but first let’s start with the search process itself.

https://en.wikipedia.org/wiki/Boroughs_and_neighborhoods_of_Berlin

Search methodologies

In Berlin, there’s a shortage of apartments to live in, and an abundance of people on the hunt for one. It is almost like searching for a job. You show up for viewings at the time decided by the owner of the flat. First thing you notice is, especially if it is a half decent flat, there are a dozen more people wishing to get the same flat. The owners (or people appointed by them) judge if you can be the ideal tenant (based on many things, not the least of which are your payslips and SCHUFA scores). After the viewing, you go home and wish you get accepted by the almig…umm the landlord. Repeat this several times a day for a couple of months.

I just couldn’t stand this entire process. I went for a couple of listings, but gave up. Too much work. For that reason, all of the previous apartments I’ve lived in were some sort of referral homes. And that’s one big reason it took me so long.

Getting over previous flats

What I found surprising was how quickly I got over the previous flats, even though while living there I really wanted to make them my own. Every apartment, except for the first one, was handed over to me with some dangling hope that it would be signed over to me. And I would really get attached to the apartment, only to later find out that due to so and so reason, I won’t be getting it. While that’s heartbreaking in the moment, it was interesting to retrospect on how adaptive our brains are. Couple of days after moving in, I would just forget about the previous place and start over again.

Starting over again was a very typical process; finding a nearby supermarket, finding restaurants, exploring the area for parks and places of interest during the weekends. A week later, everything is in autopilot; from commuting to work to refilling groceries. Also interesting is how cryptic a new place seems in terms of streets and direction, but a month later I could really get around the neighborhood without even thinking. Yet another proof of the power of repetition.

Amenities and flat size

I was searching for a flat for myself. I preferred to not live in a shared flat (or a WG – Wohngemeinschaft as it is called in German). An important thing to note is that many flats come empty, that is, without any fittings. Not even a kitchen is fitted. I wanted a somewhat furnished flat as that made more sense economically. Furnishing usually involves a bed, cabinet, fitted kitchen with fridge and other kitchen stuff, washer. Dishwasher in rare cases. That’s more than sufficient to get started.

Flat sizes are measured in square meters (1 sqm is 10.something sq feet). They usually have one or two rooms (zimmers in German, excluding kitchen and bathroom). The flats in my budget were quite diverse, from 25 sqm one room to 65 sqm 2.5 room ones depending on the neighborhood and public transportation options. I decided to deprioritize size and focus on furnishing in the flat and being close to work and city center.

Neighborhoods

This is my favorite part of the search: Being able to experience different neighborhoods. As I mentioned, Berlin offers many shades of itself if you move to different districts in the city. The people change, and so does the food and the way the buildings look. I was fortunate enough to live in both east and west Berlin. Over the past six months, I lived in Friedrichshain, Kreuzberg, Mitte-Prenzlauerberg and now Mitte.

Friedrichshain was the first. Where I lived, it was very silent. Not many stores or restaurants. It was an ideal place to live once you’ve been in the hustle and bustle of the city for years. For me, it was a bit depressing, especially after coming from India. I didn’t explore much of it, but now that I’ve spent sometime here, I can see it had a lot of options for food and other stuff.

Bergmannkiez – Kreuzberg was next. This is a fancy area, very touristy but still good to live in. Very diverse crowd with many cultures living together. There is this street called Bergmannstrasse that had great food options. Tempelhof airfield was nearby and this was the time I got into outdoor activities and hanging out with my colleagues and their friends. There are nice Biergartens (Beer gardens) that people go to to meet friends and play indoor games. Tempelhofer Feld is still my favourite place in Berlin.

Just go there on a weekend, lay in the grass and read a book or something

Third was Mitte-Prenzlauerberg area. This is a upmarket locality with nice cafes and cake places. I didn’t quite like the food there (think bland food, loads of salad and sprouts. In short, way too healthy) but I liked the neighborhood and people in general. This was also on the same street as Mauer Park where I’d spend a lot of time over the weekends.

Fourth and current place is in the heart of Mitte, literally meaning center in German. Nothing special, but very center. Around a kilometer from Alexanderplatz and my office. Now I can reach work in less than 10 minutes, which is nice. Coincidentally, this is almost exactly in the middle of all the previous places and I can go to all of my favorite parks and snack bars from the previous places easily. As a bonus, I can see the Fernsehturm right from my living room!

The window is my gateway to daydreaming, especially when it turns dark. Reminds me of my desk at LaughGuru in Mumbai. As you can tell from the LEDs and candles, I try hard to make my house look pretty.

Learnings

If I had to start over again, I’d do a couple of things differently. I’d probably put in a bit more effort into the hunt as opposed to completely relying on connections all the time (which is fine, but seriously limits the scope of your search). Facebook groups and sites like ebay-kleinanzeigen.de are good places to search, and much less commercialized compared to immobilienscout24 where each listing has dozens of takers.

But when you think about it, how else would I have gotten the experience of living in those many different areas right after coming here, within six months. Back when I used to look at Berlin’s map, I would wonder how long it would take to have a general intuition of where everything was, the way I had for Mumbai. This entire apartment search debacle fast forwarded this process and I know parts of the city that I’d have otherwise not known.

In closing

While writing this post, I realized that by wishing for things to work out well right away, we actually miss out on a lot of interesting experiences. Was it inconvenient to miss the connecting flight and luggage on my way to Berlin or not finding an apartment for six months straight? No doubt it was. But looking back at those experiences, would I trade them for a smoother ride? definitely not.

Have a good week ahead and thank you for reading!

What’s In A Domain? 5th Anniversary Of Blog

While there’s nothing specific I plan on writing in this post, I’ll share a few things as they come to my mind. 6th of June, 2014 was the day I bought this domain. I must admit, I was a bit embarrassed to have my name in the domain but I quickly got over that.

Image from 8th June, 2014 ♥ 5 years with Cloudflare

Those were the times when I was learning about programming, friendships and college life in general. This is from one of the outings to Mumbai from college.

I want to believe that our cameras weren’t so bad back then. Probably just over-editing

I also started writing on Ghost.io, before moving to Blogger and then Jekyll. Here’s a screenshot of the first post (which is now lost).

If being super embarrassed by your past self a good indicator of progress, I think I’m doing pretty well

And I also liked showing off my stuff, whatever little I had back then. I used to borrow laptops and computers from friends and would try to set up ‘testing labs’ in my bedroom. Most of such labs would end up being used for playing NFS Most Wanted. One of my favorite showoffs was showing off code or terminals.

One such labs from back in May 2014. Obsession with GNU was real, especially the cooler distros in infosec like Backtrack (now Kali).

Good times. It is nice to have this blog and bits of data here and there from the past, otherwise it is easy to forget these little memories.

Whether this is the first article that you read on my blog, or you’ve been following from some time, I must thank you. You’re as much part of the blog as the content itself, and I have not a shred of doubt when I say that this blog has been one of the most worthwhile investments I’ve made in my life so far.

See you in the next one!

The Worst By Moxie

It is no secret that I’m a huge fan of this guy. For my first snippet, I’d like to put down a few quotes from one of my favorite articles of his.

Often, I browse shopping sites like Amazon for no reason, looking at exotic gadgets and accessories, convincing myself I need them. Slowly, I am convinced and they end up in my cart, staring back at me. During such an impulse, I open this particular article and give it a read. It helps cure that temporary surge of materialism. I highly recommend you read “The Worst” by Moxie Marlinspike.

…an emphasis on the consumption of material goods can easily translate into a life of generalized consumption. A whole language can start to develop around not just the consumption of goods, but the consumption of experience: “We did Prague.” “We did Barcelona.”

“The best moments of my life, I never want to live again.”

…no matter how much research they do, a partisan of the best might not ever know as much about motorcycles as the partisan of the worst who takes a series of hare-brained cross-country motorcycle trips on a bike that barely runs, and ends up learning a ton about how to fix their constantly breaking bike along the way.

The basic premise of the worst is that both ideas and material possessions should be tools that serve us, rather than things we live in service to. When that relationship with material possessions is inverted, such that we end up living in service to them, the result is consumerism. When that relationship with ideas is inverted, the result is ideology or religion.

Thank you for reading!

Be Easy On Yourself

I have been fortunate enough to have worked alongside some very smart and kind people in all the companies that I’ve been part of. And in all those people, I always noticed a common element. You instantaneously have an appreciation for how wise they are from the way they talk about random things, the way they think. It almost makes me wonder, especially as a computer nerd, what did they do to get a thought process like that?

And to clarify, I’m not just talking about software engineers. I’m talking about managers; product, marketing and people from other domains. So this isn’t a bias for people good with code. They might not have been the best in their respective domains, but it didn’t seem to matter. They were all super pleasant to be around and working with them was always a joy.

Initially, that was weird for me. How can someone be so good at what they do and not be super famous? Why are they not millionaires or working in, I don’t know, Google or something? I remember thinking about all these things, but not knowing the reason. Now, after gaining some maturity and finding a lot of time to just pause and ponder over such questions, I think I have some possible answers.

Ever since I was a kid, I was fed this idea of what a successful person is supposed to be like. He’s rich, he’s famous, he’s smart. He can afford whatever he wants, has a big house, lives life without any struggles and works for a large corporation as an executive. If you want to be called successful in life, you ought to become like him. I’d imagine many of the children brought up in cultures and societal structures like mine had the same idea of what success looks like.

So when I got out of this environment and met people who felt like they were doing well in their lives on the whole; are happy doing what they do, are influencing and making a difference in the lives of people around them and so on, my trained mind had internal conflicts. On one hand, it felt like they’re pretty successful and happy with what they do. On the other, my definition of a successful person didn’t seem to match them. What was happening?

It was simple. Just as we sometimes accept a very specific definition of health, intellectual or creativity, and regard anything that deviates from this definition as disabled, dummy or mundane, I had this one definition of successful and everything other than that was just a compromise at best.

But I was massively wrong. It had to be wrong all along. We’re all different, and trying to fit everyone under one umbrella was doomed to be a failed generalization. There are as many ways of being successful as there are humans and ways to be alive, and each one of us can define it for ourselves what that means for us. From drawing doodles to collecting rocks, only you can judge if you’re successful. This isn’t to undervalue those of us who work super hard and are actually successful in my old, partial definition of success. This is to broaden the definition, my definition, to accommodate all the variations we see in life around us and appreciate it all.

The world isn’t a level playing field. Just like in video games, the game of life can be played on easy, medium or difficult setting. Unlike in the video games, you don’t get to choose it. Some people are playing the same game as you at a very different difficulty level, and there’s not much that can be done about it. The least we can do, is not make it even crazier.

In closing

I’m very glad about this shift in my perspective over the past half a year or so. This serves multiple purposes.

  • One, I am more open to exploring and appreciating the ideas of fun, weekends, vacations and in general living a good life from the perspectives of people who’ve been brought up very differently than I was.
  • Two, I don’t lock myself in this tunnel-visioned world view that just because someone is not a senior-something by the time they reach a particular age, they’re not ambitious, talented, smart or whatever.
  • Three, I get to experience a lot of new, wonderful aspects of life that I never knew existed; laying in the grass and feeling warm sunlight on your skin, running a marathon, skateboarding, gifting, making people smile and laugh, and being grateful for little things in life.
  • Four, I detach the concept of a person’s value from the money they’re making. It changes a whole lot, and makes me look at people around myself in a completely new light. A light which emphasizes on someone’s skills, values and thoughts over their paychecks and job titles.
  • And five, it makes me more empathetic in my daily life while talking to someone who’s not like me.

To close this essay, I’d like to come back to the title of this post. Take it a little easy, little slowly. You’re in a car driving on a never ending road that meets the horizon in the distance. Keep an eye out for where you’re heading, but make sure you don’t miss the scenes on the sides, for those are real. What lies at the horizon might not.

Cheers, and thank you for reading!

Search On Jekyll Blogs

Static site generators are great. No fuss, pure purpose. I use Jekyll because that’s what Github supports the best. But these days, with services like Netlify, you have many options. This site aggregates the top ones, so give it a look if you’re planning on setting up one for yourself.

staticgen.com is a nice website to find a static site generator right for you

One thing that’s tricky with static site generators is search functionality. Since there’s no backend, whatever you plan on searching has to be generated the same way other content is. Often, that means iterating over all posts and creating a json file which you can fetch in the frontend and do offline search.

While that works, it doesn’t give you full content search (if you include content in that json blob, it will grow in size and get slower with each new post). But full content search is exactly what you need at times. I needed content search, and I spent sometime researching the options that exist. Below, I’ll list a couple of them, not necessarily only the ones that offer full content search but each suited to some specific use case.

Netlify Functions

Netlify has managed cloud functions thingy (serverless) and it works on top of AWS Lambda. It is very simple to write a function with netlify, and when you push your code, the functions are deployed as well. It comes with a free tier which runs on a 128mb instance. Pretty low, and would time out in 10 seconds if you give it a lot of work.

Netlify picks functions from a directory and pushes them to aws internally. Now, we need our json file to be present in Netlify lambdas directory before the push happens. We can make use of a simple node module Front Matter that would take our _posts directory and return a nice json with frontmatter and body parsed. Then we take this json and write it to a file which we can then import from our lambda function.

Now, for the search function, we can use something like FlexSearch that does offline searching. Just that we’ll use it in the lambda.

And you should update your build command in netlify’s netlify.toml file (or web interface) to run the node script before the jekyll build step.

  $ npm run create-json && jekyll build

Keep in mind that the free tier is very low-duty. Try to strip down content by filtering stopwords and doing other optimizations.

On the frontend, you make a GET request with query parameter q to this endpoint like you would with a regular backend search.

Algolia (or any search as a service)

I’d start with stating why Algolia didn’t fit very well for my use case. Their record (think each individual post text plus metadata) size limit is 10kb, so if your content is frequently more than that, and you want it to be searchable, Algolia might not be the best for you. But if you don’t need full content search, or if you write little posts that are usually less than 10kb, it might be a good option to look into.

Essentially, you create a searchable index on Algolia (simply upload a json file or use their jekyll-algolia gem), and use their client side libraries to query this index. They have a nice and simple web interface to do it manually or just use a script to automate it via their APIs.

Like mentioned before, you can implement a two step deploy process to Algolia that removes stopwords and duplicate words from the text before pushing the index. That way you can still fit the record in 10kb.

AWS Lambda

Netlify search uses AWS Lambda internally, but netlify only offers a couple of tiers ($0, $25 and a custom plan for $500 paying customers). On the other hand, AWS has a wide variety of lambda instance sizes and charge per usage which makes it super cheap.

What you lose in this case (compared to Netlify functions) is that you have to set up the CI pipeline yourself from scratch. So no automated pushing of the functions along with your static site. If you have a lot of searches, or heavy search queries, AWS Lambda is the way to go. For very simple and light weight use cases, Netlify isn’t a bad choice. Note that Netlify also deploys to AWS, so your function will work on either service with little to no modifications.

ElasticSearch

This is a complex solution when compared to the others on this list. Essentially you create a simple app on, say Heroku with a simple GET and POST interface. You can pair this app with a free Bonsai ElasticSearch instance. The POST will push data to this instance and GET will fetch search results.

The middleware Heroku app is to simple prevent our Bonsai credentials from getting into the wild. I didn’t think this was a good solution for simple use cases because of the maintenance factor. The reason we use Jekyll (or any static site generator) is to keep things simple, and this search solution is hard to sell to people like us.

In closing

As I found out, there are many ways of implementing a good search feature on a Jekyll (or any statically generated site). I’ve left out details of the implementation as I couldn’t find time to do so but what I learned was that just knowing that these options exist helps a lot. So the next time I’m thinking, “hmm, I’d like to have a search here, but not sure how to handle the logistics that come with it”, I’d already have a few options!

Thank you for reading.

Experiences With Macbook And MacOS

It has been quite some time since I had last used a computer that would connect to the Wifi and Bluetooth out of the box without having me to scream at my computer screen and rip some hair. But that changed when I got my work laptop. It is a Macbook Pro. I was very excited to unbox my first ever Apple product, even though I was never keen on buying one myself (or could afford one, for that matter).

The two devices

There were some surprises, both pleasant and otherwise. This post is going to be about those, about how I felt switching from GNU/Linux based distros to the MacOS, from a Thinkpad to Macbook. Note that one is a four year old second hand laptop, while the other is more recent and hence, not an entirely fair comparison for absolute things like specs. Also the Macbook costs about five times of what I paid for the Thinkpad. These are very personal experiences and hence, biased opinions. YMMV.

Similarities

Both are excellent machines running excellent operating systems. If you want to get some work done, you couldn’t go wrong with either (and mostly depends on how familiar you are with each). Both are faster than anything I have used in the past. Software support is good on either. Both feel very durable (I can only vouch for the Thinkpad, but I’ve seen people use Macbooks for years too). And finally, both are considered ‘work’ laptops marketed towards professionals.

Where The Macbook Shines

1. Display

Compare the resolutions

The display is easily the best part of using a Macbook on a daily basis. Text is crisp, colors pop out of the screen and the resolution is out of this world. For comparison, the 27in monitor that I have as a secondary display has fewer pixels. Working on it is a joy, especially as a frontend developer.

2. Build Quality & Bulk

I used to think my Thinkpad was sleek and light, but the Mac is on another level. I can casually hold it in one hand and walk. There’s no flex anywhere, and the whole thing feels very solid and well built.

3. Trackpad

It is nice to get gesture-support out of the box for once. I tried doing it for the Thinkpad on Xfce, but that attempt failed miserably. The trackpad on the Macbook is huge. It has two levels of clicking for added functionality (I use the dictionary/reference look-up often). It supports many phone-touchscreen-like functions like pinch-to-zoom and is very refined.

4. Battery Life

Again something that I had never experienced before, a super long battery life. I have all the battery optimizations disabled and never stop the dev servers and IDEs, but I still easily get through half the day without having to connect the charger.

5. Speakers

In terms of absolute quality, I don’t know where the speakers on the Macbook Pro stand. For me, they’re hands down the best laptop speakers I have ever experienced. Loud and clear.

What I Miss From The Thinkpad

1. Ruggedness

While the Macbook is premium and rich, if I had to pick a more durable laptop, I’d pick the Thinkpad. I’d never use the Macbook as carelessly as I do my Thinkpad, especially considering the economic consequences.

2. Keyboard

I tried to get used to the new keyboard, and I did. But whenever I go back and use my Thinkpad, I immediately realize why it is called the best in the business. Perfect click-iness, key travel and key shape. Typing is a joy on the Thinkpad.

3. I/O

Nothing new here, but it sucks to need a dongle just to be able to connect a USB drive or read an SD card (yes, I still use those regularly). HDMI for secondary display? Need a fancy cable for that. VGA? You from the past, bro?

All I’m trying to say is, I’d rather have too many options at the cost of elegance than too few at the cost of functionality.

4. Operating System

It is hard to make a non-biased pick, but I’d still choose Arch and Xfce over MacOS. Many little things from years of using Linux distros have spoilt me; OS updates made me happy, but not anymore with Mac. Constant bugging to reboot just to update the OS? Don’t remember that from Arch. Aur (Arch User Repository) had everything in terms of software that you’d (almost) ever need, and I miss that.

It is also just the customizability an OS offers. The community that surrounds the laptop and the operating system (Have you checked out ArchWiki yet?).

5. Repair Costs

Thankfully, I’ve never had to repair either of them (I’d not have to do that for the Macbook anyway since it is a company device), but I felt the need to add this point here for fairness. Thinkpad parts are available in abundance on the internet, and you can do most repair on your own if you know how to use a screwdriver. A quick search for Thinkpad T440’s motherboard on ebay pops up results in the 50$ – 150$ range depending on the configuration. An equivalent for Macbook goes around 600$ – 800$.

In closing

As you can tell, there’s no clear winner here, even for me personally. I genuinely think the hardware of Apple is top notch and now kind of understand why many developers use Macbooks.

On the other hand, my heart still lies in the simplistic plains of Xfce, the ease of everyday operations, confidence to open the back cover and do minor repairs and the joy of just understanding what’s on the system. Of course, as things progress, maybe the Mac ways will become second nature to me and I’ll have a better understanding of this new system, which is nice.

It will be interesting to see how my thoughts shape from here. Cheers and thanks for reading.

Doing More With Jekyll – CloudCannon And Netlify

I’ve been using Jekyll for the past couple of years now. I started this blog on Ghost, but soon moved it to Blogger. Later, I discovered that I could simply use Github Pages for hosting my static site. For someone coming from shared PHP based hostings like 000webhost and what not, this was unreal. I moved to Github Pages and have been using Jekyll since then.

I always liked Jekyll for the simplicity, no-nonsense setup and complete control over what gets served to the visitors. Plus given the nice Github integration, no sysadmin and total control over the content, it is just perfect for personal blogging and simple static sites.

But what I recently learned was that the land of static sites isn’t all dry. There are some nice tools that one can use to enhance their experience with Jekyll. In this article, I’ll be talking about two such tools that I discovered recently and found interesting: CloudCannon CMS and Netlify’s Split Testing

CloudCannon

CloudCannon is an online CMS for Jekyll sites. If you have ever used a CMS like WordPress or Joomla, CloudCannon would feel right home. If not, think of it like having a Google Docs-like interface for editing your site (as opposed to writing HTML or Markdown). It is more limited than your traditional CMSs in the sense that you cannot install plugins or change the appearance of your site from the panel (you can, but then you’ll have to code that logic yourself into the app and use flags in the frontmatter to selectively display component). But again, since you’re using a static site generator, you probably don’t plan on having a lot of plugins anyway.

CloudCannon home

The interface is simple. You get a WYSIWYG editor, and a sidebar with all the frontmatter fields. Interestingly, you can name the frontmatter fields in a way that CloudCannon recognizes to get more from the CMS. For example, if your field name ends in _html, CloudCannon will make it a WYSIWYG field. Same goes for _time, _image and many others (find them in the docs).

Post content view with frontmatter variables in sidebar
Post source view

The advanced configuration options includes free SSL, CDN, hosting, backups and authentication. You might not need it (I use Cloudflare which gives free SSL and CDN, and Github for hosting and backups), but good to have. One complaint I had with CloudCannon was that if a site build failed, CloudCannon wouldn’t abort the deploy. It will deploy the failed build and your site would go offline until you revert. I just hope there’s a setting for that somewhere, but that it isn’t turned on by default is worrying enough. So for now, I’d rather just use CloudCannon for CMS and host my site someplace else.

CloudCannon is free for single user sites and syncs well with Github. It sits in a sweet spot between a bloated CMS and simplistic static site generator, and enhances your productivity as a content creator while letting you keep all the control over what gets served to your readers.

Netlify – Split Testing

Netlify is a static site hosting service. I like it because of the few but very useful tools they provide. You can host your Jekyll site on Netlify, and it supports Node and Ruby-based build tools (so you can use grunt/webpack for your SPA apps). For quickly hosting a nice website with some frontend framework (say a ReactJS app), Netlify is great (although I’ve seen it used in production as well).

Netlify provides a rich set of configuration options, including functions, forms and authentication mechanisms. What I really found interesting was their split-testing beta feature. So what is split or A/B testing, you might ask?

If you want to test two versions of your website and see which one do your users prefer (in terms of a goal that can be anything like time spent on your website or product sales), A/B testing can be a good way to do it statistically.

Netlify Split Testing

In a nutshell, you create different branches with different code and then use a nice slider to adjust the percentage of traffic that would go to each branch. This feature is still in beta, and the split test turns itself off whenever any branch is pushed (which, I was told, is a known bug). A cookie gets set on the client side which can tell you what variant it is, so you can bake some logic around that to get stats and such.

In closing

I was pretty excited to find these interesting tools built around our humble Jekyll. If you are a Jekyll user, I’d love to hear about your workflows. I’m planning to bake a little asset pipeline on my blog soon, so any tips for that are welcome!

Thank you for reading.