The Gray Matter
Not The Dark Matter
Sign Up!
Login
Welcome to The Gray Matter
Saturday, September 04 2010 @ 05:44 AM EST
Share View Printable Version Subscribe to 'Humor'

49 Reasons Why It's Great To Be A Bloke

Funny Anecdotes

49 truly inspired reasons why it is a great thing to be male. Those with a sharp sense of political correctness and not a funny bone in sight, feminists and other such men haters, can skip this one.

Share View Printable Version

Compiz + Emerald in Kubuntu (Hardy 8.04)

Technology

I've seen a lot of posts about how to get Compiz+Emerald working together in Kubuntu that involves a lot of poking around and creating scripts etc. However, there is a "better" way that is from what I can see, the K/Ubuntu preferred method. First some background. Like may others, I wanted to get Compiz and Emerald all singing and dancing on my desktop system at work but was frustrated by the lack of integration with GUI management tools - specifically with regard to getting Emerald to start at login. The general sequence of events goes like this:

  1. Install restricted drivers and "nvidia-glx-new" package (or the closed ATi driver package).
  2. Install every *compiz* package available (including ccsm)
  3. Install every *emerald* package available.
  4. Turn on desktop effects in KDE and specify to use a 3rd party config tool.
  5. Configure Compiz to your taste with "ccsm"
  6. Run "emerald --replace" to get rid of kwin/metacity

Lovely! Kudos to the package maintainers for making it this easy :) However, when you log out (reboot etc) and back in again, the compiz compositing manager starts, but not emerald! Why? Well the simple answer is that Emerald was never ASKED to start. So the better question is; why wasn't emerald asked to start? The answer to which is buried in a wrapper at /usr/bin/compiz-decorator. Basically this script is called by compiz when it starts to start your preferred window decorator (have a look in the "Window Decorations" configuration in CompizConfig Settings Manager, ie, "ccsm"). A few posts I've seen have suggested replacing this "compiz-decorator" with "emerald --replace" but this removes some of the fall-back/redundancy provided by the bundled script. This got me thinking - there must be a way to tell "compiz-decorator" to use Emerald...and there is!

If you open /usr/bin/compiz-decorator (it's a shell script, so any old text editor will do) and scroll down a little, you will find this block:

# start a decorator
if [ -x $emerald ] && [ "$USE_EMERALD" = "yes" ]; then
    DECORATOR=emerald
elif [ -x $gtk-window-decorator ] && [ -n "$GNOME_DESKTOP_SESSION_ID" ]; then
    DECORATOR=gtk-window-decorator
elif [ -x $kde-window-decorator ] && [ -n "$KDE_FULL_SESSION" ]; then
    DECORATOR=kde-window-decorator
elif [ -x $kde4-window-decorator ] && [ x$KDE_SESSION_VERSION = x"4" ]; then
    DECORATOR=kde4-window-decorator
fi

Notice the check to see if "USE_EMERALD" is set to "yes"? Well, scrolling back you will find a section like this:
if [ -z "$XDG_CONFIG_HOME" ]; then
    test -f $HOME/.config/compiz/compiz-manager && . $HOME/.config/compiz/compiz-manager
else
    ...etc...

Ok - so now we have the two pieces of the puzzle; firstly why Emerald isn't being to start and what files are read to get the instructions in the first place. So the final resolution is dead simple. All we need to do is create a file "$HOME/.config/compiz/compiz-manager" and populate it with "USE_EMERALD=yes" like this:
echo "USE_EMERALD=yes" >> ~/.config/compiz/compiz-manager

Voila. Log out and back in again and you'll see Emerald start :) Best bit is this modification will make the start-up consistent across upgrades of K/Ubuntu, and will work regardless of your choice of Gnome/KDE/XFCE etc. In other words, it's desktop environment neutral which is what makes this approach a little different to most of the others I've read online that seem specifically geared to one window manager/desktop environment or another. Also note, you can over-ride any of the variables in "/usr/bin/compiz-decorator" using additional declarations in the local ~/.config/compiz/compiz-manager file. This could be handy if you want to play with development versions of Emerald.

Share View Printable Version

Up and running on the new server!

Site News

Some people may be aware that my old ISP decided to increase my monthly access from $120/mth (paid quarterly in advance) to $500/mth!! Consequently I told them to shove it and went with the only real alternative in my area...Telstra Wireless 3G. It's expensive at $130/mth for 10GB but it's fast and reliable (surprisingly fast actually)...which is a LOT more than I can say for my old ISP. As anyone who had mail hosting on my old server knows, if my link was down for 2-3 days a month then it was good month. If the speed was anything over 2-3Mbps, it was fast for a change (they promised me 12Mbps...but it never happened). Compared to the new link which is routinely over 3Mbps and never goes down...it makes me wonder how the heck Fish Internet are going to survive with their price gouging, poor service, next-to-no-customer-support, service offering. Couple that with the dragon who answers their phones (yeh, good luck getting past her!) I hope they go the way of other $#!t-house ISP's - down the proverbial gurgler. Good bye, and good riddence to them; they'll never get another cent out me and I'll make sure to tell everyone who can't get ADSL in our area to give them a wide berth.

So seeing as I no longer have a static IP (can't get them on Wireless 3G) and the small bandwidth quota, I decided to move all my hosting off-site and use the same provider my employer uses. Actually, I'm piggy-backing off their hosting account (with the boss' blessing). So this site is now on a faster server sitting in a data centre somewhere and I don't have to monkey around with it to keep all the lights blinking...that's someone else's job! Yay!! Everything is back up and running, including the galleries, but the weather stuff will take me a little longer to sort out. The problem with the weather is that the weather station is sitting on my desk at home (with the sensors outside) and the server is sitting in Sydney somewhere. Consequently I've got to figure out a sensible way to get not only data but the graphs (which are generated on my server) onto the hosted server. Real-time updates aren't going to workable but I'm thinking sensor data every 3 minutes and graphs every 15 minutes. We'll wait and see :)

For those who need help setting up their e-mail, I will be updating the support page in th next day or so. Right now though, there are some lawns that need to be mowed!!

Share View Printable Version Subscribe to 'Humor'

Why we love children

Funny Anecdotes

A frined of mine sent this to me via e-mail and I just had to add it to my funny anecdotes :)

  1. NUDITY
    I was driving with my three young children one warm summer evening when a woman in the convertible ahead of us stood up and waved. She was stark naked! As I was reeling from the shock, I heard my 5-year-old shout from the back seat, 'Mom, that lady isn't wearing a seat belt!'

  2. OPINIONS
    On the first day of school, a first-grader handed his teacher a note from his mother. The note read, 'The opinions expressed by this child are not necessarily those of his parents.'

  3. KETCHUP
    A woman was trying hard to get the ketchup out of the jar. During her struggle the phone rang so she asked her 4-year-old daughter to answer the phone. 'Mommy can't come to the phone to talk to you right now. She's hitting the bottle.'

  4. MORE NUDITY
    A little boy got lost at the YMCA and found himself in the women's locker room. When he was spotted, the room burst into shrieks, with nude women grabbing towels and running for cover. The little boy watched in amazement and then asked, 'What's the matter, haven't you ever seen a little boy before?'

  5. POLICE # 1
    While taking a routine vandalism report at an elementary school, I was interrupted by a little girl about 6 years old. Looking up and down at my uniform, she asked, 'Are you a cop?'
    'Yes' I answered and continued writing the report.
    'My mother said if I ever needed help I should ask the police. Is that right?'
    'Yes, that's right,' I told her.
    'Well, then,' she said as she extended her foot toward me, 'would you please tie my shoe?'

  6. POLICE #2
    It was the end of the day when I parked my police van in front of the station. As I gathered my equipment, my K-9 partner, Jake, was barking, and I saw a little boy staring in at me. 'Is that a dog you got back there?' he asked.
    'It sure is,' I replied.
    Puzzled, the boy looked at me and then towards the back of the van. Finally he said, 'What'd he do?'

  7. ELDERLY
    While working for an organization that delivers lunches to elderly shut-ins, I used to take my 4-year-old daughter on my afternoon rounds. She was unfailingly intrigued by the various appliances of old age, particularly the canes, walkers and wheelchairs. One day I found her staring at a pair of false teeth soaking in a glass. As I braced myself for the inevitable barrage of questions, she merely turned and whispered, 'The tooth fairy will never believe this!'

  8. DRESS-UP
    A little girl was watching her parents dress for a party. When she saw her dad donning his tuxedo, she warned, 'Daddy, you shouldn't wear that suit.'
    'And why not, darling?'
    'You know that it always gives you a headache the next morning.'

  9. DEATH
    While walking along the sidewalk in front of his church, our minister heard the intoning of a prayer that nearly made his collar wilt. Apparently, his 5-year-old son and his playmates had found a dead robin. Feeling that proper burial should be performed, they had secured a small box and cotton batting, then dug a hole an d made ready for the disposal of the deceased.
    The minister's son was chosen to say the appropriate prayers and with sonorous dignity intoned his version of what he thought his father always said: 'Glory be unto the Faaather, and unto the Sonnn, and into the hole he goooes.' (I want this line used at my funeral!)

  10. SCHOOL
    A little girl had just finished her first week of school. 'I'm just wasting my time,' she said to her mother. 'I can't read, I can't write, and they won't let me talk!'

  11. BIBLE
    A little boy opened the big family Bible. He was fascinated as he fingered through the old pages. Suddenly, something fell out of the Bible. He picked up the object and looked at it. What he saw was an old leaf that had been pressed in between the pages.
    'Mama, look what I found,' the boy called out.
    'What have you got there, dear?'
    With astonishment in the young boy's voice, he answered, 'I think it's Adam's underwear!'

Share View Printable Version

The CPU - where to from here?

Technology

Modern computers have at their heart a piece of equipment commonly referred to as the "Central Processing Unit" (CPU). This is common knowledge and regularly used as the final determinant factor in a computer's performance. The reality of a machine's performance, however, is a much more complicated equation. Like many devices, the overall performance is a measure of the sum of parts that compose the system. Similarly, a single poorly performing component can undermine, or even negate, the performance of the other components. Using blindingly fast CPU's in a system with very slow memory will result in a computer that is well below accepted standards. However, fast components are becoming very cheap and offer other advantages beyond the initial design goals of the component in question.

For instance, most people are unaware that their video card has a highly specialised processor call a "Graphics Processing Unit" (GPU). The GPU, unlike the CPU is designed for a set of very specific calculations; usually matrix transformations using arbitrarily precise floating point numbers - usually double precision floating points, but not always. The GPU typically runs at a slower clock speed than the CPU and uses a very fast, purpose-built memory subsystem of its own too. Combined, the video card's GPU and memory are capable of some truly mind-boggling calculations. Here's where things get interesting; many facets of science and "non-graphic" mathematics use exactly the same type of calculations the GPU was designed for. In fact nVidia has even released a programming framework (called CUDA) to leverage their GPU's for doing things other than playing games. Researchers in Belgium at the University of Antwerp, have now been able to build a system, capable of super-computer speeds, using commodity graphics cards totalling eight GPU's!

For quite some time now, I've considered the role of the general purpose microprocessor, aka CPU, rather limiting. As stated before, a single component doesn't in itself determine how fast a machine will be, but a single component can certainly determine how slow a machine will be. I believe the time is coming when to move beyond current performance limitations, the computer industry will need to utilise specialised processors for specialised tasks. Given the generalist role a CPU must undertake, by design it is a compromise to balance performance across a broad set of tasks, consequently it will never excel at any specific task. However, if the CPU could offload particular tasks to other, external, processing units specialised for that particular task the overall performance of the system would increase significantly. We have already seen this in limited ways with the advent of hardware-based storage controllers, dedicated graphics processors and I would argue the advent of the northbridge for direct access to various busses that link the core of the system together. Prior to the separation of the CPU and northbridge, all input and output (I/O) to any device was forced to go through the CPU. With northbridge controller the CPU could be freed up and many devices are capable of direct communication and data transfer.

In conclusion, I look forward to future of the CPU; whether it's a Intel "Core", IBM "Cell" or any other processor. However, what really interests me, is the rise of the specialist processor and how we as programmers and system engineers can find new and innovative ways to implement them to augment and enhance overall system performance in specialised ways.

Credits:

Share View Printable Version

ISP Troubles

Site NewsYesterday from about 2pm to 8pm Aust EST, my ISP had some serious routing problems. This, unfortunately, isolated my network from vast tracts of the Internet for the duration. Some people could get to my site, whereas others could not. As far as I know, locally TPG, Internode and IInet subscribers would have been unable to reach my site, but Optus and Bigpond subscribers could. International ISP's seemed to be very hit-and-miss. I have no idea what went pop for my ISP, but it was intensely frustrating! Apologies to anyone who had mail problems with my site or couldn't access the web site.
Share View Printable Version

The Grays go Gigabit!

TechnologyIt's taken a while but the cost for gigabit ethernet is finally down to a point that I considered justifiable. So I lashed out (sic) and bought a 5 port Dlink gigabit switch. This then connects to my 8 port 10/100Mbps switch/router and ultimately the Internet. The machines on the Gbit switch are simply my home server, Nat's desktop, and my Mac Mini. I've also run a patch cable for my Macbook Pro for the odd occasion I need better-than-wifi speeds. The wireless access point hangs off the 8 port 10/100 switch as it will never do better than 54Mbps, so there's no reason to waste a gigbit port on wifi! All in all it's been a relatively straight-forward transition except for Nat's desktop. Her machine would only sync at 100Mbps on the 5 metre CAT5e cable between her and the new switch. So I went out today and bought 6 metres of CAT6 from Dick Smith Electronics (AUD$10 all up) and crimped the ends myself. For a similar pre-made CAT6 cable, they were asking around double what I paid (thieves!).

The results have been what I expected. Loading photos and large files from the file server is now a LOT faster. I especially noticed the difference when browsing the file server in "thumbnail" mode; it was as fast as it would be if running locally. The Time Machine backups for my Mac Mini are now super fast to the file server too which is great as the system (the Mac Mini) bogs down a little while it does the backup. Basically, with the consumer-grade hard drives in my server, I am now limited by the speed of those drives and the CPU power in the clients far more than the network fabric. It's nice to know that as I develop this network any gains in the server speed will pay off for the clients on my LAN.

Share View Printable Version Subscribe to 'Humor'

Hot Air Balloon Logic

Funny Anecdotes

A man piloting a hot air balloon discovers he has wandered off course and is hopelessly lost. He descends to a lower altitude and locates a man down on the ground. He lowers the balloon further and shouts, "Excuse me, can you tell me where I am?"

The man below says, "Yes, you're in a hot air balloon, about 30 feet above this field."

"You must work in Information Technology," says the balloonist.

"Yes I do," replies the man. "And how did you know that?"

"Well," says the balloonist, "what you told me is technically correct, but of no use to anyone."

The man below says, "You must work in management."

"I do," replies the balloonist, "how did you know?"

"Well," says the man, "you don't know where you are, or where you're going, but you expect my immediate help. You're in the same position you were before we met, but now it's my fault!"


This reminds of some employers I've worked for...who shall remain nameless - you know who you are!

Share View Printable Version Subscribe to 'James' Weblog'

Double-demerit weekends

James' WeblogWith the advent of the Easter long weekend, (yay!) the NSW government have continued their love affair with double-demerit points for driving offences. This is a weird way to ensure safer driving, in my opinion, as statistically, public holidays are no more dangerous than any other time to be on our roads. However, after driving down the freeway into town this morning, I couldn't help but make some observations now that double demerits are in force.

First of all, everyone (except maybe idiot P-platers) were doing the speed limit give or take a few km/h. That isn't surprising in itself but the effect it had on traffic flow was remarkable. Strangely, the usual bottle-necks around the Kanahooka and Kembla Grange on-ramps (north bound) were flowing smootly with now hold-up at all. Why? Simple, with everyone doing roughly the same speed, traffic was spaced evenly and the right lane was practically empty; thus people already on the freeway were able to move into the right lane and make room for the merging drivers. Surprise, surprise, "keep left unless overtaking" actually results in better, less stressful driving for everyone! Duh.

Secondly, in town people weren't running the gauntlet at round-abouts and intersections and actually seemed to be a little more courteous than normal. Amazing.

Of course, the half-dozen or so provisional license holders (aka. P-platers) were the exceptin to the rule - or so they think. Why is it, almost without exception, they spend more time talking on their phones, playing with their stereos, doing their hair or talking to passengers than they do actually driving?! Maybe that's why they are so disproportionately represented in the road toll?

Have a safe and happy Easter folks, and if you're on your provisional license, take extra care - you don't have the experience or the 5k1LLz to dick around behind the wheel :)

Share View Printable Version

New random photo

Site News

As you might notice, the random photo block is gone and I have installed a new Mini Slide Show. This is a Adobe Flash based player so you will need to download Flash Player if all you see is a blank box.

The photos will refresh every 5 seconds and will cost you a few kilobytes (2-3KB) for each image. If you click on an image, it will take straight to the correct location in the galleries. So watch and enjoy :)

James' twitter