It’s not cheating if you blog using OneNote 07

Wow. What a stupidly technological week. If doing I.T. was like eating fruit, I’d have a severe case of the runs.

 

Database Modelling

Ok, so the first interesting item this week was our Domain Model. A domain model, for all you B Comp. students, is essentially a Class Diagram, its just what the B. Info Systems students call ’em. We needed to prepare our Domain Model as the first step of our design for the vicICT Membership System.

 

A membership system sounds fine and dandy until said membership system requires you to facilitate group memberships and changing from one membership type to the other. One thing I’ve learnt is that regardless of what walk of life you come from, you will always argue about the database schema.

 

So, Tuesday morning started with the B Comp students in my team all standing at a whiteboard, arguing about the particulars of cardinalities of relationships and basic stuff to do with ER modelling. Then to assist, along came our tutors, who both disagreed with our approach, and then with each other. Apart from being humorous, in a Schindler’s List sort of way, this was a sign, along with all the other signs encountered in previous group work, that system design and modelling is a great

divider amongst men. I guess that’s why the majority of DBA’s I know are women!

 

Anyhow, if the torture of the morning wasn’t enough, we decided to press on. Find a meeting room in the uni containing a whiteboard. Tucked away in N block where no IT student normally ventures and after we had some time to think more about the data and problem space, we proceeded to draw our designs. This was followed by a series of drawing over each others design intertwined with a lot of explaining of our thought processes and explaining the basics of some database concepts to other members.

 

By the afternoon we were all bored and frustrated with each other, but we had learnt an important lesson:

 

The safest thing when coming up with a DB design is to have each person go away and draw their own models. This way everyone has thought about the perils and at least made a few mistakes in their revisions. They have also tested their schema in their head against different scenarios which can then be used to challenge alternate designs other team members have come up with. They can go and find tools and fill in their own knowledge gaps before we all get together and waste each others time. After that, they can regroup and compare ideas, merge models and go forward. I guess in the real world, a safe analogy would be that someone calls a meeting about a design. In preparation for this meeting you:

 

  1. Actually prepare.
  2. Find your database mojo. If you haven’t had much exposure to databases (ie, you are still a uni student), go and look at your textbooks on databases. Make sure that you don’t come to the meeting proposing silly things that can’t be normalised.
  3. Have a go with as much of the design as possible. Make sure you challenge it and find a few things wrong with it, then fix those things. If your design comes out smelling like roses on the first go, please go sniff a dogs bum and ensure your nose is in good functional order.
  4. Break the design and find test scenarios to break other peoples designs. Write these scenarios down, they will make the basis for some clever test cases when you are implementing your system.

     
     

    Office 2007

    My new toy this week was the new Microsoft Office. Surprisingly, my 3 year old laptop runs it faster than Office 2003. The user interface redesign in Word, Excel & PowerPoint (among others) was a risk but it certainly paid off. A lot of thought to what controls are used most often and common toolbar icons pop up over your document when you highlight something and right click, so you are closer to the editing controls. Some of my senior colleagues think the interface is shit and the ribbon is too big, but I’m very impressed with it. You can turn it off if you like later anyhow.
     

    One Note is still my fave app, and the extra features show that M$ are certainly pushing it. Some cool new features are the text recognition of pictures and audio recordings so that they can be searched just like typed and handwritten notes.
     

    The best feature so far is the blogging tool though. It can integrate with my two faves, WordPress and Blogger and it’s a great welcome to the new suite.
     

    Office Ultimate is still available at the ridiculous uni student price of $75 per license. You will need one license for each computer you want to install this on (per my reply from M$ when I emailed them about it), but its still a bargain compared to the Academic pricing in the shops for a not so Ultimate version ($250~). All you have to do is go to http://www.itsnotcheating.com.au and mention referral code MSP9.
     

    That Linux Box that’ll run a version control server and upstairs heater

    Fun and games on the linux front. The Cobalt Raq4 server is now running Fedora 5. All it took was to upgrade the firmware on the cobalt, pull out the old hard drive, install Fedora on a normal PC, then replace the kernal and modules with premade ones as well as code to run the LCD, configure the serial port and terminals to run on startup and then put the Hard Drive back in the unit, configure the unit to use the hard drive rather than network boot and tell Fedora it’s the /boot partition rather than the / one, I want it to start when it boots from disk.
     

    Yes, I am being sarcastic, it took an age and a day (two of them in fact) to get this thing up and running.
     

    My friend who has provided the hardware, has met with much frustration in linux land, particularly with user and group permissions, but has managed to resolve these, and also install SVN and Apache2 and have them run our repositories nicely.
     

    We have a backup strategy and he has also wrote a script to do an incremental backup of the repository onto a series of large rotated USB disks. One thing that still puzzles us is how to do a backup of both the repository configuration and the files in the repository. svnadmin dump does the first bit, but not the second.
     

    “By the power of SSH tunneling, I am HE-MAN” aka “now I can escape my countries Internet Censorship Proxy by finding an SSH server to bounce off”

    We had the box running solo throughout the end of the week while we were at uni/work. Something that was interesting were the amount of connection attempts from overseas. People from China, France and Russia trying a dictionary attack of usernames and passwords. On a bad day we had 600 connection attempts of which only a couple of them legitimate. Thankfully of all the successful logins, they were only done from our own networks in Aus, but its still interesting to see how many people just sniff ports on the web in search of a place they can squat and do all kinds of nasty stuff to. Side note: If we were hacked, the hackers could have gone and edited the logs to make us believe no one ever came in :S
     

    And the winner is Sydney, Australia

    As for hosting the server, it was sitting in my house for most of the week but the spare room is small and along with another computer, router, 2 monitors, a laser printer and god knows what else, the room heats up really quick. It’s also not suitable since my partner runs a home business from the same room!
     

    We were going to secure a place in a Sydney datacenter but our contacts advised that the operators of said datacenter had a habit of unnecessarily unplugging things they decided on a whim didn’t belong. My friend on the other hand is keen to host the server at his place, which I’m glad. Its a win / win since my friend has a dedicated internet connection just for the server (big family, 2 internet accounts), a large bedroom and personal tolerance for loud PSU fans, as well as a bedroom that gets really cold.
     

    The only limitation about hosting it there is the bandwidth involved, 64k upload will mean slow checkout times but once a checkout is done, then doing the updates shouldn’t suck too badly. We can consider an upgrade of speed and since it’s a wireless connection the provisioning lead time to upgrade shouldn’t be long at all.
     

    And after all our hard work, I managed to fubar it all up by doing a yum update. In doing so, it updated the kernal and heaps of other software. Great we have patched many known security holes. However it must have installed packages intended for a 686 instead of 386 architecture, and now every command is returning an illegal instruction message. I’ll use this opportunity to reformat the thing as a Raid device, and also set up our repositories using the FSFS type rather than the Berkely DB filesystem. Berkely DB is tried and true, but much less resilient to unexpected shutdowns. I read on one of the cobalt pages how to configure yum / rpm to only look at 386 packages, so I’ll take this on board next time so we can get back together.
     

    I’m am so haX0r. Give me admin rights so I can install developer tools

    Good news (I hope), the ‘development managers’ have met with the ‘internal services’ people at Monash and met our requests to install TortoiseSVN on the student labs. The dev managers seem quite happy with the idea. I believe Monday morning (a few hours away) I’ll be meeting with one of the internal services people in charge to run through Tortoise and determine if it can run on the Novell setup and talk to our servers, great and small.
     

    There could be a few issues with this. Tortoise can accept a proxy configuration but the problem is that it will store the said configuration in its configuration file. This means that if another student logged in, they could potentially have the password settings from the previous user. We would need a logout script to clear this value or have Tortoise ask for the password each time and not save user credentials. Or it could be that the students documents and settings where all this stuff is stored, is wiped on logout anyhow, so worrying about this may not be too much of a hassle.
     

    The other issue is that TortoiseSVN appears on every context menu in Windows explorer. This can be switched off I believe, just have to find out how.
     

    It all ends with V

    Shit its 1:33AM and I’ve already had my daily recommended intake of V. Time to sign off this stupidly long blog.
     

    Till next time

    -K

Of server racks and linux distro’s

Ok, so for my industrial experience project, an opportunity to have a server housed in an ISP’s datacenter for our source control system was made available.

What an excellent proposition, no bandwidth charges, fast link for everyone concerned (no more sharing my precious torrent upload bandwidth, ha!). The only catch, you have to install your software on an aging Cobalt 4i Rackmount Server.

Just to give you a rundown, the cobalts use an OS based on Redhat Linux 7. Not too bad, they also have an aging pkg format to install stuff on, however there aren’t many packages available nowadays for this.

So, the unit itself is great, but I do want to get svn running and apache2 to make use of committing over port 80. This meant it was time for a new distro.

Basically getting a recent linux distro to run on it is possible, but there are a couple of hoops you have to jump through.

  1. The ROM

    The box we had come with a 2.3.35 rom installed. The first step was to go to the sourceforge Cobalt-ROM project and update to 2.10.3-ext3-1M rom in order to make available the bulk of the linux distro’s available to us.
    Since the original cobalt site has been down for a long time, so too were the instructions of how to install the flashrom. Although its work-out-able, flashing ROM’s especially when you are going by guesses greatly increases the chances of bricking your router. Thankfully the bottom half of this page explains the steps involved. Especially making a backup of the existing rom first just in case things go awry.

  2. Weapons of Mass Panic

    W00t! Power cycling the router bought some nice new LCD graphics (ok, Kon, get a grip, they are just mono-colour pixel graphics). This allowed me to guess that the flash was successful but after a little waiting all I had on the screen was a clock icon, with Sun Cobalt written at the top and a knight rider esk cursor moving from left to right and back again. Ooops! Maybe its taking longer getting used to its new life in the new rom? Once ten mins had passed and it was still the same, I recall reading that the boot rom defaults to booting from a network. This means that there must be a way to configure it. Here was my saving grace. Hold down the S key on bootup and you’ll get to the boot options menu where you can choose to boot from disk instead of network. The network option i guess will come in handy later.

  3. Re-Conception

    So now we have our Rom upgraded, the next step is to prepare a new distro. There are a couple of options for this. One is to use a slave PC to install the linux distro of your choice on, install some additional packages to allow the boot time stuff to kick in. There is one distro in particular CentOS which has a BlueQuartz system which basically is the open source equivalent of the Cobalts current web UI and server config management (along with the server packages themselves). This may be the most ideal option. To get the a linux distro onto your system you can do one of two things (there may be more but these seemed the most appropriate)

    1. Pay $85 AUD and buy Strongbolt, the CD installer for the CentOS + Bluequartz. Strongbolt is a bootable ISO that will install the updated ROM and CentOS over Ethernet.
    2. Install onto a PC then transfer the hard drive across. Cheap, a bit of a muckaround, but doable. If you want Bluequartz, then Nuonce have the distro as a free (and slow download)
    3. Null Modem serial cable< - Does anyone have these anymore?
    4. I’ve seen Gentoo, Fedora, Debian and other distros have Cobalt installation pages dedictated to them.

I’m going with Nuonce, because of the additional packages they have available and the much less stuffing around. Beware that the installer will assimilate itself to any hard drive you have in the PC that you put the CD into. My friend unfortunately found this out the hard way.

Don’t locate

After installing Captive to read my NTFS partition, I noticed great periods of unexplained high CPU activity. I narrowed these down to mount.captive-ntfs and captive-sandbox-server processes. No files on my windows partition (mounted on /C) were being accessed to my knowledge. After scrolling through a process tree I realised that updatedb and find were running and that of all the filesystems and directories to ignore, Captive and the /C path were not in that list.Whilst it doesn’t explain why the CPU goes so high, I can guess that a find / on a 30Gig C Partition would take a lot of time, considering the files available and that each time a new file is opened a new instance of the captive-sandbox-server starts.

To have updatedb ignore the /C mount you can edit the file /etc/sysconfig/locate & add your directory to the variable UPDATEDB_PRUNEPATHS

Menu’s menu’s everywhere, but nowhere to add them

I’ve been looking for a way to add non-package managed apps to the Gnome/KDE menus.

Recently, I installed Firefox 2, Eclipse and Jude this way but have found links telling me how to remove items from the application menu, no way to add them in.

Apparently some love between KDE and Gnome was reached in order to standardise the application menu and so it now resides in one place with all these .desktop files (aka shortcuts) to launch the desktop apps.

See Edit the Global KDE Menu Items from a console for SUSE Linux

[Edit]: Found some extra sites
The specification
SUSE realises they left something out

The ridiculous time it takes to build Qt 4.2.1

Ok so I’m pretty green when it comes to installing and building linux applications on your own system.

In the last week I think I’ve nailed it but now I’ve come to realise the pitfalls of this flexibility.

I started building the Qt 4.2.1 libraries and that was about 3 hours ago. Not to mention my system slowed to a crawl, and yes it is an old system, but I was expecting a little more play nice with everything so I could get some decent responsiveness from other background apps whilst I was waiting for the build.

OK, whining aside, at least I got the thing finished albeit the very late time.

Synaptics Touchpad Horizontal Scroll and Firefox

http://gentoo-wiki.com/HARDWARE_Synaptics_Touchpad

The most irritating thing about using Firefox on Suse and is having the horizontal scroll act as back and forward keys.

The linked page gives a great insight into configuring Xorg.conf to take advantage of the numberous controls and button emulations a laptop touchpad provides.

But it also highlights the solution to the problem of horizontal scroll in firefox isn’t to disable horizontal scroll, rather tell firefox you don’t want it to behave that way.

In short, go to about:config in firefox.
Set mousewheel.horizscroll.withnokey.action to 0
Set mousewheel.horizscroll.withnokey.sysnumlines to true

Holding a modifier, like alt, control, meta (windows), or shift is still configured to perform back and forth.

If you want to know what other options are available see
http://kb.mozillazine.org/about%3Cb%3E%3C/b%3E:config_entries#Mousewheel..2A

Variables are easy to do

Variables are easy to do

In my Amiga and MS-DOS days, I recall to set a variable you had to use a set command. Everytime I’m in a POSIX based system, I always forget how to set variables and the sad thing is its fricken easier than the mainstream systems….(mental note: gotta pick where to use the word mainstream these days.)

So to set a variable:

VARIABLE_NAME=value

Thats it!

It’ll make you feel stupid just looking at it. No keywords, the syntax is built into the shell directly.

You then want to export this variable to an environment value so that a variable can become global, not just to the shell or script instance that it executes in. To do this

export VARIABLE_NAME

Ok, and since I’m on the topic, I may as well tell you about how variables are referenced.

$VARIABLE_NAME will substitute the variable value in your command. You can do things like handle spaces in values by surrounding $VARIABLE_NAME in double quotes.

If you actually want to print out verbatim the text `$VARIABLE_NAME’ then the key is to open the text with a backquote (`) instead.

Viewing the System Log

You know how CTRL+ALT+F[1-6] gives you a virtual session, and CTRL+ALT+F7 gives you the X session, I read in the Suse Manuals that CTRL+ALT+F10 gives you the system log. Very helpful to quickly flip to while you are trying to figure out why something doesn’t work.