-
In Praise of sed and Copy-Paste
Nothing useful or interesting to report today.
A project that I had been working on a while ago has finally percolated back up to being an emergency, so I need to finish it. I had a really nice proof of concept that worked on a particular subset of the data. It also output the results in a format that could only be use to validate the calculation against what had been done in the past. So now that I remember how the code works, I thought that I had to find a way to get it to work on the other major class of data, and I thought that I had to rewrite the fussy formatting stuff to export the results according to the spec.
And then I remembered that this code only needs to run once a year. If I can get it to work on the magical date in June, then I can put it aside for months and months and months.
I also realized that the best way for me to deal with both of my problems is with doing some judicious copy-paste (or text manipulation with sed). The most significant difference between the two data sets is the names of columns that are thrown away in an early step of the analysis. Also, this particular data source only publishes as CSV (and is not easy to get directly from the database). So I’ll just rename the bad columns in the new data to match the names of the bad columns in the old data. It doesn’t really matter whether they record the same sorts of information because the bad columns are thrown out.
Also, the end-goal of this particular project is to give a colleague an Excel-type spreadsheet. What is super-annoying is that information that I internally encode in a single column is expected to sometimes be recorded in one column and sometimes be encoded in two columns in the final product. Yes, this is super-weird. My column contains a number from the set {0, 1, 2}. If the value is 0, then there should be some specific words in column C in the Excel spreadsheet, and column D should be empty. If the value is 1, then there should be some other words in column C in the Excel spreadsheet, and column D should be empty. And if the value is 2, then I should have the same words as case 1 in column C, but I should also have some additional words in column D. Eff that, I’m going to save my results as a CSV and then do a find and replace on
,0\n
,,1\n
, and,2\n
. And then I’ll open it in some sort of spreadsheet app and export it in Excel format.And that is today’s update from the glamorous world of tech.
-
Shibboleth
Normally I like to have at least three points in one of these list posts. And normally I don’t like to use events from last week. But sometimes I need to work with what I have.
-
Last week at the dentist’s office, my dentist greeted me, as usual with dzień dobry, and I replied in kind. He tried to continue the conversation beyond the few words that I know, and I said, nie mówię po polsku. Over the years I have become so practiced with that sentence that it sounds less and less believable.
-
This morning I had to go and talk to the nurses at the neurologist’s office so that I could fill out some paperwork. Since I didn’t have an actual appointment, I brought my knitting with me so I would have something to do in the waiting room. And since I only have one project in progress right now (yes, I’ve been working on this one thing for too long because the cats won’t let me knit in piece), I didn’t really have a choice of what to bring.
Fortunately, no one asked me what I was making. Knitting in public often brings questions. The short answer is, “a scarf.” The questions get harder when I am knitting with other knitters. They notice that I don’t have a pattern. I explain that, yes, I am just making it up as I go along. I see the arrangement of color and shape in my mind, and I am just knitting what it looks like. A lot of other knitters are uncomfortable if you are knitting without a pattern.
-
-
Sunday Updates
-
Went to see the new Star Wars movie. It was OK. There was a lot of obligatory fan service. Perhaps one of the best parts was that out in the hallway of the theater after the movie was over two elementary school children were explaining to their dad why he was wrong about a specific claim he made about a character, and these children backed up their points with meticulous references to several films that were made before they were even born.
-
I am so bad at recognizing faces that the only reason I knew that “the other blonde lady from Game of Thrones” was in the movie was because I had read that ahead of time. It is too bad that the left parietal lobe is not responsible for facial recognition because it would such an easy explanation if I could blame the abnormal part of my brain for my inability to recognize people. You know what the left parietal lobe does? Math.
-
Got an email from the organizers of the conference that I went to last month about what they are doing about a talk that violated their code of conduct. I did not attend the session with the offending talk, so I did not know that it existed until I received this email. I went back and looked at the list of abstracts, and I have no idea which talk it might have been, as all of the abstracts were things like, “interesting things about numbers and shapes” and not “someone is going to recount non-mathematical anecdotes.”
-
I am now almost a month behind on doing the NYT Sunday crossword puzzle. I am thinking that this might be another sign that it is time for me to cancel my subscription to the NYT.
-
Speaking of platforms that need to decide to what extent they are willing to publicize offensive ideas, I had to delete some posts off our message boards today because some of the terrible people on the internet are children.
-
Got a text message from Walgreens that a “partial refill” of one of my prescriptions was ready (levetiracetam). Instead of my usual 60 pills, they had… three pills in stock. Three. They should have more in stock on Tuesday. I am hoping that I can receive some guidance from my doctor’s office about how to taper off this medication since it is not working enough for it to be worth it for me to take it. But since I know that my doctor’s office can not handle multiple questions in parallel, I am going to wait until they finish their part of “talk to insurance companies and drug companies” before I ask about stopping this medicine.
-
Roomba needs a new battery.
-
-
The Robots Stealing Our Jobs
One of my Facebook friends posted something about how the robots are going to come and steal our jobs. Because I can be remarkably polite, I just kept scrolling instead of leaving a comment. But let me tell you a (true!) short story about the job-stealing robots.
Once upon a time, there was a university, and this university had a math department. The math department employed a large number of people, on salary. Within a fairly large margin, it did not matter how much time these people spent doing their jobs; they would be paid a set amount.
This university also owned a Scantron machine. The Scantron machine was controlled by one particular department—which was not the math department. This department would allow other departments to use the Scantron machine for a fixed number of pennies per Scantron scanned. Scanning an entire large lecture calculus final worth of Scantrons would cost tens of dollars.
The department with the Scantron was unable to accept payment for scanning except as a transfer from one department’s budget to the other. So if, for example, someone teaching math wanted to spend tens of her own dollars so that she and her TAs did not need to grade a multiple choice final by hand, she could not do that. The only way for the calculus final to be scanned by the Scantron machine would be for math department to transfer over those tens of dollars. And the math department was unable to accept those tens of dollars from a person; these dollars had to be bestowed upon it by the higher administration.
And so humans graded a multiple choice final by hand, even though they were willing to pay a robot to do their jobs.
-
Matching!
Subtitle: Traditional non-western medicine? Or modern western medicine?
Sub-subtitle: I’ve been reading about neurotransmitters, and I am having a hard time taking modern medicine too seriously.
Match each description with its name.
Descriptions
-
Hot and dry characteristics. Fever, dry skin, dry mouth, reduced urination. Slow, tired, sleepy. Clear lungs and reduced mucus production.
-
Hungry, anxious, full of motion. Irritability. Aggression.
-
Dry and cold characteristics. Rough skin. Anxiety. Constipation.
-
Anxiety and movement disorders. Insomnia, mental illness, and addiction.
-
A pattern of heat, red face, and fever. Heavy movements, heavy breathing. Discomfort when touched.
Names
Yang imbalance (Chinese medicine)
Loong imbalance (Tibetan medicine)
Vata imbalance (ayurvedic medicine)
Dopamine agonist (western medicine)
Acetylcholine blocker (western medicine)
-
-
Amusing Typo
We got an email from the parent of a student who has been recognized for his academic achievements.
My hunch is that the student wrote the email in the first person and was going to send it to us, but then the parent decided to rewrite the email in the third person and send it on the student’s behalf.
Because it contains the phrase: “…help him work towards my goal.”
-
Email Mixups
There are several people out there who have the same name as me.
NB: If you are bothered by or unhappy with the content of this blog, then it is written by one of the other people with my name. I don’t know why she keeps writing these crazy things on the internet! People keep thinking it’s me! So embarrassing!
Two of the other people with my name keep accidentally giving out my email address. One of them lives in Colorado, and the other one lives in Brooklyn. The one who lives in Brooklyn is looking for a job, and she has applied for a few jobs—and put my email address on her online application.
One online application site is a total amateur hour. You don’t need to verify your email address before completing the registration process, so she submitted her address, phone number, and job application connected to my email address. Once she had submitted all this information, the recruiter site sent “her” (me) an email confirmation. I went to the site, clicked the “I forgot my password” link, reset the password, logged in, and got her information from the “My Profile” page.
Today I got a strange recruiting email. Usually most of the recruiting spam I get is from small tech companies who misunderstand my aspirations, interests, and skillset. (In case you are wondering, my dream job is “software muse,” in which I hang around the office and people can bounce ideas off of me about whatever it is that they’re working on. But I could also do “catalyst” or “artist in residence.” And on a contract basis, you can pay me to remind you that Likert scale data is not normally distributed.) Today, though, I got an email for a recruiter for a public school for poor kids in New Jersey.
Odds are that this enticement to apply was meant for the woman from Brooklyn, so I wrote back to the recruiter and gave her the cell phone number I got from the job application profile.
subscribe via RSS