hjertnes.blog

Object.assign

30.10.2017 01:00

One very cumbersome operation in Javascript in the past, was the process of combining multiple objects. For example taking the output of multiple methods, combining them, before passing them on. There have been some good and some horrible and some less horrible ways to do this in the past. I used to either do it manually or to looping over objects, which wasn’t the most convenient thing in the world before ‘for in’. This is very easy to do with Object.assign.

The way it works is that you can give it any number of objects as arguments, and it combines it into a single object. And if a key exist in multiple of the inputs it will use the <strong>latest</strong>. As you can see in the example above. </div>

Diamine Tropical Glow

29.10.2017 02:00

```text I received an ink sample of this ink from Tudos.no free of charge for the purpose of reviewing it. ```

```text Diamine have been on the top of my list of ink brands I was going to look more into after I have used up some of my the ink on my desk. I’m down to two opened bottles now. ```

```text My interest in shimmer and shading inks probably started with the Tsuki-yo for the shading part, and I got very interested in shimmer when I reviewed J. Herbin 1670 Caroube de Chypre. ```

```text The writing experience with this ink is very good. Nothing to complain about when it comes down to the lubrication of the ink. And the colour looks fantastic. It is a beautiful turquoise with silver shimmers. They are very subtle, and you only see them if you know to look for them. ```

```text I did initially think that the colour was a little bit too light, but I have come around on that. Even though I would have preferred a darker colour. ```

```text I’m probably not going to buy a whole bottle of this ink, at least not now. I might do it in the future. But I’m just a little bit fed up on green at the moment, But I like it a lot more than the green ink I previously used (shin-ryoku). ```

```text One final note. I have not tested this ink as thorough as I usually do. I have only tested it with my board vanishing point. In contrast to how I usually test ink, which usually entails me inking up every single pen I own to get an impression on how it works with finer and broader; stubs; wetter and dryer. ```

```text I would without doubt recommend it, if you are looking for a turquoise ink. ```

Interesting iOS 11 change.

29.10.2017 02:00

```text It seems like there is a change to how app updates work for apps that are in use. ```

```text The way it used to work was that if I for example were listing to a podcast using Overcast, and hit update all, the app would exit when it was time to apply the update. And now it seems like the update will not be applied before the app exists. ```

```text I’m not sure how I feel about this change. On one side is it nice that the app don’t suddenly exists. But on the other side do I prefer that a “Update all” button does exactly that – updates all of my apps. ```

#

28.10.2017 02:00

A few thoughts about the iPhone 8 camera

28.10.2017 02:00

The new “tele” lens on the iPhone 8 Plus is awesome. Even though I would consider it a normal lens and not a tele.

I’m not a huge fan of the portrait mode thought. It looks a little bit weird compared to the real thing.

But to have both a wide and a longer lens makes the iPhone a much more capable tool as a very versatile camera. Now we only need a real tele lens I’m addition and a setting to default to the one you prefer.

#

27.10.2017 02:00

I do think the iPhone X is interesting, but I’m very happy that I ordered the 8 Plus instead because waiting for the X with a broken 6 Plus would have been very annoying. Not to mention how broken most apps will be until developers get a chance to update them.

#

27.10.2017 02:00

Not enough coffee or not enough sleep this week.

#

27.10.2017 02:00

My dogs. Luna is the big “Obama dog”, and the little one is Tara.

For-of

27.10.2017 02:00

For of is one of a few recent additions to the for loop in Javascript. It makes it possible to do what is basically a foreach in most other programming languages, like for example C#. for(var item of array){} is more or less the same as foreach(var item in array){} in C#. Why not just use .map or .forEach? Well, I usually do, but to do that can be a little bit cumbersome when you are dealing with async methods and async await, because then the arrow function in the .map also needs to be async etc. And it is nice to have an fast way to just loop through an array without having use a old school for loops. They are useful sometimes, and you should know how they work, but it is nice to have a quick and easy way to just loop thorugh an array.

#

26.10.2017 02:00

Hello World