Dev log

Tue, Oct 6

Unresolved issues (to be resolved in the next version):

– Repetitions of jargon words are highlighted, but not counted in density. This as such is not a big issue – let there be some free writing. For now this remains as it is.

– The maximum text limit is between 800-900 words. Needs extension.

– In the output text the paras are joined together without a space in the dump.

– If a part of a word is found in the jargon list (eg: ‘increment’ in ‘incrementally’), the part is recognized and highlighted, but alternative suggestion is not shown in the logged in version.

– Capitalized versions of jargon words are counted for jargon density, but not highlighted.

– ‘&’ and ‘#’ cut off user pasted text. So these should be deleted by the user before checking for jargon.


Tue, Oct 6
The jargon dictionary is now expanded to 818 words.


Tue, Sep 29
The & issue can not be resolved without trying it out on a test server. So users will need to avoid using ampersand in the content to be checked.

The file pathnames in the js file are now simply “xyz.php”, no leading absolute path.


Sun, Sep 27
The visual indicator is live! The “meter” html tag was always there to use. Still, can’t pass a live variable into it. The workaround – playing with colors and ranges was beguiling.

So this indicator is an approximation – can’t show decimal densities displayed, only larger ranges. Using /10 because the imp densities will usually be <3. The '&' cutting off text issue has been fixed by the programmer.


Sat, Sep 26
WP can be pathetic. Can’t use a visual indicator because the CSS won’t take a variable just like that. The fix for this is a little scary and too technical.


Fri, Sep 25
Work to be done:

– Repeated words in user text are highlighted, but not counted in density. This as such is not an issue – let there be some free writing. Can be fixed if needed (the count function will need additional coding to also count repeats), but for now it is stat.

– The maxchar limit needs extension. Not sure what is causing the limitation.

– The output text could be in the same format as user pasted it. But a dump is fine as well, just in case.

– The paras are joined together without a space in the dump.

– Parts of words are recognized (increment in incrementally) and highlighted, but alternative suggestion is not shown in the logged in version.

– Capitalization – in case of a mismatch, the word is recognized, but not highlighted in the dump.

– & and # are cutting off user pasted text.


Fri, Sep 25
The tool is now complete and working as intended! Phew.

The missing data flaw is fixed. The fetch_array line was repeated twice in the old code, and I had not dared to replace it lest it broke the code. All words and phrase are now counted. Hurray!

The suggestion list was not showing up in the logged in version. Fixed it by importing it in a variable only when the count ticked up, and added a dummy “” check in if-else, to stop it from repeating with the while loop. Thanks again to stackoverflow for the missing data fix.

The while-if combination is deadly. “Your ‘if’ is a big peacemaker, much virtue in ‘if’ ” – Shakespeare. Even in 21c.


Thu, Sep 24
Turned the whole code around to make it include phrases as well. Earlier it tokenized user input text into single words with spaces as tokens, tallied it with the db list, and counted and colored them red when found. So it ignored phrases in the db.

I am now doing it the other way – fetch the words/phrases from the db, find it in the user text with stristr, count it in the user text using substr_count. Also separated the highlighter – using str_replace. Thanks to stackoverflow and w3schools and other sites for the coding help. I did it!!!

This method is faster – it will access the db only as many times as the number of its entries. The old code accessed the entire db as many times as there were words in the user input. So if the user pastes 200 words to check and the db has 600 entries:

Old code: 200 x 600 = 12,000 db queries

The new code: 600 db queries

The rest of it works with strings inside code.


Wed, Sep 23
Fatal flaws! Many keywords are not recognized in the db. Only single words are being fetched, not phrases.


Tue, Sep 22
The official launch day! Ad campaign is now running. Delayed by 2-3 days.


Mon, Sep 21
More work. Every detail from sizing the table to fixing the code needs external help. Thanks to stackoverflow and w3school. 10:50 pm – homepage is finally live! The text widgets also take php, didn’t realize it earlier, but thanks to yesterday’s mess, the site looks better now. But too late for an announcement.


Sun, Sep 20
Go live date. But messed up with the homepage formatting without storing the original code (the visual editor of WP was turned on, and it destroys scripts). Reckless. The alternative word suggestions list is partially done. Monday is the new go live date now.


Sat, Sep 19
Flaw in the code – reads only single words from the db. Will do for now as a test. In tech it’s imp to go live quickly and improve later. Sunday is the set D-day.


Fri, Sep 18
The code is now working in WP. The js file path was the trick, it must be in public or enqueued using wp_enqueue method. Using the former.