Better HN
topnewbestaskshowjobs
Log inSign up

lionelw

30 karma · joined Oct 4, 2018 (8y ago) · 26 submissions

Submissions

comment 9mo ago · link · parent

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/

comment 1y ago · link · parent

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?

comment 1y ago · link · parent

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...

comment 1y ago · link · parent

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?

comment 1y ago · link · parent

Ask your boss to hire someone better at CSS than you.

comment 1y ago · link · parent

When is it ever necessary to change event handlers?

comment 1y ago · link · parent

>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...

8.

Oil companies face a wrongful death suit tied to climate change(npr.org ↗)

1 points · by lionelw · 1y ago · discuss

comment 2y ago · link · parent

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.

comment 2y ago · link · parent

Firefox restores all windows.

comment 2y ago · link · parent

Don't you think : is already used for something else in CSS?

12.

If Chinese were phonetic - a brief thought experiment by Ted Chiang (2016)(newyorker.com ↗)

3 points · by lionelw · 2y ago · discuss

comment 2y ago · link · parent

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/

comment 2y ago · link · parent

>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...

15.

The Rise and Fall of the LAN Party(aftermath.site ↗)

3 points · by lionelw · 2y ago · discuss

comment 2y ago · link · parent

>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.

comment 3y ago · link · parent

Other Zen of Python principles are allowed to override it. Let's say, "Readability counts".

18.

Dave Winer Proposes Textcasting(textcasting.org ↗)

3 points · by lionelw · 3y ago · discuss

comment 3y ago · link · parent

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.

comment 3y ago · link · parent

It's probably about all the boilerplate code you always start an extension with. AI is good at boilerplate.

comment 3y ago · link · parent

Can you elaborate why?

comment 4y ago · link · parent

For young kids with no personal devices of their own, they would only get Spotify from their parents' devices.

23.

Show HN: Winger – A Firefox add-on to easily manage multiple browser windows(addons.mozilla.org ↗)

5 points · by lionelw · 6y ago · discuss

comment 7y ago · link · parent

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.

comment 7y ago · link · parent

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?