jb… a weblog by Jonathan Buys

Paragraphs

March 28, 2013

Alt Text

In the back of my mind, I always knew that the name “Scout” made no sense. I like the name, I like the bit of a kick the “Sc” at the start of it makes, and the snappy end with the “t”. It sounds good, but there is no correlation between what this application does, and what it was named.

Scout is now Paragraphs.

paragraph ˈparəˌgraf

noun

a distinct section of a piece of writing, usually dealing with a single theme and indicated by a new line, indentation, or numbering.

verb [ with obj. ]

arrange (a piece of writing) in paragraphs.

And, as you can see by the image above, we now have a snazzy new icon. I spent a long time thinking about the name and icon, and how they related to the function of the app. I commissioned two icons to be created. The first one was intended to look at home in the dock, and mimicked the “chrome circle with something inside of it” look

Alt Text

It’s a fine looking icon, and I might find some use for it eventually, but I think it accomplished it’s goal of “fitting in” a bit too well. To me, it looks bland, without character. For days after receiving the final icon I racked my brain about what to do. I even got out Photoshop and tried to edit it myself, to no avail. Then I remembered Shawn Blanc’s article about his grandfathers Royal Quiet De Luxe typewriter, and the pieces started to fall into place.

In addition to the name and icon of Paragraphs (I’m still having trouble not calling it Scout), I’ve squashed a ton of bugs, and added a few niceties. If you highlight a word and press Command-I, the word will be surrounded by asterisks, Markdown syntax for italics. Similarly, pressing Command-B will surround the word with two asterisks, Markdown for bold. Finally, highlighting a word, while you have a link on the clipboard (meaning you just copied a link from Safari or another browser), and pressing Command-L will format the highlighted word as a Markdown link. It’s pretty snazzy if I do say so myself.

I’ve put a lot of work lately into the animations, trying to make them as smooth as possible. There is still work to do there, but I think we are miles ahead of where we started. I also have a new theme that will ship with Scout, thanks to Kev Rodgers. Now Paragraphs will have the Default theme, a minimal CSS “Plain” theme, and Kev’s “Fresh Install” theme, which also looks quite nice. I hope to add many more in the future. RSS feed is fixed again, and I’ve put a lot of additional checks into the site parsing code to ensure that Paragraphs can continue running if it can’t build the site for some reason, testing that strings are valid, not null, and not empty, before using for example.

I got word today that the DUNS number for Farmdog Co. has been approved, and will be available to use in two weeks. So, barring any unforeseen disasters, we should be looking at a product launch within the next month. However, I’ve read that you should never pre-announce shipping dates, so take that with a very large grain of salt.


Scout Beta 2

March 20, 2013

So, quite a bit has changed in the past week or so. I got a lot of great feedback from a few beta testers, and stomped out a few bugs. A bigger deal though came from a couple of people who noted that they got confused in some of the views on how they were meant to proceed. Confusing the customer is absolutely the last thing I want to do with Scout, so I took off my developer hat and put on my HCI hat and tore Scout apart.

Scout now has a proper preferences window, just like every other Mac app. It comes up by hitting Command-Comma, goes away by hitting escape. Similarly, both the media manager and the theme chooser are in panels, keeping the main text editor view clean, and much less confusing about which view you are in, and how to get back to where you want to be. I’ve added a toolbar to the top of Scout, with a pair of buttons to switch between the text editor and the web preview. The other two buttons on the toolbar are to add a new post, and to show and hide the library of previous posts.

Alt Text

I’ve cleaned up the library view quite a bit too, and a added search field to the top which should come up with focus when you open the library. The search field searches both the title and the text of every post, so it should be able to find what you are looking for. The blue background was removed, and replaced by subtle dotted lines separating the posts on a white background.

I’ve also tweaked the image preview that comes up when you click an image link. The image is bigger now, and the background is more of a smokey white instead of the black it was before. I think this change makes the image more viewable, and makes the background fade out better, drawing attention to the image and away from itself.

Alt Text

I’ve fixed a few things about the default text editor theme that bothered me (and John), making it easier to read and overall more pleasant, at least I think so. It looks especially good full screen. In fact, my opinion is that the full screen view is the best way to use Scout.

Finally, I’ve made a few tweaks to the data storage engine, fixing a bug that prevented publishing a site on the first run. Funny story about that. Last week I became a bit overconfident in Scout, and sent out invitations to try it to a group of well known writers that I respect. One of whom replied that he had downloaded and tried Scout, found a laundry list of things wrong with it, tried to publish to a folder, and Scout crashed. I was mortified. Turned out to be a stupid change that I had made, and obviously not tested thoroughly enough, right before sending out the application. I put the publishing code on a background thread to continue user interface responsiveness while Scout wrote out the files. Turns Out, that’s not a good thing. However, what crashed the app on the background thread merely caused an error that Scout recovered from on the main thread, so finding the crash actually allowed me to find and fix a major bug. I just wish I had found it before sending it out.

Live and learn. Test harder next time.

With all of that being said, I really think that Scout is in much better condition now than it was a week ago. I’m excited.


Updates on Farmdog, Scout, and Go2

March 17, 2013

Last week I sent in the certificate of organization to recreate Farmdog as an LLC in the state of Iowa. I have the domain name, twitter account, and a test site built. Assuming everything goes through with the state without problem, Farmdog Co. will be ready to launch very soon.

Scout has a couple of rough edges to clean up before shipping, I need to finish the help doc for it, and fix a couple of odd user interface inconsistencies. But, for the most part, I think Scout is ready to ship. Narrowing the scope and number of features slotted for 1.0 was a big help. I’m planning on selling Scout through the Mac App Store, as well as on Farmdog.co using Fastspring. So, I still have some work to do on Sandboxing, as well as license keys and trial limitations. Probably a few days work to get all of that integrated and tested.

Which brings us to Go2, my professional bookmarking app. I’m rewriting Go2 from the ground up, and I’m pretty happy with how it is coming so far.

Alt Text

When the Mac App Store launched, Go2 was there on day one. It sold well the first month, but was downhill from there. Previously, Go2 had a bit of an identity crisis as it tried to find it’s place. Was it a general bookmarking app like Delicious or Pinboard? Was it a replacement for Command-K in the Finder? When customers downloaded Go2, what were they expecting? As time went on and as I talked to other Go2 users, it became clear that they were using it similarly to how I use it, as a professional bookmarking tool for quick access to servers over SSH, FTP, or as web pages. So, the newest version of Go2 builds on these strengths, and makes it even easier to get to where you want to go. Here’s a quick rundown of new features:

  • Importing the SSH known_hosts file.
  • Search field in the status bar now launches the first bookmark when the user hits the return key.
  • When you down arrow out of the search field, you can now use the forward slash key to return to the search field.
  • Overall improved look and feel

Also, interactions with Go2 are normally through opening bookmarks. So, the main interface is now in the status bar, and new bookmarks will be added through the preferences pane.

Finally, I’ve abandoned core data as the storage engine for Go2, and am in the process of moving the plain text storage engine I wrote for Scout into Go2. Hopefully, this means that upgrades will be easier, and I should, finally, be able to sync through Dropbox or some other file syncing technology. This should make it easier for teams to use Go2 as their central source of truth for network servers.

Like I said, I’m excited about relaunching Farmdog. I’ve learned a lot over the years, and I can’t wait to get rolling.


More Scout Tips

March 13, 2013

Eventually I’m going to need to compile this into a proper help doc, but for now, documenting Scout with Scout will do.

Scout handles pages just a little differently than posts. New pages do not show up on the home page, and are not organized into subfolders based on date. Pages are converted into HTML and saved in the root of the site directory, right next to index.html. To create a page, add a new post, but before the title of the page add the characters @@ . That is two “at” symbols followed by a space. For example: @@ Contact.

Secondly, the default theme that ships with Scout, the theme of this site, is my own creation that I’ve cobbled together over the past few years. What I hope to see are a few people more talented than I create some really great themes. In fact, assuming Scout is successful, I plan on hiring a designer to do just that. However, there are a number of hurdles to overcome before that happens.

To create a Scout theme, create a folder with the following files inside:

  • atom.xml
  • atomTemplate.xml
    • The two xml files are for creating the site RSS feed.
  • base.css
    • Should contain all of the site CSS
  • default.html
    • The standard HTML template for the site.
  • indexTemplate.html
    • Wraps each post in a div with an id of “posts”.
  • post.html
    • Creates the page template for each post
  • robots.txt
    • Not currently used, but probably should be.
  • screenshot.png
    • A nice screenshot of the post at 400x341 pixels.
  • toc.html
    • The template for building the archive or table of contents.

Scattered throughout the files listed above are strings that look like: YYYY_SCOUT_SOMETHING_YYYY. These are the Scout “Y Codes”, as in, “why are they so ugly?” I was looking for something that was unlikely to be reproduced anywhere else, and this was the first thing that came to mind. I currently have the following Y codes defined:

  • SCOUT_5ATOMPOSTS
  • SCOUT_AUTHOR
  • SCOUT_CONTENT
  • SCOUT_CSS
  • SCOUT_CURRENTDATE
  • SCOUT_CURRENTYEAR
  • SCOUT_POST_CONTENT
  • SCOUT_POST_DATE
  • SCOUT_POST_TITLE
  • SCOUT_POST_URL
  • SCOUT_SUBTITLE
  • SCOUT_TITLE
  • SCOUT_URL

Hopefully, the titles of the codes are self-explanitory, but as I have time I will be documenting them properly. For now, you can probably take a look at how the files in default.stemplate are arranged. Scout looks for these codes in the template and replaces them with the proper data from the posts to generate the site.

Lastly, you should never feel like you need to save your work in Scout. Scout automatically saves your work at various intervals. For example, whenever Scout looses focus as the main window, or whenever a new post is chosen, or when a new view is looked at, Scout automatically saves the current post as a plain text markdown file saved in ~/Library/Application Support/Scout/Posts/. If you like you can watch the file being written to in the finder or as you use the application. Likewise, if you have a markdown file that you would like Scout to know about, you simply need to name it according to the naming convention of YYYY-MM-DD-HH-MM-SSSS##Title_Of_Post.markdown and drop it into this directory. Next time Scout is restarted it will treat this file as its own.

Scout is intended to give you control over what you write without getting in your way about it. I know there are going to be some rough edges, but as we progress I’m sure they’ll get worked out.


Beta Testing Scout

March 12, 2013

Well, as much as I’d love to procrastinate for the rest of eternity, the time has come for Scout to take it’s first baby steps out of it’s private testing ground and out to a few interested folks who would be brave enough to beta test.

Alt Text

I’m honestly very happy with how Scout is turning out so far. It seems very stable, and now that I’ve worked out a few annoying bugs it is as easy to use as I’d hoped. Here is a quick rundown of supported features:

  • Markdown Editing - Scout is built for Markdown.
  • Post Previews - The post is rendered into the chosen theme, so what you see in the preview should be exactly what you see when published online.
  • Media Manager - A nice grid of the pictures Scout knows about.
  • In-line Image Preview - Speaking of images Scout knows about, dragging and dropping an image onto the text editor will create the markdown code for inserting the image in the post, and clicking on the text will show a pop-up preview of the image.
  • Themes - Scout supports a very easy theming model that I’m hoping will attract web designers.
  • Text Editor Themes - A few nice built-in themes. I generally use Solarized Light.
  • A Very Nice Full Screen Editor - Where I spend all my time in Scout.

Since I’m shooting for 1.0 here, there are a couple of features that I’ve intentionally left out because they were simply not there yet.

For one, no syncing support just yet. I have the inner structure to support syncing over Dropbox, or any other form of file syncing, but in practice it is a bit janky, so it will not be supported in 1.0.

Secondly, Scout will only publish to a folder on your hard drive. It will not publish to the web. I’m working on integration with Site44, but as with syncing support, it’s just not quite polished enough to include in the 1.0. With that being said, I’m hosting this site with Scout and Site44, I just choose the Site44 folder with the publish file picker. Works well, but could be smoother. Maybe that’s a 1.1 or 1.2 enhancement.

Anyway, I would be grateful if you would beta test Scout for me. If you are interested, drop me a line on twitter. I’ll get right back to you.


Real Music

February 1, 2013

My grandparents house was outside of town, at the foot of the mountains, surrounded by woods. Papa kept his guitar in a black case under his bed, along with his violin. Sometimes, after dinner, if we grandkids begged and pleaded enough, Papa would get his old guitar out and play us a few tunes. They were simple folk songs, sang without any of the southern drawl common in country music. One I remember the most was about his mama sending him to town to buy a chocolate ice cream cone. The little house would spring to life those nights, we would be warm from the fire, and full from Grandma’s cooking, and listen to the simplest, most honest music I have ever heard.

Papa tried to teach me how to play, and I think if I had not been so young and stubborn I would have listened to him. He would tell me where to put my fingers, I would get it wrong, and he would grab my fingers and try to put them where they were supposed to go. It didn’t work out, and so far I have only learned a few basic chords. Right now my guitar sits in the corner of my office, staring blankly at me through it’s black case, waiting for me to bring it to life.

Sometimes a friend will come over who knows how to play, and I’m always amazed at how he can call such beautiful music from the strings of the guitar that I can only coax out a basic tune from. Years ago this friend and few other sailors who shared a place in Virgina would get together to write, play, and even try to sing. For now, learning to play guitar is still on my to-do list, but appreciating honest music has always been close to my heart.

The other day I was helping my daughter do the dishes, and we were taking turns picking songs to listen to while we washed. She would pick out one pop song after another, and as she did I realized that pop music hasn’t changed in at least twenty years. It is still as synthetic and manufactured as ever, pandering to the lowest common denominator. I struggled to find something that we could both enjoy, but almost every song I chose was coldly marked as “weird”.

She has a point, a lot of it is strange. Strange, and a bit raw, unprocessed, analog. I have, so far, 22 albums of the Grateful Dead, most of them live bootlegs from the seventies. There is something about the energy of the live shows, how I can close my eyes and almost be there. Sometimes you can hear the crowd yelling out asking for a song, the Dead hear it and when they start playing you can feel the energy spread through the crowd like wildfire, the beat of the drums matched by clapping hands. There was nothing scripted about these old shows, the Dead would just get up there and start playing.

This is real music, a person and an instrument coming together to create something beautiful. From Papa’s strumming to the Dead’s wall of sound, there runs in my musical preferences a common thread of musicianship, of jamming for the love of the song. I was browsing through the Archive’s library of Grateful Dead shows the other day when I saw mention of a Grateful Dead cover contest. That mention led me to YouTube, where I found one of the best covers of one of my favorite Dead songs:

The Giving Tree Band had me captivated as soon as I heard the violin, but when the steel guitar and the piano started, I was there. It’s not just the song, although it is a fantastic song, and it is not just that they have these instruments, the band appeals to me because it sounds sincere. It is hard (for me at least) to explain the difference in this recording and any other, but I think it has a lot to do with the lack of post processing. I believe I’m hearing the musicians real voice, not a digitized representation of it that’s been leveled and artificially harmonized. I’m hearing the banjo, and the electric guitar as the musicians intend their instruments to be heard.

I love music, even if I would sometimes rather drive in silence. I like to listen to music that relates to me, that’s played by people who might just drop by for a cup of coffee to catch up on old times. Music that makes me feel at home. Music that reminds me of the smell of burning pine, the taste of pumpkin pie fresh on my lips, the sound of Papa’s guitar, and knowing deep in your heart that you are warm, safe, and loved.


Paperman

January 31, 2013

Just beautiful.


Electrogent's 50 Rules

January 30, 2013

One of my favorite things about the Internet is finding a little treasure trove of writing and style that I previously did not know existed. Electrogent is one of those little gems, and his list of 50 rules for his son is full of timeless advice.

Thanks to science, we have all sorts of polymers, synthetics, polyesters, crystalline, and other man-made materials for making life a little better. However, few materials are as awesome, timeless, and useful as leather.

Travel the world… but then come home. Your mother misses you.

You should strive to become an expert in everything like Galileo. The old adage “shoot for the moon and even if you miss you’re still among the stars” applies here. Even if you try and fail to become a great master in all fields of study, you will still attain great knowledge across many disciplines and become a well-rounded person. Even though failing is sometimes necessary, there is basically no way to fail in this pursuit because anything you learn is a success in itself.

Life is meant to be a quest of continuous self-improvement, becoming a little better every day. Electrogent gets it.

Don’t miss his fantastic gallery.


Details

January 29, 2013

Thought of the week:

I don’t like this “top ten” business. It’s the bottom ten that I like. I think you’ve got to go for the little things, the stones that make up the wall.

– Donald Knuth


Vim Power

January 28, 2013

vim_iconNo server, desktop, or laptop install is complete without Vim, and yet, there are times when I still see questions pop up on IRC about how to do basic editing of config files with vi. I remember, years ago, asking some of the same questions of an older Unix guru, and asking why I should bother learning such an eccentric and “outdated” text editor. His answer has stuck with me, he said “Because it is the only text editor guaranteed to be on every server, and some day you will need it, and have no other alternatives.” Vim, short for “vi improved” is ubiquitous, but it is also so much more, and the time you spend learning it will be repaid to you tenfold in productivity.

Vim is designed to be run from the command line, without a mouse. To get around in a file, Vim uses three different “modes”, where the same keys might do very different things, depending on which mode you are in. From my experience, this is the biggest obstacle of learning Vim, wrapping your head around what mode you are in, and how to navigate the text.

When you first launch Vim, you are in normal mode. Normal mode does not allow you to edit the text directly, but allows you to move the cursor around the text using the keyboard. The basics of what you need to know are:

  • j - Move the cursor down one line
  • k - Move the cursor up one line
  • l - Move the cursor to the right one character
  • h - Move the cursor to the left one character

Once you have the cursor where you want it, you can press “i” to enter the next mode, “insert”. Insert mode behaves more like other text editors, where the keys you press show up as text characters in the file. When you are done editing, you return to normal mode by pressing “Esc”. This is a good start for getting used to how Vim works, and over time, those keys will become ingrained as muscle memory, you might find yourself inadvertently reaching for the escape key after typing in a web form.

Moving around one line or one character at a time is fine, but time consuming. What if you would like to move the cursor down five lines? In that case, you would enter “5j” in normal mode. What if you know exactly what line number you would like to jump to, say line 42? Enter “42G” in normal mode, and you will jump down to that line. Or, if you would like to jump straight to the end of the document, you could just enter “G” by itself. I do this quite a bit, jumping between “1G”, the first line of the document, and “G”, the last. If you would like to move 10 characters forward, you would enter “10l” in normal mode. Same to move back, “10h”

What if you just moved down ten lines, and would like to move down another ten lines? You could enter “10j” again, but it would be faster to use another Vim shortcut, the humble period. Hitting “.” in normal mode repeats the previous command. So, whatever you did last, hitting “.” will tell Vim to do it again.

Hitting “i” in insert mode will allow you to start inserting text, however, there are a few other options as well.

  • a - Append, or, start adding text right after where the cursor is
  • o - Create a blank line on the line below the cursor, move the cursor to this line, and enter insert mode.
  • O - Same as above, but the new line goes above the cursor, not below

Once you have the basics of when and how to insert text, moving around the text becomes more important. Luckily, Vim knows text well, and has a few tricks here as well.

  • w - Move the cursor ahead one word
  • b - Move the cursor back one word
  • ( - Move the cursor back one sentence
  • ) - Move the cursor forward one sentence

What about copy and paste? Vim has that covered as well, but instead of “copying” text, you “yank” text with the “y” command. To yank the current line, which means to copy the current line, you press “yy”. To paste the line, move the cursor to where you would like it and press “p” in normal mode.

So, now that you can fly around your text with ease, and insert new text at will, what are you going to do about the plethora of typos? A few more normal mode commands to commit to memory are:

  • d - Delete one character, word, sentence, or the entire file if you like
  • r - Replace one character
  • R - Replace all the characters till you hit escape, just write right over them

To use the delete command, you can either place the cursor over the text you would like to delete and press “d”, or you position the cursor at the beginning of a string of characters you would like to delete, for example, to delete one word, you press “dw”. To delete five words, you press “5dw”. To delete a sentence , you press “d)”. To delete the entire file, you could jump to the beginning of the file: “1G”, and delete to the end: “dG”.

And if you make a mistake? No problem, Vim keeps a detailed record so you can undo the last command with “u” in normal mode.

So, you can jump around the file, insert text, and delete text. How do you save the text? To do this, we need to enter a third mode, command mode. To enter command mode, you must first be in normal mode, and then press “:”. You should see the cursor move to the very bottom of the window next to a colon, waiting for you. To save the file in the current working directory, you would enter:

:w FileName.txt

If your file already has a name, then simply entering “:w” will work.

That’s most of what you need to know to become proficient with Vim, but of course, there is so much more. I’ve barely scratched the surface of what Vim can do on its own, not to mention Vim’s vibrant community of users and developers who have extended Vim through plugins. It is through the plugins that some real magic can start happening. However, to avoid asking on IRC how to edit a text file, this should have you covered. Finally, when you are finished editing, jump into command mode and enter “wq!”.