2012-01-06 - Automation
Automation is basically awesome, especially when you're the one automating stuff. You get to spend hours and hours having fun working out how to automate things and then you can sit back and relax knowing that you no longer have to do some other tedious or repetitive work because the automation now does that work for you all by itself. It’s like automation is converting boring time into fun time all while saving you time. It’s a very good feeling.
Anyways, the reason I’m talking about automation is because I just redid a portion of the site. If you look at the URL of this page and several others you will notice that it says .php instead of .html. The reason for this is that the page you are viewing has actually been constructed on the fly from several different files using a php script. The first file it uses is the template.html file which will eventually be used as the basis for every page on this site. It contains the basic layout as well as the navigation buttons on the side and the logo at the top. If you are viewing this as an individual post the next file loaded will be the post#.html file where # is determined by the ?post=# parameter set in the URL. For example this text will be loaded from post0027.html. After that is completed it starts loading from post.html which is the template for the post page. That page contains javascript which will consult post#.xml (post0027.xml) to get the list of comments for the specific post as well as the comment form for adding new comments which uses another php script to append the new comment to the xml file.
If you are viewing this page on the index then things are done slightly differently. The main template is still used to ensure that things are consistent but the index.php script doesn’t specify which posts to display, Instead it gets a list of posts by finding all files of the format “post*.html” in the posts folder. Once it has this list of files it displays the contents of the last four files in the directory which (assuming it finds the files in increasing order which so far seems to be the case) will been the latest four entries. The archive.php script finds all the files the same as the index but instead of displaying just the latest ones it goes through every file one by one. It first opens the file to get the first line which contains the title and date and then uses this information to create the headings and links.
The reason I’ve added these scripts is, as you may have guessed, automation. My goal was to make it so that if I wanted to change something I only had to modify one file and have changes to that one file automatically get displayed on the relevant pages. This is where the templates come in. To change the logo I simply change it in template.html. To change something about how comments are displayed I simply change it in post.html and it will be reflected on all the post pages. The scripts read these files so changing them will cause different information to be displayed by the scripts. There is also some automation in how some pages display content now. The Index and archive pages use the files in the posts folder to determine their content and therefore don’t require me to edit them every time I post something new. If everything works when I add a new file the scripts on these pages should automatically find it and display it as necessary.
See how fun automation is?
2011-12-04 - Comic Roundup
So I haven’t been posting much in the last few months. I’ve written a few drafts but I’ve mostly been too busy with school and avoiding schoolwork to get anything posted. Luckily (or unluckily as the case may be) I’ll be done school in January and have loads of free time to do lots of writing. In the mean time here are some of the comics I’ve done in the last few months.
60. Fun with Explosions: Part 4
In the trilling conclusion of the Fun with Explosions mini-series, Striker doesn't have a problem, he has become one with the boom.
61. Combine Pairs: Episode 4 –An Arrest
In this brand new episode the pair is arrested over a misunderstanding.
62. Fun with Airplanes
In this random comic Pilots try to deal with a rather unusual mid-air emergency.
63. If At First...
In this comic I take a look at a common saying.
2011-09-25 - Temporal Paradox
So I watched a movie on TV yesterday. It seemed a fairly low budget movie but David Hewlett (McKay) was in it so I figured I’d watch it and see how it was. The movie was called Morlocks and as you might be able to guess it was a sort of retelling of “The Time Machine”. Instead of the original premise of a scientist building a time sled, it was the army and a scientist building a time portal thing. Now the CGI in the move was a bit off and some of the plot is rather dumb but overall it was a fairly alright movie. Now the reason I bring this up is because there was a paradox in the movie and paradoxes are fun.
In the movie, as in the original, the Morlocks are mutated human beings found in the future. They are described as being more primitive in some respects but stronger in other which leads the man in charge of the expedition to want to steal their DNA. You see his son has cancer and the doctors keep telling him there’s nothing that can be done so he figured if he injected his son with DNA from the future he could save him. The end of the movie hints that this did in fact happen and that injecting the kid with the DNA actually resulted in the Morlocks.
This is what’s known as a “Bootstrap paradox” because the Morlocks DNA is never actually created. The DNA comes from the Morlocks in the future which is then injected into the kid and ends up making the Morlocks of the future. It’s a closed loop with the effects being their own cause. The DNA has no origin, it never came from anywhere, and it just is because it was. I’ve always found things like that to be rather fascinating because the DNA is essentially trapped in a never ending cycle with itself.
I just thought it was interesting.
2011-09-24 - Word Play
While watching a TV show last week I came across an interesting phrase “You are not in a position to make demands”. I find this phrase interesting because it or variations of it are used quite commonly in film and television but it’s entirely wrong. In these situations the person trying to make demands is usually held hostage or otherwise imprisoned. The implication is that because they are being held that they can’t enforce any of their demands. There’s no reason for the person holding them to do what they say because they can’t do anything against them being they are in a cell or something. The problem is that the phrase doesn’t actually mean that.
To make a demand all you have to do is demand something. “I DEMAND CHIPS” is a demand regardless of the situation in which it’s used. People who are being held by other people usually demand to be let free or demand to be told why they are there which usually leads the person holding them to utter the phrase in question. Now the person is making demands and as such you can’t tell them they can’t make demands. If they weren’t in a position to be making demands you wouldn’t have been able to hear their demand and feel the need to reply that they aren’t able to make them. If someone was gagged or kept unconscious they wouldn’t be in a position to make demands because they couldn’t; however, the person holding them isn’t likely to say that they aren’t in a position to make demands because the person wouldn’t be making any.
The intended meaning of the statement has less to do with the person’s ability to make demands but more to do with the ability of the person to make successful demands. The person is being held captive so they don’t really have a lot of weight when it comes to negotiations. They can demand whatever they want but they aren’t really likely to ever get anything from it. One might use phrases like “You can make demands all you like, but no one’s going to do anything about them” or “Continue to make fruitless demands, you are just wasting your breath”. Something that makes it clear that you aren’t really interest in their demands but without denying something that they are clearly able to do. Alternatively you could just gag people and then tell them they can’t make demands.
I hope this helps you in your future kidnapping endeavours.