Project #3: Post-mortem

What went well?

Prognosticator – This was the name my lovely spouse came up with for the component that predicts what word Intelliwriter thinks you are typing. This was hands-down the most fun component to put together. I used a simplified Markov Chain algorithm that analyzes existing texts and formulates for any single word, what are the most common following words. A simple idea but impressively good at efficiently suggesting words based on previous words.

Tab-completion – The output from the Prognosticator was a quick reference of words-to-next-word. This made the tab-completion logic super simple and way more effective than I had originally imagined.

Look-and-feel – I didn’t think about this one much until a friend tried out an early version of Intelliwriter and commented of the smooth look-and-feel. I wasn’t really trying to make anything special, but I think that not trying to make something special was accidentally what a distraction-free text editor should be. Simple is as simple does.

What was terrible?

Brew-your-own-text-editor – When starting development of a new component, the first question any developer should ask is “hasn’t someone done this before?” There are a million text editors out there and probably lots that open source their code, and yet here I was re-implementing a text editor and spending at least half my time figuring out the logic of drawing letters in the right places, handling weird characters (…or not), and having to solve the problem of text editing for the millionth time. If I ever decide to go fo’-realz on Intelliwriter, I have got to take this out the equation and find some text editor I can hack apart.

Start Stop Continue

START – I have got to build something that ships. Granted, Who Goes First? technically shipped but I’ve never been thrilled with its resource inefficiency. That thing eats batteries like an old dog. I’ve always told myself that I love software development because you get to constantly learn new things. Though I don’t think anyone should lose their need for learning, I need to take these 10 years as a professional developer and getting down to moonlighting business.

STOP – It may be time to thank the 24-hour project limit for its contributions and revamped my initial principles into focusing on delivery rather than time-management. I feel I have learned a lot from imposing the limit and I see improvements in my time management both at home and at work. Now it is time to take this personal advancement and focus on results.

CONTINUE –  I started breaking down projects into independent components with Mars Commander and really took it to heart with Intelliwriter. This is how the modern software world works and I consider it a part of my more principles of development.

Tagged

Project #3: Complete!

Complete enough, at any rate.

IntelliWriter Logo

IntelliWriter is a distraction-free center-biased text editor with natural language tab-completion. Well, that’s not entirely true. It is a pretty fun experiment in center-biased typing with natural language tab-completion on top of a less-than-wonderful text editor. Let’s just set the expectations at that. I ended up spending more time than I wanted on reinventing the text-editing wheel which didn’t leave as much time as I hoped for some of the other features. But! The outcome is, as with all of these projects so far, I know what I would do differently if I ever want to expand this project into something fo’ realz. The post-mortem should be enlightening for this project. Stay tuned!

IntelliWriter

I typed a slowly in the demo video/gif above to try and make it obvious where I was using tab-completion. I think with little practice I would be able to spit out a fair number more words-per-minute than I could using a normal text editor. In testing I got really used to keeping my eyes in one place thanks to the center-biasing and now find following the cursor across the screen as I type this into WordPress’s blog editor mildly inconvenient.

Download

Features

  • “Center-biased” means the cursor will always be in the center of the screen with the text moving as you type (like a typewriter, if you remember those).
  • As you type word suggestions will appear. You can press TAB to cycle through the word suggestions, autocompleting what you are typing.
  • CTRL-S to save to a text file and CTRL-O to open a text file for editing.
  • UP, DOWN, LEFT, and RIGHT arrow keys should work for navigating around the document.
  • HOME and END also work as expected as well as CTRL-HOME and CTRL-END.
  • Hold both SHIFT keys to temporarily center the document on the screen.

Known Issues

  • Holding down a key for repeating characters or navigation is not enabled.
  • Probably lots of other things – achtung.

Enjoy! If you can!

Project #3: IntelliWriter Update

A dictionary and 79 epubs walk into a bar…

IntelliWriter Logo

Word Suggestion Engine

This was the major theme of the first half of the work so far. After spending a few hours crawling the interwebs for someone who has done this in an open-source, information should be free, hack-the-planet kind of way, I gave up a decided I needed to do it myself. I took a hint from an old friend, Markov chains.  I needed an engine that when given a word, it would spit out a list of words that would most-likely come next. In this scenario, Markov chains basically say ignore everything but the word that comes before it and that works pretty well.

So! I grabbed a pile of almost 80 fiction books in epub format and wrote an analysis tool that calculates for any given word, what are the most likely words to come after it. Filter all those words with actual words from a fully resolved Open Office dictionary (which was a bit of a project on its own)…and done!

Here’s how we are looking so far:

IntelliWriter_update

Look good? I think it looks pretty good. The word recommendations are normally pretty close if not spot-on for this passage. There’s no tab-completion yet, which is really the linchpin to see if this little experiment is actually useful. Better get back to work!

The task list as it stands today, for posterity:

intelliwriter_taskudpate

 

Tagged , , ,

Project #3: IntelliWriter

A typewriter and tab-completion walk into a bar…

IntelliWriter Logo

 

Definition

IntelliWriter is a distraction-free(ish) writer’s tool with a few twists. The first is that, like a typewriter, where you are typing stays in the same place while the document moves as you type. This keeps your eyes from having to travel around as you type. I’m not sure if this is actually a problem, but let’s try it out anyway.

Secondly, IntelliWriter will attempt to dynamically bring up suggestions on the word it thinks you are typing. If you see that the current suggestion is the word you are typing, you can simply press tab and the word will complete automagically. This is similar to word suggestions when typing on a smart phone but with a keyboard shortcut for completion.

Lastly, and this might be a stretch goal for the 24 hour timeline, the document will be continuously saving as well as keeping a history of past saves available. The writer will be able to see the draft from 30 minutes ago as easily as seeing the draft from yesterday without having to manually save off new copies. Again, I’m not sure this is actually a problem but it sounds like it might be cool. Engage!

Previous Work

HanxWriter – Tom Hanks’s typewriter simulator is the original inspiration for the centered-cursor feature.

DarkRoom – A Windows clone of OSX’s WriteRoom, is more-or-less the standard for distraction free text-editing.

Write! – A really pretty tool and the only one I’ve found with a solid auto-complete. It builds the auto-complete options from words you’ve already typed.

iaWriter – Another nice tool with a well thought out flow. Also has a great syntactic highlighting feature (adjectives, nouns, conjunctions, et cetera).

WriteMonkey – Slim, light, portable, auto-save with history, and extensible.

Design and Mock-ups

I’ll start with a white-on-black color scheme with a yellow highlight. There is a grand opportunity to support themes, but that can be a nice-to-have after the big features are up and running. Notice in the mockups that the cursor where you are typing never leaves the center of the screen…

A new document

A new document

 

Typing the first sentence

Typing the first sentence with suggestions

 

A tab-completed word!

A tab-completed word!

Editing mid-passage

Editing mid-passage

 

Work Items

I feel a little better about this list for the 24-hour deadline than I did in the last one. There are a few risky areas but I think I’ll be able to leverage previous work for things like the suggestions dictionary and possibly a historical save engine. …we’ll see!

  1. Feature: Typewriter
    1. Text surface
    2. Text surface configuration (e.g. width, font)
    3. Keyboard event handling
    4. Centered text surface
  2. Feature: Suggestions
    1. Engine
    2. Rendering
    3. Tab-selection and completion
  3. Feature: Auto-save w/ history
    1. Simple auto-save
    2. Version tagging
    3. History engine
    4. History browser
  4. Export to text file

Future Work

  1. Spell-checking
  2. Color themes
  3. Responsive to resolution changes (e.g. on-screen keyboard)
  4. Export to Word and PDF
  5. Document statistics (words, characters, read time, etc…)
  6. Focus mode (dim all but current paragraph)
  7. Cloud storage integration
  8. Markdown support
  9. Xamarin port

 

Tagged , ,

Project #2: Post-mortem

What went well?

MonoGameMicrosoft’s XNA iswas a fantastic framework for indie developers in both 3D and 2D games. My first for-reals game (Pendulous) was written with XNA which enabled us to release for Windows, Windows Phone, and the freakin’ Xbox 360 with relatively few code changes. Amazing! As with many things I love, it has since been defunded. But! MonoGame has done a great job re-implementing the API on top of SharpDX/Mono (cross-platform managed DirectX). I was able to pretend the pain of losing XNA was gone and use MonoGame almost exactly as I did the XNA toolset. There are a few holes in the content pipeline side of things, but all-in-all MonoGame is like sitting in front of the fire with your favorite dog after you thought it ran away.

Game Jam! – This isn’t something that necessarily went well during the project, but the issues that are outlined in the “terrible” section below brought forth inspiration to put together a gamejam/hackfest/whatever tool set. A friend pointed me to deepnight a couple weeks ago and I got totally lost in his world. His game “Law Breaker” is a single-screen Grand Theft Auto that feels like Pac Man robbing banks. Anyway, the fact that he could put something like that together in a couple days got me taking a hard look at my toolset and realize it needs some serious upgrades. More on this later…

What was terrible?

Pre-Planning – Man, I did not do this well. You can read about my expectation reset here.

Burnout – I hit 44 hours with Mars Commander which isn’t terrible for the scope I was trying to hit, but it was spread out over three months. My time log is filled with entries that are only one or two hours long at the most and in the final month I only ended up working on the project a couple times a week. These projects deserve at least a couple full weekend days to get them out the door before my brain moves on to the next shiny object in view.

Start Stop Continue

START putting together a game jam toolset for the next hair-brained idea. I’ve already started putting together a game engine written with MonoGame so I don’t have to go through writing yet-another 2D game engine in C#. I also need to put whatever code elements I use up on GitHub. These days if I don’t see a tool or library on GitHub, I question its validity.

STOP rushing pre-planning. Not taking a hard look ahead really hurt the project this time around.

CONTINUE with cross-platform tools. This is the way of the future my friend. I hope the next software something I do is done in Xamarin so I can see what that world is all about.

Tagged , ,