Making Development Easier for Developers

Brent Simmons

And it seems retro in the worst way that we’re still using anything other than a scripting language for most of our code. We should be using something simple and light that can configure toolbars, handle networking callbacks, query databases, manage views, and so on. And maybe with a DSL for SwiftUI-like declarative UI.

Almost none of that code needs to be in a lower-level language like Swift or Objective-C. It really doesn’t. (I say this as a performance junkie!)

It could be in Ruby, Lua, Python, or JavaScript. Better still would be a new language invented specifically for the problem of writing apps, something designed to make the common challenges of app writing easier.

We did have this stuff decades ago. Not for app making in general, sure — but now it’s 25 years later, and a company like Apple could make this real for all its app makers.

Where to start? Let’s start by saying I agree 100% with Brent. Having a built in scripting language with dynamic UI updating and easier ways to build code and UI would be absolutely incredible! And, like Brent says, I’d love to see Apple make this happen.

A hojillion years ago when I worked at Visio we had VBA (Visual Basic for Applications) integrated right into Visio. It was a fantastic way to build custom Add-Ons for Visio. You could embed your VBA solution right into your template or document so folks could invoke it right from the app. This allowed folks to make fancy automation to fit their particular need and do it in a high level scripting language that could control Visio in all kinds of ways! I loved it! I spent a lot of time working on Add-Ons to Visio in C and C++ but I used VBA to test things before implementing them as an Add-On — Add-Ons had the advantage of being usable app wide.

I’m not sure how VBA is used in Visio today but before I left Microsoft had added a way to build your solution code into binary form so it could be signed before including it as a part of your solution package. It was such a marvelous development environment.

Now, if you’ve ever used VBA in Visio, Excel, or Word you know exactly how powerful it is. Could you imagine having access to something like that within your Xcode dev environment that was fully integrated, or even supported like VBA in an application? Yes, it’s a lot of work to make something like VBA work but it is so worth it.

Brent mentions Ruby, Lua, Python, and JavaScript as the scripting languages but I have to say Microsoft’s Visual Basic for Applications is so much easier to understand and use than any of those languages and it was easy to open functionality to it using Microsoft COM, IDispatch specifically, in the app. I know, COM has a bad reputation for being difficult. Yes, like I said earlier, it’s a LOT of work, but it’s so worth it when you can open all that power to your users and yourself! Taking that to the next level, like Brent’s talking about, would be a huge boon to Apple Platform Developers. AppKit, UIKit, SwiftUI, Objective-C, and Swift are still too deep to move quickly. If developers creating code for any of Apple’s platforms ever took some time to use VBA they’d see what I’m talking about. The paradigm is a bit different than they’re used to but, hell, I was so confused when I came to iOS development! They’d get used it after a time.

Building UI and code behind VBA forms is so easy. Drag and drop a UI, double-click on the element you’d like to add code for, and write your code. That’s it. It’s that easy! I would totally embrace this idea for application development on Apple platforms.

You can build at a higher level today using awesome tools like Xojo that give you a very Visual Basic like experience complete with a drag-and-drop forms builder just like Visual Basic!

Psst, did you know that folks have been scripting applications for iOS, complete with dynamic UI updating, with React Native? Yeah, it’s true! I’ve been working on an application like that for the last two years. We’ve almost completely rewritten the application in 100% React Native, which uses JavaScript as its backing language and a way to build UI in a very HTML/CSS manner. Think SwiftUI with web technologies. It works.

I know of many applications using Electron to deliver cross platform apps, like 1Password. They used Rust for mission critical code and put an Electron “front end” on top of it. Microsoft has fully embraced React Native. They like it so much they’re the primary maintainer of React Native for Windows!

Am I saying React Native is a perfect solution? Hell no! It’s a terrible developer experience in my opinion. Most folks use Visual Studio Code — I prefer Nova myself — as their editor and don’t have a nice debugger to fall back on. Nothing is integrated. It’s a bunch of tools losely hung together by duct tape that let you kind of see what’s happening in your app. Hey, if you think console.log is the height of debugging then this environment is for you! 🤣

In the end I, like Brent, would love to see a modern scripting environment that’s embedable or standalone that is fully supported by and used by Apple internally to create applications. The embedded environment is very enticing to me. Something like Visual Basic for stand alone development and Visual Basic for Applications for embedded scripting would be absolutely incredible!

Modern means easy to use UI builder and code behind that is a super simple language like BASIC and on top of it make it easy for third-parites to make extensions to the environment and provide code modules that give developers the power they need for specialized applications.

Look at Xojo. That’s it. Apple, buy it and make a version that’s 100% built for your platforms and is embedable in applications.

Stream Work Note

I’ve been going to Grit, my favorite coffee shop, for the last six Sunday’s to work on Stream. It’s been really rewarding to spend the morning working on it. I typically work from around 8AM to noon, then grab Chipotle for my daughter and I and head back home.

That four hours of time has given me so much joy and recharges me for the week ahead. I cannot imagine how much better Stream could be if I were able to do this five days a week for five to eight hours a day! I might actually be able to make some real progress on the Mac version! 😱

Today I’ve managed to kick a beta build out the door. What I expect to release is version 1.6.0 as soon as Apple opens the door for glassified releases. Now, don’t expect much. Even with my four hours at a time to work on it I’m still very slow and the feature I’ve added isn’t glassy, at all. It’s something I’ve wanted to add for a very long time. It’s a feature meant to make things easier to subscribe to feeds. That’s all I’ll say about it for now.

What’s next?

Well, I had wanted to create an entire new view for adding and managing your subscriptions. I really need a nice way to populate the app your first time launching it and give you some great options when you pop open the Subscribe view controller. My plan is to create a nice set of hand picked feeds for users and, perhaps, add a set of recommended feeds using Apple’s built in LLM models. We’ll see at some point I hope! As long as I’m able to continue spending my Sunday mornings coding I think I’ll be able to achieve a lot on the app. I have a lot of features to add and bugs to fix! There are a lot of usability things I could do to improve the app and a few bugs I need to take care of.

Where’s the Mac version?

Brain in a jarThis is a tough one. And it’s only tough because I don’t know AppKit as well as I do UIKit. Yes, Stream is still 100% UIKit and the Mac parts I’ve done are all AppKit. I’m thinking I may do some new features in SwiftUI because I need the practice. I’ve never built anything with SwiftUI.

I’ve struggled to get layout on the Mac working the way I’d like. My table view cells look like crap and even with help from a dear friend — hi, Josh — I haven’t been able to get it right. It’s terribly frustrating and makes me want to jump out a window.🤣 Maybe SwiftUI will let me make those cells work on Mac?🤞🏼

Stream for Mac Update

You’d think since Stream for Mac looks this bad I’d get to work on it, you’d be wrong! 🤣

I really do need to get back to it. I started working on the add feeds modal and realized I needed to fix up some of the code that does that to work better on the Mac. It’s also forcing me to look at adding async/await to the app, which is something I really need to do.

Stream for Mac: Work Note

Brain in a jarI managed to work on Stream for Mac for a little while yesterday. I got a bit confused about how menus operate on the Mac — from a developer standpoint. I’m an old Windows developer of 20 years turned iOS developer in 2009 and now exploring the Mac and AppKit (yeah, I know, it’s old and busted now.) I got hung up on who “owns” the menu in a Mac App. I’d never had to think about it before, now I have a better understanding of how the Mac and first responder work.

I was kind of beating my head against the concept until our internet connection decided to stop working and I was kind of forced to walk away for a bit. That was intimately the key to figuring it out. I asked some questions on the Core Intuition Slack, using my phone, got some great answers to my noob questions, and read about menus and first responder in a book I have available in Kindle. The book I used was Programming Swift! Mac Apps 1 Swift 3 Edition by Nick Smith. I jumped to Chapter 8 Menus, Toolbars, and First Responder and that did the trick. I’m hoping I’ll be able to carve out some time today to put my newfound knowledge to use. 🤞🏼

I have other chores to take care of first. Hopefully they don’t take too long. Heh, they always take too long. 😂

Stream Update

I managed to work on Stream a bit over the weekend and once again I have that ”I wish I could do this full time” desire.

I have a list of things to do a mile long. I checked my checkins — say that five times fast — and I haven’t worked on the Mac version in well over a year. Pathetic.

I did manage to get very close to finishing off a new little feature over the weekend. This feature will allow you to set the number of days Stream will keep posts. It’s a sliding scale from one to 31 that defaults to 30, because 30 is the hard coded value in the version in the wild.

I like the way it’s come together and need to fix an annoying bug that cropped up on iOS 15.5 — possibly other versions — then I’ll get a beta out the door.

A cute little monkey.For the technically minded. This bug is clearly my fault. I have a layout issue my table view cells, there are two types. It would seem that iOS 15.5 has tightened up, or changed, the auto layout engine in UIKit that exposed my bug. I say it’s iOS 15.5 but it could be all 15.x. 🐞

I’m still digging. Hopefully I don’t wait another eight months to work on it again. 😳