Oops! Something went sideways.

Looks like the styling got goofed up. Sorry about that, unless it's what you wanted. If this isn't what you were looking for, try force refreshing your page. You can do that by pressing Shift + F5, or holding Shift and clicking on the "reload" icon. (It's the weird circle arrow thing "⟳" just above this page, usually next to where it says https://blog.unitedheroes.net...)

isn't quite ashamed enough to present

jr conlin's ink stained banana

:: Waiting For Mr. Good Avenger

There’s a really popular movie opening this weekend. You’ve heard of it. It’s earned (no kidding) $1.2 Billion dollars in the opening weekend and everyone says it awesome.

Mind you, being a card carrying nerd, i should probably either have seen it, have tickets to see it, or be in some theater right now watching it. i’m not.

Truth is, i’m not really sure i enjoy going to movie theaters anymore. i mean, they’re comfy, and the screen is huge and all, but they don’t really hold the same appeal to me anymore.

There are probably a lot of reasons for this. If i go to a given movie, i usually do it alone because most of the folks i’d want to go see a nerdy superhero beat-em-up live hours if not hundreds of miles from me (Thanks Internets!), so i’d be the sad, old dude in the back of a theater. Plus, for a communal activity, you’re supposed to be quiet. i mean, i get that nobody wants to hear about your rectal exam while Thor and the Hulk share a tender bonding moment bashing in alien skulls, but anything other than applause at predesignated points is roundly frowned upon. Then, you pay to watch the movie, and get 45 minutes of the same commercials you see on TV, previews for other movies you probably already saw on YouTube, and told to shut up repeatedly. (It’s not like audience participation ever really worked for a movie, after all.)

i dunno, but it just isn’t fun anymore.

So this means that watching something “spoiler free” just doesn’t happen.

i’m pretty sure that within hours i’ll find out about Iron Man’s defeat at the hooves of Hellcow, the surprise Jubilee/Dazzler dance number, or Thanos being defeated by the rise of Dr Bong. It’s ok. i honestly don’t care about spoilers because knowing that the whale won doesn’t make Moby Dick any less of a work of literature, and i’m pretty sure everyone who binge watches movies on Christmas has at least a clue about Clarence’s wings. If your movie runs for 3 hours and can’t survive someone knowing that Thanos has a severe reaction to Rice Krispie treats, well, it’s probably a 3 hour movie folks can skip.

So, i’ll probably just have to contend myself for waiting the 4 months to a year until the studios decide to let some streaming service run it. Heck, maybe i’ll even pony up $20 to watch a couple of Marvel flicks off of Disney+, and then cancel when i’m done.

At least i can hit the pause button to refresh the popcorn bowl.

:: Fun With Miles per kWh

Ok, so yeah, a bit of a follow-up on the electric vehicle front

In short, i got one. Well, sort of.

What i got was a Plug-in Electric Vehicle, which gets about 48* mpg city and a pure electric range of about 26** miles. Since that’s twice what the last car got, and my work (which is 10 miles away) very kindly provides free charging, i expect my fuel bill to drop a fair bit. The car is also pretty fun to drive and ticks pretty much all my required checkboxes (aside from a trailer hitch for a bike rack, but that’s something i can solve pretty easily).

What’s really interesting is doing the math on the charging bit, and why i’m now super happy with a PHEV rather than a full on electric. Particularly since i’m a right cheap bastard at times.

Consider, as stated, my car now gets about 26 miles on 8.6 kWh, or about 3.02 miles per kWh. That’s the max range on the full battery in pure electric mode, probably with a strong wind at your back and ample down hills, but good enough for now. It takes 2 hours and 42 minutes to charge up from pretty much zero on a Level 2 charger.

The hybrid engine gets me around 48 mpg in the city, which is what i generally drive. Again, presume strong winds, ample down hills, and whatever other bits gets you to that high of a number.

Currently, gas goes for around $3.30 per gallon. 26 is about 54% of 48, so it’s safe to assume that running pure electric is equivalent to running about half a gallon of fuel. That means it costs me $1.15 to drive the equivalent distance if my battery is flat and i use the gas engine.

So, when i charge, i want to look for any charging station that costs less than $1.81 total to use. That means anything that’s $.01 a minute (well, $.68 per hour because rounding) or less, or charges less than $0.21 a kWh. According to PG&E, my power company, i pay $0.28 per kWh peak (between 1:00 PM and 7:00 PM) and $0.27 off-peak, so it doesn’t really make sense to charge at home. i’d be paying an equivalent $4.64 for a gallon of gas.

What floors me is that looking at various commercial charging sites charge even more. EVgo, charges $1.50 an hour, which is like spending $6.70 a gallon on gas. i mean, i totally understand companies needing to make a profit and all, but Holy Ampère that’s a lot. Granted, it gets worse. There’s at least one “public” charge station nearby that charges $4 an hour. That’s about $11 a gallon.

i’m going to guess that my car is probably less efficient a pure EV than, well, a pure EV, but even so, if you’ve got an 80kWh battery and your range is 300 miles, that gets you about 3.75 miles per kWh. Still, a full “tank” of electricity still costs far less than it used to in my last car, so not really complaining. i’m also willing to bet that prices per kWh are probably less outside of the Bay Area, but yeah, i’m fine plugging into the free stations when i can and may just skip the pay ones.

* for the pedantic, after about a week, i’m seeing around 42mpg and the full battery charge gets me around **24 miles, but it’s also winter, which sets my target price per kWh to $.24 or $.77 an hour.

:: ev-iDunno….

tl;dr: Electric cars are nice toys that are not quite practical enough for me.

i drive a 12 year old Outback that has about 96,000 miles on it. This makes it “low mileage” and i like to think i keep it in pretty good shape. Even though it’s a Subaru and the life span on those things is amazing, it’s still a pretty good idea to look around at car options every decade or so.

While considering a more modern vehicle, there are three key items i consider kinda required at this point:

  1. Back up camera. It’s kind of a stupid thing, and i know how to set my mirrors and all, but i’ve driven cars with the camera and damn if it’s not useful.
  2. Crash avoidance. This can either be lane assist or city crash avoidance, but in any case, i’d like the car to be able to spot things i don’t. i’ve not had that as a problem, yet, but if there are going to be cameras on the car already, seems like a good follow up.
  3. Integrated Smart Phone environment Car UIs suck, the built in navigation systems are terrible, and they’ll never update as often as the pocket computer i haul around everywhere. It’s just bad design for auto makers not to include Android Auto or whatever iPhones do.

Recently, i got a hair about getting an electric. While i’m ok with reducing my carbon footprint, it also seems like a reasonable thing to do since there’s less parts to go horribly wrong. Since i don’t make enough to impulse buy a car, i wanted to do a fair bit of research on whatever the hell i’m dropping potentially half a years salary on. (i know, silly me. Not really into the California Mansion1 idea.) Still, doing the research kinda shows that things are not quite ready.

The first thing that kinda surprised me was the power problem. i’m not talking about range, since cars like Tesla and Chevy make cars that can do 200+ miles on a full battery, i’m talking more about what to do after you’ve driven 200+ miles. Turns out, that can be a tricky question.

Let’s say that you decide to drive your brand new electric from San Jose to Pismo Beach. It’s a trip of about 200 miles down 101, so you’re probably going to need to power up. Ok, so where do you do that?

There’s no real standardization for the sort of power socket a car maker picks, so there’s about five different types. From what i’ve read, there’s the Tesla plug, “J Plug” J1772 and the J1772-Combo (for fast chargers) and the CHAdeMO. Tesla plugs pretty much are only for Teslas, CHAdeMO plugs are pretty much only for Nissan Leafs, and the J1772 type plugs are for most of the rest. i’m also going to bet that the charging protocols are wildly different between each of those. You can buy an adapters for most of these plugs, apparently.

Those paying attention may note that i said five plugs. The fifth type of plug is the only plug that’s US standard for all vehicles. It’s a 220v 20Amp Nema 5-20, like what you’d plug an electric dryer into.

i’ve been told that some charging station outlets also sport a Nema 6-50, which is a 240Volt/50Amp instead of a 120V/20A circuit. That would speed things along a good deal.

It’s also the slowest option and requires you to haul around whatever charging dongle you got with your car. If you left your power dongle at home, you can get another one send to you for around $350.

You can also get conversion dongles for most of these outlets, so in theory you’d have something for any situation. Not super ideal, but workable at least.

Of course, each of those plugs carries different charging times. If you have all day (literally, and then add a few hours) you can fully recharge using a Nema 5-20 in something like 30+ hours. A Nema 6-50 in about 10 hours. Whatever Level2 option you’re using will recharge you in about 8 hours, and the “fast charge” will get you back on the road in 4. That is, provided someone else isn’t already plugged into the one fast charger already. i’ll note that it’s $.10 a minute, so figure spending $18 for a full charge. Not terrible. It cost about that much to fill up my Mom’s Prius after driving it from Leesburg, Va to Fenwick Island, DE and back.

So, probably not a good Road Trip car. Granted, driving from San Jose to see my brother is about 120 miles, so charging would still be A Good Idea, and i can hope a pleasant 2 mile walk from the charging depot to where he lives.

That’s fine, it’s more for driving short trips in city traffic.

For that, i’ll admit that things would be a bit better. It’d be my commuter in the winter when i can’t really ride my bike to work or once every other week or so to charge it up at work. My company pays for the power for that (they’ve very nice) but it does also raise an interesting question. San Jose has a lot of charging stations. Not all work, or are available all the time, and as i noted, they’re best if you’re somewhere you don’t mind being for an hour or so. i can charge at home, if i’m willing to either install a charging station for $1000 (provided it has the right plug). Of course, i normally park my car out in my driveway. My garage is also my laundry room so the other car sits on the opposite side of the garage.

Still, not terrible, but what iced things was actually driving one. i test drove a Chevy Bolt for a few reasons. i’ve no real interest in trying a Tesla. i expect there to be some differences, but from what i experienced, i don’t think they really matter.

Pros:

  • One pedal driving was kind of nice and surprisingly intuitive. Mind you, i tend to drive like that already. i’m reasonably good at putting space between myself and the car ahead of me so i don’t really use my brake all that often. This just kinda felt like the next step.
  • The car was nice and zippy. i’d have no problem merging into traffic on busier streets, even if my battery life would have other opinions about that.
  • It had all three of the things i was looking for.

Cons:

  • Not really super comfy. This was a weird one. i get that the seats aren’t automatic for weight reasons, but they also didn’t really seem particularly well padded. They kinda felt like office chairs. This was particularly notable in the back seat. i will say that there was plenty of headroom and the interior felt “spacious” enough, but i’d expect that with a vehicle that’s front wheel drive.
  • The “hand brake” gimmick is as counter intuitive as the one pedal is intuitive. The pedal feels like it has higher braking “resolution” than the paddle button. When i tried pressing the button it felt like it would start slowing, then aggressively brake the longer i held it, regardless of what pressure i used. i’d feel sorry for any passengers that either were, or were about to be carsick.
  • Slow final braking. This was also odd to me. i get regen braking, but the final bit of brake felt like i really had to press down to get it to engage. Considering how much the vehicle wanted to capture momentum, that last bit struck me as odd. Using one pedal, i didn’t have that problem, but i could also see where i really don’t want to get used to the way that car handles. i’d pretty much ruin the other car.
  • The power reasons above.

So, where does that leave me?

Electric cars are nice, but i can’t shake the feeling that they’re still very much toys. Damn pricey toys, but toys. i kid around that i’ve already got an electric vehicle, and that’s proving to be more true than i’d prefer. If i had to get a vehicle right now and was only going to be using it around town, i’d consider an electric. For a while at least. It’ll be interesting to me to see how poorly this post ages.

i still really wish that Subaru made a hybrid, but that’s probably not going to happen for a while. Looks like they feature the auto engine start/stop at least.

1 A California Mansion is a really expensive car you drive around because there’s no hope at all at affording even a burned down house.

:: Con-frigguration

If it’s a static value, it probably belongs in a configuration file.

That’s one of my golden rules of programming, and it’s generally saved my ass. Mostly because someone else sometime else decides that something isn’t quite as permanent as they said it was and it changes. (That was for the benefit of the two or three folk out there that don’t use config files.) Still, after nearly half a century of coding, we still have terrible ideas about configuration files.

The worst offender, by far, is the horrible programming language masquerading as a config file. These seem to be en vogue again. Such as “yaml” format:

  - alias: "Morning kitchen on"
    trigger:
        platform: time
        at: "06:45:00"
    condition:
        condition: and
        conditions:
          - condition: time
            weekday:
               - mon
               - tue
               - wed
               - thu
               - fri
          - condition: sun
            before: sunrise
    action:
        service: homeassistant.turn_on
        entity_id:
            - group.lights

That’s from my Home Assistant configuration file to turn the lights on in the morning if they need to. Home Assistant is written in Python, and i don’t really want to pick on it because it’s really good. If anything, the config system being bad just stands out that much more. i can’t tell you how much easier it would have been to just code up the python function.

import time
def MorningLight():
    now = time.localtime()
    if (now.tm_wday in range(1,6) and 
            (now.tm_hour == 6 and now.tm_min in range(45, 59)) and
            time.time() < homeassistant.sensor_state("sun.sunrise")):
        homeassistant.turn_on("group.lights")

Hell, make some convenience functions and it's shorter.

def MorningLight():
     homeassistant.set_state(
         "switch.OfficeLight",
         (homeassistant.time_between( 
             "06:45 AM",
             homeassistant.sensor_value("sun.sunrise")) and
          homeassistant.is_weekday()))

Yes, this proposes that the individual know python. They’re programming. It’s ok to use the same language you’re using. Forcing the user to learn some convoluted semi-language syntax that is even more alien, doesn’t have countless free tutorials and books, and a vibrant support system, isn’t helpful.

There is literally zero difference between the above yaml version and this:

♥️alias🍳"Morning kitchen on"
🐸trigger🍳
🐸🐸platform🍳time
🐸🐸🐸at🍳"06:45:00"
🐸condition🍳
🐸🐸condition🍳and
🐸🐸conditions🍳
🐸🐸🐸♥️condition🍳time
🐸🐸weekday🍳
🐸🐸🐸♥️mon
🐸🐸🐸♥️tue
🐸🐸🐸♥️wed
🐸🐸🐸♥️thu
🐸🐸🐸♥️fri
🐸🐸🐸♥️condition🍳sun
🐸🐸before🍳sunrise
🐸action🍳
🐸🐸service🍳homeassistant.turn_on
🐸🐸entity_id🍳
🐸🐸🐸♥️group.lights

Actually, i’d argue that it’s clearer because the “🐸” are visibly defined rather than just whitespace (tabs? spaces? tabs+spaces? 🤷‍♀)

We keep insisting on doing this. Sure, that wheel is pretty and all, but what we really need is to make something that rolls on the ground around an axis.

What’s frankly hilarious to me is that programmers have even beaten multiple paths to the “give the customer a simple programming language” route (Lua, Javascript, Visual Basic, etc.) and STILL we come up with crappier solutions. Hell, at one point i was writing a shopping site in a custom XML based language. Someone, quite possibly multiple people, not only thought that was a good idea, but took a significant amount of time to prototype, develop, implement, test, and document that.

Stop it. Just, stop it.

Stop trying to shoe horn a horrible solution to an obvious problem.

If you’ve got static values you need to set, use a simple key-value config system. Maybe allow for sections if it’s super complicated, but also consider that perhaps divvying things up might also be a viable solution. Windows, Unix, and yeah, even Macs all do this, and they work pretty well for exceptionally complex systems. (i’ve got my complaints about Windows Registry tables cross references, but at least i’m not writing XML if statements.)

If you need templates, use an established template system. HTML is no party, but it works, and there’s library support for it. If you want to grant programmatic access to users, give them a damn programming language. And not one that you created in your Junior systems class and got a “C-“.

Granted, if you’re building a complex virtual machine like a web browser, then rules are quite different. Chances are exceptionally good, though, you’re not.

Yes, this means trusting your users. Yes, this also may mean giving up the dream of providing a configuration system safe for 6 year olds. Granted, you could also give them Scratch, so there’s that.

(Dammit, now this means i need to submit a patch to HomeAssistant that actually replaces the crappy config system with an actual programming system, doesn’t it?)

:: The Internet of Less Than Shit

i’ve been making my home a bit smarter.

Mind you, this is not what you’d expect me to say. i’m paranoid. The idea of opening up my house to a remote exploit because some company forgot to use encryption is very much unlike me. Hell, i put my cable box and guest devices on their own, isolated subnet. What the hell am i thinking?

i’m thinking that i don’t need to go out to the internet.

The guiding principle i have is to not require external connectivity where and when possible. While things can talk to the outside world, i discourage it. Enter Z-Wave.

Z-Wave is an interesting semi-proprietary protocol that allows devices to talk to each other. What makes it useful to me is that those devices can talk to a managing hub. What makes it REALLY interesting to me is that i can run an open source package on a Raspberry Pi that lets me control the devices. Data never leaves my local net.

What makes it super-duper interesting is that many of these devices are advertised as “works with Amazon Alexa”. i don’t have an Alexa in my house, but it’s becoming the clear winner in the “voice controller” market. This means that there will be a lot of controllers out there that will be talking Z-Wave, including light switches, outlets, thermostats, door sensors, and more that can integrate into my device network.

Again, and delightfully, none of that info needs to leave my LAN.

The very nice thing is that there are a few different open hubs i can use. Currently, i’m using Home Assistant. It’s nice, but absolutely not end user friendly. It’s a typical dev app and requires lots of weirdly formatted files, obscure naming conventions, reboots, and other fiddly bits. Mozilla is also working on a less fiddly version called IoT, which promises to be more noob friendly, but it’s still very much in pre-beta.

Still, i’ll admit that having control of my house (and remote control thanks to the glory of SSH tunnelling) is rather nice.

Now, if i can only figure out how to read directly from my solar panel controller and the SleepNumber bed, i’ll be all set.

Blogs of note
personal Christopher Conlin USMC memoirs of hydrogen guy rhapsodic.org Henriette's Herbal Blog
geek ultramookie

Powered by WordPress
Hosted on Dreamhost.