return in finally sections is a bad idea: function foo() { try { try { return 1/0; } catch(e) { return 2; } finally { return 3; } } catch(e) { return 4; } finally { return 5; } } Probably return allowance in finally sections is a design flaw of JavaScript language itself?
Category: Uncategorized
Pessimistic challenge #2
And what answer will give us following function? function test() { var flavour = “optimistic”; try { return flavour = “pessimistic”, “I am ” + flavour + ” optimist”; } finally { return “I am ” + flavour + ” pessimist”; } }
Test: who are you?
What will following JavaScript function return? function test() { try { return “I am optimist”; } finally { return “I am pessimist”; } } Try to answer as this is a good chance to measure your attitude 🙂
W3C decided to reincarnate HTML development
W3C decided to reincarnate HTML development. Phylosophical difference between HTML and XHTML can be demonstraed by the fact that tag <html> is optional in HTML and is not in XHTML. By definition of XML (XHTML): Definition: A data object is an XML document if it is well-formed, as defined in this specification. In addition, the…
New forum
We have moved forum to the new location. For many reasons we like bbpress engine more than PHPBB. It is not possible to convert user accounts so please register yourself again.
Freedom or liberty?
We are getting tons of spam on our email addresses and in blogs. We all get used to it. Click on “Delete this e-mail message” button became one of our reflexes… Coin that has “Freedom of speech” on one side has many dirty things written on other side. Just got one of such today: Message…
HTMLayout. Success story.
Here is a success story of one of our customers. Some goverment agency in some country. Migrating from IE control to HTMLAYOUT Problem We have a suite of products deployed in multiple geographical locations to about 150 clients. The suite is implemented in Law Enforcement Agencies to leverage the use of technology in ensuring the…
Delegates in JavaScript. Now with parameters.
Here is an extended delegate function: function delegate( that, thatMethod ) { if(arguments.length > 2) { var _params = []; for(var n = 2; n < arguments.length; ++n) _params.push(arguments[n]); return function() { return thatMethod.apply(that,_params); } } else return function() { return thatMethod.call(that); } } And here is an example. Note that obj.method now accepts additional...
Java GUI executable without JRE… Are you kidding me?
Three years ago (or so) I did experimental project named J-SMILE to prove that it is possible. Main idea of it is simple – to create as small as possible Java (Virtual Machine) that can be attached to compiled Java bytecode (.class files). Physically J-SMILE VM is an .exe file of size 200k. These 200k…
Phrase that made my day.
“… people knew how to write small, efficient programs in those days, a skill that has subsequently been lost.” © Tanenbaum (?)