Better Console Debug in Javascript
When debugging an object in Javascript, you usually do something like: console.log(myObject); Or even: console.debug(myObject); ...
When debugging an object in Javascript, you usually do something like: console.log(myObject); Or even: console.debug(myObject); ...
After some years working as a software developer in different companies I have used many programs and utilities in *nix environments that I’d like to share. This is not an exhaustive tutorial about how to get the most of them, many options will be just ignored and I will list only how I use them on a daily basis. Text processing I use these utilities to get info from a log or to quickly change a config file on a server. ...
In Scala you can’t declare class methods, all the methods defined in a class belong to the object. ...
Scala has a powerful pattern matching mechanism, that we can think of a kind of “switch” if we come from another programming language, but it’s much more powerful and I’d love to explore some of its options here. A simple switch in Scala would look like this: a match { case 1 => "One" case 2 => "Two" case _ => "Whatever" } In this case we have cases with 1 and 2, and if something else is matched then we return “Whatever”. But this is really simple, let’s make it more complex matching with types too. ...
I’ve worked on some Scala projects recently using SBT (Scala Building Tool) and every time I had a change in a file I needed to go to SBT and type compile until I found a simple instruction to keep it compiling for me. Just execute SBT and run the following command: ~ compile Now every time you save a file it will be compiled automatically. In the official documentation you can see more details. ...