GitHub for reviewing code

At my company, we’ve been using GitHub’s builtin code review tool. I totally agree with this assessment. GitHub would reap huge dividends by focusing more UX resources on their code review functionality.

Wrong Side of Memphis

A couple of weeks ago we started (in my current job) to use GitHub internally for our projects. We were already using git, so it sort of make sense to use GitHub, as it is very widespread and used in the community. I had used GitHub before, but only as a remote repository and to get code, but without much interaction with the “GitHub extra features”. I must say, I was excited about using it, as I though that it will be a good step forward in making the code more visible and adding some cool features.

One of the main uses we have for GitHub is using it for code reviews. In DemonWare we peer-review all the code, which really improves the quality of the code. Of course, peer-review is different from reviewing the code in an open software situation, as it is done more often and I suspect…

View original post 1,552 more words

Advertisements

The temptation of arrogance

I wanted to change the default alert sound for Calendar events on OSX Yosemite. I found a thread on discussions.apple.com about it. First, I was surprised to find there’s no way to customize the sound effect in the UI. Second, I was shocked to find this reply in the thread:

Let’s think about this.

This user is sincerely making the case that updating a config value in an obscure file (XCode recommended, by the way, because we don’t know the side effects) is a better solution than selecting an option from a menu in the Calendar app.

I’ve also seen this kind of arrogance in StackOverflow threads and other technical forums. When someone asks how to do something, someone replies to ask, “Why would you ever want to do that?”

It’s always disappointing to me to see technical knowledge being wielded as a weapon like this. A lot of people in the tech community lack the tiny amount of discipline required to act politely toward those who know less. It casts all of us in a bad light.

Installing a cursor position custom plugin in Sublime Text 3 on OSX

I couldn’t find any useful resource about how to install a custom Python script plugin in Sublime Text 3. It took me a while to figure it out, but the solution seems easy in retrospect.

In Sublime Text, the bottom right corner of the window displays the line and column position of the cursor. For example, it might say:

Line 11, Column 35

..to denote that the cursor is currently at the 35th character on the 11th line of the file.

My goal was to get a counter that shows an absolute counter of the cursor’s position from the beginning of the file. I wanted this:

Character 1324, Line 11, Column 35

After some digging around on the internet, I found this plugin on GitHub, which was actually taken from this post on StackOverflow.

However, all the information about how to actually install this on OSX seemed to be outdated. They wanted me to save the Python script as a file in directories that did not exist. If I created the directories required and restarted Sublime Text, I would either see no effect or get an ugly error message.

The solution turned out to be simple. I just had to open Sublime Text, and find the right menu item:

Tools > New Plugin...

Then, I just pasted the script from GitHub into the window and saved it as charPosition.py.

Now, the bottom-right corner of my Sublime Text window looks like this:

Screenshot 2015-11-20 21.13.52

A hidden gem in Manning and Schutze: what to call 4+-grams?

Bcomposes

I’m a longtime fan of Chris Manning and Hinrich Schutze’s “Foundations of Natural Language Processing” — I’ve learned from it, I’ve taught from it, and I still find myself thumbing through it from time to time. Last week, I wrote a blog post on SXSW titles that involved looking at n-grams of different lengths, including unigrams, bigrams, trigrams and … well, what do we call the next one up? Manning and Schutze devoted an entire paragraph to it on page 193 which I absolutely love and thought would be fun to share for those who haven’t seen it.

Before continuing with model-building, let us pause for a brief interlude on naming. The cases of n-gram language models that people usually use are for n=2,3,4, and these alternatives are usually referred to as a bigram, a trigram, and a four-gram model, respectively. Revealing this will surely be enough to…

View original post 235 more words