PNG file sizes

I didn’t realise that PNG file sizes could vary so much. I was taking a screenshot using Windows, and initially, saving it in Paint, and then using Microsoft Office Image Manager to convert it to a PNG. Then I discovered the machine I was on had Fireworks, so I pasted directly into that, and saved as a PNG. The Fireworks PNG was around 3-5 times as large as the other one. I would have pegged it as being the other way around. I actually came across a program I had downloaded the other day that is a one-trick pony - it compresses PNG images. This made a similar difference in sizes.

Changing Interests

It’s amazing how much and how quickly one can change their attitude towards things. Take the following comment (by me), posted on the Blogsome Forums on Sun Aug 07, 2005 10:28 am.

I try and avoid JavaScript where possible , and cannot tell you if that is valid code or not. What I would suggest is that that code does not belong in the StyleSheet - put it in the Main page template, and see how that goes.

I have become a full convert to the greatness that is JavaScript. Since that point in time I’ve developed quite a library of functions that control various features on this blog, from disallowing Spam comments, to making checkboxes appear as lovely images instead of the ugly normal checkbox. Perhaps my favourite component is my floating window. I’ve mentioned it briefly, but it basically allows for <div> tags to float over the top of other items on the page. They can also remain fixed while the page scrolls, yet be moved to another position, and stay on that point, relative to the window. (This is broken under IE, and others that do not support position="fixed"). I think the irony is that I was very opposed to JavaScript, but had to use it as there was no other way to really control stuff under Blogsome. But, as chance would have it, I discovered just how powerful a language it really is, and now most of my coding is done in JavaScript, with the remainer being PHP Smarty Tags. I can’t remember the last time I wrote a python script. In all honesty, I’d love to be able to supplant all of my JavaScript with python, but I don’t think that will happen. Browsers will always support JavaScript, and XMLHttpRequest() really is pretty cool, but I don’t think they’ll start inlcuding python any time soon.

Scholaris FrameworkID Error

When I try to Assess student work using Scholaris, I come across the following error:

Class: Assessment Function: GetAssessmentVerbages(ByVal FrameworkID As String, ByVal SchoolID As String) As DataTable

* * *

Current function cannot be executed due to the following reason: *FrameworkID is empty Please take a screen shot of this error message and send it to support@solutionsit.com.au

* * *

It then doesn’t display the student work that was submitted, and I can’t mark it, or return it to the student. I get several other functions giving the same error, two on the way in, and three on the way out. Very annoying, as it means I can’t complete the full cycle of assessment using this tool, which means I’ve hit the limits of it’s usefulness for now.

Changing a Feed Location

I’m pretty happy with the way I’m creating pseudo-Podcasts of ABC programs that are available in RealMedia only: I use a program called realdump, which calls mplayer, to dump the audio to a .WAV file, which I convert to AAC using faac. I then get the data from the web page, and create an entry in an XML file. This in itself isn’t that tricky, but the clever part, at least in theory, is that I chose the URL I think the ABC might use when they finally Podcast that programme, and have a hostname entry for www.abc.net.au, which I use when I’m not online. However, every program I have done this for has chosen a different URL than the one I chose. For instance, The Philosopher’s Zone has chosen: http://www.abc.net.au/rn/podcast/feeds/pze.xml instead of: http://www.abc.net.au/rn/podcast/feeds/pzone.xml which is closer to the RealMedia file names, or: http://www.abc.net.au/rn/podcast/feeds/philosopher.xml which more accurately reflects their URL naming scheme. Apparently it’s possible to redirect a feed, so that iTunes then looks in a new location, using something like 301 redirects. The problem is I can’t get apache to do this, for some reason. I’ve tried using .htaccess files, but they don’t seem to do anything. I think Apple should make it so that a permanent redirect can be placed in the XML file, and iTunes respects this for future checks.

Daylight Savings Wrong

My computer decided that Daylight Savings was supposed to end last night (or rather, this morning), when in actuality it doesn’t end until next Sunday morning. I’m not sure if this is because of the Commonwealth Games, or whether it was just programmed in wrong. Apparently this affects Windows, too.

PostSecret Archives

I’m feeling a bit venomous today, so my comments are somewhat nasty-ish. I’m an athiest, and I’m not afraid to say so. We are lucky you didn’t sign up. You probably couldn’t tell the difference between Iraq and Iran. Perhaps staying in school was a better move…or would have been if you’d paid attention.

Links in this Post

I blogged earlier about creating a sidebar entry with all of the links in the current post. The following code snippet will do this:

    function createPostLinksBox(){
        if (!getCurrentPost()) return "not a single post page";
        content = getByClass("post-content")[0];
        links = content.getElementsByTagName("A");
        if (!links.length) return "no links in post";
        var placeholder;
        if (!(placeholder=getPlaceholder("outlinks"))) return "no location for outlinks";
        var outlinks = document.createElement('h2');
        outlinks.innerHTML = "Links in this Post";
        var ul = document.createElement('ul');
        for (i=0;i<links.length;i++){
            li = document.createElement('li');
            li.appendChild(links[i].cloneNode(true));
            ul.appendChild(li);
        }
        replaceNode(outlinks,placeholder);    
        outlinks.parentNode.insertAfter(ul,outlinks);
    }

Note that this must be run after the DOM tree is finalised, and relies on a couple of other functions. I’ve put <span id="outlinks"></span> into my template, so that this will appear wherever that is, if it’s a single post page with any links in it. It will make it into the next update of my script.

Homeopathy

We ordered a heap of environmentally friendly wood oil, to do the floor with when we finally get around to it, and it came with a Free Magazine! Unfortunately, it contains a whole lot of crap about various things that are total rubbish, not the least being homeopathy. I’m not even going to detail how much crap it is, but just point you instead towards: Homeopathy: The Ultimate Fake. I will put a couple of quotes from the articles about Homeopathy in there, however.

Homeopathic medicines are considered safe and free from serious adverse reactions since they are highly diluted.

So highly diluted, in fact, that to be sure to get even one molecule of the original chemical, you would need to take around 2 billions times the homeopathic medicine’s dose (at 30X).

The cost of consultations will depend on their duration, with inital consultations varying between $60 to $120.

For someone to give you a glass of water. Even if it is bottled water, it still ain’t worth that much. As Barrett mentions in the linked article, Homeopathy is indistinguishable in effects from a placebo, because that is exactly what it is. A very complicated, expensive placebo.

Most major health funds provide cover for homeopathic treatment.

No wonder health insurance is so fucking expensive. I hope my insurer doesn’t! I won’t be reading any other articles in Living Now. Straight to the recycling bin. Or maybe I’ll shred it so my local rubbish molester doesn’t get the wrong ideas about stuff.

Review: Awake! March 22, 1993

I got onto a bus today, and found a rather old (I actually didn’t realise it was this old until I just typed the date in) edition of one of the Jehovah’s Witnesses magazines, Awake! Published in 1993, it probably contains virtually the same stuff as a recently published edition. However, it is interesting to examine it in a little bit of detail. The covers were missing, as were a couple of the outer pages, and the first “story” was A Composite Sign of Many Parts: The World’s End - How Near? Having read (and watched) White Teeth, by Zadie Smith, which deals in some detail with the continued prediction of the end of the world by the JWs, I thought this might be worth reading. It starts out with the old parable about the six blind men who “saw” an elephant, and depending on which part of it’s body they touched, came away with a different idea about what an Elephant is like. Thus, only seeing part of the picture often paints a false image of the whole. I’m not sure if it was an acceptance that each other time they have predicted the end of the world they were wrong, but it sounds an awful lot like it. It then goes on to discuss how immediately after the Great War, there has been a worsening of the various signs that the bible says predict the second coming of Jesus Christ, and on first reading (thinking that this was a recent edition) it sounded about right. So, “We got it wrong last time, but this time the end of the world really is nigh!” seems to be the gist of the piece. This becomes even more ironic when you consider that this was published almost exactly 13 years ago. Students I teach were not even born then, and clearly the JWs were believing (hoping?) that the world would end at the Millenium. Bad luck for that, hey? What amuses me is that there is a significant amount of scientific reference in the magazine. There is a (as far as I can tell) accurate single page article about Shooting Stars, which they correctly refer to as meteors, although no mention as to the difference between them and meteorites. There is also a nice story about music, with a definite undertone of the evils of popular music - but to their credit they aren’t saying that our parent’s music was alright. Only our distant forefathers. However, finishing this article is a blatant advertisement for Kingdom Melodies, put out by the Watch Tower Society. So even JWs aren’t afraid of advertising. Another article: Drawing Close to God Helped Me Cope begins with the line:

I had no interest in religion. All organized religion seemed hypocritical to me. I couldn’t see that it did much for other people, except make them intolerant of other people.

Now, this just seems to be a formula start, like the beginning of Penthouse letters:

I never thought I’d be writing a letter to Penthouse Forum. I always thought those stories were made up, either by the editors, or by people writing in. That was, until one day…

Don’t even ask how I can quote the start of a letter from a pornography magazine by heart… Anyway, that was all I read of that one. Even for the sake of a review, I knew I’d rather give up than have my mind explode (like a hand grenade) because of too many cliches. Flicking through, the next thing that caught my attention was on page 25 (for those playing along at home, or in church) Where Man and Turtle Meet, by Awake! correspondent in Australia. It’s a reasonable guide to the nocturnal habits of Queensland turtles, and doesn’t even mention God at all. The article would not be out of place in a nature magazine, or any other type of magazine, with a single change of word in the last sentence:

As more people become aware of these hazards and learn to take greater care of the environment, increased opportunities will undoubtedly come for man and turtle to meet - impressing and enthralling humankind with yet one more marvel of creation’s amazing reproductive cycle.

Can you pick where I might have used the work nature instead? The final page in my little magazine is entitled Watching the World, and it appears to be some sort of a news update. These 5 short articles are all dripping with mis-guided, or outright wrong conclusions. They are so much fun, I’ll deal with almost all of them:

  • Infectious Disease Comeback. This one is just gold. It correctly provides evidence that indeed infectious diseases are on the comeback, but doesn’t provide all of the right reasons. No mention of the fact that many of these diseases are only new to Western society, and that they have existed in sub-saharan Africa for a lot longer. And then the kicker:

Although many drugs and antibiotics have been developed over the past three decades, microbes have developed resistance to them in various ways.

This sounds like they are accepting evolution, without really saying so! The example that is given is that bacteria can exchange genetic material, which is true. It is also interesting that they chose this one, as back in 1993, this was still a controversial topic amongst scientists. It goes against much of the perceived knowledge on the way DNA works, and I’m sure anti-evolutionists would have use this even then as an argument “against evolution.” What they are missing however, is that this still is evolution, it’s just not natural selection through random mutation, although that is indeed where the original resistance to the antibiotics must have come from. Unless God gave the chosen few “microbes” resistance, and they then just shared it around. * Pastoral Symphonies. Cows who had music played to them before being fed would then come back in from the paddock when said music was played, even months later. Okay, hands up who went to University, or even High School. Keep your hand up if you studied Psychology in any form. So you’ll remember Pavlov’s dogs, and Classical Conditioning then. Good, so I don’t need to say any more. If not, consult the Wikipedia, link previously given. * Well-Kept Medical Secret. Apparently around 5-8% of Danish children aren’t sired by who they think they are. I love the final sentence:

The men are not told of the discovery, however, lest the family be disrupted.

Nice to know. Harmony over truth, right? * “Tragedy Within the Tragedy.” I’m not going to joke about this one, mainly because it’s probably still much the same. Emergency aid to disaster areas, and general aid to third world countries is often misguided: out of date medicine, incorrect types of shelter and that many supplies never even make it to the people who desperately need it the most. I’m not sure if this article is implying that such charity is a waste of time and money, but that’s how I’ll take it. I think things like this still happen, but will take this opportunity to harp on my favourite comment from the Asian Tsunami: the amount of money donated by governments and private individuals was amazing, but caused many other charities to miss out. That is, the total amount of money given in aid for the full year still stayed about the same. The lower profile causes just got a whole lot less.

I’ve read the Watch Tower, and Awake! before, and came to the same conclusions. Call me biased, but these magazines provide a generally adequate description of things, and then go and draw the completely wrong conclusion. Anyone with any understanding of logical processes should be able to see the faults in their reasoning. I’ll continue to chase the JWs away when they come to my house. Or rather, as I did last time, totally ignore them. I was mulching some branches, and had my ear muffs on, and pretended not to realise they had walked right up behind me. The stood there for about a minute (I could see their shadows), before walking off. Worked a treat.

Links in this Post:

I just thought of a great addition to a sidebar: links in this post. Thus, a user would see a list of all off-site (or even on-site) links, and be able to follow one or all of these without having to go through all of the post. Probably going to be more useful on posts that are really long. Easy to do in JavaScript, but could be done in Smarty too.