Skip to content

Instantly share code, notes, and snippets.

@eddieajau
eddieajau / agile_prototype_driven_development.md
Last active August 22, 2025 02:44
A representation of what modern Agile and look like in a GenAI world where the cost of coding is extremely low. Based on a video by Theo Browne.

Agile Prototype-Driven Development

Deliver customer outcomes fast, safely, and repeatably by combining prototype‑first discovery with lightweight Agile delivery.

Preamble

The new bottleneck isn't typing – it's achieving shared understanding

Generative AI has collapsed the marginal cost of producing working code; what used to take days of careful hand‑crafting can now be scaffolded in minutes. The new bottleneck isn’t typing – it’s achieving shared understanding early enough. Traditional heavy upfront specs attempted to minimise rework by predicting correctness in advance, but they now delay learning and amplify risk: we still discover the real requirements only once users touch something real. Prototype‑Driven Development embraces this shift: invest early cycles in thin, disposable prototypes to create alignment, validate value, and surface complexity before hardening. We trade speculative specification time for rapid feedback loops, reducing total rework while accelerating trustworthy delivery.

@eddieajau
eddieajau / csv-parse-async.mjs
Last active April 11, 2023 01:09
Parsing a CSV using a stream pipeline (async)
import { parse } from 'csv-parse'
import fs from 'fs'
import { pipeline } from 'stream/promises'
/**
* Do something async with a row.
*
* @param {*} row A row of the CSV as an object.
*/
async function handleRow(row) {
@eddieajau
eddieajau / typeorm_model.ts
Last active May 9, 2019 02:49
Example of automatic translation of a JSON property in a TypeORM model.
import { PrimaryGeneratedColumn, Entity, Column } from 'typeorm';
@Entity('foo')
export class Foo {
@PrimaryGeneratedColumn()
public id: number;
@Column({ default: '' })
public get link(): string {
let value = this._link;
class SafeObserver {
constructor(private _next: (value: any) => void = () => {},
public error: (errorValue: any) => void = (e: any) => { throw e; },
private _complete: (completeValue?: any) => void = () => {}) {}
public next(value: any) {
try {
this._next(value);
}
catch (e) {
@eddieajau
eddieajau / createSequelizeStream.js
Created March 20, 2016 22:14
Module to allow a Sequelize select query to be converted into a stream.
"use strict";
var Readable = require('stream').Readable;
/**
* Create a stream from batching a Sequelize select query.
*
* @param {Function} query - Function that returns a promise.
* @param {object} options
* @param {number} options.limit - The limit for the number of rows to return in each "batch"
@eddieajau
eddieajau / waterline-error.md
Created August 3, 2015 23:23
Waterline validation error
model.create(someData)
  .catch(function (err) {
    console.error('ValidationError:', err.ValidationError);
    console.error('Message:', err.message);
  });

Outputs:

ValidationError: {
@eddieajau
eddieajau / package.json
Created May 25, 2015 00:01
NPM Package Scripts
{
"devDependencies": {
"app-root-path": "^1.0.0",
"jshint": "^2.7.0",
"mocha": "^2.2.5",
"supertest": "^1.0.1"
},
"scripts": {
"check": "npm outdated",
"lint": "node_modules/.bin/jshint lib/ test/",
@eddieajau
eddieajau / Collection.js
Created December 16, 2014 00:51
Clean architecture for basic entity CRUD in Node.
/**
* Collection Interface.
*
* Concrete implementations would exist INSIDE the boundary interfaces.
*
* - Must be able to add one or more entities to the collection.
* - Must be able to find entities in the collection.
* - Must be able update entities in the collection.
* - Must be able to remove entities from the collection.
*
@eddieajau
eddieajau / extractColumn.js
Created August 12, 2014 23:49
Extract a column from an array of JavaScript objects.
function extractColumn(arr, column) {
function reduction(previousValue, currentValue) {
previousValue.push(currentValue[column]);
return previousValue;
}
return arr.reduce(reduction, []);
}
@eddieajau
eddieajau / fw_release_strategy.md
Last active December 31, 2015 11:59
Joomla Framework Release Strategy

Joomla! Framework Release Strategy

1. Introduction

1.1 Revision History

Version Date Notes
1.0.0 16 December 2013 First version