Sonos Ray

For my ten year anniversary at SHI, I got 2000 points to spend on a gift for myself. SHI uses a service that has an online catalog of random stuff that you can pick. 2000 points seems to equal somewhere around $300. At first, I thought this system was overly complicated and kind of dumb, but when I thought about it, I guess it’s better than the obvious alternatives. The two other likely options would have been (a) just giving me an extra $300 in my paycheck, or (b) giving me some random corporate gift. For that first option, the money would have just gone into my bank account, and I would have forgotten about it. For the second option, they probably would have given me a nice pen or watch or something that I didn’t want or need. So I guess the “points” thing is actually a pretty good option, since it allows me to pick out something cool that I actually want.

So I got a Sonos Ray. I’d been thinking about buying one for a while, but hadn’t previously talked myself into it. I figured it would be a good way to get better sound out of my TV, without too much hassle. Up until now, I’d been using the built-in speakers for everyday use, and switching to my big old-fashioned stereo for movies or anything else where I wanted good sound. Routing through the stereo works well, but it’s a little bit of a pain, since it requires some button-pressing, and since I have no way of adjusting volume without getting up off my couch.

I’m already in the Sonos ecosystem, having bought a Sonos One in 2018, and a second one a bit later, which I have configured as a stereo pair. I use those often to listen to the radio, and sometimes for Apple Music. That works pretty well.

The Ray showed up yesterday, and was quite easy to set up. The Sonos app recognized it on the first try and added it to my system. It’s set up as a separate target from the Sonos One pair. In theory, I can stream music to it, the same as to the Ones, but I think I’m just going to use it for the TV. Setting it up to work with my TV remote was easy too. I can set the volume or mute it easily from my TV remote (or my TiVo or Apple TV remotes).

Overall, I’d say that the sound quality is better than the TV speakers, but not quite as good as my big old stereo speakers. But those are probably overkill for most TV. I’m not sure if I’ll be tempted to switch back to the old stereo speakers for movies or other stuff where I want the best possible sound. If I do, it’ll be a bit of a pain, since I’ll need to reach behind the TV and move the audio cable from the Sonos to the DAC that I use to bridge from the TV’s digital out to the stereo’s analog input. (Maybe I could find a DAC with a digital in, analog out, and digital passthru out. That would work…)

It occurs to me that, if I stop using the stereo for TV sound, then I’ll have pretty much stopped using the stereo entirely. I listen to the radio through the Sonos Ones now, since it’s much easier than trying to pick up over-the-air radio here. And I route Apple Music through the Sonos, because that’s the easiest way to do it. I don’t really listen to CDs anymore, and I don’t really use my little Volumio box anymore either. I don’t plan on getting rid of the stereo, but it’s interesting to think about how my listening habits have changed.

Ten years at SHI

I happened to notice my five year work anniversary post earlier this week, and thought I should write a ten year anniversary post. I hit my ten year anniversary about a week ago. I guess it’s kind of a big deal, since this is only the second job I’ve had that’s lasted this long. The previous one was NMS, where I worked for around 13 years (1996-2009). I probably would have hit 15 years there, if the company hadn’t got out of business.

A lot has changed at SHI since that five-year mark. A lot of those changes happened in 2022. I switched to a new boss, then back to the old boss. There have been a lot of management changes within IT in 2022. And I got promoted to “IT Solutions Manager,” whatever that means. I now have three direct reports, all CRM developers (which is kind of awkward, since I don’t really know our CRM system).

I’m doing less AX 2012 development, and am gradually moving into more Dynamics 365 development. We’re just in the planning stages of moving off of on-prem AX 2012 to Dynamics 365 F&O. And, since the CRM devs have been moved into our group and now report to me, I’m learning about our Dynamics 365 CRM environment. It’s all going pretty slowly, but we’re a big company and there’s a lot going on. (And yes, I know that F&O apparently isn’t called F&O anymore and CRM isn’t called CRM anymore. I can’t keep up with Microsoft’s crazy product naming shenanigans…)

I think there’s a good chance I’ll still be with SHI in five years. (Though I worry that saying that out loud will jinx it…) There have been a lot of layoffs at tech companies recently, but I don’t think SHI is planning any. And it seems like there’s a lot of opportunity there to do interesting work.

I’m realizing now that I’ll be 60 years old in five years, and 65 in ten years. I don’t know if there’s any point in thinking that far ahead, but it seems to me like there’s a real chance I could finish out my working years at SHI.

There’s a lot more I could say about my job right now, but there wouldn’t be much of a point to it. I’m relatively content where I am. There’s a lot of uncertainty, but there’s uncertainty everywhere. I think I have some good coworkers, and I think I’m in a pretty good situation.

Time Marches On

So it’s Sunday morning again, and I’m futzing around on my laptop, aimlessly, as is my wont.

I thought I should mention Twitterrific again, as it now seems to be 100% officially dead. So I guess I should remove it from my iPhone and iPad and give up on Twitter completely now. I’d been holding out some hope that Elon would reverse course and turn the API access back on, but I guess not. Sigh.

I was also looking around at the “on this day” links on the sidebar of my blog, and noticed this one, originally linking to the website that my brother Pat and his wife Heather set up. Heather gave up the domain name for that, heatherandpatrick.com, a long time ago, after Patrick passed away. But, just for yuks, I decided to see what, if anything was at that domain now. Turns out that another Heather and Patrick are using it as a website for their upcoming wedding! That’s kind of nice. (Certainly better than the domain squatters who had been sitting on it every other time I’ve gotten curious about it over the years.) Anyway, they seem like a lovely couple, and I hope they have a great wedding!

On a completely different subject, I just got a notification that TiVo is turning off their suggestions feature. Kind of sad to see this going away, though I hadn’t used it much since I dropped back to the Broadcast Basic cable plan. This news got me curious about what alternative are out there to watch broadcast TV, rather than cable + TiVo, for me. First, it looks like I would still have no luck with an antenna. AntennaWeb still indicates that I’d need a major-league outdoor antenna to pick up anything from here. So that’s out. And some of the streaming services like Hulu + Live TV include the major broadcast networks, but that costs $70/month, which is way more than Broadcast Basic is costing me. So I guess I’m sticking with minimal cable + TiVo for now, even though TiVo seems to be in a slow death spiral, and my cable provider’s support for CableCARD is probably dicey at this point.

The Giants lost to the Eagles last night, so my interest in football for this year is mostly done, though I might watch the rest of the playoffs and the SuperBowl anyway. I really got interested in football this season, and that was kind of a surprise to me, since I’ve been losing interest gradually for quite some time now. I guess it was mostly the Giants doing well that kept me interested? Maybe also that, this season, football seemed to be just about football. There was almost no talk about politics or racism or COVID or brain injuries or anything. I realize that all those things are still going on, but I could watch a football game and pretend that it wasn’t for a few hours? Or at least not think about any of it? It was a nice escape. (And yes, the Damar Hamlin thing was a sudden jolt of reality, but he seems to be doing reasonably well, so that’s good.)

Speaking of escapism, I started watching Star Trek: Discovery season 4 yesterday. I signed up for Paramount+ a little more than six months ago, largely so I could watch all the new Star Trek shows, and I still haven’t watched a lot of it. I’ve mostly just been using Paramount+ to watch Inside the NFL lately. I need to catch up on both Discovery and Picard. Maybe now that the Giants are out of the playoffs, I can catch up on all my sci-fi TV.

more on Twitter and Mastodon (sorry)

Twitter continues to shoot itself in the foot. I tried using Twitterrific on my iPad on Friday morning, and found that it wasn’t working. It didn’t work on my iPhone either. I figured it was Elon-related, whatever it was. Turns out that Elon has intentionally shut down third-party Twitter clients. Or at least that’s the rumor. There’s been no “official” announcement from Twitter. There’s a blog post from the Twitterrific developer here. Either way, assuming this doesn’t get reversed, I guess this means I’m pretty much done with Twitter. Twitter is only usable (for me) with a third-party client like Twitterrific.

So I’ve rearranged the home screens on my iPhone and iPad to move Twitterrific off to a sub-folder. And I need to remember to cancel my subscription to the Twitterrific app at some point, though I guess if Twitter doesn’t reverse their shutdown, the app developer will probably shut down the app and it’ll get canceled automatically. I’ll be sad to see it go. I’ve been using it since at least 2017.

I thought about just putting the Mastodon app where the Twitterrific app used to be, but then I thought that maybe I should rearrange things a bit more. So, on my iPhone, I now have the NY Times and Washington Post apps in a more prominent spot, and I’m going to try to click on those more often when I’m mindlessly futzing with my phone.

I recently listened to an podcast, talking about “deep reading.” I’ve been thinking about attention spans and media consumption and stuff like that again a lot lately. Of course, I’ve been thinking about that stuff since at least 2008. And I’m still struggling with it. I think I have another blog post in my head on that subject, but I’m going to resist writing it right now.

more MusicBox

Since my previous post on MusicBox, I’ve been putting a lot more stuff into it. Today’s project was to go through my main Amazon wishlist, and move all of the albums I had in there over to MusicBox. That has resulted in about another 150 albums added, so I now have almost 400 albums in there, total. So I could probably stop looking for new music to listen to, and just work my way through the stuff in MusicBox, and I wouldn’t run out of new stuff for a few years, at least.

I had stuff in that wishlist going back to 2005. Lots of albums I’d run across at some point, and thought “I should buy that,” and then never did. (Which is fine. The purpose of my Amazon wishlist, over time, has largely been to keep me from making impulse purchases that I don’t really need…)

A pleasant surprise during this exercise was finding that ‎I Advance Masked by Andy Summers & Robert Fripp is now available on Apple Music. This is an album that I bought on vinyl when it first came out, in 1982. And it has, for some reason, gone out of print and hasn’t been available on CD or digitally. So I haven’t heard it in quite a while. I had the CD version on my wish list, but I didn’t want to pay the inflated prices it was fetching. Well, now it seems to have finally gotten released digitally. So I’m going to have to listen to that soon, and see if it’s as good as I remember.

I spent around two hours today working on this, with the Bills game on in the background. This was a pretty good activity for me right now, since my brain is acting a little funny. I’ve had a bad cold for several days. I’m mostly over it now, I think, but I was having a bunch of trouble with nasal congestion last night and this morning. So I took a pseudoephedrine, which tends to make me a bit jumpy. So I’d be too fidgety if I tried to sit still and just watch the game. But if I tried anything more mentally taxing than this exercise in copying & pasting, I’d probably screw it up. I’m hoping I’ll be back to “normal” tomorrow, so I can actually be somewhat productive at work.

MusicBox for Apple Music

It’s the day after New Year’s Day, and an official holiday, since yesterday was Sunday. This is the best kind of holiday, since there’s really no expectations that go along with that. (All that stuff happened yesterday.)

So I had some grand (but vague) plans around spending the day in front of the TV watching movies. But that didn’t happen. I spent some time this morning reviewing my finances from 2022 and making plans for 2023. I ran some reports out of Quicken, set up some reminders in Evernote. That kind of thing. So that was useful, and necessary.

But then I got the idea that I should look into organizing my Apple Music stuff. Now that’s a pointless rabbit hole, and I know that. But I found this article about the app MusicBox, on MacStories, and decided that I was going to buy it, and then use it to clean up all of my “listen later” notes. And, well, now it’s 4 PM, and I have 200 albums saved to MusicBox.

I started out by going through my Pinboard account, looking for Apple Music and Bandcamp links that were marked as unread. I found about 100 of them, and added them to MusicBox. For Apple Music links, it was easy. You can just copy the link into MusicBox, and it’ll add it. For Bandcamp links, it was a little harder. I think MusicBox is supposed to work with Bandcamp links, but I wanted to have them in there as Apple Music links, so I would search for the album in question in Apple Music, then share the URL into MusicBox. That all took about an hour.

Next, I went through my list of “interesting music” in Evernote. That was just basically a bulleted list. For some of the albums, I had the Apple Music URL there; for some, just the artist and album name. For the ones with URLs, I copied them all into a text editor, cleaned them up a bit, then imported them into MusicBox all at once. For the others, I searched for them in Apple Music, then used the share button to get them into MusicBox. That also resulted in about 100 albums added, and took about an hour.

I also have a habit of finding something interesting on my iPhone and just taking a screenshot of it. So, finally, I went through all of my screenshots and found another 15 or 20 albums to add to MusicBox. For those, of course, I had to search for the albums in Apple Music and then add them with the share button.

So I’ve got a total of 216 albums in there now. (Mostly albums; a few singles too.) I’m not sure what kind of workflow I’ll use to listen to them and determine what to do with them. MusicBox supports tags, so I should probably create an “added” tag for stuff I’ve added to my library. And maybe a “meh” tag for stuff I listened to, but didn’t like that much? (By the way, I was using the macOS client for all of this organizational work, not the iOS client.)

I feel pretty good about having cleaned up the mess I had in Pinboard, Evernote, and my photo library. But I’m not sure if MusicBox is really going to turn out to be much better. I think it will.

I’m a little worried about the fact that MusicBox doesn’t seem to have an export function. If I decide I want to ditch it and try something else, it’ll be a pain to move it all.

And it’s a bit inconvenient that it doesn’t have either a web interface or a Windows client. It only works on iOS and macOS. So it’s not going to be terribly useful when I’m sitting at my PC. I guess I can continue to use Pinboard as an intermediate place to store links, if I come across them on my PC.

Overall, I think MusicBox is going to be a good organizational tool for me. Maybe I need to loosen up a bit on looking at music as a to-do list, but I think I’m just wired that way. I’ve got my “want to read” shelf in Goodreads, and my Kindle wishlist in my Amazon account, and my Netflix queue, and so on and so forth. I don’t think I’m going to change into a happy-go-lucky guy who just picks stuff at random to watch/read/listen to.

New Year’s Day 2023

It’s 8 AM on New Year’s Day, and here I am again writing my traditional New Year’s Day post. I have a bit of a headache today, not because I was up late partying, but because I had trouble sleeping. I went to bed at 9:30 last night, and slept reasonably well until around 11, when nasal congestion and random noise from outside woke me up and pretty much ruined my sleep until around 4 AM, when everything quieted down and my nose cleared up, and I managed to get a couple of hours of sleep. I got out of bed at 7. I guess I have enough coffee in me now that I can get through the day, but I think I’ll need at least one nap today, and I’ll probably need to go to bed early again.

I’ll start this post out with links to some previous posts:

  • Last year, I blogged on Jan 2.
  • And here’s 2021, 2020, and 2019.
  • And probably my earliest New Year’s Day overview post, from 2008.

And I’ll break this post down into sections, since it might get a bit lengthy.

Health, Weight, and Sleep

I started seeing a new doctor this year, and she wasn’t interested in seeing me more than once this year, so I only had a single doctor’s visit in 2022, in May. My blood work was fine, and I guess my general health is fine.

I got two COVID booster shots this year, in April and September. The second one was the bivalent booster. As far as I know, I still haven’t gotten COVID. I might have gotten a mild case once or twice; I’ve certainly been sick a few times. But never bad enough to see a doctor. (And I usually test myself for COVID if I’m sick, and I’ve never had a positive test.)

I do feel like I got sick more often than I’d like last year. I’ve noticed that doing pretty much anything that involves being out in a crowd for a nontrivial amount of time results in me getting sick the next day. I’ve always been like that, to some extent, but I think it’s getting worse.

My sleep has been good and bad this past year. In the last couple of weeks, it’s been more bad than good. but for a few weeks prior to that, I’d been sleeping quite well. So I’m not sure what’s going on there. I think that a lot of it is sinus problems.

My weight has gone up a bit this year. I started 2022 at 140 pounds, and I’m now at 150. I’d intended on drawing the line at 140, but I’ve just crept up to 150, and I haven’t really cared enough to commit to getting it back down. I’m not sure if I need to, really, if I can actually draw the line at 150. I think that’s a reasonably healthy weight for me. My problem over the last year is that I’ve been eating a lot of cookies, to be honest.

I’ve done well with exercise this year, I think. I’ve been pretty consistent about getting a lot of walking done. In fact, it’s nice enough out that I should probably take a break from this blog post and go out for a walk right now.

Work

…and now I’m back from my walk and it’s a little after 9 AM. So my next section is going to be about work. I’m still working for SHI, and I’ll hit my ten-year mark this month. My longest time at one job was NMS, where I worked for around 13 years. So SHI is in second place, and may surpass NMS, if I manage to stick around for a few more years.

After being in pretty much the same position, with the same manager, for most of my time at SHI, there were a lot of changes in 2022. In April, there was a bit of a shake-up, and my group got moved under a different manager, in a different group. Then, in July, we had the data breach. And in August, there was another management shake-up, and I got moved back under my old manager. And in November, I was promoted to “IT Solutions Manager” and am now responsible for managing three programmers. Additionally, these programmers work on our CRM system, so I’m (gradually) moving from working primarily on AX to working on CRM.

And that’s a simplified timeline. There’s a lot more going on than what I described there. I guess it’s mostly good, and we’re on a good path for growth in 2023? I’m not really high-level enough to have a good picture of the company’s overall health, and whether or not we’re on the right path. I guess I’ll stick with “cautious optimism.” I’ve updated my resume, but I’m hopeful that I won’t need it in 2023.

In terms of professional development, it’s good that I’ve been promoted into management, I guess. I’m still basically a hands-on programmer, and my three reports are doing their own thing, for the most part. I may take more of an active hand in 2023, but that’ll depend on how things shake out.

Looking at the books I’ve read and courses I’ve taken in 2022, I put a fair bit of effort into learning scrum earlier in 2022. There was a big push for scrum that went along with the April management changes. That kind of fizzled out after the data breach and the August management changes, but we’re still (kinda) doing scrum. I also put some effort into working on programming fundamentals, reading a few books related to “Clean Code” and refactoring. And, for specific technologies, I’ve been trying to learn a bunch of random stuff that’s all directly related to projects I’m working on. I could get into all that, but then this post would get way too long.

The New Normal

…for lack of a better title. COVID is still a thing, regardless of whether or not people want it to be. SHI has us working in the office two days a week now. For me, that’s Tuesday and Thursday. It’s not too bad, I guess. I wear a mask when I’m not at my desk. There aren’t too many other people who still do, but there are a few.

They might let us keep to the two day schedule through 2023, but they also might try to get us to come back full-time, or maybe four days a week. I’m not sure. I’m really hoping they stick with the two day per week plan. I’m not ready to go back to the office full-time.

I don’t go out nearly as often as I used to. My only trip to NYC this year was in March, when I took the train to Albany for a funeral. (I switched from NJ Transit to Amtrak in NYC, so it was just a brief visit.) And that trip was really my only trip out of NJ. I almost had my E-ZPass canceled this year, because I haven’t used it since 2019. I got them to keep it active for another year, but I should probably give it up. Similarly, I should probably give up on my memberships to the Met and MoMA. I haven’t used either this year.

I had bought a badge for NYCC in October, but I decided to skip it and got a refund. I’m pretty sure that was a good idea, and that I would have gotten horribly sick if I’d gone. I may be done with comic conventions entirely now. I’m really not sure.

Books, Movies, TV, Music, Etc.

So this is the fun part of the post. (Maybe.) I’ll start with a link to my Goodreads Year In Books for 2022. I read 76 books this year. A lot of them weren’t really books, per se. I started the year with a bunch of Big Finish Doctor Who audio dramas, for instance. Looking at the list, I think I read around 20 actual novels in 2022.

I gave up on trying to read any classics in 2022. Instead, I put some effort into putting a dent in my backlog of random Kindle books, reading stuff that I got from old Humble bundles and stuff like that. There was some good stuff in there, but also some stuff that was OK but forgettable. I also got back into a couple of my favorite book series, The Dresden Files and The Laundry Files. I’d last read a Dresden book in 2015, and a Laundry book in 2017. I didn’t read a lot of comics in 2022. Probably my favorites were the two Hilda books I read.

For movies: I still haven’t been back to a theater, since 2019. So I only watched movies at home. From my Letterboxd stats page, I can see that I watched 84 films in 2022. That’s less than 2021, when I watched more than 100 films. My highest-rated films from 2022 were My Father’s Dragon, Turning Red, and Doctor Strange in the Multiverse of Madness. My highest-rated re-watches were Howl’s Moving Castle and Who Framed Roger Rabbit, both of which I bought on Blu-ray in 2022.

For music: I mostly listened to music via Apple Music this year, so (in theory) my Apple Music Replay ’22 page should be pretty accurate. In practice, it’s a little weird. My top track for the year is the first track on Max Richter’s Sleep, which is probably because I put it on sometimes when I’m taking a nap on my sofa. My second most-listened track is Heavy Heart, by Bartees Strange, which makes sense, I guess. I do like that song.

Beyond that, I’ve listened to a lot of Bombay Bicycle Club, Bibio, and a few others. If I was going to pick my favorite album from 2022, it would probably be Bibio’s BIB10. Replay doesn’t tell you how many albums you’ve added to your library during the year, but I keep a list of those in Evernote, and I see I added over 50 albums in 2022. So I’m definitely listening to a lot of new stuff. (And old stuff too.) I guess I’m getting my money’s worth out of Apple Music.

For TV: I don’t keep track of the stuff I watch on TV the way I do with books and movies. I’ve definitely watched a lot of TV in 2022, but I can’t think of anything in particular that stands out. I’m still subscribing to Netflix, Disney+, and Paramount+. I switched to the Disney Bundle in 2022, so I get Hulu and ESPN+ too now. I’m not particularly proud of the amount of TV I watch these days, but there are times when I’m just too tired to do much else.

Summary

I feel like there’s more I wanted to write about here, but it’s almost 11 AM now, and I’m running out of steam. I should wrap this up, and maybe go out for another walk. I’m not making any resolutions for 2023. I’m planning on just playing it by ear. If I can manage to lose a few pounds, that’d be nice. If I can move forward on some professional stuff, that’d be good too.

Merry Christmas, I guess.

It’s Christmas morning. I’ve been fighting a cold for the last few weeks, on and off. Today’s status is “kind of congested, scratchy throat, and not enough energy for anything even vaguely challenging.” It was 5º yesterday morning, and 14º this morning, so it’s been a very cold couple of days. My heat has been working reasonably well, so that’s good.

I spent Christmas Eve watching football, mostly. A friend dropped by for a few hours and hung out. He gave me an A500 Mini for Christmas, which was pretty cool. I haven’t tried to hook it up yet. (See “not enough energy…” above.) The Giants lost, but they’re not out of playoff contention, so that’s good. And it was a fun game to watch.

I’m listening to Jon Solomon’s holiday marathon on WPRB right now. He’s currently playing Snaildartha, which is a nice thing to listen to when you’re trying to get through Christmas morning with a bit of a headache and not much energy.

And it’s working well as background music while I change the passwords on all the personal accounts I had stored in LastPass. The information that’s come out recently about their breach is a bit alarming. I don’t really use LastPass for personal use; I have a 1Password account for that. But we use it at work, and I have a linked personal LastPass account in which I’ve stored passwords for a few accounts that I occasionally need to use at work, like Pluralsight, StackOverflow, ACM, and stuff like that. I’ve done some background reading on the breach, and it sounds like it’s unlikely that anyone would ever bother trying to crack my password vault. But it’s possible that they could, and the accounts I had in there are ones where I had some questionable passwords anyway, so I went ahead and changed them.

I’m not sure what our InfoSec people are going to recommend we do with business passwords in LastPass. They’ve already forced us to reset our LastPass master passwords, but that’s useless if the hackers already have a copy of our data (which I guess they do). The official LastPass blog post says “…it would take millions of years to guess your master password using generally-available password-cracking technology”, so I guess we’re safe. Oof. I shouldn’t be thinking/blogging about password breaches on Christmas Day, but here we are.

I’m trying to figure out what I want to do with the rest of the day now. There’s football to watch, which could keep me busy from around noon until I go to bed. I’ve also considered binge-watching one of the many TV shows that came out this year that I haven’t watched yet, like Andor on Disney+, or one of the Star Trek shows that I haven’t caught up with yet.

Maybe I could watch something Christmas-related. I watched the 1984 version of A Christmas Carol, with George C. Scott, last night, and that was good. And I re-watched Shaun the Sheep: The Flight Before Christmas on Netflix. Also good.

And, since Christmas falls on a Sunday this year, I have tomorrow off from work too. So maybe I can watch football today and Andor tomorrow. I’m not sure if Andor is in any way Christmas-y, but it seems to have a character who looks a little like Santa, based on the main image that goes with this article.

a little PowerShell

It’s been a while since I’ve posted any PowerShell code. I had to write a quick script today to run some SQL, save the output to CSV, then ZIP the CSV file. And I had to loop through and the run SQL multiple times, one for each month from January 2021 until today.

That forced me to look up some stuff that I didn’t know how to do in PowerShell, off the top of my head. (In fact, most of it was stuff I didn’t know off the top of my head. I don’t use PowerShell enough to remember anything…) So here’s an edited version of the script, simplified somewhat. It might come in handy some time, if I ever need to do this again.

# CustInvAll-export.ps1

#Requires -Version 7
#Requires -Modules SqlServer

$dateFmt = 'yyyy-MM-dd'
$sqlServer = "MyServer"
$dbName = "myDB"

$curDate = [DateTime]::Today
$startDate = [DateTime]'01/01/2021'
while ($startDate -lt $curDate) {
    $endDate = $startDate.AddMonths(1)
    $startDateFmt = $startDate.ToString($dateFmt) 
    $endDateFmt = $endDate.ToString($dateFmt)
    
    $exportSQL = @"
    SELECT *
    FROM MyTable
    where [INVOICEDATE] >= '$startDateFmt' and [INVOICEDATE] < '$endDateFmt'
"@
    $exportFile = "CustInvAll-$startDateFmt.csv"
    $exportFileZip = "CustInvAll-$startDateFmt-csv.zip"

    echo "Exporting from $startDateFmt to $EndDateFmt to file $exportFile"

    # Invoke-Sqlcmd -ServerInstance $sqlServer -Database $dbName -Query $exportSQL `
    # | Export-CSV -Path $exportFile -NoTypeInformation  -UseQuotes AsNeeded

    # Compress-Archive -LiteralPath $exportFile -DestinationPath $exportFileZip

    $startDate = $endDate
} 

It can also be found in a Gist.

more dumb social media stuff

The big news on Twitter today was that Elon is banning accounts that promote rival social media platforms. I have a link to my Mastodon account in my Twitter profile, so let’s see if that’s enough to get me banned. Meanwhile, there was some hilarity when one media outlet got confused and thought that Twitter had banned someone named “John Mastodon.” So I may have spent too much time today switching back and forth between Twitter and Mastodon, following all the silliness around that.

I’ve decided to turn off the function in WordPress that automatically shares posts to Twitter. And I added a link to my Mastodon account to the site footer. I’m probably going to keep checking Twitter, since there are still a bunch of news sources that post there, but I think I’m going to keep trying to wean myself off it (as mentioned in my last post).

I’m starting to think I should work on my short attention span problem, so maybe I should get off social media entirely. I almost read this article at The Guardian today, but it was too long. I saved it to Instapaper. I need to read more of the stuff in my Instapaper account and spend less time on social media, I guess. I have a bunch of long New Yorker articles saved to Instapaper, and I never get around to reading them. I started reading this 1955 article about the dead sea scrolls recently. I have no clue when or why I saved that, but it’s a good article.

I also wound up reading this 1951 NY Times article today, because I was trying to figure out what the phrase “the smile of the absent cat” meant. (See also this related article.) I feel like I should have something pithy to say about the contrast between  Einstein arguing with Viscount Samuel about theoretical physics is the 1950’s and Elon Musk arguing with… everybody about… nonsense today. But I don’t really. All I can do is roll my eyes and sigh.