Knowledge for the World

code

Code is poetry -- one line at a time.


How BEM works and why it's awesome

  • 2 favorites 2

Naming things is hard. "There are only two hard problems in Computer Science: cache invalidation and naming things." — Phil Karlton Truer words were never spoken.

Custom Key Mappings Vim

  • 0 favorites 0

I find Vim to be very useful in my daily development activities. I was delighted to learn that you can have your own key mappings in Vim. It is documented very well in the vim help section.

Python collections

  • 1 favorite 1

Much of what you need to do with Python can be done using built-in containers like dict, list, set, and tuple. But these aren't always the most optimal.

Debugging your Python code

  • 0 favorites 0

How many times have you been put into situations where you had to update somebody else's code. If you are part of a development team my guess is more often than you would like.

Install bourbon in your rails project

  • 0 favorites 0

Bourbon is a library of Sass mixins. It provides a lot of functionality while keeping your css slim. Assuming you're using a standard rails installation, Sass will already be installed and working.

JavaScript variable scope

  • 0 favorites 0

A scope is simply the set of variables that you have access to. Scoping in JavaScript can be confusing. Even some experienced JavaScript developers still struggle with it.

Understand Python loops

  • 0 favorites 0

There are two kinds of loops in Python. In this guide we'll cover both the "for" loop and the "while" loop. We'll also cover how to control these loops by continuing and breaking out.

Print a string in reverse in Python

  • 0 favorites 0

The solution is simple using the extended slice operator. "some string"[::-1] will print the string in reverse resulting in "gnirts emos" . This guide provides an explanation of how this works.