Working From Home, Mac Edition

Now that working from home is, at least temporarily, the new normal, many companies and employees are struggling to adjust to a novel work environment. Fortunately, plenty of people have been working from home for years and have advice to offer to the n00bs. One of those people is Jason Snell who writes for MacWorld and Six Colors—a site that specializes in Apple news and commentary—and who has been working from home for the last five years.

Snell has a helpful article at MacWorld that offers suggestions for the Mac user new to working from home. Despite the Apple slant, most of the advice is applicable to anyone working remotely. The Apple specific parts are mostly apps for doing things like closing or hiding applications that aren’t related to the current task. There’s also some hints on how to use an iPad as an extra screen with Apple’s new Sidecar technology. That’s offered as a way to help workers used to a large monitor gain a little more screen real estate for their laptops.

The rest of the article offers non-technical suggestions to make working from home a bit easier. Oddly, he doesn’t talk much about communication applications and procedures, which most people working from home know is the key to success. Of course, his job as a writer is a bit different from most of us and the rest of his suggestions are definitely worthwhile. If you’re new to working from home, take a look at the article for some good general advice.

Posted in General | Tagged | Leave a comment

Coffee

I’m old enough that I been through several cycles of, “Coffee is good for you; no coffee is bad for you.” I stopped paying attention a long time ago because, you know, coffee. Now, brought to you from Irreal’s Department of Duh, Ali Abdaal takes a look at the evidence and concludes that on balance coffee is good for you.

The bad news is that too much coffee can cause you to be jittery and may even interfere with your focus. If you drink it too late in the day, it can also disturb your sleep. Of course, most of us already know that if only from personal experience.

There’s plenty of good news, though. Most of us already know that a couple of cups of coffee can increase our alertness and ability to focus. Abdaal quotes some studies that confirms that but the benefits are much more widespread. Coffee will also improve your memory, improve your mood, and help protect from depression. It can also improve physical performance and reduce after-exercise soreness.

Perhaps most surprisingly, coffee can also reduce long-term health problems. For example, coffee can decrease the probability of developing Parkinson’s Disease, Alzheimer’s, type 2 diabetes, cardio-vascular disease, stroke, and some cancers. Significantly, a large meta-study concluded that there’s no evidence that coffee can lead to cancer.

Abdaal covers all this and gives more details in the video. If you’re a coffee drinker or—perhaps more importantly—if you skip coffee because you’re worried about adverse health effects, be sure to take a look at the video. It’s 18 minutes, 16 seconds so you may have to schedule some time.

Posted in General | Tagged | Leave a comment

Zamansky 69: Floobits

One of the questions I often see is, “how can I collaborate in real time with Emacs?” This may be because a couple of programmers want to do some remote pair programming or because two or more people want to collaborate on a paper they’re writing with Org-mode. Until recently, I didn’t have a good answer—Magit, Emacs, blah blah blah—but the ever resourceful Mike Zamanksy has the answer in the latest video of his Using Emacs Series.

In the video, Using Emacs 69 Floobits, Zamansky demonstrates how to use Floobits. It works with Emacs, Atom, Neovim, and a couple of other editors. This is really good news for Emacs users because for the first time there’s a good solution for realtime collaboration.

Zamansky is, of course, a teacher so his interest is mainly in negotiating the learn-from-home regime necessitated by COVID-19 but useful though it is for teachers, Floobits is a boon to those of us outside of education. It’s a boon for the same reason it is for education: it allows two or more Emacs users to collaborate in real time. If nothing else, it’s an answer to those who say, “I have to use Google Docs so I can collaborate with my coauthors.”

Floobits is a bit like the early GitHub. You can get a free account but your workspaces are pubic. If you want private workspace, you have to buy a subscription but they’re not too expensive and well worth the expense if you really need the live collaboration.

The video is 15 minutes, 43 seconds so plan accordingly. If you have any interest at all in realtime collaboration and you’re an Emacs user, you’ll find it well worth your while.

Posted in General | Tagged | Leave a comment

Migrating from Emacs to Doom

Jethro Kuan, whom I wrote about in regards to his work with smart notes, has another interesting post. This time it’s about his migration to Doom Emacs. There’s nothing unusual about that of course; I’ve written several posts about such migrations. What’s a (little bit) different about Kuan’s journey is that he started from vanilla Emacs instead of Vim like most such immigrants.

Of course, many Emacs users have started using Spacemacs or Doom because of RSI issues. The attraction for them is the Vim keybindings, which most people find easier on their wrists and fingers. That was not Kuan’s motivation, though. He turned off evil mode and is still using the normal Emacs keybindings.

Kuan is interested in simplifying his configuration and using as much of the built-in Emacs functionality as possible. He says that Doom is faster and more responsive than vanilla Emacs and loads faster. I’ve never understood the obsession with Emacs’ load speed. After all, most of us just leave it running—at least in server mode–all the time so a few seconds of load time in the morning doesn’t amount to much. I was a bit surprised that Doom is more responsive. It is, after all, just a prebuilt Emacs configuration. It’s probably a matter of Doom getting things like load order right.

In any event, if you feel like experimenting with your editor, trying Doom may be more advantageous then wasting your time on one of those other editors. Kuan says it took him about 2 hours to complete the migration and then he spent another hour tweaking it to his liking so it’s reasonably low cost to experiment if you feel inclined.

Posted in General | Tagged | Leave a comment

Data is Toxic Waste

Over at Kaspersky, Cory Doctorow has an interesting article that argues that far from being the new oil, data is actually the new toxic waste. He begins by noting that any data you collect will, sooner or later, leak and that when it does criminals will combine it with other leaked data to undo any anonymization that you’ve applied. That data is, he says, “pluripotent, immortal – and impossible to contain.”

So far, companies have been immunized from liability by the difficulty of showing any specific harm to a specific individual from a given leak but that is changing. Just as with physical toxic waste, although a plaintive may not be able to point to a particular harm to a given individual, the fact that a company is responsible for the release of data will be enough to hold them liable.

Doctorow says that the only wise action is to delete the data you’ve accumulated and not gather more except for specific purposes for a short amount of time. The most astounding thing is that the research shows that gathering data doesn’t pay. If there was a large gain to be realized, perhaps companies could write off their potential liability, but it turns out that the data isn’t really valuable. It’s just a liability waiting to subject the companies that collect it to substantial penalties. The people exclaiming that data is the new oil are, in fact, selling snake oil and you accept their arguments at your peril.

Sadly, this message will probably go unheeded until a few companies are driven out of business by ignoring it. Don’t let your company be one of them. Get rid of that toxic waste while you can.

Posted in General | Tagged | Leave a comment

Interactive SQL Queries With Org-mode

Marcin Borkowski (mbork) always has interesting posts that often give me good ideas. Recently, he posted on using Org-mode for SQL. I haven’t had to deal with SQL for a long time and I was never a heavy user so any complicated query always took me multiple tries. If, like me, you’re an interactive programming aficionado, what you’d like to do is to be able to build up your query piece by piece. SQL certainly doesn’t lend itself to interactive programming but Borkowski found a way. Actually, it’s pretty obvious once you see it.

His idea is to execute the query from inside an Org Babel block. He can continually execute and refine the query until he gets what he wants. The nice thing is that your last attempt doesn’t go away. It’s still there to edit and try again.

Take a look at Borkowski’s post for the details and a worked example. The post is worth reading if only to see his definition of “toy editor.”

Posted in General | Tagged , | Leave a comment

Surprising Unix Programs

Doug McIlroy has another interesting post on TUHS. This time it’s about Unix programs that he found surprising. Many of the programs have been replaced by updated tools and are no longer used by most people but they all offer something surprising. Very often, the surprise is the novel application of theory to a seemingly “simple” problem.

For example, dc is the Unix Desk Calculator, a Reverse Polish Notation calculator that featured arbitrary precision arithmetic. At each step, dc performed a backward error analysis to determine the precision needed to achieve the end precision requested by the user. McIlroy says that to this day he haven’t seen another program that does that.

Another surprise is typo, a sort of primitive spell checker that ranked words based on their similarity to other words in the document. The idea wasn’t really to serve as a spell checker but to catch typos. The program worked by counting trigram frequencies but the memory on the first Unix machines was so limited that typo used a probabilistic method to update the 1 byte counters to account for large counts. Rob Pike says that typo was written so close to the machine that he couldn’t port it to newer machines and had to rewrite it in Go.

There are some other gems in McIlroy’s list so take a look. A final surprise is that many of these programs were written by women. That wouldn’t occasion much comment today but back when these programs were written, women were much rarer in our industry.

Posted in General | Tagged | Leave a comment

Elfeed and Goto-address

The other day I was reading an Elfeed entry and wanted to follow a link so with the point on the link, I typed Ctrl+c Ctrl+o as usual. Nothing happened. In Elfeed you can click on a link or press Return when the point is on it to follow a link so it wasn’t much of an inconvenience but then I vaguely remembered that I’d done something to make Ctrl+c Ctrl+o work in non-Org buffers.

I browsed through my init.el file until I found the code and used it to find the blog post I’d written about it. Looking at the code, it was immediately clear why it wasn’t working: you have to specify which modes you want it to work in. I just added the mode that Elfeed uses for viewing stories and everything worked fine. The necessary mode to enable is elfeed-show-mode.

In case you’re in similar predicament, here’s the code I’m using. As I mention in the post, goto-address-mode is built in so despite the use-package there’s no package to load.

(use-package goto-addr
  :hook ((compilation-mode . goto-address-mode)
         (prog-mode . goto-address-prog-mode)
         (elfeed-show-mode . goto-address-mode)
         (eshell-mode . goto-address-mode)
         (shell-mode . goto-address-mode))
  :bind (:map goto-address-highlight-keymap
              ("C-c C-o" . goto-address-at-point))
  :commands (goto-address-prog-mode
             goto-address-mode))
Posted in General | Tagged | Leave a comment

Zamansky 68: Tramp and Org-publish

Mike Zamansky is back with another video in his Using Emacs Series. This video discusses maintaining a simple Web site with Emacs and Org-mode. Usually when I write about this sort of thing, it’s in the context of publishing to a blog. Zamansky’s need is a bit different. He has a couple of Web sites he maintains that support some of his programs at Hunter College. These are simple sites that Zamansky had been writing directly in HTML by logging into the host machine and editing the file in situ.

Then he realized that rather than logging onto the host machine to edit the files, he could use Tramp and do his editing from the comfort of his own environment. That’s already an improvement but then he wondered why he was going through the pain of writing in HTML when we could write in Org-mode and export to HTML. The default look of the HTML exported from Org isn’t very pretty but it’s easy to disable the default CSS and add your own. You can even embed custom CSS in the Org source file if you need something special for that page.

Zamansky’s final realization was that rather than export to HTML and then transfer the HTML to the host machine, he could simply use Org-publish and have the whole process automated. All he needed to do was write the Org source and call Org-publish to export it to HTML and transfer it to the host machine. His solution is much like Sachin Patil’s that I wrote about last Friday. It’s a nice work flow that eliminates the boring rote work and lets him concentrate on the site’s content.

Follow the link to the video for more details on his set up and how he arrived at his solution. The video runs 16 minutes, 20 seconds so plan accordingly.

Posted in General | Tagged , | Leave a comment

Sort and Uniq

I’ve been using Unix for 3 decades but I just learned something new about two of the basic Unix tools sort and uniq. If you’re not familiar with Unix command line tools, sort does just what it sounds like. You can specify fields of interest and sort will sort the file based on those fields. The uniq filter takes a line-sorted input and eliminates duplicate lines.

The sort function has a -u option that eliminates duplicate lines after sorting. For years, I—along with many other people, apparently—thought of the two commands

sort -u ...

and

sort ... | uniq

as being the equivalent. That turns out to not be true.

One of the things old Unix-heads like to complain about is the proliferation of option flags to the basic commands. Unix orthodoxy decrees that each tool should do just one job and do it well and that additional functionality should be implemented as a filter in a pipeline. Thus the proper way of eliminating duplicate lines in a file is

sort file | uniq

In a recent discussion on The Unix Hertigate Society mailing list on the topic of extraneous command options, Doug McIlroy explains that there’s a good reason for the seemingly redundant -u option to sort and that there’s subtle difference between sort -u ... and sort ...| uniq. Follow the link to see what that difference is and why sort’s -u option make sense.

Posted in General | Tagged | Leave a comment