Archive for November, 2007

Kookaburra. Live symbol of Australia.

This entry is also available in: Русский

Australia is a unique place. They call Australia as “green continent”, but the biggest part of it is a desert which can have any color but green. Australian landscape has been made up by powerful water streams flowing through it for many thousands years, but now it is the droughts country in the world. Many of Australian native animals managed not only not to extinct as civilization came, but multiplied their population so last year Australian government were going to shoot several thousand of kangaroos grazing around Canberra as they were creating certain problems to some military base or something like that. Of course, not all native animals were that lucky but many of them still do not seem like presence of civilization cause any inconvenience to them.

I have already got sick of silly questions about bears stealing vodka from school students on the streets of Moscow. Indeed, it is a big luck (well, it could be rather bad luck) to meet a bear in wild in Russia. But if you want to see one of the Australian symbols in wild, there is no need to go to the Zoo. It is better to visit one of many parks, preferable one with BBQs in it.

Kookaburra

I took this picture of the monster with fossil camera Canon A510 from the distance of one meter. It was sitting just above the BBQ on the branch

More about monsters

If Gmail had been designed by Microsoft

This entry is also available in: Русский

What a great thing! See here.

lj-crosspost.php plugin sometimes creates duplicate entries in LiveJournal

No translations available for this entry

As many others, before starting my own blog website, I had an account on livejournal.com. And, of course, I really value LiveJournal community and did not want to lose my hard-earned LiveJournal friends. At the end, it wouldn’t be fare if I just said “thank you everyone and goodbye” and closed (or stopped updating) the journal when I could just setup a piece of software that doubles posts I made here to my JiveJournal blog.

What I actually did. I have got livejournal-crossposter plugin, version 2.0, which was the most recent stable version by that moment, installed it and was surprised as it started working immediately without any funny effects despite it was not tested to work with WordPress 2.3.1.

So far so good but when I was searching for more feedback on this plug-in, I spotted a couple of comments where people complained that sometimes it spawns a duplicate posts in LiveJournal blog, but I did not pay attention to it then… until I started to have the same problem here. Yes, under some circumstances this great plug-in could really multiply entries in your LJ account.

The good thing is that it does not do it uncontrollably - it did not create thousands clones of your posts while you’re sleeping, thankfully it does it far less often. Actually, the only occasion I noticed entries in my LJ spawn was when I was editing the post which already was published and had an entry in LJ blog. So, if you want to check whether your configuration is affected, do the following:

  • Create and publish the post in WordPress. Make sure it gets crossposted to LJ
  • Edit that post. Change one of LiveJournal settings, say, disable comments (or enable, if it was previously disabled)
  • Save the post.
  • Go to you LJ blog and, if you don’t see two copies of that post there, stop reading.

Right, If you continue reading this article, you have got duplicate post. Now I ought to say that I already submitted a bug report and offered a workaround so I hope a new version of plug-in is coming soon, but until then some may be interested in fixing it right now. It is not that hard as it seems

Open lj_crosspost.php file in your favorite text editor. Find function ljxp_save() (it has to start at line 871) and insert the following right after function block start (line 872):
get_post_meta($post_id,’ljID’,true);
Now save the file and upload it to your plug-in directory.

After that it should work well.
I don’t think it is plug-in’s issue, it rather seems that this bug has something to do with how WordPress 2.3.1 caches post metadata so this bug may not appear at all on older (or upcoming) WordPress versions. My fix just forces WordPress to load and cache all metadata before plug-in access it.

Ship at anchorage near Narrabeen rock pool

This entry is also available in: Русский

Sometimes in the evening we go for a dip to Narrabeen rock pools. Just like today, but today we saw it. There is nothing unusual for ship to stay at anchor somewhere nearby except this one was too close to the beach and I even thought its crew was seeking Pasha Bulker’s fame. Hopefully, it was close, but not that much.
Unfortunately, I did not have DSLR camera with me.. actualy, I don’t have DSLR at all, but this time the only I had was mobile cameraphone Nokia N95. That’s what I got:

Ship at Narrabeen

Surprisingly, this mobile phone takes quite good photos. For mobile phone, of course. In any case, its wide-angle lens does it worst and ship on the photo looks smaller than it seemed then.

Some more photos…

About design patterns

This entry is also available in: Русский

Well.. it seems to me that they will soon ask about anti-patterns than proper patterns at job interviews. At least there are some books available.  Can’t even imagine what comes after that.. :)

MySQL Has gone away…

This entry is also available in: Русский

Thanks God, not passed away..

Yes, this error happened to me too. It seems there are plenty of hosters who just don’t bother configuring and tuning mySQL and this is definitely not quite a WordPress issue (at least I can’t believe it runs heavy queries when adding a new post), but there is a workaround

Best programmer’s font

This entry is also available in: Русский

It looks like I am not the only one who ever tried to find another good font to replace default and ugly “Courier” in Visual Studio. I found a discussion here with some examples… Monaco looks nice, actually, but link to is was broken. Found it here, tried to install.. surprisingly, the font appearance reminds me one of those old DOS IDEs from Borland.

Web Design

This entry is also available in: Русский

I am not a designer at all, but really value good looking sites.

Will try to apply this style.

Life as it is

This entry is also available in: Русский

This Dilbert comics is right about what I have been doing at work for several weeks

bash.org again

This entry is also available in: Русский

While looking for any ideas about what I already asked on RSDN, found this:

A>Users can upload their own photos in their profiles
A>An algorithm that rejects meaningless or inappropriate pictures is needed

McSeem2>At first, you need to learn how to tell pornography from Fidel Castro eating a banana.

BTW, still have no success. Found  heaps of theoretical works and books but none of them explain how to apply that theory to a stream of strings.