10th October 2006

Explosive news from Korea

North Korea has done an underground atomic bomb test. Of course, everybody else is condamning Pyongyang for this deliberate act of provocation, etc. Or is it so ?

At least, the neighbours are not happy : South Korea, Russia, Japan, and even China, traditional friend of the Stalinian regime. But also the USA and the UK. USA, as usual answer something like : “war !!!” which is diplomatically and publicly translated as : “This is provocation, let’s have UN vote sanctions, including military response”.

And as usual, France isn’t doing quite like the others. Instead, minister of defense Michelle Alliot-Marie declares : “According to our military atomic agency, this explosion was caused by a bomb of about half a kilo-ton (which is small, compared to standard atomic bombs, ndlr), and it is quite probable that their test failed.” I was watching BBC World, when they talked about the subject. The journalist asked a very good question then : “But don’t the other nuclear powers have this kind of agency, and information ? Why didn’t they say anything similar ?”. The reporter wasn’t really able to answer. Just something like : “Well, sure they have, they probably are studying the data. But French sources seem to be quite reliable, those scientifics are experts, blahblahblah”. Yeah right. As if other countries specialists weren’t able to come this fast to the same conclusions.
Here is my opinion on this matter. For various reasons, a good bunch of countries have some interest in having Pyongyang regime wiped out. Say they have the same info as the French (let’s be honnest). Why would they publish it ? This is just like minimising the event. And what they want is public support, therefore, it is not in their interest to make such kind of statement ! In the same move, consider the following : South Korean sismic office registered a 3.58 strong shock, on the Reichter scale. Curiously, USA’s is talking about 4.2. France don’t care it seems. After all, North Korea is far, and French have no economical or political reason to put them down. This is quite different for the others, like South Korea and Japan, who are quite likely to be targeted if the North go crazy.

I’ll finish with just one more opinion, that I expressed already on the Iranian case. So they want the atomic bomb. And then what ? Let them have it ! Let’s not be stupid and forget about our own propaganda. This won’t make them more dangerous for the world. Why not ? because every leader having this kind of “toy” knows that the day he presses the red button, he also destroys his own country (because of immediate response from other countries). There is no interest in doing that. Instead, what does it change ? More respect from diplomatic point of view ? Possible. Less Interference from other countries inside ? Certainly.

Let me make it clear : for an asshole to press on the button, he has to be crazy and desperate, pushed to the limits. For example, if the US start invading North Korea, or similar. If the targeted country has it, it might just dissuade some people from attacking it. And THAT brings peace. Oh, and by the way don’t forget, the only people who were/are crazy enough to use such kind of bomb, are the very same ones talking about morale and trying to prevent the others of having it. Guess who ?

posted in coup de gueule, in English please ! | Comments Off on Explosive news from Korea

8th October 2006

Faux News

Heard about the latest sex scandal in the US involving Mark Foley and minors ? well, the thing is that this guy is a republican congressman. And the republican party likes to put family and morale as a motto. Of course, this didn’t fit, so what can they do ? “Hey man, there are those medias that we own, what if we modified some info ?” Here it is. Take also some time to read the comments. Some are excellent. Like this one :
That’s no accident. The person responsible for graphics featured onscreen had to physically go into the Foley file and change a pre-existing graphic that had been relied on for years. They don’t just generate those graphics on the fly when they already have preset titles for every politician on file. This change was done in advance of the show under the orders of someone at Fox, and a graphics person made the change.
Of course, it happens during election campaign period. Of course they say that it’s because he’s gay (hey, what’s the connection with being pedophile ?). Of course they say he was molested by a priest when he was young. No comment.

posted in coup de gueule, in English please ! | Comments Off on Faux News

8th October 2006

Update 1.0b

Funnily enough, everything was working well for me. But as soon as I tried to be in the shoes of a user, things were not going well. It was virtually impossible to get it working properly for various reasons. Now I found a solution. It’s a bit dirty, but it works. I hope I’ll find a better one.
– passing informations for user to database.

After all those changes, my own “user table” is quite messy, so it’s probable that I reset my own counter soon.

And for those who wait for me to post something a bit more interesting than programming stories, please wait a bit longer. Just a little bit longer. Thanks for your patience !

posted in in English please !, Khrys WebCounter, programmation | Comments Off on Update 1.0b

5th October 2006

Update 1.0

Yeah !

It is finally 1.0 ! So what’s new ? well, because loading this page with the counter appeared so slow to me, both from my office and my home, I was thinking : “bloody free.fr, they are damn slow with sql requests !”.

So I thought, perhaps I should optimize the amount of requests. It was pretty bad : I needed 3+n’ requests, with n’~=n/2 and n being the amount of rows in that table. The 3 first one are necessary, to check the user’s password, insert a hit, and collect data from the table for stats display. The n’ requests are for all of those hits where the hostname was not of this format : “.xx”, or where there wasn’t any hostname but an IP address. I would then consult the ip2country table, for each of them. I rewrote that part, to store all those IP addresses in a table, and at the end, make only one requests. Sounds easy, it wasn’t that much. But it made me improve the readability of my code in the same time.
– optimized amount of requests;
– improved readability;

Then, I tried it again. Damn, it is still very slow ! what the heck ??? Let’s put a few timers around the different parts of the code, to check how much time my requests are taking.
– created log.txt for time control;

OOPS, big surprise Einstein : it is not the requests (<1s), but the processing that takes long : 20s ! Let’s look closely at the code. When checking in my home-made array of country codes, it has to go through it till it finds the good one. Too slow, lets make it quicker. I can just call the result of $country[“.xx”] and if the result isn’t a country, then it’s not in the list, meaning, the end of the hostname isn’t a 2 letter code (ie : “.com”), or I only have an IP, or it is a 2 letter code but I don’t know this one.
– improved the call to the “.xx” country code array;

What about now ? Damn, still 20 seconds. Well, at least, the code looks nicer now. Checking the code carefully to guess what makes it that slow, I came upon that line :
$no_ip=gethostbyname($row[‘hitHost’]);
That’s it of courrrrse ! (with a French accent)
So what was it ? the story is that I was storing only the hostname, thinking it would be indeed redundant to store also the IP address. But then, since I needed it, I converted the hostname into an IP address with that line, whenever the country code array wouldn’t help. Probably one out of two cases, probably more. Good idea at the time, if only doing it wasn’t painfully slowing down everything … I decided then I would also store the IP addresses, changing the table structure, the hit insertion script, and the processing of data. I also had to write a small script to fill all the previous inserted hits with the correct IP addresses.
– optimized the process of information;

Now, what does the log say ? 2s altogether (previously >20s), muuuuuuch better ! and those 2 seconds are only coming from the request to the ip2country table. I can’t do much about that, and sometimes it takes no time at all, depending probably on the charge upon the server. Well, that’s what I call progress !

And what about the user pages ? sorry guys, I didn’t have time to touch them much. Neither did I touch the “programmation” page with the doc and the zip file so far since version 0.7. But I made available the user pages though, so that you can try it if you like. The same link can be found on the left hand side of this page, just under Home, you’ll find Khrys WebCounter. If you feel lost with it, if you need any help, or simply want to give your opinion/advice, please leave a comment on this post.

posted in in English please !, Khrys WebCounter, programmation | Comments Off on Update 1.0

28th September 2006

Update 0.8

I know, I know, I don’t post anything interesting lately, but about this counter. Let’s cross fingers that it will soon pass.
I did some progress, quite a lot, and learnt even more ! of course it doesn’t show so much, but the following are ready now (though I don’t publish yet) :
– register page,
– registration validation page,
– confirm page (from email),
– log in page,
– log out page (!),
– display and change settings for the display of the counter.

Of course I didn’t spend much time on the artistic side of those pages yet. And to change settings users would need to know some CSS. But you can change many things, and there is a viewer to help you, as well as a color picker. Users can also decide how many countries to show.
Basically, I could publish it now. But I prefer to give a decent interface, and spend another week on it. I’d like to offer a statistic page with more info than just countries.

I won’t have time to work on it this weekend, but be patient, now I feel much closer to the end !

posted in in English please !, Khrys WebCounter, programmation | Comments Off on Update 0.8

  • Search

  • Archives

  • Map plugin activated