Enough With Smartphone Addiction Already

The new luddites are ever with us, of course, but I must say that the constant harping on smartphone addiction is becoming tiresome. Actually, it became tiresome some time ago; now it’s infuriating.

I was saddened to see that Tony Fadell has joined the cacophony and is agitating for Apple—of course—to do something about it. As I argued before, it’s not up to Apple or anyone else to solve this problem for you. If you think you have a problem—something I find unlikely—then it’s up to you to find a solution, not Apple or any other smartphone provider.

The TechCrunch article on Fadell’s remarks notes that he makes an analogy with healthy eating. Just as we listen when the nutrition experts tell us what constitutes a healthy diet, we should also listen when the tech addiction experts tell us what constitutes healthy behavior. Maybe I’m just feeling curmudgeonly today but that statement infuriates me.

In the first place, those nutritional experts have been telling us for 50 years to avoid fats and eat carbs instead. Except, oops, they were wrong and we ended up with a nation (or world) of overweight people. Now we’ve got a bunch of “experts” from a field that can’t even manage a 50% reproducibility rate in their studies1 telling us how we’re behaving unhealthily with our phones. My attitude is, “Get back to me when you can show me some reproducible studies.”

Fadell notes that Apple can already provide use tracking to help iPhone users use their phones responsibly. Does anyone else find that condescending and annoying? Apple, Fadell says, is willing to provide this capability for young people so parents can monitor their iPhone use. Just what we need: another way for parents to spy on their kids. I’m a long way from being a kid but that enrages me even so.

I wish these people would throw their phones away and go live on a farm. Maybe carrying water from the well will keep them busy enough that they’ll leave the rest of us alone to enjoy the benefits that technology brings.

Footnotes:

1

According to a 2015 study in Science, only 39% of psychology studies were reproducible.

Posted in General | Tagged , | Leave a comment

Zamansky 48: Silver Searcher

The other day, Mike Zamansky made a post that I really liked. It was about his grading workflow and how he tries to lessen the tedium by making it as efficient as possible. As many of you know, I enjoy reading about other people’s workflows and invariably learn something useful from them. It didn’t have a video but I was planning to write about it anyway. Then, Zamansky produced an accompanying video that talks about some of the tools he uses.

Zamansky has his students submit their homework and projects into git repositories, which he clones so that he can examine and grade their work. A typical (abbreviated) setup might look something like this on his computer (stolen from his Grading Workflow post):

hw
├── doe_jane
│   ├── hw_01
│   ├── hw_02
│   └── hw_03
│ 
└── doe_john
    ├── hw_01
    └── hw_02

Suppose he’s grading hw_02. He’d like to produce a dired listing that has just the hw_02 repository for each of his students. It’s a little tricky because the hw_02 repositories have separate parent directories. You need something like find to locate those files and pipe them into dired. The dired command find-name-dired does this but adds the inode number to the listing, which makes it wrap and look confusing.

Zamansky’s solution is to use The Silver Searcher and Philip Snowberger’s ag.el package that include the function ag-dired-regexp. That allows Zamansky to search for hw_02 in the hw directory and produce a nice dired listing of all the repositories for that assignment.

The video and post are definitely worth your time. Even if you’re not a teacher, you may have a workflow that can leverage the same ideas. The video is just short of 12 minutes so you can watch it while you’re enjoying a cup of coffee.

Posted in General | Tagged | Leave a comment

The Trouble With OneNote and Evernote

In a post that serves as a nice complement to my recent musings on Open Source Tools, Karl Voit notes that Microsoft is discontinuing OneNote. Although he’s too polite to say so directly, if you’re a OneNote user, you have no one to blame but yourself. OneNote suffers from all the disadvantages that I discussed in my Open Source Tools post: it runs on someone else’s computer, uses a proprietary file format, and, as Voit’s post reminds us, is subject to discontinuance at someone else’s whim.

Not being a Windows user, I’ve never used or even seen OneNote but I have read about it in Bell and Gemmell’s Total Recall. That’s the book that got me interested living a (more) digital life and eventually led me to Evernote. Like OneNote, Evernote’s purpose is to store all your data, whether it’s a Web page, a note, some audio, or whatever. Like OneNote it has a proprietary file format, runs on someone else’s server, and could be gone tomorrow. I no longer use it although I still pay for it and have a few notebooks containing material that I mostly don’t care about very much.

My solution for replacing these proprietary and, in the end, dangerous-to-use services is the same as Voit’s: switch to Org mode. Unlike OneNote and Evernote, Org runs on your own machine, is open source so it will always be there for you, and, most importantly, stores its data as plain text1. The data is readable by any application that knows about text.

Voit makes the case for Org mode in his post but by now we2 should all be familiar with it. For most of us, what’s required is to import any data we care about into Org so we no longer have to worry about what third parties are planning to do with their products.

Footnotes:

1

You can, of course, ask it to store a file that’s not text but that’s a function of the data itself, not how you’re storing it.

2

In this context, “we” means the community of Emacs users, of course.

Posted in General | Tagged , | Leave a comment

Org Babel Recipes

I find that one of the most useful features of the phenomenally useful Org mode is the Babel code block capability. You have to have facility with at least one programming language, of course, but this is Irreal so that’s probably not a problem if you’re reading this.

Code blocks can be useful for anyone who needs to massage some table data (tax data, say). Some, like John Kitchin, a Chemical Engineering Professor, use them extensively for reproducible research. Professional developers can leverage them like Howard Abrams does in this excellent post and video about literate devops.

Using code blocks is conceptually easy: you put some code—in any of several languages—in a source block and it gets executed and (can) automatically insert the results in the org document when you export the document or otherwise execute the block. There are details, though. The peculiarities of different languages mean that the details of using a language effectively differ between the languages. The Worg site has documentation for several languages, which is very useful.

Dfeich has put together a set of Babel recipes for several languages. They’re basically his notes for using the languages effectively in code blocks. If you’re using a language in a code block for the first time, it’s worth your while to take a look at his recipe (and the Worg documentation) to avoid any gotchas.

Posted in General | Tagged , | Leave a comment

Sed

In the days before GUIs, Unix users depended on a suite of command line tools to do their text manipulation. One of those tools, sed, is still used and useful today but many younger engineers are unfamiliar with it. The basic idea is that it will read each line of a file, perform a series of transformations on it, and write the result to stdout. Hence the name: stream editor.

If you’re a vi/vim user, the sed command structure will be familiar to you but even if you’re not, it’s easy to learn. Daniel Leary over at Theodo has a nice introduction to sed that shows how to perform a series of changes to a CSV file. It covers only a small part of sed’s functionality but that part is probably the most used and useful part.

Once you’ve read through Leary’s tutorial, you’ll be able to make basic changes to a file and read the sed man page to figure out the other functionality. Sed is one of those utilities that you—or at least I—don’t need that often but when you do, it’s just the thing. Emacs users will say, “But I can do that easily in Emacs,” which is true but what if you have to do it repeatedly, say on a daily basis? With sed you can record the commands in a file and then just run sed on a file as needed. It’s really very handy and worth spending a few minutes getting familiar with. Leary’s tutorial is a good place to start.

If you want more information, The Unix Programming Environment by Kernighan and Pike has an excellent section on sed that covers more of the details.

Posted in General | Tagged , | Leave a comment

RMS on Data Collection

RMS has an article in the Guardian that discusses the safety of your on-line data. With the recent exposure of Facebook surveillance practices and their consequences, reporters have been asking him if he thinks it could be a turning point in the battle to regain some of our privacy. He has an interesting proposal that he says would help accomplish that.

That proposal boils down to not collecting data unless it’s really needed for the application. The emphasis on “really” is to prevent the inevitable cheating that would otherwise occur to gather too much information. RMS gives the example of London’s oyster cards, which are used to pay for trips on London’s trains and buses. Those cards link the user with the trips that they take. But as RMS points out, there’s no real need to collect the user’s identity. The cards are simply a convenient proxy for cash that make using the transportation system a bit more seamless.

The authorities counter that by linking the information, they allow the user to review a list of past trips but that is not an essential part of the application—which is providing a convenient way of paying for transportation—and therefore the information should not be collected.

I like the idea but it’s hard to see how it could be effectively enforced. The data collectors will simply declare that, for example, providing a list of past trips is an essential part of the service so they need to collect the data. It’s possible that Europe will move in that direction but, sadly, I see little chance of that happening in the US. Maybe after a few more Facebook-like debacles.

Posted in General | Tagged | Leave a comment

Blogging with Hugo and Org Mode

Over at ZCL.SPACE there’s an informative post about blogging with Hugo and Org mode. The post serves as a reasonable go-by for setting up and using Hugo for an attractive, static blog. Although Hugo now supports Org markup natively, the post recommends exporting to Hugo compatible format using ox-hugo.

The ZCL blog is a bit unique because it is divided into distinct sections. Each section has its own Org file in which each level-one heading is a post. If you’re looking for a way of writing a static blog with Emacs and Org mode, take a look at this post for some good ideas.

While I still prefer to blog with WordPress, my ongoing problems org2blog and the XML-RPC interface to WordPress that it uses are tempting me to consider switching over to a simpler static blog. There’s a lot to be said for a blogging platform in which pushing a post amounts to transferring a file to the site.

Posted in General | Tagged , | Leave a comment

The Job from Hell

Imagine it’s Friday afternoon and you’re sitting in the local bar with a bunch of other developers bitching about how your company and its management is the worst ever. Then the guy from Project Failures stands up and says, “Hold my beer.”

The tale he tells is the most horrific story of project mismanagement and employee-hostile policies that I’ve ever heard. The project itself is bad enough:

  • 6,000,000 lines of code,
  • 50,000 C++ classes,
  • 48 hour build time using 32 parallel machines,
  • 15 minute startup time,
  • 30 second to 30 minute mean time between crashes,
  • 45 minutes for a context menu to popup,
  • 7 days to load 700 MB from a CD
  • and much, much more.

There’s probably plenty of projects with a similar profile. It’s the rest of the story that’s so horrifying.

After several years they instituted version control. It was so complicated that they had 4 people assigned to work on it full time. Doing a first checkout required an appointment with the version control folks and usually required a week to get. Before a file could be edited, permission was needed from a manager and then coordination with version control, which took another 2 days. Management, of course, had no software experience.

The development team was 20 engineers but there were 35 managers. At one point they fired all the engineers but kept all the managers. Engineers were required to be in at 9:00 and were fired on the spot if they were even one minute late. They regularly turned off the coffee pots so engineers wouldn’t waste time drinking coffee. At one point they even tried to coerce the engineers to give up smoking so they wouldn’t waste time on smoke breaks.

There’s a lot more. You really have to read the post to get the full flavor. It will make your job seem like paradise.

Posted in General | Tagged | Leave a comment

<t> Is Undefined

Is anyone else seeing the error message <t> is undefined when using Emacs? Occasionally Emacs will respond to a keypress with that error in the echo area and Messages buffer. The key is otherwise discarded but pressing it again will result in the correct action.

I’ve been seeing this error since Emacs 25. I vaguely remember seeing somewhere that it was a known error and was already fixed (it was probably this Emacs Stack Exchange question). I was disappointed to see the error still occurring under Emacs 26, although it doesn’t seem to happen as often.

I’m getting ready to file a bug report and am trying to gather as much information as I can. If you have any information on this bug or even if you’ve seen it please leave a comment. If you’ve seen the error, please include the Emacs version and your OS.

Posted in General | Tagged | Leave a comment

Update: One Down

Those of you who read Irreal on mobile devices or who just have a heightened sense of aesthetics will be happy to know that I’ve developed a workaround for the formatting problems that I wrote about yesterday. The problem, I believe, is that the WordPress editor interprets newlines as a request for a line break and inserts the line break tag (<b />). That only happen when you’re using the editor so it doesn’t come up unless I’m trying to paste HTML into the Text tab of the editor.

Although there are plenty of articles on the Internet explaining how to force a line break in WP, I couldn’t find any explaining how to inhibit them. So I looked at the problem the other way around and eliminated the newlines that WP was misinterpreting as a line break request. I have a local function called blog-post that calls org-html-export-as-html with a parameter asking it to only export the <body>…</body> portion of the HTML. I added a couple of lines of Elisp to replace singleton newlines with a space. That appears to make WordPress happy. For anyone interested, here’s the code:

(defun blog-post () 
  "Export an org buffer as HTML but only export the body.
 Remove all singleton newlines so the
 WordPress editor doesn't insert break tags (<b />)."
 (interactive) 
 (org-html-export-as-html nil nil nil t)
 (goto-char (point-min))
 (while (re-search-forward "\n\\([^\n]\\)" nil t)
   (replace-match " \\1"))) 

That’s one problem down. Now all I have to do is to get org2blog working again and things will return to what passes for normal around here. Please let me know if you’re still getting formatting problems.

Posted in Blogging | Tagged | Leave a comment