Contents tagged with JavaScript
-
3D before GPUs Part 1: Dungeon Master
In this series, I'll reverse-engineer algorithms from video games dating back to that time when the CPU was all you had. Today, we're looking at Dungeon Master, a fantastic game by FTL that set the gold standard for RPGs for the years to follow. It looked amazing, and still does to this day. It changed everything.
-
The case of the defined undefined property
I like JavaScript, for some reason, I really do, and I still write and maintain a few open source JavaScript projects. It’s undeniable that it has bad parts though, that remain today, even in strict ES2017. In this post, I want to show you one that builds an interesting bug farm.
-
CMS as a service with DecentCMS
No web site should be a silo. A CMS should be great at organizing, syndicating, and presenting your content, but it should also communicate with arbitrary applications outside the CMS. In particular, mobile applications should be able to use the data from the CMS. In DecentCMS, you can enable the
content-api
feature to expose all content items as JSON documents.Content items are then available under two endpoints:
src
andshapes
. -
Querying DecentCMS, part 3: a paginated list of results
In the previous two posts, I exposed the general design of DecentCMS’ search feature, and described its indexing and querying APIs. In this post, we’ll apply what we’ve learned to build a paginated list of search results that will display the list of API documentation topics.
-
Querying DecentCMS, part2: querying the index
In the previous post, we looked at the basic concepts DecentCMS querying are built upon, and at how an index is built. In this post, we’ll examine how to query such an index in order to produce a result set.
-
Querying DecentCMS, part 1: building an index
DecentCMS’s search module provides the infrastructure to build and query search indexes, as well as a file-based implementation that is suitable for small sites. Querying in DecentCMS is based on a simple JavaScript API that is loosely based on the map/reduce pattern. The basic idea is that you first build an index, and then you can run queries on that index. The architecture ensures that querying can scale to very large content stores. It also enables querying to work in a unified way across heterogeneous storage mechanisms. Effectively, storage and querying are entirely separated.
-
Visual Studio Code first impressions
This morning, Microsoft made a surprise announcement (or two): a new cross-platform code editor named Visual Studio Code. It runs on Mac, Linux, and of course Windows. It’s lean, fast, it has IntelliSense, supports multiple languages and dev platforms, has debugging and git built-in. You can get it from the following link:
-
Fun with JavaScript: the mystery of the failing parse
See if you can figure that one out in less than ten seconds, in which case kudos to you… What does this code return?
['1', '2'].map(parseInt)
-
Dependency injection in DecentCMS
DecentCMS is relying heavily on dependency injection: it is basically a composition engine, that orchestrates services. Those services have to use one another, and dependency injection is arguably the best pattern to achieve that. Let’s go over what dependency injection does, and how it’s implemented in DecentCMS.
-
Oops! I did it again: introducing DecentCMS
There are a few things that nobody should ever do. One of these things is to write a new CMS. So about four months ago, I decided to write a new CMS using Node.js. It’s called DecentCMS, and I’ve had insane amounts of fun building it so far.