1.4 billion phones are sold globally each year, and only 20% are properly recycled. What if we could turn Black Friday GREEN? Help us reach our goal of recycling 20,000 phones in 2020 by sending us your old phones. ♻️

Apply for your free shipping label: bit.ly/2Vajy7W

@stchris @Gina I think they're originally Dutch, even, though I've used the co.uk version as well: lootjestrekken.nl/

@happybeing Unfortunately I do not know what the "dream code" technique is :)

The thing that makes it feasible is that we pushed hard for most of the code consisting of pure functions, the actual project lending itself well for such an architecture, and those functions having pretty clearly-defined inputs and outputs. And even then I still had to go back and fix about twenty or so because I'd missed one requirement in the input data.

To be clear, this project happens to lend itself particularly well for test-driven development. That's not a luxury that I always have. And I'll probably still have to fix some incorrect tests anyway.

(I'd get Impostor Syndrome from reading my own toot, hence the clarification.)

Show thread

Yesterday I gifted myself a whole bunch of unit tests, so all I have to do now is write the implementation and see them flip to green. Thanks, Yesterday Vincent!

I've started seeing words like "modularity" and "generic" as red flags. They're not good in and of themselves: they have to serve a purpose.

Are we going to use these modules? Is this generic over likely future use cases? Are other likely future changes not made more complex?

Show thread

"Don't repeat yourself" is just a means to an end. The goal is to make it easier to apply future changes that should affect different parts of your code base.

But if they evolve independently, then you're only making things more complex to make them even harder in the future.

Show thread

I don't mind having (software-)architectural discussions, but I do feel they're most valuable when people discuss concrete challenges and use cases, rather than vague intuitions about what's "cleanest". For example:

@noeldemartin I'd argue that it *is* an abstraction: when you define a class "part1", you're abstracting over the styles of that element so that you could theoretically apply them to a different element that would reuse them.

But since there aren't actually any other elements that share those styles — you'd just reuse the component to reuse the styling — that abstraction into a separate CSS class doesn't provide any value.

@happybeing Yeah absolutely, I'm very happy with how far I've come in terms of being able to work on what I consider important. But I do recognise that a large part of that is luck and privilege, and that the odds are not stacked in our favour if we're dependent on people being so lucky.

One advantage of Tailwind's removal of a layer of indirection: it obviates the need to come up with names for CSS classes that are neither too specific nor too generic. A serious advantage: the costs of having to name things are often underappreciated.

But how about we turn this around: when an abstraction is particularly hard to name, could that be a sign that it might not actually be a useful one?

mastodon.social/@vinnl/1052479

@happybeing Well, I hope you can, because I certainly do not have the skills to build a web browser 😃 But in all seriousness, it requires society-wide change as well, because right now I unfortunately can only spend the time required to build viable, better alternatives if I'm getting paid to do so, and I haven't found a sustainable way to achieve that yet - and I tried, for over two years! A grant here and there helped, but it was mostly depleting my savings account...

@happybeing (but yes, I really hope they'll make a paid version with integrated VPN available soon so I can throw money at them, and that that will prove sufficient to keep a free and ethical browser available. But I'm also thinking about a possible world in which that does not succeed.)

@happybeing Right, but that's not the choice: if it's just about advertising, then Mozilla hasn't gone bad - it always was. The question is whether its current incorporation of advertising, where it is largely dependent on a particular company that it therefore sometimes finds hard to criticise, is better or worse than a potential future form where there are ads on the 'new tab' page.

@happybeing But if we have to choose between Mozilla putting an ad in your search box and being entirely dependent on that advertiser, or putting them on the new tab page and being able to cut out advertisers they do not agree with - which one would be preferable?

Anyway, that's my current analysis. If you know of anything I've missed, do let me know!

Show thread

So to recap, the advantages:

- Constraints keep your design consistent.
- Simple tooling, with just few kBs shipped to your users.
- Styles defined in the context of the component to which they apply.

And to address the elephant in the room: yes, this addresses problems that inline styles do not. Specifically, it is not trivial to apply constraints using inline styles, and media queries and focus and hover states are not supported at all.

Show thread

Tailwind does away with that indirection: you apply your design constraints directly in the component, using plain CSS. It provides "utility classes" like p-0 to p-9, to apply a little to a lot of padding, respectively, to an element. Whatever you choose, it'll be consistent.

Show thread
Show older
Mastodon

Server run by the main developers of the project 🐘 It is not focused on any particular niche interest - everyone is welcome as long as you follow our code of conduct!