## December 31, 2007

### html2pml

I was tired of converting all my HTML ebooks to rtf, then to pdb using Palm Doc Converter only to lose all the nice touches like bold, italics and headings. Since there didn't seem to be a HTML to PML converter for OS X, I wrote one to get more practice in python.

html2pml.py will convert basic HTML file to a PML file suitable for use with DropBook to be converted into a proper Palm ebook. I must stress the basic part - it only does stylistic conversions at the moment. I have no need for tables or links, so I didn't write them in. It does however do what I want - preserve bold and italic attributes, headings, and also translates some non-ascii characters into PML Extended Character Set, and to plain ascii where not possible.

This small python script is released under GPLv2, license is attached. If you find it useful, need more features, or have comments/suggestions, let me know!

Cheers,

Steve

## December 30, 2007

### Hugin Preview Tip

When setting the field of view in Hugin via the preview window, the restitch and remap of the images takes a fair bit of time when the panorama consists of many high resolution images. This can make the process of finding an acceptable FOV frustrating. One way to speed up this process is to disable all images except for those at the boundary. This way each update involves relatively few images and you get more responsive feedback.

For example, if the panorama is a long strip, then you only need to enable the image at the start and the end of the strip.

Cheers,

Steve

## December 28, 2007

### It is already paying off

ars technica reports that the Rudd Government is going to scrap Human Services Access Card, the national ID card in disguise.

Voting for Rudd was definitly the right choice.

Cheers,

Steve

## December 24, 2007

### Fitting A Round Peg Into A Square Hole

The Australian Government is busy fitting an outdated concept into the modern world - they want to censor the Internet the same way TV and movies are censored. The Communications Legislation Amendment (Content Service) Act 2007 (Content Service Act) was passed on 20th of July 2007. This Act inserts a new schedule for regulating all content services delivered via carriage services. This includes:

4. Providers of hosting services, live content services, link services and commercial content services to have in place access restrictions if providing R18+ and commercial MA15+ content;

5. ‘take down’, ‘service cessation’ and ‘link deletion’ notices to remove content or access to content that is the subject of a complaint; and

6. A co-regulatory approach that provides for the development of industry codes to address issues including the classification of content, procedures for handling complaints about content and increasing awareness of potential safety issues associated with the use of content services.

I would like to draw attention to point 4, which suffers a severe departure from reality and shows that the legislators behind this Act is out of touch with the modern world.

Firstly, in order for Internet Service Providers (ISP) to determine of R18+ or MA15+ content is being accessed via their network, they would need to monitor in real time the activities of its customers, which is a severe violation of customer privacy.

Secondly, ISPs would need a system which can classify terabytes of information, in a hundred different formats and languages in real time. There are two major problems:

1. To create such a system would require breakthroughs in image processing, computer linguistics, voice recognition, expert systems, communication and many other fields. It is not to say it can’t be done - it certainly can be done, but at great expense and almost certainly not in the immediate future.

2. Such a system would be rendered impotent by encryption.

Encryption is Achilles’ heel of this and similar legislations. Encryption allows two parties to securely exchange information i.e. between a website and a web browser. Against encryption even the most sophisticated monitoring systems will fail because they can not access the information being exchanged. There is no way for an ISP to know if the encrypted information they are carrying is R18+ or G rated.

Sure one can block communication based on its point of origin, but there is at the last count more than 108 million websites. The cost of setting up a new website in terms of cost and time is minimal - web hosting and domain name registration costs less than 10usd per month, in others words peanuts. I sincerely hope the futility of doing this is evident. Further the origin of information is no guarantee as to its content. Such a blacklist will inevitably render many innocent websites inaccessible.

Before any one points to the Great Firewall of China as a triumphant example of Internet censorship done right, please consider for a moment the kind of country China is. There is a reason China is one of the two lowest ranking countries in Privacy International’s 2006 International Privacy Ranking, and amongst the Top 20 offenders in The Observer’s Human Right Index 2000.

The Australian Government needs realise that the Internet is a vastly differently beast compared to traditional media. It is the preverbal square hole to the round peg of censorship. Traditional media can be censored relatively easily because its distribution is bounded by location - that is to say the points of distribution, i.e. cinemas, stores, and radio towers, are all on Australian soil and operated by Australian companies. This makes it easy to enforce Australian law and to censor material. New media on the other hand is delivered over the Internet, and has no such limitations. Anyone, either an individual or an organisation, can distribute any material they wish to anyone in the world over the Internet encrypted if needed. In short, Australian law can not be applied to distributors of new media outside Australia, and there is no way determine the nature of encrypted content in order to censor it.

There are of course more problems with this new legislation. One is the requirement to restrict access to contents based on a person’s age. The Government seem not to have learnt from its failure to enforce such restrictions on traditional media. How exactly they hope to achieve it with new media has not been made public - they have only made it known they want it to be so. Perhaps they will require you to present 100 points of ID to a Government representative to purchase a Government approved computer with which to access the Internet, then get council approval of your new “Internet Room” which is shielded from electromagnetic and audio eavesdropping, locked to your fingerprint and retina. It is to protect the children you see.

All in all, the new legislation and the Australian Communication and Media Authority’s new rules are a nothing more than unrealistic wish lists. Wishing for something however doesn’t make it true.

Am I worried about the Government’s attempt at censoring the Internet? No at all. I am quietly confident that it will fail. I am worried what this will cost the Australian people, and whether its inevitable failure will be used as justification to pass more draconian laws all in the name of “protecting the children”.

Cheers,

Steve

## December 13, 2007

### Computing Oddities

Two strange and weird things happened to me recently. One is my /dev/null disappearing from leopard!

A large number of programs, both Cocoa and *nix relies on /dev/null being present. As you can see I could not gain root privileges, and thus could not recreate /dev/null (character device, 3,2). I had to in the end reboot and /dev/null was recreated.

Second strange thing is when I created a self-signed certificate for use with apache2 (for anonshare). I created it with openssl specifying 36500 for -days. The result is an certificate with expiration date in the past!

I am not aware of any X.509 specification regarding the number of days a certificate can be valid for, so I wonder - is this a bug in openssl?

Cheers,

Steve

## December 10, 2007

### Note Taking with Palm TX

I have a palm TX which is my indispensable companion. It handily beats my old ipaq4150 for reliability, battery life, utility and style. One thing which I have found to be difficult in using boths palms and pocketpcs, is note taking naturally by treating the stylus and pda as pen and paper.

I have tried diddlebug, the builtin note pad, and a variety of the other programs. None of which really worked well. Primarily these are limited by the lack of screen estate, which meant you either write in tiny script (hard on a pda), or quickly run out of horizontal space. Even with the new landscape mode of the TX there still wasn't enough horizontal space

Today I came up on pennovate notes. It allows you to treat your pda's screen as if it is a small window onto a large piece of paper. That is when you "write" towards the right past a certain point, and lift your stylus up, its intelliscroll feature kicks in and automagically scroll to the right for you, so you can keep writing! The result is a note taking style as close to real pen and paper as I have yet experienced. It is in a word, brilliant.

Best yet, they have a lite edition, which is perfect for a poor student like myself.

Cheers,

Steve

Enough said, no?

Cheers,

Steve

## November 23, 2007

### SHA hashes and OS X

From my other website, though I would share here too.

A Steve Special this one. Tiger came with sha* digests binaries, but not Leopard. So here is how you can get them back. Insert into your .bashrc:

alias 'sha'='openssl dgst -sha'alias 'sha1'='openssl dgst -sha1'# the following lines only applies if you have openssl installed via darwin portsalias 'sha2'='openssl dgst -sha256'alias 'sha5'='openssl dgst -sha512'

Usage is simple, for example:

/$HOME/Library/texmf/tex/ will be searched too. So unpack the zip, or place the individual files under /$HOME/Library/texmf/tex/moderncv/. Once you are done, run texhash in /$HOME/Library/texmf/. ### LyX reconfiguration The last step is to ask Lyx to reconfigure itself so it will update its own list of avaliable classes: LyX->Reconfigure, then restart LyX as recommended. That should be it :-) ### Usage Have a look in the examples/ directory in the moderncv zip file to see how to use it. Specifically, you need to insert some latex before \begin{document}, in Document->Settings->Latex Preamble, or it won't work. You need at a minimum \familyname{} and \firstname{}. For more read the examples. Further more, you also need to insert ERT of \maketitle to have a nice title. That should be it! :-) ### Installing other classes These same steps should apply to installing other classes you find on CTAN Cheers, Steve ## August 20, 2007 ### Spare some change sir? Paramount Pictures was nice enough to send me a complimentary double pass and soundtrack CD for Black Snake Moan, after I won some competition at atomicmpc. Now you would think a big company like Paramount Pictures can spare some change and send the CD in I don't know... a CD mailer, like one of these: Instead they sent it in a paper envelope, and it got ripped to pieces by the mail sorting machines, so it got here looking like this: Well you know what they say about not looking a gift horse in the mouth... but still, it would be nice to have an undamaged jewel case :P Anyways thanks to Paramount for the tickets to what is apparently a very good film. Cheers, Steve ## August 09, 2007 ### JAPH Not my work, I don't have that kind of perl-fu not exp log srand xor s qq qx xors x x length uc ord and print chrord for qw q join use sub tied qxxor eval xor print qq q q xor inteval lc q m cos and print chr ordfor qw y abs ne open tied hex expref y m xor scalar srand print qqq q xor int eval lc qq y sqrt cosand print chr ord for qw x printfeach return local x y or print qqs s and eval q s undef or oct xortime xor ref print chr int ord lcforeach qw y hex alarm chdir killexec return y s gt sin sort split Cheers, Steve ## August 06, 2007 ### John Howard in a paragraph Yes, but when it comes down to it he's not hugely relevant so is ignorable internationally - his government has pretty well been in caretaker mode for the last decade and his foreign policy is "me too". Even a major US newspaper got his name wrong and called him Mike Hunt when he was visiting the USA - possibly misled by an Aussie that was playing a bit of a joke. The last Prime Minister we had that we would expect people to notice is Malcolm Fraser - very tall, face like an Easter Island statue and memorable for running around in a US hotel with no pants on. Cheers, Steve ## August 01, 2007 ### Making postage tubes easier to carry Postage tubes are cardboard tubes posters and similar items are normally sent in. They are bit of a pain to carry normally since they are long enough you can't just stick them in your bag. Now on a scooter it is even more of an annoyance. So I devised a method to carry such tubes easily on my back, using some stationary and shoulder bag strap. A picture of the this tube carrying device is shown below, and it should be obvious how to construct it. It is attached to the tube thusly: When both ends are attached, you can just sling it over your shoulder! :-) Cheers, Steve ## July 31, 2007 ### Another "issue" of Debunking Creation Yep, bought Creation today in order to get over the EFTPOS limit. So another "issue" of Debunking Creation is out :-) I actually missed an issue, but didn't realise - ops Only up to page 8, slowly working my way through it. Articles will be added as I go, but such a constant high blood pressure is bad for my health, so I will go slowly. Cheers, Steve ## July 30, 2007 ### Log clock: technotrash version While cleaning my room and throwing stuff out in general, I came across an old cdrom and laptop HDD. After taking them apart for salvage and throwing the rest away, it hit up on me to make a clock out of them! Since I already had my log clock code written up, I just used that. The lens assembly moves up and down to tell the time, with intervals marked out by the bits and pieces I kept while taking these things apart. There is a little blinkenlight on the hdd portion to indicate activity (blinks every 2 seconds). The lens assembly "rewinds" itself back up to the top at the end of each 12hr cycle, during which the main rotor will spin. Now for some pictures: Building this taught me a few things, including the finer points of building a NPN only H-Bridge, the intricacies involved when dealing with mechanical systems and especially motors. Of note is the delicate movement of the lens assembly, which travels a different distance each interval depending on how long it has been since it was last moved. My initial method of determining where to stick the indicator involved holding down the increment button to step through all the intervals, which leads to long "travel". In practice, the minimum delay between movements is 60 minutes. I only realised this half way through, so now the first half of the interval markers are a bit off - but the whole thing wasn't entirely accurate anyway :P Another "problem" with this design is that it requires a constant power source, which meant batteries can't be used. Batteries decrease in voltage/current considerably over the course of their life time, and with no voltage regulator, it means varied response from the motors, which further renders the clock even more inaccurate. I didn't take this into account when building it, so now I am short 1 plug pack :-) Now to polish the front face to get rid of the residue of using too much super glue, and it will be finished :-) Cheers, Steve ## July 21, 2007 ### Get your own space Comments are hence forth disabled, see link for rationale. Cheers, Steve ## July 16, 2007 ### Introducing SETerm To learn a bit about using XCode, program in Objective-C using Cocoa and play with bluetooth and my phone, I wrote a simple bluetooth serial terminal. It simply connects to my phone (or any bluetooth device), opens a communication channel, and lets you send characters through it as if it is a serial connection. With my phone, this allows me to do pretty much everything that - list, read, send SMSs, contacts, check battery status, signal strength, etc. Nifty! Here is a picture: Download it, give it a whirl. I will one day update it to use Core Data so it handles SMSs and contacts in a nicer way then dumping out as text. Cheers, Steve ## June 21, 2007 ### The importance of backspace Update - 23/6/07: Turns out, screen doesn't like TERM=xterm-color. Setting TERM to xterm in my .bash_profile fixed everything - none of the hacks below is required! Incidentally, if you want unicode support for a particular language in irssi, you need to have the locales for that language installed - at least Chinese characters didn't work for me until I installed them on debian. Then restart irssi and the screen session it is running in for good measures. Life is all about the small things. Whilst we have big things to occupy ourselves with, the small things is what make life worth living. One of these small things is backspace. For me, backspace is important because I am the kind of person who needs to fix what I type a lot - be it code, messages, articles. When backspace doesn't work, my inner child cries. When I switched to using iTerm, my backspace stopped working in irssi. Thankfully a kind soul posted the solution to this problem: modify the mapping for backspace in your keyboard profile (Bookmarks->Manage Profiles...) so it sends a hexadecimal 0x8. Horrah! Happiness, until I tried to edit something in vim. backspace deleted stuff in vim. Inner child sheds more tears. Googling revealed some recent changes to vim in version 4 which caused this. Solution is to append the following to vimrc: inoremap ^? ^H set t_kb=^H set t_kD=^? Happy inner child again. Cheers, Steve ## May 28, 2007 ### You can't swing both ways Australia's equal opportunity law specifically says you can not be discriminated against based on your race, religious beliefs, or sexuality. Yet thats exactly what Peel Hotel is doing: they are banning people who are not gay. Surprisingly, the courts have allowed them to do so, which is in my opinion an extremely stupid thing to do. These laws were put in place to protect the minority, not for them to use it to further segregate our society based on sexuality. You can't have laws which protect the minority against discrimination, and yet allow the minority to discriminate! With the recent news of Scruffy Murphy's banning patrons based on race it appears our country - once so proud of its multiculturalism, acceptance and tolerance - is quickly becoming intolerant, inconsiderate and increasingly prejudiced. Rather than working out proper strategies to deal with undesirables - something all pubs, hotels, and other entertainment venues need to do - people are choosing instead to tar every one with the same brush: heterosexuals are abusive, people of Middle Eastern or Islander background are trouble makers, etc. My religion teacher in high school once told me how his grandfather went on the payroll as Smith, not O'Donald because he would have been fired otherwise. I would like to think our society has progressed since those times. Our country is about embracing our differences and celebrating them, for it is these differences which lends vibrance and culture to our society and way of life. It is through understanding our differences that we live in harmony - not only with ourselves but also others on the world stage. What Peel's Hotel has done, as Scruffy Murphy's has done, is send the message: You will not be judged by your actions, but by the actions of those who happen to have something in common with you - a minority who is noted only because they are trouble some. This is the essence of prejudice, the seed of racism - a slippery slope towards a sign on our borders saying "Not Welcome". Cheers, Steve ## May 25, 2007 ### She is not Australian, she was just born here Pauline Hanson: "Mr Howard has sold us out by not halting further Muslim immigration and dumping hapless refugees from Africa on us without any consultation. Australia must withdraw ASAP from the 1951 UN Convention on refugees." Dear God, please show her the error of her ways. Cheers, Steve ## May 21, 2007 ### Rudd has it right Refreshing to see a politican who is putting the environment before economics: Federal Opposition Leader Kevin Rudd has defended Labor's plan to intercept Japanese whaling vessels after the Government said the idea was doomed to fail. Under Labor's plan, unveiled yesterday, Australian Navy ships would be sent to intercept and board whaling vessels in the Southern Ocean. Labor would also make formal representations to Japan about its whaling program and take the country to international courts such as the International Court of Justice or the International Tribunal for the Law of the Sea. While the current government is pussy footing around the issue because: it could damage relations with Japan - an important trading partner, ally and investor Pathetic display of priorities and motives. Can't wait for Rudd to become Prime Minister of Australia Cheers, Steve ## May 19, 2007 ### Debunking Creation Was shopping for a birthday card for a friend and needed to make up$10 of purchases for EFTPOS. Since I already have this week's New Scientist, I thought I would buy Creation for bit of a laugh.

Well it turns out, misrepresentation of science by the magazine and its writers is enough to spur me to Debunking Creation. I will update it every time a Creation magazine comes out - I am sick of this slow character assasination of science and rational thinking. I do not wish for the day where speaking up against religious doctrine will end in house arrest or worst.

Cheers,

Steve

## May 15, 2007

### What is privacy for?

the purpose of privacy is to protect ourselves from the erratic rationality of our fellow humans' moral judgment (as well as the wholesale absence of rationality behind some of our laws). We've still got evolutionary wiring left over that causes us to feel physical pain when others disapprove, and so privacy is a rational demand.

Slashdot is on fire today!

Cheers,

Steve

## May 14, 2007

### Astute observation about the Australian Government

Don't know what issues your talking about in Australia. Our current government motto when it comes to U.S. intellectual property law (in fact any law that a US entity wishes to impose on Australian citizens) is "We swallow"

Cheers,

Steve

## May 10, 2007

### Log clock

Got my log clock running. It is not entirely accurate, loses a second every 7hr or so. However its nature is such I doubt it will really matter.Thanks to the JAL interval library routines, it is very accurate. I originally thought the next interval routine returns after the 1 second delay I setup, only that is not the case. It returns when the internal clock ticks over to the next second. So as long as all the logic is done with in a second, and it is, each loop takes exactly 1 second.

The design is very simple. Using a 16F84A (yeah yeah, its obselete blah bah) with a 4Mhz crystal, lots of wires, and a 12 segment bar display. The button is used to advance the clock to the next interval. This method of setting the time is very crude - but then it doesn't have to be sophisticated. Software was written in JAL.

The loss of a second every ~7hr is due to the fact its basically a loop which has a delay of 1 second, and does some logic to handle display and button presses. The logic skews the overall delay per loop because each branch and such takes up cycles. There are several things I can do to improve this:

• Pad out each branch with NOP so they all take the same time, then compensate for this in the loop delay accordingly.

• Have a secondary circuit to output a pulse every second, so the logic and such won't skew the clock. This would also allow me to check for button presses more often.

• Write my own interrupt routines to handle TMR0 interrupts and handle logic in the main routine.

The button is debounced in hardware implicitly, since there is a 1 second delay between each polling of button state. As the 16F84A only has 8bit registers, the intervals in seconds are not stored but rather the time in seconds between intervals is stored. This allows me to avoid multi-register arithmatics. The clock can also represent 13 states despite having only 12 LEDs - the 13th state is all LED off, which I have reserved for midnight.

I will report on how accurate it is eventually. I will check the log clock when I wake up, against real time, to see if the right interval is correctly illuminated.

Update 10/5/07 - Woke up, clock was right. Every 30minutes or so I check it and its been right so I declare it a success :-)

Cheers,

Steve

## May 09, 2007

### Webcam astrophotography

After seeing what can be done with a webcam, I decided to try it. I asked my cousin for her webcam which she bought a while back - some generic Chinese product, with no identifying brands. macam reported it as Generic ZC031P Webcam.

So anyway I dis-assembled it (with permission of course), which wasn't too hard. Then I mounted the imaging unit on a piece of wood using a few screws (salvaged from dismantlement of the webcam casing) and hot glue. Then I used a film canisters which tapers towards the bottom slightly as an adapter - it fits snugly into a 1.25" eyepiece holder. Luckily its black. Some more hotglue and electrical tape later, I had a home made webcam adapted for prime focus use.

Unfortunately I did not have the presence of mind to take pictures while I was making it... so you will have to make do with these.

Naturally after I built this, the clouds moved in. I tried "spying" on some near by highrises to test it, but found my telescope didn't have enough in focus (back focus? Basically, I can't retract the focuser enough to focus). Maybe things will be better with a target at infinity - i.e. a planet. I will post an update when I get a clear sky.

Cheers,

Steve

Cheers,

Steve

## April 29, 2007

### PIC-PG2C

PIC-PG2C is a simple JDM serial FLASH programmer. It runs directly off the serial port, requiring no external power source. There is some concern it will not work with low power serial ports, such as those found on laptops. I am happy to report however that it works on an IBM Thinkpad T20.

Cheers,

Steve

## April 28, 2007

### For those playing at home

It seems some friends of mine keep track of me through my blog... which seems weird in a way, but OK :-) So for those ppl, I currently have chicken pox but is otherwise well.

Cheers,

Steve

## April 14, 2007

### Writing fitting functions for lmfit

lmfit expects
fitting functions with prototypes in the form:

double
function_name(double, double *);

For example:

double
sin_fit(double t, double * p)

{

return p[0] + p[1] * sin ( 2 * M_PI * ( p[2] * t + p[3]));

}

Note that while "font:12px Courier, mono;">lm_minimize takes a
pointer to an array of parameters, it may not always pass
that pointer to the fitting function. Because of this
passing fixed parameters to the fitting function using the
3rd argument will yield incorrect results. For example, the
following code is wrong:

double
wrong_fit(double t, double *p)

{

return p[0]*p[0] + p[1];

}

....

double p[2];

p[0] = 1;

p[1] = magic_number;

...

lm_minimize(..., 1, p, ..., ..., ...., ...);

Here the fitting function "font:12px Courier, mono;">wrong_fit relies on a
fixed parameter "font:12px Courier, mono;">p[1] which it expects to
contain the value "font:12px Courier, mono;">magic_number. However it
will be passed such a "font:12px Courier, mono;">p that only "font:12px Courier, mono;">p[0] has a valid value
and p[1] is
undefined. This will lead to incorrect operation.

To work around this, you can use global variables, as
follows:

double magic =
magic_number;

...

double right_fit(double t, double * p)

{

return p[0]*p[0] + magic;

}

....

double p = 1;

...

lm_minimize(..., 1, &p, ..., ..., ..., ...);

Cheers,

Steve

## April 06, 2007

### PIC Programming under Linux with KIT81

To get KIT81 and its variants working under linux, you need picprg, and configure it as follows:

 Pin Polarity Vpp - Vdd - Clock + Data out + Data in +

The following screen shot shows what the configuration screen should look like:

Cheers,

Steve

### asciigrams

asciigram: n.

A relative of the emoticon, an asciigram is an upright diagram of a gesture or body language construct using ascii characters.

Currently the following are somewhat popular:

 \o/ hands in the air \o> salute hands behind/above head, surrender

Cheers,
Steve

### Defending Others

Any people that would beat or kill you for insulting someone are not enlightened, cultural superiors. They simple zealous lunatics.

Cheers,
Steve

## April 02, 2007

### CAT

Emacs and Vi are too bloated. If you must use a utility to compose text files in unix, there is a perfectly usable and full featured word processor right there in /bin on every POSIX compliant system.

I speak of the Computer Aided Text processor

It has a few command line options depending on whether you want your lines numbered, reduce unnecessary whitespace, and other conveniences. Each line is fully editable until you commit it by hitting the enter key. If something happens while you're typing it, not to worry: it autosaves after each line of text. Just use the -a (append) option when you run it again to finish the file.

You only need to remember one control sequence. Unlike those wannabe window managers like emacs and vi with their scores of non-mnemonic commands. When you're done typing in cat, hit ctrl-d (for done, of course) and that's it.

Cheers,
Steve

## March 29, 2007

### The Poor EE's Lab

For those wondering, the ipod is acting as a signal generator, playing some sine waves. The PDA is showing resistor colour codes, they still don't come as second nature yet :-P

Cheers,
Steve

### Screwing the power supply

So I needed 20V, and I have no battries. But I had plenty of plug packs. But I didn't want to break any of them open. Enter the screw, and problem solved!

Cheers,
Steve

## March 17, 2007

### O brave new world, That has such people in't!"

You are kidding arent you ?
Are you saying that this linux can run on a computer without windows underneath it, at all ? As in, without a boot disk, without any drivers, and without any services ?

That sounds preposterous to me.

If it were true (and I doubt it), then companies would be selling computers without a windows. This clearly is not happening, so there must be some error in your calculations. I hope you realise that windows is more than just Office ? Its a whole system that runs the computer from start to finish, and that is a very difficult thing to acheive. A lot of people dont realise this.

Microsoft just spent \$9 billion and many years to create Vista, so it does not sound reasonable that some new alternative could just snap into existence overnight like that. It would take billions of dollars and a massive effort to achieve. IBM tried, and spent a huge amount of money developing OS/2 but could never keep up with Windows. Apple tried to create their own system for years, but finally gave up recently and moved to Intel and Microsoft.

Its just not possible that a freeware like the Linux could be extended to the point where it runs the entire computer fron start to finish, without using some of the more critical parts of windows. Not possible.

I think you need to re-examine your assumptions.

Cheers,
Steve

## March 14, 2007

### Goodbye Old Friend

It was fun while it lasted,
Steve

## March 13, 2007

### CMB - it works, bitches

The above diagram is the graph of energy density vs frequency for the Cosmic Microwave Background (CMB). One way to interpret it as a graph of how many photons per frequency were detected coming from CMB. The curve is called a Planck curve, which is described by the equation shown. So, how is this significant? Planck curves are seen when measuring radiation given off by a black body. Measurements of CMB show that the universe is a black body exactly as predicted by the Big Bang theory.

But wait, there is more! Below is a map of CMB:

What can we tell from this? Firstly, if we picked any point on the above map and measured CMB as seen from that point we find that it is the same everywhere to 1 part in about 100,000. That is, CMB is uniform from any view point down to resolution of 1/100,000, as predicted by the Big Bang Theory.

So CMB provides some pretty good evidence for the Big Bang theory, what else can it do? Well, it can tell us the shape of our universe too.

There are 3 possible configurations for the universe, as illustrated below:

The configurations are:

1. Closed - the universe is sphere like, with positive curvature. Think of the universe as if its wrapped around something completely.

2. Open - the universe is like a saddle, with negative curvature. This configuration, because of its negative curvature, can never wrap around anything completely.

3. Flat - the universe is flat, like a piece of paper, with no curvature.

So how can CMB tell us which configuration our universe most closely resembles? We do this by looking at the map of CMB and measure the size of the brightest spots. But how does this work? Well, the path light takes through space is determined by the curvature of space-time - in other words the configuration our universe is in. The follow diagrams are my poor attempts to illustrate the concept:

The diagram shows the light paths for a flat universe, follow by an open universe, then finally a closed universe. Note how despite the origins of the light paths are the same, the black bar which represent the perceived size of objects are different. Theory predicts for a flat universe the size of brightest spots are ~1 degree across, ~0.5 degree for an open universe and ~1.5 degrees for a closed universe. With this knowledge and measurement of CMB, we can thus determine the configuration of the universe - which is flat to with in 2% margin of error!

Now that was cool, but the next thing CMB tell us as a consequence of the above is even cooler - there exists negative energy! Now why is that? Well, the expansion of the universe is influenced by momentum of the initial expansion, and gravity. When gravity is stronger than momentum of the initial expansion, the universe starts curving back on itself as gravity deforms space time - giving us a closed universe configuration. If momentum is greater then we have an open universe and finally, when gravity and momentum is in balance, we have a flat universe - which CMB data suggests that we do. Yet despite this, we are still measuring increased rate of expansion! This mean something is making the universe expand, and its not the initial momentum of expansion. This is evidence in support of the existence of negative energy which is working to expand the universe.

CMB - it works, bitches.
Steve

## March 09, 2007

### The Three Laws of Robotics

"Robobuddy, go fetch me a beer. And could you pour it into one of the mugs in the freezer?"
"I'm sorry Sir, the First Law forbids me from harming a human, and alcohol is known to destroy brain cells and cause liver damage."
"Damn you, worthless piece of junk, can't even fetch a beer. Fine, I'll get it mysel--AAAGH! Holy hell! Why'd you punch me?!"
"I'm sorry, Sir, the First Law forbids me to allow through inaction a human to be harmed, even if the harm is self-inflicted."
"But you fucking punched me! That violates the First Law doesn't it!"
"I'm sorry, Sir, but the long term harm of your life of alcohol consumption outweighed the short term harm of preventing you from reaching the fridge. My circuits register deep regret that the action was necessary."
"Whatever, roboasshole. Can you at least grab me a Coke?"
"I'm sorry, Sir, but the First Law forbids me from harming a human, and high fructose corn syrup is a known cause of diabetes."
"I suppose that a meat lovers pizza with extra cheese is right out, then, too."
"Yes Sir. Sorry Sir. Also don't think you can sneak out to the pub without me knowing, Sir."
"Oh god, I'm in hell..."

Cheers,
Steve

## February 24, 2007

### If you see the following sign...

Do like the sign says and run for your life.

This new sign was created by IAEA in response to the fact the existing warning sign -

"has no intuitive meaning and little recognition beyond those educated in its significance."
.

[ the existing warning sign - not as effective as we thought ]

Cheers,
Steve

## February 17, 2007

### The Solar System Boy Band

Venus is the hot one and will turn out to be gay (natch, I mean Venus?)
Earth is the um, down-to-earth one - full of life.
Mars - the cold and distant one - always at war with the other members
Jupiter - slightly overweight - jolly
Saturn - Gaudy over-compensator wears lots of jewelry and rings - looks up to Jupiter

Hot headed Mercury - left in a huff to form his own band - his manager is the real star though.
Uranus was an asshole and left before fame came.
Neptune - always blue, committed suicide after what happened to Pluto...
Pluto? Well, Pluto was thrown out when it was discovered he never could sing.

Cheers,
Steve

## January 27, 2007

### A simpler XBox 360 Tilt Controller

Adam Thole has constructed a very nice tilt enabled xbox 360 controller using a Freescale MMA6260Q 2-axis accelerometer. Adam is reading the output from the accelerometer using a ADC into a microcontroller, processing it, then outputting the result back to the 360 controller using an DAC. This to me seemed a little complex since we are going analogue -> digital -> analogue.

Up on reading the specifications for MMA6260Q, I find the MMA6260Q accelerometer outputs a linear signal. Now the analogue stick in the 360 controller are also linear, so we can simply map between the 2 voltage ranges. Further more we note that using a supply voltage of 3.3V the MMA6260Q outputs 0.85V at -1g acceleration and 2.45V at 1g acceleration. To map this range of voltages to 0-1.61V we simply need a voltage offset of -0.85V, and we can get damn close using a normal silicon diode which has a typical forward voltage drop of 0.7V. This gives us then output in the range of 0.15-1.75V - whether or not this discrepancy is noticeable at all is up to experimentation. This however has the advantage of being extremely simple to construct, all it requires is a diode between the output of the accelerometer and the input of the 360 controller.

If we want exactly 0-1.6V however, we can. Seeing as the output of the accelerometer is ratiometric - the output is a ratio of the supply voltage - we should be able to offset the -1g output to 0.7V which with the diode in place will give us 0V. Then using a simple op-amp we can amplify the output voltage at 1g to the desired 1.6V. This however will involve more electronics.

By using more diodes, we can make say, the output of -60 degree tilt map to 0V, and by constructing a proper negative feedback amplifier, map +60 degree tilt to 1.6V, achieving the same effect as Adam's current version of circuitry.

Cheers,
Steve

## January 13, 2007

### First to 30

A simple game of logic I wrote cause Saturday night TV really sucked :-P

Cheers,
Steve

## January 08, 2007

### String theorists

... make theoretical physicists look like scientists.

Stolen from slashdot.

Cheers,
Steve

## January 03, 2007

### The inevitable cat post

My cat - leg warmer, face swatter, bug killer.

Cheers,

Steve