Slow Productivity: some book notes

1 American authors sometimes forget for many people the dream is to emigrate to somewhere like America. This is a very different kind of ambition from being “So Good They Can’t Ignore You”. 2 Do we have to be very “successful” in the first place? In the sense of being better by a significant than others on some objective measure? Surely not, even though that is the inevitable premise of self-help.

READ MORE

Convert HTML to Word

Demo: download button here for laptop and desktop Background There is an issue with Barrister Admission Bundle I have wanted to solve for some time. I wanted to make a website where users (pupil-barristers) could enter all required information at once, and then download a Word document. The Word document would have all the information in the right place. But it also needs to be modifiable (as users probably have their own style preferences).

READ MORE

Dao of Web Design

I fell in love with the technology of CSS recently, having obsessively followed a YouTuber (and CSS guru) called Kevin Powell. One of the articles that Kevin recommends is the Dao of Web Design. In essence, the article argues that web as a medium is fundamentally different from printed media because the layout of a webpage has to work on so many different devices: mobile phone, tablets, laptops, Desktops And also on different browswers with customisation such as dark reader or screen readers.

READ MORE

Fundamentals in CSS

Kevin Powell points out that people (certainly me!) tend to be too impatient with CSS. They assume it is a “simple” technology and just resort to looking up answers on Google as they go along, without trying to understand the undelrying principles. But paradoxically in CSS more than in (say) Javascript, fundamentals matter even more. The layout of a web page differs from device to device and from browser to browser.

READ MORE

Promise(), not promise

Quick test: what do these code snippets do? const a = new Promise(function (a) { a }) const b = new Promise(function (b) { b("success") }) const c = new Promise(function (a, b) { b("failure") }) const d = Promise.resolve("success") const e = Promise.reject("failure") const f = new Promise(function (a, b) { a("success") b("failure") }) const g = new Promise(function (a, b) { b("failure") a("success") }) const h = new Promise(function (a, b) { throw new Error() }) const i = new Promise(function (a, b) { a() }) const j = new Promise(function (a, b) { b() }) const k = (number) => { return new Promise(function (a, b) { a(number * 2) }) } Check by opening the console in your browser and test with e.

READ MORE