Your typing style and Vim

Caveat, this post is going to be a rant; a rant about my learning Vim. Here’s what I found. Two people, with the same mindset, and the same willpower, can take to Vim in a completely different manner. Why? Your typing style. I think by now it’s fairly obvious that I like Vim. It doesn’t have to be ugly, too. In fact, it can be beautiful.

Consolas font in Vim Powerline Windows

Update: Fixed a small rendering issue with the left-facing block arrow. If you noticed a thin line to the right of that arrow (you can actually see it in the screenshot below if you look hard), grab the latest version. That fixes the problem. Github: https://github.com/eugeii/consolas-powerline-vim A colleague of mine introduced me to the beauty of Powerline, for Vim. In short, it’s a very beautiful status bar for Vim.

Understanding C object construction and destruction

So many programs these days are implemented in C++, be it because they are using some framework, some library, because somebody “back then” thought C++ was the greatest thing since sliced bread, or simply because. It doesn’t matter actually. Fact of the matter is that when we reverse stuff, we often, often land up in C++ territory. Hence, I felt that a treatment of the matter would be useful, as I wanted to clarify some thoughts and intuitions I had, in a systematic way, especially in how objects are constructed and destroyed, and the role of the compiler – how the compiler looks at C++ source code and translates (“adds” stuff) to the final assembly/binary output.

Extracting docs from MSDN to IDA

Update: Version 1.2.1 released. msdnGrab now handles queries for both Win32 API functions and C/C++ functions. C/C++ querying has been vastly improved, and seems to work even better now. Some mistakes do happen though, but seems quite rare so far. Also added functionality to open the page in the browser to so that the rest of the information can be viewed. Usage: F3: Grab docs for Win32 API function, insert as comment Ctrl-F3: Grab docs for C/C++ function, insert as comment Ctrl-Shift-F3: Open page in browser Comments always welcome.

Why code is hard to read

We often feel that code is hard to read. The question is: why? The common arguments that you will hear may go something like: “The code is not commented!” “The programmer didn’t bother organizing!” “The programmer used funny hacks!” And the list goes on. You’ve heard them all before. Now, these are true. If someone writes a convoluted mess of code that doesn’t work, fine, toss it.

What genius really means

I believe that what differentiates geniuses and other mortals is not in what they were born with, but what they figured out – about thinking, about themselves. And how early they figured that out, because the earlier, the more practice they had at thinking differently. Critically, they figured out how to think, and they understood the meaning of deliberate practice. The word genius means different things to different people.

Life can be beautiful

There are many things in life that annoy or discourage you, may more than threaten to de-rail you, or actually derail you. In the midst of all that, to me, my constant, my rock, is God, my wife and my family. This picture embodies just that.

Pascalcase, camelcase and snakecase

Every programmer, or really just anybody who does code, probably has come across a myriad of coding styles – some pleasant, some not so pleasant. In the midst of the entirety of the “coding style”, is this little, but very significant, segment on naming conventions. Indeed coding style represents a lot more than how you name your variables, functions, methods and classes, but it would be an easy argument to say that naming convention is one of the biggest, if not the biggest, influence on how a piece of code looks like.

Open file in Vim in Explorer

I’ve been using Vim for a while, and I’m also a hardcore Directory Opus (Dopus) fan. I find that both of them complement my work well, allowing me to greatly speed up the way I handle files and edit them. However, I’ve always wanted a way to move from the very keyboard-centric Vim to a full-fledged file manager. That may be Dopus, or plain vanilla Windows Explorer, or whatever your favorite file manager utility happens to be.

Continuations in Haskell

It is assumed that the reader more or less understands the continuation-passing style. The first thing that the Cont monad does is to abstract away the need to pass continuations explicitly in continuation-passing style. The Cont monad abstracts away the handling of continuations, by creating a series of “partially applied” (I’m using this quite loosely) functions that are all waiting for their continuation. The add function was originally add x y, and add_cps became add_cps x y k.