Version 2 rewrite of the comics widget
Sunday, 4. November 2007, 07:18:01
Rewriting 700 lines of code (when you have little idea what it does) takes awhile, especially with my minimal javascript experience, but meh, I can still do it, just takes time. In order to minimize that time I'm going to list out my goals for my personal benefit more than anything else.
1) Have a new UI
2) Add an autodetect feature
3) Make making your own presets easier
4) Optimize the hell out of the code
5) Document it this time!
6) Make it much more user friendly
7) Make it so 'numbered' comics work
8) Incorporate a question mark into the UI that sends you to a 'Random Strip' from your presets.
1) ShadowK has committed to working on this when I send him the code
2) Almost done with it just gotta get some things sorted, I'm using cad-comics.com/comics/20071020.jpg as a guide. This will likely be as complicated as they can get, without asking for additional input from the user, thus eliminating the 'automagic' feel to it. This is also the most common format (by that I mean year-month-day) so most should be happy.
3) This is desperately needed, After 5 months away from the widget I went back and tried to add a preset and had to blink a few times. I'm thinking of adding buttons that add the codes using the current date for assistance like a button with the text "11" adds a {month}. We'll have to see how this will fit into the new UI.
4) I've found a few sites with hints and tips on which methods to doing things are more efficient etc. but most of it won't be that easy. I'll have to thoroughly think about the logic in the code and make sure I go with the best options. The average user probably won't notice any difference with this, but the last thing I want is people getting 5% increased cpu usage from a WIDGET. (yes that's a lot imo for a widget
5) Comments are cool. mmkay.
6) This goes hand in hand with the new UI doing the coding for it will be simple.
7) Not many are like this but popular demand wins out. Still undecided whether or not this will make it into the autodetect..
8) Should be easy however the difference between choosing a random strip..and choosing a random comic is the difference between nice and brilliant, and easy and incredibly difficult. A random comic would be hell. I'd have to go through and make a directory of all comics. ALL OF THEM to make it work consistently. By that I mean, go through every date EVAR on a comic, see which ones work, and which ones don't. Save that list into prefs when it's added as a preset, Since this would then bloat the comic over 1000 times what it currently is...decision is relatively simple...relatively...since making that list will benefit the rest of the code in about 100 different places.
An alternative to 8 is over time make note of dates that aren't working in a comic..and 'blacklist' those dates... this would prevent the code from having to check those dates again in the future but..meh...first things first hehe...
Off to bed now before I break something lol.
See ya.










