This is only for my fellow readers from the german part of switzerland. I’m presenting it without further comments as those knowing about the two newspapers and capable of understanding german will certainly get my point.
![]() |
![]() |
This is only for my fellow readers from the german part of switzerland. I’m presenting it without further comments as those knowing about the two newspapers and capable of understanding german will certainly get my point.
![]() |
![]() |
Yesterday and today, I finally had the opportunity to do some real work on PopScan with Delphi 2005. Here’s what I really like besides the obvious:
Additionally, I don’t have as much speed problems as others seem to have: While starting the IDE takes it’s time, working with Delphi when it’s open goes quite smoothly.
My only problem is opening the form designer. This definitely takes too long, but not long enough for me to switch back to the undocked layout.
Memory usage is of no concern to me. I have 1 GB of RAM and even after a day of using delphi, my Thinkpad remains responsive even though not only delphi, but also eclipse, Zend Studio, Firefox and many other programs are running. For me the figure the task manager tells me is not nearly as important as the responsiveness. If delphi uses 500 MB of RAM, fine – as long as my PC stays responsive.
All in all, I really like this new Delphi and I already have uninstalled D7 (thus breaking FeedDaemon).
Now that the project I’m currently working on for which I didn’t really have much time to complete it and which I insisted in doing cleanly despite the time constraints (beleive me: It’s worth it. Read about that later) is coming along very nicely, I actually had some time to do a little gameing yesterday.
About two weeks ago, I bought Tales of Symphonia for my gamecube, but only yesterday, I played it for the first time (while still waiting for Mario 64 to arrive for my DS I’ve imported and actually got last week). Read about my more-than-plesant experience:
First of all, I actually could buy a legal european version. Relying on grey import was – for once – not necessary despite Tales of Symponia (just “tales” from now on) being quite a hardcode RPG. A really big THANK YOU! for that, Nintendo.
Additionally, while I would have preferred playing it in english, the german translation is really good (completly unlike the miserable translation of Pokémon, for example) and thankfully, the voice actors where not synchronized and the english actors did a very good job on this one.
One thing is stupid though: You cannot turn off the german subtitles and they do not vanish automatically. So it’s necessary for me to hit the A-button in just the right time not to create unnatural sounding cutoff sentences. This was a problem in the first 15 minutes. After that I got quite used to it, maybe also because the german translation really is good (I’d translate most of the sentences like they did).
The next thing I did not like at first was the story: First, you have this “Wake the goddess to save the world by unsealing four seals” which sound kind of silly for a hardcore RPG. And then there are the two other main themes: “Girl on a pilgrimage to save the world” and “Boy brings destruction to his own village because of an accident and gets banished for that. His first station on the journey is a desert”.
Both of those themes should sound familiar to you, the first one being a FFX-ripoff, the second one being from the best RPG of all-time, Xenogears.
Fortunately, this feeling of “seen-that” quickly begins to wear off after about two hours where the party crosses the sea and lifes (hopefully) through the Governour Dorr-sidequest. Now, that’s something new (and great too).
As I’m just about ending said quest, I don’t know anything further to say about the story, but I’ve read great things about it.
I really like the battle-system. It’s a bit like “Star Ocean”, fast-paced and doable none-the-less. In the desert just at the beginning after being abducted by those maybe-desians (the enemy race opressing the humans, strangely equipped with technology well beyond that of the humans), I was hopelessly under-leveled: Those visible enemies on the world map invite you to skip instead of fight them. In the end, I got around, but it was not easy there.
On a side-note: Speaking of advanced technology: Why the heck does Raine seem to know all that stuff? What is it about her? If she has something to hide it’s much better done than Citan in Xenogears where this is clear from the beginning. Besides: I really like her character. She is very likeable.
Another thing I really, really like is the graphics: I love this cell-shading technology – especially if it’s done as well as in tales. It’s like watching an animee – just interactive.
On and talking about “interactive”: In contrast to what I had to rant about in Xenosaga, in tales, the balance between interactive and non-interactive sequences is done very well. It’s never boring and the story is always developping. Very nice.
All in all, tales certainly is the best I’ve seen RPG-wise on the gamecube and it even matches some of the better-known Squaresoft titles. I really hope, the story continues as it is now and does not fall back to re-telling things already told by other games.
If you have a cube and are longing to good RPGs on it, go and buy tales. You will not regret it.
So, now I’m just going to recompile and upload my little Java-Applet and then I’m off home to play another round of tales…
I’ve just discovered my new favourite feature of the upcoming PostgreSQL 8.0: Let’s say, you have forgotten a column when creating the schema of a table. Let’s also say there already exist foreign kays referencing this table, so dropping and recreating it with the updated schema from your text-editor won’t work (or force you to recreate all other tables too).
So, you need alter table
Here’s what Postgres < 8 needs to add a column cdate which must be not null and have a default-value of current_timestamp:
alter table extart_prods add cdate timestamp; update extart_prods set cdate = current_timestamp; alter table extart_prods alter column cdate set not null; alter table extart_prods alter column cdate set default current_timestamp;
And here’s what it takes to do it in PostgreSQL 8:
alter table extart_prods add cdate timestamp not null
default current_timestamp;
When typing this into psql, you’re so much faster. This is actually the only feature I really missed when going from MySQL to PostgreSQL for all bigger work
Oh and did I mention that in Postgres 8 (currently running Beta 4) the statement is executed noticably faster than in Postgres 7.4 (though this doesn’t really matter – you should not be altering production tables anyway)
Have you ever tried sending a file to Internet Explorer, for which an internal displaying plugin is installed? Take a .CSV-File for example (or a PDF for that matter).
If so, then maybe you have noticed that IE in some versions just displays an error-message about not being able to find the file just downloaded whenever you have a call to session_start() in your script.
The problem is with the Headers PHPs session management sends to the browser: It disallows any cahing and tells that the document expired somewhere around my year of birth (1981). It seems like IE takes that literaly and really does not cache the doument, but then naturally is unable to forward it to the plugin (or activex-control or whatever).
Fortunately, you may change PHPs default headers by just emitting some additional header()-calls:
header('Content-Type: application/csv');
header('Pragma: cache');
header('Cache-Control: public, must-revalidate, max-age=0');
header('Connection: close');
header('Expires: '.date('r', time()+60*60));
header('Last-Modified: '.date('r', time()));
A short explanation of the headers sent:
I have confirmation that this solves the problems some clients where expecting before. Very nice.
Usually I’m not here to ask questions, but today I have two for my readers. Maybe someone can help?
It’s about Eclipse:
I’m quite sure, both problems can be solved. I’m just not seeing where. And additionally I’ve quite some problems devising useful google keywords to find a solution.
So, I thought: Maybe some of my readers know Eclipse better than I do.
Any help is appreciated..
Today, I found a residual registration link lingering around in my home-directory of my iMac. Looking at it’s contents with cat reveals quite an ordinary .plist-XML-file.
What’s interesting is what the engineers at Apple obviously thought of the newsletters the user is given a chance to subscribe to:
<key>RegistrationInfo</key>
<dict>
<key>AppleSpam</key>
<string>NO</string>
<key>Location</key>
<string>B</string>
<key>Occupation</key>
<string>5</string>
<key>OthersSpam</key>
<string>NO</string>
</dict>
(the emphasis is mine)
Oh… how I agree with them!
I got my hands on the demo-version of Delphi 2005 (download it here), and I actually have configured the beast already, so I have my usual environement to work on PopScan with it. These are my first impressions (I won’t talk about this File-Download-Window-Popping-Up Problem as all know it’s a nasty problem with a security-patch from Microsoft which will soon be fixed. Read about it here on Steves blog
All in all, this release of Delphi is a very great release providing the user with a ton of new features and fixes to long-standing usability problems (so long that you got used to them and now are missing them…). I have not expirienced any crashes so far (besides the one where the expat-parser of a debugged application took all the ram on my system, but I don’t blame Delphi for that), which is very nice.
Now, if only the beast could be made to run a bit faster (which will be done, I’d say, it’s the best Delphi since Delphi 2 which means quite a lot…
Thanks Borland.
PS: I know that it’s currently more in fashion to bash Borland and to whine about everything they do. And for the fourth consecutive year now I read posting about Delphi’s impending doom everywhere on the net. But consider this: Delphi still is the only RAD tool out there producing 100% native windows executables. And it still has one of the most lively communities I know of in the Windows-world. Even if Borland would kill off delphi, I’m quite certain, it will not go so easily. Not with this community.
On and speaking of killing off delphi: Seeing this great release of Delphi 2005, I am quite assured that Borland will continue supporting us.
So: Quit whining around!
Imagine, you are working on a webshop.
Imagine further, that you have a page displaying the users shoppingcart. Left of each entry, there’s an <input type="text"> for letting the use change the quantity of the article. Till now quite a common scenario, isn’t it?
Now in the time of DHTML and all that, you write some JavaScript to automatically recalculate the grand total of your shoppingcart on-the-fly, as the user is changing the quantities. This is very nice, as the user gets immediate response to her actions. No reloading the page is involved.
Now imagine further that the user has changed quite some quantities. The new cart is nothing like the old one was. The user is very happy with the total recalulating itself on every key she presses while the focus is in one of those editfieds. Very nice.
Now the user realizes that she needs another product. She clicks on the “Browse”-Link and …
What happens?
Well,… the link certainly works and she browses around in the shop looking for another product to order. But there’s a serious problem lurking around: As all the calculations were done on the client when the user changed the quantities, the server knows nothing about the changes. The server still thinks (provided something like a HTTP-Session-Emulation being at work – but how would you implement a shopping-cart without it?) the quantities are unchanged. When the user looks at the cart the next time (even after reloading the cart-page), she will see all the old values.
How to fix this? (Jonas, if you read this entry: This is about the solution to a problem we faced about a year ago while working on PopScan SMB). Most common today is one of the following:
Now this is where XMLHTTP comes to play.
While it has XML in it’s name, it has very less to do with XML. It’s a technology to send HTTP-Requests from JavaScript. And not only that: The requests are sent completely transparent to the end-user in the background. She doesn’t notice the slightest thing while the script is posting requests. As the API is asynchronous, there even is no waiting involved – not even over slow lines.
So.. how does it work?
I used this function to post back quantity-changes from my shoppingcart:
function updateToServer(quant,art){
var xmlhttp=false;
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
// JScript gives us Conditional compilation, we can cope
// with old IE versions and security blocked creation of
// the objects.
try {
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch (E) {
xmlhttp = false;
}
}
@end @*/
if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
xmlhttp = new XMLHttpRequest();
}
xmlhttp.open("GET", "/index.php/order/qchg?a="+encodeURI(art)+
"&q="+encodeURI(quant),true);
/* not interested in feedback. if it doesn't work, too bad. other
methods provide fallback
xmlhttp.onreadystatechange=function() {
if (xmlhttp.readyState==4) {
alert(xmlhttp.responseText)
}
}*/
xmlhttp.send(null)
}
(disclaimer: much of the code comes from this page. If you know, what you are doing, copy&paste really is a timesaver.)
What does it do?
As you can see, I created a special url for accessing my shop-system, just for updating the quantities.
This function is called from the onChange-event of the quantity-change-input-boxes. Now, whenever the user changes a quantity, /index.php/order/qchg is called, advising the server to update the quantity (if you find the URL strange – using PATH_INFO and all that: I will post something about a PHP-design-pattern that I’m using that has proven to be the most powerful in all those years I’ve been working with PHP).
Problem solved.
And just 30 minutes after implementing this method, I found out that for the purpose I’m using it, this whole XMLHTTP-thing would not be necessary:
While some trickery with FRAMEs could do the same thing, the really best method that even works with Netscape 4.x (even 3.x, if I remember correctly) would be to conditionally change the URL of a (transparent 1px2) image. This works always if no feedback from the script must be evaluated:
Pseudocode:
function updateToServer(quant, art){
document.images['qposter'].src="/index.php/order/qchg?a="+encodeURI(art)+
"&q="+encodeURI(quant);
}
A one-liner, no frame-trickery (frames are bad – even for such things), no finding out what object to instantiate, no problems with near-browsers,… very nice, but nowhere near structural markup, which is why I prefer the less hacky solution.
I hope, this was helpful for you. And as I’m progressing with this very interesting project I’m working on, I certianly will have more of such things to post.