The Tricorder Draws Nigh

First Prototype of a Working Tricorder Unveiled at SXSW

Posted in General | Tagged | Leave a comment

Python Tools for Emacs

Sean Dague, who works on OpenStack, has a nice post on Emacs Python tools he uses to deal with the large Python code base of the project. If you work in Python, you’ll want to take a look at his post. You may pick up some useful ideas.

If you’re familiar with cscope, you will probably be interested in PyCscope, a project that parses your code’s Python AST to build a cscope index. The project’s README says that using the Python AST gives a much more accurate index than using cscope alone.

He also mentions fly-hack a backend for flymake that extends flake8 with some additional rules. Again, if you’re writing in Python, you may get some ideas.

Dague discusses other tools as well so you should definitely give his post a read.

Posted in Programming | Tagged , | 5 Comments

Abrams on Literate Programming

Howard Abrams has a nice post on Literate Programming. By now that’s a fairly hoary subject—the idea dates back to Knuth in the early 1980s—but Abram’s post is nice because it considers how to do this with Emacs and Org mode.

If you’ve been reading Irreal for a while, you know that I really like and use Org Babel all the time. It’s perfect for reproducible research and keeping all your calculations and data with the rest of your report or paper. John Kitchin has really leveraged this idea for his group’s publishing. His publications are generated directly from Org mode with the calculations performed in Org mode code blocks right in the source file.

Another possibility with Org mode and code blocks is to export the code to another file using the tangle command. That way the code can be compiled separately while at the same time appearing as part of the documentation. Since the code source file is generated directly from the documentation, the code and documentation never get out of sync (although the commentary may, of course). Abrams shows how to do this with a nice, easy-to-follow example and then shows both the finished document and the resulting code files (one for the code, one for the tests).

If you’d like to try Literate Programming but want a lighter weight approach than CWEB, give Abrams post a read. It’s really easy to try the method out to see if you like it.

Posted in Programming | Tagged , , | Leave a comment

The Truth About Emacs

Seems right to me:

Posted in General | Tagged | 1 Comment

The//Intercept on Choosing Passwords

The//Intercept has an excellent article on how to choose secure passwords that are (relatively) easy to remember. The problem with passwords is that they are almost never secure. Most people choose stupid ones (password, 123456, \(\dots\)) and even those of us with a bit more of a clue can almost never choose a good one. The reasons for that are psychological but the TL;DR is that humans appear to be preprogrammed to prefer patterns even when they’re trying not to.

Because of this, the only secure passwords are randomly chosen ones where the human proclivity to impose order and pattern on them can not come into play. That’s why secure password management requires a password manager such as 1password, KeePassX, or similar program. These programs choose long random sequences of characters that are very secure for passwords and then store them in an encrypted database.

The only remaining problem is choosing a password for the password manager. It holds the crown jewels so passwords like password are non-starters. The//Intercept’s recommendation is one that I’ve given here many times: Diceware. The idea is that you roll 5 dice to randomly choose a word from the Diceware list. Do that 5, 6, or 7 times and you have 5, 6, or 7 random words that together have enough entropy to resist even NSA brute forcing. This, of course, is the idea behind the famous XKCD Correct Horse Battery Staple cartoon. The big advantage of a sequence of random words like this is that while they have the same or more entropy than a long random sequence of characters, they are relatively easy to memorize.

I previously posted a Lisp implementation of Diceware that uses a cryptographically secure random number generator and is therefore very secure. There is also C version that’s a bit has a tiny bit of bias and is therefore slightly less secure. It would be easy to make it completely secure by using the 8K Diceware list that the Lisp version uses.

UPDATE: Intercepts → Intercept’s

Posted in General | Tagged | Leave a comment

Ferrier on Agile

InfoQ has a nice interview with Nic Ferrier on good software and agile. Irreal has mentioned Ferrier several times: he’s a good hacker and someone who deserves to be taken seriously.

Ferrier’s take is the agile is a way to improve communication among a development team and that many of it’s most contentious features are not really so much essential to agile as a possible way of increasing that communication.

Take a look at the interview to get the best idea of his views. I don’t know much about agile and therefore don’t write about it very much because I don’t want to be this guy:

Posted in Programming | Tagged , | Leave a comment

Discovering Calc

As some of you know, learning more about about calc has been on my TODO list for sometime (that’s literally true—it’s in my agenda). I last wrote about it just last week. I’ve finally stopped procrastinating and starting learning calc.

I began by reading the first of the three manual sections, Getting Started. This section gives a brief demonstration of how calc works and highlights some of its capabilities. Like those who came before me, I was left in awe. I knew it was quite capable but had no idea how capable.

One of the big items for me is arbitrary-size arithmetic. It seems I’m always fiddling around with large numbers and native 64-bit integers simply aren’t big enough for a lot of what I do. That’s why I usually bring up a Lisp REPL for my calculations—the big int arithmetic. I’m not going to give up my Lisp REPL, of course, but for quick calculations calc seems like a real win.

My next step is to tackle Part 2, Tutorial. As I work through that, I’ll probably make occasional posts of interesting things I discover. So far, my only regret is that it took me so long to get started. If you have to do non-trivial calculations and use Lisp, or Python, or something similar, you really should give at least the first part of the calc manual a read. It may suggest a new—and sometimes better—approach.

If reading the manual seems too arduous, Karthik C has a nice video that shows off some of calc‘s capabilities. It’s just short of 49 minutes so you’ll have to schedule some time. Very much worth your time though.

Posted in General | Tagged , | 9 Comments

New Programming Jargon

Recently, I wrote about the glories of the Jargon File and remarked that the hacker jargon it records is often hilarious. It’s easy to burn up a couple of hours browsing around in it.

Now Jeff Atwood over at Coding Horror has a list of his 30 favorite new terms that he’s culled from Stack Overflow. These are very funny and definitely worth a couple of minutes of your time.

Some of my favorites are:

  • Yoda Conditions
  • Higgs Bugson
  • Common Law Feature
  • Protoduction
  • Jenga Code

I’ll let you check Atwood’s post for their definitions. Go ahead; you need a bit of comic relief.

Posted in General | Tagged | Leave a comment

Britain Too

It turns out that it’s not just the U.S. Britain, too, has bozos in charge of keeping us safe (via Nic Ferrier):

Posted in General | Tagged | Leave a comment

No Shame

FBI Director James Comey just hates it that he’s not able to snoop on us at will. His shameless invocation of the 4 Horsemen descends into self-parody.

Sadly, his message resonates with some of our more weak minded representatives, one of whom professes himself shocked, shocked, to discover this thing called encryption. Want to worry about public safety? Ponder the fact that bozos like this are in charge of it.

Posted in General | Tagged | Leave a comment