What should and should not be tested in unit tests?

I have written about F.I.R.S.T principles of testing and TDD as a school of thought Probably an extreme opinion, but this is how Jeff Atwood puts it I Pity The Fool Who Doesn’t Write Unit Tests But what should you test? This I generally try to follow Test the common case of everything you can. This will tell you when that code breaks after you make some change (which is, in my opinion, the single greatest benefit of automated unit testing). Test the edge cases of a few unusually complex code that you think will probably have errors. Whenever you find a bug, write a test case to cover it before fixing it Add edge-case tests to less critical code whenever someone has time to kill. This will not only help you deliver and release faster, but will also make you more confident about your own codebase. ...

March 13, 2019 · 2 min · Tasdik Rahman

Test-driven development as a school of thought

Software is eating the world, and so is the world of software development constantly changing. One way of developing a project would involve analysts figuring out the business requirements and sit for a few weeks if not months these requirements would be given out to the architects who would in case break the problem down into manageable chunks the chunks themselves would be then given out to the teams which would be the delivering the specific modules. Nothing, but a typical waterfall model scenario, coming with it’s obvious pros and cons. ...

February 8, 2019 · 3 min · Tasdik Rahman

Moving Canary deployments on AWS using ELB to kubernetes using Traefik

Canary deployment pattern is very similar to Blue green deployments, where you are deploying a certain version of your application to a subset of your application servers. If everything is alright and you have tested out that everything is working fine, you route a certain percentage of your users to those application servers and gradually keep increasing the traffic till a full rollout is achieved. One of the many reasons to do this can be to test a certain feature out with a percentage of users who use your service. This can be further extended to enabling a service to users of a particular demographic. ...

October 25, 2018 · 6 min · Tasdik Rahman

Monoliths are just fine

A lot of great material has already been written out there around what microservices are and what they are not. What I would try putting down here is what I saw as we grew from a monolith to a microservices architecture over the period of time back here at Razorpay. Please take it with a grain of salt when you read this as this is going to be opinionated. Microservices are something which you grow into, not something you start with ...

October 24, 2018 · 7 min · Tasdik Rahman

Pillars of Observability

Haven’t written around for much of this year, hope it changes going down to the end of this year. This year has been very fruitful in terms of learnings and I can’t wait to share what I have learned. This post would basically be an introduction to what I have understood by the term of observability into your infrastructure and the services which are hosted on top of it. There are 3 pillars of observability: ...

October 1, 2018 · 5 min · Tasdik Rahman

Trip to Taiwan, 2017

Dum Chai had become one of my favorites, thanks to the after work-hour chill time with colleagues. That day being no different, we were in our usual routine. But I was in for a surprise. I was getting my VISA finally after much hassles that day. All the mindless haggling and tireless procedures with the paperwork which I had to run through at the last moment. Oh man, that was something. ...

October 7, 2017 · 11 min · Tasdik Rahman

GSoC 2017 with oVirt - Ending Notes

Start of Coding Period This was also the time when I started my first contributions to oVirt. I surely remember getting just started with Ansible which was to be used in the project with oVirt. Lukas was very patient to help me with understanding the parts which would be used by me in the project and was very patient in every step. Right from the application period of March, 2017. Every week has been a new learning experience for me. ...

September 3, 2017 · 3 min · Tasdik Rahman

Second Phase - GSoC, work on 3 VM setup of oVirt installation

It has been a week since the Phase 2 results are out. And we proceed to the last and final Phase of the GSoC. I couldn’t blog regularly in the last phase due to many reasons, which I want to change this Phase. But anyhow, this was collectively the output of my work in Phase 2 Setup This approach will follow a 3 box VM setup. For clarity sake, the VM’s can be assumed for now as ...

July 30, 2017 · 12 min · Tasdik Rahman

Week 3 and 4, GSoC 2017 - dozens of cloud vm's, ansibling, finding bugs, testing

At last I have got a hold of IRC’s and I declare my love for irssi. The combination of tmux and irssi is a boon for me. I tried different clients like weechat,Epic but I found irssi to be more appealing, quite frankly use any of these two if you are looking for something using which you can chat on irc’s on the terminal. My current installation of irssi is there on my VPC hosted on linode. For logging my chat’s and conversations, I have setup logrotate daemon to log the channels and private chats in their respective directories. ...

June 28, 2017 · 20 min · Tasdik Rahman

Week 1 and 2, GSoC 2017 - Travel, Code, Good food

So it’s quite some time since I wrote a thing or two about the things which I have doing over the last 2 weeks. This month has been a roller coaster ride if you ask me. Many reasons to it. Some being that I travelled to PyCon Taiwan which marked my first international trip and also my first PyCon talk. Got my uni results. Fingers crossed but heck. I scored a perfect 10 in the last sem! The final version of trumporate’s UI is almost done and me and Rituraj have to just put some final touches to (blogpost for the whole development process is pending. You can find the first one here) ...

June 13, 2017 · 9 min · Tasdik Rahman