Limegarden.net Personal site of Wouter Lindenhof

19Sep/100

Story Editor V1.0.0.5 (Export and printing)

A week has passed so I'm releasing another version of my favorite story writer solution: Story Editor.

So what is added in this version?

  1. Exporting to multiple file types is now supported. Think PDF, docx, html, rtf, txt and a few others.
  2. The application now has print and print preview capabilities.

Because the previous version implemented update detection you don't even download the installer, or if you want to use it, you can download it from here.

The next version will implement a complete new feature, which is the creation of contexts. Explaining what "contexts" are is a bit hard, but basically you can create your own database. For the non-technical skilled that means that you can create the context "character" in which you say that every character has a name, age, et cetera. This was actually the primary reason for me to create Story Editor as some story editors already allow this but only for a few contexts like character, item, location. But what if you are writing a space opera and you want to keep track of the various spaceships? You don’t want to store that in "character" or "location".
Well, that is where context comes in to play. Just create a context, design what the context should contain and start filling in.

I hope that I can implement the most basic feature in a single day (I have only 8 hours available for story editor) but otherwise this functionality will take a bit longer.

Anyway enjoy the latest release and if you encounter any problems, please let me know.

14Sep/100

Story Editor v 1.0.0.4 (installer and auto-update)

It took longer than I had hoped, but the very first version of Story Editor, my favorite creative story writing software, now has an installer. No longer you will need to move around files. Just launch the installer and you are set to go.

I have also spend a bit of time to ensure that you don't need to worry if you have the latest version, because Story Editor will check if there is a new release for you. Nothing too intrusive, of course, because you are writing and you don't want to grab the mouse to click away an annoying "please restart your system" while you are writing.

When you see this at the bottom, just click on it and it will ask if you want the update, say yes and while it is being downloaded you can continue writing.

Once the download is complete, hit it again and the new version will be installed.

So what will be in the next version? Well, I'm going a bit back to add some more text editing functionality and also exporting/printing.

Don't worry about checking the website or reading my blog. From now on you will be notified ;)

6Sep/100

Next version of Story editor

Quite a productive night, if I may say so.

Currently the new features are already worthy of a new release. It has an installer, it has file association and an update checker. Yep, now you can ignore my blog and still have the latest version of Story Editor.

However I have good news and bad news. The bad news is that you will have to wait untill it has been released. The good news is this release will most likely be done before the weekend. The reason for the delay is because a) it's late and b) I want to test the downloading mechanisme. Oh and of course, it needs to alert you when a new version is availabel. So I still got my work cut out for me for this week.

5Sep/100

Releasing Story Editor V1.0.0.3

As promised I would release the next version of Story Editor a week later and well a week has past. For me it was a crazy week so I had decided to do some of the programming in the week instead of the weekend and this has paid off.

So what has changed?
First of all I have decided on an extension. You can still work using the old zip files, although I recommend you start using the sez format.

Second you can now reorder chapters and scenes, by selecting the chapter or scene in the outline and then use the green buttons.

Next week I will try to make the Story Editor installable with automatic updates, so that you don't have to download the whole package again.

Here is the link to my favorite creative story writing application: Story Editor V1.0.0.3.

1Sep/100

Pay attention to which version when buying Windows 7

When I graduated I had decided that I would reserve a maximum of €500 to buy myself a present. Now that I have graduated I have looked around to see on what I would spend my hard earned money on and now, almost two weeks later, I have decided it would be Windows 7.

For the average customer (AKA me) there are three flavors I can buy: Home Premium, Professional and Ultimate. So I decided to do a little bit of research and I'm glad I did.

My laptop is used for both personal pleasure (games, writing and my personal projects) as well as for work. As of late I do a lot of remote desktop (RDP) and to my surprise, this is not included in Home Premium. Home Premium is actually a version between Windows Vista Home Basic and Windows Vista Home Premium.

This means that if I use Home Premium I will no longer be able to use my laptop for work. So I need to buy the more expensive version.

This brings me to another problem. My current laptop (Dell XPS M1530) is four years old, which makes it pretty much an outdated model. If in the future I would switch to another system then I'm pretty sure that they only install the cheapest windows version on it.

That in turn would mean that I, as customer, would need to buy another version of Windows Professional or Ultimate.

On the other side, I'm not responsible for equipment used at work. I just prefer to have all my work available and should my laptop fail, then I can buy a new system for personal use. I have no qualms with Windows 7 Home premium.

Still... I think I will sleep about it for another night or maybe even two before I decide on the matter.

UPDATE 02-09-2010: I stand corrected, a friend of mine just tested it and the only the RDP server is unavailable in Home Premium and the RDP client is. That means you can use RDP to connect to other desktops, but other desktops not to you.

Tagged as: No Comments
29Aug/100

Fixed bug in story editor

As I had mentioned yesterday at late night, there was a small but highly annoying bug in the Story Editor, which I have now fixed.

You can download a new version here: Story Editor V0.0.0.2

Next week I will add reordering in it. If anyone comes across a bug, feel free to reply on this post.

Filed under: Uncategorized No Comments
28Aug/100

Releasing first version of Story Editor

As you can read from the title, I'm releasing the very first version of story editor. If it's not working please let me know.

You can download Story Editor for free from here.

Just extract it where you want it and run StoryEditor. The application should explain itself but if you really need some guidance, just press ctrl+O and open "tutorial story" and if you wonder if you should open the zip file or not, then yes, it is the zip file. If have not yet decided on a extension, so until then it will remain to be zip file. Anyway the tutorial should explain a few things.

For now I'm going to bed and get some of those fairly rare Zzz's. ;)

UPDATE: There has already been a bug found. If you remove anything but the last scene then the scene that is selected after that will contain what was in the old scene. So don't press remove: I will have this fixed tomorrow.

28Aug/100

Story Editor template system

OK, I have done some thinking about where I want to go with Story Editor when I have finished the outline (chapters & scenes) section. What you see in most editors is that at one point you can create items, characters, locations and maybe a few other things.

However I recall that at one time I was writing a fantasy story which was a bit heavy with spells and frankly I needed that to have that information to be written down as well. Now let's say you are working on a story that involves all kind of politics and parties. You can shove those under items, characters or locations. In fact you want to have the rightwing party to be seen as a completly different group.

So this night I was thinking about how to address this issue and finally I figured out that I will drop all support for items, characters and locations. The tabs with those really nice looking icons will thus be dropped.

Wait? What? You drop something because you need more of it?

Yes, because I don't know what you (or me in the far future) wants or expects from the project and a smart programmer is a lazy programmer.
However that doesn't mean that those features are lost. No, they don't exist yet but if you want them you can create them yourself.

It's going to be part of my CustomData system which I originally only wanted to use to give extra properties to characters. Now I'm going to give the user the control to fully create their own templates.

I look at the above idea what quite a bit of reservation, but I think that users, once they understand the system, are really going to like it. And for those who have difficulty understanding, I can always generate a few basic templates like characters, items and locations so that they can start working with the program to begin with it.

For now however I'm finishing the outline of the story and making certain that it works so that hopefully I can release the very first demo this week.

25Aug/100

Story editor

The Story Editor is slowly but steady making progress. The reason why it goes so slow is because I'm trying to ensure that the GUI will be of high quality. So I take special care and you might have done one thing fairly different that most text editors or story writers: There is only a little bit of text.

The reason why I want so little text is because Dutch is my native language although the majority of the time I working in English. From time to time I also try to write English stories and I have noticed that when I see something in a foreign language I also start thinking in that language. That is cool except the fact that I'm trying to write a story in another language. "It's a huge pain in the ass wanneer je opeens in het Nederlands ga schrijven" (translated: It's a pain in the ass when you suddenly start to write in Dutch). So I take special care of that. I'm still not certain what to do with words like "Chapter" or "Scene", or even "File" but for some reason I don't find those not that intrusive. At the same time however I think that localization (L10n) will be implemented as soon as I'm able.
The other thing I take special care of is the outline editor (what you see on the right). I have experimented with various forms (Tree Lists, zooming in and out) but I found out that this method is most likely the best way to do it. Tree Lists didn't format nicely and zooming in and out would have mean you could only see one chapter at the time.

Also I have finally implemented the ability to load and save. I mean I can understand that you don't want to write your story completely in one go. Saving is also cool. For starters there are multiple files (each scene, chapter, character, location, item et cetera) is put in a different file. However I don't like multiple files. I like one file so what it does is combine everything in one zip archive. This is cool, because if you have a custom tool (spell checker for example) you can just extract the file and run the tool. No need for a propriety format. Although zipping things in can be rather slow. Microsoft Office 2007 docx files have that problem as well, although now that I think about, it remains fast enough and if need be I can always move it to a thread or allow it to be saved without zipping it in (thus a collection of folders and files).

The last thing I want to mention is skinning. Personally I don't really care about it, but I know people who like it, so I have added that as well. Thanks to DevExpress there are already 31 skins in it. And here are a few examples:

Default skin

Pumpkin


Sharp plus

Office 2007 pink

So what is left?
Well first of all the Outline (chapters and scenes) needs to be finished. I want to be able to add chapters and scenes, remove them as well. And the last thing is actually being able to write. Oh before I forget it again: I want to be able to output the entire story in one document.

19Aug/100

Extending exceptions

Sometimes you have a function which needs to communicate back on failure through special exceptions as you want to program have the option to fix certain functions. For example a formula whose input parameter is bad (example: begin date is after the end date) or when the database throws up or anything.

Now you could do the following:


public class EndDateBeforeBeginDateException : Exception 	{ }

class example
{
	void SomethingWithTime(DateTime begin, DateTime end)
	{
		if (begin > end) throw new EndDateBeforeBeginDateException();
		// ... do something with time ....
	}

	void DemonstrateFunctionTriesToCorrectInsteadOfFail()
	{
		DateTime input_begin = new DateTime();
		DateTime input_end = input_begin.AddDays(-1); // WRONG DATE ON PURPOSE!
		do
		{
			try
			{
				SomethingWithTime(input_begin, input_end);
			}
			catch (EndDateBeforeBeginDateException)
			{
				// Date was most likely wrong ask user
				var r = MessageBox.Show("The end date was before the begin date."
					+ "Do you want to switch them and try again?",
					"Switch dates?",
					MessageBoxButtons.YesNo);

				if (r != DialogResult.No) { return; } // quit function
				var temp = input_begin;
				input_begin = input_end;
				input_end = temp;
				continue; // Try again now
			}
		} while (false);
	}
}

But what if you have a lot of parameters. You don't want to create thousands of exceptions. Well, you can try using tagged exceptions which looks like this.


public class TaggedException<T> : Exception { }

struct _EndDateBeforeBeginDateTag{}
struct _SameDateTag {}
struct _TimeDoesNotExistTag {}
struct _ThinkOfATagOnYourOwn {}

class example
{
	void SomethingWithTime(DateTime begin, DateTime end)
	{
		if (begin > end)  throw new TaggedException<_EndDateBeforeBeginDateTag>();
		if (begin == end) throw new TaggedException<_SameDateTag>();
		// ... do something with time ....
	}

	void DemonstrateFunctionTriesToCorrectInsteadOfFail()
	{
		DateTime input_begin = new DateTime();
		DateTime input_end = input_begin.AddDays(-1); // WRONG DATE ON PURPOSE!
		do
		{
			try
			{
				SomethingWithTime(input_begin, input_end);
			}
			catch (TaggedException<_EndDateBeforeBeginDateTag>)
			{
				// Date was most likely wrong ask user
				var r = MessageBox.Show("The end date was before the begin date."
					+ "Do you want to switch them and try again?",
					"Switch dates?",
					MessageBoxButtons.YesNo);

				if (r != DialogResult.No) { return; } // quit function
				var temp = input_begin;
				input_begin = input_end;
				input_end = temp;
				continue; // Try again now
			}catch (TaggedException<_SameDateTag>)
			{
				// Force the user to change one date
			}catch (TaggedException<_ThinkOfATagOnYourOwn>)
			{
				// Tag seems obvious enough *wink*
			}
		} while (false);
	}
}

Now you only have one Exception in your code though you can quickly and without having to write much code.
(And if you are smart you store extra info the tag which is stored in the exception).

The same trick also works in C++ using templates.