Mastodon

hjertnes.blog

CSS In JS

28.07.2019 10:29

CSS in JS is a kind of new thing everything considered. Instead of writing your CSS in a CSS file you write it in some kind of JavaScript object. It can be like as simple as the default React style objects that is just a javascript object where you define css properties like color, border etc. Or something like styled-components where you write regular css, but it is scoped and you can pass properties / parameters to it. There are more too, but these are the ones I am familiar with. The big difference between them is that using a plain js object to represent css styling excludes a large portion of the CSS syntax. Like media queries for example. While everything that is possible in CSS can also be done with something like styled components.

A lot of people hate css in js. And there are good reasons for it. Writing regular CSS is the ideal, because then you can just take your styling and bring it along when you change from React to the next big thing. And you can also combine different technology and use the same styling. But when someone are using CSS in javascript and have thought through way they are doing it there is a really good reason for it. A problem with CSS when you are building large web sites or web applications is that the stylesheets you are loading are global. And my experience is that it is really hard to build systems that are easy to use, extend, maintain etc with regular CSS. This is the thing CSS in JS solves. It is always easier to build good software when you only have to think about a small part of it. This is why we do micro frontend, microservices and css in js.

Likes

26.07.2019 10:41

I have been playing with the format a lot behind the scenes over the last week or so, one of the things I thought about was to have a section with the links I thought was the most important. But I ended up not going with any of it because I think it is better that you who reads this to figure that out yourself.

p- Linux Performance: Why You Should Almost Always Add Swap Space

Brass pens.

22.07.2019 11:58

I recently got a Ystudio fountain pen. It is a brass pen, and I love it. Especially how cool it starts to look as the black paint starts to wear off.

But there is something I really enjoy about it, and that is how the grip section warms up when you use it for a longer periods.

I do think metal pens have some great properties that you simply don’t get with pens made out of plastic materials

Less Podcasts

22.07.2019 11:55

I think the process started last summer. Around this time. I just went through my subscriptions and got rid of anything that I didn’t really enjoy that much. And since then I have moved back and forth a few times But slowly I’ve been getting rid of anything I didn’t really enjoy.

I’m down from hundreds to 14, or 16 if you cound individual feeds for podcasts that have multiple feeds.

This is how I do it:

  • If I skip a lot in a podcast: unsubscribe
  • If I don’t listen multiple weeks in a row: unsbscribe
  • If I get the feeling that I don’t care that much: unsubscribe
  • If it goes over 6 months without an episode: unsubscribe

Hardcore history is exempted from the last rule.

The result is that I listen to more audiobooks and much more music.

Likes

19.07.2019 09:31

JVM?

16.07.2019 17:10

I just saw some Perl 6 implementation being built on top of the JVM. I think that is a great idea for a lot of situations. Languages like Perl 6 or Python or Node or Ruby will in a lot of situations be used to do web stuff. That means that start up time isn’t that important, and you get access to all the JVM libraries. Which means that you just build on top of all them, instead of using a lot of time to do it yourself or get others to implement support for your new language.

Clojure did it, and it is awesome, and makes it much more viable in the enterprise. Before all of you start time Nazi start commenting. The JVM or .NET CoreCLR are slower to start, but have better throughput (Go sometimes perform better, but that is a lot harder than most C# or Java code). What does this mean? It means that instead of starting fast it can deal better with a lot of requests.

This makes it a lot better fit for services and web stuff.

A retrospective look at ditching Google and Facebook.

16.07.2019 17:09

During easter of 2018, I decided to delete all my Facebook accounts, and so I did. After reaching out and finding other ways to keep in touch with the very few people from there I cared to keep in touch with. Then I continued to get rid of all the Google stuff in my life after that. I still have my Email account, but it have been forwarding all e-mail like it have for 6 years or something.

If you want to get ditch Google and Facebook it will be hard. Some stuff you simply can’t participate in. Other times you need to accept that you have less choice or that you need to use a worse solution.

At this point, you really need to want to do so to succeed. At least once a week since I ditched them, there have been a situation where the easy and convenient solution would have been to go back in.

I wish it was easier and less of a sacrifice to do so. We are not there yet, but I think the only way to get there is to stick with it and hope for to become easier.

Some Pen / Ink combinations just dones't work.

15.07.2019 11:08

I’m mostly a one ink in all of my pens kind of person. But I have slowly been accepting that some of my pens just don’t work with all inks. Like my two Pilot pens in rotation (Metal falcon and Vanashing point) aren’t the best unless the ink is really good lubricated. So I have more or less given up using them with anyhting but Iro inks.

While all my rest have good enough flow through the feed to handle most inks.

Likes

12.07.2019 10:10

Patreon

07.07.2019 21:35

Patreon is fucked. The moment you take in investors, and especially VC investors. You are expected to give them a return on their investment.

This means that Patreon will have to get more people on board, they will have to make more money off everyone.

This is probably not great new. Either the creators have to eat the increased fees or the supporters; the former means less money for the creators and the latter means that a lot of people will drop off, and less money for everyone.

Also: remember that patreon bought memberful last year.