Author Archives: Lou Franco

Programming Tutorials Need to Pick a Type of Learner

Note: If you got here because you googled “WCErrorCodePayloadUnsupportedTypes” I made a page called How to fix WCErrorCodePayloadUnsupportedTypes Error when using sendMessage which explains it better.

I’m working on an app to help me stay on an intermittent fasting routine. I wrote about it a little in Icon-first Development.

Fast-o-Mat is an iPhone app, but I want an Apple Watch complication to give me quick access to when my fast begins or ends. To do that, I need to get data from the phone to the watch.

I had never done this before, and I didn’t have the first idea of how it is done in modern iOS/watchOS development.

Here was my process

  1. Do a few google searches to find out the basics. I learn that this is called Watch Connectivity.
  2. Try to make sure that this is the modern way of doing things, since Apple changes things a lot and watch development generally change a lot in 2019. It is.
  3. Look for a tutorial. I pick this Hacking With Swift one because they are usually pretty good. (Here is Part II, the Watch app, if you need it)

Then, at this point, all I do is look for the import and the basic classes I need and see how far I get from just basic iOS knowledge.

This tutorial is good at facilitating that.

  1. The code samples are easy to skim for
  2. There isn’t much pre-amble before we start getting into it
  3. It’s focussed on just the code we need for Watch Connectivity

So, this is very unlike my idea for vague tutorials, but I am not really a new learner.

There isn’t a new concept here for me to learn on my own—I understand the concept of asynchronous message sending. I just need to know what framework and classes to use for this specific task.

The issue is that this same tutorial is what a new learner would find as well.

I believe a they would get this all working by following the instructions step-by-step, but would they have learned it beyond that? Could they troubleshoot?

One thing that is not clear from the API or this tutorial is that Any doesn’t really mean Any in the message parameter to sendMessage

func sendMessage(_ message: [String : Any], replyHandler: (([String : Any]) -> Void)?, errorHandler: ((Error) -> Void)? = nil)

I decided to just use one of my types there. It’s a struct with two TimeInterval parameters.

The documentation says

A dictionary of property list values that you want to send. You define the contents of the dictionary that your counterpart supports. This parameter must not be nil.

And running it says:

errorHandler: NO with WCErrorCodePayloadUnsupportedTypes

And now I see that “property list” values are things that you can store in a plist (so, not my struct, just simple types or NSArray or NSDictionary). And yada yada yada, it’s a little more complicated when you want to do this for real.

This is all to say, sometimes you just want the code (like me) and sometimes you are trying to learn a new concept from first principles, and the same tutorial can’t deliver both (or should even try).

In Your Personal Network, Be the Server

If you want to “network”, don’t think of it as trying to meet people, or trying to find customers. Think mostly of servicing the network you already have

Consider everyone already in your network to be your clients. This doesn’t mean “customers that pay”, it means “clients that you serve”. It means you care about their well-being. You would help them if asked. You are interested in them and their problems.

There are times when they make requests, and you would do it freely—do it and follow-up. There are times when servicing the request should cost money—make that clear.

But, the important thing here is actually care about them and their problems, not yourself and your problems.

Make deposits. Do this constantly. Do it right now. Just build up as much good-will as you can. Also, to be clear here: likes, shares, and engagement on social posts are not deposits.

What if you actually need something from someone?

Ok, at some point, you might a withdrawal. Paid work, a recommendation, an introduction. Some of those are small enough, just ask. Let them know what happened—follow-up.

For bigger asks, to the extent that it is possible, figure out how your withdrawal might also be a deposit. For example, can you ask your paid clients how you can deliver more value to them? How you can help their contacts?

If your mindset is to serve, you will constantly come up with ideas.

Edit in Sweeps

A few years ago I saw Joanna Wiebe talk about her 7 sweeps editing technique at the Business of Software conference.

The basic idea is that you edit a work in successive sweeps where each sweep only tries to improve one kind of thing. For example, her first sweep is to improve clarity. Her sweeps are designed for advertising and marketing copy, but the basic idea of editing for one thing at a time is working for me.

Since I bank posts, I have a lot of time to edit them before they get posted. Right after I write my first draft of the next post, I go to the upcoming posts and edit the ones that would publish next.

Here are my current sweeps

  1. Clarity as Joanna describes: Who is it for and what is the message? Is that clear?
  2. Grammar, spelling, punctuation
  3. Remove unnecessary parts – these may be the start of another post.

I don’t yet do these sweeps, but I should

  1. Make the post actionable. What can I challenge the reader to do right now?
  2. Edit for voice and tone. Joanna has a video about that too. I am struggling with finding my voice.
  3. Make the post valuable to the reader. (I’m sorry, but I am trying)

So, do this now:

  1. Watch Joanna’s Clarity Video.
  2. Pick a piece of recent or upcoming writing you have.
  3. Think about who your audience is (a key part of how you make things clear).
  4. Do a clarity sweep on that piece.
  5. Think about what sweeps would make your writing better and figure out what you will actually do in that sweep. As I develop mine further, I’ll share.

Alcoa’s 1958 Plan to Make Programmers

In 2019, I went out to dinner with my father-in-law and his retired friends. I met someone who became a UNIVAC I programmer in 1958.

I asked him how he became a programmer. He said he was in Alcoa’s accounting department for a few years right after college. HR came to him and asked if he wanted to take an aptitude test for a different job.

He passed the test, and so they trained him to be a programmer—he went on to have a decades long career in industrial control software.

He described some of the work to me. A lot of it sounded like data engineering—he said he became an expert in “preparing inputs”. He worked on early projects to computer-control aluminum production.

If you don’t know Alcoa, in the 50’s, they were inventing ways to sheathe skyscrapers in aluminum. They invented pull-top cans.

Kudos to Alcoa for training new programmers—if you are finding it hard to recruit, you might want to follow their lead.

Review: Building a Princess Saving App

Having a driving question helps me find interesting, less-mainstream content that can help shape my thinking. One question I am exploring is how game-design can drive app-design (not via gamification). The presentation, Building a Princess Saving App, describes it perfectly.

This talk is about building learning and fun into your applications. If you’ve ever wondered how games work and how they can help you build better apps, this is the talk for you. Along the way, we’ll discuss a new philosophy of interaction design that is already creating a major competitive advantage for innovative application developers.

The slides describe how typical enterprise and Web 2.0 application designers might approach the problem of saving a princess vs. how Super Mario Brothers does it.

Along the way you learn the language of game-design and the STARS model. Well worth a read if you are interested in this topic.

Professional Performances

I’m not a huge fan of technical interviews because I think they are closer to auditions than programming work simulation. I wrote:

A typical tech job is not a performance. For one, there is no audience. And, unlike a performance, we make tons of small mistakes and corrections along the way. Imagine a band performing a song like we usually program—it’d be a mess and not very entertaining (or very entertaining if you think of it as avant-garde).

But, there are times where the work is a performance. For example, presentations or talks. For that, I recommend treating them exactly how performers do—with lots of practice: solo and in front of audiences.

When I recommend this, the push-back I get is that the person doesn’t want to sound like they memorized their presentation.

I agree.

Actors and musicians completely memorize what they are going to perform, but then give a natural performance. Stand-up comedians practice being flustered and reaching for words. The more you practice, the more natural the performance will look. When you do it, you will be in a flow-state.

If you want to see this in action, look at any TED talk—they are highly polished performances. Steve Jobs was also famous for practicing intensively.

But, practice has a much more important effect—it drives self-esteem. If you put the work in, you will see it. You will see that you are doing rehearsals and you will judge that you are likely to succeed. You will feel pride and you will want to do it more.

That sense of pride may turn us from dreading speaking in public to actually looking forward to it. After your successful performance, you will have the confidence that comes from success, which will drive you to practice more and start a virtuous cycle.

Incidentally, this works for interviews too.

Writing While Reading

In a Cortex podcast episode about their favorite apps, CGP Grey singled out Obsidian. The recommendation was so over the top that I had to try it immediately. Obsidian is a note taking app. I wrote a little about how I use it to make reading a game.

When I say note-taking, I mean original writing, not copied notes/quotes. To fully understand this, I highly recommend How to Take Smart Notes, which is the most important book I have read in years in terms of impact on my reading/thinking/writing.

The goal of notes, according to the book, is to be pieces that can be readily assembled into publishable work. Given that, a note must be original writing somewhat ready to be published. They aren’t long, though. Most of my notes are a paragraph or two. I frequently refactor long ones into smaller ones. They are supposed to be free-standing building blocks, linked together.

What do you write? You could digest and re-explain what you have read. This kind of note will prove to you that you understand what you are reading. It is also a useful building block later if you reference the book.

A better note is driven by your own questions. I have many questions that I think about.

  1. What does it mean for game-design to drive non-game app design (but, not gamification)?
  2. What is the sound equivalent of visualizations?
  3. What are programming books trying to do and is there a better medium to deliver that (is it games?, does it have sound?)
  4. What is the right format for a programming tutorial? Is it something more vague?

I read books with these questions in mind, and sometimes I have ideas about them. If this happens, I stop reading and immediately write a couple of paragraphs in Obsidian.

After developing a note, I link it to as many relevant other notes as I can. Sometimes it’s clear that there are holes that need further thinking. I make and link to place-holder notes and tag them as needing development.

This continues like an infinite game: generate questions -> read -> write -> generate more questions -> read -> write.

When I am not reading, I sometimes just engage with the notes. I pick a starting point, follow links, remind myself of my past ideas. This will also generate notes, refactorings, questions. Most often it shows me that I have a topic that is ready for publication, so I add it to my schedule.

When it comes time to write for publication, it is much more like assembly and editing than writing, which was the goal of these notes.

Where do Post Topics Come From?

Yesterday, I said that I keep a topic list that goes at least a month out. In reality, not all of those will be written into posts, but I need a lot of choices each morning as I sit down to write. The list is under constant maintenance, but the most important thing to do is to keep adding to it.

Here are some of the places those topics come from:

  1. From a question I am using to drive my thinking. See: What are books for?
  2. From the notes I am taking while reading. See Playing Non-programming Books
  3. From writing posts. Yesterday I consciously listed the new topics I thought of while writing the post on topics.
  4. From editing my banked posts. When I delete a paragraph that is interesting, but not related, that paragraph can become the seed of a new post.
  5. From solitude. See Use Deprivation to Make Space
  6. From correspondence. If someone asks me an interesting question, my answer can often be generalized into a blog post.
  7. From my old work. I’ve been blogging and writing publicly for over 10 years. Old posts need updating: See Use GitHub Profile Pages to Mirror Your Personal Site
  8. From my tweets. I don’t tweet a lot there are enough to look back at and see if there’s a bigger idea there.
  9. From my other works. I write about my apps, like in Sprint-o-Mat 2021.1 is Available
  10. Current events, like WWDC. See: WWDC 2020 Wishlist – Xcode / Swift or WWDC 2017 for iOS Developers

I personally keep them organized into a schedule so that each day, when I am ready to write, I can just look at that day’s topic and give it stab. It doesn’t always work out, but not having to choose from the list helps me get started.

If I give up on a topic, I can take what I’ve written and link it to that topic in Obsidian. I move it down a little in the list and move onto the next one.

If it’s too big, that’s actually great, because I break it down into a few mini-topics to build up to a bigger idea later.

Make Writing Easier by Having a Long List of Topics

The last few posts have been about my practice of blogging every day, how I bank posts, how I start with a bad first draft, and how I ease into my writing day with morning pages.

In the past, when I set goals to write more frequently, I was always stopped by not having ideas for what to write about. Or when I got one, I didn’t have a systematic way of collecting them. I would sit down to write, but getting started on a new piece was too difficult.

My goal now is to make writing a first draft easy by keeping a long list of writing topics of varying degrees of difficulty.

When I add a topic to the list, I try to develop it a little with notes for why it’s on the list in the first place. If I have already have notes in Obsidian that are related, I link them. All of this will make it easier to get to a first draft later.

Having a long topic list gives me lots of choices for what to write in the moment based on how motivated I am. Not every topic will work out. If that happens, I grab another one.

The key is that I am not blocked at the time I sit down to write by not having any ideas.

Tomorrow, I’ll write about how I generate this list.

Update: Here is the post about generating the topic list

Doing Morning Pages Helps Me Make Shitty First Drafts

I am in the middle of reading Julia Cameron’s The Artist’s Way [amazon affiliate link], a classic about what it means to be a creative professional. The book is not meant to be just read, it’s a book you use, a book you play.

There are many tasks and exercises throughout, and you are meant to read one chapter at the beginning of the week and use the rest of the week doing the tasks in it.

But, before you even start, Cameron describes a task you will do each morning: your morning pages where you fill three pages with long-hand writing. What do you write? It doesn’t matter. What matters is that you start and do not stop until the pages are filled. She says to think of it as DOING morning pages, not WRITING morning pages. I think of it as PLAYING morning pages (like scales).

These pages are write-only. You can destroy them right after. Don’t read them and never show them to anyone. They are not writing—you never want to expose them to criticism because you never want any reason not to do them.

I started my morning pages journal on December 28th and have never missed a day. I can’t wait to do them, and once I start, I can’t wait to finish. Because, right after I do them, I am so ready to write “for real”.

It is 7:45am right now, I finished my pages at 6:56am. The first thing I did was edit the next two posts that are scheduled to publish, and then I opened my topic list and wrote a first draft of this post. I just noticed that I never wrote about my topic list, so now I am ready to write a post about that. Like blind drawing does for sketching, the morning pages prime my brain for continuous writing, which carries through the whole morning.