Skip to content

Java 3d in a NetBeans Platform Application

12-Nov-11
Share

If you want an excellent introduction into Java 3D, look no further than here. I was following the tutorial I found there to get started with what looked to me as the perfect way of spending a Friday evening, when, somewhere at the end, it told me that:

(…) it does not mix very well with Sun.s swing user interface components. These components are called “lightweight” Lightweight components can be hidden by a Canvas3D even if they are supposed to be at the front.

Obviously, I had been planning on embedding hugely impressive 3D animations into a NetBeans Platform Application, and I was not going to be disappointed, so I fired up NetBeans and did it anyway. Here’s how.

Preconditions: The j3dcore JAR files are downloaded and unpacked. You can find them here. I never trust generic Linux installers, because I have no idea what distro those people had in mind when creating them. So I chose one from the zip binaries and ignored the installers. Select the appropriate one for your machine. Unpack the zip file. There’s a second zip file inside. Unpack it too. Put the JAR files and the .so file somewhere where you want to keep them.

There appears to exist a NetBeans plugin for java-3d, but my NetBeans (7.0.1) didn’t find it, and at least one user comment indicates massive issues, so I didn’t bother with it.

  1. Create a new Application: File -> New Project. In the Wizard, under Choose Project, select NetBeans Modules -> NetBeans Platform Application and click Next. Enter the name of the application. I called it Test3D. Click Finish.
  2. The j3dcore JAR files have to be wrapped into a Module. Expand the Test3D project node, right click Modules and select Add New. Use j3dcore as your project name and click Next.  Use net.java.j3dcore as the Module’s code name base.
  3. Right click the j3dcore module node and choose Properties. Under Libraries, click the Wrapped JARs tab and click Add JAR. Navigate to the j3dcore JAR files, select them all (hold shift or ctrl) and click OK.
  4. You now have a library wrapper module, but you lack the shared object file that will allow them to use you graphics adapter. In Test3D, expand the Important Files node. Open the Project Properties file, and add the following line:

    run.args.extra=-J-Djava.library.path=<the path to the location of your .so file>

    Do not include the name of the file itself. Be sure to add this to the Project Properties file of your main project, Test3D, and not the wrapper module. It has its own Project Properties file.

  5. Add a new module that creates and displays your 3D scene. Right click Modules under Test3D and click Add New. Enter a name. I chose Universe. Enter your code name base and click Finish.
  6. Add a new TopComponent. Right click the Universe node and click New -> Other. In the New File wizard, select Module Development -> Window. Select Editor as Window Placement and select Open on Application Start. Click Next. Enter UniverseTopComponent after Class Name Prefix and click Finish.
  7. Open UniverseTopComponent. In the Design View, add a JPanel that fully covers the TopComponent. Right click it, select Change Variable Name and enter myUniverse. Right click it again, choose Set Layout -> Border Layout.
  8. Switch to the Source Editor, and change the constructor into this:
    public UniverseTopComponent() {

        initComponents();
        setName(NbBundle.getMessage(UniverseTopComponent.class,
                "CTL_UniverseTopComponent"));
        setToolTipText(NbBundle.getMessage(UniverseTopComponent.class,
                "HINT_UniverseTopComponent"));

        GraphicsConfiguration config = SimpleUniverse.getPreferredConfiguration();
        Canvas3D canvas = new Canvas3D(config);
        myUniverse.add(canvas, BorderLayout.CENTER);        

        BranchGroup group = new BranchGroup();

        Sphere sphere = new Sphere(0.2f);
        group.addChild(sphere);

        Color3f lightColor = new Color3f(1.8f, 0.1f, 0.1f);
        BoundingSphere bounds =
                new BoundingSphere(new Point3d(0.0, 0.0, 0.0), 100.0);

        Vector3f lightDirection = new Vector3f(4.0f, -7.0f, -12.0f);
        DirectionalLight light = new DirectionalLight(lightColor, lightDirection);
        light.setInfluencingBounds(bounds);
        group.addChild(light);

        SimpleUniverse universe = new SimpleUniverse(canvas);
        universe.getViewingPlatform().setNominalViewingTransform();
        universe.addBranchGraph(group);

    }
  1. Right click the editor window and select Fix Imports from the popup menu. Then build and run the project. Your output should look like this:
Screenshot Test3d Example Application

Test3D with Universe Window

Conclusion: it is possible to embed a Java 3D scene into a NetBeans Platform Application.

Installing Arch on an Asus U36JC Notebook

20-Oct-11
Share

Last weekend, I bought an Asus Pro36s notebook, also known as a U36JC. It features a quad core 64 bit Intel Core i5-2410M CPU at 2.3 Ghz, 4 GB DDR3 RAM, a 500 GB hard drive and an Nvidia GeForce GT 520M video adaptor. It weighs less than 1.5 kilos (that’s including batteries) and is somewhat smaller than the Vaio, which is just what I wanted.

The notebook came with Microsoft Windows 7 installed, but obviously I want to use it with my favourite Linux distro, Arch. Still, since I had paid good money for the Windows installation and you never know when it comes in handy, I decided to make it a dual boot machine.

Installing Linux on a notebook nowadays is not as hard as it used to be. After putting Arch on an Asus U36JC, most of it works out of the box, that means, without it needing any work at all beyond installing Arch and KDE. This includes:

  • FN-keys F1 through F12
  • Media keys (FN with cursor keys)
  • USB 2 and USB 3 ports
  • VGA out (see below)
  • HDMI out (see below)
  • SD card slot (accepts SD-HC cards too)
  • Wired and wireless network (using networkmanager)

Some of these still need some configuring, but the way to do that is a matter of taste. For instance: I configured the multi media keys in qmmp, my favourite music player, but you might use something else. So what follows is a description of those parts of the installation and configuration that needed some thinking before they worked. I explain what choices were made and how I came to them, and link to pages on the Arch wiki with step-by-step guides on how to implement them.

Task 1: Installation from USB

The notebook doesn’t have an optical drive, so I had to install Arch from a USB drive. Normally this shouldn’t be that hard. Still, after I had created a bootable USB disk with the Arch ISO image, it eluded me for a while how to actually boot the machine from it. The BIOS settings menu, entered by holding F2 during boot, has a option called Boot Option Priorities. However, before I actually inserted the USB drive, it only listed the hard drive as an option. And even then the machine kept booting Windows, ignoring the priority settings I had made.

I read in the eManual PDF that holding ESC while booting would allow me to select the boot device to boot from. That worked.

Task 2: Installing a base Arch system

Early in the Arch installation process, the hard drive must be partioned and mounted. Originally the hard drive had three partitions: 1 MB with unused space, 28 MB for Windows recovery purposes, 200 GB for Windows and the rest was formatted as VFAT and labeled DATA.

Since that last partition wasn’t actually used by Windows, I decided to use its space for Arch. I remove the DATA partition and created a primary boot partition of 100 MB and three logical partitions, 25 GB for root, 4 MB for swap and the rest, 244 GB, for home.

Installing grub on /dev/sda presented no problems. The Windows menu entry in /boot/grub/menu.lst looks like this:

# (2) Windows
title Windows
rootnoverify (hd0,1)
chainloader +1

hd0,1 is the second partition on drive 0, or sda2, which is the partition Windows is installed on. The makeactive directive that is in the file’s example has to be removed or commented out for Windows 7.

Task 3: Graphics environment

After booting into Arch I found that the wired network had been correctly configured. I created a user account for myself and set up ssh and yaourt. I use yaourt because I find it very convenient to access binary and source packages using just one command.

The notebook has an Nvidia graphics adapter, but it is configured in a hybrid configuration with a much less power hungry Intel graphics chip. Nvidia appears to have no plans supporting this on Linux, so simply installing the Nvidia driver didn’t work. Instead, I needed the Intel drivers and Bumblebee.

After installing that I installed KDE, Gimp, LibreOffice, Xine, Qmmp and a few more of my favourite applications.

My Asus U36JC notebook running KDE4.

Task 4: Suspend

Suspend-to-RAM, letting the notebook fall asleep quickly and making it wake up quickly again, is very useful for conserving battery power. Unfortunately, it didn’t really work out of the box. Instead of suspending, the notebook froze, showing a non blinking cursor at the top left. I tried various approaches but the solution escaped me for days.

I found an Ubuntu site that offered a solution that made sense, but didn’t appear to work. In the end, I found a line in my dmesg output warning me about the mei kernel module. It appeared that if I unloaded it and implemented the Ubuntu solution, suspend-to-RAM worked. Summarising:

  1. Ditch the mei module by blacklisting it. According to my dmesg output it it not safe to use. This thread seems to confirm that.
  2. Put a file called 20_custom-ehci_hcd inside /etc/pm/sleep.d/. To do that, follow the instructions here.

After I had sorted that out, I needed only two more things for suspend-to-disk:

  1. Add resume=/dev/sdaX to the kernel line of the first option in /boot/grub/menu.lst, where X stands for the partition number of your swap drive, 6 in my case. Instructions are here.
  2. Add the resume hook to the HOOKS variable in /etc/mkinitcpio.conf. Instructions are here.

Task 5: Ondemand governor

The next thing to look into was CPU speed governing. Despite the fact that KDE is supposed to have the CPU always on ‘ondemand’, I noticed that the CPU was constantly on full speed, so I installed cpufrequtils. It appeared that after booting into KDE the CPU was indeed always in performance mode. To remedy this, I configured cpufreq as a daemon to always default to ondemand, by following these instructions.

Task 6: Fixing the camera orientation

The notebook has a camera sitting at the top of the screen panel, centred just above the screen. It works out of the box, but it appears Asus has installed the camera upside down. Why they would do that is beyond me. v4l-utils Is supposed to be able to handle this problem, but at least with this notebook it doesn’t appear to work. I have sent an email to Gegror Jasny, who is maintaining v4l, a library that can fix this. He emailed me back with a versions 8.6 and 9.0 (testing) of the project, which included data I had sent him. It worked perfectly, so as soon as he makes a release and the Arch package is updated, this will be fixed.

It all depends on what you’re using the camera for. If you’re using Kopete, you can go to Settings -> Video -> Options and select vertical as well as horizontal mirroring to turn the image 180 degrees.

Or using mplayer:

# mplayer tv:// -tv driver=v4l2 -flip

Obviously, all this costs CPU power. Using mplayer in full screen mode you can even see yourself blink. And to think that this is only needed because the Asus people installed the camera the wrong way. :rolleyes:

Task 7: Synaptics touchpad

I don’t have very special requirements for a touchpad, but I’d like to be able to drag stuff by double tapping and then dragging with only one finger and vertical scrolling by dragging a finger along the right edge. This didn’t work out of the box. Still, doing that is so easy that I only added it here for completion. First, I installed the driver:

# yaourt -S xf86-input-synaptics

Then I added a single line to /etc/X11/xorg.conf.d/10-synaptics.conf:

Section "InputClass"
        Identifier "touchpad catchall"
        Driver "synaptics"
        MatchIsTouchpad "on"
        MatchDevicePath "/dev/input/event*"
        Option "TapButton1" "1"
        Option "TapButton2" "3"
        Option "TapButton3" "2"
        Option "VertEdgeScroll" "on"
EndSection

Task 8: Hard drive spin down

One of the more annoying habits of the notebook is that the default hard drive power saving setting is too aggressive. The hard drive keeps spinning down all the time, so that lots of times the notebook appears frozen for a second or two when the hard drive is needed. Also, some low level processes use the hard drive periodically, resulting in audible clicking sounds every few seconds.

To avoid this, I installed laptop mode tools and added it to my /etc/rc.conf:

# yaourt -S laptop-mode-tools
# sudo vim /etc/rc.conf
DAEMONS=(hwclock syslog-ng dbus !hal laptop-mode avahi-daemon networkmanager sshd sensors @crond @bumblebee @cups @alsa @cpufreq @mysqld)

Then I changed the default spin down value in /etc/laptop-mode/laptop-mode.conf to 128. This is a good value between never spinning down at all and spinning down too often.

# sudo vim /etc/laptop-mode/laptop-mode.conf
#
# Power management for HD (hdparm -B values)
#
BATT_HD_POWERMGMT=128
LM_AC_HD_POWERMGMT=254
NOLM_AC_HD_POWERMGMT=254

One thing that accesses my hard drive a lot is ext4′s journalling program. To prevent it from doing that, I added commit=600 to my /etc/fstab entries for /home and /:

UUID=...       /       ext4    defaults,noatime,commit=600     0       1
UUID=...       /home   ext4    defaults,noatime,commit=600     0       1

The noatime attribute specifies that the last access time of every file is not recorded. This significantly speeds up hard drive performance.

A note on the HDMI and VGA ports

When the computer is booted while connected to a second monitor or TV, via either the VGA or HDMI ports, the screen’s contents will be duplicated on that screen. The second screen’s resolution appears to be leading. KDE’s control centre however will allow the user to configure this behaviour. Go to Hardware->Screen and monitor->Multiple Monitors. I am not sure if and how this works in other environments.

After updating to KDE 4.7.3 last weekend, I noticed that even when I connected the HDMI port to my TV after the notebook had already booted, a pop up came up that told me that a second monitor had been detected. It then took me to the KDE control centre section mentioned above. I didn’t find any reference to this in the KDE 4.7.3 release notes, so this could also work with previous releases.

VGA is not supposed to be hot pluggable, so I’m not going to look into that.

Concluding remarks

It took a few days of searching and trying out various solutions to get suspend-to-RAM to work, the hybrid graphics setup is not ideal, and the camera is upside-down. But most of the notebook works out of the box. FN-keys, networking, and also the camera.

Whatever notebook you’re going to put Linux on, there will probably always be a few drawbacks. Notebooks get smaller, faster, cool better and need less power every year, so I imagine that manufacturers will need more and more hacks to make all that work. When you’re using the proprietary OS that came pre-installed, you’ll probably never notice these things but if you want all the advantages of Linux, you will have to deal with them.

The Asus U36JC is in my opinion a pretty decent notebook to use with Linux, or at least with Arch. It is fast, light, subtle in appearance and with a few minor tweaks can be turned into a very powerful mobile Linux platform.

Updates:
  1. Oct 20, 2011: Initial publication.
  2. Oct 21, 2011: Added Task 7.
  3. Oct 29, 2011: Added Task 8.
  4. Nov 17, 2011: Added a note on the HDMI and VGA ports.
  5. Feb 3, 2012: Updated the entry about v4l entry in task 6.

Outlook territorialism

21-Sep-11
Share

Yesterday the Microsoft Office 2003 installation at my work PC was updated to its 2007 incarnation. But when starting the new and shiny Outlook to check my calendar, I was presented this little gem of a dialogue box:

Outlook being a little jealous.

Click it to see it the way it was intended. I had to scale the image to make it fit this page, but it is in Dutch anyway. Here’s what it says:

“Cannot start Microsoft Outlook. MAPI32.DLL is damaged or is of a wrong version. This might be because you have installed other software for e-mail communication. Install Outlook again.” (emphasis mine)

MAPI32.DLL is part of the Messaging Application Programming Interface (MAPI), which is a Windows API  that allows applications to handle e-mail and other message-based communication protocols. That fact that it is a Dynamically Linked Library (DLL) means that it is like a Shared Object (.so-) file in Unix: a library to be used by several programs, not just Outlook, I’d think.

I remember back in the late nineties when my friends and I entertained conspiracy theory notions about Internet Explorer (3?) trying to damage Netscape Navigator installations on the same computer. How it did this we didn’t think of and we obviously never found any proof. Occam’s razor would suggest that Netscape was unstable by itself.

Still, in the screen shot above you can see that I have Mozilla Thunderbird installed as well. So could the dialogue box be telling the truth? Is Outlook giving me the cold shoulder because I am cheating on it with Thunderbird? In any case, a sentence like that in an error message raises more questions that it answers.

Boinc milestone

10-Sep-11
Share

Another Boinc milestone for me: 250.000 points. According to Boincstats, about half of that I got for calculations for the Docking@Home project. In the last week, this is even 93%:

Boinc credits for 2011W35

From their website:

Docking@Home is a project which uses Internet-connected computers to perform scientific calculations that aid in the creation of new and improved medicines. The project aims to help cure diseases such as Human Immunodeficiency Virus (HIV).

Next milestone will be around November 9th next year,  when I will reach 500.000 points.

New Horizons Ice Hunters

25-Jun-11
Share

Between 2004 and 2008 I used to work for a lab of  the Netherlands Cancer Institute, where scientists crystallised proteins to be able model them. Crystallization is a neat way of lining them up perfectly. This is necessary because they are so small that if you measure just one of them, you don’t get a signal. If you put a few precisely in a row, their signals add up and you start to see things.

Crystallizing proteins isn’t very easy though. They used mainly solutions of salt and other solvents, but the whole thing was basically a trial and error process. They had plates with wells lined up in rows, each with a slightly different solution. Robots would periodically take lots of pictures of them, so that the scientists could see which ones made progress. Seeing a crystal form was usually reason for cake.

We had an algorithm that could recognize interesting artefacts, but scoring these images is typically something that the human brain does a much better job of than computers. You don’t even need to be a trained scientist.  I did some of them too. A short instruction was enough to be able to tell what’s what.

I had to think about this when I stumbled upon the New Horizons Ice Hunters web site. New Horizons is a probe on its way to Pluto. When it gets there in 2015 it will return awesome pictures back to us, just like the Cassini probe is doing now at Saturn. But it won’t stay there (obviously – it doesn’t have the means to slow down). After Pluto it will continue toward the Kuiper Belt, an asteroid belt outside Neptune’s orbit, filled with icy objects called Kuiper Belt Objects (KBOs).

The problem is, these KBOs have to be identified first. And like recognizing the crystals, that is something that humans are better at than computers. Ice Hunters lets the visitor identify these distant worlds of eyes, thus helping out the scientists. It’s really fun (and addictive) to do, and not that hard. In 38 images I found 19 of them, and I just got started.

There is a tutorial video and some text on where the images come from. You are presented with small square images, on which you can click to indicate where the KBOs are. There are lots and lots of images to be scored, so there is a lot of work to do. Every image is scored by a few people, so don’t be afraid to make mistakes. And before you can start, you need to sign up, so that they can attach your name to your results.

I find that pretty cool.

Native look and feel for Swing under Linux

19-Apr-11
Share

This one is not really an eye-opener, but I use this blog to record and archive stuff I find out at some point, so here’s a post about getting NetBeans Platform Applications use GTK instead of Metal.

Since the Swing Application Framework (SAF) has been deprecated and developing NetBeans Platform Applications (NPA) is the new and better way to do these things, I’ve bought a good book on the subject, and am quite satisfied with the way Java desktop applications are to be developed these days.

However, under Linux, Swing applications default to the ugly Metal widget set:

Metal widget set. Click to zoom.

 

On the command line and using SAF it is in fact pretty easy to make Swing use the GTK widgets. This way Java applications get a native look and feel under Linux. With NPA however, there is no right place to insert a few lines of code to do this at startup.

To make NetBeans itself use the GTK widgets, I always start the IDE like this:

# netbeans --laf com.sun.java.swing.plaf.gtk.GTKLookAndFeel

Since NetBeans is itself an NPA,  I figured the trick would be to specify this option somewhere in the application’s configuration. I googled around a bit and found the answer here. The trick is to add a single line to the project.properties file, which can be found inside the Important Files folder within the NPA project. That line is:

run.args.extra=--laf com.sun.java.swing.plaf.gtk.GTKLookAndFeel

And now, under KDE4, my application looks like this:

GTK widget set. Click to zoom.

 

Not exactly a KDE4 look-and-feel, but I have lots of applications (Gimp, GQView,  LibreOffice) that use GTK so it still looks native on my desktop, and GTK is a lot prettier than Metal.

Now why it is a good idea to write desktop applications instead of web applications, especially in Java, is something that Geertjan Wielenga talks about on his blog. Well worth the read.

Elite

14-Apr-11
Share

Today, I found this in my mail:

The “success kit” included a lifetime membership card for

(…) an elite group of Oracle Certified Professionals (…)

And I had hoped for a coffee pack :-(

But still. Excellent.

Undead robot

14-Apr-11
Share

According to the Geek Zodiac, I am an Undead, since I was born in 1976. I am apparently soulful, transcendental and know the value of all life. I am also haunted, tormented and have difficulty connecting to humanity.

Obviously, this is utter nonsense. I am clearly a Robot: law-abiding, dedicated and logical as well as stubborn, intractable and cold. But apparently I was born in the wrong year for that.

That proves it. Astrology is bull.

NASA is moving on. Finally.

14-Apr-11
Share

A few days ago I had a nice discussion in a commenting thread on Wired, in response to an article about how uncertain the future of space flight is, now that the Space Shuttles are being mothballed.

When I was little, in the early eighties of the last century, I remember being told that the newly developed Shuttles would be the next big step in space flight technology. While previous rockets were disposable craft, the Shuttles were reusable. They could be launched over and over again with little effort. A whole fleet of these magnificent machines was going to be built and access to space would become cheaper. Getting into space was going to be routine. The James Bond movie Moonraker, from that time, depicts these ambitions when it shows us five shuttles being launched simultaneously from one location, after which they travel to a space station in high orbit.

Five shuttles docked at a space station

Five shuttles docked at a space station, about 1:40 into the movie.

Obviously, it didn’t happen this way. NASA built only a handful of Shuttles and they did not live up to their promises at all. They were clumsy vehicles, none of them able to reach a decent orbit. At the same time, they were immensely costly, which left too few resources for other programs. That situation seems to be coming to an end now, finally.

Still, many Americans are very sad to see them being phased out. I can understand an emotional response. After all, they look pretty cool and nobody else has anything but rockets. Better yet, the Russian Shuttle program could be seen as failed[1]. But when I think of what NASA should be proud of, it is not the Shuttle. It’s the Mars rovers and all those space probes, buzzing throughout the solar system, doing fabulous science. Even the Apollo-program wasn’t more than a show, albeit a spectacular one, but it did prevent NASA from doing more useful things.

Today, organizations are starting to launch craft into orbit to make a profit, and NASA is stopping with spending money on costly ineffective programs like Apollo or the Shuttles. In other words, rockets are launched for the right reasons. I can only conclude that these times are a lot less uncertain for space flight than in the five decades behind us.

As for the use of humans in space: humans should go into space for useful work that machines can’t do. Otherwise it will never be anything but a useless show, and never be sustainable.

  1. [1] Though it didn’t: Gorbachev cancelled it before it ruined the Russian space program.

A decade of cell phones

11-Apr-11
Share

I got a new phone. It’s my first real smart phone, it has Android and two CPU cores. I like it. It’s an LG Optimus 2x and it looks like this:

LG Optimus 2x

I like it for having a Linux kernel, a big screen, a 3.5 mm earphone jack, convenient volume buttons, a slick design and because I can greatly expand its usefulness by installing apps. It’s not become a lifestyle though. The first Saturday after I got it, while waiting outside of a dressing room for someone to try on some new piece of clothing, I did not check my messages or Facebook wall. That’s not product dissatisfaction, I’m just really in control.

So I wanted to make a list of all the different cell phones I’ve owned. ‘Owned’ being off course a relative term (albeit decreasingly so in each case), since I got each one for free (also relative, increasingly, also inversely correlated with ‘owned’) with a subscription that would last for two years, after which the phone was more than fully paid.

KPN Pocketline Swing

My very first cell phone was the KPN Pocketline Swing (links to page in Dutch).

KPN Pocketline Swing

The `Swing’ was a very popular phone in the Netherlands at the time. It is the only one I used with a pre-paid subscription. My service provider was KPN-owned Hi, which was targeted at young people. I got the phone in January 2000, while away from home for the entire month. I remember the first thing I tried to find out about it was how to turn off the high-pitched beep at every key press. Apart from the extensible antenna for noticeably better reception I don’t remember much else. Its functionality was limited to making and receiving calls, text messaging, name/number storage and an alarm clock. But it was as cool a gadget as I’ve ever had.

Nokia 6210

When I got a new phone, I sold the Pocketline Swing, including its phone number. And for good reason. The law that enables you to take your phone number with you when switching service providers didn’t exist yet, and if I stayed with Hi I didn’t have a lot of options choosing my next phone. So I switched to Ben, which gave me a Nokia 6210.

Noka 6210

Also targeted at young people, Ben was the übercool brand of the time. I believe the first name of the guy who founded it was Ben, and in Dutch, “ben” also translates to “I am”, which provided for lots of subtle advertising possibilities.  They were growing, but their coverage wasn’t very good when I first got this phone. I lived in Groningen then, and I remember only having reception in the down-town area. As soon as I crossed a bridge over the enclosing canal,  the connection was lost. Ben was bought by T-Mobile in 2002 as their way to get access to the Dutch market. They closed down the brand, but reinstated it in 2008.

A Nokia 6210 from Ben was what everybody in my demographic had. Apart from calling and text messaging, the user could compose his very own ring tones. I remember using the opening theme of Shostakovich’s Sixth string quartet as my ring tone, because we were rehearsing that at the time. And off course there was the very addictive game of Snake. I got pretty good at it. Obviously, because everyone was.