Tuesday, 22 December 2015

Java Scanner class confusion

If you have used Java's Scanner class, yopu may have come across an odd behaviour as you use the same Scanner object to input numbers and Strings.
I recently found the best explanation for this behaviour (it's not a bug), which you may find and here here at Daniweb. The best replies are from and


The reason it gives you trouble is because when the user enters an integer then hits enter, two things have just been entered - the integer and a "newline" which is \n. The method you are calling, "nextInt", only reads in the integer, which leaves the newline in the input stream. But calling nextLine() does read in newlines, which is why you had to call nextLine() before your code would work. You could have also called next(), which would also have read in the newline. (BestJewSinceJC)

Just change the delimiter.

Scanner in = new Scanner(System.in);
in.useDelimiter("\n");
(cgeier)

Hope you find these useful.

Monday, 30 November 2015

What is usability?

I have been looking for useful definitions of usability within the context of Computer Science.

I'll update this post as I find more and better resources.

Sunday, 10 May 2015

OS process management

Found a really good summary about the different techniques used by processors to manage tasks/processes. For our syllabus, we are concerned about multi-tasking and time sharing, but if you're curious, other important and related concepts are also explained (i.e. multi-processing and multi-threading).

Monday, 27 April 2015

April 2015: A great month for Linux!

What can I say. Pigs are flying and monkeys are vivid. (I know, my sense of humour stinks, just trying my best...)

First, Ubuntu 15.04 was released (I prefer the April releases, I always get the feeling that the October ones are rather interim/testing/preview ones, although usable and functional, of course), with the highlight of a MATE desktop official version. It's like Ubuntu going back to its roots. Fast, stable, nice interface but no so over the top as to slow down or require a powerful machine to run well. Kubuntu has never looked and felt better, although I haven't had time to test it more extensively than taking the live DVD for a spin. Ubuntu Gnome has improved a lot and I'm using it at work, only missing more options to tweak it to my heart's content. The included (Gnome) tweak utility is great, but I still wish for more options, like controlling the size of the favourites dock, for example.

Link to Ubuntu Mate 15.04 release announcement

And that's not all! Debian 8!!! Better than ever, but of course still not for beginners. Or maybe for beginners with a lot of spare time and interest in one of the "founding distros" of Linux (the other still active ones being Slackware, Fedora and SuSE IMO.) The highlights of this release for me? Cinnamon and Mate desktops. Live DVDs. Heaven.

Link to Debian 8 "Jessie" release announcement

Happy OS-hacking and keep cheking Distrowatch for all FreeBSD & Linux news!

IB Computer Science Exam Revision

Hi there!

I will be using this blog to save and manage my resources for the computer subjects I teach. I may transfer them later to a wiki, which in my opinion is the ideal format for this, but I want to try the blog format first, as I will do my best to post every time we are meant to have a lesson (both standard and higher levels). If you subscribe, you should get notifications as soon as I post an entry, and perhaps this way you can also study "on the go"/wherever you are.

A full list of topics for IB Computer Science can be found here.
A couple of glossaries of Computer Science terms can be downloaded from our school's online class resources.

Hope you will find this useful. Mainly for my awesome IB Computer Science students, but this may also be useful if you're taking (I)GCSE ICT/Computer Science and similar courses.

I will be working on a "Table of contents" blog entry as well, which I will post separately and link to this entry as well, so if you're interested, keep an eye on this blog!

Thanks for reading and best luck!


tM.

VPNs

On the concept, advantages and disadvantages of VPNs:
IB Computer Science Topic 3: Networks - Types of networks

Class Relationships

Please read these two resources to have a better understanding of class relationships http://creately.com/blog/diagrams/class-diagram-rel...