Open-Offices: Still Going Strong

The Washington Post has a nice article by Lindsey Kaufman entitled Google got it wrong. The open-office trend is destroying the workplace. As the title suggests, the article is a crie de coeur on the horrors of the open-office.

Kaufman is in advertising and enjoyed a private office until her company decided to “improve communication” by moving to an open-office plan. No longer able to work in silence and concentrate on her copy, Kaufman found herself seated at a long shared table next to a woman “who I suspect was an air horn in a former life.”

It’s hard to believe that this nonsense is still going on. There’s plenty of research to show that productivity and morale plummet, easily swamping any benefits from increased communication. David Heinemeier Hansson has a suggestion as to why this is still going on.

Really, though, we all know the answer: it’s cheaper. That wouldn’t be so bad if the people imposing an open-office on their workers were honest about it. Instead, we get self-serving nonsense about “improving communication.”

I remember that the CEO of a company I once worked for decreed that all the company executives should move to the bull pen so that we could have “improved communication.” Oddly, he stayed right in his private office while everyone else suffered an environment not unlike the food court at a particularly bad mall.

Posted in General | Tagged | Leave a comment

Quote of the Day

Well, really it’s from 2010 but still pithy and worth revisiting:

I am currently working in Java to re-implement an algorithm I prototyped in lisp. If I replace all of the required curly-braces and semicolons in Java with parens it turns out that the Java program has more parens than the lisp program. The lisp program is 20 lines, the Java program has crossed 100 lines and is still growing.

That’s Tim Daly responding to Steve Yegge’s Lisp is Not an Acceptable Lisp post.

Daly makes a lot of good points and you should read his post if you’re interested in matters like this. What I like about it, though, is that it addresses the tired canard that Lisp is too annoying or difficult to use because of all those parentheses. That quote should be the standard response to any complaint about Lisp’s parentheses and even more so to every proposal to replace parentheses with indentation or whatever.

I think the problem that people have with parentheses in Lisp is that they think of them as arbitrary punctuation of the sort that they’re used to in Java or whatever horror they’re writing in. Lisp’s parentheses are, I suppose, punctuation but I think of them as part of the S-expressions that are the fundamental building blocks in Lisp. There’s nothing arbitrary about their use; every sexp starts with ( and ends with ). That’s all there is to remember. In contrast, think of the situation with ; in C or Pascal.

Posted in Programming | Tagged , | Leave a comment

Using AUCTeX

Before I started using Org-mode for most of my writing, I typeset everything using groff. I occasionally used TeX but very little LaTeX. One of my New Year Resolutions is to learn more LaTeX.

My recent post on Piotr Kaźmierczak’s use of AUCTeX had me itching to try out AUCTeX. So I loaded AUCTeX from ELPA and started working through this 3 hour introduction to LaTeX. I also had the Not So Short Introduction to LaTeX and the AMS LaTeX Reference Card at hand.

My first pleasant surprise was how easy the installation and use of AUCTeX was. I simply loaded it with ELPA, opened a new .tex file, and started using it. There was no configuration needed. I haven’t bothered reading the manual yet. The menus show the necessary key shortcuts so I learned and was using the shortcuts in no time at all.

Opening a file with the .tex extension automatically invokes AUCTeX. The two most useful things to know are that 【Ctrl+c Ctrl+c】 will compile the document. If there are any errors, AUCTeX will instruct you to type 【Ctrl+c `】 to pop up a buffer with the errors.

If the compilation was successful, you can type 【Ctrl+c Ctrl+v】 to see the paper. On OS X this invokes Preview. Other systems presumably do something similar.

If you’re familiar at all with LaTeX, you know that almost all special formatting is done in an “environment.” For example, to typeset a bullet list, you would use the itemize environment:

\begin{itemize}  % ⟵ the itemize environment
\item first bullet
\item second bullet
\item and so forth
\end{itemize}

AUCTeX makes it easy to enter environments by typing 【Ctrl+c Ctrl+e】 and then the name of the environment you want. AUCTeX will insert the \begin{...} and \end{...} commands and put the point between them. There are other labor saving features that I haven’t used yet but perhaps I’ll write about them later if I find them useful.

Two other useful commands are the ones that Kaźmierczak wrote about. You can format your input by section, region, environment, or paragraph. You do that by typing 【Ctrl+c Ctrl+q Ctrl+X】 where X is s, r, e, or p depending on what you want to format.

If you have a long paper, you may not want to typeset the whole paper every time you want to check some formatting. Instead, you can preview the code at point, environment, section, region, buffer, or document. You do that by typing 【Ctrl+c Ctrl+p Ctrl+X】 where X is p, e, s, r, b, d.

The great thing about AUCTeX is how easy it is to learn and use. Often complicated environments like AUCTeX are difficult to learn and may or may not be easy to use when you do learn them. AUCTeX is easy right out of the box. Use the menus the first few times you invoke a command and after a very short time you will have learned the key shortcuts. I love this package.

Meanwhile, abo-abo over at (or emacs has a post on an enhancement that he calls latex-wrap-region. The idea is that you have some highlighted text that you want to wrap in an environment. You simply call latex-wrap-region and select the environment you want. See abo-abo’s post for the details.

Posted in General | Tagged , | 8 Comments

Org Mode for Research Papers

Vikas Rawal has an excellent introduction to using Org-mode for writing academic research papers. Rawal is mainly interested in statistical studies so his introduction emphasizes R but not in a way that excludes using his notes for other languages. Almost everything he says about using R (except the R code itself, of course) applies to other languages as well.

Rawal practices reproducible research so his paper writing environment is structured to make that easy. All the analysis for his papers is performed by embedded code blocks so anyone who has his Org file and external data sets can reproduce his results. He doesn’t say but presumably small amounts of data are also included in the file even if they aren’t exported.

Export to PDF and HTML is handled by the excellent Org export system. Org can also export to ODT for use with Word but Rawal needs a bit more flexibility so he first exports to LaTeX and then uses pandoc to complete the conversion.

I really like these notes. If you’re writing papers (scientific or not) either as part of your job or as a student, Rawal’s note tells you how to do it easily using the much simpler Org-mode markdown instead of LaTeX itself. You need only add a bit of LaTeX boilerplate to your Org file to make things work. Rawal shows you what you need to do. He also includes a brief introduction to Emacs and Org but most Irreal readers will already be familiar with that material.

This is a great resource. If you’re writing papers, give it a read.

Posted in General | Tagged , | Leave a comment

Looking for a Fancier Mode Line?

Here’s a Stack Exchange post that tells you how.

Posted in General | Tagged | 1 Comment

SBCL 1.2.7 Is Out

It’s the beginning of the month so there’s a new version of Steel Bank Common Lisp available at the usual place. The nicest improvement, I think, is that you can now restart frames in the debugger. As usual, there are bug fixes and a few enhancements. See the NEWS file for details.

Also as usual, I want to recommend SBCL to anyone who is or wants to be Lisp programmer. It’s an excellent system that includes a optimizing compiler. Combine it with Emacs/Slime and you have a world-class Lisp environment.

Posted in Programming | Tagged , | Leave a comment

Welcome to Emacs Development

Back when Emacs moved from Bazzar to git, Lars Ingebrigtsen wrote a short introduction to Emacs development. I meant to write about it but lost track of the post. Happily, I’ve found it again and am posting about it to encourage any hackers with a few spare cycles to take part.

It turns out that the Emacs bug tracker has a wish list so you can jump right in enhancing some existing feature. Ingebrigtsen’s post tells you how to get the Emacs repository, compile Emacs, and access the wish list. You can, of course, also tackle some of the bugs if you’d rather.

The worst part is executing the FSF copyright transfer. It’s much fussier than it should be but not really hard. You just email in a form, electronically sign the contract that you get in return, and email it back. You can also do everything by snail mail if you’d rather. Do it right now, though, because there’s lots of lag time and when you have a patch ready to go it’s very frustrating to be sitting around waiting for the FSF to do their thing.

Posted in Programming | Tagged | Leave a comment

Finite State Machine Parsers

Back when I was programming network code in C, one of my favorite strategies was to to implement protocol processing as a finite state machine. I found the design was always easier to understand and modify, often by simply changing an entry in the state table. I found I could often use it to simplify non-networking code too.

Robert David Graham and Peter C. Johnson have a very nice research report on Finite State Machine Parsing for Internet Protocols: Faster Than You Think. They claim that with a little hand tuning that takes the instruction pipeline and L1 cache into account, they can produce FSM parsers that out perform alternative methods. The paper doesn’t show more than a few tidbits of code but they do describe their general approach in detail.

I really enjoyed reading the paper and if you like getting deep into backend coding, you probably will too. They even talk about the Aho-Corasick algorithm1, one of my favorites.

As I said, a nice paper and well worth a read. If you don’t know how to use FSMs in your programming, it’s worth taking an hour or two to investigate the technique. It will pay you tremendous dividends every time you can use it.

Footnotes:

1

Aho-Corasick is the algorithm behind fgrep that searches text for several strings at the same time.

Posted in Programming | Tagged | Leave a comment

Attack on the Scientific Method

I just read a horrifying article in Nature. The article, Scientific method: Defend the integrity of physics, recounts an effort among some theoretical physicists to redefine the scientific method so that it no longer requires experimental verification or even that a theory needs to be testable in principle.

The issue is that much of string theory, an entirely theoretical construct, is not testable, even in principle. It has been widely criticized on those grounds. The string theorists are now arguing that it should be enough that a theory be “elegant” and that philosophical and probabilistic arguments should suffice.

What could go wrong? Even a meager imagination can dream up plenty of ways that such a move could end in disaster. An easy example: an elegant, untested, and untestable theory predicts that global warming is (or is not) a threat and we take an action (exploding the world economy or ignoring the threat) based on that theory that turns out to be wrong1. Would you trust a politician or vested interests with such a theory. Experimental verification is required precisely because it gives us confidence that a given theory is true.

Whatever you think about logical positivism, it seems to me that it’s correct in its tenet that ideas or theories that can’t be verified or falsified, at least in principle, are meaningless. If I announced to the world that magical beings inhabit our world but that you can never prove their existence or nonexistence, I’d be widely ridiculed as delusional. I might even come up with some mathematics that’s consistent with the existence of such beings. I’d still be ridiculed.

To me, the issue is clear. If you tell me that your theory isn’t testable, I’ll tell you it’s not science.

Footnotes:

1

Save your stamps. This is an entirely hypothetical example and says nothing about whether or not global warming is a threat.

Posted in General | Tagged | Leave a comment

Multiple Info Buffers

Marcin Borkowski (mbork), who’s an occasional commenter here on Irreal, has an interesting post on his info workflow. He likes to have multiple info buffers open at the same time. That may seem a little odd but as Borkowski explains, he is often working on something in Org mode, say, and needs to check something in the Elisp manual.

It is possible, of course—it’s Emacs, to have multiple info buffers but it’s a bit clumsy. Borkowski wanted to be able to pop up an info buffer immediately whenever he needed it. To do that, he wrote a bit of Elisp to open an additional info buffer (or switch to an existing one) for any info manual. Then he wrote some additional code to call his function for his most often used manuals and bound them to quick key sequences.

A nice solution and another great example of how Emacs makes it easy to adjust it to accommodate your workflow. Head on over and take a look at his code. It may be something that you can use too.

Posted in General | Tagged | 2 Comments