Installing Velo Orange Fenders on Surly Midnight Special

I installed these fenders less than 48-hours before departing for an extended bike camping trip along the Erie Canal in upstate NY. The forecast called for rain and boy am I glad I got these installed. Did a great job keeping the rain and mud from spraying all over me, my bike and my gear. I probably over-torqued a few of these bolts out of fear of stuff falling apart mid-ride but everything stayed assembled, nothing came loose and I love these fenders on this bike. [Note, if you want to see my 30-day review of the Midnight Special, head over to my family/special needs travel site, AllTogetherOutThere.]

There were a few things not covered in the instruction manual from Velo Orange that I’ve noted below

fender install
Finished Product

Go to the hardware store and buy the bolt/nut/washer combo that you’ll need to go through the hole on your front fork as if you were mounting brakes on the center of the fork. You will not be able to install fenders without this bolt and it is not included with the fenders:

fender install
I happened to have the correct length bolt and a suitable lock nut in my box of miscellany.

Continue reading “Installing Velo Orange Fenders on Surly Midnight Special”

Replace Multiple Occurrences of a string or char in SQL Server

It is unbelievable to me that Microsoft SQL Server does not support regular expressions. In the absences of regex, replacing multiple occurrences of the same string/char becomes super tedious. You can nest multiple Replace() statements which gets ugly and impossible to read and you have to know exactly how many multiple occurrences there are. But for a current project I have to replace all line breaks in a column.
Here’s how I did it:

WHILE EXISTS(SELECT * FROM #yourtable WHERE (Comments like '%'+char(10)+'%')) --note I knew that char(10) and char(13) always occurred next to each other and in an effort to speed up this loop got rid of the char(13) filter
BEGIN

  UPDATE #yourtable
  SET Comments=REPLACE(Comments,char(10),' ')
  WHERE (Comments like '%'+char(10)+' %')
 
   UPDATE #yourtable
  SET Comments=REPLACE(Comments,char(13),' ')
  WHERE (Comments like '%'+char(13)+' %')
 
    -- again you can probably do this in one statment but I was hoping to speed it up by simplifying the where statements. 
 
END

There are no doubt a dozen ways to optimize this but it seems to have worked and didn’t take forever. Good luck out there, folks, working with a “modern” RDMS that doesn’t support regex.

Bullshit.

Wealthy white boys from North America are more likely to be full of shit than other kids:

Having derived and established the comparability of our bullshit scale via measurement invariance procedures, we go on to find that young men are more likely to bullshit than young women, and that bullshitting is somewhat more prevalent amongst those from more advantaged socioeconomic backgrounds. Compared to other countries, young people in North America are found to be bigger bullshitters than young people in England, Australia and New Zealand, while those in Ireland and Scotland are the least likely to exaggerate their mathematical knowledge and abilities. Strong evidence also emerges that bullshitters also display overconfidence in their academic prowess and problem-solving skills, while also reporting higher levels of perseverance when faced with challenges and providing more socially desirable responses than more truthful groups.

Here’s the study: Bullshitters. Who Are They and What Do We Know about Their Lives?

Freedom vs Function

Great piece by Brent Simmons (the guy who originally wrote MarsEdit, the app that I’m writing this entry in) about the freedom to make your computer your own and how that freedom is slowing eroding away.

With every tightened screw we have less power than we had. And doing the things — unsanctioned, unplanned-for, often unwieldy and even unwise — that computers are so wonderful for becomes ever-harder.

G4

Just this week I built up an old Mac G4 with OS 9.2 on it with my son and recalled how much I loved Mac OS 9 and the flexibility to make it look and do all sorts of crazy stuff (Drag Thing!) That’s not so much the case with OS X and Marzipan threatens to make OS X even less flexible under the hood. The only real freedom and flexibility the end user has (besides changing the wallpaper, etc.) is at the command line. If that ever goes away then Linux starts to look very attractive from a desktop perspective.

Day One Morning Health Shortcut

Some folks over on the Day One Community FB group were interested in this shortcut I wrote. It computes your 7-day average for active energy and steps, asks you a few questions and creates a Day One journal entry. You will need to modify this shortcut. It’s a little tricky as it pulls health kit data which is really fiddly. You can drop me a note if you get in too deep but I can’t promise I’ll be able to make it work for you. Download the shortcut here.

I find the seven-day average data more interesting and useful. It was this podcast with Jim Collins that got me thinking about using multi-day averages to track certain metrics (e.g. as long as I’m average about 40 minutes per-day singing and playing guitar, I’m making progress, if my seven day average slips below that I am just treading water). Collins uses a 3month, 6month and 365-day average as opposed to 7, but the gist is the same. Very interesting approach to self-quantification. Go to the podcast and fast-forward to the 45-minute mark, great information.

Ed Boyden on Minding your Brain

I listened to this absolutely fascinating podcast yesterday. Tyler Cowen is a great interviewer and he and Boyden cover such a huge range of neuroscience topics: from mental illness to optogenetics to ketamine to meditation to blowing up bits of your brain using a material like the use in diapers so that the bits are large enough to study under a microscope. Really, really great discussion. Definitely worth your time, give it a listen.

BOYDEN:I think one of the things we have to figure out is how can you detect consciousness, and how can you create consciousness? Alan Turing proposed the Turing test, where you would converse with something and you could try to decide whether it was conscious. But with Siri and Alexa and all this stuff in homes and on phones nowadays, I think everybody would agree that’s probably not enough. You need to know something about the internal state as well, but we don’t have a firm grasp on that yet.

I also loved this exchange:

COWEN: Is there a puppet master in the theater, or is it a kind of nominalist reality, where all there are are the different desires? And maybe the film involves a kind of illusion that someone’s in control, but that’s just another actor in the play?

BOYDEN: Here’s another way of looking at it, which is there’s so many things that we’re consciously aware of, but the vast majority of the things that the brain is doing, we’re probably unconsciously aware of.

For example, here we are in my office, and there’s all sorts of stuff around. Your brain has been processing a lot of it. If I point at that blue highlighter over there, you probably saw it earlier but were not paying conscious attention to it. But now that I point at it, you are consciously aware of it.

I actually think that something that we have to understand is, how are all these unconscious processes — this roiling sea of stuff that we have no access to — how are those processes contributing to the emergence of consciousness?

That’s one reason why I’m very excited to study the process of consciousness, if you will. What are the processes in the brain that lead to it that happen beforehand and that might help us understand, in a causal way, what gives rise to consciousness? But again, this is just an idea right now.

Spotify or Apple Music?

I’ve been using Spotify since July, 2011 (when it first became available in the US). It is my go-to streaming service. We’ve had the family plan for years. I use it to work on collaborative playlists with the other musicians with whom I play. I use it when I am learning new songs–being able to hear multiple versions/other artist’s versions of a song is super helpful.

But primarily I use Spotify to discover new music. Spotify’s discovery features are without equal. I’ve become aware of and a fan of more new musicians on Spotify than all the radio or record stores in the world could have ever turned me on to.

From Spotify’s weekly Discover playlist which has an uncanny knack for presenting me with artists I’ve never heard of (though occasionally, too, it is way off base) to its “related” functions that allow you to do really deep dives into obscure genres, Spotify does an amazing job at preventing stagnation in your listening habits.

There are also a bunch of external tools the the Spotify API makes available for discover: Discover Quickly, Smarter Playlists and Organize your Music are all good tools for finding new music.

What this means is that I’m regularly listening to artists who I would have never listened to otherwise. The problem is that Spotify (and, frankly all of the other streaming services) pay these artists squat. That streaming royalties are too low is a given.

But now that Apple seems willing to pay artists more than Spotify, the question is whether or not an unfairly low royalty payment is better than no royalty payment at all? Meaning, if I didn’t discover the artist on Spotify I would never have listened to them at all. I mean, 1% of $1.00 is better than 0% of $10, right?

At issue is the Copyright Royalty Board’s 2018 decision to raise the rate paid to songwriters by 44% over the next five years. Spotify, along with three other streaming services — Amazon, Google and SiriusXM/Pandora — is appealing that decision to the board, a move that has no direct precedent. The four companies have been shellacked with criticism by artists for their action…

Apple, which would also benefit if the rate increase is nullified, is not part of the appeal…

As a sign of how badly the PR war is going, many songwriters are canceling Spotify subscriptions and doing so publicly on social media, where they make sure to note their subscription fees will now be going to Apple Music.

From: Apple Is the Real Winner in Spotify’s Battle Against Songwriters’ Rate Hike

I understand why musicians would want to publicly cancel their Spotify accounts. They are trapped working in an industry that is and always has been horrifically unfair to musicians.

But that said, I’ve been dreading the day that Apple takes off its gloves and reaches into its bottomless pockets in its war with Spotify. I love a lot of Apple’s stuff but, man, Apple Music absolutely sucks. Its interface is shit. Its discovery features are abysmal. I want Spotify to stay around, viable and –importantly–to keep finding new music for me to listen to.

As a musician I’m torn here: go with the company that helps listeners find new music but doesn’t pay those musicians well or go with Apple who pays more but in the end probably pays a smaller universe of musicians because they push the same limited pool of performers to everyone.

For now, I’m sticking with Spotify but will keep exporting my playlists to Apple Music for when Apple drives them out of business.

Turn Amazon Order History into a Markdown Table for Day One

The other day I posted about using Keyboard Maestro to automate the process of getting my monthly Amazon Order history into a Day One Journal entry. That was the first step of the automation of this task.

This has been a bit more challenging to automate than I was first thinking. I’m working towards this 3 step process:

  • Step 1: open up Day One and in Safari open up the URL for Amazon Order History report screen. [Done]
  • Step 2: automatically download this month’s Amazon Order History report [Need to figure this out]
  • Step 3: create a journal entry from a downloaded Amazon Order History .csv file [Now Done]

I am still messing around with Keyboard Maestro for step 2 but was able to hack together a pretty handy Automator workflow for step 3. It’s a python + BASH script that

  • takes a .csv file, strips out the unnecessary columns,
  • totals up the amount spent for the month
  • create a Markdown table of the important columns from the .csv
  • creates a Day One Journal entry and tags it “Money”

Continue reading “Turn Amazon Order History into a Markdown Table for Day One”

Getting Amazon Purchase History into Day One

Keyboard Maestro

Inspired by listening to @ttscoff, @macsparky and @rosemaryorchard on yesterday’s Automators podcast, I made some slow progress but progress nonetheless! Trying to automate as much as possible my monthly entry in Day One of all of my purchases from that month from Amazon. Currently I’ve just got a repeating todo in Things that reminds me to launch this nifty Keyboard Maestro shortcut.

Still requires that I download the .csv file, gussy it up in Numbers and paste it into Day One. Those steps are still a big reach for my automation skills but gives me something to work on.

Streaming Revenue (or, beware Charts w/o Context)

On the heels of some recent coverage about how Streaming Revenue is up I thought it might be useful to put some context around the hockey stick charts that some of these news outlets insist on displaying.

For sure, the music industry sure looks to be on the up and up!

*Overall Revenue Chart from 2016-18*

And streaming is really contributing a lot to the $9.8bil!

*Streaming Revenue Chart*

But in context of an industry that was bringing in $15bil 20 years ago this graph provides some good context:

*Historic Revenue Chart*