I wrote the Android software Need To Write after I got my first Android phone. Problem with Android was nobody designed a text editor for it that could edit any text file larger than a few kb. Also very very irritating was that among all the existing text editors at the time (2010 Q4), there were limited poweruser options like undo/redo, save or discard changes, find/replace, save under another filename, save/view with different encoding, save as a plain text file rather than some weird android note format or worse, docx format.
These limitations just drove a text editing junkie like me crazy, I ended up creating file1.txt, file2.txt, etc etc, and regularly cursed and sweared when I accidentally deleted text or saved unwanted changes. I couldn't take it anymore after a month or so. So, despite not knowing any java, I resolved by hook or by crook to write my own "perfect" text editor! Thanks to the tons of guides and demo codes out there, I picked up the basics of Java surprisingly fast. Thus NTW was born!
These were the basic requirements when I started out.
- Be able to open txt files of any size for editing
- Let the user decide to save or discard changes
- Allow undo
- Support a variety of different encodings
- Customized color schemes and font sizes
I am ashamed to admit I neglected my real job somewhat during this time, I spent my lunch and teabreaks and slack time in the office writing it, kept on writing it again at night. Most of the time I couldn't go to bed until after I completed a new feature or debugged a dreaded. I ended up staying up until 1-2+am frequently, then woke up at 7am the next day to travel to my workplace, it was hectic, but so satisfying :D.
Yay! No more hostage to crappy mobile offices and docx!
Then from these basics, NTW grew in power and fanciness, until it became the superlatively amazing software that it is today, muahahahahaahahahahhahahahahaah! :D (But why oh why isn't its sales hitting the roof :'( :'( :'(, I dun get any serious complaints... Maybe I should have keep the 10 day trial period for the trial version.... grrrrrrr! )
Ok, gloating aside. What I would really like to say before I forget the details of NTW's beginnings is how I conceptualized from scratch the implementation of (1) and (2).
- Opening any sized files without hitting any RAM restrictions meant that NTW had to open small chunks of the file at a time. The user would therefore be viewing and editing small chunks of the file. When the user flips to another chunk, the previously edited chunk will have to be stored, but not in RAM, since that would just accumulate until out-of-memory error occurs. Therefore, these small chunks would have to be saved permanently in the sdcard which is usually a few GBs for most modern android phones
- But if lots of small chunks are constantly being edited around and saved, how the heck do I allow the user to save or discard these changes? Saving these changes permanently in the original file would prevent the discarding of changes. I needed some kind of buffer system that uses the sdcard instead of RAM, but saving the edited chunks as separate files would mean a logistics hell during programming. A backup file might work, but should the user be editing the backup or the original?
I dun think any users realize it, but IMHO anyway, this implementation was the most valuable part of NTW to me and I'm so very glad I got it right the first time. :') :') :')
* Well, this is not the actual first post. I deleted the first post the day after I registered this blog address because I got too shy to post it. BTW, Julian Barbour's hypothesis on the illusion of time is remarkably similar to some theories I was brainstorming up for a fantasy story back in 1997-2000. We even referred to it the same way - "The Illusion of Time", although mine consists of other aspects of a larger theory as well.