Posts

How to surf the web to find motivating and insightful content

  “Wow! This was so cool!” my friend says. “ How do you even find these things ?” I tell him that I got it from the newsletter of <so-and-so> website where people post interesting stuff. And the next question goes, “Well, but how did you find out about the <so-and-so> website?” And then I end up telling him about this person on Twitter whom I follow and how she tweets interesting things and how she is SO cool. “Okay but how did you find out about this person?” … And every time, the conversation comes to an abrupt end either because my friend stops asking further questions at the risk of seeming too dumb (and ends up giving me an unsatisfactory “Oh Wow” reaction) or because I fail to remember the exact source (and end up telling something along the lines of — “I just found it while… hmm… browsing on the Internet”). What I also want to say is that these cool webpages/people that I come across can come to anyone. But that sounds like patronizing. Not helpful. And I want to...

An introduction to test-driven development with Vue.js

Image
  Test-driven development (TDD) is a process where  you write tests before you write the associated code . You first write a test that describes an expected behavior, and you run it, ensuring it fails. Then, you write the dumbest, most straightforward code you can to make the test pass. Finally, you refactor the code to make it right. And you repeat all the steps for each test until you’re done. This approach has many advantages. First,  it forces you to think before you code . It’s commonplace to rush into writing code before establishing what it should do. This practice leads to wasting time and writing complicated code. With TDD, any new piece of code requires a test first, so you have no choice but take the time to define what this code should do before you write it. Secondly,  it ensures you write unit tests . Starting with the code often leads to writing incomplete tests, or even no tests at all. Such a practice usually happens as a result of not having precise...