Hardscrabble 🍫

By Max Jacobson

People only use RSS when they don't know they're using it so maybe the 'sub box' is its future

17 Jul 2012

Google owns,

  • Google Reader
  • YouTube, which has a “sub box” for subscribing to Channels

Nerds use the first one and regular people use the second one. Maybe they can like … merge them?

The easiest way to indent paragraphs online, not that you necessarily should

21 Mar 2012

Today I read DC Pierson’s recent essay Writing About 2Pac In Los Angeles, A Place It Turns Out He Isn’t From and even though I liked reading it a lot, the main thing I’ve been thinking about since has nothing to do with hip-hop or Los Angeles or writing. It’s this: why did he indent his paragraphs?

If this essay were printed in a book, I wouldn’t have blinked. That’s normal. But indented paragraphs online are somewhat unusual. Maybe the key to it is this line from the essay:

I wonder if Hampton will read what I end up writing and make fun of me, the way I imagine most comics will when they discover that I write earnest-ish prose stuff, in particular, douchey prose stuff about writing about music.

My feeling is this: prose needs not be indented, but earnest-ish prose stuff does. Or that’s how it feels anyway. In the past I’ve written short stories, put them on a blog, and felt like they looked wrong. That’s not a blog! I’d think. It’s a heart-breaking story, it should be indented!

And, maybe. More on that later.

First, let’s delve into the nitty gritty of formatting for the web. Let’s look at the beginning of one of Pierson’s paragraphs, in HTML, to see how he accomplished indentation:

<p class="body1"><span>            </span>Then I moved[...]</p>

Basically, he inserted a bunch of spaces at the beginning of each paragraph. I think a lot of people do it this way. I don’t know if this is “wrong” so much as… I think there’s a better way. I’m no expert but here’s my take on the best way to format indented paragraphs online.

Basically, just add this code anywhere in your post:

<style>p+p { text-indent: 2em; margin-top: -1em; }</style>

The text-indent: 2em part will indent the first line of each non-first paragraph by two ems. An em is basically whatever size the text is. 2em seemed right to me. Popcorn Fiction uses 3em. You can adjust that figure or replace it with 25px or whatever you want.

I just learned that p+p trick today. In the past I’ve just used p for paragraph, but this way the style will only apply to paragraphs that directly follow another paragraph. That’s good because indentations are usually omitted in the first paragraph. If you’d like the style to apply to every paragraph, replace p+p with just p.

The margin-top: -1em part will decrease the spacing between paragraphs a little. Now that paragraphs are being indented, we don’t need spacing to identify a new paragraph as much.

This will affect the whole page, not just your post, so be careful. If you put this in a Tumblr post, for example, you’ll find that every post on your homepage is now affected. To avoid this, put the code “after the jump” with the Read More button code, <!-- more -->.

The advantage is that you don’t need to worry about HTML or anything. Just write your thing then put the one line of CSS in there, and it’ll look good.

(If you’d like to see what this looks like, check out this old short story of mine. This had no indentation yesterday but I just added it all with one line of code.)

If you’re not comfortable with HTML, I’d recommend writing in Markdown using something like Mou (Mac), Dillinger (web), or MarkdownPad (Windows) to preview or generate clean HTML for you. For this blog I write everything in Markdown and almost never see the HTML.

Both Tumblr and Calepin allow you to write in Markdown without ever seeing HTML. Check the Tumblr Preferences to flip that switch. Highly recommended.


So it’s possible to do it and pretty painless to implement. But I’ll ask this question next: why bother? Don’t indented paragraphs look a little weird on the web? A little out of place? I think so. The web has so trained my perception of this that I sort of wonder why books have indented paragraphs now. Hmm. If paragraphs were spaced out, books would be longer. I wonder by how much.

Here’s some quick math:

  • My copy of A Feast for Crows is 976 pages
  • There are 34 lines per page
  • There are an average of 7.8 paragraphs per page (from a random sampling of ten pages)
  • There are approximately 7,612.8 paragraphs in the book (976 pages * 7.8 paragraphs per page)
  • That’s an additional 7,612.8 new lines to the book if we spaced out the paragraphs with one extra line worth of spacing
  • That’s an approximate additional 223.9 pages (7,612.8 lines / 34 lines per page)

So that’s a significant amount of paper. Foregoing indentations would save some pages but I don’t think it would nearly balance out. Indentations are much more compact than spacing.

Okay, so indentations are greener, but that’s not something we really have to worry about on the web. Maybe it looks better or is easier to read. I don’t know. I only like it when writers take the care to format their work in the way that best expresses themselves. So go for it if you want.

On June 4th, 2011, someone named TigerCrane asked the internet “When and why did we stop indenting paragraphs?”

I particularly like this response by Sys Rq:

I haven’t seen a not-indented paragraph in a while, outside of situations like this online one where it’s basically impossible.

Where are you seeing them?

There are some other great theories there as well.


Let’s take a look at some publications.

Publication Indents on screens Indents in print
Most blogs No N/A
Most magazines I don’t know Yes
The New York Times No Yes
The New Yorker No Yes
Popcorn Fiction Yes N/A
Kindle eBooks Yes (by default) N/A
Apple iBooks Yes (by default) N/A
Instapaper No N/A

I find it very curious that the eBooks are styled like print books when they don’t need to be. I suspect it’s a matter of familiarity and comfort.

There’s one, possibly dire consequence of replacing indentations with spacing in long form writing. These pieces are broken up into units of discourse. The novel is made up of two parts, maybe, and those parts are made up of chapters, and those chapters are made up of sections, which are made up of paragraphs, which are made up of sentences, which are made up of words.

If a writer chooses to use spacing to separate paragraphs, how does she separate sections? I’m talking about those parts where the action stops, there’s a rare space between paragraphs, and then action resumes. Maybe it’s a good moment to walk the dog. If all paragraphs are spaced out, that break won’t stand out.

I solve that problem with horizontal rules now. I think it works okay. It looks a little something like this in Markdown:

# The Book

## Chapter one

Some stuff.

* * *

Some more stuff.

## Chapter two

The thrilling conclusion. What a short book.

And you can style the <hr /> (horizontal rule) to look however you want, including being invisible. Here’s what mine looks like on this site:


So anyway I generally avoid indenting text online. I think the urge is mostly to do with wanting to put on book airs. But I’m not writing a book, even if I’m writing a novel. I’m writing a web page.

Introducing myself to the command line

26 Feb 2012

I never really understood how to use the command line. I kind of got it in principle but not in practice.

So I taught myself the basics by reading this mini- book on Learn Code The Hard Way. It’s awesome. The book is an alpha release and may have some errors but I didn’t spot any. Would I, though?

Here are my thoughts and notes I jotted down while learning this. It’s fairly stream of conscious and certainly less accurate or helpful than the aforelinked mini-book. If you’d like to learn it along with me, maybe this could possibly be useful to you. It’s a little different on a Windows computer, but if you’re on a Mac or Linux computer, this should all work for you too.


I wonder how much stuff I’m gonna have to memorize.

I’m in the terminal! I’m in Terminal!

I’m learning bash. Apparently my nerd friends will tell me to learn zsh instead. I wonder if my actual nerd friends would.

Ok I think I get the whole cd and .. thing. If you’re in a directory you can cd into any subdirectory or cd .. to go back one. From the downloads directory I can cd ../documents to get to the documents folder. That goes up one and then back down into another.

I wonder if up and down are the right words to use there. In the Finder I think of it more as left and right, in the column view.

So far basically all I’m doing is making folders and moving through them. Loving it.

Whoa, I just deleted john! john was a directory I made. rmdir john is deadly.

At this point, the guide is saying if I want to I can take a break and come back tomorrow. It thinks I’m weak. I can do this.

I like that I can do mkdir -p i/like/icecream and it’ll make all three of those folders from scratch.

I wonder if I rmdir i, if it’ll remove all the subfolders too. Ohh cool, it won’t let me. That’s nice.

It’s kind of weird that when I rmdir something, it doesn’t go to the trash, it’s just gone.

pushd and popd are kind of baking my noodle (as Corey likes to say (note: this used to link to a podcast, but that podcast is gone). Is this like the popping and locking of the programming world? Maybe I should take a break.

OK so you’re in a directory. You pushd to/a/folder and now you’re there, but you sort of bookmarked where you were. If you want to go back there you popd. If you push somewhere, then push somewhere else, then pushd over and over you can cycle back and forth between them. If you popd over and over you can go back through the stack (from most recent to least recent I think?) of your pushds.

I love putting things in code brackets it’s really easy in Markdown/Calepin. I might be misusing it.

Ahh and the stack isn’t hidden! That’s what’s printed/returned when you pushd. I think I’m wrapping my head around this. Not sure if I’ve explained it well or anything, though.

I’m up to chapter nine. I just made an empty text file by writing touch iamcool.txt. Hey, your words.

I just wrote touch butts.mp3 and it made a song called Butts that I’m gonna be sending out to radio stations first thing tomorrow.

Ok so if I want to make a copy of iamcool.txt called awesome.txt it’s as easy as writing cp iamcool.txt awesome.txt! Okay! (In fact I am getting tired).

I’m slowly piecing together that -r does… well, something. I don’t know. If I mkdir afolder, I can then cp -r afolder ~/Desktop to make a copy of that folder on my desktop. But to copy awesome.txt to my desktop I just write cp awesome.txt ~/Desktop. So that -r I guess makes it work for a directory.

Hmm so now I’m moving files. But it sounds like renaming to me. mv awesome.txt lame.txt will basically rename it from awesome to lame. I suppose it’s moving the data from one file to a new one? Like, when you die your soul leaves your body and enters a baby just as it’s being born? If you believe in a very literal, specific form of reincarnation?

I know how to open a file in vim, and I even know how to do some basic vim commands, but I have no idea how to save a file and exit vim.

Ok I took a break. It’s two days later from when I started this. I’m happy that I still remember the commands I’ve learned this far.

I don’t know how to delete files but I can sort of do it by renaming one file into something else that exists, and it basically disappears I think.

I can also move a file from one folder into another folder with this. mv hello.txt afolder/hello.txt moves that file into the folder (though it doesn’t create the folder). So it’s moving and renaming.

Hmm.

Okay so now I’m using the less command to view the contents of text files. it seems to work just fine. I press q to exit. If it’s a long document I can page through it with w (up) or space (down), one page-worth at a time. Got it.

I can read markdown files in the terminal pretty nicely. I’m gonna navigated to my Calepin folder and open up this draft file. cd ../Dropbox/Apps/Calepin, ls, less cli.md wow there it is! Ha! This is fun.

I just whipped up a background image for my terminal. I wish it could tile and not just stretch. Looks good as long as I don’t resize the window.

Now I’m catting things. That just sort of displays the contents of the text file in a slightly different way than less. So exciting.

Oh thank goodness rm exists. I didn’t like that other way of deleting files.

OK so I can rm hello.txt to delete it but I can’t use rm to delete a folder (that’s what rmdir is for). Oh wait, I can, I just have to do some weird business. rm -rf folder works. Yoosh how do I remember that? Wait a moment. rm -rf can delete folder even if they have stuff in them. That one ups rmdir. This is “recursive deleting”.

I like this possibly self-delusional quote from the mini-book:

Now we get to the cool part of the command line: redirection.

I kinda knew about the | but not the < or >.

Oh! This is fun.

I just had a breakthrough wherein I learned how to save and close from vim, so I’ve just been playing in that for a little while. It’s :wq! So simple!

Ok, wildcard matching… ya yah.

Ex, ls *.txt will list only the text files. that’s handy. This command surprised me: cat *.txt > bigfile.txt took all of the txt files and combined them into one new one, which it also created. Then rm *.txt removed all of the txt files. That’s vicious.

Ok so this is a fun thing. I just realized I can open tabs in the Terminal! So I’m gonna write this post in one tab and learn things in another. Whoa. Although the switch-tab shortcut is kind of unwieldy (command-shift-] or [). I can learn it.

So I can run a command like grep hello *.txt and it’ll find the string “hello” in all the txt files and then return a list of all of the lines from all of the txt files that have that string in them. Useful. And if I want, I can pipe that to less and it’ll be the same thing, but easier to flip through (with space and w).

I thought I was done when I reached the section on man, which looks up the manual for any given command, but there’s a whole nother section. Great. I can handle some more knowledge.

I’m up to chapter 21. Weeks have elapsed. I’m not sure exactly what I just did and I can only hope it wasn’t bad. one of the thrills of using the command line is that I can completely destroy my whole computer at any point by writing the wrong thing.

In this chapter I “looked at my environment” and then set a variable and then printed out the variable. But where is this variable? In my environment? I feel like I don’t want it to be there anymore but don’t know how to get it out. Environmentalism! (I actually echo‘d it, not print. For what it’s worth.)

Now it wants me to research online “how you change your PATH for your computer” and do it all in the terminal. I think I’m just gonna skip this one.

Ah! Chapter 22 to the rescue. unset will flush that variable. Cool. I’m so relieved. I wonder if I can unset something important. That would be very unpsetting.

“You have completed the crash course. At this point you should be a barely capable shell user.” – Nice. I feel that way. It feels pretty great.

The conclusion links to this official bash reference. Also this cheat sheet. Maybe I’ll tackle those next.