hjertnes.blog

The Python 2 to 3 transition.

08.05.2018 02:00

The process of going from Python 2 to 3 have taken forever. It seems like Python 3 finally is the standard now. But it was not until the latest version of Django where Python 2 was deprecated. There are many different reasons for it. But it has taken way too long.

Part of the reason it has taken such a long time was that Python 2 continued to be supported alongside with Python 3, and the end of life for Python 2.7 will be in 2020. My view is that this have taken much longer than needed because of the Python 2.7 version continued to be a up to date version of Python for as long as I did. This have meant that developers of libraries and frameworks postponed adding support, and users postponed starting to use it because none of their libraries supported it.

I get why they continued to support the 2.x branch, but I think it would have been a much faster transition if it was a little bit more forced.

#

07.05.2018 02:00

The memory upgrade and new SSD for my Thinkpad arrive tomorrow 😬

#

07.05.2018 02:00

How to optimise.

07.05.2018 02:00

The basic idea behind making something fast is to take what your program does now, and then figure out the easiest way for you computer to get there. Or the way I usually say it: how do we do X by doing the least?

There are stuff that will always be slow like network operation, file system operations and input / output. For example only committing updates to the database when you have to is one way to optimise. Another is to figure out if you can run parts or all of it in parallel. And do it.

But the most important thing is that you use a profiler or a debugger to identify what parts are taking up the time and then try to make them faster. The way I usually deal with optimising is that I only start doing it after the functionality is done. And then you optimise by shaving off a second here and there in the beginning until it’s fast enough.

In some cases, though, where it being more important to be fast than everything else, you make it a policy to never commit changes before they don’t make anything slower. Like the Safari team have.

Ink Review: Diamine Saphire Blue

07.05.2018 02:00

I got this ink from Tudos for the purpose of reviewing it, free of charge.

I just inked all of my pens in rotation up with this ink. And it behaves like the other two Diamine inks I have used in the past. It dries a little bit slower than Iroshizuku inks, but not too bad. And the flow is a little bit slower than Iroshizuku. But not that bad in the scheme of things.

This ink has a lovely light blue colour. It kind of reminds me of the standard blue colour you get with all Pilot fountain opens. But better than that in all ways. Because like everyone who reads this site knows: I can’t stand that colour. It looks

If lighter colours are your thing I would recommend this ink. It is not something I would buy, because I do in general prefer darker colours.

The Diamine inks are great, they have some very interesting colours, and is a great option if you are willing to sacrifice a little bit on inflow and dry time for great colours.

#

04.05.2018 02:00

@hjertnes You don’t have a freaking drivers license and you’re listening to a trucking podcast?!?

AIrPods First Impressions

04.05.2018 02:00

I write this around 24 hours after I got them.

The AirPods are the perfect Apple Product. You just unpack them open the lid next to your iPhone, tap connect and put them in and start listening to Motorhead. They sound great, don’t fall out of your ears and just work. Some in ear plugs are not comfortable to use hours after hours, these are. They also strike the perfect balance in many ways, the battery life are not the best, but you just stick them in the case for a while and you have more battery life.

There are some stuff I don’t like about them though. It seems like the case will get really dirty very fast. And I wish it was easier to see the battery status of everything on my iPhone.

And I want to buy the person who came up with “AirPods” and “EarPods” a beer.

Travel mugs

04.05.2018 02:00

I’m a travel mug person. They have been a regular part of the stuff I bring with me outside the house for a very long time. The reason is that I like to drink coffee on my way to work. No matter if it is five minutes or 30.

My view is that most if not all travel mugs suck. You have those that are built well and then you have the rest. Those who are built well are expensive, but they don’t leak or anything like that. But they don’t last forever. The way most of the good ones work is that they try to make sure that the temperature of the coffee remains as close to what it was when you put it into the cup as long as possible.

I’m not a huge fan of steaming hot coffee. I like the cold enough to drink it without having to worry too much about burning my lips off. The way I solve this is by putting a few ice cubes in my cup after brewing pour over straight into my travel mug.

Then you have the lid. I don’t think the lid problem have been solved yet. Because it so easy to burn yourself if the coffee in your mug is too hot. The reason is that the angle your are pouring versus how much coffee are coming is off compared to a regular cup or a mug. The typical: nothin nothing and then way too much. What I would love to see, even though I have no idea how it would work, is a dual compartment cup, one upper compartment where you could leave some coffee to cool off and then drink it. Again no idea how it would work.

I use a Contigo mug at the moment. It uses a auto seal system, where you have to press while drinking. It work well enough. But you need to make sure to cool the coffee off in advance. I’ll probably get another one the next time I’m buying a mug. Most good travel mugs either come as one you need to open and close or some kind of “press to unlock” system. I prefer the latter.

#

03.05.2018 02:00

This looks really interesting: Bitwarden

#

03.05.2018 02:00

Like: Philosopher Ludwig Wittgenstein invented the emoji Quartz