NLog logger in .NET Project : Tutorial

Recently, I was working on an enterprise project using Windows Forms and needed a logger that was thread-safe, allowed both structured and text based logging and provided an options to integrate email sending as well. Two options came standard NLog or log4Net. Had a brief look at both. log4Net looked like more of XML configuration. […]

Tips for making reusable React components

Tip 1: props.children const Picture = (props) => { return ( <div> <img src={props.src}/> {props.children} </div> ) } render () { return ( <div className=’container’> <Picture key={} src={picture.src}> //what is placed here is passed as props.children </Picture> </div> ) } Instead of invoking the component with a self-closing tag <Picture /> if you invoke it will full opening […]

Generator Functions in Javascript

We will be building on what we discussed in previous post generator-functions-using-co Here we will focus on how to implement something analogous to co. i.e. actually implement an iterable. How to run the function* Steps involved in running through a generator function. If its a bit confusing, it will be clear when we look at the […]

Generator Functions using co

Generator functions are a concept lifted likely from Python where they are used heavily in applications like web-crawlers. There are no prerequisites to this article but if you had an idea about Python generators, its the exact same concept implemented in Javascript. Definition Generators are functions which can be exited and later re-entered. Their context […]