If you look at it long enough, the tags disappear
I don’t know what it is about xml configuration files that simply turn me off learning a particular library or framework. For example, here is a Hibernate XML monstrosity.
I realize it all makes sense, but there is something terribly off-putting about xml. To me it’s a sign that the host language is not sufficiently dynamic or declarative, and here we are going back to a verbose format so that the framework can parse it using readily available libraries. It also makes one yearn for a lispy language, where configuration and implementation code looks entirely similar.
All this language snobbery may be well and good, but it doesn’t help to improve one’s familiarity with an important framework.
This brings me back to the original comment about how to read Lisp code. If you stare at it long enough, the braces simply disappears.
span.fade {color:#ccc;}
This is exactly what I had to do to learn new XML configuration file formats. Stare at XML long enough, and the tags simply disappear.
If you are willing to persist with the equivalent of staplers in your cereal bowl, here is what xml looks like to you after a couple of months:
<hibernate-configuration>
<session-factory>
<!-- SQL dialect -->
<property name="dialect">org.hibernate.dialect.HSQLDialect</property>
<!-- Database connection settings -->
<property name="connection.driver_class">org.hsqldb.jdbcDriver</property>
<property name="connection.url">jdbc:hsqldb:data/music</property>
<property name="connection.username">sa</property>
<property name="connection.password"></property>
<property name="connection.shutdown">true</property>
<!-- JDBC connection pool (use the built-in one) -->
<property name="connection.pool_size">1</property>
<!-- Enable Hibernate's automatic session context management -->
<property name="current_session_context_class">thread</property>
<!-- Disable the second-level cache -->
<property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>
<!-- disable batching so HSQLDB will propagate errors correctly. -->
<property name="jdbc.batch_size">0</property>
<!-- Echo all executed SQL to stdout -->
<property name="show_sql">true</property>
<!-- List all the mapping documents we're using -->
<mapping resource="com/oreilly/hh/data/Track.hbm.xml"/>
</session-factory>
</hibernate-configuration>
What’s your way to cope with xml? Any tips?
About this entry
You’re currently reading “ If you look at it long enough, the tags disappear ,” an entry on Chui's Counterpoint
- Published:
- 8.22.09 / 10pm
- Category:
- lisp, Thinking IT
6 Comments
Jump to comment form | comments rss [?] | trackback uri [?]