So, one of the major goals for Sand and Blood (SAB) is to create my own font. Yeah, it is a “pie in the sky” as it were, but it is something I’m enjoying doing during my lunch breaks. However, I decided I needed something a bit more complicated than just creating the glyphs by hands. And I wrote a Unicode chart generator to help me do it.Continue reading
I decided to take a week or two off from writing. I was getting burned out but also because I have a few things that need to be done that I’ve been ignoring in my obsession to finish BAM (just got the writing group feedback on the last three chapters).
Yesterday, I got to a stopping point on rewriting one piece of MfGames Writing from Python to C#. It was an interesting experiment that took about four days (two was playing with coding style) to work out, but it is pretty critical for my build system for making both ebooks and collecting data for typesetting print books.Continue reading
About two years ago, my dad convinced me to try Python. His argument was “I liked it, you probably will too.” I know, it isn’t exactly the greatest argument, but after the initial blowing him off, I decided that I needed to be open-minded and actually try Python.
Since then, I’ve written a few non-trivial applications including some media processing tools, a pretty extensive set of writing utilities, and a slew of other little scripts here and there. I also have an entire ebook publication system written in Python.
When I went to the cabin two weeks ago, I was talking to my dad about it and I realized something: I don’t like Python. I mean, Python is a great little language and I’m fairly competent at it. I would still recommend it for teaching people who to program. But, as a language, I don’t think it’s the language for me.
Recently, one of the tasks I had to do on my current work project was to reduce memory leaks. Even in C#, you have to worry about that. The garbage collector handles a lot of the common ones, but there are still the occasional one that needs to be removed to allow the collector to do its job.
For the most part, this involves running a memory profiler such as SciTech’s .NET Memory Profiler. When I look for leaks, I usually do the following:
- Start up the profiler
- Perform an initialization step to make sure all the caches are loaded
- Get back to the “start page” of our application
- Take a memory snapshot
- Perform some action
- Get back to the “start page”
- Take another memory snapshot
- Figure out what should have been released and figure out why.
- Die a little inside
- Go back to 1
(Actually, we are all dying inside, but it is good to schedule internal death.)
One could say that it is pretty tedious. Now, I’m not the greatest hacker when it comes to handling memory programs, but we use the
IDisposable pattern pretty heavily, so I do a lot of the link breaking (e.g., nulling out fields, removing events) during the disposal process.
Somewhere in hour three of this, I realized I was struggling with the automatically created
Dispose(bool) method and had a minor idea of how to make it easier to work with.
Well, my vacation is over. One week of traveling up north to the family cabin, a lot of writing, and generally just spending time with Fluffy and EDM.
I also got to spend time with my father (and his computer). Remarkably, he didn’t give me a lecture about my weight, which was nice, but I’m still working on it. I did help him with some regular expressions, a bit of Java coding, and a philosophical discussion of Python.
One of my side projects has been to transcode my entire media library from my preferred format (Matroska or MKV) to MP4. As much as I don’t like it (MP4 doesn’t support multiple soft-subtitles in the same file), the Roku doesn’t support anything but MP4 files.
I have a pretty good number of video files, mostly because I break individual episodes out (so 11-22 per season) and I’m fond of anime (Bleach and Naturo are both over a hundred episodes), but I thought I was doing pretty good on the transcoding. However, since “I think” isn’t really useful, I wrote up a fairly decent Bash script that tells me how many files I have of each type and it lets me break it up by directory.
With my work with formatting Sam’s Dot Publishing’s (SDP) books for the Kindle, I have a steady stream of books in Microsoft Word format that need to be converted to Mobi files. This is a fairly tedious process since SDP’s formatting isn’t conductive to just throwing the book through
kindlegen and having everything magically ready.
Getting the SDP document into DocBook is the hardest part, but only takes about 10-15 minutes. I mainly go through the document and change headings, add some keywords for poetry, and normalize the section breaks. Once I have a clean Word document, I wrote a Perl program to convert Word into DocBook 5 and try to arrange everything according to DocBook’s XML schema. This includes making articles, putting in authors, and parsing the legal page.
With the prompting of a co-worker (who suffers through my emoness) and a really nice person on Reddit, I decided to make most of this system public to get improvements and maybe save someone else some time and effort. Plus, I like giving back to the communities who helped me get this far.
With the work this weekend, I think I have a decent alpha-quality build system that takes a DocBook file and creates a fairly clean PDF, MOBI, EPUB, DOC, DOCX, RTF, HTML, and ODT version. Almost all of this is driven by XSLT stylesheets so it is easy to change the format for ascetic or branding appearance. It also has tools for uploading stories to WordPress for when you might want to make a story public.Continue reading
I’m a lazy person. I can’t really describe it any other way. I don’t like doing the same thing over and over again. It is tedious and my time is better spent on other things. However, I’m always changing. It might be a new technology, file format, or organization. For example, in the process of analyzing how many words I’ve written over the years I touched on the problems of repeatedly changing file formats . I want to keep them consistent instead of in a ton of different formats. My previous analysis would have been a lot harder if I had five different formats. And I’m not going to change this part of me. If I decided to Creole is a horrible format to write in (actually, I want to move to Markdown since that is the most popular format right now), I will translate every story, novel, and chapter to the new format.
The only reason I haven’t switched over is because I’m in the middle of a serial and I thought it would be cool to show the progression of the serial over time and I don’t want to worry about renames when I do it.
Changing websites is one of those things. With the DokuWiki site, I had the Creole parser plugin so I just made a couple changes and uploaded them directly into the file host. This is actually one of DokuWiki’s strengths. When I had a new story or chapter, all I had to do was
scp the file up and visit the site. It was there and it took no effort.
Using WordPress is a much harder. I can’t just
scp the files up and have them show up. I need to go through the website (or at least the API) and create the page. And then copy/paste it in and change the formatting (I rarely use italics but I do use them). And that is fine for the 5-6 stories I have on http://d.moonfire.us/. For the other byline, I would have hundreds of files to upload.
And I’m too lazy to do that.
One of my short term goals is to migrate a DokuWiki site over to WordPress. The decision to do this was somewhat complicated, but it came down to me not wanting to maintain too many systems. DokuWiki is great for what I used it for, but I’m maintaining seven websites now and I need to reduce my overhead since I need to focus on other things (writing, programming). I finished the second to last one (The Nobel Pen on Saturday and started into the one I’ve been stalling on.
In the process of not writing, I decided to clean up my media server. One of the drawbacks of switching from MythTV front end to Roku is that the Roku doesn’t have the flexibility that the MythTV had. I couldn’t use MPlayer which had everything in a single file. Instead, I had to break things out. One advantage is that the files are grouped together so the metadata is with the cover image is with the video files.
Now, I want my Roku to be as pretty as my MythTV. This means I want to get an image on the display and maybe some information about the movie. On the MythTV, I just had a screenshot of whatever was in the movie 20% into it. It was… okay, mainly because I didn’t have a good poster downloader. I also had poor metadata information (year, plot, etc) because the MythTV’s process always hung so I killed it.
I wanted more.
After the rejection letter and self-doubt, I decided to focus on the two major writing projects for now (my weekly serial and the commissions) and switch over to working on Author Intrusion. I’ve been meaning to do it for a while, mainly because I think it will help with producing better words and identifying my blind spots. And, if I’m lucky, it will also help me figure out what’s “wrong” with Flight of the Scions.
In the process of winding down my writing, I’m getting through the list of things I should have done over the last eight months. One of them was getting some of the websites cleaned up. Writing and programming are fun, but there is always the little tasks that come along with it that aren’t quite as much fun as writing: writing up the grammars for the conlangs, writing documentation, putting up examples, and all of that. There is a lot involved with programming and putting up a presence (and I’m not even doing it “right”) and it is about time for spring cleaning, as it were.
One of the big things there was updating websites. I have a variety of websites, but due to historical reasons, most of them were on different platforms. My mfgames.com site was on DokuWiki. Previously, d.moonfire.us was a mix of WordPress blog with DokuWiki, but I changed it to use WordPress exclusively as a CMS. The portal site, moonfire.us was a static page which had an interesting idea but didn’t quite work out in the end. I also had a static PHP site for photography.moonfire.us (Fluffy’s photography site) and a few others.
Fluffy surprised me yesterday. Instead of leaving EDM with me when she went to the hospital to visit her father, she dropped the little one off at her parents and gave me the night alone. I told her she didn’t have to do that. She did anyways.
So, I had a night of alone time. I considered going to CRineta but I spent the entire weekend trying to get some time to Get Things Done™ that I decided to go home and get things done.