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 […]
When I teach Angular, I keep telling my students that Angular components are custom HTML elements, while Angular directives are custom attributes. Every tutorial I know teaches the same. Nonetheless, Angular is much more flexible. In reality, the selector of both components and directives can be any CSS selector. For instance, you are allowed to […]
Common wisdom says that Java runs on bytecode. Most developers also know there’s something like a JIT compiler, but few developers are aware that the JIT compiler generates real machine code. Let alone that we can see it.
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 […]
Isn’t it funny that I start writing a series of articles about Java 8 Lambdas in 2018? Mind you: my first article dates back to April 2012, six years ago. I fell in love with functional programming even earlier. I suppose it was roughly in 2008, ten years ago. From this perspective, functional programming is […]
Functional programming is en vogue. There are many good reasons to adopt functional programming. Recently, I watch more and more Java programmers using the new programming style. As things go, they experiment and play with their new toy, pushing it to the limits. This article briefly shows why Lambdas are useful, what Java programmers make […]
Spectre and Meltdown came as a shock. They showed that low-level CPU optimizations have an impact on our lives. Plus, they proved an illusion of most programmers wrong. Yes, you’re using a high-level language. But that doesn’t mean all those abstraction layers shield you completely from the CPU. I’ve demonstrated the effect of the CPU […]
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 […]
After a long search, I’ve finally found two good libraries bringing the design language of Material Design to Bootstrap. Actually, I’ve seen similar attempts before. Just think of the Paper theme bundled with BootsFaces. It’s not bad, but I wasn’t too excited when I saw it. I didn’t run a comprehensive test yet, but at […]
We start the new year with a new version of BootsFaces! BootsFaces 1.2.0 brings a few new features, a lot of bugfixes, and an improved navigation on the documentation page.
Gone are the days of customizing Bootstrap with the sweat of your brow. At least if you’re using a current version of Angular and Bootstrap 4. Mind you: Bootstrap 4 is built with SASS. Angular supports SASS as a first-class citizen. So it’s hardly surprising that it’s a child’s game to customize Bootstrap with an […]
The Angular Animations API adds a shallow abstraction layer to the animations offered by CSS. It’s a bit like so many other Angular libraries: it adds enough syntactic sugar to make it useful, but it adds little value to the underlying technology. At least, that was my first impression. During my research for this article, […]
Today’s tech tip is almost too primitive to mention. However, on second glance, it shows how to use Angular efficiently. I reckon there’s a general pattern there, even if I haven’t been able to distill it yet to make it a textbook lesson. Setting the stage Consider a carousel, such as the first demo at […]
The other day, I was asked to compare frameworks like Angular and React.js. It was an interview, so I didn’t notice the tiny slip. Developers reading the interview didn’t hesitate to point out that React is a library, not a framework. A few months earlier other developers reminded me you can’t compare Angular with React […]
Image source: PixabayThe age of a programming language shows in the clever tricks programmers use. One such trick is used by CDI. Did you ever wonder why you have to put an empty beans.xml into the META-INF directory? By the way, you may not even aware that the beans.xml is allowed to be empty. Many […]