Taking Math Notes With LaTeX in Emacs

Two and a half years ago, I wrote about Gilles Castel’s astounding ability to take math notes at speed using LaTeX and Vim. As someone who once came perilously close to being lapped on a three panel blackboard by a Math professor, I found this amazing yet Castel says he can keep up with his professors. A year ago, I wrote about a post on reddit by karthink that gave a quick overview of how he did the same thing with Emacs.

Now Karthink has long post that goes into detail on how he does it. If you’re like me, you probably think that most of the magic involves yasnippet but karthink uses yasnippet almost as an afterthought. All the heavy lifting is done by AUCTeX and CDLaTeX. Karthink presents his methods in three stages: AUCTeX, CDLaTeX, and yasnippet. You can, he says, get a long way just with AUCTeX.

CDLaTeX provides a series of shortcut keys that can really speed things up. For example, `a gives you α, `> gives →, ``R gives \Re, and ```s gives \sin. Most of these are mnemonic and in any event, CDLaTeX will pop up a which-key-like help screen if you delay for a second.
Finally, he uses yasnippet for those things not covered by AUCTeX and CDLaTeX. He has a pointer to his snippets but says you should make your own specialized for your particular needs.

Happily, my days of taking class notes are over but it’s still nice to know how to speed up entering mathematical notation while I’m in Emacs or Org-mode. If you’re a student taking Math classes, you should take a look at Karthink’s post.

Posted in General | Tagged , | Leave a comment

Leaving the Office is Easier Than Returning

ABC in Australia has a provocative article that makes the (obvious) case that it’s easier to start remote work than it is to end it. Remote work seems custom made for the tech industry and, indeed, they were among the first to embrace the notion when the COVID-19 epidemic first appeared. Now, though, as they see the end of the threat, they’re trying to get their employees back in the office. Their employees aren’t enthusiastic. Most, but not all of them, don’t want to return.

The companies make their usual claim that having people in the office encourages synergy: that employees will talk to each other, exchange ideas, and new concepts will emerge. We hear this so often it seems like an inarguable truth. But is it true? Not everyone thinks so. According to the article, Ed Zitron, who runs a public relations firm, has this to say,

The only reason to have an office, he says, is to satisfy managers
with vested interests in grouping people together “so that they can
look at them and feel good about the people that they own … so that
they can enjoy that power”.

Irreal is inclined toward that view but not everyone agrees. Odd as it seems to those of us who love remote work, some people really do like going into the office. Some folks just don’t like the feeling of isolation. Others feel that going to the office serves to separate their work life from their home life.

It’s hard to know how it will all play out but it’s probably true that micromanagers who would like to enforce a one-size-fits-all solution are going to experience a lot of pushback. One thing for sure, we’re not going back to the way things were.

Posted in General | Tagged | Leave a comment

The Young Are Quitting Their Jobs

Time—I know, I know—has an article on the Great Resignation and in particular how young people are quitting their jobs. In some respects, the article is the usual Time silliness but it does make several interesting points.

There appears to be two main type of quitters:

  1. Those fighting burnout and looking for better pay and benefits
  2. Those looking to find themselves and seek work outside the traditional \(9–5\) environment.

Those in the first group typically work in areas such as hospitality where they have to deal with rude patrons for low wages and few or no benefits. Many of them say that they’re not going back until wages increase.

Those in the second group tend to be leaving more white collar jobs. They’re engineers, healthcare workers, those working in marketing, and the like. Their big issue is burnout. Many report working long hours in conditions that all of us in the computer industry have experienced at one time or another.

The other aspect of all this is remote work. Another group that is leaving their jobs is childcare workers so many mothers are being forced to work from home. Those mothers have no choice but to leave jobs that can’t accommodate their need to care for their children themselves.

The article is worth a read to get an idea of what’s going on with the Great Resignation and why it’s happening. Time, of course, doesn’t mention what role, if any, expanded government unemployment subsidies play in this. Here’s one semi-humorous take on that aspect:

Posted in General | Tagged | Leave a comment

The 40 Hour Work Week

I haven’t written about Matt D’Avella for a while but he has a new video that fits into one of Irreal’s recurring themes: our working environment. The video is about the death of the 40 hour work week. For as long as most people alive can remember, there has always been a 40 hour work week. It seems like the law of gravity. Just something that always was and always will be. But the key phrase is “most people”. The 40 hour work week was established in 1938 with the Fair Labor Standard Act. If you’re in your 20s, that seems indistinguishable from the age of Plato but most of us almost certainly know someone—parents or grandparents, say—who were alive then. It really wasn’t that long ago.

It was a big thing when it was introduced. It ended the terrible working conditions that were prevalent at the time and ushered in the notion that people could have a life outside of their job. But like many useful innovations, its time has passed. The 40 hour work week was adopted and adapted for factory workers. Most of us no longer work in that environment but the majority of us still suffer under its yoke.

D’Avella makes the case that the 40 hour work week no longer makes sense. It isn’t rational even from the employer’s point of view. Productivity declines well before the 40 hour limit is reached. A much better criterion is “just get the job done.” We even have a term for it: ROWE.

A lot of this will be fixed by the remote work movement. When you don’t have to be in an office for a specific amount of time but just need to get the job done, the 40 hour work week will fade away on its own.

Posted in General | Leave a comment

Question: Do You Primarily Read on Your Smartphone?

The other day, I was reading an article by David Perell on Riding the Writing Wave. The article is about developing a writing regime and improving your productivity and quality as a writer. It’s worth taking a look at if you’re interested in such things but that’s not what this post is about.

In the article, Perell states, as an aside, that “Most people read on their smartphones.” That struck me as odd because I hardly ever read on my phone. The only times I have is when I unexpectedly got stuck waiting for something. If I’m expecting to have to wait around, I’ll bring my iPad and use that to read.

Of course—as the Minions are fond of reminding me—I may be a bit of an outlier so I polled my immediate family. All but one of them said they hardly ever read on their phones. The one who does is an Android user unlike the rest of us who have iPhones. That’s a tiny unrepresentative sample, of course, so I thought I’d ask my larger, Irreal family about it. Do you regularly read on your smart phone? If you do, is it an iPhone or an Android?

The reason I ask about your type of phone is that I’ve formed a tentative theory that Android users are more apt to read on their phones because they probably don’t have iPads to use instead. Arguing against that theory is the fact that my family who does use a phone for reading (a) uses an Android tablet for reading in bed and (b) does have an iPad, although it’s never used for reading.

None of this is the slightest bit important but I did get curious. If you have something to say on the matter, please leave a comment.

Posted in General | Tagged | Leave a comment

Ivy Completions

John Kitchin has a new video up on his Scimax Channel. The video’s theme is Ivy’s completion mechanism. It doesn’t seem like there would be a lot to say but, of course, there’s plenty. Kitchin begins by explaining completing-read, a way of choosing among several alternatives for, say, a file to open. The completing read function is built into Emacs and is always available but you can substitute your own function for the built-in one to provide more or better functionality. That’s what Ido, Helm, and Ivy, for example, do.

Kitchin compares the default completing read action to that of Ivy’s. Ivy’s is much more convenient and you get it just by installing and enabling Ivy. But wait! There’s more. With Ivy, you can specify one or more actions to be performed on the choice. You can, of course, do that outside of Ivy but Ivy’s mechanism is simpler and abstracts away much of the boilerplate that you’d otherwise need.

Kitchin spends much of the video considering implementations of one of his important use cases. As you doubtless know, Kitchin is a researcher and academic so he has a huge bibliographic database. Each entry has a keyword to be used in the citation. The problem is it’s hard to remember the correct keyword—they’re long and complicated and may not offer a hint to the citation you’re looking for.

The video offers a series of implementations of Kitchin’s “choose citation” function that iterates towards a solution that meets his needs. Along the way, you learn a lot about Ivy’s completing read and how to use it.

The video is just short of 36 minutes so you’ll definitely need to schedule some time but it’s very worthwhile. It will teach you a lot about Ivy’s completing read implementation.

Posted in General | Tagged | Leave a comment

Rant: Entering Credit Card Numbers

The other day, my bank texted me to say there was a suspicious charge on my credit card and did I make it. When I responded that I didn’t, they invalidated the card and sent me another. I hate when that happens. Not because getting the new card is at all a problem. It isn’t. The problem comes when I start getting emails from all my services saying that when they tried to charge me for the monthly fee, the credit card was declined.

First up was ExpressVPN, a company that I’ve been very happy with and about whom I’ve had only good things to say. The problem came where it always does: entering the new credit card number. ExpressVPN has no instructions or restrictions for this. Just enter the number. Like most people, I find it a lot easier to enter the number as four groups of four digits—just the way it is on the card. The entry field allowed this so I thought I was good. Of course I wasn’t. I got an error message that blanks and other punctuation weren’t allowed. Not too bad: I reentered the number without spaces and all was good. I wanted to yell at them about it but, of course, there was no way of doing that other than a live chat so I gave up and got on with my day.

The next morning, I got another notice, this time from Earthlink. It’s an old account that I maintain only to support the Web pages for my books. Again, there were no instructions or restrictions for the new credit card number. The site allowed me to enter the number in a human friendly way but when I tried to save the update I got an error message saying that I needed to choose the card type. There was no way to do that. The card type is chosen automatically based on the number so I canceled the update and started over. Of course the same thing happened. After messing around for several minutes, I tried entering the number without spaces. Success! So Earthlink not only doesn’t tell you the required format, they give you an erroneous error message when you get it wrong.

Look, none of this is hard. Javascript makes it easy to strip blanks with

string.split(" ").join("")

or using the more general replace that can handle other unwanted characters. I don’t write in Javascript and even I know this. Why are these sites torturing their users by not handling this? If the underqualified developers they having building their Web pages find this too difficult, could they at least specify what they’re expecting? There really is no excuse for this and it’s not a new problem. I and others have been complaining about it for years but nothing ever changes.

Posted in General | Tagged | Leave a comment

If You Collect It, They Will Come

Here’s another case, this time from the Netherlands, demonstrating the Iron Law of Data Collection. Modern cars all collect information on the car’s operation. Accident investigators love this type of information because it tells them the vehicle’s speed, braking, and other useful readings. Tesla does this too, of course, but their system is more like an airliner’s flight recorder. It captures a huge amount of data including the operation of and driver interaction with its Autopilot system.

Tesla, like other public companies complies with subpoenas for vehicle driving information but provides only the information asked for. Recently the Dutch National forensic lab has figured out how to decode Tesla’s encrypted vehicle logs, giving them access to a complete picture of a vehicle’s operation.

On the one hand, this doesn’t seem that unreasonable. Who can be against investigating accidents, after all? On the other hand, it’s also easy to see how this information could be abused. The Iron Law tells us that it certainly will be. Tesla, for its part, has a legitimate reason for collecting the data: they use it to find problems with and improve their cars.

Judging from his public record, I wouldn’t be surprised to see Elon Musk respond to this by strengthening the encryption. Tesla routinely does over-the-air updates of the car’s software so this would be pretty easy for them. Regardless, it’s yet another demonstration of the fact that if you collect information, sooner or later someone is going to demand access to it

Posted in General | Tagged | Leave a comment

Red Meat Friday: Shakespeare Was Right

Article 16 of the GDPR says, among other things, that

The data subject shall have the right to obtain from the controller without undue delay the rectification of inaccurate personal data concerning him or her.

A normal person would take that to mean you have the right to have substantive errors in your records corrected. Things like age, arrest record, employment record and so on. Errors that can cause actual harm if not corrected. A Brussels court has ruled that it also means that European Union citizens also have the right to have their name represented correctly.

This is why everyone hates lawyers. The issue is that many names have diacritical marks—Erdős or Ceaușescu for example—and older computer systems are unable to represent them. This is a particular issue in the banking industry that, sadly, is often still running their businesses on last-century IBM mainframes that use the EBCDIC character encoding system.

It’s hard to imagine today but bytes weren’t always 8 bits, and ASCII, let alone UTF-8, wasn’t always the way characters were encoded. EBCDIC was IBM’s system and as the 800 pound gorilla they saw to it that EBCDIC’s use was widespread. The problem is that its standard code page had no diacritical marks so someone named, say, José Ramírez is going to have his name encoded as “Jose Ramirez”.

Someone with way too much time on his hands decided that was intolerable and sued under Article 16. Now the Court of Appeals of Brussels has agreed and demanded that the bank fix things. It’s hard to imagine a quick fix for this and it’s even harder to see how the fix is not going to cost hundreds of thousands of dollars. Of course lawyers don’t know or care about any of this. They just want it fixed. Now. That’s why we all hate them.

If I were the bank, I’d suggest that this particular customer find another bank but the lawyers probably won’t like that solution either. Yes, yes. I know I’m intolerant. I know I’m not a European. I know my name doesn’t have a diacritical—but it’s misspelled so often it might as well have. But, you know, a little common sense would be appropriate here. No one—no one—is going to be confused when they see “Jose Ramirez” instead of “José Ramírez” but the lawyers among us still think it’s a critical issue. This is the very apotheosis of a first world problem.

UPDATE [2021-10-29 Fri 14:38]
Added verbiage to make it clear that José Ramírez is a made up example.

Posted in General | Leave a comment

Keyword Warrants

The Daily Mail has an article that serves as a nice coda to my previous post on how to avoid search warrants and DuckDuckGo not logging searches. In case you thought that concern over keyword searches was overblown, the Daily Mail article discusses the issue and a recent warrant that was accidently unsealed that reveals how these warrants work.

The issue—and it’s a U.S. issue—is that these warrants very likely contravene the Fourth Amendment to the constitution that prohibits general warrants and overbroad searches. If you’re in or sympathetic to law enforcement, it’s easy to see the attractiveness of these warrants. If you care about civil liberties and privacy, they’re an anathema.

One positive side effect of these warrants is that they—at last—show the silliness of the apologists’ cry, “If you having nothing to hide you have nothing to fear”. That was always nonsensical but these warrants show them to be explicitly so. You make an innocent Internet search and suddenly you’re caught up as a person of interest in a possibly serious investigation. To clear things up, maybe you miss some work. Maybe the authorities question your boss. Maybe you lose your job. So yeah, you do have something to fear.

The authorities understand all this too. That’s undoubtedly why they make these warrants secret even though there’s no reason to, especially after the investigation. The takeaway for us innocent bystanders is just what it was in the previous post: don’t use search engines that log your searches. There are plenty of perfectly fine search engines that don’t—DuckDuckGo, Brave, and Startpage to name just the ones I use—and you should get on intimate terms with at least one of them. And lose that abuser search engine that spies on you and goes running to Mom to tattle on what you’re up to.

Posted in General | Tagged | Leave a comment