Issue 60

13 May 2020

by Lori M Olson

DRD060: Socially distanced content for a socially distant audience.

OPED ― Our Unvarnished Opinion

Ok, let’s talk about testing this week. Everyone knows about the benefits of testing… or do they?

Certainly, I talk about testing a lot. I’ve mentioned it in at least five other issues of this newsletter. But I don’t think I’ve talked about testing from the macro view: User Stories and their associated acceptance tests. Too many people start to build apps without these tests. And that’s a big mistake. Because those tests are your “definition of done”.

I have an acquaintance who, AFAIK, is still tinkering with his app, a word puzzle game, 5 years later. He’s ‘not done’ yet. FIVE YEARS. When will he be ‘done’? Who knows? 🤷‍♀️ He didn’t create any specific user stories for his game. Or acceptance tests. He has no concept of being done, so he’ll continue to tinker and add new stuff, probably forever. And never actually get his app published in the App Store. And that’s a damn shame, because I’ve seen that game, and it’s good. Really good.

If my friend had defined his game user story (or stories), and written some acceptance tests, he would not have been able to continue fooling himself about the status of his project. He could have finished and released that game, and continued to add new features (with new associated user stories) for years now. Or he could have moved on to a new game or app.

Don’t live in the limbo of ‘not done yet’ with your app. Figure out what your main user story is, write some acceptance tests, and then make those tests pass. When they are all working, you are done, done. And ready for release (or at least beta)! ― WNDXLori

This week concludes our celebration of hitting the magic 500 subscribers for the newsletter. As promised last week, we have randomly selected a winner from our subscriber list (as of last issue), and our lucky winner, Janak Vyas, will be receiving a free copy of RubyMotion Query In Depth (check your email later today, Janak!). This updated set of videos can no longer be purchased stand-alone, but will be part of our upcoming re-release of the MotionInMotion videos as a subscription.

Last week, I also sent out an email about a livestream I was doing, a teardown of one of the early contract tracing apps that has been released locally (local to me, in Alberta). If you are interested in the replay, you can catch it on YouTube, or on our Facebook Page.

I will be continuing to do livestreams in the coming weeks, about my 6 Pack Apps program that is being relaunched, and I’ll be sending out more notifications. If you don’t want hear about 6 Pack Apps, you’ll be able to remove yourself without unsubscribing from the newsletter, don’t worry.

DRGTK ― DragonRuby Game Toolkit

In their never-ending quest to drive RubyMotion adoption rates to new heights, Amar Rajan and his crew carved off the DragonRuby Game Toolkit which they describe as “a professional grade (yet beginner friendly) 2D game engine”. What’s more, it is superbly cross-platform with support for PC, Mac, Linux, iOS, Android, Nintendo Switch, XBOX One and PS4 (whew!) Pound for pound it is the best and fastest way to get your brilliant 2D game concept from between your ears and into the hands of gamers around the planet.

An expected trend for any platform in its ascendency is the emergence of third-party tools to enhance and/or simplify DRGTK development. We’re happy to bring you the first of undoubtedly many such efforts: Kevin Fischer out of Osaka, Japan who recently kicked off his DragonRuby Toolbox project on GitHub. He launched with classes and code snippets for Transformations, Color with HSV/HSL Support and a Color Accessor for attr_sprite Enhanced Classes. These all seem really useful.

We can easily visualize Kevin growing this project over time. Better yet, if you have a clever class or code snippet you’re just itching to share with the world, consider contributing to Kevin’s repo so all of this good stuff winds up in one spot.

DRSH ― Dragon Riders Slack Highlights

Every time we drop by the Dragon Riders Slack we find something useful on offer. This time around it is Ben Govero’s question about the use of Apple’s mighty handy Main Thread Checker with RubyMotion. Turns out it is as simple as “adding it to the Rakefile”.

If you needed yet another reason to join the Dragon Riders Slack, now you have one. You’re welcome.

By the way we couldn’t help notice that Ben’s email hints that he’s with Arsenal “the smart camera assistant”, which you probably want to check out as well. It is a very cool product. And, yes, the mobile app part of it is built with RubyMotion of course.

ANDROID ― Nothin’ but…

At the beginning of the year we promised more Android content and we’re happy to continue living up to that. In this issue it is for the Big Nerd Ranch’s concise yet detail-rich post entitled Encrypting Shared Preferences with the AndroidX Security Library.

In case you’re wondering why you care about that, Android’s SharedPreferences stores data as plain text. WTF? Question: shouldn’t we always encrypt potentially sensitive data? Three guesses and the first two don’t count. Of course we should and the Big Nerds show us how.

GOTW ― Gem of the Week

Our good friend Martin Kolb just posted the first part of the last article you are ever going to need for building macOS apps with RubyMotion. OK, we might be exaggerating that “last article” part a bit. However we do love a post which pulls together all the tedious minutia on what it takes to achieve a particular programming objective. In this case, starting to build a macOS app with RubyMotion.

Thanks, Martin, we really appreciate the time and effort that must have gone into this! Oh, in case you don’t immediately recognize Martin’s name, Gapped is just one of his many claims to fame.

COMM ― Community

While MacRuby may be long gone, there is still a rich legacy which is relevant to macOS-related RubyMotion development. As it turns out, you can find a lot of MacRuby’s guts living on in .mateus’s GitHub gists.

While we’re on the subject of MacRuby, you can still buy the paperback version of MacRuby in Action by Lim, Cheung and McAnally. We have always liked the ‘In Action’ brand from Manning. What you need to know when you need to know it and in just the right amount of detail.

(photo credit: Jimmy Trickle)

AHTW ― App Highlight This Week

You may have noticed that AHTW is missing from its usual cozy slot just before DRGTK. That is because nobody nominated a candidate. Which is a way of saying that if you’re looking for some exposure to our really focused audience, this space is tailor-made for you. Let us know if we can help you (and your app) out!

TWIL ― This Week I Learned

We have a TWIL twofer for you:

Every once in a while something comes along which kinda blows us away. When this happens our emotions range from a naively enthusiastic “hey, that is so cool!” to a more snarky “you waited all this time to tell us this?” In any case, if you like using tabs in Safari, you are going to love them in “Pages, Numbers, Finder, and many other Mac apps”. Wait, what, you can do that? Yep, and it will only take you 49 seconds to learn how.

Also, if your heart is set on being the next Matz and inventing your own language from scratch, then that spiffy new syntax is going to have to be supported in popular editors. TWIL from the indefatigable Lily Ballard that the basic mechanism was invented by Allan Odgaard a decade-and-a-half ago. And it really hasn’t changed a lot since. Who knew? Lily, that’s who.

HAHA ― And They All Laughed

Humour from The Jenkins only a true tech geek could love. Or even understand.

That’s a Wrap!

Did you know the world’s best DragonRuby newsletter can be delivered to you, still curbside and contact free, every two weeks? At least it will be if you subscribe! We’re also on Twitter and Instagram and we really hope you’ll follow us there for content you can’t get anywhere else.

“When the going gets weird, the weird turn pro.” ― Hunter S. Thompson from ‘Fear and Loathing in Las Vegas’

RubyMotion Weekly brought to you by