Some Useful Editing Functions

In my recent post, Some Configuration To Solve Common Problems, I got a bit of pushback from GB who said some of the configuration was outdated. That’s true but does it really make much difference? The Emacs Cat has a followup post in which he agrees that some of his configuration is old—just like mine and probably yours—but that it still works.

That’s another nice thing about Emacs: even though new, better methods of doing things are introduced, the old methods continue to work. Sometimes, those old methods will eventually be deprecated but always with a lot of notification including warnings when you use them.

The Emacs Cat’s second post describes some of his custom Elisp that aids editing. Several of them add functionality to Dired, a functionality that everyone should be using. He also has some functions for inserting date/time stamps of various sort. I have several of these myself and the lesson to take away from them is how easy it is to get exactly the format you want.

Finally, there are a few functions that specialize common requirements such as opening new lines, moving to the beginning of the line, and others. These are the sort of functions that every long term Emacs user eventually accumulates so it should be especially useful for beginners to see them written down in a single post.

Posted in General | Tagged | Leave a comment

A Late Nonpost

Sorry for the late post today. To make things worse, it’s not a real post. Today we had a followup appointment for our aforementioned health emergency. It involved a bit of outpatient surgery and since we arrived at the hospital early in the morning, I imagined that we’d be home by early afternoon and I’d have time to put together today’s post.

Yes, yes, I should know better but I let my sunny optimism get the better of me. In the end, we didn’t get home until 13 hours later. Happily everything went well and we’re hopeful that the horrid events from November won’t be repeated.

I’m happy to put it all behind me and get back to worrying about what I’m going to write for my next post.

Posted in Administrivia | Tagged | Leave a comment

Pair Programming: The Poll

Well, not really a poll but at least some random opinions. A while ago, I mentioned a discussion I had with Perry Metzger about pair programming. Metzger, who is a serious person and well worth listening to, is a huge fan and says that he’s never been so productive as when he’s pair programming. I, on the other hand, imagine that it would be much like hell.

I have always thought that most programmers—for reasons that I couldn’t imagine—like pair programming. Certainly there is a lot of positive commentary about it on the Web. But perhaps I was wrong.

abdullah_ayyash over at the Programming subreddit asks what people think of pair programming and why they like it if they do. The answers are what any reasonable person would expect: some like it, others don’t. Those who don’t like it appear more emphatic in their opinions but the opinions seem evenly split.

Part of the problem, it seems, is exactly what you mean by “pair programming”. I think of it as a formal and planned sitting down together to write code. Others have a loser definition. Their definitions include such things as sitting down to debug a problem together or as a simple mentoring. I’ve done both those things but wouldn’t describe them as pair programming.

Even among those supporting it, my sense is that they see it as an occasional way of mentoring or sharing ideas, not as an everyday way of working.

Sorry, but I’m recalcitrant. I’m not going to do anything that resembles the strict definition of pair programming. Not now, not ever. Still, lots of people feel otherwise and I have no objection to them indulging themselves. Perhaps that’s the nub of the matter: if you pair program because you feel it helps you, go for it. My objection is to mandating its use.

Posted in General | Tagged | Leave a comment

Shrinking And Widening Org Table Columns

Just a quickie today because I’m still recovering from the Thanksgiving festivities. The Irreal bunker sealed the doors and refused to venture outside on Black Friday, a day in which many stores have stupendous sales resulting in unhinged behavior on the part of shoppers. Is Black Friday a thing in the rest of the world? In the U.S. it refers to the day after Thanksgiving—which is, after all, an American holiday—but with the globalization of commerce by Amazon and others, I wouldn’t be surprised to hear that others are suffering from it too.

At any rate, James Dyer has a note to himself that others may find useful. It’s possible to shrink and widen Org table columns. Normally, you wouldn’t need to do that, of course, but if the text in one or more columns exceeds the available length you can (temporarily) widen them and then shrink them again.

This is another one of those things that you hardly ever use so it’s really easy to forget how to do it. That’s why Dyer posted the note to himself. Take a look at Dyer’s post. It’s short and it may tell you something you’ll find useful.

Posted in General | Tagged , | Leave a comment

🥩 Red Meat Friday: Using The Command Line

When I saw this post, I knew was getting old. The post was about why every developer should learn to use the command line in 2024. My reaction was, “Say what!?!” To me, it was like saying every baby should learn to breath. How could you survive otherwise?

Yes, your Aunt Millie doesn’t need to use the command line and can depend on a GUI to read her email and navigate the Internet. But your Aunt Millie is not a developer and has needs very different from those of us that are.

The idea that a professional developer wouldn’t need to know how to work with the command line is completely foreign to me. It’s not that you should use the command line for every task—I mostly use Emacs for the majority of the things I would have used the command line before—but sometimes the command line is the right answer and if you don’t know how to use it, you’re not really ready to eat at the adult table.

Maxime’s post is an excellent explanation of why you should learn to use the command line. If you aren’t currently proficient with the command line, you should read it to discover why you should be.

You can call me a gray beard or a dinosaur but any experienced developer will tell you the same. You don’t have to do everything on the command line but there are some things that are best done that way and you really need to be able to use it when appropriate.

Posted in General | Tagged , | Leave a comment

Casual Calendar

Charles Choi is back with another app in his great set of Casual packages. This time it’s to provide a menu interface to the calendar/diary functions in Emacs.

I don’t use either of these functionalities directly because it’s hard to interface them to my (Apple) smartphone. Still, I do use them second hand with my Org agenda. I schedule some items—usually local task or chores that don’t involve other people such as doctors. For appointments out of the house I use my iCalendar because it seamlessly integrates with my iPhone and iPad.

Choi makes a point of saying how Emacs can support non-Gregorian calendars. In my usual parochial way, I’m having a bit of difficulty imaging a real need for this in day-to-day activities but as I say: parochial.

As usual, Choi’s menu reveals that there’s a lot of little known capabilities to the Emacs calendar and diary. That’s one of the strengths of his apps. They reveal functionality you didn’t know was there. Once you do know it’s there, the menu helps you to remember how to access it.

Take a look at Choi’s post to get an idea of what the new App can do.

Posted in General | Tagged , | Leave a comment

Today’s Humor: ISPs Provide Excellent Customer Service

According to an Ars Technica report, ISPs say that their customer service is so good that customers don’t seek other providers. That claim was made by the NCTA-The Internet & Television Association, a cable industry trade association in response to an FCC filing proposing new rules to improve customer service.

The situation is, of course, rife with politics but there are some points worth making:

  • Not all providers are the same. I’m more or less satisfied with my provider, Spectrum, although they are far from perfect. On the other hand I have friends stuck with the provider who shall not be named that thinks customer service is a bad joke.
  • The growing trend of using never ending phone trees and, worse yet, AI chat bots will do nothing but increase customer frustration and will likely cause more customer complaints. It’s just silly, and in the end, not really serious to claim that those measures will improve customer satisfaction.
  • It’s just not true that dissatisfied customers can simply change providers. In Tampa, the main choices are Spectrum and Verizon: by no means the worst but no one would describe them as a panacea. Many areas aren’t even this lucky. They have a single provider that has absolutely no incentive to provide decent customer service.
  • Irreal, as many of you know, is always skeptical of involving bureaucrats in our affairs but ISPs are essentially monopolies and the quid pro quo for that status is agreeing to the regulatory regime.

All of that aside, it’s surely humorous to hear claims of customer service so great that customers wouldn’t leave even if they had a choice. That’s not a serious claim and gives one reason to doubt anything else those making the claim say.

Posted in General | Tagged | Leave a comment

Digital Vs. Analog Notes Redux

My post on Digital Vs. Analog Notes got some excellent comments as well as a followup post from JTR on his site. JTR mostly agrees with what I wrote but I did get some pushback in the comments on Irreal.

J Tevq has a long and thoughtful comment on why he sometimes prefers handwritten notes to digital. He’s a graduate student in Mathematics so this makes sense. I’ve always found that I can’t do any serious Mathematics on a computer. I need to scribble around on a pad to prove whatever it is before I turn to the computer to write it up.

He also, like many people, likes to read papers on paper. Some folks say that they simply can’t read material like that on a computer.

There are, he says, lots of places where handwritten notes are better. I was like that for a long time but managed to wean myself away from pencil and paper on my journey to a digital life.

MarkB likes to combine the two methods by (essentially) taking handwritten notes and digitizing them later. Actually, of course, this is all done on an iPad with an App that accepts handwritten notes and digitizes them on the fly.

My favorite App for that is Notability. Ali Abdaal has a great video on how he used it to take notes as a medical student. Abdaal also explains the (scientific) reasons for preferring handwritten notes for class and perhaps for other uses as well. Take a look at the video. It changed how I thought about note taking even though I am no longer in a classroom.

Since I do all my writing in Org mode, having notes, papers, and other materials in digital form means it’s easy to import or link to them as I’m writing. For formal journals you still have to make old styles references but, really, hypertext references are so much better. Of course, others feel differently. As always, the best method is the one that works for you.

Anyway, if you’re interested in the subject, do take a look at the comments and JTR’s post. They’re thoughtful and informative.

Posted in General | Tagged , | Leave a comment

Why Numbering Should Start At 0

As many of you know, Edsger W. Dijkstra was an important and prolific mathematician and computer science. He was responsible for, among other things, the widely used shortest path algorithm.

One oddity of his work was that a substantial part of it was “published” as handwritten notes that he photocopied and distributed to colleagues. These notes were called EWDs because of his habit of labeling them with his initials and a sequential number.

EWD831 considers the question of which of the following notations should be preferred for referring to the sequence \(2, 3, \dots, 12\).

  1. \(2 \le i < 13\)
  2. \(1 < i \le 12\)
  3. \(2 \le i \le 12\)
  4. \(1 < i < 13\)

His conclusion is that 1. is the proper choice. That leads to another question: If we wish to use a sequence to index, say, an array or list, what should the first index be? His answer, of course, is zero. You can read EWD831 for his reasons for these conclusions. It’s short and will take only a couple of minutes. It’s a fascinating look at the thinking a great mind and his striving for simplicity.

Posted in General | Tagged | Leave a comment

The Only Computer Science Book Worth Reading Twice

Longtime Irreal readers know that I consider Abelson’s & Sussman’s Structure and Interpretation of Computer Programs (SICP) arguably the best computer science book of all time. There’s Knuth’s The Art of Computer Programming of course but for the average software engineer, I think SICP is more valuable.

Simon Dobson has a delightful post that agrees with my evaluation. He says that SICP is the only computer science book worth reading twice. Most of the post is a list of things that make the book so great. The list is so persuasive that I’m tempted to read the book for the third time. I don’t know if I actually will but it certainly deserves the attention. I still remember how much more I learned when I read it for the second time, Doubtless, a third reading would increase my understanding even more.

I’m sure rereadings would eventually reach the point of diminishing returns but the material is so rich that it seems there is always something new to learn. If you haven’t already read SICP, I urge you to do so. I didn’t read it until late in my career and it still changed the way I look at and practice programming. The first time I read it, I interleaved the reading with the video lectures that Abelson and Sussman gave at HP. You may find that a nice way to approach the material.

Reading and absorbing SICP doesn’t mean you have to start programming in Scheme—although it may make you wish you could. It’s more about learning the proper way to think about programming.

Posted in General | Tagged , | Leave a comment