12.xhtml 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <?php
  2. /**
  3. * <https://y.st./>
  4. * Copyright © 2015 Alex Yst <mailto:copyright@y.st>
  5. *
  6. * This program is free software: you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation, either version 3 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program. If not, see <https://www.gnu.org./licenses/>.
  18. **/
  19. $xhtml = array(
  20. 'title' => 'The weblog index is complete',
  21. 'body' => <<<END
  22. <p>
  23. I updated the &quot;weblog&quot; link to point directly to <code>/weblog/2015/</code> instead of <code>/weblog/</code>, as there are no other files in that directory yet, and there won&apos;t be for some time.
  24. </p>
  25. <p>
  26. $a[PHP]&apos;s <code>dir()</code> function returns an object that cannot be iterated over.
  27. The intuitive thing to do is to iterate over the directory with a <code>foreach</code> statement, but that simply cannot be done.
  28. Instead, every time I need to iterate over a directory in $a[PHP], I have to look up the proper method to do it again.
  29. Tired of this, and still trying to build up my $a[PHP] toolbox, I built a simple generator function that can be used in the intuitive way.
  30. However when I tested it, I was quickly reminded of the fact that $a[PHP] does not return the contents of a directory in the intuitive (alphabetical) order.
  31. Instead, the directory contents are returned in whatever order they are stored in on disk.
  32. For many use cases, this doesn&apos;t matter, but in some, it&apos;s a pain to deal with.
  33. I reworked the function, changing it from a generator function to a regular function that returns an array of alphabetized file names.
  34. </p>
  35. <p>
  36. After coding that much-needed function, I set about trying to figure out how I wanted to parse month information out of directory names.
  37. I ended up deciding that anything I came up with would cost more computational power than just hard coding the names I use for month directories into my script.
  38. It seems messy to do that, but everything else I could come up with was messier.
  39. As a result, I ended up not needing the alphabetizing of directory contents for the time being, though it is still nice to have for later.
  40. You can&apos;t predict what order things will land on the file system, but you can predict the results of an alphabetized listing.
  41. </p>
  42. <p>
  43. Using $a[CSS] a flex box, I set the $a[ASCII] calendar pages to display side by side on weblog year index page.
  44. At this point, the weblog month index pages are pretty much deprecated.
  45. The will continue to exist in case there are any existing links to them and in case someone tries to reach them by deleting the file name from the $a[URI] of a weblog entry page, but no links to them will exist on my site any more.
  46. Using a flex box introduced a bug in the mobile version of the site due most likely to the mobile browser not supporting flex boxes.
  47. This seems strange to me, as small screens are where you would need flex boxes the most.
  48. Adding a <code>text-align</code> attribute (which is ignored by Web browsers that support flex boxes) made the mobile version of the site display better, though I don&apos;t think it will provide the desired results on larger mobiles, such as tablets.
  49. </p>
  50. <p>
  51. I did a little experimenting today, and found that Cricket has indeed cut off my telephony properly.
  52. However, they have not cut off my data access, and I still have full Internet connectivity.
  53. This seems like a huge oversight in their system to me.
  54. Personally, I never use telephony if I can at all avoid it.
  55. The value of the connection to me lies entirely in the Internet access.
  56. I don&apos;t know why their system has not cut me off, but I know this is too good to last forever.
  57. My guess is that the connection will die completely after the 60 day suspension period has ended.
  58. </p>
  59. <p>
  60. Another benefit of the new calendar setup for the weblog index is that it acts as a sort of second <a href="/a/canary.txt">canary</a>, though this was not at first the intention.
  61. I write in my weblog every day, so if any day is missing from the calendar, it will stick out like a sore thumb.
  62. </p>
  63. END
  64. );