Blog Archive
Jest Is No Longer My Go-To Testing Framework
In the tech world, Jest is the go-to testing framework for many projects. It's easy to set up, integrates nicely with your codebase, and can get the job done pretty well. That's also the reason why all the project starter templates I have created have Jest baked into it, with other auxiliary libraries such as jest-mock-extended to make mocking services for unit tests (UTs) a breeze. But, as our test-suites started to grow in different projects, people started to complain about how long it takes for tests to run. The issue is exacerbated by the fact that the projects also have `husky` installed, and as part of the pre-commit routine, it runs at least the UTs and some integration tests. In essence, Jest was getting the job done, but it was behaving like a reluctant teenager asked to do chores.
Read Post
Democra-Tech Dilemma
On one fine morning, the 20 or so members of a newborn startup called DemocraTech Systems (fictional) gathered to discuss one thing: their choice of a free project management tool. The need comes after Trello, their current choice for managing projects and tasks, announced that it will be limiting its free workspaces to 10 members. As a growing startup, DemocraTech tries to maximize utility so that it can focus their currently limited resources on building actual products and offer its engineers cutting edge tools required for core development activities. After much debate and fact-exchange, the choices were narrowed down to two: Linear and ClickUp. In the spirit of inclusivity, a poll was created where everyone could cast their votes till the end of the day. The next day, however, everyone came back to discover a particularly unsettling outcome.
Read Post
VSCode Extensions for Productivity
VSCode is one of the most popular code editors these days, offering multiple language support and the ability to transform into a full fledged interactive development environment (IDE) by using extensions. Here are a few extensions that will likely boost your productivity when using VSCode.
Read Post
How to NOT debug your programs
When working on software, bugs are something that any developer will inevitably come across. As a result, it is critical that the methods of finding and fixing bugs should be well understood and implemented. However, there are a few wrong ways of going about it, which either defeats the purpose of debugging or makes it take more time than it should have required in the first place.
Read Post
How to setup a GraphQL server in Next.js with API endpoints using TypeScript, type-graphql and apollo-server-micro
I have been learning GraphQL for a while now, and I love Next.js for the benefits it comes with. So, one morning, I decided to try and combine the two and see if I can make it work. The journey was not as smooth as I expected it to be, so I decided to document my approach.
Read Post
(Part 2) How to configure social authentication in a Next.js + Next-Auth + Django Rest Framework application
This is the second part of a two-part series where I show you a way to connect your Django Rest Framework backend with a Next.js + Next-Auth app. Building on top of the previous article, I go over topics such as automated refreshing of access tokens and discussing the pitfalls of useSession() hook (as of Apr 30, 2021).
Read Post
(Part 1) How to configure social authentication in a Next.js + Next-Auth + Django Rest Framework application
Authentication has always been a gigantic pain in the you-know-where, at least for me. I come from a Node.js, Express.js background, where I used passport.js to handle authentication schemes. I started learning Django and Django Rest Framework (DRF). However, Django (and DRF, for that matter) does a lot of heavy lifting behind the scenes, which is why it seems quite perplexing (again, most likely only to me) to do many things. I want to know the answer to the following: "Is it possible to use a Next.js frontend with Next-Auth for the authentication, but at the same time have a separate backend (in my case, DRF) so that I can essentially have the best of both worlds in my web application?"
Read Post