-
Recent Posts
Links
Archives
- May 2025
- April 2025
- March 2025
- February 2025
- January 2025
- December 2024
- November 2024
- October 2024
- September 2024
- August 2024
- July 2024
- June 2024
- May 2024
- April 2024
- March 2024
- February 2024
- January 2024
- December 2023
- November 2023
- October 2023
- September 2023
- August 2023
- July 2023
- June 2023
- May 2023
- April 2023
- March 2023
- February 2023
- January 2023
- December 2022
- November 2022
- October 2022
- September 2022
- August 2022
- July 2022
- June 2022
- May 2022
- April 2022
- March 2022
- February 2022
- January 2022
- December 2021
- November 2021
- October 2021
- September 2021
- August 2021
- July 2021
- June 2021
- May 2021
- April 2021
- March 2021
- February 2021
- January 2021
- December 2020
- November 2020
- October 2020
- September 2020
- August 2020
- July 2020
- June 2020
- May 2020
- April 2020
- March 2020
- February 2020
- January 2020
- December 2019
- November 2019
- October 2019
- September 2019
- August 2019
- July 2019
- June 2019
- May 2019
- April 2019
- March 2019
- February 2019
- January 2019
- December 2018
- November 2018
- October 2018
- September 2018
- August 2018
- July 2018
- June 2018
- May 2018
- April 2018
- March 2018
- February 2018
- January 2018
- December 2017
- November 2017
- October 2017
- September 2017
- August 2017
- July 2017
- June 2017
- May 2017
- April 2017
- March 2017
- February 2017
- January 2017
- December 2016
- November 2016
- October 2016
- September 2016
- August 2016
- July 2016
- June 2016
- May 2016
- April 2016
- March 2016
- February 2016
- January 2016
- December 2015
- November 2015
- October 2015
- September 2015
- August 2015
- July 2015
- June 2015
- May 2015
- April 2015
- March 2015
- February 2015
- January 2015
- December 2014
- November 2014
- October 2014
- September 2014
- August 2014
- July 2014
- June 2014
- May 2014
- April 2014
- March 2014
- February 2014
- January 2014
- December 2013
- November 2013
- October 2013
- September 2013
- August 2013
- July 2013
- June 2013
- May 2013
- April 2013
- March 2013
- February 2013
- January 2013
- December 2012
- November 2012
- October 2012
- September 2012
- August 2012
- July 2012
- June 2012
- May 2012
- April 2012
- March 2012
- February 2012
- January 2012
- December 2011
- November 2011
- October 2011
- September 2011
- August 2011
- July 2011
- June 2011
- May 2011
- April 2011
Categories
Meta
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.
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.
The Truth About Emacs
Seems right to me:
The truth about #Emacs: Everything seems way too hard at first, then you use it for a while, then you can't live without it.
— Mohit Thatte (@mohitthatte) March 21, 2015
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
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:
"i don't know
much about agile. But I think X". Yeah. That's because you
don't know much about agile. And you're an eejit.
—
Nic Ferrier (@nicferrier) March
30, 2015
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.
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.
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):
Tories plan porn site age checks http://t.co/mftZlYDrHq <- more unicorn-farming fantasies from the techno-illiterate
— Simon Phipps (@webmink) April 4, 2015
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.