hjertnes.blog

The new React Context API

09.03.2018 01:00

When I spent weeks upon weeks to write about React I said that no one should use the context api because it was likely to break in the future, that time is coming. There is a new version of the context api on it’s way into react. Look here for details on how to use it.

The short version is that the new context API will be more like a component, that you either use as a “Provider” or as a “Consumer”. Again, look in the blog post above for details.

It looks like it will be a million times easier to understand and use compared to the old system.

#

08.03.2018 01:00

As we move into this more and more divided world, where the moderate gets more and more ignored, and not just in politics I think we are missing something.

I see a lot of people ignoring a simple details. And they are not dumb, just a little bit let’s say “unreflected”.

People do things because they have reasons for doing them. As their horizon of understanding changes they chose differently than they used to.

This is the reason politicians and other leaders don’t do what they said when they tried to get elected.

You don’t need to agree with the choices, or the reasons for doing something. But keep in mind that most people have reasons they do what they do. And very rarely they do something just to be evil or terrible.

#

08.03.2018 01:00

Imagine that Excel itself was implemented in its macro langauge: that is the power of Emacs.

#

08.03.2018 01:00

I hit my daily Move goal for the 365th time on my #AppleWatch.

#

08.03.2018 01:00

Test

#

08.03.2018 01:00

tester

#

08.03.2018 01:00

another one?

#

08.03.2018 01:00

Now?

#

08.03.2018 01:00

I’m going to give Safari a try as my default browser for a while. Chrome is a little bit weird at the moment, Firefox is fine, but the memory usage is ridiculous and it looks like shit.

Programming languages in 2018

08.03.2018 01:00

What are the programming languages I’m interested in, or are using in

1.

The ones I know and are using regularly, if not daily are: Python, Swift, JavaScript, C#, SQL, LISP and Shell scripting.

Python, Node and C# are my go to languages when I’m going to write a backend. What I’m going with depends on a number of factors. But I mostly go with Python and Django for personal stuff, because I know it so well and I think it is a lot of fun to work with. I often go with Node if I’m going to write something small and single purpose, because of how small and fast it is. And I think C# and .NET Core is a great option when you want the safety of a strong type system.

For basic scripting my go to tools bare shell scripting and Python. I use plain shell scripting when I just want to build an abstraction for some complex commands or series of commands, and I got with Python for anything more complex.

I’m digging more and more into Swift as I’m getting serious about native App Development again. I like it a lot. And I enjoy it way more than I ever did with Objective-C. The strong type system makes it a lot easier to catch stuff under development time. But I’m not a huge fan of Xcode.

Knowing how to use plain SQL is the smartest thing I ever did. It was the second real programming thing I learnt, after PHP. It is a fantastic tool to have in your tool belt for when you need to run plain sql to fix stuff, read stuff straight out of the database or to clean stuff up. Or even if you don’t want to introduce a ORM to your project.

LISP. I have developed a real interest in LISP and Scheme over the last year and a half. And I love how elegant and fun it is. I use it all the time to extend Emacs / Spacemacs.

Javascript. I still enjoy using JavaScript, especially on the front end. I think Javascript is the perfect language for anything user interface. But I think we need a “Django moment” or “Ruby on Rails moment” for it to really take off on the backend.

What are the languages I’m going to look into in 2018:

  • ReasonML. I’m going to play around with this on some small front end projects. And I might introduce it at work if I like what I see.

  • LISP. I’m probably going to play a lot more with emacs lisp and chicken scheme. Because the elegance is too much fun

  • If I find the time I’m also going to take a look at GoLang