<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-9348462</id><updated>2011-04-21T19:42:17.413+02:00</updated><title type='text'>yozzeff thinks</title><subtitle type='html'>musings about programming</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://yozzeff.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9348462/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://yozzeff.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>yozzeff</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>8</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-9348462.post-114813207557491567</id><published>2006-05-20T15:19:00.000+02:00</published><updated>2006-05-20T17:17:54.366+02:00</updated><title type='text'>Me afraid of javascript?</title><content type='html'>kevin wonders why people try to avert writing javascript.&lt;br /&gt;especially when they use some sort of transformation/compiler&lt;br /&gt;from another dynamic language to javascript.&lt;br /&gt;&lt;h2&gt;problems?&lt;/h2&gt;he names a few problems when working with js&lt;br /&gt;&lt;ul&gt;&lt;li&gt;you are not shielded from the differences of&lt;br /&gt;the browsers (this is only possible thru the library you use)&lt;/li&gt;&lt;br /&gt;&lt;li&gt;debugging javascript in the browser is a major PITA.&lt;/li&gt;&lt;br /&gt;&lt;li&gt;if your transformation tool is buggy you are &lt;br /&gt;back to square 1 and you need then to know your &lt;br /&gt;transformation and javascript on top&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;but are these the real problems of javascript development?&lt;br /&gt;actually i dont think so!&lt;br /&gt;&lt;h2&gt;modularization&lt;/h2&gt;what javascript is really missing are modularization features &lt;br /&gt;enabling you to do large scale development.&lt;br /&gt;namely javascript as of today is missing&lt;br /&gt;&lt;ul&gt;&lt;li&gt;namespaces&lt;/li&gt;&lt;br /&gt;&lt;li&gt;type definitions&lt;/li&gt;&lt;/ul&gt;namespaces allow for modularization in the large whereas typedefinitions (aka classes) allow for modularization in the small.&lt;br /&gt;&lt;br /&gt;of course you can &lt;i&gt;easily&lt;/i&gt; emulate those features with js.&lt;br /&gt;but what is missing is the mental framework for doing this.&lt;br /&gt;&lt;h2&gt;syntax follows semantics&lt;/h2&gt;the sameness of every construct you are touching&lt;br /&gt;when working with prototype based languages makes&lt;br /&gt;it quite hard to distinguish between small and large modules;&lt;br /&gt;between important and not so important sourcecode elements&lt;br /&gt;&lt;br /&gt;one reason i think that prototyped based languages never &lt;br /&gt;quite took off is that they are sort of restricting &lt;br /&gt;despite their dynamicism (actually i only know javascript &lt;br /&gt;and self). keywords can have a quite liberating effect &lt;br /&gt;even thou they do restrict you.&lt;br /&gt;&lt;h2&gt;new keywords?&lt;/h2&gt;please dont take this a plea for new keyswords in&lt;br /&gt;javascript. rather it is a plea to give me the tools to be &lt;br /&gt;able to create new keywords in javascript if i feel so. &lt;br /&gt;that is give me syntactic macros.&lt;br /&gt;&lt;br /&gt;at the moment i use javascript libraries only in small &lt;br /&gt;doses when doing a bit of rails development. if i had &lt;br /&gt;to develop a large webbased  application i'd rather &lt;br /&gt;use actionscript 3.0.&lt;br /&gt;i have ported a quite large application just a few &lt;br /&gt;weeks ago from qooxdoo to actionscript in about&lt;br /&gt;1/5 of the time it took me with qooxdoo.&lt;br /&gt;the reason was not so much qooxdoo &lt;br /&gt;(a very cool ajax-gui-framework)  but having so much &lt;br /&gt;javascript files without any support for modules &lt;br /&gt;made the whole thing a real pain. &lt;br /&gt;flexbuilder of course helped as well :-).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9348462-114813207557491567?l=yozzeff.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.blueskyonmars.com/2006/05/19/why-are-people-still-afraid-of-javascript/' title='Me afraid of javascript?'/><link rel='replies' type='application/atom+xml' href='http://yozzeff.blogspot.com/feeds/114813207557491567/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9348462&amp;postID=114813207557491567' title='1 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9348462/posts/default/114813207557491567'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9348462/posts/default/114813207557491567'/><link rel='alternate' type='text/html' href='http://yozzeff.blogspot.com/2006/05/me-afraid-of-javascript.html' title='Me afraid of javascript?'/><author><name>yozzeff</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9348462.post-114228297935076063</id><published>2006-03-13T21:48:00.000+01:00</published><updated>2006-03-13T22:14:51.163+01:00</updated><title type='text'>static typing vs. dynamic typing</title><content type='html'>that debate about strongly typed languages vs weakly (or dynamicly) typed languages will probaly never end.&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;XOR&lt;/h4&gt;the reason being that both camps usually present their arguments as a XOR relation. meaning you either use a strongly typed language or you dont use any types at all.&lt;br /&gt;&lt;br /&gt;the problem thou is that both are wrong even thou i admit that the dynamic camp is usually more open minded - certainly due the fact, that proponents of dynamic languages often have switched sides from for example java to ruby or python so they usually _know_ about the attributes of typed as well as of untyped languages. the camp of typed language diehards on the other hand (especially java guys) have often never used any dynamic language in earnest - but nevertheless claim superiority. which bags the question on which &lt;i&gt;facts&lt;/i&gt;.&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;No Value on Its On&lt;/h4&gt;now if you ask me ... being &lt;b&gt;typed&lt;/b&gt; or &lt;b&gt;untyped&lt;/b&gt; is no value in itself. other attributes define if &lt;b&gt;typed&lt;/b&gt; is a postive trait or if it is a negative trait.&lt;br /&gt;&lt;br /&gt;a big system might be much better off if its typed whereas small and medium systems might be better off if untyped.&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;2type || !2type&lt;/h4&gt;now of course the question remains when is a system&lt;br /&gt;big and when is system small?&lt;br /&gt;let me give you 2 measures  (which are of course incomplete):&lt;br /&gt;&lt;br /&gt;- lines of code (LOC)&lt;br /&gt;- number of developers&lt;br /&gt;&lt;br /&gt;problem nobody would argue if i say that any system that is a million lines of code is pretty big - regardless of language used; whereas a team of 3 developers is rather small.&lt;br /&gt;&lt;br /&gt;now the problem with small projects is that they tend to grow. especially the successful ones grow and grow and suddenly your system is 250k LOC and 15 developers and you realize that the informal ways of communication you have used do not scale. especially the communication between the subteams breaks all the time.&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Formalizing&lt;/h4&gt; its time to start formalizing communication paths between devlopment groups. the easiest way on formalizing communication between teams is to add type information to your external interfaces. &lt;br /&gt;now before all you java guys start to shout: "we knew it all the way" please reread the last sentence. i am talking about explicit external interfaces that a team and group publishes to the outside world for consumption. that usually includes services and facades and classes used for data exchange.&lt;br /&gt;your internals can stay untyped and often it is far better if they do. especially if that module is still under heavy development or refactoring. &lt;br /&gt;but then the same advices goes to your dynamic typers - especially you python guys opposing any addition of  optional type information into python 3000.&lt;br /&gt;please! documentation is NO substitue for enforced type checking. you are kidding yourself if you belive that.&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Workarounds&lt;/h4&gt; now good thing with some of the dynamic languages is that you can overcome that point where you should start adding type annotations. all languages that offer decent meta facilities can very well create their own optional static typing system. ruby and python 2.4+ fall into this camp whereas javascript is not capable of such a feat.&lt;br /&gt;&lt;br /&gt;the problem with java on the other hand is that it can not "scale down".&lt;br /&gt;it is simply not possible to have parts of your program "untyped" - you can hack around it with reflection and xml and the like but ist &lt;br /&gt;ugly - ugly - UGLY!&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Solutions?&lt;/h4&gt;so what can we do about all of this? well, basically nothing. there are a few languages out there that do optional typing (boo for example - a python clone). some languages like scala or nemerle are at least trying to do type interference which spares you at least the pains of java generics. but most of these languages are even more obscure than ruby had been 3 years ago (meaning that almost nobody knows them).&lt;br /&gt;i wish for a optional typed ruby or a java where i could drop type infos. that would be nice.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9348462-114228297935076063?l=yozzeff.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yozzeff.blogspot.com/feeds/114228297935076063/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9348462&amp;postID=114228297935076063' title='2 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9348462/posts/default/114228297935076063'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9348462/posts/default/114228297935076063'/><link rel='alternate' type='text/html' href='http://yozzeff.blogspot.com/2006/03/static-typing-vs-dynamic-typing.html' title='static typing vs. dynamic typing'/><author><name>yozzeff</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9348462.post-113078771886043260</id><published>2005-10-31T20:40:00.000+01:00</published><updated>2005-11-01T22:55:01.300+01:00</updated><title type='text'>playboy bunnies and the ruby community</title><content type='html'>eric has some &lt;a href="http://ericburke.com/blog/2005/09/26/50"&gt;problems&lt;/a&gt; with some things martin fowler said  about the ruby community vs. the python community in his &lt;a href="http://martinfowler.com/bliki/RubyPeople.html"&gt;blog&lt;/a&gt;&lt;br /&gt;&lt;h4&gt;what was really said&lt;/h4&gt;now if he read martins blog entry really and slowly he might notice that martin does say that he does &lt;i&gt;not&lt;/i&gt; know if the ruby community is nicer than the python community &lt;b&gt;but&lt;/b&gt; that he has noticed that the ruby community is nicer that most other online communities. &lt;br /&gt;this of course could include python but not necessarily so.&lt;br /&gt;&lt;h4&gt;observations&lt;/h4&gt;as far as i can tell it is definitly true that the ruby community is a very nice one and especially so if you compare  it to other communities.&lt;br /&gt;have a look on any thread on theserverside.com or on java lobby.&lt;br /&gt;or have a look at hibernate forums. many of them are populated by rude and/or arrogant people.&lt;br /&gt;my experiences with python people are as equally conforting as those with ruby people. be it online or offline.&lt;br /&gt;&lt;h4&gt;what eats them&lt;/h4&gt; what i also observe thou is that python people are getting easily ungentlemen like if you start talking RoR.&lt;br /&gt;they simply do not understand the hype especially as python has all of that too. &lt;br /&gt;sorry guys but sometimes timing and a little bit of luck is all it needs. ask digital research and microsoft about it.&lt;br /&gt;maybe the biggest issue here is that pythons are used to eat and not be eaten.&lt;br /&gt;&lt;h4&gt;conclusion&lt;/h4&gt; as far as i am concerned - i like both communties - especially in&lt;br /&gt;contrast to any java community (and particulary to the hibernate guys).&lt;br /&gt;sure eric is right: bunny rabbits are even nicer than ruby people. &lt;b&gt;BUT&lt;/b&gt; any playboy bunny is even nicer that a rabbit bunny. &lt;br /&gt;belive me if i had the chance to spend a night with one of these &lt;a href="http://www.keyworlds.com/p/playboy_bunnies.htm"&gt;bunnies&lt;/a&gt; i wouldnt frett a minute for not having any one of you nerds around me.&lt;br /&gt;be it nice ruby or python people.&lt;br /&gt;so please get a life - and me too.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9348462-113078771886043260?l=yozzeff.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yozzeff.blogspot.com/feeds/113078771886043260/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9348462&amp;postID=113078771886043260' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9348462/posts/default/113078771886043260'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9348462/posts/default/113078771886043260'/><link rel='alternate' type='text/html' href='http://yozzeff.blogspot.com/2005/10/playboy-bunnies-and-ruby-community.html' title='playboy bunnies and the ruby community'/><author><name>yozzeff</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9348462.post-112981704763790558</id><published>2005-10-20T15:42:00.000+02:00</published><updated>2005-10-20T16:41:08.736+02:00</updated><title type='text'>teclarative.rb (information underflow)</title><content type='html'>christian has &lt;a href="http://chneukirchen.org/blog/#x-20051016-081700"&gt;blogged&lt;/a&gt; about my talk on euruko. &lt;br /&gt;it was about teclarative.rb. a domain specific language&lt;br /&gt;for declarative testing. now as people read chris's&lt;br /&gt;blogg they start asking for more information.&lt;br /&gt;&lt;h3&gt;the short answer&lt;/h3&gt;sadly there is not much of that at the moment. for&lt;br /&gt;the talk i created of course a set of slides which&lt;br /&gt;i have converted to PDF and which you can download&lt;br /&gt;&lt;a href="http://www.pragmatico.org/presentations/teclarative.euruko.pdf"&gt;here&lt;/a&gt;&lt;br /&gt;&lt;b&gt;but&lt;/b&gt; there is only a slight chance that you &lt;br /&gt;will find the slides usefull as i was creating them &lt;br /&gt;according to the &lt;a href="http://presentationzen.blogs.com/presentationzen/2005/09/one_presenters_.html"&gt;takahashi method&lt;/a&gt;. &lt;br /&gt;this methods lends itself very well to live presentations&lt;br /&gt;(at least that was my impression when doing the talk) but it&lt;br /&gt;falls absolutely short when giving it to people that have not&lt;br /&gt;attended the talk.&lt;br /&gt;&lt;h3&gt;polishing&lt;/h3&gt; so for all the interested parties:&lt;br /&gt;please give me a few more days to polish the library&lt;br /&gt;as well as create some decent documentation.&lt;br /&gt;i will announce on this blog and on comp.lang.ruby.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9348462-112981704763790558?l=yozzeff.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yozzeff.blogspot.com/feeds/112981704763790558/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9348462&amp;postID=112981704763790558' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9348462/posts/default/112981704763790558'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9348462/posts/default/112981704763790558'/><link rel='alternate' type='text/html' href='http://yozzeff.blogspot.com/2005/10/teclarativerb-information-underflow.html' title='teclarative.rb (information underflow)'/><author><name>yozzeff</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9348462.post-112953455349587783</id><published>2005-10-17T08:30:00.000+02:00</published><updated>2005-10-17T13:43:13.983+02:00</updated><title type='text'>ruby geeks gathering (euruko 2005)</title><content type='html'>so its done. 2 days of nerdy talk by nerds with nerds. &lt;br /&gt;and beer of course as this was in munich.&lt;br /&gt;&lt;h3&gt;organisation&lt;/h3&gt;or the lack thereof. at least that was my first impression when&lt;br /&gt;i looked at the conference page and when the conference started.&lt;br /&gt;but stefan who was the chair of the conference did very well.&lt;br /&gt;he organised the tracks ad hoc by giving index cards&lt;br /&gt;to the participants to write the name and a short description&lt;br /&gt;of their talk(s). after doing that all of us  discussed the&lt;br /&gt;concrete schedule and after everybody introduced himself&lt;br /&gt;(there where about 40 of us) the talks began.&lt;br /&gt;&lt;h3&gt;the good and the ugly&lt;/h3&gt; as ever when going to a conference&lt;br /&gt;- especially to technology conference -&lt;br /&gt;the quality of talks ranges from pretty lame to almost brilliant.&lt;br /&gt;same of course is true for the speakers themselves.&lt;br /&gt;there are speakers who are gifted and ... well ... uhm ... yes.&lt;br /&gt;&lt;h3&gt;interesting stuff&lt;/h3&gt;kingsley did a very interesting talk&lt;br /&gt;about using selenium as a testing framework on agile projects.&lt;br /&gt;thou i am not that much into agile projects i found he's talk&lt;br /&gt;enlightning. this will enable me to push ruby into our company&lt;br /&gt;as the benefits can be hardly argued.&lt;br /&gt;also rob's talk about his jedit plugin was quite nice. i will&lt;br /&gt;certainly us the plugin on my ladies notebook&lt;br /&gt;(that is the one for traveling :-) )&lt;br /&gt;&lt;h3&gt;outstanding stuff&lt;/h3&gt;chris did a presentation on a &lt;br /&gt;framework he wrote that does AOP. actually he calls &lt;br /&gt;it contextR but it does quite a bit of aspectizing. &lt;br /&gt;not only was the topic the most interesting one on the&lt;br /&gt;whole conference (and judging the real long applause &lt;br /&gt;he got the other participants felt the same) but &lt;br /&gt;the presentation and the style where excellent as well.&lt;br /&gt;the only issue i have is:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;no, not that the performance of contextR is&lt;br /&gt;horrible (that will be hopefully fixed)&lt;/li&gt;&lt;br /&gt;&lt;li&gt;no, also not that some constructs are missing for doing&lt;br /&gt;AOP in a more pleasing way (a pointcut language&lt;br /&gt;and the like wouldbe really good but that is easily fixed to)&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;no the issue i have is: that kid is as half as old as i am - but&lt;br /&gt;at least twice as good as me. &lt;br /&gt;man, do i feel old!&lt;br /&gt;so find his presentation &lt;a href="http://chneukirchen.org/talks/euruko-2005/chneukirchen-euruko2005-contextr.pdf"&gt;here&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;anyways i am looking forward to euruko 2006 and meeting you there again.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9348462-112953455349587783?l=yozzeff.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.euruko.com' title='ruby geeks gathering (euruko 2005)'/><link rel='replies' type='application/atom+xml' href='http://yozzeff.blogspot.com/feeds/112953455349587783/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9348462&amp;postID=112953455349587783' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9348462/posts/default/112953455349587783'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9348462/posts/default/112953455349587783'/><link rel='alternate' type='text/html' href='http://yozzeff.blogspot.com/2005/10/ruby-geeks-gathering-euruko-2005.html' title='ruby geeks gathering (euruko 2005)'/><author><name>yozzeff</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9348462.post-112886965351568163</id><published>2005-10-09T16:25:00.000+02:00</published><updated>2005-10-16T22:33:46.763+02:00</updated><title type='text'>xml backlash</title><content type='html'>code monkey is wondering why there is such a backlash&lt;br /&gt;against xml in the java community recently and he asks&lt;br /&gt;some questions at:&lt;br /&gt;http://jroller.com/comments/coderant?anchor=another_xml_monster&lt;br /&gt;&lt;br /&gt;to answer the easiest question first: no!&lt;br /&gt;nobody expects you to code all those declarative things in java.&lt;br /&gt;that be complete madness.&lt;br /&gt;&lt;br /&gt;but fact is that xml is and has been abused way&lt;br /&gt;to much in the last few years.&lt;br /&gt;often this is not necessarily an issue of xml but an&lt;br /&gt;issue of the api design that exposed thru the xml.&lt;br /&gt;ejb and its host of xml files are certainly &lt;span style="font-weight: bold;"&gt;the&lt;/span&gt; showcase for it.&lt;br /&gt;&lt;br /&gt;&lt;H3&gt;poor api design&lt;/H3&gt;&lt;br /&gt;usually the real issue is that those APIs are created with&lt;br /&gt;no &lt;span style="font-weight: bold;"&gt;simple&lt;/span&gt; and &lt;span style="font-weight: bold;"&gt;useful&lt;/span&gt; default settings. so one has to specifiy&lt;br /&gt;a host of xml elements and attributes.&lt;br /&gt;that is certainly a reason why ruby on rails is gaining so much&lt;br /&gt;traction: usefull defaults where RoR tries to deduct from context&lt;br /&gt;a lot of information and of course that ruby is an &lt;br /&gt;extremly nice language too :-)&lt;br /&gt;&lt;br /&gt;it is a difference if i can specify a simple persisten class as&lt;br /&gt;&lt;code style="font-family: courier new;"&gt;&lt;br /&gt;class Foo &amp;lt; ActiveRecord&lt;br /&gt;end&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;and be done or if i have to write&lt;br /&gt;&lt;pre&gt;&lt;code style="font-family: courier new;"&gt;&lt;br /&gt;&amp;lt;hibernate-mapping import="false"&gt;&lt;br /&gt;  &amp;lt;class name="Foo" table="FOO" schema="myschema"&gt;&lt;br /&gt;    &amp;lt;id name="id" column="id" type="string"&gt;&lt;br /&gt;      &amp;lt;generator class="uuid.hex"&gt;&lt;br /&gt;      &amp;lt;/generator&gt;&lt;br /&gt;    &amp;lt;/id&gt;&lt;br /&gt;    &amp;lt;property name="bar" column="BAR"&gt;&lt;br /&gt;    &amp;lt;property name="baz" column="BAZ"&gt;&lt;br /&gt;  &amp;lt;/class&gt;&lt;br /&gt;&amp;lt;/hibernate-mapping&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;actually there is nothing that forbids hibernate (or any&lt;br /&gt;other project) to have a set of well defined and &lt;br /&gt;documented defaults that in the end would allow &lt;br /&gt;for something like this &lt;br /&gt;&lt;pre&gt;&lt;code style="font-family: courier new;"&gt;&lt;br /&gt;someHibernateManager.registerSchema("myschema");&lt;br /&gt;someHibernateManager.addClass(Foo.class);&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;no hbm files what so ever.&lt;br /&gt;if you for example now refactor the property "foo" to&lt;br /&gt;"foobar" there is exactly one place to go. thats it!&lt;br /&gt;alas this is no blog entry about hibernate - so lets&lt;br /&gt;move on.&lt;br /&gt;&lt;H3&gt;no breaking up of config files&lt;/H3&gt;&lt;br /&gt;the second issue is intrinsic to xml (or has been at&lt;br /&gt;least until only very recently):&lt;br /&gt;there where no defined ways to break up ones configuration&lt;br /&gt;files into small and easy to handle packages. that usually&lt;br /&gt;lead to having to build some sort of pipe designs&lt;br /&gt;in order to merge the small config files into one before&lt;br /&gt;being able to consume it.&lt;br /&gt;all of this is of course doable. and i have done it more&lt;br /&gt;than once &lt;sigh&gt;. &lt;br /&gt;finally this year XInclude has arrived. but of course only &lt;br /&gt;very fresh and new libraries like XOM 1.1 support it.&lt;br /&gt;&lt;br /&gt;&lt;H3&gt;no escape from the "declarative way"&lt;/H3&gt;&lt;br /&gt;sometimes (often?) defining something declarative&lt;br /&gt;is simply not enough. not only once in my projects&lt;br /&gt;the need arose to have for exaple a simple "IF" &lt;br /&gt;contruct (and belive me where an IF lurks a WHILE&lt;br /&gt;is hiding very closely).&lt;br /&gt;lets see the hibernate conf file again&lt;br /&gt;&lt;pre&gt;&lt;code style="font-family: courier new;"&gt;&lt;br /&gt;&amp;lt;hibernate-mapping import="false"&gt;&lt;br /&gt;  &amp;lt;class name="Foo" table="FOO" schema="myschema"&gt;&lt;br /&gt;    &amp;lt;id name="id" column="id" type="string"&gt;&lt;br /&gt;      &amp;lt;generator class="uuid.hex"&gt;&lt;br /&gt;      &amp;lt;/generator&gt;&lt;br /&gt;    &amp;lt;/id&gt;&lt;br /&gt;    &amp;lt;property name="bar" column="BAR"&gt;&lt;br /&gt;    &amp;lt;if expression="deployment_server.name == 'TEST'"&gt;&lt;br /&gt;       &amp;lt;property name="baz" column="BAZ"&gt;&lt;br /&gt;    &amp;lt;/if&gt;&lt;br /&gt;  &amp;lt;/class&gt;&lt;br /&gt;&amp;lt;/hibernate-mapping&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;so you suddenly have to implement more or less a &lt;br /&gt;fullblown programming language on top of your own&lt;br /&gt;mini configuration language.&lt;br /&gt;aah, i could use XSLT! sure! even more infrastructure i&lt;br /&gt;have to build so that every config file is first &lt;br /&gt;correctly preprocessed before being read and interpreted.&lt;br /&gt;besides that writing an reading XSLT templates is&lt;br /&gt;not exactly fun.&lt;br /&gt;&lt;br /&gt;&lt;H3&gt;use a scription language for the JVM&lt;/H3&gt;&lt;br /&gt;so if you dont want to do your configuration in java&lt;br /&gt;why dont you use a scripting language instead of XML.&lt;br /&gt;i have written a bit about choosing one at:&lt;br /&gt;http://yozzeff.blogspot.com/2004/12/choosing-scripting-language-for-jvm.html&lt;br /&gt;&lt;br /&gt;your infrastructure needs will be far smaller and you&lt;br /&gt;can concentrate more on the business task at hand.&lt;br /&gt;&lt;br /&gt;of course a scripting language wont help you if your&lt;br /&gt;api sucks and you expose it via jruby or groovy. then your&lt;br /&gt;users will have to write loads of jruby config code and&lt;br /&gt;you will experience a jruby backlash.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9348462-112886965351568163?l=yozzeff.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yozzeff.blogspot.com/feeds/112886965351568163/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9348462&amp;postID=112886965351568163' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9348462/posts/default/112886965351568163'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9348462/posts/default/112886965351568163'/><link rel='alternate' type='text/html' href='http://yozzeff.blogspot.com/2005/10/xml-backlash.html' title='xml backlash'/><author><name>yozzeff</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9348462.post-110165414430750889</id><published>2004-12-27T16:01:00.000+01:00</published><updated>2004-12-27T14:53:21.456+01:00</updated><title type='text'>Choosing a Scripting Language for the JVM (Part I)</title><content type='html'>&lt;style type="text/css"&gt;&lt;br /&gt;P {&lt;br /&gt;  color: black;&lt;br /&gt;  background: gray;&lt;br /&gt;  margin: 12px 12px 12px 12px;&lt;br /&gt;  padding: 12px 0px 12px 12px;&lt;br /&gt;}&lt;br /&gt;&lt;/style&gt;&lt;br /&gt;So if you haven't lived somewhere in a cave for the last few weeks you might have noticed quite some discussion about the usage of languages other than java (the language) for the java virtual machine (JVM). I have been looking for a scripting language for over a year since i have quite some pains to ease.&lt;br /&gt;&lt;h4&gt;Use Cases&lt;/h4&gt;&lt;br /&gt;My main reason for the usage of a scripting language is that i want an easy way for defining (declarative) small languages.&lt;br /&gt;usually the response to that request is: why don't you use XML?&lt;br /&gt;Actually our modest sized project (100k+ LOC java) is using XML (120k+ LOX) for that. And honestly it sucks! I had enough! I can't stand it any longer!&lt;br /&gt;It hurts my eyes as well as my brain.&lt;br /&gt;XML lacks (at the moment) any decend way for breaking up huge files into components. XInclude has been finalized only last week and there will be no implementations for quite some time (yes i know about elliots XOM, but that would force me to rewrite a great chunk of our existing code base)&lt;br /&gt;XML lacks a variable concept - no really i don't want to solve that problem by using a even more complex and verbose technology (XSL).&lt;br /&gt;And finally sometimes it is necessary to have an escape route out of the declarative approach. Again XLST is no solution to that.&lt;br /&gt;So what i want is:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;A concise syntax&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Declarative look &amp; feel&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Variables&lt;/li&gt;&lt;br /&gt;&lt;li&gt;A way to modularize files&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Fallback to a procedural way of definition instead of declarative&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;Let's have a look on an example of what i want to do:&lt;br /&gt;&lt;pre class="test"&gt;&lt;code&gt;&lt;br /&gt;foo = "AFOO"&lt;br /&gt;bar = "BAR"&lt;br /&gt;&lt;br /&gt;Parent&lt;br /&gt;  child(foo)&lt;br /&gt;  child("a_new_foo")&lt;br /&gt;    grand_child(bar)&lt;br /&gt;    include("/foo/bar/module1.mod")&lt;br /&gt;  child("something different")&lt;br /&gt;  include("/bar/foo/module2.mod")&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Indention is important here as it describes parent-child relation ship. Include would mean expand the content of the file referenced right here.&lt;br /&gt;So which language would be the best (nearest in syntax and semantics)?&lt;br /&gt;&lt;h4&gt;Contenders&lt;/h4&gt;&lt;br /&gt;there were 3 contenders for a scripting language i was looking at&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;Jython&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Groovy&lt;/li&gt;&lt;br /&gt;&lt;li&gt;JRuby&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;Of course there are quite some more &lt;a href="http://flp.cs.tu-berlin.de/%7Etolk/vmlanguages.html"&gt;languages for the JVM&lt;/a&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9348462-110165414430750889?l=yozzeff.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yozzeff.blogspot.com/feeds/110165414430750889/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9348462&amp;postID=110165414430750889' title='1 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9348462/posts/default/110165414430750889'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9348462/posts/default/110165414430750889'/><link rel='alternate' type='text/html' href='http://yozzeff.blogspot.com/2004/12/choosing-scripting-language-for-jvm.html' title='Choosing a Scripting Language for the JVM (Part I)'/><author><name>yozzeff</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9348462.post-110415204667242712</id><published>2004-12-27T13:53:00.000+01:00</published><updated>2004-12-27T15:18:25.660+01:00</updated><title type='text'>Choosing a Scripting Language for the JVM (Part II)</title><content type='html'>&lt;h4&gt;Jython&lt;/h4&gt;&lt;br /&gt;Actually i wasn't realy looking for a new language because i already had one: &lt;span style="font-weight: bold;"&gt;Jython&lt;/span&gt;.&lt;br /&gt;Python and Jython are incredible fun to work with and i was enjoying hacking it every single time. But at the end of last year i had my very doubts about the future of jython. The last real relase has beed done at the end of 2001 (v2.1) and a alpha release has been done at the mid 2003 (v2.2) and then there was not very much volume on the mailing lists for the last 18 month.&lt;br /&gt;All of this seems to change at the moment as Samuele seems to be close to a beta release for a Jython 2.2 and the email volume seems to have uncreased as of late.&lt;br /&gt;But then again python lacks a features that i definitly want for my scripting language: it should lend itself rather well for the creation of small (declarative) languages. In short: P|Jython syntax is to complex for defining a concise language. This sounds sort of ridiculous as python has certainly the most concise syntax one can imagine. But the lack of a simple closure syntax or a macro mechanism makes defining languages on top of python a rather painfull exercise.&lt;br /&gt;As long as you stay purely declarative it works somehow thou its errorprone if the users of the new language do not know about python. The above example might look like this in jython:&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;foo = "AFOO"&lt;br /&gt;bar = "BAR"&lt;br /&gt;&lt;br /&gt;Parent = [&lt;br /&gt;child(foo),&lt;br /&gt;{&lt;br /&gt;  child("a_new_foo"):&lt;br /&gt;  [&lt;br /&gt;    grand_child(bar),&lt;br /&gt;    include("/foo/bar/module1.mod")&lt;br /&gt;  ]&lt;br /&gt;},&lt;br /&gt;child("something different"),&lt;br /&gt;include("/bar/foo/module2.mod")&lt;br /&gt;]&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Actually python syntax leaks to much here. To many commas, to many brackets and braces. If you dont know what a list is in python and what its syntax is you are lost. And you have no easy way to escape. What if you like to have module1.mod included only on a certain condition? &lt;br /&gt;Using the decorator syntax for Python 2.4 it gets better but not very much.&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;foo = "AFOO"&lt;br /&gt;bar = "BAR"&lt;br /&gt;child="child"&lt;br /&gt;parent="parent"&lt;br /&gt;&lt;br /&gt;@closure&lt;br /&gt;def parent():&lt;br /&gt;   @closure&lt;br /&gt;   def child(arg=foo): pass&lt;br /&gt;   @closure&lt;br /&gt;   def child(arg="a_new_foo"):&lt;br /&gt;     @closure&lt;br /&gt;     def grand_child(arg=bar): pass&lt;br /&gt;     def include(arg="/foo/bar/module1.mod"):pass&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;One could write a decorator function that executes a function directly after definition and which examines the argument declaration and builds up a tree&lt;br /&gt;representation of the multiple functions. But to be honest: this is far to much XML alike.&lt;br /&gt;&lt;h4&gt;Groovy&lt;/h4&gt;&lt;br /&gt;Groovy was very much all the hype across the first half of 2004. I fell for the hype to. Well its not all hype. Groovy has some interessting concepts to it. And to be fair. Groovy's AntBuilder and examples made the need for closures very much evident to me. And i very much like the way optional typing is planed.&lt;br /&gt;But than again Groovy has a host of really serious problems which simply forbade it to introduce it into production system:&lt;br /&gt;&lt;UL&gt;&lt;br /&gt;  &lt;LI&gt;It's creators focus|focused far to much on saving keystrokes. This very often opened hard to solve syntax errors as it is not clear if the compiler and programmer speak the same language&lt;/LI&gt;&lt;br /&gt;  &lt;LI&gt;Error reporting consists largely of java stacktraces&lt;/LI&gt;&lt;br /&gt;  &lt;LI&gt;Groovy tries to be to many things at once&lt;/LI&gt;&lt;br /&gt;  &lt;LI&gt;There was a long period where development stalled&lt;/LI&gt;&lt;br /&gt;&lt;/UL&gt;&lt;br /&gt;To be fair things seem to improve right at the moment. A lot of syntactic (and therefore semantic) problems are worked on (thou results have not been&lt;br /&gt;published entirely yet). There was a new beta a week ago and a lot of stacktrace issues seem to be solved.&lt;br /&gt;Nevertheless i remain a sceptic right now. Groovy is far to perlish for my taste and i am still not convinced that all semantic issues have been resolved.&lt;br /&gt;Maybe i am going to revisit Groovy in 6 or 12 month time from now. Meanwhile i have chosen the language i am going to use for now:&lt;br /&gt;&lt;H4&gt;JRuby&lt;/H4&gt;&lt;br /&gt;Lets explain my selection of JRuby with the example i used at the beginning&lt;br /&gt;&lt;pre class="test"&gt;&lt;code&gt;&lt;br /&gt;foo = "AFOO"&lt;br /&gt;bar = "BAR"&lt;br /&gt;&lt;br /&gt;parent do&lt;br /&gt;  child(foo)&lt;br /&gt;  child("a_new_foo") do&lt;br /&gt;    grand_child(bar)&lt;br /&gt;    include("/foo/bar/module1.mod")&lt;br /&gt;  end&lt;br /&gt;  child("something different")&lt;br /&gt;  include("/bar/foo/module2.mod")&lt;br /&gt;end&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;This is as concise as I like it (you can even replace do and end with braces) and I can easily escape to imperative style if I need to.&lt;br /&gt;&lt;pre class="test"&gt;&lt;code&gt;&lt;br /&gt;foo = "AFOO"&lt;br /&gt;bar = "BAR"&lt;br /&gt;&lt;br /&gt;parent do&lt;br /&gt;  child(foo)&lt;br /&gt;  child("a_new_foo") do&lt;br /&gt;    grand_child(bar)&lt;br /&gt;    if arg[1] == "X" then&lt;br /&gt;      include("/foo/bar/moduleZ.mod")&lt;br /&gt;    else&lt;br /&gt;      include("/foo/bar/moduleX.mod")&lt;br /&gt;    end&lt;br /&gt;  end&lt;br /&gt;  child("something different")&lt;br /&gt;  include("/bar/foo/module2.mod")&lt;br /&gt;end&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Of course JRuby has its own host of problems:&lt;br /&gt;&lt;UL&gt;&lt;br /&gt;  &lt;LI&gt;The development of jruby has stalled for over 2 years. But in march version 0.7 was released and version 0.8 is imminent any day.&lt;/LI&gt;&lt;br /&gt;  &lt;LI&gt;Two-way-integration with java is still weak. Meaning if you use JRuby by executing it from your java program there are some workarounds you have to apply. But again java-integration should be improved very much in 0.8.&lt;/LI&gt;&lt;br /&gt;  &lt;LI&gt;There's almost no documentation. I will try to improve that.&lt;/LI&gt;&lt;br /&gt;&lt;/UL&gt;&lt;br /&gt;So lets see how my decission works out.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9348462-110415204667242712?l=yozzeff.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yozzeff.blogspot.com/feeds/110415204667242712/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9348462&amp;postID=110415204667242712' title='1 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9348462/posts/default/110415204667242712'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9348462/posts/default/110415204667242712'/><link rel='alternate' type='text/html' href='http://yozzeff.blogspot.com/2004/12/choosing-scripting-language-for-jvm_27.html' title='Choosing a Scripting Language for the JVM (Part II)'/><author><name>yozzeff</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry></feed>
