Recent Posts

This is my first post on my new blog. I decided to write my own blog software, and this is it. It's very much under construction, but I'm putting it into production so I can start linking to it while I add content.

This software isn't intended for use by anyone else, though I suppose you never know what might happen. I expect to use parts of it for programming samples, and I may release the whole thing when it's fairly usable. We'll see.

My main purpose was to create something that would let me post content with as little hassle as possible. I've used blog packages like Wordpress and wikis like Dokuwiki, and while they have many nice features, they never do quite everything I want them to do. So to get them the way I really want them, I'd have to customize the code, and since they're written in PHP, that's no fun. Writing my own from the bottom up means it can do what I want it to, and nothing more.

For instance, Wordpress has a nice WYSIWYG editor. Great, except that I don't like some of the formatting stuff it does, like the way it turns blank lines into paragraphs. Sometimes that causes conflicts with other formatting I use. Plus, I want to be able to compose my messages in any other editor, which doesn't always work well. There's also the issue of security; if you use a well-known package, you have to keep up with all their security updates, which can come often.

So once I decided to write my own, I had to decide what it should do. Well, first of all, it should let me type posts in any editor with minimum formatting. I wanted to be able to mark paragraphs, but using HTML tags is a pain because of the angle brackets which require the shift key. Nothing you have to type a lot should require that. Then I remembered WordStar, the editor we used on CP/M systems in school. It used simple dot-codes like .P to mark the beginning of a paragraph, so I'll use .p. Perfect, much easier to type than <p></p>!

I came up with a few more dot-codes for different formatting commands, and decided on some inline formatting codes, like double asterisks around bold text, and started coding. I'm using Dancer, a perl framework that's nice and light but handles a lot of the underlying CGI stuff on its own. It lets me create simple routes for different URIs and just type the code to handle them. It also separates the page layout from the code nicely, which is a big improvement over PHP and the old CGI days.

That all works now, along with some code I wrote to handle directories. I went back and forth on how to structure the site: as a typical blog, organized by date, or more like a wiki based on links. Then it hit me: it should be in a directory structure, the way I organize my files on my own system. So I can link to a directory, and it'll automatically show a list of everything in that directory, including any blurbs I insert in the files.

I'll get into more of the technical details later as I add more articles, but that's the gist. I still have to add a widget for showing the most recent posts (I still want some blog-type functionality), the ability to search, accept comments, and so on. More to come soon.

Posted on: 2015-03-22

If you would like to share this page or comment on it, please share it on your favorite social media site or discussion forum and comment away! Some buttons are provided below for your convenience. To contact me directly regarding this page, please email me anytime.