A Remaining Problem with Title-less Posts

When showing title-less posts in the archives, I would prefer to show the first few words of the post rather than nothing. Is there an easy way to do that?

UPDATE 2018-07-15: I ended up making a child theme and hooking into the simple-yearly-archive plugin, which I’m using for the archives page.

The only catch is that the plugin doesn’t include the post content column in the query so I had to edit the actual plugin query to include the column and also pass the entire $post object in the sya_the_title hook. I’ll have to watch out for updates, as they’ll overwrite this. Or I’ll just need to fork it.

add_filter( 'sya_the_title', 'my_sya_filter_title', 10, 2 );

function my_sya_filter_title( $title, $post ) {
	return $title == '' ? jab_truncate(strip_tags($post->post_content)) : $title;
}



function jab_truncate($string,$length=50,$append="…") {
  $string = trim($string);

  // break at word
  if(strlen($string) > $length) {
    $string = wordwrap($string, $length);
    $string = explode("\n", $string, 2);
    $string = $string[0] . $append;
  }

  return $string;
}

It makes me so happy to have found my first computer. It’s a TRS-80 Pocket Computer PC-1 from 1980. I spent many, many hours making tiny programs with it.

There goes Facebook

Delete Facebook

I finally, officially deleted my Facebook account today. No need to make a big deal about it. We all know by now that getting away from Facebook is the right move. My account has been deactivated for months, but today felt like a fine day to be done with it for good. It is, after all, “Independence Day” 🙂

I just wanted to write it down.

Contention on micro.blog

Chip and Dale

Conversations on Micro.blog have been getting a bit feisty lately. I like this, as for a while things were maybe just a tiny bit too nice. Difficult topics tended to be silently stepped around, which could make for a bit of a Chip and Dale vibe. Nothing wrong with politeness of course. Micro.blog has been a welcome reprieve from the toxic awfulness that Twitter tends to generate. Still, this newfound friendly contentiousness has added a bit of spark to the place and it’s been fun.

People are posting and discussing things that are Capital-I Important to them. This brings out new levels of enthusiasm. It also brings out rebuttals and countering viewpoints. These are all good things.

So far threads have been, while sometimes heated, relatively polite and productive. On the few occasions someone went a bit too far, there have been apologies and the conversations continued. Isn’t this how it’s supposed to work? Feels right to me.

I’ve even unfollowed someone for the first time. Not because I didn’t agree with him, but because I wasn’t interested in the topic he was so passionate about. Or at least I wasn’t interested discussing it within Micro.blog. Again, it works.

My hope is that Micro.blog’s follower-count-hiding social-network-atop-personal-blogs model is the secret sauce keeping things interesting but civil. It remains to be seen if this is sustainable with growth over time. Contention can lead to antagonistic hostility if left unchecked or in the wrong hands.

Micro.blog is my favorite place online right now and I would love to see it thrive in its own way. I’m optimistic.

My Org-mode TODO keywords are all the same length

It pleases me that all my tasks line up nicely in org-mode. I used to use keywords like “TODO”, “WAITING”, “CANCELED” etc. but that made for a jaggy, harder-to-scan list. Now I use “TODO”, “WAIT”, “CANC”, “NEXT”, and “DONE”. Aah, much prettier.

The Surface Book 2 is everything the MacBook Pro should be – Owen Williams

The Surface Book 2 is everything the MacBook Pro should be – Owen Williams:

If, like me, you’re coming from the Macbook Pro with the butterfly keyboard, I promise that typing on this thing is salve for your butterfly-keyboard wounds: it’s got a perfect amount of travel, feels comfortable to use and doesn’t sound like you’re typing on a hollow piece of wood.

Stories like this (long) one by Owen Williams have been around for years, but it sure seems like they’ve been increasing significantly in frequency. My disappointing experiences with the latest MacBook Pro do tend to pique my curiosity about the other options.

Accidentally using WordPress

For the last week or so I’ve been posting to jack.baty.net, a WordPress-managed blog. This wasn’t intentional. I’m supposed to be putting everything on baty.net, which is statically rendered (by Hugo).

I guess I haven’t felt like “writing a blog post”. Instead I felt like posting stuff. WordPress makes everything so easy. Maybe too easy.

I keep threatening to consolidate everything on baty.net but I’m realizing it may never happen. I’ve got baty.net for when I’m slow and serious, and this blog for when I just want to post something.

Emacs from scratch – Huy Tran

Huy Tran

Spacemacs is the first Emacs version I used, so I’m kind of attached to the evil-mode and SPC mnemonic key binding.But I always have a feeling that something is not right, Spacemacs hides a lot of things under the hood, and it loads a lot of stuff that I do not need during the startup.

This is so tempting.

n-gate’s “Webshit Weekly” is one way to keep up on tech news

n-gate.com,s Webshit weekly.:

Some DIY electronics-repair people write a hit piece about a company that makes difficult-to-repair products. Hackernews can no longer ignore the fact that their favorite computer manufacturer hasn’t manufactured a useful computer in several years, and spends yet another afternoon mourning the death of the person who made the trains run on time. In the end, the consensus is that they’ll only spend a few thousand more dollars on this shit, and if it doesn’t get better, they’ll go buy Macbook clones from Dell instead.

When I’m in the mood for I’m-better-and-smarter-than-you meta-snark, I can always rely on n-gate.

Xah Lee on Frames vs. Window in Emacs – Irreal

Xah Lee on Frames vs. Window in Emacs – Irreal:

Lee’s argument, as I understand it, is that switching between windows in a single frame is suboptimal because various Emacs operations will destroy your windows configuration and using something like winner-mode to restore your window configuration is too much trouble.

I’ve been using a single maximized frame, split into several windows, and I’m frequently frustrated when I trigger some action which fouls up my carefully constructed layout. I’ve tried “layouts” and “winner-mode” and still never feel like I can predict window behavior. Lee’s suggestion to use two frames, side-by-side, has greatly improved the way I feel using Emacs. He’s right, it’s better this way.

Airbnb and React Native Expectations – Ash Furrow

Ash Furrow:

The reasons that Airbnb chose to move away from React Native are cultural as much as they are technical, and while I understand why they didn’t publicize these tensions, it gives the impression that Airbnb’s decision was based entirely in technical merit. And that’s just not the case.

I love reading about people’s decisions when it comes to technology choices. And also the reactions to those decisions.

Why I miss title bars

Here’s how windows used to look. Guess where you click to drag the window:

That’s right! Now, guess where you click to drag this window currently open on my desktop:

Requires a lot of dexterity, but you’re correct. Now how about this one:

I just skipped to the chase with this one. I love Standard Notes so I’m not picking on them, but I would love to always have a consistent, obvious, uncluttered title bar that I can use to drag windows around in any app at any time.

 

 

One side effect of using titles on “micro” posts

Blog posts with a title are not displayed in full on the micro.blog feed. Micro.blog will only show the title and a link to the post.

I love the interaction that takes place on Micro.blog and worry that if only links to my short posts show there, people won’t bother to click through and the conversations won’t happen. And, if they do click through, it won’t be worth it just for a 240-character snippet I just fired off without much thought. I don’t want to waste people’s time that way.

On the other hand, looking at my blog from more than a decade ago reminded me that I like titles. Even on short posts. This means that I can either blog the way I want to blog and potentially miss out on some fun discussions. Or, I can twist things so that they are rendered more optimally on micro.blog.

I’ve decided I should just blog how I want to blog. Micro.blog is awesome (I love you all), but it’s better as an adjunct to my blog and not the other way around.

Hope that’s ok.