hjertnes.blog

TWSBI Stub

18.12.2017 01:00

Stub nibs are not my favourite thing in the world. They are kind of scratchy if you don’t hold them in the right angle, and other nibs like my medium or broad’s are way smoother. But it looks so cool.

The way I use pens is that I have all the pens I own and enjoy inked up and I just cycle through them, and move over to the next one when my current one runs out of ink. And I have a system for cleaning them every other refill or something like that.

Most of them are in rotation because I love writing with them. The one exception is my TWSBI Eco with a Stub nib. I don’t hate writing with it, but I prefer every other pen in rotation over it. The main reason I keep it in rotation is how cool my writing looks with a sub nib compared to everything else I own.

The Perfect Lens

18.12.2017 01:00

What is the perfect prime lens?

This is of course a very loaded question, and different people have very different opinions of what’s “best”. When I say “best” I should probably say “versatile”. If you get a SLR and only want one lens on that camera, what should you get?

If, you are going to use that camera for more than one thing, I think there are two very good options. A 35mm or a 50mm.

When I talk about focal lengths here, I do of course talk of them as if you were using a full frame or a 35mm camera. For example a 23 and 35mm lens on my Fuji would be the same as a 35 and 50mm on my 35mm analog film camera.

The 50mm is a classic, and probably the lens. And it have been so popular for a very important reason. It is wide enough to be able to capture your friends in front or you or landscapes. But still long enough so you need to work on your composition. And it is still long enough so you can use it for portraits, and get nice bokeh.

The 35mm on the other hand is awesome for shooting what’s in front of you without having to step too far back. For example when me and Ingri visit my parents, and I want to take a picture of all of them walking the dogs. With a 35mm I don’t need to be far back, but I would have to with a 50mm.

The biggest difference between the 35 and the 50, because both of them are excellent general purpose lenses, is the effect of bokeh. The wider the lens is, the less you see the bokeh.

I prefer my 50mm in general. It is the lens I have on my camera 90% of the time. But I like to use something wider, when I want to shoot groups of people without having to step back or being able to capture the whole of what’s in front of me. And if I’m just shooting portraits, I prefer something longer.

#

16.12.2017 01:00

I’ve put together this super simple shell script to make it easier to update all your Arch User Repository packages: update-aur-sh. The big if is that you need to check out all the AUR git repo’s to one folder, and just change the script to reflect where you place them.

I kind of wish there were some better built in tools to manage AUR packages though.

#

15.12.2017 01:00

#

15.12.2017 01:00

I was listening to the last episode of the Road Work this morning. Many people will probably not understand this, but I feel the same as John. I don’t really understand what “happy” is, and I never feel lonely.

#

15.12.2017 01:00

Anyone getting a iMac pro?

JSX

15.12.2017 01:00

JSX is the syntax we use to define markup with React. It combines Javascript code and markup together in a very flexible and powerful way and is without doubt my favourite thing about React. Everything you use in JSX that isn’t Javascript code, is technically components. All HTML tags are implemented as Components in React. For example the h2-tag is a h2 component inside the React package, with the appropriate params defined to a HTML attribute; note: they are not always the same though.

Everything that you wrap in HTML tags (either self closing or not) are components and everything inside curly braces are javascript code.

For example:

https://gist.github.com/hjertnes/6a858c42a5674e8e93b4d8d0bcae3e84

That would be a common starting point for a simple React app.

I personally think that JSX is the first templating system I have seen that is powerful, without adding a lot of syntax that isn’t plain Javascript and HTML. Most other ways to template I have seen almost turn it into a language of its own that let you combine code and markup.

The great thing about this is that almost everyone gets it straight away.

#

14.12.2017 01:00

Had this years last day at work yesterday. What’s the first thing I do when I get home? Started installing Arch Linux on my “new-old” Thinkpad.

#

14.12.2017 01:00

Today is the day where I start to clean up in the 1TB black hole I’ve been throwing stuff into for way too many years (aka Dropbox)

React

14.12.2017 01:00

https://gist.github.com/hjertnes/57e3a388dc029dbdc64cbd4ee8418d2b

This is a typical Hello World implementation in React. It shows one of two ways you can write components, and how you pass data to a components. Most React Components are written as classes Extending from the React.Component class, and the only method a component have to implement is “render”. It returns either a new component or markup.

One side note: a component have to return one root node. For example:

https://gist.github.com/hjertnes/0c4b22d22cd75c9276b9c36309cdbd4c