All posts by Owen

Faster than light neutrinos? I wonder…

Just had a massive (no pun intended) discussion about this with a few colleauges (one of which being an ex-nuclear/particle physicist) over a coffee.

Preamble: Neutrinos are notoriously difficult particles to detect. They have barely any mass, and pass through our entire planet effortlessly, without losing speed, or deviating from their course. That we can even detect them at all is still a wonder to me. Even more wonderous, is that CERN manage to accurately send a fairly concentrated beam of neutrinos in a particular direction in order to be detected by the OPERA detector at Grand-Sasso, Italy. It’s like being able to accurately tell which direction the cue ball on a snooker table will be travelling after it has bounced off every other ball on the table, but at a subatomic level where Newtonian physics does not necessarily apply.

Now: regarding the faster than light neutrinos:

The physicists are understandably sceptical about the results, due to it being inconsistent with the observed results from supernova explosions, and also due to it violating Einstein’s laws of relativity that have stood strong in the face of rapidly advancing scientific technology for over 100 years. The other issue is that if these neutrinos were to have travelled faster than the speed of light, then the energy required would be much *much* larger than the energy involved in supernova, which just isn’t possible at the LHC.

A theory, suggested half jokingly by friends and colleauges, was regarding the graph of particle mass against velocity, where as velocity tends towards c, the speed of light, the mass increases rapidly. The energy required to then continue to increase the velocity of a particle then tends to infinity. This is what we maths/physics folk call an asymptote (a point which the curve of a graph continually gets closer to, but never actually reaches, hence infinity). The suggestion was that maybe it wasn’t an asymptote, and that somewhere high up on the scale of energy, the point is reached where a particle can be made to travel at the speed of light, and we just hadn’t noticed it yet.

Whilst certainly an interesting idea, if we were to assume that Einstein’s theory of relativity is absolutely correct, it [the idea] is wrong in quite a few ways. Firstly, as previously mentioned, if the energy required is that high, then we can never have observed it, because CERN (and indeed possibly the world) does not have that kind of energy lying around. Secondly, especially if we observed the mass increasing and increasing, if we were to suddenly reach the speed of light, E=mc² dictates that all the mass in the particle suddenly disappeared. However, since physicists are also still trying to find out if the Higgs Boson exists, which is said to give mass to particles, it could well be that at this insanely high energy, the Higgs Boson is dismissed somehow and the particle loses its mass. Usually, one would say that the mass is lost because it has been converted to energy. But who knows… watch this space.

The only currently possible theoretical situation in which a particle can travel at the speed of light, is if it has no mass at all. Neutrinos were for a long time thought to have no mass, but more recent research with more and more advanced detectors has shown that neutrinos do have mass, albeit ridiculously small. They may be able to reach very close speeds to the speed of light, but should never be able to get there.

However, being good physicists, they’re not dismissing the result completely. They have released a paper (which can be found here: detailing the experiment, how it is set up, and the results produced. They’re also holding a seminar this afternoon to discuss the results with many other prominent theoretical physicists from around the world.

If it is shown that the results were bogus, it may be slightly embarrassing for the physicists involved in the OPERA experiment (who produce these results) who have been studying this for a while now, and have surely and steadily been improving the accuracy of their equipment and timing systems over the years. It’s the extremely costly and science revolutionising equivalent of carefully building up your Jenga tower higher and higher, and then suddenly having it crashing down.

A possibility is that maybe the OPERA detector at Grand Sasso simply got the wrong neutrinos from somewhere else. I’m sure they’ve almost certainly considered this, as they would’ve had CERN’s neutrinos arriving shortly afterwards, and they would’ve noticed that.

In light of all of this, I think the folks at OPERA did the right thing. They didn’t immediately dismiss or accept any new or existing theories, they were very careful to detail their results but still to say “We honestly don’t know”. It would be silly to try and say something for definite. If the results hold, Einstein’s 107 year old theory is broken, as is much of physics; if the results turn out bogus, OPERA need to do some serious re-thinking of their experiment.

However, we’re all just secretly hoping that a computer cocked up and failed to carry a one.


See Also:

Dynamic reloading in Perl

Recently, I’ve been experimenting with dynamically reloading code in the Perl language. My inspiration for this came from seeing IRC robots being disconnected and then reconnected every time the programmer wanted to implement new changes in the code. I thought to myself, “what if you could dynamically reload the code base without having to disconnect the robot, and therefore disrupt the potential services that the robot could be providing?”

In my brain, and on paper, I battled with this concept for a while. When you run a Perl program, it goes through the code to make sure there are no errors, and compiles the program if everything looks good. During the compilation process, Perl builds up the contents of its symbol tables. A symbol table in Perl is (at its most basic level) a global hash (a group of values, accessible by string key values – somewhat like indexing by names than by numbers) that happens to contain symbol table entries for global variables (including the hashes for other symbol tables). These symbol tables often contain variables which refer to subroutines, whether named or anonymous.

Essentially, all these variables (reference names and values) are stored within the program memory. The program is quite happily running its calculations and performing its duties completely independently of the file(s) from which its source code came. So say for example, one of my subroutines was instructed to print “this is the number 1″ to the screen, and I changed the code in the source file to print “this is the number 2″, my running program would still quite happily be printing “this is the number 1″ because that’s the instruction it has loaded into memory.

After some intensive web searching, I came across a module on the CPAN site (Comprehensive Perl Archive Network) called “Module Reload Selective”, which would allow me complete control over reloading individual or many Perl modules at run-time.

Below, I give examples of the code base I used as a test/proof-of-concept of how dynamic reloading can be achieved.

output of ls -R command

The directory structure of my test setup

In order to keep the system as simple as possible, to make implementing and debugging the code as pain-free as I could, I used a very simple structure, as can be seen in the image on the left. In my working directory, I had my file, which represents the main application and contained the code necessary for reloading modules, and also within that directory I had a Test directory, which contained my file: the file that contained the instructions to run, which would be edited by hand to alter the behaviour of the program.

This is

use strict;
use warnings;
use Module::Reload::Selective;
use Test::testmodule;

while(1) {
    test(); #run module's defined subroutine

    #Ensure that the module is reloaded
    $Module::Reload::Selective::Options->{SearchProgramDir} = 1;
    $Module::Reload::Selective::Options->{ReloadOnlyIfEnvVarsSet} = 0;
    Module::Reload::Selective->reload(qw(Test::testmodule)); #reload
    Test::testmodule->import; #re-import
} continue {
    sleep 5;

and here is ./Test/

package Test::testmodule;

use strict;
use warnings;

# allow exportation
require Exporter;
our @ISA = qw(Exporter);
our @EXPORT = qw(test);

sub test {
    print "this is the number 1\n";


It’s quite simple really. Declare all the different modules and pragmas I wish to use, and then start an infinite loop, which will run the defined code from the file, and then reload and re-import that module.

The re-importation line of code is absolutely essential.

Test::testmodule->import; #re-import

Even though the module has been reloaded, the symbol table has not fully been updated. The reason is that the Exporter in essentially does

*main::test = \&Test::testmodule::test;

that is, main::test is assigned a reference to the current version of Test::testmodule::test. Reloading the module redefines the subroutine Test::testmodule::test as intended, but main::test (where the instructions are being called) still refer to the original subroutine. Re-importing then overwrites the subroutine that main::test refers to.

Of course, as amazing and shiny as all that is, wouldn’t it be great to be able to edit files automatically from within the code? Perl is renowned as a text processing language after all, and if you’re a sysadmin looking to do several different tasks one after the other, but don’t want a plethora of Perl files and modules littering your filesystem, and nor do you have the time to sit monitoring your Perl script 24/7 and altering the code according to environmental conditions. You’d much rather write a program that would detect the kind of system you are on (OS, kernel version, gcc version etc.) and re-write once and for all, the subroutine that performs a general task on your specific system.

I did a proof of concept of this as well.

This is the new file:

use strict;
use warnings;
use Module::Reload::Selective;
use Test::testmodule;

while(1) {
    test(); #run module's define subroutine

    my $module = do {
        open my $fh, ";

    $module =~ s/ ([0-9])\\n\";/' ' . ($1 + 1)\n";/e;

    open my $fh, ">", "Test/"
        or die "could not open the module for writing: $!";

    print $fh $module;

    close $fh;

    #Ensure that the module is reloaded
    $Module::Reload::Selective::Options->{SearchProgramDir} = 1;
    $Module::Reload::Selective::Options->{ReloadOnlyIfEnvVarsSet} = 0;
} continue {
    sleep 1;

What this program now does is opens the file Test/ for reading and stores the contents in the variable $module. A regular expression replacement is performed on the $module variable, specifically targeted for the print statement, but when initially matching the regular expression, it captures the number in the statement, and then in the replacement section, adds 1 to the number before substituting it back in.

It then re-opens the same file for writing (not appending), and essentially overwrites all the old code with the new code, before closing the file, and finally reloading the re-written module.

Potential Caveats

it has been shown that re-writing the code can be done automatically, or manually, for module files which are not the main source code file. I see no reason why this powerful technique cannot be used to modify the main file, although you will have to tread extremely carefully on this territory, since reloading is a fragile concept already. Imagine if someone gave you a list of instructions, and when you were halfway through them, all the instructions changed completely, and you were suddenly in entirely the wrong context and situation for the job. The Perl run-time environment would likely hiss an angry error message at you and exit.

This caveat would mean (in the IRC robot context) that if your code which connects to the IRC server is flawed, you will have no choice but to disconnect your robot in order to update the program and perform maintenance.

Generally, it is recommended that the use of module reloading at run-time should be for development and testing purposes rather than for production software use. This is an obvious warning: if you dynamically load defective code into a critical system, you’re just asking for trouble. However, in the case of IRC robots, this is rarely a “critical” issue. The worst that could happen is that your robot floods a channel with text, the server boots your robot off the IRC network, or your bot does something a bit strange and disconnects itself from the IRC server.

However, to avoid clashes with other IRC users employing the services of your robot, it is probably best to implement a “queue” system. By that I mean, if the robot is in the middle of one set of tasks at the point where the reload command is issued, make sure the robot completes its tasks before reloading.


Many thanks to StackOverflow users “cjm” , “Chas Owens” and “bvr” for their help and support in debugging and developing this solution.


Various computer related forums and chat-rooms and Facebook groups that I’ve been frequenting seem to have recently been plagued with the problem of asking questions properly. In addition to this, when a friend very reasonably made a post suggesting that a few Google searches before asking would make life easier for everybody, people blew up. For whatever reason, people objected to being told to use a search engine, using such phrases as “if I got the answers from Google, then I wouldn’t be asking here, would I?”

Thus began a rather monstrous flame war.

I found an excellent document on how to ask questions in a good manner which can be reached at the following address:

The document outlines many factors, such as what you should do before asking the question, how to phrase the question, where to ask the question, and even how you should take care to write properly and use clear and concise language and good grammar.

It is important to note that this is not a personal attack aimed at anyone. It’s simply that a lot of incidences have occurred recently where some people even got mildly upset, and that doesn’t sit well with me. So I decided to devote some of my precious exam-ridden time and once and for all, I’m going to help put it plainly for both the askers and the answerers.

I like to help people. I get an enormous amount of satisfaction out of helping someone to resolve a problem that they are having. I devote time, thought and effort to a query in order to provide useful, and correct information. However, there are some things which can really annoy me at times.

If someone posts a query, I generally assume that they have used a search engine to look up the key words, and read the relevant manual pages about whatever it is they are using. It is my mark of respect for them as a human being that I have made the assumption that they are not a half-wit and will have asked the question out of genuine lack of any idea how to resolve the problem.

This respect rapidly falls apart when it becomes clear that someone has *not* done sufficient web searching or even searched the community in which they post the query. For example, in the Aberystwyth Computer Science Facebook group, I saw three separate posts which copy and pasted the same past exam question about using server-side time, or client-side time. To me, this is laziness, and I am not prepared to make an effort to help those who do not wish to help themselves.

If I devote my limited time and effort into developing answers for questions, I do not wish to answer queries which have clearly not had any time or effort put into them. Copying and pasting a past-paper question and throwing in a very open ended “any ideas?” does not count as effort.

My suggestion to you is… When you do web searches, writing a whole sentence into a search engine such as “What are the potential advantages or disadvantages of using server-side time compared with using client-side time?” is very rarely going to give you any useful results. Refine the query. Pick out the keywords and remove the words that are irrelevant, like “the” and “of”. Better still, remove question related junk like the “What” and the question mark. I trimmed the query down to “server vs client side time” and got a fair few relevant hits out of a search engine.

Suggestion number two: when you do eventually post a question having still not understood, make it clear that you have tried to find out. Saying things like “I searched Google, and found out X, Y and Z information, but I am still unsure about aspects A, B, C” will win you major bonus points in my eyes, and I will be happy to help you. You’re obviously someone that has the drive to learn, and not someone pompously waiting for somebody to pull the answer out of a hat for them. You have also helped those who will help you. By saying that you have found out X, Y and Z, those who answer your question will not waste time explaining X, Y and Z to you, and can focus more on resolving A, B and C.

Thirdly, regarding use of good English, spelling and grammar: I’m fine with informal language and slang terms, but well constructed English is a must when asking questions. There are those who happily brand me and others with the term “Grammar Nazi”, but that’s simply because reading a question that isn’t written properly is substantially more difficult. Extra effort must be devoted to ‘translating’ the rubbish that has vomited itself onto your computer display, and half the time, it isn’t worth it.

If a question is written in the style of “I fink I need help werkin’ out da ansa 2 dis q”, I will immediately write you off as the kind of loser who was lucky to get half a GCSE and ask if I can get a large fries on the side. Writing in the “1337 h4XX0r” style is even worse. It tells me that you’re a loser with more ego than sense.

It all comes back to putting the effort in. If you are not prepared to put in the effort to write English properly, I am not prepared to waste precious minutes of my life trying to figure out what you just said.

Finally, with respect to the flame-war: Generally, text based protocols are not an efficient way of conveying emotions and feelings, and often replies can be misinterpreted as rudeness or elitism. This is usually not the case. If somebody is genuinely being rude, those who know them will probably call them out on it and explain why it was not appropriate. You should not respond directly to the ‘rudeness’, but rather continue the thread as if nothing had been said to you. If somebody misinterprets your intentions as rude and flames up, please for the love of sanity, do not rise to it. Keep quiet and move on with your life. Rising to a flame is only likely to have you marked down as a massive tit, and will not achieve anything except more flames. Each hysteric comment protecting one’s dignity only adds more wood to the fire. Best not to go there really.

Ask a rubbish question, and your query will not be worth my time. Construct a well thought out question and express a desire to learn, and you’ve made yourself a friend.

My Dilemma

I have an academic plan. It is basically along the lines of “finish Computer Science degree –> do Physics degree –> move to Switzerland and work in CERN”. Of course, I am fully aware that this may all go horribly wrong and that I could do something vastly different, but it is a plan, and something to aim for.

Outside of my academic life however, I’m facing a rather large problem. Surprisingly, motivation doesn’t really play such a huge part in this.

The problem is that there are so many things that I wish to do in life. On the list is getting Grade 8 musical theory, taking my piano playing to the next level, learning Welsh, French, German, Spanish, Norwegian, Finnish and Swedish to some degree of fluency, training in a martial art, learning various programming languages, developing my own software, developing web apps… etc, etc, etc. The list is far from complete, but this gives an indication of the size and nature of my problem.

I am passionate about all of the above. I will start to do one thing, and then do a bit of something else, and so on to try and do as much as possible. The end result is that I know lots of bits of various things, but not enough to be considered any good in the respective fields/industries. A jack of all trades and a master of none, as they say. And personally, it makes me feel inadequate and sub-standard.

I know that I’m not, but it’s still a niggling thought if for example, someone asks me a relatively simple question which I do not know the answer to. It is most infuriating.

My solution is to schedule everything. Allocate set amounts of time to these different goals, and set achievable mini-goals within each category. Done spend too long in one go on one thing, or neglect anything else. Simple, yes?

Here is the biggest hitch which forms the core of my dilemma:

With an ever growing list, where in blazes do I even start?

Your comments, thoughts and wisdom would be very much appreciated

Tang Soo Do

Yesterday, I went to watch my father, 9 year old sister and 7 year old brother do their grading for orange belts at the sports hall in Pencoed. I was quite frankly fascinated with the experience, and impressed at the level of skill and respect all of the pupils had.I’d seen my brother and sister sparring (fighting, but without hard contact) at home many times, and thought they were coming on nicely and had a preconception of what to expect from them when I saw the grading, but the two of them blew me away with some solid kicks and some quality board breaking.

On the other side of the room, I could see my father pulling out some equally impressive double snap kicks (Dad, please correct my terminology if needs be; you have an admin account :P ).

The forms were delightful to watch. There was some kind of aura around the room when you see a neat grid of at least 60 people all doing the same forms at the same time to the time of the Master counting in Korean. It just seemed so right.

The whole event was a joy to watch, and all of the involved disciplines were equally as fascinating to behold. The one thing that really blew me away though, was the ultimate sense of respect everyone has for each other.

They bowed to each other before each encounter; they did some apology gesture if they accidentally clouted someone during sparring; every male is referred to as “sir”, and the females likewise referred to as “ma’am”; failed attempts at a manoeuvre were never rebuked, they were always constructively criticised and/or encouraged endlessly; various degrees of black belts bowed to each other upon handing out boards to each other. It is wondrous the discipline that these students of Tang Soo Do have.

Above all, the two people in the room who commanded the most respect were the two Masters Mr and Mrs Humphries. (For convenience, I shall refer to Mr. Humphries as “Sir” and Mrs Humphries as “Ma’am” from now on) The children all loved Sir for his talent and dry wit, and Ma’am was equally loved for her humour and way of approaching things. Ma’am only had to glance at a black belt and they would be rushing to her feet to assist with demonstrations of various kinds. Ma’am was the author of phrases such as “You have to be more aggressive! Don’t aim for the board, aim for the face that’s behind it!” and Sir cracked me up with phrases like “If you can kick yourself in the face, I’ll give you a t-shirt”.

All in all, I found the event inspiring, since I’ve had the conception that I’m “too old to start now”. I saw people of all ages in that room performing excellently and it left me wanting to start for myself. It’s just a shame there’s no Tang Soo Do institution anywhere in Aberystwyth really *sigh*

Anyway, to conclude, my father, brother and sister are all now the proud owners of an orange belt!

Tang Soo! (This, as I understand it, is a Korean compliment)

P.S. remind me to not annoy either my father, brother or sister ever again >_<

New Experience: Catholics

Well, tonight I’m heading to the St. Winifred’s Catholic church in Aberystwyth with two Comp-Sci friends. This will be (as far as I know) my first experience in a Catholic Church service (or at least, that I can remember). I’m not entirely sure whether they speak Welsh, English or Latin as of yet, but I’m sure that I’ll be able to cope linguistically either way.

The two Comp-Sci friends I’m going with are brilliant people to hang out with; always a good laugh. Lauren, I know from Bridgend (she lives in Blaengarw up the Garw Valley) so she could probably cope with Welsh, and the other, Tom,  is from Kent, so if in Welsh, he’s going to struggle somewhat! The advantage Tom has over the rest of us, however, is that he is from a Catholic background and will have more knowledge of the proceedings.

Anyhow, I think it’s a brilliant opportunity to get to know another Christian denomination, other than the Apostolic, Charismatic, Evangelistic, Pentecostal, Methodist and Anglican forms that I’m used to :)

Maybe an update later if I have time :)

Laters all xx

WordPress Fun

Last night, after my father had reset my ftp password, I thought I’d organise some things on my personal web-space. I decided that I wanted the root directory for other things, so I decided to move my blog to Little did I realise that this would present some large problems.

I’ve been using and tweaking wordpress for quite a while now, since I’m fairly proficient at XHTML and PHP etc. so armed with my knowledge, I decided it wouldn’t be too hard to simply copy all the files into the blog directory and off we go, since all the database connection details are stored in the wp-config. After painstakingly transferring all the files individually on ftp command line with “rename filename blog/filename” I fired up my web-browser and navigated to the directory, where I was presented with everything in plain-text, with no images or any other fancy features. I had neglected to realise that buried somewhere deep in the configurations of wordpress, was a variable that told it where the blog actually was. So wordpress existed, but was still looking for everything in the root directory rather than the ~/blog directory, as it is based on absolute file references (the location of the file from the root directory) rather than relative file references (the location of the file relative to the current directory). Hence the rather bland looking blog I had.

Not wanting to manually transfer the files back to the original location one-by-one, I set about installing FileZilla, a very nice FTP client, and used that to select all the files and shunt them back where they came from, et voilá, everything was back to normal.

However, I still wanted my blog to be in the ~/blog directory so after some nifty google-fu, I had a set of instructions on how to move the blog (can be found here) which I followed to the letter. I then pointed my web-browser once again at my blog and everything was there! Hurrah! So I clicked on a link to view one of my blog posts and got a rather nasty looking page saying “ERROR 500 – Internal Server Error”.

As far as I’m aware, this can either mean that your .htaccess file is wrong, or that your database (and/or connection to the database) is fubar (Feel free to comment and tell me otherwise). For the benefit of those who don’t know, the .htaccess is a file that PHP constantly refers to, and it sets the rules for what needs to be done in certain situations. So I checked the .htaccess file, and there was nothing wrong with it. So it was a database issue. The database content was there, it just wasn’t being referenced properly.

I exported the database to a .xml file which I downloaded to my hard-disk. Then I tried to reinstall, and got the expected “wordpress is already installed message”. This meant starting from scratch. Removing wordpress itself was an easy matter; just fire up FileZilla, select it all, and delete the lot. However, the database would still have been intact. After some fruitless hunting for PHPMyAdmin or other database manipulation tools on the server, I realised it would have to be done manually.

I set about writing the PHP files with the MySQL queries in it that would allow me to drop the wordpress tables, but leave the database where it was. This took me all of 2 minutes. I ftp’ed these files to the server and pointed my web-browser at them. The tables were successfully dropped. Once again, I went to the install page, but was told that the database was broken and needed repairing. I click the repair button, and a page comes up saying “Are you sure you want to do this?” but gives me no option to continue…

I was just about getting fed up by this point. I realised that I’d have to drop the entire database. This didn’t bother me too much since there’s nothing else in there other than wordpress, but it was still hassle. So up comes my favourite text editor again, and I write the appropriate PHP/MySQL to drop the entire database and then recreate it with the same name. All went swimmingly, and I was finally able to run the install process again with no screw-ups.

From there, it was just a case of uploading the database xml file I’d downloaded previously, telling wordpress to update from it, and all my blog posts and user details were back :D After that, I found a few nice themes, picked the one I liked best, and here I am :)

On the plus side, the whole fiasco reinforced the importance of backing up your database. Thankfully, I had done so, but I was still left wondering about how much trouble, effort and hassle would’ve ensued had I not made a backup. So to all those reading this… REMEMBER TO BACK-UP YOUR DATABASE!


It’s that time of the university year, where the essentials of each module have been taught, and the assignments have come into play. 1 month ago, I was given my CS10310 (Theoretical Computer Science) assignment, and last week was given my CS10610 (Databases) assignment.

The CS10310 Assignment was handed in at the beginning of the month, and I did very well. Got 46 marks out of 60, equivalent to 76.6% and it landed me a solid A grade. So I was happy with that.

CS103 is all about languages and grammars, and how we define them on a computer and the practical applications of regular expressions etc. It also includes some basic set theory (a branch of mathematics) since language can be viewed (theoretically) as a sub-set of a much higher order language which defines the syntax and grammar structures for any spoken language in existence. As far as I know, no such definition has yet been found, although several attempts have been made.

The assignment for this module required me to demonstrate my knowledge of Set Theory, of different kinds of grammar and different types of languages (regular expressions, (non) deterministic finite state acceptors, and Backus Naur Definition Format). All in all, I thoroughly enjoyed doing this assignment, and I became an avid perfectionist in this. At one point I re-wrote a question at least 7 times before I was satisfied with it. And clearly, the A grade was a direct consequence of the work I put into this.

The CS10610 Assignment had me reading through the specifications several times over, because it seemed too simple. I thought I must’ve missed something. Eventually though, after a few emails to my databases tutor, I cleared up any ambiguities and grey areas and cracked on with work.

This assignment dealt with the methods of designing a database. The first stage before implementation. Unfortunately, we are required for assignment 2 of this module (which hasn’t been released yet) to implement the database in Microsoft Office Access 2007, which is a hateful piece of software. But there we go. (SQL for the win!)

The scenario presented was that you had been contracted to set up a database system for a dance school that specialised in Scottish Country Dancing. They had provided you with various documents and leaflets to give you an understanding of the data required to be in the database system. Essentially, I had to design a database that would organise a list of bands specialising in Scottish country music, a list of songs that would be performed, and the concerts that would be staged. A fairly simple concept really.

Even though I found the assignment exceptionally simple, I still put 100% into it, and did a thorough job. I was required to make observations of the data, and point out elements that could intefere with database design or could be used to define relationships between the tables. Secondly, I had to describe the tables I would be creating, and specify the fields (categories) that were to be used. I then had to “zoom in” on these tables and specify in detail the fields. I.e. what type of data was it? (Text, date, currency etc) and say which fields were primary keys (the field which uniquely identifies each database entry so that there is no redundancy or unnecessary duplication of data) and which were foreign keys (primary keys which have been imported from another table in the database). I then had to draw a diagram to specify the relationships between the tables in a visual format (the idea being to make it easier to implement if you can see what you are doing). Finally, I had to specify the possible candidates for primary keys, and use reason and logic to explain why I believed my choice of primary key was the best one for that table.

Once again, I threw myself into the assignment, and as a result, have a fairly clear idea of how to do things when the implementation phase comes out in assignment 2 for CS106. I handed the assignment in at 13:00 sharp earlier today, and am eagerly awaiting my results.

Jenna and Coel, if you ever get around to reading this in the future, doing work as early as possible, and giving it everything you have *does* work and produces exceptional results. So when either Dad or Mum have a nag at you to get on with your work, remember this. They are right. It is so much better to do the work earlier without a deadline looming just around the corner, than to be lackadaisical and say “I’ll do it tomorrow” and then have pressure to get it done when you realise that a lot of work needs doing in a short period of time. The latter path means you’ll be stressing, and you won’t be thinking properly, ergo the quality of your work goes downhill exponentially. Also, it gets worse because you’ll start rushing, and before you know it, you’ve been blanking out staring at your assignment for an hour and haven’t achieved anything.

It took me long enough to learn, and I hope you don’t make the same mistakes that I did.

Until next time :)

It’s been a while

Well, I haven’t been around for quite a while, and it must be said… a lot has happened in that time.

I am now doing straight Computer Science in Aberystwyth University, and so far, am enjoying it immensely. For one, I’ve stopped taking my laptop to university where I possibly can, to avoid the distraction of the internet during lectures, and as a result I am now remaining fully engaged during said lectures.I am doing Databases, which is more fun than I thought it would be as we are exploring so much more functionality than I ever did in Secondary School. For example, in school, the most we did was create a few database tables, set relationships between the tables, represented the tables in a form threw in some buttons, and if we got really creative, set a password on the database. However, in university, we will be exploring all the different types of relationships (and why one type is more useful in a particular situation etc). We will be setting multiple user access levels, so that only users with the correct privileges can view database tables containing sensitive information such as bank details etc. Lastly, we will be learning about how databases actually work behind the scenes; how we get the encrypted data through various Database Management Systems to be presented in a shiny graphical interface on your screen; how different types of queries sort through the data in different ways depending on what type of query you use. Quite a lot to look forward to really. The only downside is that we are using Microsoft Office Access 2007, which is software which I loath because it’s user interface is so obscure, and there is no real easy way to edit something you’ve done wrong. You have to pretty much wipe entire modules of your database and start them again.

I am doing Introduction to Computer Hardware, Operating Systems And Unix Tools which is brilliant as the lecturer is really funny and we all get to learn some quite powerful tools built into the Unix Command Line as well as detailed knowledge of various parts of the everyday desktop computer. I have been using various forms of Linux and Unix for a while now, and whilst I enjoy Microsoft Windows as an operating system for it’s ease of use, I also love the challenge presented by some UNIX and Linux distributions in learning how to use them. A lot of Linux distributions (such as Ubuntu, Fedora and Mint Linux now sort of come “out of the box”; as in, you click install, choose a few settings and off you go, done! Some distributions such as ArchLinux require the user to extract the source code from various compressed files and assemble the operating system purely from command line. Distributions like Gentoo require the user to extract seemingly nonsensical data from compressed files and compile them before assembling. This can be extremely time consuming. The last step is Linux From Scratch, where (as the name suggests) you are given the essential system files required to run a stable kernel, and you have to write, compile and assemble your own system, again from command line. One thing that separates UNIX/Linux from Windows is that the Terminal command line is so much more powerful and efficient than the CMD/DOS command line.

Finally, I am doing a module known as Theory of Computation, which is fantastic, as we consider the rules and grammar of various computer languages both high and low level (high level is a programming language that we can understand, low level is language that the computer can understand, i.e. binary) and how compilers work (compilers are the tools used to translate our high level programming into binary code that the computer can understand. Different to a translator however*). I find this module very interesting since I am a linguist enthusiast anyway, and this enjoyment extends unto the languages of machines. So I’ve been told, being able to understand the grammar of a human language and that of a computer language is essential to Artificial Intelligence researchers in trying to establish common factors and bring the AI closer to passing the Turing test.

Another part of university life which is quite amusing is that despite my best efforts to concentrate solely on my personal studies, I’ve ended up learning half of the second year material anyway. My perfectly valid excuse for this, is that a lot of my friends have been faced with some rather difficult mathematical equations, and have turned to me for help in understanding them (as I have a fairly solid Mathematical background). Naturally, I couldn’t help them when these equations were just thrown at me… they could mean any number of things. I had to know the context in which these equations were being used. So I now know the basics of how grayscale images are broken down into comprehensible chunks of code, and how a computer calculates what shade pixels should be based on the shade of the nearest pixel or from relative proportions of shades of surrounding pixels in conjunction with the varying distances between them when an image is resized or rotated. Whack in a bit of probability density theory and the computer can also calculate the probability of a pixel being a certain shade etc. I’m going to get a headache when I see the equations needed to process coloured images!

Anyway… that’s enough from me for now. As you can see from the copious amounts of writing, I am clearly enjoying my time at university and am learning a lot from it. I hope you all are well and that you are enjoying yourselves.

* A compiler will go through the whole code, applying rules and filters to make sure that what you have input is valid and legal code before translation into machine code, wheras a translator will just go through your code line by line translating to machine code as it goes. Use of compilers is slower than use of translators but also a lot safer. Bad code run through a translator will be translated without question, and if run could cause serious computer problems when the processor starts reacting to the code in strange ways resulting in loss of data, seg faults etc. Compilers are basically full of filters to make sure none of this malignant code gets through.

More skating ^_^

Well… I have to say, I have been uninspired and reinspired to keep skateboarding all in one week.

First of all, I was getting really annoyed at my lack of progress at the skatepark, but then when my mate JAG produced a video of the two of us (check it out on his blog HERE)  I actually thought it looked pretty swish ^_^So, he was getting down with some decent vert stuff, and I was failing at vert stuff, and eventually I just ended up recording all my Mullen-esque style tricks.

I have to say though… I really don’t like filming etc. I feel it takes away my freedom as a skateboarder, especially when I’m not a consistently good skater. If I knew I was quite good, and could do whatever I like whenever, I wouldn’t have a problem cos I’d just keep cruising in confidence. However, as I’m *not* very good, I feel almost a kind of peer pressure when being filmed. It’s weird…

So I’ll probably lay off filming completely for quite a long time. This may not stop some of my friends, who may film me anyway, and dive into bushes to hide whenever I look in their direction, but meh… As long as I don’t know they’re there, I can continue to skate with the freedom that I fell in love with in the first place.

And speaking of first love, I need to do some reorganising of my thoughts… recently, I’ve been getting mildly annoyed when tricks that I’ve been doing for years aren’t happening or if I can’t make a trick. I need to just sit back and think about the fact that there are some tricks I can do which others would have to work for years to make. I also need to remember why I started skateboarding. For the freedom it offered me as an individual skateboarder. My board, my world, my rules.

<3 skateboarding.

Peace out bros xx