Make a plan...

I’m very happy and more than a little proud that I’ve been working as a Mac and iOS developer for a couple of weeks. I’ve gone from a science job at a large corporation to a wonderfully small software company that is making apps that people love. I get to spend my day doing something that I really enjoy. I tried to capture the process that got me here. I really couldn’t pull together something that I thought would be interesting or compelling. That said, I found great inspiration from listening to podcasts and reading blogs about people who started their own businesses as I was on my journey. I want to share back. I don’t have specifics or think that my situation will be directly applicable to a lot of people so I’ll stick to a relatively high level as “advice.”

Make a plan

Start down the path on that plan and revise as you learn. It may take a long time. It may not fully happen. You may find you are where you want to be sooner than you thought possible. If you have some sort of an itch that you’d rather be doing something else, you owe it to yourself to make a plan and try it out.

For me, I cobbled together the most basic of plans to do something around blogging or productivity or something like that. It wasn’t refined and I honestly couldn’t articulate specifics when this whole thing started. I made this website as a start and began posting. A year later, I set that aside as the plan (something, something, blogging) because I’m not really a writer. I also found I don’t like the productivity stuff as much as the tools and tech that go into much of the productivity ecosystem. Along the way, I found that I do like software development and set out to learn as much as I could with the more specific plan of doing independent software development as a second career when I ran out of steam at my previous job.

My last job was great in many respects but as I look back on this website, I spent a lot of time trying to become better at meetings, agendas, and email. I got to work with great people on some interesting consumer products that quite possibly you’ve used if you’ve washed your hair or clothes. I know way more about laundry than I ever thought I would. I was on the path toward retirement working this job and I had this refined plan for the future. As I continued to iterate on my plan, things came together in personal and professional life that led to me to finding the job I am at now. I really enjoy my day to day work.

It is in the sprit of enjoyment that I suggest you make a plan for where you want to be in the future. You may learn a lot and end up right where you want to be.

The Release Notes Conference was the Catalyst for Me Launching Agenda Minder

Release Notes Conference - A Catalyst for Me

I wrote something like the following in a message to the Release Notes guys - Joe Cieplinski and Charles Perry before I launched Agenda Minder. I thought about rewriting it but settled for editing it. I think it does the job and sums things up for how attending Release Notes was instrumental in me shipping an App. If you are at all interested in something like this, you should go to Release Notes. My first App had just been accepted for release into the Mac App Store when I sent this. What I refer to below is beyond the great set of talks which is what everyone thinks of for conferences. However, Release Notes was set up to make room for connections and conversations between the talks. If you do go, feel free to ask me any questions you have as I'd be happy to chat about how you should ship something.

"...While I had been using (a pretty ugly version of) the app myself for a long time, it wasn’t until I was at release notes that I really decided to polish and ship it. Attending the conference was the catalyst. I’m sure you’ve heard this from other conference goers that getting together with a group of like minded folks to learn about the business of App development is pretty inspirational.

I’m dropping a few names as I am amazed at how short conversations and the number of chats that I had at the conference could make a difference. As someone who hasn’t attended a developer conference and am a novice, this was amazing.
I had a discussion about launching apps with 3 folks (Alex Argo, Gene Goykhman, and Gordon Fontenot) who ultimately convinced me that leaning forward to learn was critical. The operative phrase was "Just Ship It."

I met Curtis Herbert at the reception who talked about developing his app, Slopes, and what I think was near the beginning of his 2.0 business model experiments (turns out he did a great job read about it on his blog).

I got some concrete advice from several Mac programmers. Given my novice status as a programmer, this was invaluable. After lunch one day, Michael Ledford spent some time politely looking at my rudimentary app with me and helping me sort what could be in for a 1.0 launch and what was going to take more time and effort to learn.

I had brief conversations with Chris Liscio and Pieter Omvlee about business models in addition to soaking up all the wonderful talks. I made myself chat at least briefly with most of the speakers. Read these posts by Yono Mitt who also attended the Conference about meeting people.

I got multiple people I could follow on Twitter and RSS to learn more. In short, the connections were amazing. Finally, I met Tim Ritchey at the conference who I contracted to do the design (at Charles recommendation) and Diane Torrance who also attended the conference who I contracted to do Beta testing for the 1.0.

..."

I interact with some of these folks by reading their tweets or web-sites and occasionally I'll favorite or tweet at them. I have emailed a couple of them when I had a question or wanted some advice, like on pricing.

It turns out that chatting with a bunch of folks who have done, are experts at, or trying to do what you're doing, is a really good idea. Release Notes was that for me.

More on Meeting Productivity - The Agenda

If you are running or attending a meeting, preparation is critical to productivity. The Havard Business Review gives some sound advice on meetings with their guide to running meetings (Amy Gallo) which cites the importance of the agenda.

“Always set an agenda out ahead of time – and be clear about the purpose of the meeting.”

It’s hard to imagine more sound advice about meetings. Axtell and Gino agree that designing the meeting and setting an agenda ahead of time is critical. “You should explain what’s going to happen so participants come knowing what they’re going to do,” says Axtell. In her book, Sidetracked, Gino talks about how lacking a clear plan of action is often why groups get derailed in decision-making. “Having a plan gives us the opportunity to clarify our intentions and think through the forces that could make it difficult for us to accomplish our goals,” she says.

Further, HBR gives their advice on preparation of an agenda. Given the number of meetings and types of meetings, this type of agenda is more than is needed. However, it’s hard to argue with the advice of getting clear on purpose. Roger Schwarz outlines this nicely:

We’ve all been in meetings where participants are unprepared, people veer off-track, and the topics discussed are a waste of the team’s time. These problems — and others like it — stem from poor agenda design. An effective agenda sets clear expectations for what needs to occur before and during a meeting. It helps team members prepare, allocates time wisely, quickly gets everyone on the same topic, and identifies when the discussion is complete. If problems still occur during the meeting, a well-designed agenda increases the team’s ability to effectively and quickly address them.

Meeting Productivity

My writing is a lot about getting more effective at the things I need to do on a day to day basis. I try to only have a couple of items I focus on over time and approach them simply. I've written about three of the four areas that have been my main focus. I started with note taking which I've improved at sufficiently for my needs. Most have been about filing and finding files. I've tackled email which I've worked to at best a stalemate.

The fourth area I have focused on and a very important element of my productivity needs are effective meetings. I've been a manager for more than 10 years. Meetings are the primary reason I set about to take better notes. Fundamentally, the ability to run effective meetings is a way that teams, and team leaders, can deliver their programs.

Effective meetings have many important elements that need to be in place but there are thing that you can control either as a meeting leader or participant. You can control your preparation and understanding of the objectives of the meeting or your particular topic for the meeting.

My focus on personal preparation is pragmatic and based in training from my early days with the same fortune 50 company that I am with still. In preparation for meetings with my direct supervisor and importantly for my one-on-one meetings with my section manager, I was taught to come to those meetings with a focused set of topics with a brief statement of purpose. So early in my career, I was typing, usually, 3-5 bullet points and the relationship to my project or task objectives. The meeting purpose was usually to inform of progress, ask for any needed help, and get input on my work. This training has served me well as an individual contributor and been something I have coached many others as a manager.

Principally, larger meetings are much the same in that you have a specific purpose and agenda items that should be directed at achieving the project objectives. To over simplify the point, the meeting is only as good as the agenda item topics and their relationship to what needs to be done. If you do no more than take the time to type out or write down what you want to discuss as the meeting in concise statements and think about how that relates to both your personal and team objectives, you will have vastly improved the discussion at the meeting and meeting outcome. Pair that up with effective note-taking and your productivity will improve tremendously. This is in your control whether you simply participate and should be routine if you run the meetings.

I participate and run a large number of meetings. So much so that its often difficult to come out of one meeting and switch gears to the next. I need to be able to prepare for these meetings and importantly remember all the items that relate to that meetings objective. As my hobby is programming, naturally I wrote a program to help with this. I've been using various iterations of the program to help me prepare for meeting. Outside work, I have been polishing this program for release into the Mac App store since I attended an awesome conference, Release Notes, in Oct 2015. Since you've read this far, I would say you have demonstrated interest in the topic of meetings. If you are working on a Mac and interested a personal productivity app for meeting preparation, head over to agendaminder.com and sign up for the mailing list for information about Agenda Minder.

Finding Files Quickly with Favorites in Trickster

So I had a bit of a hiccup in my filing system recently. I was with my boss on a video call when we decided to finalize a document. I couldn't find the document quickly. I had to resort to going into email because I remembered the last person I sent the document to. These types of interactions are a bit stressful to me as my desktop was shared, my face was on video, and it was slower than I wanted to be able to lay my virtual hands on the document.

My fix was to load a program that I didn't get moved over when I set up my new work machine about 8 months ago. That app is Trickster. Overall, the app keeps track of what you've been using on your Mac and makes access quick and easy. The main feature set I'm using for my recent issue is Trickster's Favorite feature. Brett Terpstra talked about this app again recently so I don't need to go into great detail. For the most part, my filing system is workable but having a well-crafted app vs. my direct effort to keep track of files makes good sense.

Trickster lives in the menubar so its very easy to access. The favorites section is a sidebar where I can keep links to these types of files that I use routinely on projects but that I may not have opened up very recently. This saves me from the dreaded multiple copies and is this the latest version of the file when on the spot and visible during meetings.

The app is only $9.95 and if it saves you during one meeting this year in addition to being a great utility day-in day-out, it's more than worth the price. Trickster has a free trial so there's no better time than the first of the New Year to try out a productivity app for you new productivity resolutions.

If you are like me, this will become a go-to app!

Can't Wait for the New AppleTV

With the demise of the Ouya nearly complete, the stage is set for Apple TV. I've been waiting for a while. OK, the Ouya didn't technically set the stage. It did demonstrate the concept to me personally. So I can't wait the last few days before I can order the new AppleTV. I'm more excited about this than the watch!

P.S. Finalize the content deal so I can ditch DirecTV and declutter my TV setup.

Bring it!

Update to Encrypting PDF with PDFPen

Slight update to the automatically encrypt PDF's with PDFPen. Updated to select the file and encrypt using PDFPen.

Here is the script which can also be found on github

set this_file to choose file
set label to "PDFName" --this is the Name: in Keychain change for whatever you use   
set Qlabel to quoted form of label     
set t to do shell script "security 2>&1 find-generic-password -gl " & Qlabel     
set text item delimiters to "\"" -- Get Password     
set tlst to every text item of t     
set pw to item 2 of tlst     
tell application "PDFpenPro 6"     
    open this_file    
    save document 1 encrypt using AES256 password pw     
    quit     
end tell     

On Software Commoditization - Lessons from the Chemical Industry?

Commoditization of software and indeed the computer industry has been talked extensively (DuckDuckGo Search) for a while now (2003 Gigaom). There are numerous posts about it and strategies to combat incuding Allen Pike. Most recently, Brent Simmons (Love) weighed in and started another wave of assessment. In chemistry this commodity and speciality element isn't debated. It's fact. The other simple fact that I could substitute software into the article from Dr. Kai Pflug, CEO, Management Consulting is why I've shared.

  • Does a find and replace for chemistry to software make sense to you?
  • Do you think some of the posts you've read have counterparts in the chemistry industry? e.g. Diversification and focus on new products that David Smith coaches us on almost weekly
  • See any approaches not yet adopted in the software industry?

Podcasts by Programmers

I just listened to the latest episode of Shared Instance, a podcast by 3 iOS programmers from Cincinnati. This weeks episode had some good dicussion about swift and its suitability for beginners.

I listen regularly to the show and would recommend it for hobbyist programmers as its kind of like hanging out around the water cooler with folks who know their stuff.

Likewise, I am really liking Talk Python to Me. I like this one as the host, Michael Kennedy, has been talking to some of the developers of the most popular packages on python. That and the intro song is sweet.

The others that I think folks are more familiar with that I listen to are:

Learning to Code

I saw this article by David Sparks recently. As a fellow hobbyist who has been trying to improve my skills in programming for a couple of years, I've developed some strong opinions on how to start.

First an aside for my aspiring programmer hobbyist friends. One of the pieces of advice that I often see is that you simply need to have something you want to build and its all down hill from there. I found this advice to be demotivating (I recognize that the intent of the advice is not meant as demotivating but the impact was demotivating for me). I wanted to build things at a level well above what I could understand. Was I simply not cut out to understand Object Oriented Programming? Was Objective C beyond me? etc. That said, the advice is true. However, there are a few starting pieces that experienced programmers don't really have the right perspective to answer. There are some basics you need to put in place to make some progress.

The way I learn, may not work for you so I do suggest you do use a couple of different ways to learn to find out what works best for you. That said, I'd start with an organized course. My stance boils down to this. Go for good teachers.

Start with an organized course. Rather than searching out courses on the web, start with Coursera. If you are starting right at the beginning, I recommdend Programming for Everyone (Python). If you have some experience (know for loops, if / then, etc. then I recommend tackling the series from Rice University beginning with An Introduction to Interactive Programming in Python (Part 1).

Yes I recommended a language. Yes it is Python. No it is not Swift. When the Apple recommended Swift content is adopted, I would absolutely recommend it. At the moment, you have some experienced University professors teaching a basic level for free in a simple language that is widely used including this guy. The courses are broken up into doable sized chunks of as short as 4 weeks. These courses also have peer assisted or auto-graded assignments and quizzes. Its simply amazing this stuff is available from talented teachers.

With honorable mention, I've learned a lot from Simon Allardice on Lynda.com. That includes getting started Swift. Also, there are good tutorials but they're hit or miss. If you find some you like, go to town on them.

Also, helpful but for later in my opinion is iTunes U and the Stanford courses including Programming Methodology. It is a bit old but I think conceptually very helpful. I made it through Programming Methodology but not yet through the next two courses. These are also taught by world class teachers. However, the subject matter is much denser and its not quite as easy to fit a college level course into a hobbyists life.

Organized courses are the best. Start there first.

Books are hit and mostly miss for me. I like the Big Nerd Ranch books for typing along and making things work in OS X and iOS. The issue with books for iOS or OS X is that the language moves quickly enough from year to year that the older books have enough differences that the novice me often can't make them work. Go with the videos first and then when sufficiently comfortable, go to books from BNR on the topic of interest. I am about 80% through the newest Cocoa Programming in Swift so I do recommend that. However, its already destined to be more challenging to work through as Swift 2 is adopted. Even though the BNR folks are working through how to update for Swift 2

Have fun. Follow your own path. Learn PHP or Perl if you want. That said, I do strongly suggest you look for the best teachers you can find.

Fixing Autofiling Script for Outlook

So somewhere along the way, my auto-filing script for outlook began failing. When selecting a single message and executing the script in outlook, it failed. So I fixed the error and cleaned up the script a bit.

The issue was that when I was selecting only one item, it didn't understand the message "count" so it crashed. So after about 30 minutes of trying stuff, I decided to cast as a list. It's now working for me.

-- Adapted from a copyrighted script by Mark Hunte 2013 
-- [www.markosx.com/thecocoaq...](http://www.markosx.com/thecocoaquest/automatically-save-attachments-in-mail-app/)

-- Changed script to parse out the first part of the email address as the folder name, eliminated time stamp folder
-- Changed to run as triggered script vs email rule
-- explanation of what and why at scrubbs.me

-- set up the attachment folder path
tell application "Finder"
    set folderName to "Attachments"
    set homePath to (path to home folder as text) as text
    set attachmentsFolder to (homePath & folderName) as text
      -- display dialog attachmentsFolder
end tell

tell application "Microsoft Outlook"
    set theMessages to selection as list

    repeat with eachMessage in theMessages
            -- set the sub folder for the attachments to the first part of senders email before a period
        -- All future attachments from this sender will the be put here.

        set theSender to sender of eachMessage
        set theAddress to address of theSender

        -- display dialog theAddress
       set AppleScript's text item delimiters to "."
       set senderName to text item 1 in theAddress
       set subFolder to senderName

        -- display dialog senderName

        -- use the unix /bin/test command to test if the folder exists. if not then create it and any intermediate directories as required
        if (do shell script "/bin/test -e " & quoted form of ((POSIX path of attachmentsFolder) & "/" & subFolder) & " ; echo $?") is "1" then
            -- 1 is false
            do shell script "/bin/mkdir -p " & quoted form of ((POSIX path of attachmentsFolder) & "/" & subFolder)
        end if

        try
            -- Save the attachment
            -- repeat with theAttachment in eachMessage's attachment
            set theAttachment to every attachment of eachMessage
            repeat with theFile in theAttachment
                set originalName to name of theFile
                set savePath to attachmentsFolder & ":" & subFolder & ":" & originalName
                try
                    save the theFile in file (savePath)
                end try
            end repeat
        end try
    end repeat
end tell

Research Kit - Nicely Done Tim!

Research Kit has to be the bit that struck me the most during the recent Apple Event. It is a powerful statement, to me, that Apple still views changing the world as an important part of their mission as a company. To be clear, Apple gets value from the announcement and subsequent developments. It reinforces the differentiation of their business model from Google and Facebook as Apple won't directly benefit from the data. They made an open source platform that can truly transform some difficult research work by bringing "big data", impartiality of response (in that the phone will respond predictably when used in the same manner), ease of data collection, flexibility, scale, and weight of the industry.

To fall back on a crude analysis that can be refined by folks who can better figure the assumptions (Ben Thomson comes to mind). With pretty much any assumption, such as 5 apps with 1 developer each at $150K ($120K as (Apple Developer Salary (search for it) with 30K in other benefits including Health Care seems reasonable), plus the salary of the folks who brokered the deals with the 17 organizations on the Reasearch Kit site, and the VP or Medical Director Team setting the vision for this, and other support staff, it's a substantial investment that Apple made in the area. I can easily put this at over a million dollar resource investment. Given the attention and importance of getting this right, it's easy to further imagine it is double this amount, or more.

So Apple has Billions in the bank and this hypothesized investment is a drop in the bucket you say? It is a substantial amount, a very visible and challenging commitment made by a company that has historically taken this kind of view. It is not without risk of failure and takes some courage. As such, nicely Done Tim. I'll judge Apple through this lens more than on the importance of the Apple Watch, which I am going to get and is sure to be popular.

Minimalist Wallet Update - Wrap Wallet Has It All

I've been using the wrap wallet for the better part of a month. Why only a month given I backed wrap wallet in Nov 2013? because Kickstarter that's why. If you want one, I suggest some patience as it seems they still have a bit of a queue.

I really like the wrap wallet. The build quality is great. I went with the black leather / red stitching which has a classic leather wallet look with a bit of accent color via the red. Despite thinking quite a bit about wallets, I have been surprisingly delighted by the experience of using the wrap wallet.

I described my want for a minimalist wallet in previous posts here and there. The Dizimio was my main wallet. It is a great aluminum / elastic band wallet which I used regularly for a year. The downfall was cash usage which simply didn't work for me. If you are simply using cards, I still recommend this and the Dizmio elastic band has been very resilient for me.

The wrap wallet has changed my mind on cash handling in minimalist wallets. I had said that cash sets the minimum size to a folded bill vs. the size of a credit card. I am happy to say the wrap wallet has changed my thinking on this completely. The wrap wallet hits all my needs. Separately, the wrap design is a clever way that minimizes the layers of leather keeping the size near the ideal size of a credit card in its foot print without being to thick.

Cash handling is almost perfect. Your cash is not visible in normal wallet usage. When you need to use cash, it is easy to get out some or all of your money in a reasonably discreet way. Importantly, I can quickly jam my change in the wallet.

As the wrap wallet is made of leather, I suspect there will be some loosening and wear over time. This has happened with all my wallets aside from the aluminum based Dizmio. Beyond this, the wrap wallet doesn't have a down side.

Auto-filing from Outlook for Mac

Why would I go back to Outlook?

For number of reasons, I am unfortunately going back to using Outlook on my work machine. I was able to go with Mail and, for the past year, BusyCal. It was great except for Exchange. Turns out that Exchange is pretty vital to the whole experience of Email and Calendar in my work-life. Exchange has problems all on its own. There are issues at work between even the different versions of office on PC's. Macs bring more issues. BusyCal isn't the issue. If I could still use BusyCal, I'd probably not make the switch. I lost access to BusyCal as it seems to have fallen off the corproate whitelist for access to Exchange. So much of my issue is with Calendar. I've had multiple issues with calendar items simply not syncing with Exchange. The final straw was moving a meeting on Calendar and having the series disappear! With any of my more important meetings and meetings with large distribution lists, I had been opening Outlook to manage these. So to answer my own questions, I have a lack of confidence in Calendar syncing properly and to manage an Exchange based connection.

Switching Back

I've been keeping the Outlook option open all along so it was simple to switch over except with 2 issues. First, I didn't have my auto-filing scripts set up for Outlook. Second, my archives from Mail won't import into outlook (after exporting in .mbox format). I won't deal with this at the moment.

I missed my auto filing scripts immediately and have adapted the script. I miss BusyCal daily and am reduced to hoping the next Office for Mac improves.

Script Update

Applescript support for Office for Mac is very good so this wasn't a problem beyond my lack of experience at scripting Outlook. Ultimately, this was solvable and the results are below. The script replaces my Mail script and does what I've described previously.

Dual Stream Filing Approach

I took the opportunity to set up a second script that auto tags and puts the document on the desktop (with Hazel). The reason for this is that I save too many files which does often complicate the process of me finding files quickly. So my approach is to have a "curated" pile of files that go through the desktop and then the balance of files in a separate pile that go through the inbox. I'm much more likely to be looking for the files that I've been working with on the desktop. With Tembo, I can target a search easily for either set of files.

The key to this is Hazel. The scripts simply save the files to two different nested folders based on the senders name. From here, Hazel tags them using dynamic tags and either puts them on the desktop if they are from one set of nested folders or my inbox for the others. Not the most elegant solution but since its really just a bunch of empty folders most of the time, its not an issue.

The Script

also can be found my github repository.

– set up the attachment folder path
tell application “Finder”
    set folderName to “Attachments”
    set homePath to (path to home folder as text) as text
    set attachmentsFolder to (homePath & folderName) as text
    – display dialog attachmentsFolder
end tell

tell application “Microsoft Outlook”

set theMessages to selection
repeat with eachMessage in theMessages

    -- set the sub folder for the attachments to the first part of senders email before a period
    -- All future attachments from this sender will the be put here.

    set theSender to sender of eachMessage
    set theAddress to address of theSender
    -- display dialog theAddress

    set AppleScript's text item delimiters to "."
    set senderName to text item 1 in theAddress
    set subFolder to senderName
    -- display dialog senderName



    -- use the unix /bin/test command to test if the timeStamp folder  exists. if not then create it and any intermediate directories as required
    if (do shell script "/bin/test -e " & quoted form of ((POSIX path of attachmentsFolder) & "/" & subFolder) & " ; echo $?") is "1" then
        -- 1 is false
        -- display dialog attachmentsFolder & "/" & subFolder
        do shell script "/bin/mkdir -p " & quoted form of ((POSIX path of attachmentsFolder) & "/" & subFolder)

    end if

    try
        -- Save the attachment
        repeat with theAttachment in eachMessage's attachment

            set originalName to name of theAttachment
            set savePath to attachmentsFolder & ":" & subFolder & ":" & originalName
            try
                save theAttachment in file (savePath)
            end try
        end repeat
        --on error msg
        --display dialog msg
    end try



    -- set theArchiveMailboxName to "Processed"
    -- if (mail folder theArchiveMailboxName exists) = false then
    -- make new mail folder with properties {name:theArchiveMailboxName}
    --   end if
    -- repeat with aMessage in theMessages
    --  move aMessage to mail folder theArchiveMailboxName
    -- end repeat


end repeat

end tell

Update to Autofiling Script

A reader asked about altering the autofiling script talked about here to capture the name of the sender rather than the parsed bit I was using. As I had a note from Mark Hunte on a simpler way to execute the script that he sent when I first posted this. As my script is still working for me, I'd not changed it. But this has been on the list of things to try out so several weeks later I got some time and the update was indeed easy. The script is below and will save the files from an email to a nested folder structure based on the sender name.

Github repository is here - look at the Autofiling-Email-Attachments Branch

Here is what Mark ultimately suggested:

set theExtractAddress to extract name from (sender of eachMessage) set subFolder to do shell script "echo " & theExtractAddress & " |awk -F@ '{print $1}' |awk -F. '{print $1}'"

I didn’t do much of any testing at all on this so please comment or send me a note if you find some errors.

– Adapted from a copyrighted script by Mark Hunte 2013
– http://www.markosx.com/thecocoaquest/automatically-save-attachments-in-mail-app/
– Changed script to parse out the first part of the email address as the folder name, eliminated time stamp folder
– Changed to run as triggered script vs email rule
– explanation of what and why at scrubbs.me

– set up the attachment folder path

tell application “Finder” set folderName to “Attachments” set homePath to (path to home folder as text) as text set attachmentsFolder to (homePath & folderName) as text end tell

tell application “Mail”

set theMessages to selection
repeat with eachMessage in theMessages

    -- set the sub folder for the attachments to the first part of senders email before a period
    -- All future attachments from this sender will the be put here.
    -- parse email name by @ and . to get to first part of email name

    -- updated script with suggestion from Mark at markosx.com
    -- Just wanted to give you another tip. You can extract the address without the 
    -- "fullname < email@address > " format by using the "extract address from" command.
    -- then altered to get at the name at request of reader at scrubbs.me

    set theExtractAddress to extract name from (sender of eachMessage)
    set subFolder to do shell script "echo " & theExtractAddress & " |awk -F@ '{print $1}' |awk -F. '{print $1}'"


    -- use the unix /bin/test command to test if the timeStamp folder  exists. if not then create it and any intermediate directories as required
    if (do shell script "/bin/test -e " & quoted form of ((POSIX path of attachmentsFolder) & "/" & subFolder) & " ; echo $?") is "1" then
        -- 1 is false
        do shell script "/bin/mkdir -p " & quoted form of ((POSIX path of attachmentsFolder) & "/" & subFolder)

    end if
    try
        -- Save the attachment
        repeat with theAttachment in eachMessage's mail attachments

            set originalName to name of theAttachment
            set savePath to attachmentsFolder & ":" & subFolder & ":" & originalName
            try
                save theAttachment in file (savePath)
            end try
        end repeat
    end try
end repeat

– adapted from script by Ben Waldie at www.peachpit.com/blogs/blo…

    set theArchiveMailboxName to "Processed"
    if (mailbox theArchiveMailboxName exists) = false then
        make new mailbox with properties {name:theArchiveMailboxName}
    end if
    repeat with aMessage in theMessages
        move aMessage to mailbox theArchiveMailboxName
    end repeat

end tell

Github Repositories

I put a few of my scripts up on Github. This should allow folks to be able to see the latest scripts without having to dig through the site to find them.

I have had a Github account for a while without really knowing much about Git or version control. Mainly because I don't program or develop software with any significant skills.

However, I am interested in learning more about this sort of stuff. So I dove into it and am slowly putting my applescripts on Github. I've also tried to do some updates to the scripts within the Git functionality. So you can see some of the changes I made in updating a couple of the scripts.

Swift - Can it make me a programmer?

The Apple Keynote was pretty exciting and I was really surprised at the announcement of the new language Swift. I saw a few tweets about people excited to try Swift out as a way to finally make a breakthrough in learning programming. As someone who has worked his way through a couple of the Big Nerd Ranch books and was currently in the middle of a great video on Lynda.com on Object Oriented Programming , I must admit I was of the same mind. After a bit of poking around on it, it's certainly much simpler than objective-C syntax. However, it is not going to suddenly make me able to code more useful or complex apps. I simply haven't yet got the hang of object oriented concepts. I'm stuck with old Basic procedural thoughts and can't seem to get past the basics on OSX or iOS apps. The playground is fun and I can manipulate strings with the best of them but the whole NSRect vs CGRect and getting the views and layers to update still isn't straight forward for me. I need a helper function to convert a NSBezier path to a CGBezier path...? Still, it's fun and challenging so I'll keep at it.

I did a fair bit of the Stanford CS106A class in ITunes U about a year ago. I don't like the eclipse IDE and prefer the Mac so I was just starting to do the assignments in Objective-C before the Keynote. My thinking was if I can convert this to X-Code and Objective-C, I'll probably understand the concepts better. I was able to get the Pyramid and Target bits sorted from assignment 2 but not without a fair amount of trouble on how to get the view connected to the code. (That and how to get the width of the view in objective-C). NSColor is not at all intuitive but I digress. This week I converted the pyramid assignment to Swift without too much trouble although the color part should be simpler than NSColor.redColor().set(). Color seems like an attribute of my Rectangle and not an object on its own. I'm guessing I didn't do it the easiest way.

I think folks will really enjoy the playground features but I wouldn't say we're going to have a flood of newbies suddenly releasing Apps into the wild!

 Part of assignment 2 from Stanford's CS106A course. Where is the NSCircle class again?   Part of assignment 2 from Stanford’s CS106A course. Where is the NSCircle class again?  

 This exercise has you make a pyramid based on some given constants and make it centered on the window and stay centered as the window is resized. There's a big gap from this to Flappy Birds let alone something as simple as Drag and Drop...Swift will help but it won't get you all the way there. This exercise has you make a pyramid based on some given constants and make it centered on the window and stay centered as the window is resized. There’s a big gap from this to Flappy Birds let alone something as simple as Drag and Drop…Swift will help but it won’t get you all the way there.

Tagging All the Files with Hazel

What is Needed?

A reader sent me an email asking about a refinement to my filing system. I've had something like this on my list for a while so off I went. Because Hazel is such an awesome program, it was fairly straightforward with only two twists.

The suggestion was to tag a set of nested folders with an individual tag for each folder the file is nested in. Here is the reader's description of the system.

What would be better (I think) would be a method to apply independent tags as Hazel moved downward through a file structure. For example, if you had a file structure organized like this:

Business —> Client Name with each Client Name folder having subfolders for Correspondence, Invoices and Contracts

then files at the level of Invoices would get three separate tags: Business, the name of the Client, and Invoices. Files at the level of Client Name would get two tags: Business and the name of the Client.

Independent tags would allow you to look across multiple Clients for all Invoices - say those within a specified date range. That is not possible with the hierarchical folder structure that I describe above, but would be possible if the folder names were converted to separate tags. IMO: The ability to look at “Invoices” as a separate searchable term substantially increases the information contained within the hierarchical structure. Its value extends beyond the administrative convenience of not having to worry about folder structures.

 Reader suggestion for tagging a substructure. Accomplished via a set of 4 rules in Hazel Reader suggestion for tagging a substructure. Accomplished via a set of 4 rules in Hazel

Setting up Hazel

First, you need to set up Hazel to crawl through a folder substructure. This is described in a couple of places here on this site, Gabe at Macdrifter, and by Mr Noodle. Simply put you put this rule on the top-most folder above the level where you want your files to be tagged. In this case, we want the Business folder to be tagged so I set this rule on the next folder up which I called Testing.

 This rule makes Hazel run around in the folder substructure with some sort of coding wizardry. This rule makes Hazel run around in the folder substructure with some sort of coding wizardry.

Then you add a rule for each level of folders you want to tag. In our example, we have 3 levels...Business, Client, and Contracts / Correspondence / Invoice. So 3 rules to cover this. I had originally thought that 1 rule could do it. However, I couldn't come up with a simple way to make it work so I split the task up. Each rule uses the Subfolder Depth condition in Hazel. So, this is a good opportunity for a reader to suggest an improvment and I can link to it! That's it in a nutshell.

A few items, honestly, would be best covered in a screen cast. Namely, making nested rules in Hazel (simply hold option when pressing the + sign to add a condition) with custom tokens for tags. I'll put in a few screen shots to try and bridge the gap until I hopefully put together a screen cast. I think the screen shots should get folks most of the way there with a little trial and error. See the bottom of this post for a few screen shots on custom tokens.

 Rule for tagging files on sub level 1 Rule for tagging files on sub level 1

 Rule for tagging files on sub level 2. The second if statement is nested. Rule for tagging files on sub level 2. The second if statement is nested.

 Rule for tagging files on sub level 3 Rule for tagging files on sub level 3

 This shows the custom token detail. It is named Tag1 and matches any folder name. Then this custom token is applied to a tag via the dynamic tagging below. This shows the custom token detail. It is named Tag1 and matches any folder name. Then this custom token is applied to a tag via the dynamic tagging below.

 Here the custom token is selected to apply the tags. Here the custom token is selected to apply the tags.

Handwritten Searchable Notes in PDF from the iPad!

Yes I'm supposed to be focusing on my email project but I had a great idea yesterday that worked amazingly well. Must have been all the creativity from the MPU listener show 191. So what was the idea? I've been looking for a way to use the notes I take on my iPad searchable. The answer has been staring me in the face on my iPad for several months.

The answer is Notes plus. Its handwriting recognition is very good. It has the requisite zoom to write feature that is a must have for me. My only question is how did this approach escape me? I want to save my notes to PDF and be able to look at the handwritten scrawl and any diagrams but be able to search the text and use that text to power Hazel tricks. Notes Plus (on the appstore) enables this in a few short steps

  • use the dashed box tool to select the handwriting on your page
  • duplicate that handwriting
  • convert to text
  • simply change the text to white and transparent.

In a belts and suspenders approach, I also use the send to back command to further hide the text. Export to PDF and its searchable. Below is the tip in pictures. Last picture is me searching my PDF on my iPad in PDF Pen. In this case, I moved the "invisible text" down and PDF Pen and you can see where the text is "highlighted.

I'm quite pleased with this and will be using Hazel to look for my standard to-do mark a hand written star. Notes Plus turns my handwritten star into an asterisk. This will be a lot of fun. If you use a process like this and have tips, please let me know!

 Use the dash box selection tool to select your handwriting and tap the check mark Use the dash box selection tool to select your handwriting and tap the check mark

 Tap on the sandwich stack that appears where the checkmark was.  Duplicate the handwriting and then convert to text. Tap on the sandwich stack that appears where the checkmark was. Duplicate the handwriting and then convert to text.

 You can see even with my poor scrawl it does pretty well. Now just turn the text white and transparent before exporting and you are done. You can see even with my poor scrawl it does pretty well. Now just turn the text white and transparent before exporting and you are done.

 Here is the output in PDF Pen for iPad Here is the output in PDF Pen for iPad

MPU Episode 191

I had a lot of fun talking with David Sparks and Katie Floyd on Episode 191 of MPU. I got a chance to share some of what I do in tagging and filing. Check out my earlier posts on note-taking for both the Mac and iPad which is also something I spend a fair bit of time doing.

I enjoy the listener shows. It's clear that there are a lot of really smart people doing some really clever things to make their work easier and more enjoyable. I pick up tips from the show every week. This one is no exception and I was part of the show.

Thanks to David and Katie for having me join!

Progress on the Email Front

My latest declared project is to get out of email. This is a difficult problem for me and I've only made a bit of progress to date. The base observation that I get lost once I get into email is still the starting insight I have to work from. No solid working habits have formed but I am finding a few hints as I write this which you will see below.

The approach is simply to decouple the message from the email client. I like this approach as it then merges into my better developed filing and to be improved execution machinery. This bit of synergy with the filing system is nice and I thought I was set to make rapid progress.

The lead approach I took was simple. Drag the email to either my filing Inbox or, preferably, the project folder in my Nowbox. My filing approach is described here. When I go back to the email to work on the project, the email opens up without the full thread with the email client behind the message. This, usually, keeps me focused on the message at hand and out the email client search box. It works pretty well yet with a couple of hitches.

First, dragging to the Nowbox project folder is still enough "friction" that I often just incorrectly defer moving the email to the project folder and dump the message in my filing Inbox. So I end up processing the file two times. I don't think I realized what I was doing until I just typed this! My thoughts in dumping this into the filing Inbox were based on processing email and not overall system efficiency.

Second, I couldn't open the email on my iPad to work or process my Inbox. While the iPad is not as efficient as the laptop to process email, I do try to do a bit of mindless filing when waiting for a conference call to get up and running. I have this solved and I will talk about this below.

Due to the iPad hitch, I briefly tried printing the emails to PDF using David Sparks' command-P trick. I initially liked this approach as it takes me completely out the email client. Bit after a short time, this is all I like about this approach. The show-stopping issue is you can't reply to a PDF.

The last bit that recently clicked for me was finding Klammer on the App Store. I am looking at emails saved from MacMail and I've had no issues. The comments on The app do show a few hard feelings on the pricing of the app so decide for yourself if it might work for you.

Office on iPad is a Big Deal

I downloaded the Office apps, looked at a few reviews, and have seen some of the tweets. The short answer for those of us who live in an enterprise and Office world, this is a big deal. I opened up a couple of Powerpoint presentations that get severely mangled with alternative apps and they look marvelous.

While a lot of the Apple and Apple blogging world that eschew Word (albeit for good reason), it is the workhorse for a unbelievable amount of folks. It took me about 30 seconds opening up the apps and a few documents to push the button on the Office 365 subscription. I'm looking for Word, Excel, and PowerPoint to be in the top grossing apps shortly. Apple got its 30% cut and Microsoft sold me on the subscription model.

My recently posted converting Word to PDF automatically is obsolete.

Tag vs Folders - A Personal Epiphany

just had an insight on a way to abandon folders for tags and smart folders. This would eliminate my need to file anything. All the files go in one big pile.

I've been following discussion on tags and folders. You can see this recent post on Tags vs Folders on Academic Workflows on a Mac via David Sparks. I use folders on a project basis and agree this is a very useful way to find files. I really like the overall design that Brett Terpstra has in his system described here. I read this post by Brett when it came out and I think its been rattling around in my brain until today.

So back to the insight. Get hazel to crawl my filing cabinet and add a tag to each file with Name of the folder its in via dynamic tagging. The folder name is the project in essence but with a bit more persistence than the file simply being in a folder. One could therefore imagine the smart folder with this project name for those of us who used to the metaphor.

I can now see my way to using this project name tag to be able to sort things and not have to "file" anything. Also, I think this will work nicely with my inbox, now, outbox system. I'll only use folders as temporary holding bins.

I created a test bed of 10 files in 3 folders and a couple subfolders. Then I tag each file with the folder name. For the test, I inserted >> in front of the name so I keep this clear of my other tags. Then I created smart folders for each of the tags. Then I tag the smart file sub folders with the tag of the folder they they're in. Here it is in pictures. So excited that it finally sunk in.

 This is the test bed and the Tags assigned This is the test bed and the Tags assigned

 Here's the smart folders I created with the Tags used for the folders. Here’s the smart folders I created with the Tags used for the folders.

 It works! Here is the base folder with the contents that should be there. It works! Here is the base folder with the contents that should be there.

 Oops - cut and paste error in this folder...see below for the fix. Oops - cut and paste error in this folder…see below for the fix.

 Forgot to change this one to the right tag... Forgot to change this one to the right tag…

 Fixed! Fixed!