(A Strange) Page Maker

“Yields falsehood when preceded by its quotation” yields falsehood when preceded by its quotation.

Quine’s paradox

The authors of a w3schools.com article about HTML Editors say that for learning HTML “we recommend a simple text editor like Notepad (PC) or TextEdit (Mac).” We second the motion! Using HTML and JavaScript to make web pages (using a humble text editor) is so much fun, in fact, that we couldn’t resist using one to make this strange one.

We also like to build wheels and are fans of that sort of bicycle where you pick a gear or two and commit, because we like riding bikes even more than we like messing with them. We’ll even use a freewheel from time to time for really long rides or when we’re feeling lazy. If you aren’t an orthodox over-my-dead-body Fixie yourself—not that there’s anything wrong with that—then we suggest you treat yourself to a White Industries freewheel or a Chris King hub when you spin. Quality might be endangered, but it’s not extinct.

(No, we haven’t stopped yacking about hacking yet.)





Exercises

  1. Explain what happens when you press the Make button above.
  2. On this page, what HTML color name identifies the color of the font used in the textarea with id html-code?
  3. What is the main purpose of Cascading Style Sheets (CSS)?
  4. Mutate the CSS code above so that a different page is produced when you press the Make button. What did you change? What is the effect of your change?
  5. When the Make button is pressed, a new page opens with the heading Page Maker at the top of the page. Change something in the code above so that this heading does not appear. What did you change?
  6. Add something so that a Clear button appears next to the Make button on the page that opens after pressing Make. What did you add? Hint: The JavaScript code has been provided for you. You just have to add a single line of HTML code.
  7. What is a strange loop?
  8. What is a quine?
  9. Is this a quine? Why or why not? Would you call it a “self-replicating”, “self-reproducing”, or “self-copying” program?
  10. Why did Douglas Hofstadter write Gödel, Escher, Bach: An Eternal Golden Braid? Hint: Read the preface to the 20th anniversary edition of the book.