hjertnes.blog

Infinite refactoring

10.11.2019 09:33

When I work on some personal project (I also do it at work, but it is less bad there because people start to really mock me when I say in 4 standups in a row that I have been refactoring something ridicolus) I often find myself in the situation where I start by writing some models a few Controllers with the same form I usually do things.

Then I usually refactor things as I am going and re-writes things as I find better and cleaner ways to do it.

The problem is that this takes longer and longer the more code I have written. At work it is easy I clean up the stuff I actually touch and make some stories to clean up the rest. And leave it at that.

At home however I try to not end up just cleaning things up and actually move things forward. Because I’m the kind of developer that could spend forever making code work better, and look better instead of delivering features if I have the opertunity. And I write tests for almost everything.

Or I take an active choice in every unit of code if they should be tested or excluded from coverage.

To avoid getting into this infinite refactoring loop I try to kind manage everything in a text file (usually org or taskpaper) where I have a ordered list of tasks, where I try to keep a sensible mix of real work and stuff that’s just making things nicer.

Rethinking inks

06.11.2019 20:06

I have always been a using one ink in all my pens kind of person. But recently I have grown to learn that some pens need much more lubricated inks than others. So, at the moment I have accepted that my Pilot pens always need to be inked up Iroshizuku inks. While my other pens are better with iroshizuku, but anyhting is usually fine.

So at the moment my pilots use Iroshizuku and the rest use the Pen Addict orange ink I got a way back.

Victorinox Climber.

03.11.2019 08:35

I decided to get a pocket knife a way back. It turns out haivng a small knife with some other tools are very useful. The amount of time I don’t have to stop what I was going to do to find a knife or some kind of tool have gone from most of the time to almost zero since I got this thing.

I decided to get a Climber from Victorinox. It is not huge, but still a little bit larger than what I would prefer. But the combination of features I wanted was not available on anything smaller.

After having had it for about six months, I’m mostly happy with it. But I might get something “more serious” like a Leatherman later. I have considered a few times. But the Climber covers most of my needs.

The iPhone 8 Plus

27.10.2019 07:19

When I change phone I usually sit down and review it. It might no be useful for anyone but me. But I think it may over time be useful to see how iPhones change after being in daily use for multiple years.

This have been the best phone I have ever had. It is still fast, and the battery, while not perfect better than any previous model. And the only reason I’m changing it is because I kind of loose money at work if I don’t.

If I were to pay for it myself, I would probably have replaced the battery and then used it a couple of more years.

All the previous iPhones I’ve had (4s, 5s and 6s Plus) have been too slow to be very enjoyable to use and the battery too bad to be very useful after two years.

This is good news though. Because as I have seen phone prices double it was hoping that this meant they would be useful for longer. Something they are. And as they are getting as expensive as a MacBook I expect them to be good for at least three years and useful for another three.

Likes

25.10.2019 17:46

Uploaded some photos

21.10.2019 20:19

I just uploaded some photos to Flickr. It’s what I have shot during the last month or so.

Album

Likes

18.10.2019 20:07

It have gone a couple of weeks since the last time I posted “likes”, I didn’t have any time to read much last week. So I skipped a week.

Tabs in Emacs master

06.10.2019 10:02

Some huge Emacs news landed this week. I first saw it on Reddit through @eli: Emacs 27 will support tabs, it is currently in master.

For those who are not familiar with Emacs, a buffer is a file, something that isn’t saved to a file yet or some other thing like an interactive UI. But a buffer can be open without being visible in the UI. This is very different from most editors. Some other details you should know is that what most people call a window is called a frame in Emacs, and a frame can be divided into multiple windows.

There are two different types of tab bars in emacs 27. One is per frame and the other is per window.

The per window tab bar just shows buffers you open and let you switch between them, close them (without closing the buffer). This is called tab-line-mode. While the per frame tab line let you switch between frame configurations. A frame configuration is just how you have split and resized the windows in your frame.

It currently looks like shit. Seriously. It looks horrible. But I think this is a great change that makes a lot of stuff much easier to do in emacs. Especially if you have a lot of buffers with different stuff that you want to organize in different ways.

Likes

04.10.2019 19:15

Likes

27.09.2019 21:01