One year at the helm of Vim

One year ago I started using an old text editor called Vim. I’m happy to say that I’m still sticking with it. I’m now very comfortable with VIM and more empowered translate Ideas into working solutions.

In this year I’ve become accustomed to working the terminal, embracing the VIM way while realizing that that coding is just one part of the challenge.

Not your IDE

Transitioning from PhpStorm, I desired the same IDE-like features in VIM. After multiple config changes and plugin tests, I had an epiphany: VIM is an editor and that’s it. It is one of the tools in your shed. You combine it with other command line tools to empower an efficient workflow. I believe this is key to making the most of VIM.

With this also comes the realization that tabs, though it looks nice, is not the most efficient way to switch between files. A short list of buffers is the way to go. I always close the editor when I’m done with a task and re-open it for the next one. This ensures that all current buffers are closed and I can start with a low memory footprint every time.

Who Uses Caps Lock anyways?

A common thing in the VIM community is to modifying CAPS LOCK key. As a programmer you don’t really use CAPS LOCK, you will mainly use SHIFT for upper case. Some VIM users take CAPS LOCK as an extra escape and others as another CTRL. I have chosen CTRL as many commands require this button, which is awkwardly placed on my Mac Keyboard.

Hard Times are good for you

One of the first things I embraced was Hard mode. With this activated, VIM disables the arrow keys for navigation and stops you from jumping up more than one line at a time (using h,j,k,l). This pushed me to use other movements. I would argue this to be a must for any VIM beginner. You simply don’t understand how powerful these other movements are until you get used to them. It is excruciating in the begging but the benefits far outweigh the cost. After some time I turned this mode off and used “Hard Time” instead, which works the same but is a little more forgiving.

Undo and try again

Practicing all the time is critical to mastering VIM. By practicing, I mean on the Job training, while you’re working and editing. If you find that you did something and it took too long, or you remember a faster way to do it. Stop, undo and redo it in a more efficient way. This more effecient way becomes the default going forward and you save yourself many many seconds in future. Adding all these ups definitely increases your editing speed.

Another note on this is not to worry about the time it takes to add a shortcut to your config files. Every second you shave off your workflow gets multiplied by how many times you have to repeat the same editing tasks and this is a major win!

Trying not to use so many plugins

The VIM plugin echosstem makes it much easier for newbies feel comfortable and for masters to craft the exact experience they desire.

I discovered that plugins can get in the way just as much as they can help. You need to make sure you really need a plugin before installing it. What I do is try to I try to get away without a plugin to see if I cant modify my VIMRC to do the same thing a plugin does. As a last resort, I’ll use a plugin.

Onwards and Upwards?

I would encourage everyone to learn VIM, but honestly but I understand that not every workflow will benefit from being close to the Command Line.

You are not in a mutually exclusive relationship with your editor. Use the one that’s better for the task at hand. I occasionally jump into Atom ( forgive me VS Code champs ). As Daniel Miessler puts it, the content matters more than the editor.

Let’s not allow our tools to get in the way. These are our weapons of mass impact and ultimately only a means to an end.

When are you proficient in a programming language?

Learning a programming language gives you the opportunity to explore other problem domains alongside new approaches to addressing familiar problems.

I write this as I was looking for the answer to exactly this question. There were many opinions that had me confused, some from ancient rockstar ninjas who command CPUS at will and others from earnest people who are also seeking.

Why would one ask such a question in the first place? It seems like the actual issue is 2 fold. For me it is firstly; when can this go on my resume. Secondly and probably more specific to me: when to move on to the next language or skill. When can I check off my to-do list and say that I know a programming language?

After looking at many other ideas, In my opinion: You are proficient in a language when you are able to read, understand and debug code along with deploying to production.

If you can read, write and execute you are well on your way and I would consider this profecient. Beyond this, optionally, persue mastery. Though in order to keep a language on your resume, make sure to continually read, understand and debug.

Link to other opinions: https://softwareengineering.stackexchange.com/questions/154862/at-what-point-can-i-say-ive-learned-a-language

Why I’m learning a new Programming Language called Go

For the past few years, I got stuck in a rut, a good one. My sole focus was not the technology I used. but rather the thought processes behind why and how I write code. I write in PHP and I mainly focus on the WordPress CMS. This pays the bills and helps me take care of my family but, while focusing on thought processes, I didn’t realise that learning a new language can have the same effect, helping me think differently about similar problems.

So why Go (#golang)? This one I stumbled upon by accident. A colleague of mine, Akeda, automated one of our workflows. Before this, we had a weird process involving multiple tools and steps. His script made life just a little easier. I thought one could improve it just a little bit more, but in oreder to do this I had to go digging into Go source code.

After hacking on this project and getting it “mostly working” I decided to dig a bit deeper into Go. I found out immediately that it was created by a few very smart people at Google. It is open source and has a very strong community. More specifically, Docker, the tool I use all the time, was written in Go(mind blown gif goes here).

With Go you to create systems software. I know my way around PHP and this is great, but there are a few things an interpreted language simply can’t do. This presented me with another opportunity to learn.

Go is written in Go! Yep, that means you can eventually read and contribute to any bugs in the language itself, if that’s something you’re interested in. I think it’s great that one only needs to learn on language to get involved with an entire commuinity.

Learning GO is free, no need to buy expensive books. Do the tour, then work through How to write go code and then read Effective Go. After this, you can start using the language. If you are new to programming you may need more help.

With Go, most of the tooling forms part of the language. The following things are already included: code documentation generation, testing, dependencies etc. In most languages I know these are third party tools. They may not work exactly how you want them to, but they work and they remove the burden of having to choose between third-party options. Though third-party options are available, the idea is that everything you need to be productive should be part of the language.

New languages force us to think differently about the same problems, as per this stack overflow answer:

It’s not about the next “new thing”. It’s about thinking in different ways outside of your normal thought patterns

I hope this inspires you to pick up a new language. There are so many to choose from.

Featured image is a gophers, the Go mascot. It was created with https://gopherize.me/. Creating a unique gopher.

Technology does not make us any better

Technology didn’t make our lives better, it simply changed what we can accomplish, but it seems, humans are still very much like we were 100 year ago:

Greedy, Selfish, Looking to impress, Wanting to do good, Doing good and so the list goes on.

We now only have better tools. Tools that allow us to do more harm and more good. But this is just more of the same. More of what we’ve always been doing. More harm but also more good.

They say it is exactly the same with money. Money doesn’t make you bad or good it just amplifies who you already are. Money gives you more options, but which ones you choose largely depend on who you are.

It all balances out in the end. We should not look to technology to make our lives better, we should look at how we treat the people who can do nothing for us. That is who we are. If we can better that, we can better ourselves.

Microservices Are Something You Grow Into, Not Begin With

The craze around microservices is great, but starting small and simple is the best use of our limit time, specially when starting a new project, More on this from the link below:

https://nickjanetakis.com/blog/microservices-are-something-you-grow-into-not-begin-with

Golang Channels: explained simply

I see go channels as a pipe connecting two air tight vacuum cleaners. One vacuum cleaner can not push anything into the pipe, if the other vacuum is not pulling from the pipe. Both need to do the opposite action. If one sends the “package” will be stuck until the other turns on it’s receiving action.

Channels can contain multiple slots for “holding” the “packages”.

Pushing more into the pipe than wha the pipe can handle results in a broken pipe.

I also think of it as a queue, first in, first out ( last in last out ). The only difference is this one is ultra sensitive and very particular.

Colemak Keyboard Layout, 1 Month(ish) In

Typing is one of the most important aspects of my professional career.  That’s why, a month ago, I decided to change my keyboard layout to Colemak.

The first hurdle I faced was switching in December, what a weird time to switch right?  I was supposed to be scaling down and focus on relaxation, but I thought the switch to be such a huge challenge, that It wouldn’t matter when I did it.

The second hurdle: I went cold turkey. I simply switched, printed out the new layout, gave it a solid glance and memorized all the new positions and kept it next to my desk. I watched my typing speed go from 35 WPM(words per minute) to 9. And my frustration levels go into the red.

I started to use this at work immediately. I warned my team mates and just jumped in. A good thing this sort of thing is encouraged at Automattic.

colemak_print_out
Learning the new layout.

The two things that helped me the most during the first month was Type Fu and a supportive team.

With Type Fu you repeatedly type similar phrases until you “master the keys. At this point, you move on to the next level with more variation. It also has a setting to select the keys you battle with and only focus on them.

Screen Shot 2018-01-16 at 6.12.34 AM
Doing typing drills in Type Fu

My current speed is 30 WPM. I use it as my default layout and I’m way more confident than I was a month ago. My main take away is that, if I can go from 9 -30WPM in a month then I’ll be more productive as time goes on.

I hope to increase this as I continue to practice every working day.

Colemak Fingers

I’m switching to Colemak. It’s an alternate keyboard layout that allows you to type while your fingers travel shorter distances. You can read more about the reasons this is better than QWERTY here: http://chetansurpur.com/blog/2012/11/colemak.html

My main reason for switching is that so many others at Automattic made the switch and had only good things to say. For me it came down to comfort, speed and the joy of trying something new.

I was considering the impact that this will have on my work as a programmer, but figured there will never be a good time to do this. There will always be deadlines, things to get done and communication to be had. So now is the best time.

Also, it’s time to try something new as QWERTY hasn’t done me much good. My current typing speed and accuracy is terrible and I experience pain in my wrists. I pathetically type 30wpm with 77% accuracy. My goal is 100wpm with at least 90% accuracy.

I hope to improve accuracy and typing speed and so my productivity and reduce fatigue in my fingers.

I’ll write more about my journey.