There’s some fun stuff over here: programming is terrible.
Category Archives: Programming
Cross-Site Request Forgery Prevention Cheat Sheet
I happened upon Cross-Site Request Forgery Prevention Cheat Sheet in my travels.
Library Writing Realizations
Some thoughts on writing software libraries: Library Writing Realizations.
GPIO Programming: Using the sysfs Interface
Today I happened upon GPIO Programming: Using the sysfs Interface.
requestIdleCallback
See Improving responsiveness in text inputs for an explanation of how to use JavaScript requestIdleCallback for improved browser responsiveness:
let queued = false
textarea.addEventListener('input', () => {
if (!queued) {
queued = true
requestIdleCallback(() => {
updateUI(textarea.value)
queued = false
})
}
})
Framework Patterns
A great article Framework Patterns talking about approaches to framework implementation:
- Callback function
- Subclassing
- Interfaces
- Imperative registration API
- Convention over configuration
- Metaclass based registration
- Language integrated registration
- DSL-based declaration
- Imperative declaration
- Language integrated declaration
Streams in PHP
Today I came across A Guide to Streams in PHP: In-Depth Tutorial With Examples.
Falsehoods Programmers Believe About Phone Numbers
Some notes from Google about Falsehoods Programmers Believe About Phone Numbers.
Basic schema inference for JSON
Today via lobsters: Shape a TypeScript library for schema inference.
Software testing
Via HN today some measured discussion about software testing: We need to talk about testing.