Posts

Test driven development in ReactJS

 Suppose you are developing a large website/mobile app and your task is way too complex. Under these circumstances Test driven development can help in controlling complexity. It gives developers breathing space. It lets them keep code bug free from the ground up. You would not believe it but most people get burnouts from developing software if they aren't adopting TDD. So how do you do Test Driven Development? TDD for short is by writing a test case before you write even one line of code. Naturally the test case will fail initially. This gives the developer some breathing space, some respite of having written something like a test case no matter if the code that is going to be tested is unwritten as yet!!!. Now I am going to show a component that I wrote following an article on the internet that spoke of TDD. import   React   from   'react' ; export   default   class   MyComponent   extends   React . Component  {      handleUpdate ( event ) {          this . setState ({  in

ReactJS is cool

I have not yet explored ReactJS that well. It has just been a few years since I started working on it with only little real exposure. Why do I say ReactJS is Cool? This virtual DOM diffing and updation is way sexier than earlier methods of replacing the entire DOM. I am yet to learn new technologies that seem promising like Svelte.js, Next.js and Vue.js I read that state management in reactjs has two options 1. Redux-Saga 2. Redux-Thunk Other advantage of reactjs is a lot of ways of testing that make complex web app development easy. I have many things to say on react testing and would post most of the projects that I have done in a repo for everyone to learn from.

HTTP then HTML then WWW then CSS+JS and then comes Hell

(4 min Read) TLDR; Internet Programming is getting better  I never liked AJAX or JQuery. I will elaborate why in a while. But first lets retrace the history of internet technologies the way they evolved. Tim Berners Lee thought about a great web that would connect all systems in the world and people could move from one link to another. He used a simple protocol that exchanged information as files. He envisoned a world wide web where files would move from servers to clients(hosts) which displayed these HTML files in web browsers.      The protocol that would help in the exchange of these files was called hypertext transfer protocol. The information displayed in a browser was to be formatted and arranged across the screen. This needed setting attributes of html elements. These attributes were to be applied to some/all of the html elements that were specified in the Cascaded Style Sheets.    Then came the problem of animation and changing properties of some html elements when certai