Home
TimC [entries|archive|friends|userinfo]
TimC

[ website | Waikikamukauwenewekancicagote ]
[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

NRMA proving themselves to be useless morons again [May. 9th, 2008|09:09 am]
[Tags|, ]

Could anyone with an NRMA memership, that rides a bike and cares about it, please ring NRMA (specifically asking for Alan Evans (president) and Anne Morphett (safety adviser)), asking them not to speak on your behalf in the future, please?

*SCREAM*

Seriously, what THE FUCK are they thinking, taking a "known to police" psychotic maniac's response to a bunch of cyclists as an excuse to push their fucking useless and counter productive agenda?

Bring on $10 a litre, fuckers.

EDIT: And now the stupid minister for cars wants us to avoid using the roads alltogether when it is busy (6:45am? Peak hour? You mean peak 8 hours, don't you?). Sounds great. Especially for those of us who utility cycle. It's not fucking helpful to peak hour traffic? NO FUCKING KIDDING ME, YOU FUCKING ARSECLOWN! IT'S NOT HELPFUL TO BE ASSAULTED EITHER! I would argue that traffic is not helpful to peak hour traffic. 1.1 fucking people on average per 5 person car is not helpful to traffic you total dickwad.
link2 comments|post comment

Thesis 99.5% complete [May. 5th, 2008|06:56 pm]
[Tags|, , ]

I just finished (but not proofread) introduction.tex, having finished conclusion.tex a few days ago. Another meeting tomorrow, after being pleasantly surprised by the "It doesn't suck. If you can complete chapter 4 to the same state chapter 3 is by next week, then you'll be right" verdict of last week's meeting (of course, the copy of the .pdf file they were working off was several days old by that stage, and I presented them a new version where chapter 4 was at the same state as chapter 3, at the start of the meeting, so one leg ahead already).

So far, 35044 words (plus or minus LaTeX commands, and not including the junk officiata such as acnowledgments or 12 pages of bibliography (hah! Glad I didn't have to read all that!)), and 4998 lines of .tex. Of those, there are 27 occurences of the magic regular expression: "\\fixme{.*}"[1], which means I have completed 99.5% of the thesis (hah!). Of course, I have decided that I will mail the file to a guy who worked with me a lot a couple of years ago, and get him to see whether I have royally screwed anything up. That might be a mistake, but hopefully people are at the realism-and-not-perfection stage of things now.

Almost there...

P.S. How do I make myself seem more... interesting? I'm trying my hand at interweb dating again, given that I figured I might soon have some round tuits, real actual physical money and large amounts of leave piling up and not having to use it on visits to Melbourne for 16 hour by 31 day thesis marathons. But barely a nibble. Was it the "geek" keyword? Penguins? How can anyone not like penguins? It's funny actually. A friend of mine is also doing this, and she's got so much unwanted attention she's going to switch it off next week. Any!? Please!? Someone?! Is this thing on? <tap> <tap>
Look through the "top 100" of any age bracket/sex, and you find the expected. For guys, you really do have to be a jock with your shirt off. Then there's my small problem of being neither able to initiate a conversation, nor keep one alive.

[1]
\chapter*{Acknowledgements}
\ResetAbbrevs{All}

First and foremost, I thank my friendly \fixme{macro}.

Yeah, so I guess I also have to write my abstract and work out a title for the thesis too.
link20 comments|post comment

Crazy TimC invention #1822 [Apr. 27th, 2008|08:57 am]
[Tags|, , , , , ]

I was at Richmond station this morning, waiting for Godot a Sunday train Godot. I was listening as the trains weren't recycling all of their energy in the final stages of braking for the station. And I came up with an idea. Massive springs. At the end of each train. To be used to propel one train using the energy of another. Kind of like a Madison race, where one rider propels the next rider using a slingshot action with their arms. If the springs are perfect, any "collision" between trains will involve the conservation of momentum, as usual, and the conservation of energy. If the trains are the same mass, this will perfectly stop the first train (1), and propel the second train (2) up to the same speed train 1 was originally.

Now, you ask, what about having to stop at stations? This train network will have to be quite populated to operate. In fact, congested. At each station, let's assume a train (2) is parked. Train 1 is coming into the station and wants to stop. Train 1's massive spring collides with train 2's massive spring, stopping train 1 at the station, and propelling train 2. That's great, but what if train 1 is running early, and train 2 is not ready to close its doors yet on its passengers boarding? Train 2 has his brakes on when he's stopped. Not magic brakes, just ordinary brakes that exert a force against the track. Train 1 comes in, will eventually stop as the springs absorb all of the train 1's energy, and at the moment when it stops ready to be propelled backwards, train 1 also puts on its brakes. At this moment, no work is being expended. The brakes have forces against them, but no work is being done, and no energy lost -- it's sitting there, coiled up in the potential energy of the springs. When train 2 wants to take off, he just releases his brakes. Some energy may be needed to be expended for train 1 to move up the platform, or perhaps another train comes in behind it, pushing it along.

A great advantage of this system, other than absolutely minimal energy losses (which you can still recoup via regenerative braking if there are no handy trains around for you to collide with to stop you), is that there will be no more bad collisions. Collisions will of course be a normal part of operation, but the springs stops any shocks from being propogated, and thus the death and carnage that are usually associated with the word "collision".

Now, of course, the signalling and control system will have to be massively upgraded. Which means more computers and more software. And as we all know, All Software Sucks, and thus there will be failures in the system. Brakes won't come on at the right time etc, and you'll have runaway trains bouncing off each other when signals go wrong. You'll get front on collisions. You'll get reinforced collisions, when a moving train will be propelled further by a second collision from behind. Because it will be a chaotic system, if it's not controlled, you'll get chaotic effects. Remember the double pendulum system, where every now and again, the second pendulum will go "whoopdydooooo!" (that's the suckiest double pendulum I've ever seen, but the bandwidth here at Swinburne is 'orrible, and it was the first youtube video I found)? Ie, pinball trains!

Just put springs at the end of each branch of a recognisable network (eg, Sydney), massively overpopulate it, and then instant xscreensave hack!

Another slight problem, is that the springs will have to be a few hundred metres or so long to get nice acceleration characteristics. You'll either need to be able to find a mechanism to bend the springs around corners, or rearrange the train network to only involve straightish lines (no more than a metre deviation over several hundred metres).

_______________________________________________________________

And I was watching Rage lastnight, and came across a familiar sight. Home. It turns out David Bowie filmed Let's Dance partly in the Warrumbungles. Warning, maybe not particularly work safe, or more accurately, blimey, 1980s fashion sucked at the best of time.
linkpost comment

Our very effective police [Apr. 24th, 2008|03:16 pm]
[Tags|, , , ]

At APEC, it was all about our police arresting and denying justice to those walking across a street, not performing basic security checks on convoy cars, and the hard boys of law afraid to wear pinned identification (which turned out to be velroed on, and not pinned, anyway). This time, it was about not wanting to upset sensibilities of our guests.

In fact, the torch relay was a raging success.

The fact there were so few arrests among more than 20,000 people, with tensions sometimes running high, was a great result, he said.

No, it definitely wasn't that the police weren't very efficient in doing their job of stopping people getting heavied by thugs.

"The most important thing is the flame was never in danger, from start to finish, and that's an enormous credit to our federal police," Mr Lasek told Sky News.

Yup, I agree, it was more important protecting the nationalistic symbol of Nazi Germany than in upholding our standards of Laura Norder.

Good on ya, boys in blue. I have every trust that you can do your job competantly and I'm sure you're not all corrupt fuckers.
link1 comment|post comment

My last non-holiday holiday? [Apr. 22nd, 2008|06:13 pm]
[Tags|, , , ]

For the first time in over a year, I think I'm actually going to finish this damn thesis. Mind you, I have only just submitted a bunch of more chapters to various people to get them to look over it, so I don't actually have any comments on whether I am talking utter bollocks yet.

I have 46 occurences of my \fixme{} macro in *.tex. I am knocking over, on average, a few per day, and am caring less and less about the less important ones as time goes on (although I haven't yet worked out whether I'm knocking the easy ones or the hard ones off first). I am spending 14 hour days in my office in Melbourne, only wasting a couple of hours per day on USELESNET and the like, and I have 3 weeks left in Melbourne before I run out of leave and have to go back to night shift (a truly recommendable method to get more leave -- I've taken a couple of months off already since starting work 18 months ago). I have bannished weekends and Anzac day from my schedule.

Which means I need to knock off about 2.5 fixmes per day, without creating any more. And I get a few days to write abstract.tex and conclusion.tex.

I shall giving rolling updates to my supervisor, and hopefully I will have useful comments back by the time I leave. Then I can implement them in my copious free time when back at home. If that takes a month, then I just need to make another quick trip down here, print it out on the faster-than-light-speed colour printer we have here, and submit it off to the external examiners. Er, I guess we better find some external examiners?

But because we all love screenshots, here is preview-latex doing its thing within XEmacs:

screenshot

Isn't it beautiful? No need whatsoever for a kitchen sink, and minimal need for an external dvi viewer. The version in debian unstable though is a bit of a pain when you have compilation problems in sections of the file -- although that may be me missing vital details since I haven't even RTFM yet (ahh, I had subbed to the list half a decade ago, but never got around to using it).
link6 comments|post comment

I learnt something today [Apr. 20th, 2008|06:55 pm]
[Tags|, ]

Generation Renters

At least half of all 18- to 35-year-olds were renters, which increased pressure on a property market struggling with historically low vacancy rates and rising prices.

Where the hell did the other 50% get enough money to buy?

P.S. Pssst, Beattie. They're going to swim from the US to Qld are they? Not even that's going to be carbon neutral, because they'll be needing to go through a lot of sea-bananas.
link6 comments|post comment

Backups, and the lack thereof. Squidpurge partially to the rescue [Apr. 12th, 2008|06:08 pm]
[Tags|, ]
[mood | annoyed]
[music |ABC Classic FM]

Due to a royal stuffup (AKA snafu) in the taking of backups, we have lost the contents of my work's webserver that have been updated since Jul 2007. I'm more than a little annoyed at this, but it has certainly given us extra incentive (and the political ammunition) to get rid of those crappy Sun machines that still power half our infrastructure, but in the meantime, I rescued a small part of it from my squid cache (a lot less than I was hoping for. Lots of obsolete .gif files from the radar on bom.gov.au and weatherzone though).

Downloading squidpurge (purge-20040201-src.tar.gz), I read the README document, changed lines around line 110 of the Makefile to read
SOCKLEN = socklen_t

and possibly removed
-march=pentium

from line 114, and compiled, and then, finally, run
./purge -v -sC /tmp/ -e site.aao.gov.au -c /etc/squid/squid.conf | \
    squidpurgetime | tee recoveredfiles.list

where squidpurgetime is a quick and dirty script that prints the hex timestamps as nice human readable times:
#!/usr/bin/perl -w

#takes the output of ~twc/install/squidpurge/purge -v -sC /tmp -e 'site.aao.gov.au' \
#   -c /etc/squid/squid.conf and formats the hex times nicely

use strict;

my $line;

while (<>) {
  chomp;
  my @fields = split;
  if (/^\/var/) {
    foreach (qw (4 5 6 7)) {
      my $time=hex "0x$fields[$_]";
#      print "time = $time\n";
      $fields[$_] = localtime($time) if $fields[$_] ne "ffffffff";
      $fields[$_] = " | $fields[$_] | ";          
    }
  }
  print "@fields\n";
}


I then run
squidpurgeupdatetime < recoveredfiles.list

where squidpurgeupdatetime is a quick and dirty script that updates the timestamps of the files to that which was obtained from the webserver originally, rather than the time when purge was run:
#!/bin/sh

grep ^/var/ | sed 's/[^|]*|[^|]*|[^|]*|[^|]*|[^|]*|// ; s/|[ 0-9]* http:\/\// : /' | \
  while read timefile; do
    time=`echo "$timefile" | sed 's/ : .*//'`
    file=`echo "$timefile" | sed 's/.* : //'`
    echo -n "Time=$time "
    time=`date +%Y%m%d%H%M.%S -d  "$time"`
    echo " -> $time"
    if [ -e "$file" ] ; then
        touch "$file" -t "$time"
    fi
done


This gives me a populated directory in /tmp/site.aao.gov.au, and I have recovered some of those files (squidpurge can do more than just purge the squid cache, despite its name) that had passed through the squid cache and subsequently gone missing. Not all unfortunately. A 'grep -r ... /var/spool/squid' shows that a lot of files that I know I have looked at have already been purged from the cache, and are unlikely to have existed in the backup snapshots I have of my personal machine that will include the squid cache (I'll look into this when I get back from leave). Static files too that I presume the webserver is sending sensible expiry headers for, but I have never been able to work out why squid is so aggressive in purging and not caching some files, but doesn't mind saving 10,000 changing gif files from BOM's radar.

Alas, the internet archive doesn't have any copies of our website, because of a helpful wildcard entry in robots.txt. That too, *SHALL CHANGE*, as soon as I get back from leave (which I am on now, despite still recoving files), and we get started on this infrastructure reorganisation.
linkpost comment

Joe Jobbing [Apr. 8th, 2008|12:22 am]
[Tags|, , ]

I just got my first Joe Job. I *really* *really* wish there was an RFC that stated the address the bounce was generated for must go in the subject line, so that I could just scan over the bounce messages in my spam-questionable folder, and make sure nothing got in there that signifies a real problem -- a real address not in Russia that I actually sent to. As it is, there's a dozen different MTAs that have all replied with their own cutsie little replies "Hi! This is the friendly qmail daemon! I've just generated a bounce because you're an idiot and sent to the wrong address!", and the subject line is a descriptive one of these:
* 400^0 Undeliver(ed|able) (Message|mail)
* 400^0 deliver your (message|mail)
* 400^0 delivery status.*failure
* 400^0 delivery failed
* 400^0 Returned to Sender
* 400^0 failure notice
* 400^0 returned mail

I *think* I have my procmail filter now directing bounces that didn't include my real name in the From header of the mail that generated the bounce going to the spam bucket. But it's been a few false starts to get to this stage. About 1 per minute at this stage -- been going for about an hour. I would have hated to wake up to this in the morning.

If I *ever* meet a spammer, I will personally eat their eyeballs.

Connors' Corollary to the fundamental law of human stupidity:

     Bandit       Intelligent

     Naive        Spammer


QED.
linkpost comment

Tcl marketing [Apr. 4th, 2008|11:32 am]
[Tags|, ]

Tcl Marketing


Perl - still very popular, but dropping off in terms of new projects. Still have a very big library and system to access it - CPAN. There are lots of potential converts here, in terms of people who want GUIs, and a language that's simpler and cleaner. Even more converts are probably likely after the next version bump.


"One giant... step for mankind... backwards".

Please please people, prove that wiki wrong.
link2 comments|post comment

Happenings [Mar. 30th, 2008|10:35 pm]
[Tags|, ]
[music |Cannot Buy My Soul (the songs of Kev Carmody) -- Comrade Jesus Christ (The Herd)]

Last couple of days have been freezing here. Last night I wanted the heater on, but I figured the wrong time to turn it on for the first time in the year was during Ur Thour. So instead, I put a towel over my legs like an old man.

I have a lap cat again. When Phred died, Purrple became alpha human. And 3 months later, she's now a people person. She'll paw at my legs until I clear my arm out of the way (or sometimes won't even wait for that), then jump up. And just to make herself look like she's of independant thought, she won't acknowledge me when I turn the lights out, go to bed, and call her, but comes in 20 minutes later. These days, I'm sleeping a heck of a lot better than I ever used to, so 20 minutes later, I'm most of the way towards sleep, and she'll jolt me out of it when she jumps up onto my legs. But it's OK, because she now lies on my back like the other cat didn't. Keeps us both warm. I'm wondering whether this is just a fickle selfish thing though -- when summer comes, she won't be a lap cat anymore.

So I'm becoming a scary old cat man (but you already knew that).

I was involved in an accident. I got hit by a lawnmower. They operated for hours to try to save my hair -- it was very nasty and messy. But alas, they had to amputate it.

So I've become a scary old cat man who has renounced his hippy tendencies and got his damn hair cut already. He'll vote for Nelson next.

In fact, I really am becoming old.

Everyone knows that the older you get, the quicker time passes. It's probably because when you're young, each year takes 1/n of your life to pass, where n is your current age in years, and is quite small, so it takes a large fraction of your life to watch a year go past (hey, I'm tautology man!). By the time you're 27, each year flies by taking only 1/27th of your life to pass!

So assuming I am 1/2 of the way through my life in Earth years (about right -- my mum is about the oldest anyone in my family has reached, and her younger brother dropped dead suddenly, last year, from the same genetic heart defect that's going to get us all), let us work out how much of my life I have already wasted away:

True age at n years of Earth age = Hn = sumi=1n 1/i (where's LaTeX when you need it?). In order to make it look like I have remembered something from maths, this is the harmonic number, and to make it look like I know how to use fancy mathematics, Hn = gamma + ln(n) + 1/2n-1 - 1/12n-2 + 1/120n-4 + ..., where gamma ~ 0.5772 (it was obvious it was going to grow pretty much as ln(n), since I really should be using the integral of 1/n, but couldn't work out how not to start off the integral with a singularity, so I'm just winging it here by starting off the sum at 1).

And thus, H54 = 4.58 and H27 = 3.89, and I have already lived 3.89/4.58 = 84.9% of my life. This, I guess, is why everyone says it all turns downhill when you reach 27 -- you've only got 15% of your life left in front of you, and your bones are already starting to ache. Well, I guess I get to see in 16 days. And damn, I guess I better go do something with my life!
link7 comments|post comment

Laser pointers [Mar. 30th, 2008|07:10 pm]
[Tags|]

Time to get your laser pointers now.

The stasi want them banned.

I'm after a supply of reliable 50mW lasers, not those crappy things off Ebay that
1) will burn out after a couple of hours use
2) are simply 5mW lasers with the infrared filter removed. Yeah right. 50mW. Of collimated infrared.
link1 comment|post comment

Sheldon Memorial Ride [Mar. 27th, 2008|07:14 am]
[Tags|]

I hope my cycling compatriots in Canberra are able to attend this ride in honour of Sheldon Brown.
linkpost comment

Geekery [Mar. 24th, 2008|04:03 am]
[Tags|, , , ]

I believe I just broke two world records. Number of keyboards on desks, plugged in and working. And age span of those keyboards. Yes, I am sitting at the console, with the interdata 70's rather aging keyboard with 35+ year old keys that don't always work. And the perkin's terminal next to it that would be a very similar age. Next to the interdata keyboard, is the youngest of them all - the Eeepc I am in the process of evaluating. The keyboard truly sucks for human sized fingers, but no harm done thanks to USB keyboards. There's a Sun Type 4 for a mimic that is usually stashed away, but I am doing stuff on the the mimic. Another Sun Type 4 for the autoguider. The computer connected to that sure got a beating tonight. I wrote my most sarcastic fault report yet, into the fault log tonight. And yet another Sun Type 4 (I really hate those keyboards -- far too tough. Gives me RSI. Give me a Type 5 anyday. Different plugs, alas). And a windows machine controlling the dome refrigerator, but whose screen contents currently contain that rather sarcastic fault report (sorry guys, opera, not firefox. One thing I hate more than closed software is buggy crap bloated nohope software). A 2 headed machine that will be the new telescope control computer. It will replace the two old keyboards and associated equipment. Currently mounted on a temporary desk to the side, so technically, this is 10 keyboards on 2 desks, not one. And finally, my laptop running debian sid. I mostly bought it so it could sit harmlessly in the corner without me having to kill my fingers typing on the type 4 keyboards. 9 computers, 10 keyboards, +35 years. Two of those machines would have spent that +35 years only having been turned off for a few cumulative days.

dscf2814

EDIT: 11! I forgot about the MET machine ontop of the console at the back! Sun Type 5. Lovely keyboard. Alas, one of the few machines it can be plugged into, and it just sits there beavering away showing the MET GUI 31536000 seconds a year.
link4 comments|post comment

More fiddling with xplanet [Mar. 22nd, 2008|11:53 pm]
[Tags|, , ]

Trying running
xplanet -projection ancient -origin moon -timewarp 2592000 -wait 1
on your medium-fast automated post-abacus machine.

It gives a good demonstration of just how complicated the interaction of the earth, sun and moon is. It shows the Earth every 30 days, so pick a point on the earth, and it will always be the same time there from frame to frame, so there will be roughy the same illumination. From frame to frame, the moon is roughly at the same phase, although it changes slowly because the moonth isn't exactly 30 days long. If you run this now, the Moon is nearly full, the Earth is nearly new, and the view you'd see of the Earth from the Moon is that of the right hand image. Skip forward 30 days, and the moon has jumped forward in phase by 0.5 of a day (the synodic period of the moon is 29.5 days). And the years are flicking by every 12.2 frames, which means the seasonal motion is very apparent. So with the seasons, you can see the Sun illumininating the northern and southern hemispheres alternately, and then you can see the whole earth roll up and down, as the moon travels above and below the equator on its elliptical orbit.

Other fun timewarp factors are of course 86400, which shows just the changes during the phase of the moon - it would take too long to get through the seasons.

Guess what's going into my xscreensaver configuration file in just a moment (hint, "-vroot"), although it makes my laptop double in temperature on the Celcius temperature scale (hence may only be enabled when in AC mode)?

This lesson in solar system astronomy brought to you by the letter "p" for "procrastination".

P.S. I've updated the nixie tube javascript clock, so that local time stands out more by being displayed using the CRT style numerals we have on our sidereal/UT clock and telescope position. If anyone knows what these displays are actually called, please comment!
dscf2723
linkpost comment

Autumnal equinox and near Earthal eclipse. [Mar. 22nd, 2008|04:26 am]
[Tags|, , ]

Gee, the equinox must have just happened. I wasn't this tired lastnight, and you usually get less tired the further into night shift you progress. Still 2 hours to go til sunrise, and I am really flagging. Can't even drive pgcont() right now, so I just have to sit here with toothpicks holding my eyes open, twiddling my thumbs for the next couple of hours.

From here on in, for the next 3 months, it only gets harder (well, for the past 3 months too).

Tonight has been a total washout - 100% humidity, and orographic cloud forming over the dome. I guess you have to expect a 16 story building (tallest in NSW, this side of the blue mountains!) plonked ontop of a mountain to cause its own weather patterns. It would make a spectacular photo, but I'm too cold to go outside. I opened once, but closed again within 10 minutes when I worked out the star was a fuzzy blob of 3" across, at best. Not worth risking water on the mirror in conditions like that.

Ancient projection )

Anyway, my ~/bin/update-background.sh script just came up with this image (usually it comes up with kittens). You too can get it by running `xplanet -projection ancient -num_times 1 -origin moon`. wmmoonclock claims that the moon is exactly 50% illuminated, and the autumnal equinox was about 12 hours ago. So it's fullmoon now, (newearth), and exactly the same amount of light is hitting the north and southern hemispheres. The moon must be pretty close to the equator too (yep, isn't wmmoonclock useful? -3 degrees declination). The autumnal equinox was roughly 12 hours ago. They don't usually line up like this. Evidently almost got an eclipse of the Sun by the Earth.

The "ancient projection" shows both hemispheres, but the right hand image is roughly what would be seen from the moon.

Alternatively, the rectangular projection below shows just how the north and south are equally illuminated:

Rectangular projection )
linkpost comment

The blind leading the blind. Or javascript:void(0) and "#" href targets considered harmful [Mar. 8th, 2008|03:44 pm]
[Tags|, , ]
[music |War of the Worlds]

I have been frustrated for years, when I go to open a link in a new window in a web browser (via a middle mouse click binding, in a half sensible browser on a half sensible platform), and it turns out to be a link to javascript:void(0). Or a link to the same page, because the target was "#" in the current directory. So I go back to the original page, and dutifully click on the link again to open it the way the webpage developer intended, and all it does is to open a popup that uses javascript... to open a new URL.

So I go ogle for an explanation of why some web developers have settled on using javascript:void(0) and "#" as the targets to their href links. And I discover posts like this, advocating the most complex of javascript for html code that should simply read
<a href="http://www.your_buddies_site.com" 
target="_blank">Check out my buddies' site</a>

(Check out my buddies' site) followed by affirmations from people saying "thanks! That's going into my site straight away!". OK, this guy at least has a (bogus) justification for wanting to use javascript, but it was the best example of a class of methods I found when I wrote this originally (a month ago, and then forgot to make it public).

This post here says to use void(0) and why they advocate that - to tell the browser not to follow the URL once it's finished processing the javascript.

And then getting closer to a real solution is to return false from the onclick handler in order to tell the browser not to redirect to the top of the page in the case of using "#" in the href target. But why link to "#" at all? If you're just trying to open a webpage, let's obey the user when they ask to open the webpage in a new window or tab, and even better, let's keep working when they have turned off javascript. Just link to the page in question, instead of "#". The javascript will still be executed, and the "return false" will tell the browser to ignore the href target. If the javascript doesn't execute because the user asked for the page to be opened in a new window, then the target is still good.

The page that triggered my annoyance this time was a website where presumably they'd want to hire people who actually knew how to write webpages that didn't piss off their paying customers. Instead, their code looks like this:
<a href="Javascript:void(0);" onclick="window.open('/ups/ebm_pop.asp','p1', 
'location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=550,height=180' 
);">Extended Battery Modules (EBMs)</a> increase UPS battery runtime capability

So they've done it exactly wrong. I open the link in a new window, and the URL it opens is simply the very bland javascript:void(0);
That doesn't make me want to buy anything.

I was actually looking at this lastnight, for a page on our intranet to display in frames, the fullsky camera along with a javascript clock (using nixie tubes as the digits :). Why implement a clock in javascript on a webpage? It's being displayed on an 8 bit x-terminal, with what appears to be no fonts whatsoever. "xclock -digital" runs, but as soon as I ask several versions linked against libfreetype and otherwise, to use a different font, it still uses the too small default font. You can't read the clock from across the room. You can however, read the nixie tube .gifs from across the room. And furthermore, I display local time, Queensland time (equivalent to non-DST time), UTC and Mean Julian Date, since all are relevant to us (the display linked above is a small part of the frameset ultimately displayed -- sorry, is behind access controls -- too computationally expensive on my own personal workstation; oh, and woe would be the external bandwidth). All displayed in a nice soothing retro nixie tube style, since soon all of the nixie tube displays will be removed from this building with the Telescope Control Computer upgrade (head computer dude is going to make himself a real nixie tube digital clock to satisfy all his nostalgia needs).

I wrote three different versions of the page, with different sizes of the skycam image, so the main browser window can be set to three different sizes, since for some of our instruments, the display also needs to accomodate various sized panels displaying instrument status. I don't want any toolbars, menubars or address bars taking screen space since this is just a status display - the person setting it up can always ctrl-N to get a new window if they need to. But I do want the user to be able to open a new window with the other choices for window-size, which would be a full browser window with toolbars etc (gives them a chance to get a normal browser window to do normal browsing on, but they really shouldn't be doing it on that machine). Note also, that this is for an intranet. This is a status display. It will be displayed on one machine, using a dedicated account, with a browser set up not to ignore all that crappy javascript stuff I usually turn off. I can afford to get away with more things than I would normally afford myself. I would not normally set window sizes for instance, but here, it is exactly what we want - and any changes I ever make to it will be tested explicitly on the one and only machine it is ever designed to display on. Don't assume you can blindly get away with it yourself, unless you control your viewers' browsers.

So the page with window size choices are given by code that sets the window size and which decorations are displayed:
  <a href="aatxth-large.html" onClick="window.open('aatxth-large.html', '_blank', 
'width=786,height=824,location=no,menubar=no,status=no,scrollbars=no,toolbar=no'); 
return false;">Large</a><br>
  <a href="aatxth-medium.html" onClick="window.open('aatxth-medium.html', '_blank', 
'width=734,height=788,location=no,menubar=no,status=no,scrollbars=no,toolbar=no'); 
return false;">Medium</a><br>
  <a href="aatxth-small.html" onClick="window.open('aatxth-small.html', '_blank', 
'width=553,height=646,location=no,menubar=no,status=no,scrollbars=no,toolbar=no'); 
return false;">Small</a><br>

Notice how the onclick handler will ask the browser to open a new window with "_blank"? I get my three window size choices and get a browser window without decorations (you can't rely on that of course -- the user may have disabled that in the browser). The onclick handler returns false to tell the browser not to do anything with this page, once the new window has been created. If the user opened a new page manually, they get exactly the same URL being opened in that, via the href target. If javascript was off, again, the main href target gets opened. You could add a target="_blank" to that too, if you wanted.

And to unconditionally open a new tab or window, each of those pages contains a link back to this choices page:
    <a href=".." target="_blank">Other skycam sizes</a>

It just opens a new window with default decorations, etc. That's presumably what most of these "help" pages and tutorials *should* have been saying.
link4 comments|post comment

Mindless consumerism [Mar. 8th, 2008|01:29 am]
[Tags|]

Until about a year ago, I had lived my entire life well below that artificial construct called the poverty line. So a fulltime job is a remarkable novelty to me, even a year and a half later.

But this could have been an expensive week. Last weekend, I realised that there were a few houses in town that looked quite appealing, that were merely twice my yearly income pre-tax (take that, suckers in Sydney!). I believe the general rule is to aim for mortgages of less than about 3-3.5 times your yearly income, I believe pre-tax. Having already saved a fifth of the requisite amount (neglecting the significant interest costs), it only became apparent to me a week ago that this would be surprisingly managable - I could pay it off in 8 years at interest rates a bit above where they are now, if I don't end up getting any promotions.

So I found two nice houses in town. The fear of losing them to someone else quicker than myself was soon offset by the thought that I had only been studying the local market for 2 days, and that they were in the centre of town. The centre of town is loud. Nothing at all like where I am currently, as shitty as this place is. I want a small block of land a km or so out of town, but then I'd either have to build myself, or be at the mercy of someone who has recently built something, with presumably shoddy standards that builders have recently been employing (I don't see verandahs on any of the new houses going up along the road to work. Combined with the complete lack of trees in their uselessly cleared land, it's going to be hot in those houses in summer). So I shall keep researching. And every extra year it takes me to buy a house helps my deposit along by another 1/5th of the current prices of properties+house around here - if the housing crash is really coming, then the longer the wait, the better off I'll be (since rent is bugger all, here). Bring on the housing crash (I've ranted on the subject of people who think anything but rapidly inflating housing prices is dqqm, before[1])

So I thusly perform a narrow escape from entering the cycle of mindless consumerism, for now! Only, I offset it by ordering one of these. I couldn't quite justify it, but hell. I figured it had more carrying capacity than any motorbike I plan on getting later this year. 8 speed Sturmey-Archer hub, dynamo, and the carrying capacity of 4 cases of beer, or 2 toddlers and a significant other. Me thinks me will be making more use of the former rather than the latter capability for a little while yet, although I expect the bike to last a good couple of decades, which might be long enough to rope in some willing, if foolish, prospective SO. I look forward to turning heads of country folk who only ever think of the car as a mechanism of moving themselves within the kilometer radius of their home.

[1] Somewhere. Can't find it. Anyway, it basically goes that you lock in the price when you buy your first home. There's no easy way of getting out of that. If you bought when the market was too high (then you're an idiot), and it goes down (it's going to go down fairly equally everywhere in Australia), then you'll lose money when you sell. But unless you plan on living in a cardboard box, you'll be buying a cheaper house, that will on average be about the same cost as the one you just sold. Thus you have neither made nor lost any money on what you paid for your first house (unless you plan on downsizing). If the market goes up when you sell, goody, you make money. Unless you then want to move into another house and not the gutter. Bugger. You just lost your money you just "made". The only people to gain by rising housing costs are the banks (through interest payments and proportional fees), the government (through proportional taxes), and local council (through proportional rates). And those bloody investment types, who I have no sympathy for when the market crashes, because they're the idiots who caused this mess by forcing the market so artificially high in the first place. On the other hand, housing booms really hurt anyone who is buying their first house. And crashes help them when the market is brought back to the same level as long term inflation (ie, a long way to go from where it is now). The types who complain that their housing value is being diminished are just selfish gits -- the definition of stupidity: someone who wants to harm someone else whilst not helping themselves.
link5 comments|post comment

Brendan07 [Mar. 7th, 2008|07:03 pm]
[Tags|, ]







Brendan07%.

Funniest. Election fallout. EVAR. I want the T-shirt: blue "Brendan", over a red "07%".

Oddest thing is, that being a public servant myself, I was under the impression that we were not allowed to work on a second job during paid leave.

And in a moment of dissapointment, I read yesterday's local paper and realised I had been sitting at the table opposite our local member for redneckedness, Mark Coulton, at the cafe last Friday (and I was on night shift when he came to visit work during the day a few weeks ago - I think my boss's boss must have been trying very hard through gritted teeth not to throw him over the catwalk during the compulsory photo pose up at site). I didn't get to query him about his article in the previous week's paper, where he said the Liberal party had no choice but to endorse the apology, don't blame him.
linkpost comment

mail servers using NIS to resolve usernames [Mar. 5th, 2008|03:06 pm]
[Tags|]

I want people's opinions: Is it ever sane to let a mail server use NIS to resolve usernames?

It's only ever caused problems on machines I have access to. I would dearly love to change it here at work, but for what I believe are political raisins, I cannot.

The symptoms of any failure are bound to be users losing mail to the dreaded "User unknown in local recipient table", and I believe it is much more sane to automatically push the changes using rsync to the mail server, with manual pushes if it is really urgent that a new user be able to receive their mail (hell, you already have to run make on some yp configurations anyway, so why not just make an extra Makefile that pushes the changes for you?).

Back at the university, it took them half a day to track down why NFS had gone nutzo bazoo today. A job on the supercomputer effectively DOSed the nfs home directory server, which then propogated onto YP, which then propogated onto the mailserver via the above malconfiguration. I'd be pissed off had I not come to the conclusion about their general competance several years ago when univerity ITS took over from in-house management of the infrastructure. It is never polite to drop people's mail, given how inneffective bounce messages have become since the spam epidemic.

I wouldn't mind ammunition for getting it changed here too, but sometimes I feel I am fighting a losing battle.
link5 comments|post comment

beeper speaker on SigmaTel STAC9205 soundcard on Dell Inspiron 1520 [Feb. 24th, 2008|02:59 am]
[Tags|, , ]
[mood | annoyed]

If anyone here has a Dell Inspiron 1520, or indeed anything with the SigmaTel STAC9205 (or similar) cards using the snd-hda-intel driver[1], and wants the beeper speaker to operate, there may yet be a way to make it work, but I've run out of ideas.

The author of the driver hates the beeper speaker, and so hasn't gone to any efforts to enable it. Of course, it is trivial to disable a working beeper speaker (blacklist the pcspkr module), but not so trivial to make a non-working beeper speaker work. I can't simply make all my programs play .wavs instead of beeping the speaker, because I like the speaker to work over ssh connections. That, and I don't want my machines to sound like a cruddy cutesy wutesy windows machine. I like my beeps to sound like real men's/women's beeps. Plus, my $PROMPT_COMMAND uses xset to set the pitch and duration according to the success or failure of the last command, then runs beep (low pitched for failure, and high pitched for success, the latter only if the command took longer than 10 seconds to run, to not annoy my neighbours).

From the output of alsa-info.sh, we get the internal layout of the sound card here. Looks like the beep generator is on node 0x23. Looking at commit 78a4eef1e3f20e534c769905df3c92dacf360f76 here, we find Takashi has made the beeper work for the Thinkpad X61/T61. OK, so the changes were to /usr/src/linux-source-2.6.24/sound/pci/hda/patch_analog.c. Applying the advice here, I had a stab at getting node 0x23 enabled. I imagine it involves changes to patch_sigmatel.c:stac9205_mixer and possibly stac9205_pin_nids and stac9205_core_init.

Going around and around in circles has not yet given me the inspiration needed to get my inspiron to enable this node 0x23 though. The debian bug report is here, and the alsa bug here.

Anyone have the desire to get this working, but more importantly, the ability?


[1] Obtain the model of your card by this:
head -n 1 /proc/asound/card*/codec*
linkpost comment

navigation
[ viewing | most recent entries ]
[ go | earlier ]