A JavaScript Object that Dynamically Returns Unknown Properties

In our current project, we make extensive use of JavaScript objects as dictionaries, with the property name functioning as a key for the object we want to look up. We can use the in operator to test for property presence, and the dictionaries are perfectly JSON-serializable.

However, when it comes time to build test fixtures around these dictionaries for testing code that might look up lots of different keys, creating the test data for all of these keys becomes a large effort. Read more on A JavaScript Object that Dynamically Returns Unknown Properties…

Creating Azure WebJobs in F#

My colleague Brian recently wrote about Azure Functions in F#. Azure Functions are great, and I definitely recommend them if they fit your use case.

These functions are built on top of an older background processing system called WebJobs. While Functions have largely eclipsed WebJobs, there remain certain [situations][webjobs-vs-functions] where the latter is still a better fit. Read more on Creating Azure WebJobs in F#…

Setting Up Windows to Build and Run Node.js Applications

Node.js is just JavaScript, right? So it should be really easy to run Node.js applications on Windows—just download and install Node, npm install, and go, right?

Well, for some applications, that’s true. But if you need to compile extensions, you’ll need a few more things. And, of course, with Node.js itself being constantly under development, you’ll want to lock down your development to a version your code can use. In this post, I’ll talk you through how we get our Windows command-line environments set up for the Node.js (actually, Electron) application my team is developing.
Read more on Setting Up Windows to Build and Run Node.js Applications…

Efficient Search Autocomplete with React-Redux & Apollo

The application I’m working on right now has a search box that makes suggestions as the user types and does quick, inline searches to provide extra-fast results. Yesterday, I talked about how we improve our timing with debouncing. Today I’ll dive into the technical details of how we built the autocomplete behavior using ReactRedux and Apollo. Read more on Efficient Search Autocomplete with React-Redux & Apollo…

Azure Functions in F# (For Real)

If you’ve ever glanced at Azure Functions and F#, you might think they were made for each other. And yet if you want to create a new Azure Function project in Visual Studio, C# is apparently your only option.

Maybe someday, Visual Studio will include support for Azure Functions in F#, but for now it’s possible to get there by adapting the C# Azure Function template. After all, F# is a first-class language on the .NET CLR, and it’s all the same once it’s compiled anyway. Read more on Azure Functions in F# (For Real)…

Extending the Heroku Timeout in Node.js

Heroku will terminate a request connection if no data is sent back to the client within 30 seconds. From Heroku’s Router – HTTP timeouts documentation:

HTTP requests have an initial 30-second window in which the web process must return response data (either the completed response or some amount of response data to indicate that the process is active). Processes that do not send response data within the initial 30-second window will see an H12 error in their logs.

Read more on Extending the Heroku Timeout in Node.js…