julianharty / testing-heuristics

Experiments to see if we can establish evidence of the value of testing heuristics
MIT License
3 stars 0 forks source link

Let's aim for consistency in page names, and no repetition in generated files :) #18

Open julianharty opened 7 years ago

julianharty commented 7 years ago

I'm amazed to discover my browser can cope with spaces and * characters in URLs. Some of our generated pages include these, but not all. I've noticed we use a couple of mapping algorithms e.g. some pages started with:

Also while writing this issue I notice we have 2 instances of pages for what seem to be the same topic e.g. here are all the files containing terms:

-rw-r--r--  1 julianharty  staff  4117 10 May 12:50 term_**e**rrors.html
-rw-r--r--  1 julianharty  staff   709 10 May 12:50 term_**i**nputs.html
-rw-r--r--  1 julianharty  staff  1000 10 May 12:50 term_**i**ntegrations.html
-rw-r--r--  1 julianharty  staff   835 10 May 12:50 term_**l**ocation.html
-rw-r--r--  1 julianharty  staff  3599 10 May 12:50 term_**s**pecial characters.html
-rw-r--r--  1 julianharty  staff   704 10 May 12:50 term_**s**tore.html
-rw-r--r--  1 julianharty  staff  3951 10 May 12:50 term_errors.html
-rw-r--r--  1 julianharty  staff   849 10 May 12:50 term_integrations.html
-rw-r--r--  1 julianharty  staff   653 10 May 12:50 term_pages_and_content.html
-rw-r--r--  1 julianharty  staff  3442 10 May 12:50 term_special_characters.html
-rw-r--r--  1 julianharty  staff   653 10 May 12:50 term_special_formats.html

There are 6 with **'s in their names and 5 without (inputs isn't duplicated). Note the sizes of the files for seemingly identical content varies significantly. The differences are related to layout and adding a 'back' button.

julianharty$ diff dist/term_\*\*e\*\*rrors.html dist/term_errors.html 
12,17c12
<       <button class='back-button white' onclick='goBack()' title='Go Back'><</button>
< <div class='header'>Errors &amp; Error messages</div>
< 
< 
< <div class="body">
<     <h1>Errors, error messages, &amp; error testing</h1>
---
>       <h1>Errors, error messages, &amp; error testing</h1>
40d34
< </div>

Here's where I'm hoping we'll get to soon:

  1. no duplication in the files - 1 file per term/topic, per heuristic, etc
  2. URLs to be contiguous terms without any spaces or formatting characters. I'd prefer underscores to represent spaces in URLs which should work well even in older, less capable web browsers. e.g. I_SLICED_UP_FUN.html
ISNIT0 commented 7 years ago

I believe the files are duplicated because the old files are still present - if you clear out ./dist it should fix that.

I'll take a look at the **s in the name, it was laziness that caused me to leave them in.

julianharty commented 7 years ago

The duplicate files were being regenerated by the script (as indicated by the timestamps in the directory listing). Anyway, thank you for cleaning this up.

julianharty commented 7 years ago

A quick note before I lose track. Here's perhaps an unusual case where an odd filename is still generated. I'd expanded a term (to match the original heuristic in I SLICED UP FUN) which has 2 terms for the second 'I'. For the moment I've split the terms back into 2 distinct terms. Perhaps we can revisit having a dual term at some point in future?

file:///Users/julianharty/myopensourceprojects/testing-heuristics/dist/term_interactions_/_interruptions.html

BTW: this file wasn't generated so clicking on the link got a 404 error.

ISNIT0 commented 7 years ago

Oooh, fun :) it's because the '/' ends up causing everything to look in the wrong place :)

We can look at that some time soon