JJJ's Blog

  • WordPress
  • GitHub
  • Twitter/X
  • My Steamdeck Arrived!

    I ordered a Valve Steamdeck last year when Keri and I were camping at Governor Dodge. It took a few days for the order to complete because our cellular internet access was not great at the campsite. I went with the 512GB model for the exclusive etched glass screen and the no-hassle approach to having plenty of built-in storage. It arrived a few days ago, and it is uh-maze-ing.

    The majority of games in my Steam library are platformers (like Dead Cells, Braid, and Celeste) or classics (like Portal and Phantasmagoria) most of which are hundreds of Megabytes – not dozens of Gigabytes – and with the price of 1TB micro-SD cards still over $150 USD, I’m not regretting paying more for the extra space.

    If not for the occasional emails from Valve citing delays and the Steam Summer Sale, I could have easily forgotten that I’d ordered it. I haven’t had much time to game this past year. I don’t own a gaming PC, haven’t prioritized gaming in my life, and do not have any interest in the responsibility of building a really nice gaming rig, so the Steamdeck fits my current lifestyle pretty nicely.

    The last game I played regularly was Hades (from Supergiant Games) on the Nintendo Switch. It was so darn good I earned myself a repetitive strain injury in my right index finger. I’m not sure to what extent the shape of the Switch Pro Controller influenced that injury, but it was a major turn-off since I use my hands all day for work (and will need to for the next 40 years) which means I’ve been quite shy about returning to it.

    That’s why… the best thing about the Steamdeck – to me – is how it feels in my hands – it is misleadingly pleasant to hold. Yes; it is large and covered in inputs, but it fits my mostly-normal adult-sized hands without any of the contorting that the Nintendo Switch (and the Pro Controller, too) requires of me to semi-conveniently reach the shoulder and front buttons at the same time.

    The buttons on the shoulders and back of the Steamdeck specifically have been expertly located, shaped, and pitched to be positioned exactly where my fingers naturally want to be when in a resting state. It makes me want to hold it, and to find different games that have been tuned to use them all, not unlike the way a new iPhone or iPad makes you want to explore all of its new features.

    Design iterations of the Steamdeck, from steamdeck.com

    Weighing in at 669 grams (1.47lb) it looks heavier than it is. It’s beefy, and while that is normally synonymous with heavy, it isn’t fatiguing on my hands or wrists – (the newest MacBook Air is 2.7lb, and it’s supposed to be light, and this is lighter.) I haven’t held it for a 4 hour session yet or anything, but I suspect it will be OK when I get lost in Day of the Tentacle or Monkey Island again soon.

    The battery life, is not great – a few hours tops, and around 90 minutes when it’s really chugging along with the tiny fan(s) blowing hot air out of the top. Some folks on the web are saying Valve has work to do to optimize stuff, but I’m not expecting it to improve and it’s fine with me if it stays as is. You can tweak/downgrade the graphics settings to eek more life out of it, but eh… just charge it, or leave it plugged in.

    As for the detailed compute specs, here is what you get for your 💸

    Pretty OK, I think? But hey I’m no expert at this stuff anymore…

    It charges via USB-C (45W PD3.0) but it came with its own needlessly conjoined cable & power-supply that I promptly packed away into its bag and will never use. They should have bundled a bad-ass braided reusable USB-C cable instead. There is no Thunderbolt support, but that’s probably not a big deal and won’t be for me.

    The 512GB model also came with an exclusive travel case, and I have to mention that it is a must-have if you want to leave the house with it. I plan to carelessly shove it in my go-bag & hit the road on my Onewheel without worrying about scratching that massive 7-inch Steamdeck screen. My guess is it won’t be exclusive for very long because it’s pretty awesome and everyone needs one.

    I’ve only had my Steamdeck for a few days, but so far it has been a lot of fun to play with and I’m glad I ordered it when I did. I’m looking forward to spending more time on it next week while Keri is enjoying her first RAGBRAI🚴🏼‍♀️ and I’m in a tent in a random Iowa town trying to find decent wifi 🛰

    JJJ

    July 19, 2022
    Liesure, Hardware
    Steamdeck
  • Fix HomeBrew Permissions

    When running brew cleanup I was seeing this error:
    
    Error: Could not cleanup old kegs! Fix your permissions on:
    /opt/homebrew/Cellar/php/8.1.6

    Quickest fix I could muster was:

    sudo chown -R $(whoami) $(brew --prefix)/*

    JJJ

    June 13, 2022
    Software
    homebrew
  • Natches, MS

    JJJ

    March 28, 2022
    Photography
  • Low framerate in Safari on M1 Mac

    I recently noticed that animations in Safari were stuttering pretty badly on my M1 powered 2020 MacBook Air, and dove in to figure out why.

    I’m a web developer, so I went to work writing a small bit of vanilla JavaScript to monitor requestAnimationFrame which is the API that the window object uses to “paint” its contents to the screen. (I did a ton of research to make sure, and it’s pretty neat.)

    Both Chrome and Firefox were showing 60 frames per second as expected, but Safari was only showing as 30. 🧐

    Isn’t Safari… like… supposed to be better? Something something own-the-stack? Meow meow top-down-integration, King Friday? 👑

    I was pretty confused by Safari being worse here, so I tweaked my JavaScript a bunch, searched the web for clues, and walked away from the problem for a few days, but didn’t learn anything helpful or have any epiphanies.

    Then one random Tuesday, Safari started running at 60fps again. Huh. Hmm.

    I restarted. I opened & closed a variety of different apps. I closed a bunch of tabs everywhere. I updated all-of-the-things.

    I couldn’t make Safari slow again even when I tried.

    It made no sense. But hey… it’s fixed. Yay.

    The next morning I started worky mcworkface and Safari was back down to 30fps.

    GAH! OK. OK. OK.

    “What variables changed” I thought – “What did I do differently?”

    I was on battery power when it was 30.
    I was plugged in when it was 60.

    Holy 🎅🏻💩… a reproducible result…

    Plugged in: 60. Unplugged: 30. Plugged in: 60. Unplugged: 30.
    🐢🐢🐢🐇🐇🐇

    This wasn’t a bug. This was a feature.

    System Preferences > Battery > Battery > Low power mode
    Urkel mode

    By default, macOS Monterey enables “Low power mode” on Battery power and disables it when using a Power Adapter. Safari, it seems, is programmed to interpret this setting to mean that it should reduce the number of times it paints to the screen to prolong battery life.

    On my MacBook Air, that means from 60fps to 30fps.
    What does it mean on a 2021 MacBook Pro with ProMotion, at 120fps?

    Unclear… because I don’t own one, yet… but my thinking is: folks noticing stuttering in Safari on their beefy new machines are seeing this happen how I just did, and if they disable Low power mode it will jump back up to 120fps.

    The built-in display on my MacBook Air does not have a variable refresh rate. I’m not sure what it tops out at because Apple goes to great lengths to hide this information these days, but my guess is it’s running at around 60hz.

    My final theories about Safari stuttering on 2021 MacBooks with 120hz ProMotion displays, is that the requestAnimationFrame API might be dropping all the way down to 10fps to match the 10hz floor of ProMotion – or it may not be perfectly synced up with the refresh rate, resulting in a sort of double-jitter problem.

    If the API slows down to 10fps but the display ramps up from 10hz to 60hz, you’d certainly feel like Safari was not performing very well, especially compared to Chrome & Firefox that never slow down.

    If I learn anything new, I’ll update this post!

    JJJ

    November 12, 2021
    Apple
    macOS, Safari
  • 17 Rules

    1. Build modular programs
    2. Write readable programs
    3. Use composition
    4. Separate mechanisms from policy
    5. Write simple programs
    6. Write small programs
    7. Write transparent programs
    8. Write robust programs
    9. Make data complicated when required, not the program
    10. Build on potential users’ expected knowledge
    11. Avoid unnecessary output
    12. Write programs which fail in a way that is easy to diagnose
    13. Value developer time over machine time
    14. Write abstract programs that generate code instead of writing code by hand
    15. Prototype software before polishing it
    16. Write flexible and open programs
    17. Make the program and protocols extensible.

    From The Art of Unix Programming by Eric S. Raymond

    JJJ

    August 16, 2021
    Software
    Open Source
  • 19 Lessons

    1. Every good work of software starts by scratching a developer’s personal itch.
    2. Good programmers know what to write. Great ones know what to rewrite (and reuse).
    3. Plan to throw one [version] away; you will, anyhow (copied from Frederick Brooks’s The Mythical Man-Month).
    4. If you have the right attitude, interesting problems will find you.
    5. When you lose interest in a program, your last duty to it is to hand it off to a competent successor.
    6. Treating your users as co-developers is your least-hassle route to rapid code improvement and effective debugging.
    7. Release early. Release often. And listen to your customers.
    8. Given a large enough beta-tester and co-developer base, almost every problem will be characterized quickly and the fix obvious to someone.
    9. Smart data structures and dumb code works a lot better than the other way around.
    10. If you treat your beta-testers as if they’re your most valuable resource, they will respond by becoming your most valuable resource.
    11. The next best thing to having good ideas is recognizing good ideas from your users. Sometimes the latter is better.
    12. Often, the most striking and innovative solutions come from realizing that your concept of the problem was wrong.
    13. Perfection (in design) is achieved not when there is nothing more to add, but rather when there is nothing more to take away. (Attributed to Antoine de Saint-Exupéry)
    14. Any tool should be useful in the expected way, but a truly great tool lends itself to uses you never expected.
    15. When writing gateway software of any kind, take pains to disturb the data stream as little as possible—and never throw away information unless the recipient forces you to!
    16. When your language is nowhere near Turing-complete, syntactic sugar can be your friend.
    17. A security system is only as secure as its secret. Beware of pseudo-secrets.
    18. To solve an interesting problem, start by finding a problem that is interesting to you.
    19. Provided the development coordinator has a communications medium at least as good as the Internet, and knows how to lead without coercion, many heads are inevitably better than one.

    From The Cathedral and the Bazaar by Eric S. Raymond.

    JJJ

    August 16, 2021
    Software
    Open Source
  • WordPress 5.7

    WordPress 5.7 “Esperanza”

    JJJ

    March 9, 2021
    WordPress
  • PHP is not recommended

    The latest version of macOS makes it pretty clear how Apple feels about open web technologies that aren’t JavaScript:

    JJJ

    November 30, 2020
    Apple, Software, WordPress
    macOS, PHP
  • Raspberry Pi 4, Ubuntu 20.04, PoE Hat Fan Control

    I recently acquired an 8Gb Raspberry Pi 4 and promptly installed Ubuntu 20.04 on it to see how it worked. Right away, I was excited that the PoE Hat worked and that it booted without any problems, except that the fan on the Hat was no longer controllable the way that it used to be.

    It appears that the old way of using config.txt and friends to override those settings no longer works.

    Here’s what you need to do:

    sudo nano /etc/udev/rules.d/50-rpi-fan.rules

    Put this in it to start with, and tweak as needed for your situation:

    SUBSYSTEM=="thermal"
    KERNEL=="thermal_zone3"
    
    # If the temp hits 81C, highest RPM
    ATTR{trip_point_0_temp}="82000"
    ATTR{trip_point_0_hyst}="3000"
    #
    # If the temp hits 80C, higher RPM
    ATTR{trip_point_1_temp}="81000"
    ATTR{trip_point_1_hyst}="2000"
    #
    # If the temp hits 70C, higher RPM
    ATTR{trip_point_2_temp}="71000"
    ATTR{trip_point_2_hyst}="3000"
    #
    # If the temp hits 60C, turn on the fan
    ATTR{trip_point_3_temp}="61000"
    ATTR{trip_point_3_hyst}="5000"
    #
    # Fan is off otherwise

    JJJ

    June 11, 2020
    Software
    Raspberry Pi
  • macOS Disk Utility “Operation cancelled”

    When trying to use Disk Utility to make a backup of one of my Raspberry Pi’s, I was repeatedly seeing an error that was causing my backup to fail.

    Operation cancelled

    Disk Utility

    Not particularly helpful.

    For me, the fix involved setting the Disk Utility application to have Full Disk Access inside macOS System Preferences, under Security & Privacy, and then Privacy.

    Once I did this, everything started working again! 🥳

    JJJ

    May 13, 2020
    Software
    macOS, Raspberry Pi
Previous Page
1 2 3 4 … 55
Next Page

Proudly Powered by WordPress