This popped up on #lobsters today: Collection of TypeScript type challenges.
Category Archives: Programming
On Writing Documentation
This via r/programming today: On Writing Documentation.
Stop using noargsconstructors and setters (and builders)
This via r/programming today: Stop using noargsconstructors and setters (and builders).
Big Ball of Mud
Reading about the Big Ball of Mud design pattern. Favourite quote:
There are good reasons that good programmers build BIG BALLS OF MUD. It may well be that the economics of the software world are such that the market moves so fast that long term architectural ambitions are foolhardy, and that expedient, slash-and-burn, disposable programming is, in fact, a state-of-the-art strategy. The success of these approaches, in any case, is undeniable, and seals their pattern-hood. People build BIG BALLS OF MUD because they work. In many domains, they are the only things that have been shown to work. Indeed, they work where loftier approaches have yet to demonstrate that they can compete.
cgi-bin example
------------------- Sun Nov 21 14:08:26 [bash:5.0.17 jobs:0 error:0] root@tact:/usr/lib/cgi-bin # cat test.sh #!/bin/bash echo 'Content-Type: text/plain' echo '' echo 'test' -------------------
The relevance of PHP
Seen today: Yes, PHP is Worth Learning/Using in $CURRENT_YEAR. There’s some good discussion on some of the more recent PHP language features and other notes about what’s available in the broader ecosystem.
Kenichi Asai’s Home Page
Ben Eater
So I discovered this guy Ben Eater after watching his video How do hardware timers work?. It looks like he has some cool stuff.
How do hardware timers work?
This looked interesting but I’m too sleepy to watch now… How do hardware timers work?.
Pivot Tables
I think the Laravel developers don’t know what a Pivot Table is. At the time of writing:
If you need to define attributes that should be set on the pivot / intermediate table linking the models, you may use the hasAttached method. This method accepts an array of pivot table attribute names and values as its second argument
The concept they’re looking for is Association Table.
Oh, look. I just noticed this on the Wikipedia article: “pivot table (as used incorrectly in Laravel – not to be confused with the correct use of pivot table in spreadsheets)”; so this has already been discovered.