HNHacker News
TopNewBestAskShowJobs

lionelw

30 karma · joined October 4, 2018

submissionscomments
lionelw··on Substack makes money from hosting Nazi newsletters
Is this the first time mainstream media is saying something? Prominent voices have done so for years e.g. Anil Dash[0], but no one seems to have gotten the memo; people who I thought would care have continued to either be on it or cite content from it, oblivious.

Edit: Scrolling down to related stories shows articles criticising Nazi Substacks since 2024

[0] https://www.anildash.com/2024/11/19/dont-call-it-a-substack/

lionelw··on Aspects of modern HTML/CSS you may not be familiar with
So how do you deliver design on the web, if not without code?

Remember that designing for the web is not like designing for print, where the dimensions of your canvas, and the amount and nature of your content, are known quantities. A web page is expected to accommodate every possible device, agent and viewport -- watches, phones, tablets, laptops, desktops, TVs, screen readers, ebook readers, etc. * portrait and landscape orientations * browser window sizes -- and content that can change by the minute and whose size is unknown until all of it has arrived on the device.

Think about all these conditionals and variables, and how much instruction you need to provide, efficiently, for making it all look as good as possible, to the browser/agent. Doesn't all this seem like the necessary purview of a domain-specific programming language?

lionelw··on Aspects of modern HTML/CSS you may not be familiar with
How many of those languages are declarative, or domain specific?

There's no use comparing CSS and assembly. It betrays a shallow understanding of CSS. Points to ponder:

- Assembly is superlatively imperative while CSS is the opposite. The difference can be jarring for some. It's commonly felt in day-to-day frontend work that switching to CSS (declarative) from almost anything else (imperative) -- JavaScript, PHP, etc. -- requires a significant mental shift, though it does get easier with experience.

- Lot of the vocabulary and concepts used in CSS come from outside the computing world, namely design and publishing. It's somehow a rarely shared factoid, but it's a hint at how too far away from Kansas we are to be making fair comparisons.

- A pervasive mistake that coders make (and unfortunately a lot of CSS teaching material out there too) is to approach CSS as a set of explicit, atomic instructions -- a fair coder-y assumption, but a bad mental model that leads to frustration. Understand that these instructions can affect one another; some switch entire layout algorithms[0] in a given scope, changing how other instructions behave (predictably).

[0] https://www.joshwcomeau.com/css/understanding-layout-algorit...

lionelw··on Aspects of modern HTML/CSS you may not be familiar with
Alright, if you say so. But what stupidity do you mean? What do you mean offload it to figma etc? Why is it dumb to write code for... the job CSS is built for?
lionelw··on Aspects of modern HTML/CSS you may not be familiar with
Ask your boss to hire someone better at CSS than you.
lionelw··on Events
When is it ever necessary to change event handlers?
lionelw··on Events
>Why is this so weirdly prescriptive about inline event handlers?

>> Even in a single file, inline event handlers are not a good idea. One button is OK, but what if you had 100 buttons? You'd have to add 100 attributes to the file; it would quickly turn into a maintenance nightmare.

What's so weird about this? This practice, known as event delegation, has been a known Good Practice for decades. One event listener attached to a common ancestor element of 100 buttons is more memory efficient than 100 event listeners. Even jQuery, which makes it temptingly ergonomic to give 100 buttons an event listener each, prescribes the event delegation pattern in their documentation.

Edit: Sorry I just read the section; now I'm dismayed the MDN article is not prescribing/recommending event delegation. However I did find other MDN articles explaining it:

https://developer.mozilla.org/en-US/docs/Learn_web_developme...

https://developer.mozilla.org/en-US/docs/Learn_web_developme...

lionelw··on The Art of Manually Editing Hunks
If this is about staging partial file changes, then I think this is where git GUIs especially excel. It's typically a matter of selecting and deselecting individual lines of change. The concept and term "hunk" (to mean a group of lines, and honestly "chunk" would've been a better choice) never shows up. Pretty intuitive and foolproof.

I've used Git Cola on Linux and Github Desktop on Windows. Both free.

lionelw··on Zen, a Arc-like open-source browser based on the Firefox engine
Firefox restores all windows.
lionelw··on CSS Grid Areas
Don't you think : is already used for something else in CSS?
lionelw··on Firefox 125
Just adding this here: I created a multi-window management addon Winger[0] which lets you treat windows as 'tab groups', and it has a stashing feature (windows <-> bookmark folders / tabs <-> bookmarks) similar to Tab Stash. Despite the ostensible scope overlap, I know there's at least one person (not me) who uses both, setting Winger's stash home folder to be the same as Tab Stash's to achieve a manner of integration.

[0] https://addons.mozilla.org/en-US/firefox/addon/winger/

lionelw··on Firefox 125
>still no way to remap Ctrl+T to open a new tab in the current container context

A quick search found me this: https://addons.mozilla.org/en-US/firefox/addon/new-container..., using Alt+C. There are other similar addons too.

I'll assume given the solution was pretty easy to find, your issue must be with the inability to repurpose Ctrl+T...

lionelw··on The quiet, pervasive devaluation of front end
>You aren't "programming the presentation logic", you're configuring the browser.

Under-appreciation of frontend skills in action. Do you think of "presentation logic" as an oxymoron?

I think many people can't see HTML, CSS and even SQL of backend land as programming languages, because they don't think declarative Domain Specific Languages (DSLs) count, don't think of their specificity and limitations as design strengths, and because each one is super easy learn to start but the rest of the enormous iceberg is so often ignored.

lionelw··on Implicit Keyword Arguments for Python
Other Zen of Python principles are allowed to override it. Let's say, "Readability counts".
lionelw··on Firefox displayed a pop-up ad for Mozilla VPN over an unrelated page
It costs nothing to keep a tab (you had every intention to revisit later) open, especially when tabs can be auto unloaded to free up memory, either by an addon or the browser itself. Firefox unlike Chrome does not keep squashing more tabs in the tab strip forever, but lets them scroll horizontally out of sight to maintain a readable minimum width for each tab. Over a long enough period of time you can get 2000 open tabs. Modern browsers can handle it.
lionelw··on `Smol-Developer`
It's probably about all the boilerplate code you always start an extension with. AI is good at boilerplate.
lionelw··on The skilled trades haven't caught as a career choice with Gen Z
Can you elaborate why?
lionelw··on An odd discovery on Spotify
For young kids with no personal devices of their own, they would only get Spotify from their parents' devices.
lionelw··on Thank You, Guido
If large indentations bother you, good. Braces or not, large indentations and large code blocks should make you start wondering how to refactor them.

And if Python's design seems to discourage over-indentation and oversized code blocks, brilliant.

lionelw··on Why People Don't Get Wealthy
That is certainly not the definition of bias. https://duckduckgo.com/?q=define+bias

And you don't believe a "winning group" would hold its own biases?