Credit Card Confusion

First off, here’s this from an interesting read over at The Week:

In brief, payment card companies are piggybacking on public systems and guarantees to gouge the American public, especially with credit cards. They act as middlemen, skimming fees off transactions and using their size to bully businesses into accepting their terms — who then raise prices on all consumers. The associated profits, both for Visa and company and the issuing banks, are effectively a tax on everything Americans pay for.

Also, two other credit card facts I learned this weekend:

  • KMart doesn’t accept American Express
  • Audible (despite being owned by Amazon), doesn’t accept the Amazon Store Card.

iOS Shortcut to upload photo to WordPress & Instagram

I am trying to reduce the friction of posting photos to my site from my phone. In the process I thought it might be useful to simultaneously upload photos to my Instagram profile at the same time as my site.

Over the past year I’ve cobbled together a bunch of pieces to make this process work and it’s never been super-reliable in part because sometimes shortcuts likes to upload a .heic file instead of a jpeg.

##Heic file error

By default, the iPhone stores images in the .heic format. It seems that once you edit a photo on the iPhone it is then saved back to the library as a .jpeg. But I don’t want to have to edit a photo just to ensure that it will upload through the shortcut correctly.

What I’ve realized is that when you do anything with a photo using the share icon, iOS also converts the photo to a .jpeg.

As such, calling the shortcut through the share icon from the Photos library instead of calling the shortcut and then selecting the photo seems to get this whole thing working pretty consistently.

I can’t take credit for this shortcut working as good as it does. I pulled most of it from a website that, sadly, google can no longer find. I have no idea why. In any case, if you’d like to try it out, here is a link to my version shortcut.

You will need the WordPress iOS app installed on your phone for the shortcut to work.

Fuji X70. Not a portable X series.

Fuji X70

I have been loving my Fuji XE2s since I bought it off of Amazon a couple of years ago. It takes some of the best photos of any camera I’ve ever owned and is a joy to use in every way (manual dials for ISO, Shutter Speed, aperture. So nice!).

Except it doesn’t fit in my pocket. Which means I hardly ever take it with me.

But when I scroll through iPhone I can always tell the FujiFilm pics from the iPhone photos. It’s night and day.

No matter how good the iPhone camera software and lenses get, the iPhone will never consistently match what comes out of the Fuji series cameras. Sure, in certain situations the iPhone takes great photos but sometimes it’s just meh. The fuji cameras just give me more consistently better shots.

So last year I picked up a FujiFilm X70, hoping it would give me the best of both worlds: the great look of the out-of-camera jpegs from the FujiFilm XE2s with those awesome film simulations and also fit in my pocket.

Well, the X70 fits in my pocket and it sort of gives the film simulations but there’s just something about the lack of the view finder that makes using the X70 lose some of that fuji magic that you get from their other X series cameras. I brought it around with me but never enjoyed holding it and using it the way I do my XE2s.

So I sold it on ebay a couple of weeks ago and am now going to try to bring my XE2s with me more regularly. I took off the super 35mm 1.4 lens that I usually use and put on the pancake 27 2.8 to bring the form factor down a bit. I love that 35mm lens but it makes the camera even bulkier. The 27 makes it about the same exaxt form factor as the X100. If I can demonstrate to myself that I can reliably bring the XE2s around with this lens then maybe for Christmas I’ll see if Santa can bring me the X100. Stay tuned!

Bad news from Apple

What’s up Apple? Is writing code not as creative an endeavor as music or design?

I was a PC/Linux user for ages before I purchased my first Mac (the G4 quicksilver tower, I think was my first one). And the only reason I bought that Mac was because of OS X was really just a great UI over BSD. Were it not for the ability to fire up a command prompt and have BASH at my fingertips running along side the native Mac apps, I would probably still be running Linux.

Moreover, having a shell and scripting languages like Python installed on Mac OS by default means that when my kid wanted to learn some Python beyond what he was learning through school, it was easy to show him how to run Python scripts on his MacBook. The ease of firing off scripts felt like Apple, who likes to encourage the “making” side of technology, considered “making” scripts on par with “making” movies or graphics or any of the other creative outputs that a Mac could be used for.

Now Apple has announced (in what seems like a really bad move) they are dropping the scripting runtimes from Mac OS. Meaning, by default there won’t be any Python or Perl or Ruby. I have so many little scripts in my ~/bin directory that rely on these languages (mostly Python).

Yanking these runtimes out of Catalina gives the impression that Apple doesn’t consider making scripts on par with making drum loops in Garage Band. I’d argue they’re both pretty damn creative outputs and Apple is denying its users the creative tools they’ve come to rely on.

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.