Bookmarking this clever approach to re-using an ActiveRecord scope (i.e. at the class level) within an instance method to prevent duplication
I had some fun reading about pangrams and lipograms after reading this Twitter thread about self-referencing pangrams:
I’m a little disappointed with WatchOS 6… I’m experiencing two significant bugs, one with the alarm complication and one with the Activity app; both of which are key features of the watch.
Seems like Apple’s hit a bit of a rough patch with software stability in their new OSes
Yesterday I subscribed to a few repositories on CodeTriage. It sends an email each day with an open issue and/or snippet of documentation from projects you care about. My goal is to build it into a small daily habit of supporting open source projects
Manton Reece is knocking it out of the park with Micro.blog! The new auto-categorisation feature is an awesome addition!!! www.manton.org/2019/09/2…
I might have to trim down my podcast subscriptions… my feed is starting to overflow now the Northern Hemisphere summer is over!
I’m currently reading The Well Grounded Rubyist 📖
I think I probably should have read this one BEFORE Ruby Under a Microscope… it’s a lot more practical and down to earth 🙂
It wasn’t really the point of the latest Code[ish] but I was once again struck by the sheer volume of effort that goes into open source development tools
Sure beats pirating REALBasic as a kid because you want to code but can’t afford a license!
We’ve been enjoying Apple Arcade! It’s so nice to let the kids try new games without having to warn them about manipulative game mechanics and exploitative in-app purchases (IAP) or worry about them seeing mildly inappropriate in-game ads!
Naomi has been enjoying Spek.. This morning I was surprised to hear her, unprompted, say “Augmented Reality is fun!”
Ben’s favourite so far is Kings League II. He has always enjoyed games with constant levelling up that are never too difficult.
We’ve never been big into games (I’ve only owned three game systems in my whole life: a Sega Master System II, a second hand Sega Game Gear and, more recently, a Nintendo Wii) but I am mildly tempted to buy a game controller or two for Christmas to play some of the more involved games with the kids.
Which leads me to my only “complaint” with Apple Arcade… so far I haven’t found any games that dont require somewhat constant attention. When I’m on the train I tend to prefer slower paced games where the game waits for me to take my next turn. I’m keen to see whether Apple Arcade fosters (directly or indirectly) more quality, casual games like in the “good old days” of the App Store.
The NYT has a long but fascinating read about the Boeing 737 Max crashes and the (lack of) pilot training that seriously contributed to them!
I’ve enjoyed reading reviews of the iPhones 11, particularly for photos.
I aim to upgrade every 3 years so still a couple of years left on my iPhone XR (which I’m very content with). Still not sure what to get my wife when her iPhone SE eventually dies though…
I recently upgraded to macOS Catalina (10.15 public beta). There are several “under the hood” changes to the Unix underpinnings which may trip people up. I’m comfortable at the command line but by no means an expert so this post is mainly designed as a reference for future me.
You’ll probably notice the first change when you launch Terminal. If your default shell is set to Bash you will receive the following warning every time:
The default interactive shell is now zsh. To update your account to use zsh, please run `chsh -s /bin/zsh`. For more details, please visit [https://support.apple.com/kb/HT208050](https://support.apple.com/kb/HT208050).
FWIW, I think this is an excellent warning message… it states the “problem”, provides instructions on how to fix it and links to a much more detailed article with more information (including how to suppress the warning if you want to use the ancient version of Bash that’s bundled with macOS for some reason).
Personally, I took the opportunity of changing shells to switch to fish shell again. I used it on my last computer but hadn’t bothered to set it up again on this one. It’s a lot less similar to Bash than Zsh but most of the time that’s a good thing (Bash can be quite cryptic and inconsistent). On those occasions where a tool or StackOverflow post doesn’t have fish instructions (and I can’t figure out the fish equivalent myself) it’s usually a simple matter of running
bin/zsh now) to temporarily switch to a supported shell.
The next change you might notice is when you go to use a Ruby executable (e.g.
irb). The first time I ran it I received this warning:
WARNING: This version of ruby is included in macOS for compatibility with legacy software. In future versions of macOS the ruby runtime will not be available by default, and may require you to install an additional package.
I was a little surprised by this one, not that Ruby was being deprecated (that got a fair bit of coverage in the nerd circles I move in), but because I knew I had installed rbenv, and the latest version of Ruby through that, prior to upgrading to Catalina.
Thankfully the excellent rbenv README had a section on how rbenv works with the
PATH and the shims rbenv needs at the start of your
PATH for it to work properly.
After changing shells (to Zsh or fish), there’s a good chance that whatever technique you previously used to modify your
PATH when your shell session starts is no longer in effect in your new shell.
The README says to run
rbenv shell to fix it, however on my machine (regardless of shell) I kept getting a warning that it’s unsupported and to run
rbenv init for instructions. You should probably do the same (in case the instructions get updated) but at the time of writing the instructions
rbenv init gave for various shells are:
# fish: > rbenv init # Load rbenv automatically by appending # the following to ~/.config/fish/config.fish: status --is-interactive; and source (rbenv init -|psub) # Zsh: % rbenv init # Load rbenv automatically by appending # the following to ~/.zshrc: eval "$(rbenv init -)" # Bash: $ rbenv init # Load rbenv automatically by appending # the following to ~/.bash_profile: eval "$(rbenv init -)"
Once you restart your terminal window you should be able to confirm that rbenv is handling ruby versions (via its shims) for you:
> which ruby /Users/matthew/.rbenv/shims/ruby > ruby -v ruby 2.6.4p104 (2019-08-28 revision 67798) [x86_64-darwin18]
I used Sign In With Apple for the first time today in the beta version of Micro.blog
As a customer it was quick, clear and put me in control of what info I shared without being fiddly.
For companies, I suspect it will make customer support a bit trickier though.
I’ve been enjoying listening to www.founderquestpodcast.com lately…
3 devs who launched a successful product/company but are optimising for profit rather than growth. I like their down to earth outlook and pragmatic approach (& guerilla marketing 🙂)
I recently finished listening to The President is Missing by Bill Clinton and James Patterson (while doing some work in the back yard). 📖 🎧
It was pretty good… not amazing but enjoyable nonetheless.
Web developers: if your password field doesn’t let my browser auto-generate a unique password and doesn’t let me right-click on it to paste a generated password in, you’re doing your job very wrong
(I’m looking at you “Smart”sheet)
I wish I’d known about
.rubocop_todo.yml last time I experimented with adding RuboCop to an existing codebase!
I used draw.io again today for a flowchart. It’s no OmniGraffle but it’s pretty amazing how good a client-side web app can be, especially considering it’s free (and ad-free)!
When writing change logs, commit messages, code comments, method names, project plans or just about anything else, don’t forget to explain why.
Whoever is reading it (future you?) can probably figure out what you did… but understanding why is much harder and way more valuable!
It has taken me 5 days to knock down our old back fence and put in 7 new fence posts. Tomorrow I hope to finish the rails (and maybe start on the palings). Tuesday I hope to finish the palings.
And then I hope to never build a fence again!
Embrace the conceptual compression of Rails… Don’t think you need to understand everything from day 1 — DHH
Still something I struggle with. So easy to focus on all the things I haven’t yet learned!
All Micro.blog hosted blogs now come with free sandpit blog so you can try out theme and design changes! 🥳🎉
I just added my vote for a Micro dot blog icon to be added to FontAwesome:
The circle of life continues: