Skip navigation.

Claws, fangs, fur...

...the bear essentials

March 2009

( Monthly archive )

Detecting the reader's language preference

, , , ...

There are bad ways to do it (IP Address Geolocation), and there are good ways (HTML_ACCEPT_LANGUAGE detection). Our new article on detecting the HTML_ACCEPT_LANGUAGE preference over on the OmegaJunior.Net explains one of each.

We've written the article because we've had enough of ignorant web authors. (Yes, that might be you, too. Read it and weep.) We employ our preferred technique on the OmegaJunior.Net itself, wherever content is available in multiple languages.

This is a particular case wherein "follow the leader" leads to bad choices on the web. The article is our attempt at aiding the web to improve.

Yet Another Sudoku Solver

, , , ...

Added to the Code section of the OmegaJunior.Net: our own method of solving Sudoku puzzles, as a way of simulating the human thought process in computer programming.

We didn't set out to solve any and all Sudoku challenges out there... just that we created a program that mimics one single solving strategy, which can and indeed does fail with some specially crafted challenges. That strategy is called the "3DRLI": the "3 Degrees Reduction and Lock-In Strategy". The article describes the strategy and sports a javascript implementation of a solver using that strategy.

You may wish to use an HTML 5 / CSS 3-compatible browser to appreciate the full experience of this article and the YASS. Opera 9.6 / 10 and Google Chrome 1 come to mind. Recent nightly builds of Firefox 3 look promising and sport the fastest javascript engine for this application, but fail to support the innerText-property and some HTML5 elements.

Some minor flaws in Opera appear when using Opera 9.6 or newer. For instance: we've employed WebForms 2.0 Number Inputs. (That's an HTMLInputElement with its type set to "number".) Those inputs sport a max and a min property. Guess which browser does allow setting that property and validating for it... but fails to limit the user's input?

Some minor display flaws in many a browser appear. We've employed HTML5's Figure element, sporting a Legend element. Non-HTML5 browsers (there are many, currently), see the Legend element, and conclude that it must necessarily be part of a Fieldset element, which obviously is missing. So their rendering engine automatically puts one in... which then fouls up the display. Especially Firefox 2 and 3 are troubled by this flaw. Other browsers show a tiny spec of border where they assume the Fieldset should start, as Fieldsets generally are delineated using borders. Firefox 2 and 3 however, insist on enclosing the entire rest of the article in a border.

Looks promising for HTML5 rendering, doesn't it?
Download Opera, the fastest and most secure browser