hjertnes.blog

Reason React

06.06.2018 02:00

I obviously think that React is awesome. But I have been looking for a strongly typed language to use together with React for a while now.

The best option I have found is Reason. When you use a language like JavaScript, that isn’t strongly typed. You are either hoping for the best or you end up writing a lot of code making sure that what is passed to this function really is a number and not a object or a string. Or that a object have the expected elements and so on. This is something you can avoid with a strongly typed language. Because all of the checks are done when you build it, and then there are much fewer things that can go wrong in run time.

You probably don’t want a strongly typed language for smaller projects, because it takes more time to work with them. The idea is that you do a lot of “convert this string to a JSX element” etc.

Reason React is pretty awesome. You can use it almost like you would use React with some differences. One of them are that you only can have one component per file. And you do have something like Redux, but it is more like a combination of the default react state management and Redux; which unfortunately means that you don’t get something like the Connect HOC.

I’m going to use Reason for some of my side projects for now. And I think I would use it for work projects if I started them today.

Check it out if you like React, but would like something strongly typed.

The introduction of a type system makes it less elegant though. So stick with React if you want the tool that lets you build stuff as fast as possible. But it is excellent if you want something that limits the number of places with runtime errors.

#

05.06.2018 02:00

The only thing I’m excited about after the WWDC keynote is the dark mode and the anti tracking stuff in Safari.

Chrome vs Firefox

05.06.2018 02:00

So, I have changed all my daily browsing activities over from Chrome to Firefox, because I think it is just much faster. But I still use Chrome for some stuff: 1Password X on Linux and web development. The reason I still use Chrome for web development is not because the dev tools are better, but because I like them better. Part of it is probably because I have used them since 2009, and know them in and out. And because I prefer having them on the right side of the screen instead of the bottom, the Chrome dev tools are much more adaptive to how wide they are than the Firefox are. It will probably be better and the future. But I’m going to stick to Chrome for web development.

This is very important actually. If web developers are using browser X for development, because they think the tools are better, then that app will probably work better there, because the developers spend more time using their web app there.

#

04.06.2018 02:00

I’d probably be running towards gitlab if this was the Ballmer or Gates Microsoft; but it isn’t.

#

04.06.2018 02:00

WWDC Keynote iOS Wishlist:

  • Terminal.app
  • Emacs.app
  • Homebrew

Autojump

04.06.2018 02:00

I just installed autojump, and I have no idea why I haven’t done this before. The pitch is that it looks at your history of commands using “cd” and tries to guess where you want to do when you hit “j foobar”. Just install it, configure it, and leave it for a few days or weeks and then try to use it. It is awesome.

Where does different writing instruments fit in?

04.06.2018 02:00

I use pens and I use pencils.

This is a very interesting question. In general I use a pencil if I’m just going to write down a few sentences. And then I go for a fountain pen if I am going to write a few pages. And I go for a very specific fountain pen if I’m going to write a lot (my Lamy 2000).

I also prefer a pencil when I’m going to write on the train or somewhere I don’t have a flat surface.

Pencils are fun, but you have to sharpen them way too often for them to be something I can write page up and down with. Kind of the same reason I preferred my Lamy 2000 while studying. Because it had enough ink to last me a full day. Something my Pilot Metropolitan never had.

#

01.06.2018 02:00

Three notebooks open at my desk, a Blackwing 602, a Vanishing Point and a KUM Masterpiece.

Let’s get some shit done.

#

01.06.2018 02:00

@hartlco Hi! Found a crash in Icro(TestFlight) it crashes when I delete a mute filter, but the filter are removed).

Journaling

01.06.2018 02:00

I have been a Day One user for a very long time, I think I first downloaded it in the early days of the Mac App Store. And it is a great app. Pretty, well designed, focused and they are willing to try new stuff. Also they seem to be very open to people like Brett Terpstra to write tools that feed data into it. And it is very easy to get data in and out.

What I have done is to move all my journaling that isn’t focused around photos to org-journal. In order to try to journal more frequently. And having it accessible with just one M-x command in Emacs seemed to do the trick. But I’m still going to use DayOne for some stuff. Like photos. I take a picture of myself most days and add it to DayOne.