{"id":357,"date":"2015-03-01T19:37:12","date_gmt":"2015-03-01T19:37:12","guid":{"rendered":"http:\/\/mjdarby.net\/blog\/?p=357"},"modified":"2015-03-01T19:37:12","modified_gmt":"2015-03-01T19:37:12","slug":"hermes-a-textboard","status":"publish","type":"post","link":"http:\/\/mjdarby.net\/blog\/2015\/03\/01\/hermes-a-textboard\/","title":{"rendered":"Hermes &#8211; A Textboard"},"content":{"rendered":"<h3>Internetless in London<\/h3>\n<p>Something strange happens when you&#8217;re suddenly disconnected from the Internet for a long period of time: You find other things to do. After cleaning the bathroom and tidying my room twice, beating some video games on my backlog, and somehow losing offline access to Spotify (thanks Spotify), it was time for something useful. It was time to watch a lot of Japanese drama.<\/p>\n<p>I&#8217;d already watched\u00a0<a href=\"http:\/\/en.wikipedia.org\/wiki\/Densha_Otoko\"><em>Densha Otoko<\/em><\/a> before, but I remembered it being a particularly fun romantic romp, incorporating Japanese internet culture into the plot as a major driving force. Amazingly, it&#8217;s based on a true story. Well, as true as a story from the Internet can be. The plot revolves a nerd called Yamada, who is far more comfortable in the company of his excessive collection of anime figures than around people. One fateful evening\u00a0on the way back from an\u00a0<em>otaku<\/em>\u00a0themed event, Yamada encounters a young woman being harassed by a drunk passenger. Mustering all of his courage, he steps in and promptly gets beaten up by the drunk. Fortunately, help arrives and Yamada is saved. The young woman asks for Yamada&#8217;s address so she can send him a thank you present.<\/p>\n<p>Once home, Yamada leaps on to his favourite Internet\u00a0<em>textboard<\/em>, Aladdin Channel, and writes a post describing his experience and asking for advice. The plot continues with Yamada, dubbed the Train Man (<em>Densha Otoko<\/em>) by the textboard, putting Aladdin Channel&#8217;s advice into action,\u00a0and attempting to win the woman&#8217;s heart.<\/p>\n<p>While<em>\u00a0<\/em>watching the show, I figured I could do something productive at the same time. <em>Hermes<\/em> is my first attempt at a proper, fully-featured Django application. Of course, <em>Hermes<\/em> is a textboard.<\/p>\n<h3>\u00a0What&#8217;s a textboard?<\/h3>\n<p>If you&#8217;ve ever been on an Internet forum, you&#8217;re already familiar with a different\u00a0version of the textboard. Textboards are piece of software that allow an administrator to create a number of <em>boards<\/em>, on which users can post <em>threads<\/em> and replies to those threads. The biggest textboard out there is <em><a href=\"http:\/\/www.2ch.net\">2channel<\/a><\/em>\u00a0(NSFW), on which the original &#8216;real life&#8217; <em>Densha Otoko<\/em> story was posted. It boasts over 600 boards covering a huge range of topics, and a healthy user base.<\/p>\n<p>With textboards, there are two main differences from your standard forum software:<\/p>\n<ul>\n<li>Users do not need to register to use a textboard. Indeed, registration likely is not\u00a0an option at all. Users post either anonymously or with a nickname they provide. These nicknames are not secured in any way, meaning any user could take any nickname. Users who want their posts to be attributed to them and only them can post with a\u00a0<em>tripcode<\/em>, a secret password known only to them that generates a hash that is attached to their posts.<\/li>\n<li>The content of the first post of each thread is shown on the board page, as well as the content of the latest three or four posts in that thread. This differs from most forum software, which will only show a list of thread subjects on a given board&#8217;s page. Because of the way the content of each thread&#8217;s first is shown, subjects for each thread are not mandatory on textboards.<\/li>\n<\/ul>\n<p>In addition to the above, threads are pruned from the database after they see a certain amount of inactivity. <em>Hermes<\/em>, for example, is configured to delete the oldest thread if the total number exceeds fifty on a single board.<\/p>\n<p>If \u00a0you add images to the mix, you get an\u00a0<em>imageboard<\/em>. It&#8217;s likely you might have heard more about these, such as the infamous <a href=\"http:\/\/www.4chan.org\/\">4chan<\/a> and its Japanese counterpart <a href=\"http:\/\/www.2chan.net\">2chan<\/a>\u00a0(both NSFW).<\/p>\n<p>Perhaps due to in part\u00a0of the transient nature of posts and identity on these text- and imageboards, the culture that develops is that of a hivemind. Voices that try and rise above the others by using a name or\u00a0<em>tripcode<\/em> are often berated and ignored. Of course, anonymity comes with its <a href=\"http:\/\/www.penny-arcade.com\/comic\/2004\/03\/19\">own problems<\/a>. Unfortunately, I&#8217;m not an anthropologist, so I can&#8217;t really go more into that.<\/p>\n<h3>Why Hermes? And why aren&#8217;t you spelling it right?<\/h3>\n<p>&#8216;Hermes&#8217; is the name given to the female protagonist of <em>Densha Otoko<\/em> by the denizens of Aladdin Channel after Yamada receives a set of\u00a0Herm\u00e8s teacups from her. The Internet was down so I couldn&#8217;t Google around for cool names to give my textboard, so <em>Hermes<\/em>\u00a0ended up being the name of choice.\u00a0The name in the drama isn&#8217;t pronounced with the lovely accent on the <em>e<\/em>, so I elected to not use it.<\/p>\n<h3>Django Unplanned<\/h3>\n<p>My lack of Internet connection put some limitations on what I could use for this project. Sure, I could enable tethering on my phone, but to pull down entirely new software packages? That would get messy for my phone bill. <em>Django<\/em> happened to be installed on my Virtualbox after an abortive attempt at another web site, so I figured &#8216;hey, why not use Django?&#8217;<\/p>\n<p>Reading the tutorials on my tiny S3 phone&#8217;s screen was a less than exciting experience, but with just a couple of hours work\u00a0I had a super basic textboard working. Django makes <a href=\"http:\/\/en.wikipedia.org\/wiki\/Create,_read,_update_and_delete\">CRUD<\/a>\u00a0applications very easy to implement. It only took a few dozen lines of code to implement the initial database structure, and the templating system for the front-end is pretty intuitive when it came to the front-end.<\/p>\n<h3>Heroku<\/h3>\n<p>The demo instance of <em>Hermes<\/em> (<em>Hermes Channel<\/em>) is deployed on <a href=\"https:\/\/www.heroku.com\"><em>Heroku<\/em><\/a>, an infrastructure-as-a-service platform geared towards people like me who hear the word &#8216;infrastucture&#8217; and fall asleep, only to be greeted by dark nightmares of configuration files and servers. It&#8217;s so easy to use: Once your Django app is ready and you&#8217;ve got a file describing your prerequisites\u00a0you need, you can just commit to a Git branch hosted on Heroku, and they deal with the deployment automatically.<\/p>\n<p>It also has the added benefit of being free: You get a free 10k row <em>Postgres<\/em>\u00a0database, and 750 free hours per month to run your <em>dynos<\/em>.\u00a0An Heroku dyno is basically a Linux instance that your application (or worker jobs) will run on. When you deploy an application to Heroku, it is deployed to all your dynos and started automatically. If you have just one dyno, the free allowance\u00a0is enough to last the entire month! Of course, if your application has high traffic, it is likely you&#8217;ll need more than a single dyno to support it. But then again, if you have that much traffic you&#8217;re probably earning enough money to support beefing up your Heroku too, so&#8230;<\/p>\n<h3>The Demo!<\/h3>\n<p><em>Hermes<\/em>\u00a0is effectively feature-complete, so\u00a0why not <a href=\"http:\/\/hermeschannel.herokuapp.com\/\">check out the demo<\/a>? It&#8217;s mobile friendly! It&#8217;s easy to make posts too. If you&#8217;re interested in knowing how it all ticks, the source code for\u00a0Hermes is <a href=\"https:\/\/github.com\/mjdarby\/Hermes\/\">available on Github<\/a>.<\/p>\n<p>Okay, fine, you can have a screenshot.<\/p>\n<figure id=\"attachment_364\" aria-describedby=\"caption-attachment-364\" style=\"width: 817px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/mjdarby.net\/blog\/wp-content\/uploads\/2015\/03\/Hermes.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-364 size-full\" src=\"http:\/\/mjdarby.net\/blog\/wp-content\/uploads\/2015\/03\/Hermes.png\" alt=\"This feels familiar somehow.\" width=\"817\" height=\"544\" srcset=\"http:\/\/mjdarby.net\/blog\/wp-content\/uploads\/2015\/03\/Hermes.png 817w, http:\/\/mjdarby.net\/blog\/wp-content\/uploads\/2015\/03\/Hermes-300x200.png 300w\" sizes=\"auto, (max-width: 817px) 100vw, 817px\" \/><\/a><figcaption id=\"caption-attachment-364\" class=\"wp-caption-text\">This feels familiar somehow.<\/figcaption><\/figure>\n<p><a href=\"http:\/\/hermeschannel.herokuapp.com\">Check it out!<\/a>\u00a0<em>Hermes<\/em> will be released under the GPLv3. Releasing the software was always the main point of the project, the fact there&#8217;s a demo instance is just a pleasant bonus! Just follow the instructions on the <a href=\"https:\/\/github.com\/mjdarby\/Hermes\">Github page<\/a> for installation, and you&#8217;ll be away (provided you know a bit about how Django works).<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Internetless in London Something strange happens when you&#8217;re suddenly disconnected from the Internet for a long period of time: You find other things to do. After cleaning the bathroom and tidying my room twice, beating some video games on my backlog, and somehow losing offline access to Spotify (thanks Spotify), it was time for something <a class=\"read-more\" href=\"http:\/\/mjdarby.net\/blog\/2015\/03\/01\/hermes-a-textboard\/\">[&hellip;]<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19,7,8],"tags":[],"class_list":["post-357","post","type-post","status-publish","format-standard","hentry","category-hermes","category-programming","category-semi-essay"],"_links":{"self":[{"href":"http:\/\/mjdarby.net\/blog\/wp-json\/wp\/v2\/posts\/357","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/mjdarby.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/mjdarby.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/mjdarby.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/mjdarby.net\/blog\/wp-json\/wp\/v2\/comments?post=357"}],"version-history":[{"count":15,"href":"http:\/\/mjdarby.net\/blog\/wp-json\/wp\/v2\/posts\/357\/revisions"}],"predecessor-version":[{"id":373,"href":"http:\/\/mjdarby.net\/blog\/wp-json\/wp\/v2\/posts\/357\/revisions\/373"}],"wp:attachment":[{"href":"http:\/\/mjdarby.net\/blog\/wp-json\/wp\/v2\/media?parent=357"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/mjdarby.net\/blog\/wp-json\/wp\/v2\/categories?post=357"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/mjdarby.net\/blog\/wp-json\/wp\/v2\/tags?post=357"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}