Archive | Tech
My Holy Grail of Content Delivery
I’ve been on a quest for a long time to figure out the best way to write and publish documents. It has been a quest that has taken me years but I finally have a system that I am extremely happy with.
What I wanted was to be able to write via Emacs (my editor of choice) and output to anything else. Want my document in HTML? You can have it that way. Want a PDF? Yes, I can. What is in Word? Though I can’t stand the application, and I don’t actually own it, yes I would like to be able to output Word docs without actually opening another application. Just writing it in Emacs, run a process on it, and the I have a Word document!
This has been nothing but a pipedream for a long time. At the beginning I tried to use this idea with LaTeX, and I could get the PDF output to look outstanding. The HTML output took a lot of work to get right, and I never got latex2rtf working well enough that I could send that document anywhere else. So I had to figure out what else to use.
Then I started playing with Markdown. I really liked the easy format, but it really only would output into HTML. With a bit of work, I could do a PDF (html2pdf or something like that ), but something to load up with Word? Forget it! And even the PDF looked kinda bad. The same thing with Textile and reStructuredText — HTML and that was about it. I did prefer the Markdown format over LaTeX based on it’s simplicity but I still haven’t found my Holy Grail yet.
Just a few months ago I somehow stumbled on Pandoc. I think it was on Google+, on someone’s random post. I was floored when I read it: “Take a file in format X, run Pandoc on it, and get format Y, with varying degrees with X and Y?” This seemed like just what I was looking for!
But did it work as advertise? Yes it did! It understands everything about Markdown that I currently throw at it. To get the PDF conversation script working, it used LaTeX as an intermediarty so you have to have LaTeX installed. But Word? Not directly — but it does have RTF support, which is even better (since it’s more portable). It also does ODT format, which means I can open up in LibreOffice and tweak for presentation if need be. The ODF output is better than the RTF output, in my humble opinion.
The biggest surprise I got was that it does conversions to S5 — so I can do representations in Emacs/Markdown and be able to present with just a browser. I have done this and it works amazingly well.
One thing I haven’t tried yet is that is also outputs to ePub. If it only did the closed Mobi format for my Kindle.
So, yes, if you are looking for a “write-once, publish to anything” scheme, you can’t do any better than Pandoc
Review: Pangolin Laptop from System76
I had known that my early-model MacBook Pro was getting to the end of it’s usefulness for me. I mean, it still runs but as software has grown more and more complicated, my MBP wasn’t cutting it anymore.
Most people would just by another MacBook Pro! And, while that sounded tempting, I had a few things that held me back from that. For one thing, $2500 was a steep price for me and my rising side-business. And the tools I use 85% of the time were not Mac specific. They are things like zsh, Emacs, Python, PHP, and some of JetBrain’s products. All of them would work on Linux, which is a much lower cost to entry than another Mac.
I started this journey around six months ago when I started scouring the Internet on what the best Linux-based laptop would be. I was quickly led to System76, a maker of Ubuntu-powered laptops, desktops, and servers. I was impressed when I scoured the web about this company. There were a lot of reviews and comments from their users and no one ever had anything bad to say about them. I mean, they had things that they wished that maybe were different, but everyone was happy with the hardware they were getting, how well it worked with the Ubuntu, and, more importantly, how happy they were with the post-sales support they were getting. The price was higher, especially compared to the laptops you get at big-box stores, but you got a machine that you knew would work with Ubuntu, and not have to fiddle around with it. But, regardless, it was certainly cheaper than a MacBook Pro!
Fast-forward a few months: I was investigating putting more RAM into my aging MacBook Pro But I couldn’t! I already had it maxed out at 2GB! So this was when I decided to make the plunge.
System76 has a wide range of laptops available, but the choice was easy for me — The Pangolin Performance. It seemed like a good development machine and my display needs are not that heavy to warrant the next step up. I spec’ed out what I wanted, and then compared it with a MacBook Pro. Yep, about half the price even though I was getting 6GB of RAM instead of Apple’s 4GB, and I was getting a slightly larger hard drive. I thought I was getting a very good deal.
I ordered it about 10 days before Christmas, and System76 responded that it would ship within 8 business days. I was surprised when I found out that it was delivered early, and expected to arrive on the Tuesday before Christmas! And I was even more surprised to have it arrive a day earlier. Huzzah!
The packaging of the laptop was nothing to write home about, but it was extremely well cushioned and supported inside. It would be hard to damage it’s contents. I took it out of the box and immediately started using it while the battery was charging
The first thing I noticed is how quiet it is. I didn’t think the fan was even running! But it turned out that it was — it’s just that quiet. I had my Pangolin on my lap, doing lots of installation, configuring, etc., when my wife asked me if my lap was hot yet. I hadn’t even thought about that, so of course it wasn’t hot at all! I discovered why when I was packing it up after using it for a while on a table. Just left of where it was sitting on the table was a little hot, but underneath was fairly cool. It seems that the fan blows the heat straight to the left side instead of blowing it underneath. This allows the heat to escape and make your lap cooler as well as the underside of laptop itself. +1 for great design!
As for as Ubuntu? Almost flawless. I thought I had to call support to get Bluetooth working, but then I found the button to turn on the F12 key. That could have been an embarrassing phone call.
Note the word “almost” — the one thing that I can’t seem to get working right is to get Flash to use HDMI Audio. The HDMI Video works fine, and I got HDMI Audio to work out of normal Gnome apps, but Flash seems to cheerfully ignore the HDMI output and always goes to my speakers. Since my primary use of a developer machine and not a multimedia server, this is not a big deal.
The overall performance, however, is fantastic. The laptop boots in seconds, and every app I run starts in milliseconds. And I run Apache, PHP, MySQL and PostgreSQL most of the time. It finds my Android phone, Kindle, and iPod when I plugin them in and offers to start the right app.
So, after few weeks of fairly heavy use, would I recommend this laptop? Resoundingly yes! Especially if you are a developer in the open source space and just want everything to “just work”. Everything just works for me — without paying the Apple premium.
Maven Haikus
You start a project
You initialize Maven
World is downloaded.
Dependencies Stink
What is the incantation?
Maybe God knows them.
Have some subprojects
Maven won’t find sibling code
Then chaos ensues.
New dependency
Not found in Maven repo
Now build is broken.
Do you understand?
Maven has many errors
Now you start guessing
All day on Maven
Now the project is worse off
And your hair is gone
On Android
I recently put my stake in the ground on the side of Android and, while I’m not quite up to my first month in usage yet, I can’t think that the iPhone would be better than this. If you are an iPod user, you won’t like having magical iTunes sync for music. But you can manually copy the files over and, if you don’t like doing that, there are apps that do it for you.
I just got back from a trip and the GPS capabilities of our Android phones (wife: Moto Droid, me: HTC Incredible) were flawless. The drive-by-drive directions were spot-on. Need to find a gas station? Literally hit the button and ask it.
I seriously couldn’t ask for a better phone.
My wife likes her keyboard on her droid, but she also likes how much lighter my phone is than hers. I thought I would be annoyed by the Incredible’s keyboard but I have gotten used to it. Or, rather, it’s gotten used to me — I now have a number of words added in and now it is smarter about spelling decisions.
I really only have two gripes about my Incredible: you can’t see the screen when you are in direct sunlight (this is a big deal while geocaching) and sometimes it can be real slow when I turn it sideways. That especially happens when I’m typing something in and decide that I want to two-hand type, so I turn it. The screen generally does not rotate with it.
But the value and the usefulness of the phone outweighs all of them. I can’t think I would like an iPhone more than this.
Expanding my own “Oh My ZSH!”
I’ve been thinking about cleaning up my own ZShell config and putting it out in the wild, but that just didn’t seem to happen. I was looking for something in ZShell — I think it was getting version control information at the prompt and I stumbled upon a mention of Oh My ZSH which is a bunch of powerful ZShell configs arranged in a nice way.
I tried it and I liked it. But it didn’t have everything that I used. But, heck it’s on github — easy forking. So I did. My changes are:
- Change the
xiong-chiamiov-plustheme to usevcs_infoinstead of being git-specific. Gave the new theme the original name ofmikeh. - Option to configure a terminal with strange settings (labor intensive on the first run, perfectly wonderful after that.)
- Will automatically rehash the path, so new commands will be found immediately
- Added realias to quickly make a new shell alias/function (EDITOR env variable required)
- Removed upgrade checker (I don’t expect you to trust me)
- Share history with your zsh’s on the same host
More changes coming as time permits. Enjoy!
