Categories
Random

So I bought a PHEV…

Two weeks ago I picked up a 2022 Hyundai Santa Fe PHEV.

I am no Doug Demuro and this is not meant to be a review of the car in general (it’s great!). Rather, I want to talk about the quirks and features of PHEV driving specifically.

The PHEV Experience

The very first thing I noticed test driving this car is just how smooth the electric drive is. The lack of gears combined with the instant power immediately reminded me gliding out of a station on a train. It’s just so pleasant!

My thoughts below are based on the 500km highway and 500km city – in temperatures between -10 to +15 – that I’ve driven so far.

Why not an EV?

In short, “we’re not quite there yet.” The charging network in and around Winnipeg and battery tech is such that most of our favourite camping spots are out of range; and longer road trips (especially west on the Trans Canada Highway) would be anxiety inducing.

Sure these trips are rare and I considered the possibility of renting a car as needed. But given that there’s a significant premium for EVs, buying a $40,000 – $60,000 car only to have it sit in the garage when you really need it most… at the end of the day that just seemed silly.

Fuel Economics

The PHEV Hyundai Santa Fe has a 13.8kWh battery which has an advertised range of 45km in full EV mode. I’ve found this range to be fairly accurate within a few kilometres. Granted, my driving style is generally pretty modest and I’ve been intentionally making an effort to keep the power level low.

At present electric rates, fully charging this battery costs $1.24.

However, the system actually reserves ~25% of the battery for hybrid-mode. I believe this is because the 1.6L engine is not powerful enough to motivate the 1900kg vehicle on its own.

So this means that the vehicle only uses around 10.35kWh to travel 45km on batteries. That’s about $0.93 electricity in Manitoba. For comparison, a standard ICE Santa Fe would burn 4.77L (or $6.82 at today’s gas price) for 45km of city driving; and 3.15L (or $4.50) with the hybrid version.

From a fuel cost perspective, switching to electricity is a nobrainer. Especially with the relative stability of electrical rates compared to the constant fluctuation of oil prices.

Cold Weather

We’ve been having a strange November, with temperatures ranging from -10C to +16C. So I’ve had the opportunity to drive the car in a range of cooler temperatures.

The salesman mentioned that the systems will “prime” the batteries in cold weather but he didn’t go into detail and TBH I was to excited to drive away to ask him for more information.

As it turns out, when the battery is cold the ICE runs for quite a long time (4 – 9 minutes) after initially “starting” the car and even well into the drive. It will also engage at seemingly randomly times throughout the drive.

Li-ion batteries have an optimal operating temperature range of 15 to 20C, so I assume the system is diverting engine heat to batteries directly (via that heat pump system) and/or imparting heat by acting as a generator, recharging the batteries.

When the ICE is in this operating mode it is not being used to drive the vehicle, so you are still benefiting form the efficiency gains of an electric motor.

Unfortunately, this behaviour makes it impossible make a full trip without burning at least some gasoline (albeit maybe only a few teaspoons) in temperatures colder than +15. Very short trips end up using relatively huge amounts of fuel. A 7 minute drive might run the ICE the entire time even though the car has enough battery to make it the full distance.

Luckily, with an unseasonably warm +16 yesterday I was able to test the battery’s behaviour in a warm state. I took the opportunity to make 45km round trip and I was relieved to make the entire drive without burning a drop of gas! The systems did not heat the battery at all.

However, I a very took a similar drive today and once again the engine engaged for a short time to warm the battery, even though it is only a few degress colder today.

I am fairly disappointed with this behaviour. I would much prefer a driving mode that exclusively used the batteries even if I meant a decreased range in cold weather. Even if it meant charging more often the economics would still make sense.

Additionally, I had factored the fuel savings from driving pure EV most of the time into the budget when upgrading to this more expensive car and now feel like I am coming in on the losing end of that calculation.

Charging

Hyundai provides a Level 1 charger which manual refers to it as a very appropriately named “trickle charger.”

A full recharge takes approximately 11hrs. On the one hand, that’s a very long time for 45km of juice. On the other hand, my car sits around for at least 8 – 10hrs every night, so it’s not really an issue. I think it would be fine even if I had a regular commute.

Level 2 charging is much faster at 3h30m. According to a recent Reddit thread, having a level 2 charger installed at home costs in the neighbourhood of $1000 – $1500; and this just does not seem worth it at the moment.

I haven’t had the opportunity to use one yet but the going rate for Level 2 charging stations seems to be $1.50/hr. At that rate the economics don’t really make sense vs the cost of gas. If you think of it as paying a small amount to keep some carbon out of the atmosphere though I guess that’s OK. There are also a few (literally 3) free chargers around town and I’m looking forward to having an excuse to use one of those in the next couple of months.

Long Term Reliability

When I mentioned PHEVs on Twitter a while back a couple people raised concerns about readability.

They have a point, PHEVs are a Frankenstein’s monster of new tech operating alongside ancient tech. Marrying the two drive and the two breaking systems must be complicated AF. I suspect this is a large part of the reason Hyundai has opted for a fully drive-by-wire vehicle (a topic for another blog post perhaps).

Hyundai has acknowledged this and is demonstrating strong confidence in their engineering by providing an 8yr/160,000km warranty on the H/EV systems. Which is reassuring.

Final Thoughts

The Hyundai Santa Fe as a car is by far my favourite car I have owned to date (largely unrelated to the fact that it’s a PHEV though)!

Sitting in traffic with the little green “EV” light illuminated makes me smile. And doing 110km/h on the highway on batteries feels like the future! (But also the past, I can’t help but wonder where we’d be if the oil and gas industry hadn’t killed battery cars in early 1900s)

Unfortunately, I am not very optimistic about the EV performance once winter sets in and we’re regularly seeing -20 (or colder). I expect average fuel economy to in-line with the standard HEV version of the Santa Fe.

I can’t say I understand Hyundai’s choice to optimize for range over gasoline usage.

That said, at the moment, my average fuel economy is 3.3L/100km, which is quite good and nothing to cry about.

Winnipeg has a lot of days from spring through autumn that fall within the battery’s optimal operating temperature. On balance of a year the average combined fuel economy should hit the advertised 2.1L/100km, with city driving at 1L or lower.

I’ll keep you posted…

Categories
From The Archives Site News

From the archives

When I originally launched this blog back in 2005 I published it using custom blogging software of my own design. I intended this domain to be a little more “professional” or at the very least, less personal than my previous experiments in blogging.

In a time before github (or even git itself for that matter), stackoverflow, composer, etc it was very common for any dev worth their salt to build every component of their website from the ground up as a means to demonstrate their skills.

In July 2007, I decided to relaunch the site on WordPress 2.6. At the time, I considered my previous posts too cringe to archive. After reading through them all, I believe they actually belong here. So I’ve gone through can copy & pasted roughly 30 blog posts from 2005/06. I’ve left them largely unedited, save for some spelling corrections (turns out in-browser spell check has done wonders for my ability to spell correctly).

If you’d like, you can read all the posts in the “from the archives” category. The cool thing about copy&pasting out of archive.org is that all the old links still work.

Here are a few highlights that give a glimpse into the state of the web and geek culture 16 years ago:

  • Internet Security – March 2005
    I talk about two-factor auth (without using the word) as a mythical technology that only the military uses.
  • Episode III: RotS (litterally?) – May 2005
    My Star Wars: Episode III review.
  • phpMyMP3s – May 2005
    phpMyMP3s is one of the coolest things I’ve ever built and I wish the code download still worked. Essentially it was streaming MP3 server written in PHP. I ran this on my home computer in conjunction with dyndns to listen to my home MP3 collection at work.
  • better bandwidth protection: revisited – August 2005
    “Bandwidth theft” is a problem that has largely gone away due to lowering bandwidth costs. But in a time before the likes of imgur random users would link other random users’ content (usually proto-memes) hosted on bandwidth limited servers/services.

    In this post I present a way to essentially timeout links to limit the impact of bandwidth theft.
  • Winnipeg Web Firms – August 2005
    A list of local web shops that existed at the time.
  • Podcasts: what’s on my iPod – October 2005
    The podcasts I was listening to at the time. Some of these even still exist.
  • Parachute Beta is live! – February 2006
    An interesting idea I had for some of an inverse social network for links and only links. TBH I still think this is a decent idea.

    Also, it looks like my original name for this project was “dropbox” – a year before dropbox launched.
  • Summer Styles ’06 – May 2006
    You actually have to look at the archive.org backup of this post to fully appreciate this. If you click the links in the sidebar under “style” (summer ’06, blue, red) you’ll see the the style of the page completely changes, even in the archive itself!
Categories
Site News

ohryan.ca is now surveillance & tracker free

Inspired by Cory Doctorow I’ve decided to make a concerted effort to make this WordPress blog surveillance and tracker free. Internet privacy is something I’ve always cared about, I’m not really sure why it never occurred to me to bring my blog in line.

Here are the steps that I took:

  1. Disabled Cloudflare:
    Cloudflare has a good reputation and I trust that they’re taking the right steps to protect users’ privacy. But after refreshing the backend of the site with the help of SpinupWP I no longer feel like I need Cloudflare’s caching services.
    [my DNS is still hosted with CF, however I am bypassing them for this CNAME]
  2. Disabled Jetpack:
    Jetpack has become a bloated beast of a plugin suite. I noodled around with the settings for about 3 minutes to try to figure out how to disable the tracking – I couldn’t so I just decided to nuke the whole thing.
  3. Disabled Google Fonts
    It almost certainly tracks your IP and possibly other information. So I’ve disabled it. System fonts only.
  4. Installed Embed Privacy Plugin:
    I’ve installed Embed Privacy to block all spotify, youtube, twitter, etc external embeds on page load. Users have to explicitly click the content to see it.
  5. Disabled Comments:
    Not really a privacy reason to disable these per se, I just haven’t really found much comment engagement since approximately as long as Twitter has existed.

The main side effect of these changes seems to be a blazing fast site! Sure I’ll miss out on some stats but I’ve long stopped caring about those.

Categories
Culture Tips & How To's

How To: Work From Home, Be Productive and Stay Sane

I just spent a few minutes looking through my draft posts for inspiration to restart blogging.

I came across the oldest draft in my queue, dated November 11, 2009.

I missed 11/11 1:11 by 6 minutes!

The post read as follows:


I’ve worked from home for 6 of the past 8 years in a variety of workspaces. Initially I worked in my parents basement, I briefly worked in my mother-in-law’s dinning room and for the past 2 years I’ve worked in the common space of a 2 bedroom apartment, with a toddler. Over this period I’ve maintained a 35 – 50 hour work week and managed to stay sane (and reasonably productive). Now that I’ve had my own dedicated works space for a couple of weeks I’ve had some time to reflect on a few of the ways I’ve been able to make it work.

  1. Good Employer
  2. Keep A ToDo List
  3. Don’t Answer The Phone
  4. Set “Business Hours”
  5. Don’t Follow Them
  6. Be Distracted

Reflecting on this now that we’ve all been covidworkingfromhome for the past 18 months (or is it 32?) and have just started a permanent remote positions, I’d say that list of advice still rings true.

1. Good Employer

Simply put: you need an employer who trusts you to work from home. One who understand that things might come up throughout the day and doesn’t have a problem with that.

If you’re having trouble finding an employer like this in 2021, imagine how rare it was 12 years ago.

During COVID, even bad employers didn’t have a choice but to begrudgingly let their employees work from home. Good employers will differentiate themselves from by ones by allowing their employees to continue working from home into 2022 and beyond.

2. Keep a To Do List

What I really meant by this was “be organized and focused.”

I still prefer physical to do lists. I like crossing things off with a pen and crumpling up the list at the end of the day.

Organizational tools and apps have really matured and keeping a physical to do list is not really necessary.

Don’t forget to include personal/home things on your to do list. Writing everything down is a great way to keep yourself from getting distracted.

3. Don’t Answer the Phone

“The phone” is much less of a thing in 2021.

Better advice would be “don’t read text messages, or non-work DMs”.

4. Set “Business Hours”

Over my years working from home this has come to be the main key to success.

Setting business hours adds the structure that I need to stay focused. It also sets expectations with my family. They’ll know not to interrupt or distract me between 8 – 5 unless it’s urgent.

Having an office door that you can closes helps, but it’s really not as crucial in my experience.

5. Don’t Follow Them & 6. Be Distracted

These two rules are really the same thing “allow yourself to be distracted.”

I’ve found that giving myself permission to break the rules has been the key to staying “sane.”

Take a long lunch, grab a coffee, go to the store.

Just don’t stray too far, too often.


In 2021, I would only add two additional pieces of advice to this list.

7. Wear Pants

Get dressed for work.

I’ve found that it really puts me in the mindset to get to work.

This has been a rule I’ve always followed, I don’t know why I didn’t add it to my original list.

8. Have an Amazing Partner (or I guess, live alone?)

I couldn’t have made it this far without an understanding wife.

Categories
Web Development

LIBTYFI – Leave it better than you found it

Some of my fondest memories from childhood are the times my dad let me tag along on his weekly trips across the expanses of Northern Ontario in his 18-wheeler. As you might imagine, a daily ritual on these trips was one of washing up in some dingy restroom1 before eating a greasy breakfast (“two eggs sunnyside up, bacon soft, rye toast please”).

All these years later, the biggest lesson that stuck with me was “leave it better than you found it.” In other words, not only “clean up after yourself,” but also “clean up the mess you found.2” After all, the next guy’s going to appreciate a clean space to start his day.

Old code is like a dirty truck stop restroom.

As part of working on code guidelines for my day job, I read a bunch of the code standards and adjacent posts. None of the documentation, blog posts and idioms (DRY, KISS, etc) really touch on legacy code. I suppose it makes sense since they are generally aspirational documents. At the same time, I think these documents are incomplete without touching on it.

As programming languages and platforms mature and fads of the moment fad away, it’s becoming more and more common for developers to run into old code. Maybe even code that’s predates code standards in a given language. This is certainly the case in my day-to-day.

While it’s relatively straightforward to install IDE tools to format you code properly and keeping it simple can be easy when you don’t have to consider a decade of backwards compatibility. It’s less obvious when you’re not working with a clean slate. What do you do when you encounter ugly code? What about when repeating yourself it the shortest path to a complex fix? Should you re-write an entire library because doesn’t hold up to code standards?

I propose adding LIBTYFI3 to the lexicon of idioms.

If the code is ugly and misformated. Fix it4.

If you’re repeating yourself or having trouble keeping it simple. Step back and assess what you should actually be refactoring. You’ll probably learn something about the application in the process.

If variable and functions are named poorly. Fix them.

If comments are missing. Add them!

If tests are missing. Add them.

In other word, if code is not holding up to current standards, rewrite as much as possible as long as it’s tangentially relevant to your task.

Obviously this is going to take more time than a quick fix. Perhaps, if your task is truly a critical fix you should skip some of these steps. But stakeholder should understand that legacy projects are complex and taking time to do it right will lead to a better product in the long run.


1 – Lest you question my Dad’s parenting choices, I can assure you small town Northern Ontario truck stop restrooms in the 80s/90s were not nearly as sketchy as the image you probably have in your head from movies and TV.

2 – This rule did not apply to toilets.

3 – Libby-fi? Sounds like some poorly thought out Liberal social network.

4 – But please for the love of god, isolate style from functional fixes in their own PRs.