• In Defense of Alexa

    Lots of times I’ll see people trash-talking Alexa on Facebook. They’ll assert that they’ll never get Alexa because she is a dirty spy. I don’t deny that Alexa has an always-on microphone and my wifi password, but these same Alexa-haters all have phones. Phones have microphones, too! You don’t really know if your phone’s microphone is on or off. You have no idea if your phone is always recording everything in its environment and then sending the data back to some mothership. Your phone could be just as untrustworthy as you believe Alexa to be.

    One of my friends had some tin-foil hat argument in defense of his phone. Well, it was more of a potato chip bag argument. He asserts that if you turn your phone off and then put it in a potato chip bag and come back several hours later and turn it back on and if the battery has not significantly run down its charge, then your phone can be trusted. (Really all this proves is that the phone was not franticly searching for a signal while it was in the bag. If I were writing the software for a spy-phone, I wouldn’t have it constantly searching for a signal. I’d be more subtle about it.)

    This is why I was so gleeful when I heard about the FaceTime bug that allowed people to spy on their friends via their iPhones. Evidence that phones are capable of the same sort of stuff that Alexa has been accused of. But wielded by people who actually know you and who actually care about what you might be saying as opposed to Amazon, a company that is allegedly so inept with data that they have different SKUs for the same product in different versions of their stores.


  • Things To Do Without Electricity

    Yesterday we had a 14-hour power outage.

    If I had known at the beginning that it was going to be a 14-hour power outage (it was originally estimated to be a less than 3-hour power outage), I would have moved the ice and the ice packs and various other frozen things into the fridge to keep it colder longer. I suppose that this gives me a good excuse to KonMari the contents of the fridge.

    Deep down I suspect that the cats were responsible for the neighborhood being without power all day. I had been telling them that I was going to wash the fuzzy blanket and vacuum the couch. This is something that they can not abide. My couch is still covered in cat fur.

    I tried to avoid running my phone battery down during the day, so I did not rely on the internet and YouTube when I tried to fix my bike. This led to me driving to the bike shop to have trained professionals save me from myself. It also gave me a chance to charge my phone with the car charger.

    The taco shop on the corner must have a gas griddle because I was able to acquire a hot and delicious burrito. They must have also been without refrigeration, but I got my burrito just a few hours into the power outage, so any risk was pretty low. On the other hand, today I am avoiding eating at any restaurants that were without power yesterday.

    During the first two hours of the power outage, I read the newspaper and ate breakfast at the coffee/bar. Later on, I went to a cocktail bar that I know has electrical outlets along the bar and charged my phone and my computer while I had cocktails for dinner.

    Tried doing some tidying up. Totally did not follow the rules for tidying up. I know that I am supposed to start with clothes and put them all in a pile in the middle of the floor, but just was not up for the amount of folding that this would have led to. So I selectively culled without examining everything. In my defense, I have properly tidied my clothes in the past few years, and I have not bought many clothes since then, so I was starting out a bit ahead of the game. Much the same to be said for books and for paper.

    Stopped before entering the realm of the komono. It’s always the komono.

    Did not photograph the lunar eclipse because it was cloudy.


  • Secrets from the Workplace

    1. Although I denied it when confronted, I was the one who left the Oreos in the break room.

    2. If winter continues, I may have to sneak a space heater into the office.

    3. I have a Raspberry Pi on the office wifi. I signed it up to be a part of FlightAware’s botnet.

    4. Violating the spirit of an admonishment from the accounting team, I printed my W2 on the office printer. I printed it amongst work-related things in case anyone got to the printer before I did.

    5. BugMaster fixed the formatting of the answer from a student who complained about losing points due to a formatting issue.

    6. I didn’t tell anyone that different TeX installations seem to render our new official corporate font differently. This is why I quickly backed down from my suggestion that we put all the LaTeX source files on GitHub and acquiesced to the proposal to host them on our heavily modded (and, therefore, quirky) in-house system.

    7. Left 10 minutes early on Friday.


  • This Week in First World Problems

    1. Indecision part 1: Not all of the “Komono” in the apartment belongs to me, and while I have Kon-Maried a significant volume of stuff, there are still things that need to be kept and stored. IKEA offers three different “cubby” shelves, the KALLAX, the EKET, and the FLYSTA, and I do not know which one to get.

    2. Indecision part 2: I am nine rows, give or take, away from finishing up the current knitting project. What do I knit next? Note that it must be something that can be made out of yarn that I currently own, as I suspect that I already own a lifetime supply of yarn.

    3. Do I load all the data all at once and then hide and show the various graphs based on user interaction? Or do I show half the data at the beginning and then have the page send a request for the rest of the data when the user wants it? The former strategy is likely to be easier, and it is liklier to give better performance if the user wants to switch back and forth between the views. The latter strategy is the one that I really need more practice implementing, so using it here would help me learn how to do it better.

    4. The coffee/bar near my house serves too many IPAs, and I don’t like IPAs.

    5. My favorite bar doesn’t have wifi.

    6. I took a photography lesson this week, and I learned a specialized technique for getting the autofocus to only focus on the things that I want to focus on. So now I need to go out and take a lot of pictures of things to practice the technique. Meanwhile, we live in a world where film is free (metaphorically speaking), so I can take well over a thousand pictures with a $20 memory card, delete them all, and do it all again.

    7. Also in photography: I have several projects that I want to do, and I’m going to need new lenses for some of them. Now I must decide which lenses to buy. (Fortunately, all three of my cameras use the same style of lenses.)


  • In Which I Admit the Way I Join a Whole Bunch of Tables

    First off, I am going to state my opinion that most of the advice that you find on the internet for writing SQL queries is meant for people who are doing something involving websites in production. You have some user logged into your site, and you want to show a moderately-sized collection of information relating to that user. Or, the user does something, and you want to update a small amount of information in your database. Because this is happening all the time and at unpredictable times and with no one supervising it, the queries need to run quickly without gumming up the works.

    You don’t really see much about the ways to write queries for analysis work. The database was designed to make the website run well, not to do some sort of analysis after the fact. Analysis work often involves grabbing data about a whole bunch of users and then doing a whole bunch of joins with other tables, possibly matching on columns that you were hoping to do calculations on.

    There is a certain standard structure for queries. Often people will SELECT a bunch of columns that come from a whole bunch of tables, and the tables will be aliased in ways that make it hard for me to remember which tables they come from. Worse, all of our columns seem to be named things like noun_id and our tables are named by mixing and matching a bunch of the nouns. Things like homework_students_problems_results or students_homework_classes_problems and other things that are easy to get mixed up with each other. So I spend a lot of time asking myself, “Wait, which problem_id is that talking about?” And then the litany of tables is joined in. Finally, there are some WHEREs in which I can’t remember which tables or columns are being restricted.

    So I have developed a personal style of query-writing which I call “rat nest of subqueries.” It’s great if you only need to run the query a few times during which time you are there babysitting it (and also it is running on some sort of test server and has no chance of melting a production server).

    And then I end up with something of the form

    SELECT * 
    FROM 
    (SELECT some_stuff
    FROM some_table
    WHERE something) T1 
    INNER JOIN
    (SELECT some_other_stuff
    FROM some_other_table
    WHERE something_else) T2
    USING(whatever)
    INNER JOIN
    (SELECT still_more_stuff, possibly_aggregated AS nice_name
    FROM yet_another_table
    GROUP BY still_more_stuff) T3
    USING(nice_name)
    

    and I just keep on chaining things together. I’m sure that the optimizer hates me. Yet, in my defense, the other day I ran a query written in the conventional way by one of the most experienced people in the office, and it took a thousands seconds to run. So does it really matter if my version of it would have taken 1100 seconds to run? You’re still going to need to find some way to entertain yourself while it’s running.

    And what I like about my way of doing things is that I can debug each of my subqueries on their own. I am terrible at tracking down the logic in the standard way of writing queries

    Now that everyone is super-bored by my yammering on and on about databases, I’d like to take a moment to say that some of the email that I get at work is pretty wild. I’m the person who gets your email if you are applying for most of the full-time jobs that we are hiring for. And some people do not know how to apply for a job. I really do wonder how many of the applicants are trying to stay on unemployment by sending out the required number of applications a week but intentionally sabotaging themselves so that they won’t get hired anywhere.


  • In Praise of Powdered Coconut Milk

    I thought that I was going to spend the day sewing. Then I checked FlightAware and saw that United was sending a 767, which they never do, so I went out to take its picture. Since we are having “winter,” I just threw on a coat over my pajamas. And then I came home and intentionally ignored the 777 that was coming and lolled about doing not much of anything.

    I happened to look out the window, and I saw a plane flying from west to east. I live about three miles from the airport, and when I look out my window I normally see the planes flying from east to west on their final descent into the airport. Seeing a plane flying from west to east means that the airport is all turned around and they are running both departures and arrivals off of runway 9. This happens very infrequently, and it almost never happens when it is sunny out. So I went to the park at the end of the runway and took pictures until I went through two camera batteries.

    But the real thing that this blog post is about is powdered coconut milk. This product is sad and terrible if you think that you are going to mix it with water and that it is going to be just like coconut milk. But as an ingredient, it exceeds expectations. For example, if you mix a few tablespoons in with the rice when you cook it, you will have coconut rice, which is delicious. Your meal can have a real sense of culinary fusion if you also buy mango salsa from the refrigerated section of Whole Foods. If my Instagram were not heavily themed, I might have taken a picture of the shredded pork that I made in the InstantPot served with coconut rice and several types of Whole Foods salsas.

    The other thing that powdered coconut milk is good for is making a batch of “we have no food in the house” soup. This is an amazing instant soup that owes its existence to various modern technologies for creating foods that last for a really long time. Its ingredients are: powdered coconut milk, chicken flavor “better than bullion” (keeps forever in the fridge), tom yum soup powder, and hot water. Add some Trader Joe’s pre-cooked chicken if you have it. Add some of those rice vermicelli that cook by soaking in hot water if you have them. If not, just drink the soup from a mug


  • Farewell to Nazi News

    Wow, it has been so long since I’ve written something that I worried that I forgot how this blog even works.

    I could tell you what an idiot I am about databases, but I was soothed by the fact that Google autocomplete suggested the rest of “postgresql opposite of unnest” after I had gotten halfway through “opposite,” so I am not the only database idiot out there. Also, I had an epiphany about joins that will lead to me writing very non-clever queries that are also very readable to me. YOUR PROBLEM NOW, OPTIMIZER.

    But instead I will inform you that I have finally cancelled my subscription to the New York Times. I think that I might have been a subscriber for over a decade this go around. Do you know what got me to cancel my subscription? No, it was not the sympathetic profiles of Nazis. No, it was not the consistent decision to put articles about male fashion designers’ businesses in the Business section but to put articles about women in business or politics in the Styles section. It was because they did not deliver my freakin’ paper.

    Around the end of the summer, the paper stopped arriving. Or, sometimes it would come after the promised time of 8am. So I would complain via the website. Report a missing paper; credit my account. After this happened a few times, I started sending emails to customer service. Customer service promised me that they were on it.

    And you know how this goes, the paper still didn’t come, so I called to cancel because it seemed stupid for me to report a missing paper every week and then buy it at the newsstand. The hard-sell guy on the phone (because you can not cancel without talking to a rep) looked at my file and all of the missing papers and emails with customer service and admitted that, yes, someone should have done something about this sooner. He was going to escalate this issue to the “executive” level. I told him I’d give him a shot to fix this because I still do want to read the paper, despite all the Nazis and other questionable editorial decisions. I did wonder why it took me calling up to cancel for them to actually try to do something about the problem that I had been having – and complaining about – for months.

    The next week my paper arrived at 7:58am, which is technically before 8am.

    But then yesterday, the paper still hadn’t arrived by 8:30am, so I got in touch with the Times again to cancel. This rep also pleaded for another chance. This rep asserted that none of the other reps that I talked to had the level of access that he has to contact the people who could fix this problem, but that he could solve the issue. My thought were that either (1) he was lying (or mistaken), or (2) you really do need to threaten to cancel your subscription not once but twice before you get to talk to a rep with any power to do something about the issue. Neither of these options seem like business practices that I wanted to support. So I cancelled. Even though he offered to let me retain digital access for more dollars a month than I was paying for both the paper and digital access.

    The winner here seems to be the guy who runs the newsstand because I am going to buy the paper there. The surprise loser is the Los Angeles Times. I strongly suspect that the same carrier who was not delivering my New York Times also has the contract for the LA Times, so I wasn’t going to risk subscribing to a different paper. Ten years from now (once I have lived in California at least as long as I lived in New York) I may revisit that decision.


subscribe via RSS