jb… a weblog by Jonathan Buys

Mac Magazine

December 28, 2015

Sometimes I think I’d like a really great magazine, like The New Yorker, but for Mac geeks. A beautifully printed, monthly magazine with all the best news, tips, opinions, analysis, predictions, and howtos from the Mac community. I’m not looking for what Macworld used to be, I’m thinking more along the lines of The Atlantic. Something classy, something worthy of printing and keeping out in the living room under the coffee table. Something I’d look forward to reading cover to cover every month.

Of course, it would have the best of John Gruber for the month, something argumentative from Marco Arment, and maybe a bit of Mac history from Stephen Hackett. The tech news would be covered by Jim Dalrymple, Jason Snell, and Dan Moren. Shawn Blanc and Matt Gemmell would add some flavor to the mix, we’d get a taste of the future from Federico Viticci, and on the back page would be Dr. Drang’s script of the month. To be honest, I’d probably read that last page first, and then read the rest of it. Heck, Gruber could call the entire magazine Daring Fireball and color the entire front of the magazine gray with his star lightly embossed in a slightly darker gray and, well, it would be fantastic.

Perhaps it’s a bit silly to be dreaming of a magazine at the end of 2015, but it’s something that doesn’t exist that I wish did. If I wish it existed, I’m sure there must be others who would like it too. A physical, intentionally designed magazine with beautiful print, carefully chosen advertisements, and pages that felt good when you flipped them. Something that felt like it might be around in a hundred years, if you take care of it.

Of course, as far as I know none of these folks are interested in collaborating on such an endeavor. Each of them is building their own business, building membership programs and selling ads. I added up a few of my favorite sites membership programs to see what the monthly total would be:

  • Six Colors $6/mo
  • The Loop $3/mo
  • MacStories $5/mo
  • Relay.fm $5/mo
  • Shawn Blanc $4/mo
  • Matt Gemmell $4/mo
  • Brooks Review $4/mo

Total: $31/mo

For comparison, the New York Times sells for $35 per month for the “All Digital Access” package. You can subscribe to The New Yorker for less than five dollars per month, and subscribing to The Atlantic for a year equates to paying $2.50 per issue for ten issues. Food for thought.

Of course, I can’t end this dreamy article without mentioning Marco’s ill fated “The Magazine”. What I’m proposing and what The Magazine turned out to be aren’t really in the same ballpark, other than having some of our favorite characters involved in its creation. The Magazine was purposefully not a “tech” magazine, it was about writing. It was also not a printed magazine, it was a subscription digital magazine aimed at the iPad’s Newsstand app. What I’m proposing is an old fashioned printed magazine, about tech, with my personal favorite writers, superbly designed and excellently illustrated. It would be awesome.

So, of course it will never exist.


Winning NaNoWriMo

December 23, 2015

So, I won NaNoWrimo, and wrote a “novel”. Although, it’s not really a novel, more like a novella, and it’s not really written just yet, it’s 50,000 words that somewhat make up a complete story, but with more plot holes than you can shake a stick at. Couple that with the number of inconsistencies in the world building, flat characters, characters who’s names I forget half way through the writing, and two chapters that I decided I was going to throw away completely, and you’ve got what is colloquially known as a first draft.

Here’s how I did it.

Minimize Decisions

If you’ve read my old posts, you might have picked up that I was once a big fan of Vim and the command line. Those days have past. Vim can be fun, but it can also be one of the biggest time sinks I’ve ever encountered. Can you write long form in Vim? Sure, but it takes more self discipline than I have to not try to tweak the configuration just a little bit more.

Instead, I wrote my story using the excellent Ulysses editor, “a powerful tool made for writers.” In fact, I’m using it to write this right now.

Set Daily Goals

My favorite feature of Ulysses is the word count goal. To win NaNoWriMo you need to write at least fifty-thousand words in thirty days. So, divide fifty-thousand by thirty and you get one-thousand six-hundred sixty-seven words per day. I set up thirty “sheets” in Ulysses, and attached the daily word goal to each one. I labeled each sheet as a chapter, and wound up with three acts of ten chapters each.

When I sat down to write each day, I wrote until the Ulysses goal circle turned green and wrapped up the chapter. Being able to keep an eye on the daily goal, and knowing that if I met it the circle would turn green gave me a great sense of accomplishment throughout the month. I always knew how much I had to write, and that I was on track.

Enforce Focus

If left to my own devices I’m perfectly happy to check Twitter every ten to fifteen minutes. Or seconds, depending on the day. I knew that I was going to have to give up everything distracting and time wasting to focus completely on writing. To help I signed up with RescueTime. RescueTime tracks how you use your computer, and sends you an email with weekly reports on how you’ve spent your time. You can classify websites or apps as highly productive or time wasters, and you can use the “Get Focused…” feature to block time wasting sites for a specified period of time. I’d shoot for an hour at a time of enforced focus, and wound up getting a lot done.

Prepare

Months before NaNoWriMo started, I started brainstorming in MindNode and outlining my plans in OmniOutliner. I used these two tools to explore the universe I was building, flesh out characters and motivations, define a (somewhat) cohesive plot, and plan out a chapter by chapter flow of what should be going on at a given point in the story.

It didn’t take long for the story to take on a life of it’s own and diverge from the outline I so meticulously wrote up, but knowing it was there was a huge mental safety net, I knew that no matter how far off course I got, if I needed to I could refer back to the outline and get the story back to where it needed to be.

BIC

More than one night I nearly didn’t meet my goal. I had nights where each and every word had to be pulled kicking and screaming out of my head and through my hands. I had nights where I was so tired that I literally fell asleep while typing, and had to go back and remove the gibberish on the screen. Then again, I had nights where the story almost wrote itself, where I was merely the conduit for the story to be told, and the goal was met in an hour or so. The important thing was that no matter what, I was writing. Every day.

Sit down and write, lose yourself in the story, get excited about action, and be thoughtful during introspective scenes. Most of all, just keep writing. Don’t edit, don’t worry and fuss over sentence structure, there will be plenty of time for that after November. Put your butt in the chair and write.


US Cellular Strikes Back

December 23, 2015

Let me start by saying that US Cellular has the best coverage in Iowa. No matter where we go in the state, we’ve got a great signal, almost always in LTE. My Internet access is fast, and I can’t remember the last time I dropped a call. The cellular service is great, and the only reason I stick with US Cellular. After days like today I need to remind myself of these facts, because almost every time I interact with them face to face, on the phone, or over the Internet I leave frustrated and feeling like I’m being duped.

I got an advertisement email from them a week or so ago. That in itself is questionable because I’m sure I unsubscribed, but whatever, we’ll leave that alone for now. The email’s subject line advertised “Act now and we’ll waive the Activation Fee – a $25 value!” Knowing that my wife and daughter were due for new phones I forwarded the email to her and suggested that maybe now was the right time. She agreed, and the first chance the two of us had time we headed to our closest store. We’ll call this Store Number One.

The staff at Store Number One were knowledgeable, pleasant, and courteous. We came in, sat down, told her that we wanted to upgrade two lines, and she went to get the 16GB iPhone 6S. At the mention of the 16GB model I hit the brakes, I knew that would not be enough for her, she has a 16GB model now and it’s too full to work properly. We asked for the 64GB version, but they didn’t have any in stock. The woman we were working with was kind enough to call around to several of the other stores in town, and finally found one with a few in stock that was only a ten to fifteen minute drive from where we were. We thanked her for her help and left for Store Number Two.

Store Number Two was nearly empty, and we were sat down right away. The store had the right phones in the right sizes in stock, and we were ready to close the deal. Then my wife remembered the email about waving the activation fee, and we asked if they would honor the advertisement. The agent didn’t know anything about it, and asked if I still had a copy of it. I did, (in my email trash, but I still had it), and he took my phone to show the email to his manager. They talked for quite a while, and the manager decided that they couldn’t honor the no activation fee in the store, but said if we went online we could get it there. We talked it over briefly and decided that it was probably a good idea to save $50 and wait a day or two and headed home to get online, Store Number Three.

While online with Store Number Three, I noticed in my account that it didn’t appear that the correct discount was being applied to one of our lines. At this point, I need to make a brief digression to explain the importance of this particular discount.

US Cellular, like all the other major carriers, has shifted away from subsidizing smart phones and instead is financing. To offset the price of financing the phone, US Cellular is offering to discount the normal $40 monthly “connection fee” per line down to $20. Then the financing of the phone costs $15-$30 or so, making the offer more desirable because the monthly cost of owning the phone stays roughly the same.

When I looked at my bill online, I didn’t see the discounted connection fee, I saw the full $40 fee and the finance charge for the phone. I knew this was wrong, so I clicked on the live customer support chat button and was connected with a representative. I explained my situation as best as I could, and she did the appropriate amount of checking. She found two problems: one, the online view I was seeing did not reflect the correct connection fee, but the view she was seeing did. The line I was asking about was getting the discounted fee. And two, the other two lines on my account were not getting the discounted fee, and should have been. She corrected this issue, and I was happy to move along, although I was still a bit apprehensive that what I was seeing online was not representative of reality. I even pulled up a recent bill and started going through it to make sure it was correct there.

Once I was happy enough with the existing monthly bill, I asked the representative in chat about waiving the activation fee, like the associate in the store said. Apparently I was misinformed.

I do apologize that isn’t accurate you will still get charged the activation fee for the phone it is $25.00 when you finance. I apologize for the information that was provided.

Ok, great, so we could have stayed at the store in town and bought the phones there. No saving $50 today I guess. But, just to make sure, I asked her about the email I got. She responded:

If you received an email with that information did it give you a promo code with it?


“If”? What do you mean “if”? I looked through the email and didn’t see a promo code, but I did find some type of code at the bottom of the email. I sent that to her but she couldn’t find anything, so she asked me to forward the email to her, which I did. She then disappeared for a while, and came back with the final answer:

Thank you so much for holding we didn’t find that promotion but, that is only if you get the tablet and the activation fee for the tablet would be waived that isn’t for the cell phones. I do apologize.


To which I said that it wasn’t clear from the email at all that the offer was only for an Android tablet.

Awesome have I addressed all of your concerns for you today?


 Awesome.

So, we went through three stores, three representatives, and found at least four errors in the US Cellular system. It seems to me that at least one of them could have gone ahead and said, “sure, we’ll be happy to honor that email you got, even if it wasn’t originally intended this way.”

I always leave my dealings with US Cellular with the not-so-faint feeling that I’m getting ripped off.


Faith, Hope, Love

October 19, 2015

What if Christians actually lived the way Jesus commanded us to?

Love your enemy.

I’m afraid we’ve gotten a bad name, mostly because we haven’t been living the way Jesus told us to. Mahatma Gandhi is quoted as saying:

“I like your Christ, I do not like your Christians. Your Christians are so unlike your Christ.”

What does it take to be like Christ? There are many verses in the Bible that instruct us on how we should live our lives. One of my favorites is Matthew 5, versus 38-48:

38 “You have heard that it was said, ‘An eye for an eye and a tooth for a tooth.’ 39 But I say to you, Do not resist the one who is evil. But if anyone slaps you on the right cheek, turn to him the other also. 40 And if anyone would sue you and take your tunic, let him have your cloak as well. 41 And if anyone forces you to go one mile, go with him two miles. 42 Give to the one who begs from you, and do not refuse the one who would borrow from you.

43 “You have heard that it was said, ‘You shall love your neighbor and hate your enemy.’ 44 But I say to you, Love your enemies and pray for those who persecute you, 45 so that you may be sons of your Father who is in heaven. For he makes his sun rise on the evil and on the good, and sends rain on the just and on the unjust. 46 For if you love those who love you, what reward do you have? Do not even the tax collectors do the same? 47 And if you greet only your brothers, what more are you doing than others? Do not even the Gentiles do the same? 48 You therefore must be perfect, as your heavenly Father is perfect.

These versus are easy to read, but hard to act out. Let someone slap me? Let someone sue me and give him more than what he asks for? Love people who hate me? Maybe I should bake two cakes for the gay couple who asks me for one. Jesus sets a high bar for his followers. I’m not perfect, far from, but I do try to be just a little bit better than the man I was yesterday. Everyday, just a little bit better. How important is love in being a better person? 1 Corinthians 13 explains further.

If I speak in the tongues of men or of angels, but do not have love, I am only a resounding gong or a clanging cymbal. If I have the gift of prophecy and can fathom all mysteries and all knowledge, and if I have a faith that can move mountains, but do not have love, I am nothing. If I give all I possess to the poor and give over my body to hardship that I may boast, but do not have love, I gain nothing.

Without love, I am nothing. If we do all these acts without love, they are worthless. But how can I love someone who wants to do me harm? What kind of love is he talking about? The next few versus in 1 Corinthians 13 explain exactly what love is.

Love is patient, love is kind. It does not envy, it does not boast, it is not proud. It does not dishonor others, it is not self-seeking, it is not easily angered, it keeps no record of wrongs. Love does not delight in evil but rejoices with the truth. It always protects, always trusts, always hopes, always perseveres. Love never fails.

This next year we are going to be electing a new President in the United States. Election seasons always bring with them divisiveness, but it feels to me like it’s gotten worse in the past few years. As a Christian I feel a certain pressure from other Christians to vote conservative, but when I consider the options I always go back to Jesus’ command to his followers to love each other, to love their neighbors, and to love their enemies. Paul expands on the idea in Romans 12.

14 Bless those who persecute you; bless and do not curse them. 15 Rejoice with those who rejoice, weep with those who weep. 16 Live in harmony with one another. Do not be haughty, but associate with the lowly. Never be wise in your own sight.

Paul follows it up with a verse that I’ve taken to heart and try to live my life by:

18 If possible, so far as it depends on you, live peaceably with all.

So, I should love the people around me, say good things about people who are harsh with me, and live peacefully with everyone. Does that sound like the standard conservative rhetoric? Well, not to me.

But what if I’m really upset with someone? The world is going down the drain and everything I believe in this country is being questioned and I feel personally slighted. What then?

19 Beloved, never avenge yourselves, but leave it to the wrath of God, for it is written, “Vengeance is mine, I will repay, says the Lord.” 20 To the contrary, “if your enemy is hungry, feed him; if he is thirsty, give him something to drink; for by so doing you will heap burning coals on his head.” 21 Do not be overcome by evil, but overcome evil with good.

Never avenge myself. Even if I’ve been wronged, even if I’m put in a situation I don’t agree with, even if I’ve been slapped across the face. It’s not up to me to take an eye for an eye. The Bible very clearly says that is up to God.

On the matter of the clerk who took it upon herself to stop issuing marriage licenses. This is the test for determining where the motives of someones actions originate. Is what is done, done in love? Does the action adhere to the instructions from Jesus? Is it Christian to deny a gay couple a marriage license? If your action does not begin and end with love, but instead you are taking a small amount of vengeance out on someone you have perceived as wronging you, doesn’t that explicitly go against the plain teaching of the Bible?

The Bible explains to us how we should live our own lives. It does not tell us to judge everyone else on how they are not living up to God’s standard. Here’s news, no one is. “All have sinned and fall short of the glory of God.” Christians, including myself, consider homosexual relationships a sin. But, we also consider cursing to be a sin. My understanding is that God does not rank sin, so mine is just as bad as anyone else. The occasional curse word that I might drop under stress is just as much an affront to God’s holiness as homosexuality.

The argument is not if homosexuality is wrong or not, it’s that each of us are at a different stage in our journey. Some of us are not saved yet and are living in darkness, some of us have been saved by faith in Jesus are are undergoing the slow, transformative process of sanctification.

I don’t think that what the clerk did was right, but I can’t judge her anymore than I can the couples she was denying marriage licenses to. All I can do is watch the world and wonder, what if we all lived the way Jesus told us to? What a magnificent world that would be. What if we could all act with selfless love towards one another? Perhaps, just maybe, Christians should be the light of the world, showing the amazing, transformative power of salvation though Christ. Maybe we could all do a little more of that and a little less judging.

And now these three remain: faith, hope and love. But the greatest of these is love.

The greatest of these is love.


Moby Dick

October 12, 2015

I’ve been slowly working through my list of books, and Saturday I finally knocked another one off the list, Moby Dick. Herman Melville’s whaling epic took me a while. Inside those 663 pages, there’s probably a good 300 page book, as it is, Moby Dick covers both the human condition and the intricacies of butchering a whale in the middle of the ocean.

I found brief flashes of masterful prose in the book, some familiar quotes from Star Trek movies, and, surprisingly, I found bits of humor towards the start of the book. When Ishmael and Queequeg meet, Ishmael is already in bed when Queequeg comes into the room, undresses and crawls into bed next to him. Ishmael is scared stiff of the strange foreigner, and tries to stay quiet until Queequeg does something to frighten him, Ishmael jumps, and Queequeg jumps, and the entire scene reads like a comedy.

The comedy doesn’t last long though. Once onboard the Pequod the book turns to symbolism, quite a lot of it frankly over my head. I understand the main points. Captain Ahab, driven mad with desire for revenge against the whale that took his leg, sacrifices everything he has and everyone he knows in his monomaniacal pursuit of a single whale in the great, wide ocean.

He does finally find his whale, but between the time that they set sail and the time they finally catch up to the whale, there is a long period of general whaling. In this, we get to find out about the differences between the Right Whale and the Sperm Whale, and why the Sperm Whale is the most fearsome beast in the ocean, and how to kill one when you find it. Not only that, but how to decapitate the whale once killed, strip the blubber from its hide, and stock up the spermaceti for transport. All of this I could have done without.

What I did find interesting was the relationship between Ahab and his first mate, Starbuck. By the end of the book Starbuck wants desperately to return to Nantucket, and call off the hunt for the whale. Ahab, driven solely and completely by his need to kill the white whale refuses. Starbuck considers killing the captain, sneaks into his cabin with his gun and contemplates murder, but he can’t do it. Starbuck can’t allow himself to take another mans life, even if it would have meant saving the lives of everyone else on the ship.

Ahab’s obsession destroys him, and his entire crew, except the one who survived to tell the tale. In the end, Ahab knew he was beat, but he refused to give up.

“Towards thee I roll, thou all-destroying but unconquering whale; to the last I grapple with thee; from hell’s heart I stab at thee; for hate’s sake I spit my last breath at thee. Sink all coffins and all hearses to one common pool! and since neither can be mine, let me then tow to pieces, while still chasing thee, though tied to thee, thou damned whale! Thus, I give up the spear!”

The purity of Ahab’s obsession is best captured in this famous quote:

“All that most maddens and torments; all that stirs up the lees of things; all truth with malice in it; all that cracks the sinews and cakes the brain; all the subtle demonisms of life and thought; all evil, to crazy Ahab, were visibly personified, and made practically assailable in Moby Dick. He piled upon the whale’s white hump the sum of all the general rage and hate felt by his whole race from Adam down; and then, as if his chest had been a mortar, he burst his hot heart’s shell upon it.”

  • Moby Dick, Herman Melville

Ahab felt that all wrong, all evil, all torment for all of history was the fault of Moby Dick. Crazy, right?

That’s one of the issues I have with the book though. Melville kept telling us how mad Ahab was, but for most of the book he just seemed like a jerk. Obsessive, yes, but crazy? It would have been more interesting to see more of the inner workings of Ahabs mind in the earlier and middling parts of the book than at the end.

I’m glad to have read the book, but I’m not sure I’ll ever read it again. It took months for me to get through, I just kept losing interest. Like McNulty likes to say, there’s probably a fantastic 300 page book inside the 660 pages of Moby Dick.


Standing Around

September 24, 2015

I was having problems with my lower back, not an uncommon issue, especially for those of us who spend our day staring at a computer screen. My problem was exasperated by my poor posture in my chair. I tend to slouch after a couple of hours, and then slowly slide lower and lower into my chair until, at the last moment before I fall out of it, I reposition myself and sit up again. I also run in the morning, and I rarely have time to stretch properly after a run, a bad habit that needs to be addressed. By the end of the day I’d stand up and crack my lower back three or four times, and know that if I turned in the wrong way I would be out of commission for a week or so while my back untwisted itself.

During a trip to our main office in San Diego back in January, I noticed that quite a few people were using VARIDESK adjustable standing desks. Intrigued, I asked around, and after several months of neglect I made the appropriate arrangements. Work was kind enough to furnish me with a VARIDESK ProPlus 36 about three weeks ago, and I’ve been standing most of the work day since.

I don’t stand the entire day, and when I do stand I’m not always typing. I do tend to spend a lot of time at the keyboard, but I notice that I tend to take more breaks to walk around and think things through before returning to the keyboard again. At the end of the day, I’m physically tired, and mentally exhausted. Switching to a standing desk leaves me with a feeling of accomplishing something by the end of the day, and while I’m not sure if I’m being more productive with the standing desk, I do feel that I’m not being noticeably less. The benefit to me is more in how I feel after getting home, I’m ready to rest and be with the family.

The standing desk is adjustable, and takes up a big corner of my normal desk. While it is perfectly comfortable to work on standing up, I now prefer to take my MacBook out of it’s BookArc and work on an empty space beside the adjustable desk and not use the external monitor while sitting down. Mainly because the desk is so big that when it is in the down position it hangs over the inside corner of the desk, and puts the keyboard at an uncomfortable position. Personally I find this to be motivation to spend more time standing.

After three weeks my back is bothering me less, and I don’t have a problem standing for several hours at a time. The long term benefits are yet to be seen, obviously, but my hope is that the standing desk returns a few precious moments of health to my upcoming later years. Meanwhile, I expect to spend a lot of time standing around.


NetNewsWire 4

September 5, 2015

I’m not sure if I discovered Daring Fireball through NetNewsWire, or NetNewsWire through Daring Fireball. Either way, in my mind the two are inexorably linked to my introduction to the Mac community. A group of people who value usability and good design, typography, readability, and simple good sense. Before the Mac, my thoughts on software were that it was either written by thousands of contributors across the globe, or thousands of drones in basement cubicles. What I learned through NetNewsWire was that individual craftsmen made the best software, and I could get to know them through their work. I started making it a point to follow the people who made the software I used.

NetNewsWire was developed by Brent Simmons, one of the first developers who’s blog I made a point to follow. I followed him as he was hired by NewsGator, and after he left and went independent, and when he sold NetNewsWire to Black Pixel. Around this time RSS readers hit a rough patch when Google shut down Google Reader, the backend syncing engine used by NetNewsWire and many other RSS readers. I wasn’t too worried at the time. Several of the competing apps quickly adopted alternative syncing engines, and I expected NetNewsWire to follow suit.

It didn’t.

Black Pixel decided against supporting third party syncing engines and opted instead to build their own. In the man time, the older version of NetNewsWire atrophied. With no syncing engine the app was isolated, an island that needed to be a peninsula. I wanted to be able to skim the news on my phone or iPad and not have to re-read the same headlines on my Mac. Eventually I abandoned NetNewsWire in favor of ReadKit. ReadKit was almost as nice, but not quite. I still longed for the keyboard navigation and overall ease of use that I’d grown accustomed to. I kept checking in to see if there was progress, but very little was made public.

I’ve given Black Pixel quite a bit of grief over the past couple of years regarding their treatment of my favorite news app. In my mind it had joined the graveyard of struggling, once amazing, Mac apps along with OmniWeb, VoodooPad and Yojimbo. Apps with personality and history, but unfortunately no future. Apps that couldn’t quite make the transition to the iOS era.

I bought a new license straight away when NetNewsWire 4 was first announced. Then there were a few betas, few and far between, followed by a long period of silence. I assumed that the app was not considered profitable or important enough to warrant serious development time. Perhaps Black Pixel considered the purchase of NetNewsWire a mistake, and were happy to brush it under the table and forget. I don’t know. As far as I know that may well be the case, but today I’m running the final released version of NetNewsWire 4, complete with a custom syncing backend and a brand new iOS app.

NetNewsWire 4 feels like a return to NetNewsWire Lite. It lacks the power user features of the old pro version, like custom article styles, but it’s still snappy and responsive. I can still breeze through feeds using the arrow keys, and NetNewsWire still gives me a beautifully subtle highlight that flows through the selected feed when I hit the right arrow to open an article in Safari. Nothing else has ever felt quite right.

Quite a bit has been said about the loss of features in the new version, including wondering just who this app is aimed at. Obviously, it was aimed at me. Well, or someone like me who sees the app for what it is. A rewrite of a legacy system that drops both features and cruft to pour a new foundation to build on. NetNewsWire 4 is simple, but I doubt NetNewsWire 5 will be. Now that they have the base application solid, I hope that Black Pixel will be able to add back in the features missing from version three.

All in all I’m very happy with the few days I’ve spent with NetNewsWire 4. I don’t have anything to say about the iOS version just yet, other than to say that like it’s older brother on the Mac, iOS feels like a new start. With a solid syncing engine, a refined reading experience, and a companion iOS app, NetNewsWire has me wondering if I shouldn’t go check back on some other old favorites.


Link Blogging With Quicksilver

July 25, 2015

I can’t quite make up my mind on how I feel about “link blogging”. On the one hand, there’s already a lot of people out there who do it better than I can. On the other hand, sometimes I want to share something and make a few pithy comments about it. It’s out of that second feeling that this script is born.

The script started out as an Automator action, but having an Automator wrapper around a single shell script seemed like overkill.

#!/bin/bash
	
TITLE=`osascript -e 'tell application "Safari" 
	set pageTitle to (do JavaScript "document.title" in document 1)
end tell'`

URL=`osascript -e 'tell application "Safari" 
	set pageURI to (get URL of document 1)	
end tell'`

TEXT=`osascript -e 'tell application "Safari"
set selectedText to (do JavaScript "(window.getSelection().toString())" in document 1)
end tell'`

QUOTEDTEXT=`echo -n ">"; echo -n $TEXT`

LINK=`echo -n [Link]; echo -n \($URL\)`

NAME=`echo $TITLE | sed s/\ /-/g`
USERNAME=`whoami`
POSTNAME=`date "+%Y-%m-%d"-$NAME`	
echo $POSTNAME
POST_FQN=~/Public/Site/_posts/$POSTNAME.markdown

POST_DATE=`date "+%Y-%m-%d %H:%M:%S"`

echo "---" >>$POST_FQN
echo "layout: post" >> $POST_FQN
echo "title: $TITLE" >> $POST_FQN
echo "date: $POST_DATE" >> $POST_FQN
echo "---" >> $POST_FQN

echo "$LINK" >> $POST_FQN
echo "" >> $POST_FQN
echo "$QUOTEDTEXT" >> $POST_FQN
echo "" >> $POST_FQN

echo $POST_FQN

/usr/bin/open $POST_FQN

That first line is pretty ugly. I don’t recall when I wrote this, but it’s been working reliably for long enough that I don’t feel the need to change it just yet. Then again, a shell script that calls AppleScript that calls JavaScript seems pretty ridiculous.

This script looks at the current web page in Safari and grabs the title, URL, and any selected text and builds a new post in the format my site builder script expects. Similar to my previous New Post script, this one opens the new file in MacVim, ready for writing.

I call the script from Quicksilver using the Run… command, and tied the command to ^⎇ ⌘ P for a hotkey.

I might start putting more links on the site. There are often things that I find might be interesting to a certain segment of the Mac community, mainly the more technical and scientific groups, that I haven’t done anything significant with. I’d like to change that.


Starting a New Post With Automator

July 23, 2015

Automator is one of my favorite tools on the Mac, and unfortunately one of the most unappreciated. I have several workflows and services that I’ve built up over the years, things that I could have turned to a third-party tool like Keyboard Maestro, Alfred, or even my beloved Quicksilver for, but I like the simplicity of using a built-in application.

My “New Post” workflow is a simple example of using Automator to mix GUI elements with a shell script. There are only two actions. The first uses the “Ask for Text” action to prompt for a post title, and the second uses the “Run Shell Script” action to run this bit of bash:

NAME=`echo $* | sed s/\ /_/g`
POSTNAME=`date "+%Y-%m-%d"-$NAME`
POST_FQN=~/Public/Site/_posts/$POSTNAME.markdown
POST_DATE=`date "+%Y-%m-%d %H:%M:%S"`
touch $POST_FQN

echo "---" >>$POST_FQN
echo "title: $*" >> $POST_FQN
echo "date: $POST_DATE" >> $POST_FQN
echo "tags: " >> $POST_FQN
echo "---" >> $POST_FQN


/usr/bin/open $POST_FQN

The first line removes spaces from the title passed to it from the Ask for Text action and replaces them with underscores so I can use the title as the URL slug. The second line adds the creation date1 to the file name, and the third creates a full path to the file. The fourth line simply creates an empty file with the correct naming scheme for my site generator tool.

The collection of echo statements on the next few lines add YAML frontmatter to the post, a bit of residual formatting from the sites Jekyll roots. Finally, I use the Mac’s open command to start my favorite text editor, normally MacVim, and start writing.

Using Automator can be frustrating at times, especially when there is no action for something you think there should be an action for, but for manipulating text and mixing in scripting, it’s not bad.

  1. With apologies to Matt Gemmell. I’ve not yet committed to removing the ugly cruft from my URLs. 


A Runner

July 17, 2015

My workout this morning called for five miles. Run two, walk one, run the last two. I think in the Fall or Spring it would have been fairly easy, but today, in the July heat and humidity, every step felt like dragging a pair of anchors. My muscles gave out sooner, my breath ran out faster… it was a hard workout. I finished it though, because what I’ve learned is that even when it’s hard, even when you are having a tough time and not going as fast as you’d like, you always have to finish.

I never imagined myself as a runner. I certainly don’t look like one. Before I started this friends of mine would talk about running marathons and half-marathons I’d look at them in wonder and think how I’d never be able to do something like that. Now I’ve run two 5ks, one 10k, and I’m scheduled to run another 5 and another 10 in the next few weeks. I get up at five almost every morning during the week and run, and normally have another long run on Saturday. I think after a few years of this I’m finally comfortable enough to say I’ve become a runner. Today, even though I’m not ready to say I’m training for a marathon, the possibility is there, for the first time in my life.

I’m not sure this would have happened without my iPhone. Every morning I strap it on my arm, launch the Nike+ app, start a podcast in Overcast in the background, and start the day. Before I used Nike+ I used the excellent Couch to 5k app, which gently took me through getting off my lazy butt and pounding the pavement. The most important thing I took away from that app was the routine. Once I ran the 5k I didn’t want to stop, so I switched to another app and a longer goal and kept going.

Running is my time. It’s what I do for myself, it’s how I make sure that the day is started right. It’s how I can put my busy mind to rest. It’s how I can balance staring into a computer screen all day solving puzzles with my concept of who I am and who I should be. Running is hard, running hurts, running is difficult and uncomfortable, running is calming, running is meditation.

I run in the heat and humidity. I run in the rain. I run in the freezing, bitter cold of winter. I run in the dark. I run before daybreak and I watch the sunrise over a pond along my route. I run with my dog. I run alone. I run in new shoes that give me blisters on my heels. I run when it hurts. I run when the weather is crisp and cool, and I’ve got all the energy in the world, and my legs forget their burden and carry me for miles and I feel like I could run around the world.

I’m a runner.