0

Better tab completion for Mac OS

When I use Mac OS I miss Ubuntu. I spend a lot of time in the terminal (in either OS) and find it frustrating how Mac is brain-dead when it comes to tab completion. Fortunately, some helpful souls have worked to fix the issue. There are only three steps:

0

Learning Mock with Michael Foord

Mocking is a technique to help you test your code by replacing the pieces that don’t need to be tested with “mock” objects that behave in a similar way. For example, if you want to test a module that returns the weather from a web service, you can “mock” the web service so that it returns predictable results. Here is a three part video I’ve created with Michael Foord, author of the Python Mock library which will be included in Python 3.3.

A Gentle Introduction to Mock for Python (part 1 of 3 – 13min)

Why use Mock? (part 2 of 3 – 3.5min)

Mock and Django (part 3 of 3 – 38min)

by jpwatts 5193807292_d0e861cbf5_b

I should know better than to read the news right before bed. I know I’m not going to be able to sleep tonight without mentioning this. Daring Fireball author John Gruber posted a link to an article on MSNBC.com that studied 36 years of polling data and came to the conclusion that conservatives’ confidence in science as an institution has steadily declined in America. He’s right, it is a shame, but it would have helped if the “news” article wasn’t actually written as a PR stunt to sell a book by Chris Mooney.

0

Using Selenium Simple Test

Unit tests are a great way to test your code but some interactions are hard to verify unless you open a browser and click around. Selenium is a great tool for automating a web browser but the learning curve is a bit steep. Selenium Simple Test is an easy to learn tool that allows you to harness the power of Selenium for your own projects.

Here is a two-part video series that I recorded to help you understand SST and begin using it for your projects.

Selenium Simple Test quick demo (5 min)

Interview with SST creator Corey Goldburg (23 min)

0

How to turn $10 into $100

It’s called “work.” It’s good for you.

0

If the latest news is upsetting you

news by fhashemi 84663672_b0b4922b79_o

I just want to remind everyone in the USA that this is a special time in our political process. Election season is beginning soon, and furthermore, there is an incumbent in office. Therefore the opposing party’s #1 goal is to show that the existing president is doing a poor job. It is their only chance.

What this means is that every little mistake and unpopular decision, and believe me, everyone in authority makes mistakes and/or unpopular decisions, will be magnified as much as possible.

yubi-key-snap

As an experimental work project, my team is evaluating the yubikey as a 2 factor authentication device for login.ubuntu.com. The user interface suggested by Yubico leaves me wishing for something better. Here is an idea I have, please let me know your thoughts.

The beginning by Teymur Madjderey 4263181062_c7549a66a4_o

Here in America and likely abroad you may have seen billboards or heard news that the world is ending May 21st. The scale of the advertising campaign proclaiming this event lends a little bit of credibility to it. A website erected for this event contains detailed arguments and expositions explaining how this man, Harold Camping, came to the date. Unfortunately Harold’s arguments have a very simple flaw that completely ruin this entire premise.

1

Django: sorting by popularity

spinout by Jeremy Brooks 4096833649_b38c277101_b

Imagine you have a list of categories and you want to sort them by popularity, so that the most used categories are first. Django’s documentation left me scratching my head a bit. It took some time and fiddling to work out a good way to do it, I hope this is helpful and clear to you.

0

4 hour work week: another way

Light bulb by Sander van der Wel 5097223942_40bcbecfc3_o

There was a book that made a lot of ruckus a while back called “The four hour workweek” by Timothy Ferriss. The premise was that you could do some clever stuff and live comfortably now instead of waiting until you retire. I recently had an idea on a different way to enjoy the four hour work week, but first we need to revisit some basic principles of high school physics.