Recently, I have taken to writing a lot of notes in markdown syntax. When doing this on Andriod, I have had a lot of success with Writeily. I recently used it to take notes for three days straight and it worked brilliantly! I have naturally used markdown-type syntax for many years, so it is no trouble for me to take notes in this way. I find that when using a tablet to take notes, it’s much easier to use this type of syntax rather than try to highlight bits of text with my finger and select formatting options. That’s just too fiddly, and I end up losing concentration.
I am planning on using Pandoc to convert the resulting text file into something else. So, if I wanted to convert my markdown notes (contained in a .txt file) into a word document, I would be using a command like this:
pandoc -f markdown_github test.txt -t docx -o test.docx
...which should leave me with a nicely formatted Word file. Doing that, I should be able to take notes without needing to go back over them and re-format them later. I also find that it's easier to remain consistent this way. All the headings look the same, etc. I reckon it’s a pretty cool way to take notes, and if you’re a programmer, and used to following a particular syntax, you won’t find it hard to do.
Since my H2D2 project has quite a lot of code in it now, I've been using .Net interop as a quick way to write some unit tests for the H2D2 programming language.
I have written a C# unit test project in Visual Studio which tests much of the existing H2D2 language syntax. This means that I can add new features and quickly check that I've not broken any of the existing code. So I can very easily make sure that programs which used to run continue to work as expected.
Recently, I've been making H2D2 support function calls, and so it's been handy to write tests for various different types of function call (passing parameters, reading return values, allowing functions that don't return a value, etc). The unit tests have made it much easier to ensure that everything works after I've made changes.
Since I've written more unit tests in C# than anything else, I thought it would be the quickest way to get my tests up and running. And because I had already compiled H2D2 into a windows dll (the unmanaged kind), it is not very hard to run H2D2 programs from .Net - even easier because I had already written some basic wrapper code for all the interop stuff. It's not much harder than putting some H2D2 source code into a string and calling a Run() method. Obviously all this has been done 'just for fun', since it's only one of my hobbyist projects anyway.
But when I mentioned to one of my colleagues that I had spent some of my free time writing unit tests for fun he said that I was clearly stark raving mad. There's a possibility he's correct.
However, when I think of how I'd feel if I broke some of my existing H2D2 code and had to go back and unpick where I went wrong, I reckon that these unit tests are really less about having fun and more about preventing a severe loss of fun if I ended up scratching my head and trying to figure out what I'd done to make something break.
So I hope that's a suitable explanation for why I've been writing unit tests in my free time. It's the best excuse I've got.
Although ultimately, I may end up looking for a unit testing framework for C so that I only need one IDE loaded to run my tests... The .Net interop solution may just be a stepping stone.