English Keyboard on a Swedish MacBook

16 August 2016

I have been writing code with an english keyboard layout for the last 18 months or so. I tried it mostly for fun at first, but I quickly realized how much easier it was.

I won’t go into details as to why it is easier, just trust me. Or google an image of an english keyboard. Basically most characters require either just a single button, or Shift combined with a button. Most of the time less fingers are involved in typing one specific character.

So writing code is way smoother… But I still need åäö from time to time. I want the english layout, but still being able to write the swedish letters as easy as possible.

In Linux I had a pretty sweet setup for this. Alt Gr in combination with the buttons I would normally use for the swedish letters would give me those letters. I haven’t found the same easy solution in macOS. Until just this week I used to switch between the english and swedish layouts with Ctrl+Alt+Cmd+Enter. This is kind of awkward most of the time, since I usually lost track of what the current layout was. And some apps even switched for me without me noticing.

This new thing that I found lets me completely move over to the english layout.

To get those swedish letters that I need I can simply hold down a and o respectively then either pick a letter by pressing a number or using the arrow keys. Type A and O to get the capital ones.

I just removed the swedish keyboard layout as an Input Source. I think I can get used to this.


Contributing to React - Part 1

02 May 2016

I’ve been writing a bit of React during the last few months. Today I decided that I’m going to really make an effort to contribute. I’ve had this idea before when working with Angular and other frameworks, but it is intimidating. I guess I’m afraid of feeling stupid and rejected.

I feel fairly comfortable with JavaScript, JSX, ESlint and all the other tooling and techniques that surrounds web developers today. But this thing is something else. This feels too hard for me. Contributing to React means someone at Facebook, or at least a member of the core team, needs to look at my code and decide that it’s good enough. And on top of that decide to merge it. That’s scary. I don’t write that kind of code. Those guys are geniuses. I’m not.

F**k this, I should at least give it a shot. Where do I start? I know how to use React, but I don’t know how it works internally. I have no idea what needs fixing, what features they are looking to implement or what can be optimized.

It turns out that the developers involved in React are making it easier to get into contributing. They are actually categorizing some issues on GitHub as good first bug. That’s awesome.

Good First Bug

Right now, there are 22 open issues in that category. Most of them are quite old. Are the developers really not touching these to give us a chance? Maybe they’re just not important enough to fix. I don’t care, it’s a perfect entry point for someone like me.

Maybe I’m moving a bit to fast. Even if I find an issue that needs fixing, I wouldn’t know where to start. I feel like React is this gigantic magic box. I should probably spend some time demystifying that first. That’s part 2.