JavaScript WTF #2: the this keyword (part 1)
Java language specification defines “this” keyword in one sentence. EcmaScript 6 definition of “this” is about a page of pseudo-code spread over several paragraphs, and there is a good reason […]
Java language specification defines “this” keyword in one sentence. EcmaScript 6 definition of “this” is about a page of pseudo-code spread over several paragraphs, and there is a good reason […]
TL;DR When building a Visual Studio solution on a build server, make sure that directory C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework contains reference assemblies for ALL .NET versions targeted by your projects. […]
Consider the following code: Why is it false? Because Foo.prototype is in fact not the prototype of Foo, but the prototype of objects created via expression new Foo(): As for […]
The forth place in the JavaScript WTF competition goes to the amazingly large number of ways to represent lack of value. Most C-like languages have keyword null that means “no […]
In the last few days I did some formal reading and informal experimenting with EcmaScript6, and compiled the list of its most annoying “features”. The fifth place goes to complete […]
I was playing with some Javascript in Visual Studio, and I found that it gets annoyingly reformatted every time I end a statement or a block. Visual Studio formatting options […]
I was installing some web stuff using npm, and noticed that it takes a lot of time on my home computer compared to my work computer. It turned out that […]
I thought that JavaScript arrow functions are just a shorthand notation for regular functions. I was wrong, and I found it the hard way. Arrow function treat ‘this’ keyword differently. […]
Here’s the scenario: the folder named “secure” contains sensitive data and should be protected by user name and password. To redirect all HTTP requests to HTTPS and enforce basic authentication […]
Just found this in production code: var fa = new FileAsset { Hash = tempFile.Hash, Length = tempFile.Length, CreatedOn = DateTime.UtcNow, Data = tempFile.Data, CompressedLength = tempFile.Length, Name = tempFile.FileName, […]