More Information on the Outage

Apparently, this is what’s going on that’s causing the problems with Irreal. It looks as if all WordPress sites are getting hit. I’ll post more information as it becomes available. Let’s hope this latest round of silliness ends soon.

Posted in General | Leave a comment

Outage 2

OK, I guess that worked. I had to rename the post file so that it didn’t get stuck in the queue but at least I was able to get it pushed out.

Also, I forgot to mention that there is at least one comment stuck in the moderation queue (for the Elisp Challenge post) that I can’t release because I can’t get to the admin page. My apologies to the commenter. Believe me, I’m not ignoring you—especially since your solution is close to mine.

Posted in General | Leave a comment

Back of the Envelope Calculations

I love this. I’m a big believer in the utility of making back of the envelope calculations. It’s amazing how often it can reveal poor assumptions or that someone is trying to peddle malarkey.

The technique is also extremely powerful. For example, the slides at the link pose the question: “How many piano tuners are there is New York City?” At first it seems like it’s impossible to know or that at least you’d need specialized knowledge but that’s not true. By making some reasonable assumptions—the average piano is tuned once a year, for example—and combining them with a plausible estimate for the number of families in New York, you can reach a reasonable guess for the number of piano tuners. The idea is to get an estimate that is accurate to within an order of magnitude.

If nothing else, doing some of the exercise on the slides may help you with your next job interview when someone asks you how many pizza parlors there are in San Francisco.

Posted in General | Leave a comment

Outage

I am unable to reach the administrative panel of Irreal to release today’s blog. Technical support reports that they are undergoing a DOS attack that (somehow) only affects administrative logins.

I’m going to try pushing today’s post again. If you see the post for 2013-04-13, you will know I succeeded. If you don’t see the post, all we can do is wait until the hosting folks resolve the problem.

Sorry for the outage.

jcs

Posted in Administrivia | Leave a comment

Window Configuration and Management

Xah Lee has a couple of nice posts on managing window configurations. One posts deals with having a single (large) frame and dividing it into several windows. The other deals with the opposite case of having several frames with one or two windows in each. I tend to prefer a single large frame (although I sometimes pop up another temporarily) while Lee likes several frames.

No matter, between the two posts he’s got you covered. The posts will be useful mostly for n00bs but he does mention winner-mode and windmove, packages that I only recently became aware of and started using, so there may be something there for you even if you’re an old hand.

Posted in General | Tagged | 12 Comments

An Elisp Challenge

Here’s a simple Elisp challenge suggested by a problem from by ProgrammingPraxis. We call one string a cycle of another if one string can be transformed into the other by a rotation of the characters. Note that this means

  1. They have the same number of characters.
  2. They have the same characters.
  3. The characters are in the same order when considered as a cycle.

Thus, “abc” and “cab” are cycles of each other because if “abc” is rotated right by 1 (or left by 2) it equals “cab.” Notice that “abc” and “acb” are not cycles of each other even though they meet conditions 1 and 2.

The challenge is to write an Elisp function, cyclep, that tests whether two strings are cycles of each other.

Posted in Programming | Tagged , | 7 Comments

Babcore

Arne Babenhauserheide, who you may remember as the “Eminent Babenhauserheide” from Episode 7 of Emacs Rocks!, has a nice post up on Babcore, his version of Bozhidar Batsov’s prelude. If, like me, you enjoy mining other people’s configurations for ideas to improve your own workflow, you will probably find something useful in Babcore. Everyone’s needs and interests are different so rather than list everything that Babcore contains, I’ll let you follow the link and see for yourself.

One of the really nice things about Babenhauserheide’s post is that he wrote it in Org mode so he was able to export it in many different formats. There’s HTML, of course, put he also has a link to a PDF version (for printing) and a version that contains just the Elisp that you can import directly into your .emacs. He also includes the Org source file so that you can see how he did all this. That’s very nice and serves as an excellent go-by for others who want to do something similar. As usual, the power of Org mode continues to astound me.

Posted in General | Tagged | Leave a comment

Emacs Conference Videos

The indefatigable Sacha Chua volunteered to edit the videos of the recent Emacs Conference and I’ve been looking forward to watching them. The problem was that I haven’t been able to find a list of those ready for viewing. Until now. I stumbled across this play list on the emacs-reddit which has the videos for the talks by

  • Joakim Verona
  • Nic Ferrier
  • Joe Corneli
  • Sam Aaron
  • Dimitri Fontaine

Presumably Chua will add others as she completes them.

This is a tremendous resource for those of us who couldn’t attend in person. We all owe Sacha Chua a huge thank you. Head on over to her blog and say hi and leave a note of thanks. You might also want to check out her sketch notes of the talks.

Posted in General | Tagged | Leave a comment

EmacsGolf 3

It’s been a while since we’ve had a EmacsGolf challenge but I just ran across this post from Cameron Saul with the perfect problem for us. Here’s the problem: Saul is writing some Java code that looks like this

TextView textViewRoute = (TextView)convertView.findViewById(R.id.textViewRoute);
TextView textViewDirection = (TextView)convertView.findViewById(R.id.textViewDirection);
TextView textViewStartStop = (TextView)convertView.findViewById(R.id.textViewStartStop);
TextView textViewStartDist = (TextView)convertView.findViewById(R.id.textViewStartDist);
TextView textViewStartPrediction = (TextView)convertView.findViewById(R.id.textViewStartPrediction);
TextView textViewEndStop = (TextView)convertView.findViewById(R.id.textViewEndStop);
TextView textViewEndDist = (TextView)convertView.findViewById(R.id.textViewEndDist);
TextView textViewEndPrediction = (TextView)convertView.findViewById(R.id.textViewEndPrediction);

Notice that each line is the same except for a single symbol that is repeated twice. Saul says he wouldn’t have to write all this boilerplate if he were writing in a language that didn’t hate fun. My first thought was, “or if you had a decent editor.” So our job is to show Saul how to leverage Emacs to make this a trivial problem. You’ll appreciate the challenge more when you see his solution.

Update: Fuco points out that I didn’t specify a starting buffer. Let’s assume that the buffer is empty to begin with.

Posted in General | Tagged | 3 Comments

Timeless Tools

James Bennett over at The B-List has an interesting post on editors and why, no matter what you finally decide, you should learn either Vi(m) or Emacs. He begins by noting that every couple of years there is a wave of enthusiasm for the newest greatest editor. In previous years it was TextMate, now it’s Sublime Text. But, he notes, there’s a lot to be said for investing in tools that will grow with you through the years. He makes a couple of points worth considering

  • Often the new and popular editors will boast of capabilities that are already present in Emacs or Vim.
  • Very often, the new and exciting tool will run out of gas resulting in the periodic enthusiasm for a new editor. He cites TextMate as an example of this. Doubtless, the faithful will take exception to this but he has a point that TextMate has pretty much lost its momentum.

All this is especially true of Emacs, I think, because the individual user can adapt it for whatever behavior is needed. If those needs change, it’s simple to adjust the behavior to the reflect current needs. As Bennett says, good tools grow with you.

Bennett’s point is not that you should use Emacs or Vim (although he probably thinks you should) but that you should be aware of the “old,” reliable, and proven editors and what they have to offer. That’s something we can all agree on.

Posted in General | Tagged | Leave a comment