Like countless other developers, I decided to monkey-patch console.log to implement the logger of our Angular application. You may or may not like this approach, but it worked flawlessly. The first time it broke was when we deployed it to production today. What had happened?
Monkey patching is modifying a third-party class. It’s a great tool, coming in handy all the time. Only it’s frowned upon by the experienced programmers. Should you adopt or abandon monkey patching? Let’s have a look at some useful applications of monkey patching first.
One of the first feature requests of TypeScript was the Elvis operator. More precisely, the null-safe navigation operator. That’s a variant of the “dot” operator allowing you to access attributes and methods even if the object preceding the dot is null or undefined. In most languages implementing the Elvis operator, the expression null.firstName simply returns […]
npm doesn’t like to be fenced in by a corporate firewall. Too bad most npm installations live precisely there. The other day, I ran an npm install on the customer’s PC. The same command that finishes in 40 seconds on my machine took roughly a quarter of an hour. Plus several hours of troubleshooting. It […]
They announced Vue.js to me saying “It’s like Angular, only they did it right this time”. I don’t think there’s anything wrong with Angular, so my curiosity was piqued, and the stakes were high. What does Vue.js better than Angular? So I spend two afternoons playing around with Vue.js. First impressions Before starting to dig […]
Recently, I’ve seen a number of surveys covering the popularity of Java and Java UI frameworks. Most surveys show that either Spring or Java EE is more popular. However, they don’t answer two important questions: is Java becoming more or less important? Currently, I’m mostly interested in UI frameworks, so the next logical question is: […]
The other day, had a list of items on the left-hand side, and another list of items on the right-hand side. Some of these items are connected, some of them are not. Wouldn’t it be nice to show this by connecting the item with an arrow? At first, there’s nothing new here. We’ve been drawing […]
As BootsFaces gains traction, people start to ask for AJAX capabilities. We’ve implemented some rudimentary AJAX support, but obviously, that’s not enough. Developers need the full power of JSF 2.2 AJAX. Funny thing is they demand it precisely the way JSF 2.0 defines it. It was a really clever approach when it was introduced. But […]
These days I stumbled upon Dukescript, which is a very innovative and ambitious approach to bring Java to various client platforms: traditional desktop applications, iOs devices, Android devices and the browser. Two of these target platforms – the desktop and Android – run Java natively (at least after installing a JRE in the case of […]