2010-08-30 19:49Implementing Genesis in JavaI got talking to a colleague from work about the philosophical issues of morality and surveillance (does being surveilled make people more moral?) and we ended up discussing the moral and societal framework of the Garden of Eden, as described in the book of Genesis, in the Old Testament of the Bible. He made an interesting point that, being unaware of the existence or nature of evil, Adam and Eve may not have been best equipped to determine whether a statement was a lie, or even know to ask themselves the question of whether something was a lie or not, being unaware of such things. As programmers, one natural way to express ourselves clearly on such important theological questions was to write some software, and sure enough my colleague wrote a PHP implementation of the Human class, and pointed out the inherent flaw in the design, which was, he claimed, a flaw in the design described in Genesis. I was not so convinced that he had implemented the Genesis specification correctly, however, which perhaps shows that Intelligent Design should be left up to God (and even God might want to implement it via an evolutionary algorithm instead), but I decided to give it a go myself, confident that, whatever language God used, I would stand a better chance using Java than I would PHP. 2010-08-30 19:49Using the DIV tag to replace tablesThis month I attended an enjoyable party which happened to have some A-list celebrities (of the Free Software world) present. I did feel slightly out of my depth when the topic of conversation turned to compiler optimisation bugs, but as luck would have it, I found myself listening to a conversation about web design. “I know this!” I thought, as the conversation developed into a good-humoured flame war about the semantic validity and practicality of using the TABLE tag for presentation. Fortunately I was not the only one to believe that using the TABLE tag this should be avoided at all costs, and that meant I didn’t have to argue the point. I did end up, however, talking to someone trying to understand the precise use case they had in mind that encouraged them to use tables, and they weren’t even happy with the result, so I knew it was my duty to educate myself and others about what the alternative DIV-based design would be. 2010-07-31 18:04Checking PHP security with PHPOne interesting thing about software is that because it is written in a language that a computer can understand, it is also possible, in theory, to get the computer to tell you things about that software. There are various classes of utilities from static analysers to code style checkers, but I have recently been considering how possible it is to check for uses of specific deprecated functions and classes in a PHP project. The actual checker I was thinking of creating would be written in PHP itself, but because the process would be a static analysis one, which I hoped didn’t have to resort to tokenising the PHP source code it was examining, this checker could in fact be written in any language just as (if not more) easily. As is often the case in my blog posts about PHP recently, it turns out that various “features” of PHP make things more difficult (regardless of the language that the checker is written in), although trying to solve a problem the wrong way doesn’t help either. Continue reading "Checking PHP security with PHP"2010-07-31 18:04The problems with banksI recently had trouble buying something online and this resulted in me having to go into a local branch of the bank with which I had the account I was trying to use. There had actually been several issues which had been accumulating with this account, and so I thought that attending in person might be the quickest way to get things sorted out, but the process ended up taking a lot longer than I thought. Fortunately along the way I had an enlightening and somewhat amusing conversation with the cashier who was trying to help me, and I thought that I should share some of the things I have learnt. For privacy reasons I will not go into details about the current state of my account, nor will I disclose which bank it is I have this account with, but I hope it will give people a benchmark to compare their banks against, and I would be interested to know which banks don’t have the same problems as the ones I describe (or have other problems). Continue reading "The problems with banks"2010-06-29 21:36Hacking the dependencies of a downloaded Debian packageYet again I have found myself on the wrong side of Debian’s strict packaging policy. There is a piece of software that I want to install which isn’t packaged for Debian, but which fortunately is packaged for the sister distro, Ubuntu. This alternative source of packages is only useful, though, if Ubuntu uses sufficiently similar package names and version numbers, otherwise the Debian package management tools will treat the package as invalid due to dependency problems. The last time I had to deal with this sort of problem was with an earlier version of the same package, plasma-widget-adjustableclock, but this time the dependency problem is slightly different and I’ve tried fixing the problem in a different way too. Below I detail what the problem is, and my not-entirely-successful efforts at solving it. Continue reading "Hacking the dependencies of a downloaded Debian package"2010-06-28 23:13EU state flowersThe opportunity to speak with Americans about their federal system is one I rarely turn down, as it helps me understand Europe’s federal system. While talking to a particular American, I found that, despite the stereotypes, they did not believe that the EU was a federal country, and although this meant they agreed with the vast majority of Europeans on the matter, I decided to dismiss their view as uninformed and presented them with a video of the EU president celebrating the EU national day by reading a speech and watching the EU flag being lifted by members of the EU army, followed by a military band performance of the EU national anthem. I feel, though, that to really convince an American (and possibly a European too) that the EU is a country, I must provide a list of the state flowers of each of the EU states, which was, as I explained in an earlier blog post, one of the only things the EU was missing. Continue reading "EU state flowers"2010-05-31 20:10Getting a domain nameI’ve recently made a few changes to my blog and thought that, in the self-referential tradition of bloggers, I should mention some of the decisions I made and how they affect my blog. The most external change, and the one mentioned in the title of this post, is that I do now have a domain to host this blog on. By “external” I don’t just mean it is potentially visible in your address bar when you visit any page of the blog, I also mean that it involved interaction with various third parties. It is a change I had been meaning to make for a while now, and one I should have made long ago, but hopefully it should last a long time. Continue reading "Getting a domain name"2010-05-31 20:10
The only other problem with PHP Posted by Hagfish
in Programming at
20:10
Comments (0) Trackbacks (0) The only other problem with PHPBy a strange coincidence, I’ve recently bumped into another PHP gotcha, well, actually three of them depending on how you’re counting, but I’m sure that these must be the last three unexpected things about PHP and I won’t soon have to write another blog post detailing something else unintuitive that PHP does. The reason these could be seen as one gotcha is that they all involve PHP’s support for floating point numbers, so one workaround would just be to not use that datatype at all in your programs. As I will show though, it is harder than you might think to avoid them, so perhaps the best advice is to avoid using numbers at all. To be on the safe side though, maybe you should just use a different programming language. Continue reading "The only other problem with PHP"2009-02-28 17:05Why is there so much spam?Email is an open standard, or several standards, as well as being many other things, such as a means of communication. Something that people might consider from time to time is “Why there is so much unsolicited bulk email?”, although for some people the answer is obvious. Others might not ever ask themselves that question, even if they use email, because they believe the spam problem has been beaten, but it hasn’t, and it is costing email providers and society a lot of money. I have been thinking about this issue myself recently, and on and off for a while, and I have some thoughts about it. While I have neither come up with a means for ending all spam, nor decided that the current email system should be abandoned, I do have a collection of thoughts which help me frame the issue and might help other people in some way. Continue reading "Why is there so much spam?"2009-02-28 17:05Is OpenID a good idea?I haven’t written many blog posts about open standards recently, and that’s possibly because all the old standards are too boring and the new ones are too immature, but I think that OpenID has now matured enough and is seeing enough adoption that it is reasonable to comment on it. It is also receiving a lot of criticism, and, while I don’t like to get caught up in knee-jerk arguments, I do feel that there are some legitimate concerns that people have about this promising standard, which I might be able to address with a coherent defence of it in this blog post. Fortunately the defence I’ve come up with should answer many of the objections to OpenID at the same time, as it puts forward a very different way of looking at the technology, one which may not be obvious to people when they first learn about it. I will first state my idea clearly for the record, then deal with any criticism I can imagine being levelled against it. Continue reading "Is OpenID a good idea?"2009-01-31 19:51Is Europe A Country?People can get in trouble for confusing a continent with a country, but actually neither term is particularly well defined. The continental borders of Europe, for instance, are often debated, and even the idea of Europe being a continent is contested by some. It has come to my attention, though, that I myself have made a mistake regarding the status of Europe, or at least the EU, a concept close to my heart (even if the implementation of the concept can at times fall short). It was six months ago in this very blog that I listed “Ambassadors” as one of the characteristics “that makes the EU different from a country”, but I have since learnt that this is not strictly true. Somehow, the EU has managed to convince its member states that it needed diplomatic relations with at least two (other?) countries. To confuse things slightly, there are also ambassadorial level relations with the similarly structured African Union (although not yet with the Union of South American Nations) as well as with the higher level UN. This has all led me to start thinking about what makes a country, and, perhaps dangerously, whether the Lisbon Treaty turns the EU into one (assuming it isn’t already). Continue reading "Is Europe A Country?"2009-01-31 19:51A New Year, A New HostSadly all good things must come to an end, and if you tried accessing this blog at its old address this year, you would see that “The Esuna Networks project finished on the 31st December, 2008.” It was that project that provided me with my first hosting, and I am greatly indebted to it for granting me a home on the web for so long. With its demise, I have had to migrate to pastures new, and have found myself here at MTV Europe (no, not that MTV Europe) where my blog is free to continue, at least for now. I feel I do have to say, though, how much I will miss the excellent friendly service of Esuna, for which I never had to pay a cent, and that I hope the admin goes on to even greater projects and is duly rewarded. We were given plenty of warning about the closing of the service, and so for a while I had been researching alternatives before selecting this one, and I have been very happy with it for the few months I’ve been using it. Continue reading "A New Year, A New Host"2008-03-28 01:33Nineteen Eighty-FourNineteen Eighty-Four (henceforth “1984”) is one of those books that seems to follow you around, like Alice in Wonderland. By that I mean that references to it keep cropping up around you, but more than that, it’s like the references to these works somehow encode some information which underlies some central truth to the universe. Follow the white rabbit, as Morpheus would say. In fact it was at the intersection of these two great threads that I resolved to read 1984. I was visiting a very dear friend, who I saw had started reading this book, which piqued my interest in it again, but at some point in my conversation with her, she mentioned one of her favourite books, Alice in Wonderland of course, and I said something like, “Yes, it’s very important for [imaginative artists] like you to read that book.” (or words to that effect) and then said “I wonder if there is an equivalent that [responsible software engineers] like me should read?” Naturally, her reply was 1984. Continue reading "Nineteen Eighty-Four"2008-03-28 01:33
Is Hotwire the best piece of ... Posted by Hagfish
in Uncategorized at
01:33
Comment (1) Trackbacks (0) Is Hotwire the best piece of software yet?The short answer is “no”, in case you are happy to just take my word for it and don’t have time to read my justification for this view. A slightly longer answer would be “Hotwire version 0,710 would be the best piece of software ever (until the next best piece of software ever comes out) if a finite number of bugs were fixed and a finite number of relatively simple features were added.” Many of the bugs and features missing are related to the usability of the user interface, which is to some extent a matter of taste, but there are usability improvements that can be made based on certain widely accepted metrics. Below, then, I give a mixture of a review, an infestation(?) of bug reports, and a design concept. Continue reading "Is Hotwire the best piece of software yet?"2008-02-29 20:32Another IE bug?Just when you start to get surprised at some of the complicated pages that IE7 can render flawlessly, you bump into another almost trivial page which the browser laughably fails on. I think I need to add some more tags for categorising my blog posts, as I don’t want to spend longer than necessary answering the question “Is this IE bug the same as one I’ve already reported?” It appears this one is new, though, so I will write it up. I should say that the bug does not affect Firefox, and I only found it after noticing that IE7 did not have the styling I expected for a piece of popular third party code. Admittedly I can’t state exactly how popular the code is, but it was at least of significant enough size that I did not want to consider maintaining a fork. The good news is I managed to work around the bug in this case with a one line fix, but that is largely to do with the nature of the page, not by finding a universal solution. Continue reading "Another IE bug?" |
QuicksearchCategoriesSyndicate This BlogBlog Administration |