RReal Immutable Types With TypeScript
When writing TypeScript there's a pretty easy, simple solution to create immutable objects and it doesn't involve adding third-party libraries.There! There you go, that's all that you need.Before I…
When writing TypeScript there's a pretty easy, simple solution to create immutable objects and it doesn't involve adding third-party libraries.There! There you go, that's all that you need.Before I…
TypeScript is a language that is moving forward really fast and sometimes is hard to keep up with it, there are so many features being released constantly, that we may be missing some really important…
Working with the possibility of null in any language that allows it, sucks. It's tedious, and there's boilerplate code involved, it's not fun and error prone.Luckily for those who write C#, there's a…
When you first start looking into functional programming, you hear a lot of scary terms such as functors, monads, monoids, lift, fold, etc. Some of those things are sort of complicated to understand…
Not long ago I wrote a post on how to setup testing using Mocha, Chai, Karma, Webpack, Sinon and TypeScript and although this is something I still use today, using karma and Webpack might be an…
Composition is a nice way of reusing existing functions to create new ones. Each of those functions will act on some data that is passed by as an argument, transforming it and then returning it so…
There has been a lot of buzz around functional programming lately, sure enough I was catch by the buzz, and here I am sharing some of what I have learned. I won't talk about anything new here, in fact…
Linters are an excellent way to enforce some structure and to help avoid errors. If you have never used a linter, you're missing on a set of great tools that will assist your team to write better code…
There are a lot of React components available on-line, and if you're using TypeScript with React, it can't sometimes be a little disappointing because many of those components don't have their type…
If you're new to TypeScript and have never worked with a language such as C#, generics might be something strange to you.But fear not, generics are not that complicated, and we're going to see in a…
Since version 3 of NUnit, it is possible to run tests in parallel. And if you can turn this feature on, you should. The implementation is simple, and you will probably notice a considerable…
Promises are a great way of doing async programming. But testing with promises can be a bit cumbersome, even with the use of the arrow functions syntax.Recently I've found a small and nice package to…
Promises are an excellent way of making asynchronous calls, and they're most definitely an improvement over working with only callbacks. Take the following example, calling a URL that returns a movie…
Sometimes in our field putting together the pieces of the puzzle is a hard task, especially with the always moving forward nature of open source software.So here's how I managed to setup a testing…
I don't know about you, but when I'm coding, I like to keep my hands on the keyboard. I find that reaching for the mouse is disrupting and breaks the flow.So I like my shortcuts. I don't know all of…
I work with Microsoft technologies in my day job. I do a lot of ASP.NET MVC related stuff, and I wanted to use React with my ASP.NET MVC application, but I wanted to have a nice development experience…
Update: I have also recorded a video about classes, if you want to watch it in addition to reading this post.JavaScript has always been an object-oriented language. It never had a class definition…
There are a few new features related to strings in ES2015. They're easy to learn and they allow for a more clean code.In ES15, some new methods were added to the String object. For instance, now there…
Destructuring is a new feature in ES2015 which allows us to declare or assign values to variables. It's a very powerful way of doing that. It might sound a little confusing at first, but it really is…
In ES2015 there's a new way to declare variables, it's the let keyword which declares a block scope variable. Block scope variable? What does that mean exactly?Update: I have also recorded a video…
So, last June, the TC39 Committee{:target="_blank"} made EcmaScript 6 a standard. EcmaScript is the official name of the JavaScript language and the new standard is also known as ES6.This is already…
Many people who complain about JavaScript does not take the minimum effort to understand the language and for most of the time, the code developed is not treated as a real code, after all, "it's just…
ASP.NET MVC 3 has a great feature, which is client validation using jQuery plug-in's jQuery validations and using a Microsoft script the validation is made without the need of any other special code…