JavaScript

JavaScript

JavaScript is a high-level, interpreted scripting language that conforms to the ECMAScript specification. JavaScript has curly-bracket syntax, dynamic typing, prototype-based object-orientation, and first-class functions.

To some JavaScript is a necessary evil. I think JavaScript code can be elegant and beautiful. As with any programming language, it has its traps and pitfalls. Node.js is a big game changer on the server. And TypeScript helps u to make projects more readable.

Solving Google Prettify Excessive DOM Size
Solving Google Prettify Excessive DOM Size
JavaScript, Regular Expressions

Solving Google Prettify Excessive DOM Size

Lately I’ve been tinkering around with my blog to see if I could get a better score in Google Web Vitals. The “Avoid Excessive DOM Size” attracted my attention. The details showed that my code fields were to blame. I use Google Prettify as it is lightweight and does a pretty good job, but… it renders way too much span elements. Let’s see if we can make it spit out less.

Fizz? Buzz? FizzBuzz? Let’s discuss.
Fizz? Buzz? FizzBuzz? Let’s discuss.
JavaScript

Fizz? Buzz? FizzBuzz? Let’s discuss.

What’s the buzz all about? Well, originally it started out as a small children’s game, but now and again I see it being used to detect weak developers in job interviews (I think there are better ways to do this). The assignment has a view nice properties. In this blog I would like to look at some implementations and discuss the pro’s and con’s of each implementation.

Hubot + ES6 + Promises
Hubot + ES6 + Promises
Chatops, Hubot, Node.js, Slack

Hubot + ES6 + Promises

Lately we’ve been playing around with ChatOps at Wehkamp. We added a Hubot to our Slack channels to automate some operational jobs. It makes work more fun and way easier. As it is hosted in our own infrastructure, it can interact with our micro-services. In this article I explore how to use ES6 and a Promise to implement a call to a simple web-service.

Support both Node.js and browser JS in one TypeScript file
Support both Node.js and browser JS in one TypeScript file
JavaScript, Node.js, TypeScript

Support both Node.js and browser JS in one TypeScript file

TypeScript allows for better JavaScript development. JavaScript is getting useful in more domains. But different systems require different ways of handling modules and exposing features. TypeScript solves this by compiling differently when a target is specified.

But what if you need a TypeScript script that supports both vanilla browser JS and Node.js? What if you need to expose 10+ classes?