Cordova WKWebView Plugin

Great work by the Ionic folks: One of our awesome engineers has been working hard to bring WKWebView to Ionic apps and is working to bring the new plugin into Cordova! The new plugin will work with both Ionic V1 and Ionic V2 apps. In fact, it should work with any iOS Cordova build! That …

Monitoring changes in a web application

Eric Bidelman has bundled lots of code snippets around change events that can get triggered in the browser: Changes range from simple things like DOM mutations and catching client-side errors to more complex notifications like knowing when the user’s battery is about to run out. The thing that remains constant are the ways to deal …

React Binding Patterns: 5 Approaches for Handling this

Cory House: There are at least five ways to handle the this context in React. Let’s consider the merits of each approach. Use React.createClass Bind in Render Use Arrow Function in Render Bind in Constructor Use Arrow Function in Class Property Currently I’m mostly using Approach 4 (“Bind in Constructor”), but Approach 5 (“Arrow Function …

Context aware MySQL pools via HAProxy

At GitHub they use MySQL as their main datastore. The setup is a typical “single-writer-multiple-readers” design. They loadbalance between server pools using HAProxy, with some cleverness built in: Instead [of checking whether a MySQL server is live with mysql-check], we make our HAProxy pools context aware. We let the backend MySQL hosts make an informed …

30K Page Views for $0.21: A Serverless Story

Pete built the Fantasy Movie League Lineup Calculator. In July it got about 30K pageviews, resulting in a $0.21 bill from Amazon AWS: The Lineup Calculator is comprised of a set of AWS Lambda functions. Boiling what I’ve done down to its essentials, I’m using Lambda as a free batch server where I’m well below …

The most dangerous person in Silicon Valley

No, not The Drive-By Manager but (those who claim to be) The Senior Software Engineer: There are lots of people with the title but not the skills. They are hard to spot because they’re definitely not junior but they’re not really senior either. They’re mid-level engineers who have been convinced they’re senior by the ecosystem. …

You don’t need JavaScript

CSS is powerful, you can do a lot of things without JavaScript. A quite commonly known example is usage of the Adjacent Sibling Selector (viz. +) to build custom radio buttons/checkboxes or tab interfaces. See the Pen CSS Custom Checkboxes / Radio Buttons by Bramus! (@bramus) on CodePen. With a few more CSS tricks such as …

Improving readability using array_filter

Great trick by Freek Van der Herten: instead of selectively adding fields onto an array after having verified them to not being falsy – resulting in lots of if blocks in the code – it’s actually a lot easier/readable to fill the array first and then successively filter out the empty values using array_filter. When …