ProBlogging

Posted on June 12, 2007 by Andy Callaghan.
Categories: Uni.

I'm curretly in a special IT lecture called ProBlogging that the University of Reading is putting on after the end of exams, run by Mike Evans. We are to start a new blog of a high quality and with focused articles with a mind to optimising the content and eventually making a mint with Google Adsense.

I heard about the course early on in the year, as Mike was heavily gloating at the fact that he makes enough money to retire on. He showed his Google Adwords earnings gleefully to the open day students we were showing round. It was so funny to see all the eyebrows in the room raise as the seemingly timid lecturer demonstrated that you can earn a hell of a lot of money.

Being a poor student, I plan to create a seperate ProBlog with my Uni friend Ruben, and report back on here to how it's going.

Revision: Computer and Internet Technologies

Posted on May 20, 2007 by Andy Callaghan.
Categories: Uni, Work.

In a desperate last attempt to help me revise my first year course, I'm going to publish rewritten notes to help someone revise Computer Science topics – this first post will be about Internet Communications. Sorry that I'm deviating away from the usual blog theme of my website!

There are many different areas to look at when thinking of Internet Communications. In this revision page,  I will go through the following:

  1. Quality of Service
  2. Layer system of protocol

1. Quality of Service (QoS)

Following is a rough list of network services that computing can achieve. 

  • Shared Resources
    • Storage
    • Programs
    • Databases
    • Printing
  • File transfer
  • Email and instant messaging
  • World-wide-web access (through 'The internet' or an Intranet)
  • E-commerce
  • Voice and/or video transfer
  • Peer-to-peer services
  • Scatter-gather networks (Bittorrent and others)

Quality of Service is measured using the following metrics:

  • Throughput
    -  The overall speed of data transfer, taking into account all protocols and losses.
  • Delay
    -  The time taken for the first bit to arrice and its destination.
  • Bandwidth
    -  In modern terms means an amalgamation of throughput and delay.
    -  High bandwidth -> High throughput, Low delay
    -  Low bandwidth  -> Low throughput, High delay.
  • Jitter
    -  The variation in delay between packets/frames.
  • Packet loss
    -  Defined as the probability that a given packet will never reach its intended destination.
  • Error rate
    -  The proportion of arrived bits with error
    -  Can be burst errors, or random errrors
  • Availability
    -  Measured in % uptime
  • Maintainability
    -  How easy are faults to repair when things fail?
  • Security
    -  What do you want to protect your data against?
  • Cost
    -  The overall cost of using and maintaining the network

A high-definition, wide-screen, full motion video has:

  • 1366 x 768 pixels per frame
  • 24 bit of colour per pixel
  • 100 frames per second 

If the video is transferred without compression, we need a throughput of no less than 2.5 Gbps!

2. Layer system of protocols

To aid maintainability and logical thinking, the internet protocol is broken down into 'layers'. Lowest to highest.

  1. "Transfer of bits" — Physical layer (most important)
    -  Voltage, sampling, wireless etc. The physical voltages and currents of electronic bits.
  2. "Perfect data delivery" — Data link layer
    -  Error correction, repeat requests, CRC etc…
  3. "Choosing the route" — Network layer
    -  Path control & routing, addressing scheme, IPv4/6, segmentation & reassembly of frames
  4. "Reliable end-to-end delivery" — Transport layer
    - Further error, flow and sequence control
  5. "Right program" — Application addressing layer
    - Achieved through ports, ie. (182.16.10.30)  :80 – http, :21 – ftp, :6842 – msn etc…
  6. "Make it useful to the user" — Application layer
    - User interface, web browser, email client, applications

Borisbot Chatbot

Posted on May 8, 2007 by Andy Callaghan.
Categories: Microsoft, Uni.

I have now finished and handed in my Chatbot final year assessment project for Programming at Reading University. Whenever I get the time I will release the source code, and executables for Windows and Linux as open source. The following is an extract from a reflection I gave on Reading's own Comptuing community, Redgloo…

I've leant alot about C++ whilst doing this project.

The main area that has signicantly improved my code during this project was in classes and objects. I have been able to manipulate them in such a way that means that I can reuse exactly the same classes later and still be completely relevant. I quickly setup a files class and object.

I quickly saw that implementing this class simplified my code significantly, and reduced my main() to only 16 lines of code.

In the end, the problem boiled down to only a few cruicial function:
1. Read()
2. Respond()
Written in C++ code as
respond( read () );

This was then encased within a do-while loop.

Before beginning the chatbot project, I had little clue about how to implement fiels in C++. But lots of coffee, skittles and visits to cplusplus.com later, I can basically do anything with them.

Half way through the problem, I soon came to realise that C++ is not the ideal language for chatbots to be written in. Unlike most modern languages, C++ is platform dependent (with larger programs anyway), has no regular expression in built functions and handles stings extremely badly.

Regular expression would have been a Godsend to this project, as they could have searched through a user's input for particular words. But i had to make do with setting up vectors of strings, and compairing two vector elements together methodically.

Baby got Sandwiches

Posted on May 3, 2007 by Andy Callaghan.
Categories: Funny, Uni.

This is embarrassing… I recorded this piece of ‘music’ as part of my Software Engineering coursework, where we are to produce a presentation to advertise our product (a board game about Engineers’ Sandwiches).

I took the song Baby Got Back, originally mastered by Sir Mix-a-Lot, loungified by Richard Cheese, and then defaced it by replacing words in the song to reflect sandwich making or eating.

I hope it doesn’t annoy/offend/sadden you too much!

Andy Callaghan – Baby got Sandwiches Ft. Richard Cheese. Lyrics by Sir Mix-a-Lot.

Clever virus

Posted on March 28, 2007 by Andy Callaghan.
Categories: Internet, Uni.

You may recall recently, that I had some virus troubles with Vista, where reading university banned me from the network temporarily while my virus was on my machine… Well, I perform a full system scan the other night, and Avast finally got rid of it. I was shocked however to find where the trojan was hiding.

The bloody trojan not only was able to surpass MS's 'most secure OS ever (bullplop)', but was also able to install itself into an .iso of MS XP Pro, so that everytime I tried to install the burned image of XP Pro, on Virtual Machine or as a native and lone copy, the trojan wa installed too.

ircbot-virus.gif Picture shows Avast's report showing that the virus was found on the Virtual Machine's own virtual hard disk.
Grahh! I still firmly use openSuse linux for day-to-day stuff, like internet banking which I'll never trust Windows to do… ever…

This will be known as Chatbot day…

Posted on March 21, 2007 by Andy Callaghan.
Categories: Open source, Uni.

Huzzah!

After weeks of coding, bottle upon bottle of IrnBru, and OS re-install, two network outages, lots of loud swearing, countless ganders and cplusplus.com, and some 900 lines of code later, and my C++ chatbot finally works!

Boris chatbot working

When these sweet lines were returned to the screen, I kissed it… no joke, I literally kissed my screen!

Look soon for the finished product, all in it’s open source glory.

BANANA!

Lots of work, stress and virus troubles. Cancel or Allow?

Posted on March 16, 2007 by Andy Callaghan.
Categories: Microsoft, Rant, Uni, Work.

I have got alot of work to complete recently – my algorithms assignment, software engineering and final programming project (to be uploaded in the not to distant future).

So I, Andy Callaghan, officially blame Windows Vista for making my life even more stressful by ‘contracting’ a virus mid-programming and doing my work.

Due to the Windows virus, I got banned from the Uni network. The viral traffic was detected by the Universities firewalls. They completely locked me down… no email or web (except the windows update site, naturally). I was crapping myself. I couldn’t access (still can’t to a degree) my network drive in the University so none of my work could be accessed.

After installing all the anti-virus software they could throw at me, they unbanned then quickly banned me again a day after with the same reason – Poebot virus traffic.

All of this, was occurring on a fully up-to-date legal version of Windows Vista – reportedly the most secure operating system that M$ have ever produced. Safe? Yeah right. The user-access control is a joke! (but you can Cancel of Allow anything that the system may do!).

It is simply not sensible to trust all my work and grades in an insecure system.

I duly formatted the Vista infestation off of my machine, and reinstalled Win XP.

To add insult to injury the Windows installer, of course, completely scrubbed the boot sector of my drive for it’s own boot loader, erasing GRUB – so I couldn’t boot into openSuse. I rebuilt the boot-loader from the openSuse disk, to then find that Windows had corrupted my root drive for Linux.

A re-install of openSuse allowed me to see that my t’internet connection had been re-enabled as my entire machine was functioning in openSuse. However in Windows, after a fresh install and driver install of what I could, the following still don’t work.

  • Network
  • Sound
  • Dual screen (even with Nvidia drivers installed)
  • Webcam, printer and scanner (but these are less important)

I am now enjoying openSuse, merely because it works perfectly and is a lot less likely to lose my work by viruses. Kdevelop rocks!

openSuse dual-screen transparency

This is a picture of my openSuse desktop, in all of it’s dual-head transparency loveliness.

Ending comments:

If (exoskeleton || (green && wiggles)) eat_it();

Various C++ algorithms

Posted on February 24, 2007 by Andy Callaghan.
Categories: Open source, Uni, Work.

All code is released under GPL. If you wish to use, modify, hack it etc, please attribute me.
All of the following code is cross-platform certified on Win32 and openSUSE Linux 10.2.
Maximum algorithm

Unique algorithm

Greedy algorithm

Composition algorithm

Recursive algorithm (Collatz conjecture)

Grinds my gears: Meaningless, boring lectures

Posted on February 1, 2007 by Andy Callaghan.
Categories: Funny, Rant, Uni.

This will be a short post, as I am currently in a Software engineering lecture, bored to death. I am able to contact the outside world through my pda, and Wi-Fi. Next I have COTS, which is even more pointless – an hour ‘practical’ of a lecture treating us as year sevens. Were doing… powerpoint this lecture. Oh what fun!

Maybe next week ill record my COTS lecture and post it up on here to prove how boring they are.

What grinds my gears: Transreal numbers

Posted on January 28, 2007 by Andy Callaghan.
Categories: Funny, Rant, Uni.

Dr. James AndersonDr. James Anderson (BSc, PhD, MBCS, CITP, CSci – if you like those things) lectured us in Reading Uni last year in our module, 'Computer Science Roadmap' about his new system of numbers called 'transreal numbers' which he claimed 'solved a 1200 year old math problem: dividing by zero', and would stop computers from crashing due to division-by-zero errors and therefore save everyone's lives, and cause peace on Earth. We all met this lecture with extreme scepticism as he showed us on his slides how his new computing system has 'super-Turing' and made all existing mathematical algebra theory bogus. Download Dr. Andersons’ presentation on Transreal numbers and the perspex machine. He began his lectures by dedicating the lecture to a naval vessel, which was stranded at sea because of a 'division-by-zero error crashed its entire network of computers, causing its engines to stop.'. Granted, I couldn't see the reactions of anyone there as he presented these slides… as I was late to his lecture, and subsequently didn't record it on my portable digital recorder. Oops. Well none of us are perfect I guess. When I did enter and begin listening, he was presenting his 'proof' of how year 10 students can all divide by zero. The stages are as follows.

  1. 0^0 = 0^(1-1)
  2. = 0^1 x 0^-1
  3. = (0/1)^1 x (0/1)^-1
  4. = 0/1 x 1/0
  5. = 0/0
  6. = Phi – nullity

What does that proof even prove? We already know everything up to line 5; Calling any number that has been divided by zero 'nullity' is not new. It has been an IEEE standard for 20 years, incorporated into floating point numbers, as the (confusingly named) number NaN – Not a Number. All the Doc has done is rename it. He then proceeded in telling us that large corporations were giving his company 10 million pounds (he repeated this aThe Perspex Machine: A bit too much smoke and mirrors? humorous amount of times), to research and build a 'perspex machine' which would be able to compute not only a divide by zero, but also compute in four dimensional 'perspex space'. This great new computer he claimed would be able to travel back in time and tell itself instructions to do things when it finds idle time, therefore filling it up and always being 100% efficient with CPU time. He also said to us that '… once you create a perspex program, you virtually grab hold of it and mould it, shape it and create different programs to suit your function in perspex space'. To say, i was extremely cheesed off at this point to be wasting my time listening to his fairy tale of a time-travelling computer system. Maybe he'll get the movie rights! "Back to the Future Part IV: Tales of the Magical Wizard and his fantabulous perspex machine". I think… put it a different way… I hope that by now you too find this grinding your gears.