Skip to main content

Posts

Testing React loader with React Testing Library

 I have came across this situation so many times where I need to write a unit test for a component pattern I have developed so many times that I can write the code with my eyes closed. BUT what about unit testing! That's something my mind thought is the best candidate to get rid of in order to store more cat memes. Even when these patterns are used almost everywhere and we write the tests for each one of them (I hope you do) but still we (it can't be just me) tend to forget them and get even more confused with those pesky `act` warnings. So I decided to curate a recipe book for some common unit tests which I come across and might be useful for future me. Happy to share the github repo and also would love to see if anyone has more such common unit testing patterns which they can add or suggest. https://github.com/Charchit26/react-testing-library-recipes Now, let's talk about the one I have coded a dozen times and still take half an hour to struggle with its unit tests - Load
Recent posts

Recipe for chaos in an XP team

Our team failed! We failed in delivering value to the client, value to our users as well as we failed in showing the benefits of XP - eXtreme Programming to not only other teams but our managers as well. So here I am listing some of the factors which I think lead to the fall of the project, the practices and eventually the team itself. We were quite fine an year ago. We used to pair, practice TDD, interview users frequently and release awesome features to production almost weekly. I would not go to the extent of saying we were living in perfect times, since we faced some very common problems - Some people felt that TDD made them slow. Management kept questioning whether pair programming is really "fast enough" and not slowing us down. This gave birth to some "Duct Tape Programmers" in the team. (That's a real term! Google it.) "The Duct Tape Programmer is someone who is able to cobble together software that solves the immediate problem, but witho

Re-usability vs Readability

Recently while developing some features for a client's React app I faced this dilemma: What to prefer over another - Readability or Re-usability. My first reaction to it was what any other great developer in the history of web applications would have done - "Google it out". I found some good articles and blogs around it but still I had my doubts, since at many such places the examples used were heavily dependent on the individual's situation. So, my next move was to consult a peer or another dev from the community whom I trust, and who is better to trust then random people on twitter! I would admit that I did not expect some of those answers but it really taught me one most important thing in software development - "Everything is situational". In other words, I was introduced to "anti-patterns" in real life! Good read for the difference between patterns and anti-patterns . <*Insert a funny gif related to anti-patterns here(if you find one

Pair Programming - Is it really effective??

So, I have been working in a "strict" pair programming environment for about 5 months now and this is the first project of my career in which I have been subjected to sit with another person for the whole 8-9 hours of the day while I (or he) codes. Also I have been pairing remotely for half of those days (half of our team is at onshore). I learnt these practices and principles while working with another vendor for the same client in Sydney, Australia. Hence, I thought it will be a good idea to share my thoughts and experiences as well as point down the things which otherwise I have to re-iterate over and over for every person looking for advice from me before starting with this practice. Note: All the points that will be mentioned here going forward are from my own personal experience and specific to the project I worked in. Though I think most of the dev community who has worked in this setup would second my opinion. What is "pair programming"? Yo

Convert your browser to a notepad!!

Remember the time when you were working your way into the deep layers of the internet trying to find something... And you found something really interesting? You just wanted to save that piece for later and continue on your journey for now, isn't it? Though tools or extensions like "pocket" come really handy in such cases, but what if that's your office laptop or may be a friend's? Or you do n't want to spend time logging in to your pocket or evernote web account. You open a n otepad (Your friend is already judging you).  What if I tell you there's another way (may be better as well) to save that info. Just type in the URL in a new tab: "data:text/html, <html contenteditable>" and hit Enter. Now you can type whatever you want in the browser window, isn't this cool? You can save the page as .html so that you can see and even edit it later. Now no need to search for and open a notepad when you are in middle of something impor

Send Anonymous Mails!

Ever thought of a mischievous act like sending a mail with  a fake identity or using someone else's identity?? Sure, if you have that naughty prankster hidden in you! So there are ACTUALLY two common sites which may help you in such pranks.. They are... 1: http://www.sendanonymousemail.net/ Its got a pretty easy and user-friendly interface which makes it so special.. 2:   https://emkei.cz/ It can be considered as the advanced version for sending fake mails.. Its got a good variety of options for "geeks" as well as an html editor for cutomizing the mails! But Do Remember that  these tools would let you   send anonymous emails   free of cost   and let you be  hidden   at the same time, but they Do store your IP addresses, just in case your anonymous email indulges in illegal activities! So, Do NOT even try to send scary threats or spam like messages because you may get caught very easily and can be charged with fraudulent charges and can be pu