| ||||
The Best is just opposite of The Worst?Quite funny (if you have to learn new PL) rant about INTERCAL created mon jan 13 2003 9pm cet [2003/1/13 CET] permalink best man for (programmer) girl?so nice to hear this :-)
created sat jan 18 2003 10am cet [2003/1/18 CET] permalink more direct XML accessinteresting article about using more directly XML in Programming languages: Speaking XMLnow some observations inspired by it - assume input: <stock>
<price>43</price>
<revenues>10</revenues>
<expenses>3</expenses>
</stock>
it would be nice to have XPath based locator that can convert such input into java types.
such locator would work as a bridge between XML and actual PL variables
XPathFloatLocator price = XPathLocator.floatValue("stok/price");
XPathFloatLocator revenues = XPathLocator.floatValue("stok/revenues");
XPathFloatLocator expenses = XPathLocator.floatValue("stok/expenses");
// process input "somewhere" until all locators get values or throw error with exception
// close stream as soon as data is found (no need to read whole input)
XPathEvaluator.evaluate("somewhere", new XPathLocator[]{price, revenue, expenses});
float peRatio = price / ( revenues - expenses );
this could address main author conncern about DOM memory inefficency as XPathEvaluator pulls
nodes into mameory only when they are used doing streaming parsing with XmlPull API
and is quite easy to read IMHO ...
this could beeven better if databinding framework was used (to bind only part of XML). such framewrok shoul dallow reading and binding only parts of input so structured (described by XML schema and mapped into objects) and unstructured data can coexist StockInfo si = (StockInfo) xmlDataBinding.bind("somewhere");
float peRatio = si.price/( si.revenues - si.expenses);
and good xml binding framework would use streaming parser so virtually no memory overhead.
however this approach requires writing XML schema for stock XML and generating StockInfo class
quite lot of work for simple stock calculations.
more interesting is middle ground: we laredy have class and want to bind some XML data into it, something like this: interesting question: can it be done dynamically: i have StockInfo class and use XPathLocator to bind existing class with XML more general question is how different approaches such as static binding with compiled XML schema into generated classes, binding existing classes into XML fragments (schemas?), and completely schema-less free XML navigating can be all used with API that is as similar as possible for all of those cases. that should lead to very powerful XML programming API with lots of unforeseen synergies ... created sat jan 19 2003 9pm cet [2003/1/19 CET] permalink 60+ reasons why java is betterso now i know ...created sat jan 19 2003 9pm cet [2003/1/19 CET] permalink Expect Moremy favorite essay on web/SOAP design Expect More (posted as i always have problems to recall the title and fins it ...)created wed jan 22 2003 8am est [2003/1/22 EST] permalink Here it comes: official WSIF releaseafter lot of work it is really nice to see that we have finally have Apache WSIF 2.0 :-)created tue jan 28 2003 8am est [2003/1/28 EST] permalink Pair Programming or ... not?Chiara wrote:This is just one of the tiniest examples of how stupid that whole experience was. Bad programmers write bad code, whether they pair up, or not. XP is not faster , slow programmers write slow code whether they are alone or with someone else, of course, if a slow programmer pairs up with a fast programmer, the code will be written faster due to the fast programmer, then, why tag along the slowpoke? There is no silver bullet and just maybe different people have different needs and in diversity of work approaches is the strngth and not in pairing everybody :-) created wed jan 29 2003 8am est [2003/1/29 EST] permalink Popup about popup eliminator.. kind of logical. But who is going to eliminate popup eliminator?
created wed jan 29 2003 6pm est [2003/1/29 EST] permalink mozilla and duplicated emailsit happened again! each time mozilla crashes when restarted it will get emails seen last startup (or last offline) and cheerfully inject them back into INBOX as not read but even worse: it will distribute again emails to subfolders using message filter.could somebody add to Mozilla duplicate email filter so this can be prevented , please!!!! at minimum i should be able to run filter on whole mail account but what i really want is filter that can be set on whole mailbox that *prevents* duplicate messages form even entering mail folder! when doing this could somebody also add virtual folders too ... UPDATE 2003/10/20: after reporting bug it was fixed in Mozilla 1.4.x ann Phoenix 0.7 created fri jan 31 2003 10:01am est [2003/1/31 10:1 EST] permalink |
This blog is about: Find more
about
Blogroll:
Projects::
RSS
Filter Entries: |
Disclaimer: personal opinions and observations that may or may not be taken seriously, or even based on shared reality and generally are very unreliable and personal and snapshots of volatile writer mind ...
NOTE: THIS PAGE IS UNDER CONSTANT DEVELOPEMENT