Updates to my Vim workflow

I know vimfu

I know vimfu

The best way to improve your vim-fu is to do so incrementally. There have been a few inefficiencies in my current workflow that I’ve tolerated for the longest time. I’ve squashed a few of them today.

The first is auto-completing brackets. I used delimitMate for this. So now typing < automatically results in <> with my cursor in insert mode inside the triangular brackets.

The next one is auto-completing HTML tags. I have no idea why I’ve waited this long to get it fixed but closetag does the job well. To use, simple type <div> followed by ctrl-_.

The last one is great for finding bugs in your HTML. What matchit does is that when you press %, it cycles between the opening and closing tag where your cursor is currently located. Again, I’ve waited too long to fix this annoyance. This probably says more about my laziness than my patience.

Here’s a quick glance at all my plugins and my dotfiles for anyone interested.

Vim Plugins

Vim Plugins

Advertisements

To Learn, Must One Always Be In A State Of Discomfort?

Mind the Knowledge Gap

Mind the Knowledge Gap

I’ve been coding Django apps for about 2 years now. I can initiate a server running Arch Linux, get it up and running and deploy my Django app in a couple of hours. I code using Vim. I use zsh as my default terminal. I know enough unix commands to perform the usual sed/ack/grep (or Ag if you’ve downloaded Silver Searcher). Conceptually, I can explain most web development concepts (although I stil have trouble understanding exactly what a reverse proxy does). In two years, I’ve also had to learn HTML/CSS/Javascript. It’s kinda taken for granted that and self-respected web developer would auto-learn that along the way. Understanding the subtleties of Git (merge vs. rebase) and how to use it (git flow) is also one of those ‘taken for granted’ knowledge grabs. My Python isn’t the most elegant, but give me a couple rounds of refactoring, I would have spotted and corrected most of the low hanging fruit ‘mistakes’.

There were a couple of months I felt my rate of learning wasn’t improving as quickly as before. I had become somewhat comfortable in the daily routine. This didn’t last long of course. Recently, I had to build a realtime map app for one of my products,  TripEvent. To do so, I had to use gevent-socketio. Diving into this triggered a whole chain of questions that exposed my lack of understanding about what really goes on under the bonnet.

I’ve relied heavily on my pattern recognition skills (and slavish hours just practicing, building) but there is not escaping the fact that some key computer concepts still eludes me. For example: when a user lands on my website, this generates a GET request that is processed by my reverse proxy (nginx in my case) which is somehow handed off to uwsgi which then hits my django app which finally hits my database (postgres). Is this all happening on 1 process? What happens when there are 2 requests at the same time? How does tweaking my nginx worker settings affect this? How this Python’s GIL come into play? How is multi-threading or multi-processing con-currency relevant? In the context of Python, how does gevent and its greenlets overcome this? I think you guys can see where I’m getting at.

Why is it that there isn’t any resource that explains such concepts from a web developer’s point of view? Especially one that doesn’t have formal computer science training. I imagine there must be many more people like me out there, all self taught, all wondering what really goes on under the bonnet! The information as always, is all out there. It’s piecing it together and make it conceptually sound in the context of my job (web developer) that’s hard.

I am in a major state of discomfort but this is forcing to learn and read more and ultimately plug the missing knowledge gaps. I think one always needs to be in a slight state of discomfort to improve. To be comfortable and not have questions gnawing at the back of your brain is a submission that you’ve not doing anything interest or new.