WinInet, Proxies and NTLM

For quite some time now I heard about customers telling me that PopScan seems to be having problems with proxy servers using NTLM authentication. I knew that and I told everyone that this is not supported.

But I could not understand it: Why did it not work. I mean, I went from my own HTTP-Routines to WinInet just to be able to use the system-wide proxy server settings and connections

When using WinInet and INTERNET_OPEN_TYPE_PRECONFIG with InternetOpen, the whole thing is supposed to just work – as long as IE itself does work. But in my application this wasn’t the case and I had no idea why. As soon as NTLM was enabled at the proxy, I was just getting a 407 HTTP_PROXY_AUTHENTICATION_REQUIRED status from the proxy, despite the correct password being used

MSDN was of help (taken from the documentation of InternetOpenRequest):

If authentication is required, the INTERNET_FLAG_KEEP_CONNECTION flag should be used in the call to HttpOpenRequest. The INTERNET_FLAG_KEEP_CONNECTION flag is required for NTLM and other types of authentication in order to maintain the connection while completing the authentication process

I’ve added this flag (and some more – now that I already was at it), recompiled, tested and -yes- finally it does what it should: It works just out of the box. No more 407, no more entering password for the users. One more thing that switched its state from “not supported” to “supported and working splendidly”.

This is with a NTLM-enabled Squid Proxy, but it should work with Microsoft ISA too.

Console game Videos

I’ve already posted about this site with its speedruns for old console games. What I did not know back then is that these videos are created using slow motion and savestates which makes them look so expectionally good (if you are up for movies not using savestates, then this is for you).

Though the videos are made with savestates, they are extremely fun to watch, so bisqwits page is one of those I have been visiting every day just to look for updates. Recently it went all quiet…

And today I see what was bisquwit keeping from posting new movies: The whole page got redesigned (on a WIKI-basis) and SNES and Genesis (Mega Drive here in Europe) Movies were added. Very nice. My Bittorrent client is already hard-working ;-)

Optimized comment display

Yesterday, when I was reading through old entires here on gnegg.ch, it came to me that I have never really styled the comments-section of my postings during the redesign. I’ve taken the old MT-Template and style definitions and let it rest at that.

I wanted to change that and so I did:

  • The comments are in one of those grey boxes now. I think the can be a lot better distinguished from each other now.
  • The comment-form is hidden by default. The used JavaScript is quite straight forward, but if you don’t want to use JS and still comment, use a User defined stylesheet and set
        #comment-form{
            display: show !important;
        }
  • Using MTEntryIfComments, the trackback-list is only shown if there actually are trackbacks
  • Using the same plugin, if there are no comments, a message is displayed, encouraging to write one.

I like this solution quite a lot. The entries are quite less cluttered that way. What do you think?

Movable Type licensing

While looking for some documentation for improving my comments-system (later post), I came across a link to this blog entry that announces a revised licensing scheme for Movable Type 3.0.

This time they actually did it right: The (still) free edition is now clearly announced. The personal edition is what quite a lot of users (including myself) have wanted (unlimited blogs) and it is quite affordable. This is nice.

Thank you, Movable Type

RAM doubler ;-)

I have a server (running gnegg.ch) with 1.5 GBytes of RAM and I’m running Gentoo Linux (another candidate for my all-time favourites list, but it’s still too soon for that. I’m only working with it for a little bit more than one year). And as I wanted the thing to be as secure as possible, I created a kernel from scratch without module support.

What I’ve always asked myself is why the heck “free” just lists 896 Mbytes of available memory:

galadriel root # free -m
             total       used       free     shared    buffers     cached
Mem:           885        193        692          0          6         69
-/+ buffers/cache:        117        768
Swap:          976          0        976

At first I had a BIOS problem in mind, bit after having seen GRUB recognizing the whole amount of memory, I came to the conclusion that there must be some problem in the kernel

As 2.6 is still quite new, I waited for the next gentoo-dev-sources to be released which happened somewhere around today. With the new kernel the problem still existed, so I dug deeper

dmesg output something like this in its first lines:

Warning only 896MB will be used.
Use a HIGHMEM enabled kernel.

Though I misread the second line as a status message (stating that HIGHMEM is being used) instead of a request, I entered the above message to Google Groups and found out that the second line indeed is the solution to the problem

In Processor type and features, set High Memory Support to 4GB and recompile your kernel.

What I don’t understand: I’m having this problem with 1.5GB of RAM and this option seemed to me like talking about 4 GB. But Google was helpful like most of the time, enabling me to virtually double the available RAM

galadriel root # free -m
             total       used       free     shared    buffers     cached
Mem:          1520        333       1186          0         12        158
-/+ buffers/cache:        162       1358
Swap:          976          0        976

Nice! Isn’t it?

Update: For those that have not yet noticed it: The title of this entry does hint at products like this, though this one is at least honest in its description.

All-time favourite Tools

Who doesn’t have them? Those all-time favourite tools. It’s not just software, it’s passion. Those tools are tools that you always have to use. Tools where all objectivity seems to fade away when it comes to making recommendations. Tools where you actively monitor (or even participate in) the developement. Tools where you, though they are free, gladly donate some money. Tools you love.

Of course, I too know of some tools. And this is my list (in no particular order):

  • Exim is an UNIX MTA (mail server). It is not only extremely configurable, it’s even easy to do so. Back in 2000, Exim was the only MTA capable of being used in a environement where all accounts are stored in a MySQL database. Since then I am using Exim for all my mail serving needs and I still have not stopped discovering new ways the incredibly flexible configuration scheme can be used to do even fancier stuff. But the greatest thing about exim is it’s creator, Philip Hazel. Phil is a ingenious programmer. A really pragmatical one. I love to read his emails on the exim mailinglist. I love to see his solutions that are quite often so much easier than what others suggested but leave nothing to ask for at all. Btw: During summer 2001 I even extended my Accounts-in-MySQL-Configuration and put it on the web as a .txt-File. Oliver Siegmar was convinced enough to build XAMS on it. I really like Exim
  • PostgreSQL came to my rescue when I desperatly needed a RDBMS that really merits that name. I constantly run into limitations of MySQL, so I was on the lookout for a better alternative. With the TOAST tables of PostgreSQL 7.1, it was finally possible to have length-unlimited columns which I needed in the webapplication I was working with (for storing long comments), so it became a real solution. Since then PostgreSQL never failed me or any of our customers. In my journey with PostgreSQL I learned a lot about programming database systems while reading through the posts of people like the ever so conservative Tom Lane and others. What a great community. What a great database server!
  • InnoSetup (and it’s graphical frontend ISTool) is a easy to use and extremely powerful generator for Windows Installations. I know that you are supposed to use MSI these days, but InnoSetup works, has any feature you could dream of and – that’s the point – is terribly easy to use. My journey with InnoSetup is a long one. It began back in 1996, where I was the first translator at all (now long outdated) and it goes on through nearly all releases till’ today. Inno’s programmer, Jordan Roussell is another one of those extremely talented ones. Reading his posts in the support newsgroups is a real pleasure – reading Inno’s sourcecode is very enlightening. How powerful such a little tool can be!

And you? Do you have such tools in your toolbox? Do you use the words love and software in the same phrase? I certainly do!

Web Applications and the View State

Today, it came to my mind, that I know of a problem with some web applications, which apparently few else seem to know about. What is worse, is that those new technologies like ASP.NET and Java Server Faces seem to run straight into the problem.

This article is even bigger than the usual, so I split it up.
Continue reading “Web Applications and the View State”

Zelda: Four Swords Adventures

About a year ago, I bought myself a GBA with the GBA-port of “A Link to the past” – one of the best Zelda games (and they all are great [except Majoras Mask which I didn’t really like]). What I did not know when I bought the game is that the add-on “Four Sword” that was on the cartridge could be so incredibly fun to play.

It was more to proof that a storyless multiplayer Zelda can’t be any fun that I played a round with Richard and Evelyn back then.

As always with prejudice, I have been proofen wrong: It was so incredibly fun to play Zelda together. I mean: Though you have to be cooperative to play through, it’s the player with the most rupees that finally wins the round, so it creates quite a bit of danymics

I have not played the GBA-game since last december as I now more than know all the ramdomized levels that can get generated and I think we have killed Vaati about 100 times, so the fun finally went away- after nearly a whole year of fun.

But then I found out that multiplayer Zelda is coming back. To the Game Cube this time: The Legend of Zelda: Four Swords Adventures.

What concerned me was that a GBA is needed to play the game and that you always play with four links. And then there was the thing with the non-autogenerated levels. Is there any replay-value? Does the not-so-great grpahics work on the GameCube? Is it difficult to follow the action on screen alternating between the video beamer and the GBA?

Many questions. I wanted them answered and I wanted more multiplayer Zelda! So I’ve imported the US-Version of the game and received it last thursday. And yesterday I played it with someone else for the first time.

I can guarantee you: It’s fun. As always I will list the things I don’t quite like first:

  • The guy that designed the GBA->GC cable without a pass-through power plug should be shot. I hate it to interrupt playing just because one of the GBA SP’s lost power with no way to attach the power cable.
  • The GC->GBA cable makes it quite inconvinient to use the L and R-Buttons on the GBA which are quite often used when playing FSA (Four Swords Adeventures)
  • It takes some getting used to the GBA-GC combination, but when you get the hang of it, it works quite well

And that’s already all I have to say to the negative points. Now to the positive:

  • It’s so much fun. Whether you play alone or with opponents (or is it partners? You can never be sure when playing multiplayer Zelda). I really like the sequences where hordes of enemies appear and you can slay through them. Great!
  • I really like the graphics. It’s 2D, yes, but they did a really great thing to it. It’s very smooth, detailed, zoming and everything. Cool.
  • Great sounds. As a fan of “A link to the past”, it’s great to hear the old tunes on current more capable hardware.
  • Did I mention, it’s incredibly fun? This is more a property of any multiplayer Zelda, but it’s no different this time. I so much like throwing my so-called partner into the water just to get some rupees^W Force Gems. Then again, ruthless playing gets you nowhere as you can’t proceed with the help of the other players. And then there is that election at the end of each level which can still change the tide…
  • It’s long. And, thus, unrepetitive. Much longer than the GBA.
  • Though it’s not much, there is a bit of story in the game. Much more than on the GBA title. I like that
  • It’s just great!

If you can get it, go and buy the game. But don’t play it alone. It’s so much more fun when played together.

Eclipse, CVS and putty

I’m a really big fan of Eclipse. This Java-IDE has many great features I have never come across in other IDEs so far. The new context based syntax-highlighting comes to mind (it analyzes your sourcecode and can – for example distinguish between local variables and constants)

Actually, it’s only because of Eclipse that I now can write fairly good Java code. The thing was incredibly helpful during my first struggle to get something to work, so I made quite some progress in a quite small timeframe.

There is one thing though, I never got to work: CVS integration

I’m using CVS strictly over SSH, with the help of Putty, Pageant and Public Key authentication. Despite the fact I’ve entered the correct settings for the “ext” method (using Puttys plink.exe as CVS_RSH) in Eclipse, it never worked (it failed with various messages)

Of course there is the new extssh-Method, but this is non-standard. Where I can access the CVS-Server using extssh from eclipse, it does not really help because then the command line tools and TortoiseCVS stop working because they don’t understand extssh

Finally I found the solution: Even though it doesn’t make sense, you have to enter “cvs” under CVS_SERVER in the CVS-Settings. I don’t know why. It’s just that way. So to use Eclipse together with the command line tools and Tortoise to access the CVS-Repository from the same working copy, this is what you have to enter under Window/Preferences/Team/CVS/Ext Connection Method:

CVS_RSH yourfullpathtoplink.exe
Parameters {user}@{host}
CVS_SERVER cvs

Then you add a repository in the repository-view using the following settings:

Host your.host.name
Repository path /path/to/repos
User username
Password empty
Connection type ext

Before you finally click “Finish”, open up a command line window and log in to your CVS-Server using plink:

plink user@host

Maybe you are asked to store the host key in plinks database. Do so. Then make sure that you can login without a Password-Request popping up (Pageant must be running, your key must be loaded and authorized on the server). If that works, click “Finish” in Eclipse.

Worst scrollbar ever

scrollbar.png

Taken from thawte.com. I made the thing a bit shorter, but changed nothing else.

Small quiz: What is this thing you are seing in this image (possibly displayed on the right in your browser)?

It’s a scrollbar. Or at least, it’s supposed to be one. I came across this “wonderful” … thing when I was looking around for a code signing certificate on thawte.com. Have a look for yourself: It’s right there.

I have quite some problems with this maybe-scrollbar:

  • I can’t read it. Maybe it’s my eyes, but I simply have problems recognizing a dark blue slider on black background.
  • It’s no real scrollbar. It does just look like one. This has many “advantages”:
    • The mouse wheel does not work with this one.
    • The arrow-buttons are much too small for my preference
    • It’s terribly slow as it’s pure DHTML
    • Clicking somewhere on it does scroll the document to the designated point, but it’s terribly slow too.
    • Dragging and Dropping the knob does not work. Firefox (correctly) thinks I want to drag the knob-image somewhere to my desktop
    • Keyboard navigation is not possible
  • But the worst thing of them all: If the browser window is small enough, it gets a (real) scrollbar on its own. But with this one, the mouse wheel does work (no surprise: it’s a real scrollbar). Thus, scrolling through the page with the wheel scrolls, but it scrolls the wrong thing. There is no way to read the whole page using the mousewheel.

The page has a fixed height so the last problem above can occur quite frequently. I see absolutely no sense in creating a DHTML monster to do something the browser already does. I can’t see any drawbacks of the page having a non-fixed height and would rely on the browsers scrollbar.

Can somebody enlighten me?

PS: As comments about usability seem to get constantly more numerous, I have created a usability category. Maybe some time in the future I will actually create a category-based listing :-)