19.xhtml 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!--
  3. h t t :: / / t /
  4. h t t :: // // t //
  5. h ttttt ttttt ppppp sssss // // y y sssss ttttt //
  6. hhhh t t p p s // // y y s t //
  7. h hh t t ppppp sssss // // yyyyy sssss t //
  8. h h t t p s :: / / y .. s t .. /
  9. h h t t p sssss :: / / yyyyy .. sssss t .. /
  10. <https://y.st./>
  11. Copyright © 2016 Alex Yst <mailto:copyright@y.st>
  12. This program is free software: you can redistribute it and/or modify
  13. it under the terms of the GNU General Public License as published by
  14. the Free Software Foundation, either version 3 of the License, or
  15. (at your option) any later version.
  16. This program is distributed in the hope that it will be useful,
  17. but WITHOUT ANY WARRANTY; without even the implied warranty of
  18. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  19. GNU General Public License for more details.
  20. You should have received a copy of the GNU General Public License
  21. along with this program. If not, see <https://www.gnu.org./licenses/>.
  22. -->
  23. <!DOCTYPE html>
  24. <html xmlns="http://www.w3.org/1999/xhtml">
  25. <head>
  26. <base href="https://y.st./en/weblog/2016/03-March/19.xhtml" />
  27. <title>phpDocumentor &lt;https://y.st./en/weblog/2016/03-March/19.xhtml&gt;</title>
  28. <link rel="icon" type="image/png" href="/link/CC_BY-SA_4.0/y.st./icon.png" />
  29. <link rel="stylesheet" type="text/css" href="/link/basic.css" />
  30. <link rel="stylesheet" type="text/css" href="/link/site-specific.css" />
  31. <script type="text/javascript" src="/script/javascript.js" />
  32. <meta name="viewport" content="width=device-width" />
  33. </head>
  34. <body>
  35. <nav>
  36. <p>
  37. <a href="/en/">Home</a> |
  38. <a href="/en/a/about.xhtml">About</a> |
  39. <a href="/en/a/contact.xhtml">Contact</a> |
  40. <a href="/a/canary.txt">Canary</a> |
  41. <a href="/en/URI_research/"><abbr title="Uniform Resource Identifier">URI</abbr> research</a> |
  42. <a href="/en/opinion/">Opinions</a> |
  43. <a href="/en/coursework/">Coursework</a> |
  44. <a href="/en/law/">Law</a> |
  45. <a href="/en/a/links.xhtml">Links</a> |
  46. <a href="/en/weblog/2016/03-March/19.xhtml.asc">{this page}.asc</a>
  47. </p>
  48. <hr/>
  49. <p>
  50. Weblog index:
  51. <a href="/en/weblog/"><abbr title="American Standard Code for Information Interchange">ASCII</abbr> calendars</a> |
  52. <a href="/en/weblog/index_ol_ascending.xhtml">Ascending list</a> |
  53. <a href="/en/weblog/index_ol_descending.xhtml">Descending list</a>
  54. </p>
  55. <hr/>
  56. <p>
  57. Jump to entry:
  58. <a href="/en/weblog/2015/03-March/07.xhtml">&lt;&lt;First</a>
  59. <a rel="prev" href="/en/weblog/2016/03-March/18.xhtml">&lt;Previous</a>
  60. <a rel="next" href="/en/weblog/2016/03-March/20.xhtml">Next&gt;</a>
  61. <a href="/en/weblog/latest.xhtml">Latest&gt;&gt;</a>
  62. </p>
  63. <hr/>
  64. </nav>
  65. <header>
  66. <h1>phpDocumentor</h1>
  67. <p>Day 00378: Saturday, 2016 March 19</p>
  68. </header>
  69. <p>
  70. On <a href="ircs://kitsune6uv4dtdve.onion:6697/%23Volatile">#Volatile</a>, ion was talking about how hard it is to get onto the <a href="ircs://sbuk7aqcxkoyipwv.onion:49202/">Anonops <abbr title="Internet Relay Chat">IRC</abbr> network</a>.
  71. The problem is that they ban <abbr title="The Onion Router">Tor</abbr> users, then allow them to use an onion address to access the network if and only if the user has an account that has permission to use <abbr title="The Onion Router">Tor</abbr>.
  72. Acquiring permission to use <abbr title="The Onion Router">Tor</abbr> requires being an active participant on the network for three days, then specially requesting it.
  73. At that point, it&apos;s a bit too late for using <abbr title="The Onion Router">Tor</abbr> to do some of the good that it should be doing, and Anonops knows who you are.
  74. For a group that is supposedly really big on being anonymous, they sure do hate anonymity! Really, they&apos;re just a lot of hypocrites.
  75. I&apos;ve set up an onion port forward to make accessing the network over <abbr title="The Onion Router">Tor</abbr> possible for the requisite three days.
  76. </p>
  77. <p>
  78. I figured that it was about time that I both expanded the comments in include.d and wrote up some online documentation for these classes, functions, and constants.
  79. As I wanted the comments to contain everything useful from the online documentation and maybe a little more, I looked into <a href="https://phpdoc.org./">phpDocumentor</a>.
  80. <abbr title="PHP: Hypertext Preprocessor">PHP</abbr> even has a <code>T_DOC_COMMENT</code> token, which kind of means that that comment style is the kind favored by the developers.
  81. I got phpDocumentor running, but it seems like it has some disadvantages.
  82. The main issue is that it generates a documentation file for each named construct and another one for each code file.
  83. Because of the way <abbr title="PHP: Hypertext Preprocessor">PHP</abbr>&apos;s autoloading works, the most effective way to define classes is one per file.
  84. In turn, my understanding is that this autoloading behavior was decided upon because of how common it was for programmers to put one class in each file.
  85. In other words, it&apos;s a very common use case that there would be no need to have separate documentation for files and classes.
  86. Additionally, I use the same convention for my functions and constants to avoid having to load functions and constants that won&apos;t be used in a particular project.
  87. Half of the documentation files generated aren&apos;t useful, and they can&apos;t just be removed, as the file documentation pages and the class documentation pages link to each other.
  88. The documentation also shows the values of all the constants.
  89. Needing to know the values of the constants kind of makes constants less valuable.
  90. Looking at the source code, the source code uses capital letters in some (though not all) <abbr title="Hypertext Markup Language">HTML</abbr> tags, meaning that documentation generated would need to be cleaned up before being served as <abbr title="Extensible Hypertext Markup Language">XHTML</abbr>.
  91. The documentation generated also makes use of deprecated <abbr title="Hypertext Markup Language">HTML</abbr> attributes which would also need to be cleaned up.
  92. While I can&apos;t live with the unclean code, I think I could deal with the other issues.
  93. The documentation also makes heavy use of frames, but I could pass that off of being the fault of the documentation generator and call it fine.
  94. </p>
  95. <p>
  96. I tried upgrading to a more recent version of phpDocumentor, and that fixed some of the issues.
  97. The code was a lot cleaner, though the deprecated attribute was still used on one page.
  98. This page detailed errors found during documentation generation, and I think once I go through and correct the errors, the deprecated element would disappear from the file.
  99. The frame use in the new version is outright confusing and difficult to navigate though.
  100. Additionally, some navigation elements don&apos;t work without JavaScript enabled and the self-closing syntax of <abbr title="Hypertext Markup Language">HTML</abbr> tags is used inconsistently.
  101. Some <abbr title="Hypertext Markup Language">HTML</abbr>-only entities are also used, which don&apos;t seem to function correctly when use with <abbr title="Extensible Hypertext Markup Language">XHTML</abbr> and the <abbr title="Hypertext Markup Language">HTML</abbr>5/<abbr title="Extensible Hypertext Markup Language">XHTML</abbr>5 <code>&lt;!DOCTYPE&gt;</code>.
  102. I blame the fact that the <abbr title="Web Hypertext Application Technology Working Group">WHATWG</abbr> got all the useful information stripped from the <code>&lt;!DOCTYPE&gt;</code> declaration.
  103. They thought that stripping it down would make it easier for developers.
  104. However, in <abbr title="Extensible Markup Language">XML</abbr>, only the five <abbr title="Extensible Markup Language">XML</abbr>-defined entities can be used unless the <code>&lt;!DOCTYPE&gt;</code> declaration is used to pull in other entity definitions or the entities are defined within the <abbr title="Extensible Markup Language">XML</abbr> file itself.
  105. With further experimentation, I came to the conclusion that I need to build my own template set for use with phpDocumentor, but the documentation on how to actually do that is <a href="https://manual.phpdoc.org./HTMLSmartyConverter/PHP/Converters/HTMLSmarty/tutorial_HTMLSmartyConverter.cls.html">missing</a>.
  106. </p>
  107. <p>
  108. I applied for three jobs, found one place isn&apos;t hiring, and tried again to apply at a place that has a broken website.
  109. The website is still too broken to make application possible.
  110. </p>
  111. <p>
  112. I haven&apos;t been able to find my wallet all day.
  113. I fear that I lost it when I was out yesterday.
  114. That would really suck.
  115. Hopefully I simply misplaced the wallet here at home and it turns up soon.
  116. </p>
  117. <hr/>
  118. <p>
  119. Copyright © 2016 Alex Yst;
  120. You may modify and/or redistribute this document under the terms of the <a rel="license" href="/license/gpl-3.0-standalone.xhtml"><abbr title="GNU&apos;s Not Unix">GNU</abbr> <abbr title="General Public License version Three or later">GPLv3+</abbr></a>.
  121. If for some reason you would prefer to modify and/or distribute this document under other free copyleft terms, please ask me via email.
  122. My address is in the source comments near the top of this document.
  123. This license also applies to embedded content such as images.
  124. For more information on that, see <a href="/en/a/licensing.xhtml">licensing</a>.
  125. </p>
  126. <p>
  127. <abbr title="World Wide Web Consortium">W3C</abbr> standards are important.
  128. This document conforms to the <a href="https://validator.w3.org./nu/?doc=https%3A%2F%2Fy.st.%2Fen%2Fweblog%2F2016%2F03-March%2F19.xhtml"><abbr title="Extensible Hypertext Markup Language">XHTML</abbr> 5.1</a> specification and uses style sheets that conform to the <a href="http://jigsaw.w3.org./css-validator/validator?uri=https%3A%2F%2Fy.st.%2Fen%2Fweblog%2F2016%2F03-March%2F19.xhtml"><abbr title="Cascading Style Sheets">CSS</abbr>3</a> specification.
  129. </p>
  130. </body>
  131. </html>