Adventures in brine

A blog about code, beer, and bread.

Don't break the seal!

| Comments

My jars

I'm no expert, but... No, I'm no expert. I am part of a Facebook group though, I'm part of a lot of Facebook groups, I'm a little obsessed, but this Facebook group in particular is a group for sourdough bakers. A post went up yesterday asking about the proper way to store sourdough. Most commenters were using a Kilner style clip top jar, which was no surprise, I use one myself. What did surprise me, shocked me to my core in fact, was that almost all of my brethren were advocating the removal of the seal from their clip top jars. I really, really don't think you need to do this, and I'd like to explain why I think this is the case.

Fear of drowning

| Comments

Flood Aware Header

I built an app! I've built few, but this one is especially special (to me).

Flood Aware is an app for tracking water levels in your local area. The data is sourced from the Environment Agency (EA). The app started off as a personal project after buying a house right on the water, last summer; the canal to the front, and the river behind.

Async/await, readable non-blocking code

| Comments

TL;DR: Shit just got streamlined. More specifically, promises start looking cleaner when you spray them with 'Callbacks Begone'.

In this post I'm going to give you a quick demo of how easy it is to incorporate ES7's proposed Async/Await functionality into your existing ES6 code. To build the code, I'm using Babel with 'es7.asyncFunctions' enabled. You can read about my Gulp setup here.

Simple routing with JavaScript Decorators

| Comments

TL;DR:I've used decorators to generate a bunch of routes from a class.

I can't decide whether this is a legitimate use for decorators, but I knew from the moment I saw this crazy syntax that this was want I wanted to achieve.

Empty Promises: Dos and Don'ts of ES6 Promises

| Comments

UPDATE 14/06/15: Realised the existence of Promise.resolve, added info on Promise.all.

There is so much I love about the functionality and syntax coming through under the banner of ES6. One such piece of functionality, is the 'Promise'. Promises are not something that needs to be transpiled, as of writing, all but IE and Opera Mini have support out of the box. The stragglers can be polyfilled quite easily.

What follows, are three tips for using promises more effectively.

A punnet size guide to Git cherry picking

| Comments

I'd just finished a load of work on a project. I'd made my commit and was a about to push to origin, when I noticed I was on the wrong branch.

What a numpty.

Why this happened, is probably a good subject for another post. What I want to talk about is how I resolved the issue.

Consuming ES6 modules in NPM packages

| Comments

I'm going to have to start coming up with more interesting title for my posts. My eyes are watering at the thought of 'Consuming ES6 modules in NPM packages'. Maybe something more exciting, like 'Munching on the nuggets of next gen wonderment'. I'll work on it.

In this post I'm going to describe how you can make use of Babel's support for ES6 modules, and how you might consume them as NPM packages. It's pretty neato stuff and makes for very clean code. Read on!

Controlling Cordova from Gulp

| Comments

It's a story as old as time. Girl meets boy, boy has an annoying two step build process, spread across two directories. Of course I'm talking about having an awesome Gulp workflow, with a Cordova project clumsily tacked on the side. Well, no more, now you can integrate Cordova! into Gulp! Yay!