<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.razie.com/~d/styles/itemcontent.css"?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-20018300</atom:id><lastBuildDate>Wed, 18 Aug 2010 16:20:52 +0000</lastBuildDate><title>RazBlog</title><description>Razie's ramblings...</description><link>http://blog.razie.com/</link><managingEditor>noreply@blogger.com (Razie)</managingEditor><generator>Blogger</generator><openSearch:totalResults>23</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.razie.com/Razblog" /><feedburner:info uri="razblog" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item><guid isPermaLink="false">tag:blogger.com,1999:blog-20018300.post-5811364783260677803</guid><pubDate>Wed, 18 Aug 2010 16:14:00 +0000</pubDate><atom:updated>2010-08-18T12:20:52.400-04:00</atom:updated><title>The Book Of JOSH</title><description>&lt;span class="Apple-style-span"   style="  color: rgb(102, 102, 102); font-family:Verdana, Arial, Helvetica, sans-serif;font-size:11px;"&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;[Razie's note] I recently realized that I'm also shifting my mental models trending back to simplicity, so I wanted to re-read this blog...but could only find a copy of it - the original had disappeared. I enjoyed it a lot and figured the more copies the better, so I shamelessly copied the copy below. Enjoy!&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;hr /&gt;&lt;div class="entry-main"&gt;&lt;div class="entry-date"&gt;&lt;/div&gt;&lt;div class="entry-date"&gt;&lt;/div&gt;&lt;div class="entry-date"&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;For reasons unknown, this article has been removed from the author’s blog, but Google Reader remembered it for me! I have not been able to find the author’s contact information.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;All credits to &lt;/span&gt;&lt;a href="http://thegreylensmansview.blogspot.com/" style="text-decoration: none; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; "&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;The Grey Lens Man&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;!&lt;/span&gt;&lt;/p&gt;&lt;hr /&gt;&lt;div class="entry-main"&gt;&lt;div class="entry-date"&gt;&lt;/div&gt;&lt;div class="entry-date"&gt;&lt;/div&gt;&lt;div class="entry-date"&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;Mar 23, 2009 1:47 PM&lt;/span&gt;&lt;/div&gt;&lt;h2 class="entry-title" style="font-size: 16px; font-weight: 700; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;&lt;a class="entry-title-link" href="http://thegreylensmansview.blogspot.com/2009/02/book-of-josh.html" target="_blank" style="text-decoration: none; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; "&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;The Book Of JOSH&lt;br /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt;&lt;div class="entry-author"&gt;&lt;span class="entry-source-title-parent"&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;from &lt;/span&gt;&lt;a class="entry-source-title" href="http://thegreylensmansview.blogspot.com/" target="_blank" style="text-decoration: none; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; "&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;The Grey Lens Man’s View&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt; &lt;/span&gt;&lt;span class="entry-author-parent"&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;by &lt;/span&gt;&lt;span class="entry-author-name"&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;The Grey Lens Man&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="entry-body"&gt;&lt;div&gt;&lt;div class="item-body"&gt;&lt;div&gt;&lt;span style="font-weight: bold; "&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;Scala In The Enterprise&lt;br /&gt;&lt;span style="font-weight: bold; "&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;Recently, we’ve decided to use Scala as part of an enterprise software solution stack. And I’d like to mention a few things on &lt;/span&gt;&lt;span style="font-style: italic; "&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;how the hell that was allowed to happen.&lt;/span&gt;&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;But first lets take a stroll and talk about a thing called enterprise IT.&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold; "&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;&lt;br /&gt;The Problem&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;You see, I have a small problem – 3 million lines of RPG and COBOL, 5,500 logical and physical files on a few AS400s that are not exactly cheap. Even better through the years, the system has been cloned and forked so several incompatible versions of exist through out the world.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;A few years ago I spent 3 months focused on the “original” implementation in a architectural reverse engineering exercise. The result, I know roughly the raison d’etre for 10% or ~ 300K SLOC of code and a few hundred files. 90% of that self-contained universe of code and tables is my personal dark matter question, I know its out there, just no clue as to its nature.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;I won’t go into excruciating detail, but let me leave it like this; within that 2.5 T of data there resides a special flag in the customer file, which determines the fundamental nature of how a customer interacts with the system, and it can be found in Filler3, third byte from the left. In one file, the Account ID column sometimes actually does contain the Account number but not alway, sometimes its something else and its torched us. And you’ll never guess what that ZipLoc3 column_really_ contains (hint: nothing like a zipcode).&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;Yet this system is responsible for several billion in revenue. If the mainframe goes off line a few pagers chirp, but if that system goes off line, it’s klaxons and battle stations.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;Universal agreement, its got to go. It has been end-of-life scheduled more often then a serial killer on death row. IT leadership comes and goes, yet, a full decade later it sits there in the data center laughing at me like an evil essence hosting Steven King basement furnace.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;Within the last year of so, it’s reached such a state of chaotic entropy, its decay is not only apparent to IT, but now the business, and worse the customer as well.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-weight: bold; "&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;What Can Be Done?&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;No one wants to keep it on life support, so doubling down the head count to reverse entropy, or putting some sort of SOA lipstick on this pig is something we’d like to avoid. The problems are fundamental and systemic.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;Being customer facing, it’s where all of the businesses most “brilliant” ideas tend to accumulate through the years. Lets just say they’ve been very creative. Nuff said.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;We threw a check at it and a consulting team tried for 18 months to move onto an ERP solution and barely made a dent, though I do believe the team purchased their own private Caribbean Island from the billing fees. It just won’t map to a COTS or ERP package without a struggle and anything less the monetary cost of a government TARP program.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;On and off over the years, my boss, out of left field, using the &lt;/span&gt;&lt;em&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;pluralis maiestatis&lt;/span&gt;&lt;/em&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt; would say “we should rewrite it all from scratch.” Having been broken like John McCain on a few Death Marches I’d look at him repeating “the horror… the horror.”&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;Then during one of my annual hypomanic phases I’d wake up and just know that if put back together ol’ jelled team from that project back in ‘01, well we could rewrite that sucker in no time. That COCOMO II model, most assuredly &lt;/span&gt;&lt;span style="font-style: italic; "&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;did not&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt; apply to us. My boss, with a look of concern, would nod sagely and suggest I think about it a bit more. I’d recover my senses in a day or two.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;And so it sits in the data center, spewing heat and laughing. And it is evil.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-weight: bold; "&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;All This Sturm und Drang&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold; "&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;&lt;br /&gt;As a company we know how to do it by the book as we are several years into an ERP implementation. We have standards documents on how we develop standards, requirements/design/functional templates, change control, copious meetings, PMs, PMO office, analysts, and even a few software developers to actually implement things.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;We make RUP look like monkeys with a football, Dilbert but a pale shadow irony of our realism, and Forrestor articles look like descriptions of primitive tribal organization. We have PROCESS.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;In addition, we have been a full blown java company for in-house application for years. We got it in spades, Struts, Spring, Hibernate, J2EE, ADF, TOPLINK, Ant, Maven, Eclipse, Rational, …&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;We drink Kool-Aid by the 55 gallon drum round here.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-weight: bold; "&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;Java&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold; "&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;&lt;br /&gt;A number of years ago with the support of a key IT executive, I led a jelled, vertical team which brought Java into the company hard and fast. It was seismic.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;There was no end of debate, questions, consternation and gnashing of teeth throughout IT and beyond, which we totally ignored. We didn’t know we were supposed to form a technology introduction committee to shepherd this through the IT Leadership Committee approval process. We damn sure didn’t seek forgiveness after the fact, much less permission before the act.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;A wild ride, in a more wild time, this was pre-PROCESS. Small team, modest budget, mega-hours, fun times and a result that the business loved. It gave us the #1 ranking in our industry and we held it for a number of years.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;I’m reasonably proficient in and knowledgeable of the Java Universe.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;Lets, just say it, Java, by design, is a pretty simplistic language, I would argue even a crippled language for uses other then its original design point, which was certainly not server side enterprise IT. As a result, the cottage industries around Java are practically their own Industrial Sectors.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;Java is the Brier Rabbit of IT. Once touched you can’t let go. Its simplistic enough to be inadequate in almost every situation. The commercial world just loves this aspect of Java as they exploit revenue streams from filling these gaps via endless Frameworks, Patterns, APIs, Annotations, IDEs and Toolsets.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;The dirty secret of course is 25 – 50% of all of it is pure overhead, without direct value, but necessary to overcome the inherent limitations of Java.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;On the other hand, the upside of Java for enterprise IT is pretty obvious. Any problem you might have can be solved with money and armies of plug and play bodies and you get mountains of buzz material for those presentations.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;But honestly, is this anyway to deliver the IT solutions your company needs?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-weight: bold;  font-size:14px;"&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;Full Circle&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;Where were we …. Yes, you see, I have a small problem.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;So whats the issue, you say? I write a whole blog about nothing, you say? We all know the right answer, you’re pointing out? Yea, I know, its intuitively obvious to the casual observer.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;We’ll rewrite it from scratch.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;Course we’ll need a cluster of WebSphere Application Servers, and an Oracle RAC cluster for all that data. Don’t forget the middleware needed to transition over from the legacy systems, so toss in an ESB cluster, and what heck a couple of BPEL servers too.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;Need a SOA Center of Excellence of course too. Can’t integrate without some common XML Business Object Schemas. Also need to roll the Rational RUP suite and some beefy IDE environments and for that shiny look, sprinkle the works with lots of WS-* sparkly dust. Bake 3-5 years or until done, whenever.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;My presentation slides for all this will be killer. I can sell this stuff. I’m good at it. I’ll look like a bloody genius. I’ll have Vendors fawning all over me. And the best part is the bubble on this mess won’t pop for YEARS, when I’ll have plenty of plausible deniability. “Hey the plan was perfect, the business, IT managers and their people were incapable of executing it.”&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;I feel like the enterprise IT equivalent of an AIG trader pocketing ill gotten gains from writing Credit Default Swaps that we can’t pay off.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:14px;"&gt;&lt;span style="font-weight: bold; "&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;Losing My Religion&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;&lt;br /&gt;I’ve lost my faith in it all. I need a new religion.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;I don’t want monolithic 10 ton solutions I need to wrestle into place with a small armies. I don’t want clusters of application servers fronting a behemoth RAC data cluster. I don’t want web management consoles which rival the Space Shuttle’s dash board.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;I want a simple yet effective structural system where I can select and compose reusable modular solutions into simple, targeted solutions. The solution size should be isomorphic to the problem size. It leverages what it needs to solve the problem and no more.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;I don’t want 100K source lines of code, with 33K lines of fluff and stuff. Where one of every in three lines of code has nothing to do with the business logic. Where you can’t even find the business logic in the mounds of patterns, abstractions, frameworks, annotation, cut points and verbosity.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;I want the problem domain reflected in the code and the code to capture the essence of the problem domain.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;I don’t want massive XML documents constrained by committee designed XSD Schema BODs shuttling around clusters of ESB and BPEL middleware.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;I want dirt simple intra system communication in the data center.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-weight: bold; "&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;The Book Of JOSH&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;Through a marvelous, even devious, set of circumstances, I’m presented with the opportunity to address my little problem without proscribed constraints, a true green field opportunity.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:14px;"&gt;&lt;span style="font-weight: bold; "&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;J&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;son &lt;/span&gt;&lt;span style="font-size:14px;"&gt;&lt;span style="font-weight: bold; "&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;O&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;SGi &lt;/span&gt;&lt;span style="font-size:14px;"&gt;&lt;span style="font-weight: bold; "&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;S&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;cala &lt;/span&gt;&lt;span style="font-size:14px;"&gt;&lt;span style="font-weight: bold; "&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;H&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;TTP&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-weight: bold; "&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;Json&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt; delivers on what XML promised. Simple to understand, effective data markup accessible and usable by human and computer alike. Serialization/Deserialization is on par with or faster then XML, Thrift and Protocol Buffers. Sure I’m losing XSD Schema type checking, SOAP and WS-* standardization. I’m taking that trade.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-weight: bold; "&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;OSGi&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt; a standardized dynamic, modular framework for versioned components and services. Pick a logger component, a HTTP server component, a ??? component, add your own internal components and you have a dedicated application solution. Micro deployment with true replacement. What am I giving up? The monolithic J2EE application servlet loaded with 25 frameworks, SCA and XML configuration hell. Taking the trade.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-weight: bold; "&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;HTTP&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt; is simple, effective, fast enough, and widely supported. I’m tired of needlessly complex and endless proprietary protocols to move simple data from A to B with all the accompanying firewall port insanity. Yes, HTTP is not perfect. But I’m taking this trade where I can as well.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;All interfaces will be simple REST inspired APIs based on HTTP+JSON. This is an immediate consequence of the JOSH stack.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-weight: bold; "&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;Scala&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt; is by far the toughest, yet the easiest selection in the JOSH stack. I wrestled far more with the JSON or XML or Thrift or Protocol Buffers decision.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;Without hesitation I know Scala is the right choice from a pure solutioning aspect. But lets face it, what a tough, tough sell from the propeller headed guys to the pointy headed guys.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;First, I’m a bit of a computer language aficionado. I’ve written multiple, actual programs in SML, Scheme, Haskell which I’ve used within the enterprise. Why? Because when faced with certain “one time” problems I can knock out a simple utility far faster XXX then in Java. But in almost all cases these were throw away utilities for one time situations.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;I’ve toyed with Dylan, Ruby, Python, Groovy, Lisp, Ocaml, Modula 2, Oberon, …&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;To date I’ve only advocated and pushed Python for utility scripting at both the Application and System Administration levels. Never, at any time did it ever even cross my mind to advocate anything other then Java and a bit of Python for enterprise application development until now.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;Java has been stretched way beyond its modest design point. Its literally falling apart from bloat.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;Joshua Boch has numerous presentations of the current state of affairs with Java and the proposed functional extensions and closures are headed. He quotes the following from the Java community.&lt;/span&gt;&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;“I am completely and totally humbled. Laid low. I realize now that I am simply not smart at all. I made the mistake of thinking that I could understand generics. I simply cannot. I just can’t. This is really depressing. It is the first time that I’ve ever not been able to understand something related to computers, in any domain, anywhere, period.”&lt;/span&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;p&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;“I’m the lead architect here, have a PhD in physics, and have been working daily in Java for 10 years and know it pretty well. The other guy is a very senior enterprise developer (wrote an email system that sends 600 million emails/year with almost no maintenance). If we can’t get [generics], it’s highly unlikely that the ‘average’ developer will ever in our lifetimes be able to figure this stuff out.”&lt;/span&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;That’s just generics. And if you seen the proposed syntax for closures, well its readily apparent, Java’s elastic modulus has been exceeded. A crippled language has been fast marched evolved into a broken language.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;Plenty of blame for all here. In the last 50 years academia and commercial entities have given us boutique languages, COBOL, C++ and Java.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-weight: bold; "&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;A Proper Programming Language For Business Development&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;It’s the age of the Jetson’s, and a decent programming language for enterprise business applications doesn’t exist.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;So lets design one.&lt;/span&gt;&lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;Simple, clean and full featured.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;Ready of concurrency, distributed applications on mult-core commodity boxes.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;Allow for the explicit control of state and state mutation.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;Support for modularity, and scaling in the large.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;Multiparadigm to support mapping the commonality and variability of the domain problem to the code.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;Capable of supporting Application Oriented Language / Domain Specific Language development (AOL/DSL).&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;Cross platform, with a large supporting tool suite universe.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;Open and not subject to Vendor locking.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;Fast&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;OO&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;Functional&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;Conceptual Integrity.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;Allow control of, if not out right banishment of the null pointer.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;Rich libraries.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;Strongly Typed&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;Practical and Pragmatic&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;Accessible to the average developer, empowering to your A players.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;Runs on a portable VM.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;Leverage existing extensive Java libraries.&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;This is Scala.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:14px;"&gt;&lt;span style="font-weight: bold; "&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;So How Is It Going&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;Fast forward… Currently a very small team and myself are near completion of the first major functional component on the JOSH stack.&lt;br /&gt;&lt;br /&gt;All of the development talent on the team are experienced Java developers. And they have been effective from Day 1.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;No real discussions of covariance and contravariance was required. We did discuss HOF, anonymous lamba, closures, cut syntax, maps, folds, reduces. And strangely their heads did not explode. We did discuss the evil of mutable state, and referentially transparent functions.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;They were enthralled.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;No detailed lectures on the deep underlying structure of Catamorphism, Anamorphism, Apomorphism, Hylomorphism and Paramorphism was required to get solid code at a cleaner and higher level, with less bloat then equivalent Java.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;A core aspect of system is combinator based threading state through a composed computation. No problems in understanding were observed.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;In fact in terms of difficulty, they struggled somewhat more with Git then they did with Scala, Linux then they did with Scala, IDEs issues then they did with Scala, and Maven then they did with Scala.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;At a minimum they wrote better Java idomatic code in Scala then they did in Java and proactively adopted more idiomatic Scala as time went by.&lt;br /&gt;&lt;br /&gt;Visual Basic now has lambda and no one expects a VB developer to throw himself off a building. Yet somehow, these days too many think Java developers can’t handle more advanced functionality.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;I’ve seen too much of “I just did this fold thingy and my co-workers could _never_ understand that” is a bit overblown. OK, if they have never seen it before, they might not get it in 10 mins. But working with the team on the basics for 10 hours or 10 days will certainly do it.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;But bottom line, enterprise Java developers can transition to Scala. I know this, because I’ve directly observed it.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:14px;"&gt;&lt;span style="font-weight: bold; "&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;JOSH has no Data&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;The JOSH stack is lacking a letter, because a solution for persisted data is missing in the stack.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;A great deal of what needs to be done does not require a ACID RDB cluster. Some of it does and I’m kicking that can down the road.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class="Apple-style-span"  style="color:#CCCCCC;"&gt;For the rest, either the data is ReadOnly and loaded a 1-3 times a day or is best persisted by a distributed Key-Value storage system. A number of these are now available as open source solutions and at the right moment I’ll need to pick one and add that letter to the JOSH stack.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/20018300-5811364783260677803?l=blog.razie.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Razblog/~4/PFEm-vCtcEg" height="1" width="1"/&gt;</description><link>http://feeds.razie.com/~r/Razblog/~3/PFEm-vCtcEg/book-of-josh.html</link><author>noreply@blogger.com (Razie)</author><feedburner:origLink>http://blog.razie.com/2010/08/book-of-josh.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-20018300.post-4036770707375775730</guid><pubDate>Mon, 09 Aug 2010 15:30:00 +0000</pubDate><atom:updated>2010-08-09T11:41:35.439-04:00</atom:updated><title>Google wave is dead</title><description>...yeah, the "king of the interactive communication is dead, long live the king".&lt;br /&gt;&lt;br /&gt;While enthusiastic in the beginning, I must say that we didn't used it as much as we thought we'd be. The technology behind it however is awesome, but I must agree, the implementation wasn’t the greatest. It should be embedded in google docs and integrated with email and IM. I think I already saw some of that in google docs recently…&lt;br /&gt;&lt;br /&gt;For instance click on an email thread and "turn to wave". Or the same in IM, think of it as "persisting the thread".&lt;br /&gt;&lt;br /&gt;In google docs, the use of this is obvious: it's turning any doc into a version controled repository, real time wiki with embedded forum etc...yeah, makes sense. Every software MUST now have this: every wiki, every forum, every Word application...they simply &lt;span style="font-weight:bold;"&gt;must&lt;/span&gt;! Getting this question in a flashing status bar of your favorite Word app "Do you accept interactive edit of this document, from John@somegeeks.com?". Hell, yeah...&lt;br /&gt;&lt;br /&gt;The "playback" feature was underutilized.&lt;br /&gt;&lt;br /&gt;May be surprising, but I used it mostly as an internet pad to copy/paste quotes, ideas, links and later develop them. Also to copy/paste things between laptops/computers, save them for later etc. &lt;br /&gt;&lt;br /&gt;An "internet research pad", where you could invite others etc...that I still think it's worthy of its own site.&lt;br /&gt;&lt;br /&gt;I will, spare time existing, look at integrating this with my script pad: &lt;a href="http://scripster.razie.com/play/session"&gt;http://scripster.razie.com/play/session&lt;/a&gt; - That would be bespinningly interesting.&lt;br /&gt;&lt;br /&gt;As always, don't hold your breath.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/20018300-4036770707375775730?l=blog.razie.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Razblog/~4/KZsC5VE2WMY" height="1" width="1"/&gt;</description><link>http://feeds.razie.com/~r/Razblog/~3/KZsC5VE2WMY/google-wave-is-dead.html</link><author>noreply@blogger.com (Razie)</author><feedburner:origLink>http://blog.razie.com/2010/08/google-wave-is-dead.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-20018300.post-2459727419160825684</guid><pubDate>Tue, 15 Jun 2010 15:42:00 +0000</pubDate><atom:updated>2010-06-15T12:12:51.893-04:00</atom:updated><title>Bitching about American Express</title><description>So, my Amex card is a little ripped and I call them to send a replacement. They said they'll change the last 4 digits of the card so now I have to update all my online and pre-authorized stuff, banking etc.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I explain that my card is not lost and that's a lot of work. They explain that I may cancel my account instead if I wish. I almost did that...but realized I was pissed and just backed down - I guess keeping a long-standing account is a positive for my credit history.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Anyways. I am updating all my pre-authorized and online stuff to use my MasterCard and I will simply park the new card, when it arrives, somewhere in the library.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Just like that, Amex lost a few hundred/thousand dollars in revenue and all of a sudden I feel good about it. I promise I won't use it anymore...I'll now carry a MasterCard and a Visa instead.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The morons should realize that I don't care about what they want...but, if they want my moneys, they should really care about what I want!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Anyways, bitching accomplished. Feel better.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Cheers&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;P.S. Their website does not have either an email option or an online form for complaints...nothing online. All they have is phone numbers (but I just hanged up) and snail mail addresses. Oh well - serves them well...they got a blog instead and "lost" a customer.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;P.S. Already switched a few monthly recurring payments and online processors to my MC. This is almost fun now.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/20018300-2459727419160825684?l=blog.razie.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Razblog/~4/uzp01k5ARKk" height="1" width="1"/&gt;</description><link>http://feeds.razie.com/~r/Razblog/~3/uzp01k5ARKk/bitching-about-american-express.html</link><author>noreply@blogger.com (Razie)</author><feedburner:origLink>http://blog.razie.com/2010/06/bitching-about-american-express.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-20018300.post-7276734972175648212</guid><pubDate>Sun, 14 Mar 2010 03:04:00 +0000</pubDate><atom:updated>2010-05-07T13:05:01.728-04:00</atom:updated><title>Blogger is stupid</title><description>Trying to edit a blog (&lt;a href="http://blog.homecloud.ca/2010/03/option-monad-pattern-thing.html"&gt;this one&lt;/a&gt;) I've had it: this editor right here is one of the worst I've used in a long time. It's still close to impossible to quote nice code snippets and the html it generates is riddled with DIV tags worse than a word document.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I guess this is the fate of things. The bad ones become good enough and the good get worse.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Shame. I shall investigate options to blogger, since the best voting is done with the feet...or, in this case, with the...fingertips...?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I shall create my own nice code quoting system, based on the &lt;a href="http://scripster.razie.com/"&gt;scripster&lt;/a&gt; I just put together. I should probably thank them for the idea...&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;[EDIT] The code quoting is up and running - just need to work on embedding the quotes now. Try it at &lt;a href="http://www.codewitter.com"&gt;www.codewitter.com&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/20018300-7276734972175648212?l=blog.razie.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Razblog/~4/25j9VCckRb4" height="1" width="1"/&gt;</description><link>http://feeds.razie.com/~r/Razblog/~3/25j9VCckRb4/blogger-is-stupid.html</link><author>noreply@blogger.com (Razie)</author><feedburner:origLink>http://blog.razie.com/2010/03/blogger-is-stupid.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-20018300.post-1307161256424076347</guid><pubDate>Fri, 26 Feb 2010 16:17:00 +0000</pubDate><atom:updated>2010-08-06T13:22:22.053-04:00</atom:updated><title>Implementing a state machine in scala DSL</title><description>I had a bit of fun in the past few days writing a telnet server implementation in #scala. Part of that was implementing a state machine, which I then cleaned up so the definitions are simple.&lt;br /&gt;&lt;br /&gt;Here's a sample state machine:&lt;br /&gt;&lt;br /&gt;&lt;script src='http://pastie.org/1079763.js'&gt;&lt;/script&gt;&lt;br /&gt;&lt;br /&gt;The code is at &lt;a href="http://code.google.com/p/razie/source/browse/trunk/razie/src/razie/SM.scala"&gt;http://code.google.com/p/razie/source/browse/trunk/razie/src/razie/SM.scala&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The basic structure is:&lt;br /&gt;&lt;pre&gt; (state, event-matcher) -&gt; newstate + callback ++ unitcalback... + callback :: Nil&lt;/pre&gt;The event-matcher can be:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;an event&lt;/li&gt;&lt;li&gt;a sequence of events&lt;/li&gt;&lt;li&gt;a function taking an event and returning...Boolean, of course&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;The callback is a function with either of these signatures:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;def push (sm:StateMachine, t:Transition, e:Event) - use + for these&lt;br /&gt;&lt;/li&gt;&lt;li&gt;def reset : Unit - use ++ for these (hey, I'm still getting my head around advanced scala stuff)&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Enjoy, and if you likee, contribute, eh?&lt;br /&gt;&lt;br /&gt;Here's the definition (in-work) of the high-level telnet state machine, a little more complicated but not much.&lt;br /&gt;&lt;br /&gt;The picture (thanks to &lt;a href="http://tomi.vanek.sk/index.php?page=telnet"&gt;http://tomi.vanek.sk/index.php?page=telnet&lt;/a&gt;):&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://tomi.vanek.sk/static/telnet/Telnet%20Parser.png"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; cursor: pointer; width: 479px; height: 504px;" src="http://tomi.vanek.sk/static/telnet/Telnet%20Parser.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The state machine (when it's ready I'll post the link to the entire code):&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;// based on diagram at http://tomi.vanek.sk/index.php?page=telnet&lt;br /&gt;&lt;br /&gt;implicit val sm = this&lt;br /&gt;&lt;br /&gt;val sstates @ (data, cmd, app, param, neg, subneg) = ("data", "cmd", "app", "param", "neg", "subneg")&lt;br /&gt;override def start = state("data")&lt;br /&gt;&lt;br /&gt;override val transitions : Seq[Transition] =&lt;br /&gt;     (data, IAC)             -&gt; cmd ::&lt;br /&gt;     (data, 0)               -&gt; data :: // NOP - don't know why i get these after CR&lt;br /&gt;     (data, 10)              -&gt; data :: // NOP - LF ignored?&lt;br /&gt;     (data, 13)              -&gt; data + eatLine + echo ("") :: // CR&lt;br /&gt;     (data, {_:Event=&gt;true}) -&gt; data + eatChar + echo ("") :: // remaining chars&lt;br /&gt;     (cmd, IAC)              -&gt; data ::&lt;br /&gt;     (cmd, Seq(WILL, WONT, DO, DONT)) -&gt; neg + push ::&lt;br /&gt;     // TODO 3-2 should negociate stuff, i.e. reply with will/won't&lt;br /&gt;     (neg, {_:Event=&gt;last==SM(DO)})   -&gt; data + mode(true) + pop ::&lt;br /&gt;     (neg, {_:Event=&gt;last==SM(DONT)}) -&gt; data + mode(false) + pop ::&lt;br /&gt;     (neg, AnyEvent) -&gt; data + echo("interesting sequence...") + pop ::  // What is this?&lt;br /&gt;     (cmd, SB) -&gt; subneg ::&lt;br /&gt;     (""".*""".r, CR) -&gt; data :: // it's important to reset the thing on ENTRE&lt;br /&gt;      Nil&lt;br /&gt;&lt;br /&gt;def eatChar (sm:StateMachine, t:Transition, e:Event)&lt;br /&gt;def eatLine (sm:StateMachine, t:Transition, e:Event)&lt;br /&gt;&lt;/pre&gt;Enjoy and, more importantly, have fun!&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If you'd like to read more of my rants about scala, see &lt;a href="http://wiki.homecloud.ca/thinking-in-scala"&gt;http://wiki.homecloud.ca/thinking-in-scala&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/20018300-1307161256424076347?l=blog.razie.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Razblog/~4/toUE2aBmVNQ" height="1" width="1"/&gt;</description><link>http://feeds.razie.com/~r/Razblog/~3/toUE2aBmVNQ/implementing-state-machine-in-scala-dsl.html</link><author>noreply@blogger.com (Razie)</author><feedburner:origLink>http://blog.razie.com/2010/02/implementing-state-machine-in-scala-dsl.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-20018300.post-8550380359595565107</guid><pubDate>Wed, 20 Jan 2010 17:48:00 +0000</pubDate><atom:updated>2010-01-20T12:54:43.224-05:00</atom:updated><title>Start dowloading torrents remotely</title><description>Say you're at work and you stumble onto a torrent you'd like to watch tonite (some documentary or the latest episode from &lt;a href="http://www.cbc.ca/nextprimeminister/blog/2008/03/download_canadas_next_great_pr.html"&gt;http://www.cbc.ca/nextprimeminister/blog/2008/03/download_canadas_next_great_pr.html&lt;/a&gt;). &lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Well, here's one way to do it...&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;1. Run uTorrent at home, 24/7, even if it's not downloading anything. Configure it to automatically load torrents from a folder say "torrentstodo". This is in Preferences/Directories at the bottom.&lt;/div&gt;&lt;div&gt;2. Install LiveMesh both at home and at work&lt;/div&gt;&lt;div&gt;3. map this folder as shared on both computers: right click and say "share with LiveMesh" at home and at work just right click the "LiveMesh Folders" in explorer.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Then, when you like a torrent, save it to the local "torrentstodo" folder at work. LiveMesh will transfer it at home automatically. Then uTorrent will pick it up and start downloading it.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Please don't steal copyrighted material when it's easily available (online) at a reasonable price :)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/20018300-8550380359595565107?l=blog.razie.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Razblog/~4/mb8aSMRWN9E" height="1" width="1"/&gt;</description><link>http://feeds.razie.com/~r/Razblog/~3/mb8aSMRWN9E/start-dowloading-torrents-remotely.html</link><author>noreply@blogger.com (Razie)</author><feedburner:origLink>http://blog.razie.com/2010/01/start-dowloading-torrents-remotely.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-20018300.post-4030714006765749396</guid><pubDate>Fri, 11 Dec 2009 22:01:00 +0000</pubDate><atom:updated>2009-12-11T17:08:45.207-05:00</atom:updated><title>I'm a Code Manager</title><description>Product Manager, Project Manager, HR - i.e. People Manager, Technical Account Manager, Development Manager, Build Manager....and developers. Some develop and the rest manage stuff.&lt;br /&gt;&lt;br /&gt;WRONG!&lt;br /&gt;&lt;br /&gt;You know what? I want to be called by my new title: Code Manager. Everyone manages something and I manage code.&lt;br /&gt;&lt;br /&gt;THERE!&lt;br /&gt;&lt;br /&gt;I guess I missed the many architects, we can call them Code Benders - hey, I actually like that!&lt;br /&gt;&lt;br /&gt;Happy coding!&lt;br /&gt;&lt;br /&gt;P.S. I think I left out the Resource Manager - as in some companies, people are known as "resources". So in a project, the Project Mananger can choose 3 resources: a cofee machine, a printer and a developer. WRONG. I'm a Code Manager, not a resource, so please...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/20018300-4030714006765749396?l=blog.razie.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Razblog/~4/IHhQA9PDJpo" height="1" width="1"/&gt;</description><link>http://feeds.razie.com/~r/Razblog/~3/IHhQA9PDJpo/im-code-manager.html</link><author>noreply@blogger.com (Razie)</author><feedburner:origLink>http://blog.razie.com/2009/12/im-code-manager.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-20018300.post-1087119816086677689</guid><pubDate>Thu, 24 Sep 2009 15:35:00 +0000</pubDate><atom:updated>2009-09-24T11:54:05.809-04:00</atom:updated><title>My Nokia 770</title><description>I love my Nokia 770 and it's much more useful than the iPod - I must say...Since I was bashing all device manufacturers other than Apple, I must exclude Nokia from the list...&lt;br /&gt;&lt;br /&gt;Having the courage to come up with a Linux-based Internet tablet, when they did, puts them squarely in front of Apple...&lt;br /&gt;&lt;br /&gt;The thing is that I use them both (iPod Touch and the 770) as remotes to &lt;a href="http://wiki.homecloud.ca/WatchMovie"&gt;control movie playing at home&lt;/a&gt; and the Nokia is better equiped to be the remote. It is a little bulkier and sluggish to reconnect the WiFi, but the web browsing experience is much better, for the simple pages my application requires (larger screen helps, but the ergonomics of full-page and persistent zoom are what make it the better one).&lt;br /&gt;&lt;br /&gt;Fully customisable home screen and a host of applications out-of-the-box actually make it the winner...just to think that I've had it for a few years now and it cost half what the iPod did...why is this new iPod touch so backwards? Target market? Well, I guess simplicity does have its benefits...it is a &lt;span style="font-style: italic;"&gt;portable&lt;/span&gt; music player first of all!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/20018300-1087119816086677689?l=blog.razie.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Razblog/~4/fNObEyatngs" height="1" width="1"/&gt;</description><link>http://feeds.razie.com/~r/Razblog/~3/fNObEyatngs/my-nokia-770.html</link><author>noreply@blogger.com (Razie)</author><feedburner:origLink>http://blog.razie.com/2009/09/my-nokia-770.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-20018300.post-8661873191875399330</guid><pubDate>Mon, 21 Sep 2009 16:08:00 +0000</pubDate><atom:updated>2009-09-21T12:32:44.586-04:00</atom:updated><title>iPods suck nicely</title><description>Just gave in and got the new iPod Touch (32G) this weekend. Let's see...&lt;br /&gt;&lt;br /&gt;Couldn't even take it out of the box - I was afraid to break it - I went back and asked a "Mac Helper" for help and he explained how to take it out - apparently Apple just won the abnormal packaging contest!&lt;br /&gt;&lt;br /&gt;Walked again out of the store only to come back: when turned on, the thing only displays an image suggesting plugging its USB into iTunes. I had to go back and explained that I just paid 400$ for a toy that doesn't work...they finally convinced me to just refrain from returning it and wait until I got home to plug it in and see what's what.&lt;br /&gt;&lt;br /&gt;Well - finally got home and started playing with it. It does grow on you and you start to wonder how come every OTHER device manufacturer out there seems to be sooo stupid. They do deserve the market share they're left with!&lt;br /&gt;&lt;br /&gt;But then you start to notice the noticeables:&lt;br /&gt;- the only dark screen is the home screen...most others are the same stupid black on white as your microsoft outlook...and there's no obvious way to change the "skin".&lt;br /&gt;- the browser, while smart, is also stupid. I.e. the "zoom", while nicely done with the pinching manouver, is not remembered when you click on the next page&lt;br /&gt;- the home screen doesn't go wide when you turn the thing...non-sensical since when you can go back and forth between "wide" apps, you pass through the home screen and have to turn the thing again...&lt;br /&gt;&lt;br /&gt;Overall, they can get away with all these, just because the thing is so nice in many other ways...but it goes to prove the limits of every day life - nobody's perfect.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/20018300-8661873191875399330?l=blog.razie.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Razblog/~4/WTqYQSzA9XA" height="1" width="1"/&gt;</description><link>http://feeds.razie.com/~r/Razblog/~3/WTqYQSzA9XA/ipods-suck-nicely.html</link><author>noreply@blogger.com (Razie)</author><feedburner:origLink>http://blog.razie.com/2009/09/ipods-suck-nicely.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-20018300.post-5645985736880659758</guid><pubDate>Thu, 17 Sep 2009 03:50:00 +0000</pubDate><atom:updated>2010-01-22T12:48:03.049-05:00</atom:updated><title>converting Java collections to scala collections</title><description>This took me many hours to figure out. I didn't find a word about it in the (quite a bit of) stuff I read, including the "Programming in Scala" book, blogs, posts etc.&lt;br /&gt;&lt;br /&gt;How to best convert java collections into scala collections and back. This is crucial, as lots of would-be scalaistas would still carry around some kind of Java library, be it JNDI or JTA or some in-house non-rewritables!&lt;br /&gt;&lt;br /&gt;As of scala 2.7, scala.collection.jcl.Convertions is your friend. As of scala 2.8, scala.collection.JavaConversions is your best friend. Enough said.&lt;br /&gt;&lt;br /&gt;Interestingly, I use List pretty much everywhere in my code. However, as you'll see, since List is the only one that doesn't freely convert from one to the other, it follows that you should use Seq[A] in all your scala code...hmmmm&lt;br /&gt;&lt;br /&gt;[later edit] Also, your arguably best friend in scala is the scala.collections.mutable.ListBuffer - check it out, it's all you thought List would be! Although, after a while, you will find yourself relying on mutable collections less and less...&lt;br /&gt;&lt;br /&gt;To get the full power of the implicit java to scala conversions, make sure you import the contents of the class, note the underscore below:&lt;br /&gt;&lt;pre&gt;&lt;span class="Apple-style-span"  style="color:#FF0000;"&gt;import scala.collection.JavaConversions._&lt;/span&gt;&lt;/pre&gt;[Later edit] I removed my examples here as being too clumsy :) use the import above instead.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/20018300-5645985736880659758?l=blog.razie.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Razblog/~4/Rm5Q996M2Fs" height="1" width="1"/&gt;</description><link>http://feeds.razie.com/~r/Razblog/~3/Rm5Q996M2Fs/converting-java-collections-to-scala.html</link><author>noreply@blogger.com (Razie)</author><feedburner:origLink>http://blog.razie.com/2009/09/converting-java-collections-to-scala.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-20018300.post-4964447402674024615</guid><pubDate>Tue, 11 Aug 2009 20:25:00 +0000</pubDate><atom:updated>2009-08-11T16:27:32.141-04:00</atom:updated><title>Increase battery capacity to 123% :)</title><description>&lt;a href="http://2.bp.blogspot.com/_AgcP7L_T8ZQ/SoHUJ6AfTQI/AAAAAAAAAE0/1kZHmvOp83w/s1600-h/battery.PNG"&gt;&lt;img style="MARGIN: 0px 0px 10px 10px; WIDTH: 303px; FLOAT: right; HEIGHT: 103px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5368805497457560834" border="0" alt="" src="http://2.bp.blogspot.com/_AgcP7L_T8ZQ/SoHUJ6AfTQI/AAAAAAAAAE0/1kZHmvOp83w/s320/battery.PNG" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;Just got this "warning" from my own laptop...no comments!&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/20018300-4964447402674024615?l=blog.razie.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Razblog/~4/GN7f_NNLlkE" height="1" width="1"/&gt;</description><link>http://feeds.razie.com/~r/Razblog/~3/GN7f_NNLlkE/increase-battery-capacity-to-123.html</link><author>noreply@blogger.com (Razie)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_AgcP7L_T8ZQ/SoHUJ6AfTQI/AAAAAAAAAE0/1kZHmvOp83w/s72-c/battery.PNG" height="72" width="72" /><feedburner:origLink>http://blog.razie.com/2009/08/increase-battery-capacity-to-123.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-20018300.post-7812248735757975469</guid><pubDate>Fri, 05 Jun 2009 14:51:00 +0000</pubDate><atom:updated>2009-06-05T10:55:05.843-04:00</atom:updated><title>Process Explorer - me likee</title><description>Installed this &lt;a href="http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx"&gt;Process Explorer &lt;/a&gt;a while back and it replaces the windows classic Task management stuff which is hopeless!&lt;br /&gt;&lt;br /&gt;I love it. The best features are:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;it shows a lot of information about what's running&lt;/li&gt;&lt;li&gt;you can search for a process just by typing the name&lt;/li&gt;&lt;li&gt;when you say "kill" it actually kills them asap rather than think and wait and ask for confirmation about 10 times...&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;Whoa! Goodie! Me likee.&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/20018300-7812248735757975469?l=blog.razie.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Razblog/~4/qmpZG_Sypj4" height="1" width="1"/&gt;</description><link>http://feeds.razie.com/~r/Razblog/~3/qmpZG_Sypj4/process-explorer-me-likee.html</link><author>noreply@blogger.com (Razie)</author><feedburner:origLink>http://blog.razie.com/2009/06/process-explorer-me-likee.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-20018300.post-3479036256209147430</guid><pubDate>Thu, 14 May 2009 16:59:00 +0000</pubDate><atom:updated>2009-05-14T13:08:34.871-04:00</atom:updated><title>Your own newspaper</title><description>Here's the culmination of the freedom from the mainstream: you can create your own newspaper, from the feeds you want: &lt;a href="http://feedjournal.com/index.html"&gt;http://feedjournal.com/index.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Not only are we using feed readers, we can now print our own newspapers - that's so cool...interestingly enough, this is just another of the &lt;a href="http://www.amazon.ca/Sovereign-Individual-Mastering-Transition-Information/dp/0684832720"&gt;Sovereign Individual &lt;/a&gt;predictions...&lt;br /&gt;&lt;br /&gt;And...to complete the picture, for the retarded sites that don't support content feeds, here's a free service that does it: &lt;a href="http://changedetection.com"&gt;ChangeDetection&lt;/a&gt;. It is simple to use and no catches that I could find...&lt;br /&gt;&lt;br /&gt;If you're looking, there's actually more of these page2rss services, including &lt;a href="http://page2rss.com"&gt;http://page2rss.com&lt;/a&gt; - really simple! The &lt;a href="http://www.watchthatpage.com/"&gt;http://www.watchthatpage.com/&lt;/a&gt; seems more complicated, while &lt;a href="http://www.followthatpage.com/"&gt;http://www.followthatpage.com/&lt;/a&gt; can do only email...&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Happy newsprinting!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/20018300-3479036256209147430?l=blog.razie.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Razblog/~4/1uxL8A2QqJU" height="1" width="1"/&gt;</description><link>http://feeds.razie.com/~r/Razblog/~3/1uxL8A2QqJU/your-own-newspaper.html</link><author>noreply@blogger.com (Razie)</author><feedburner:origLink>http://blog.razie.com/2009/05/your-own-newspaper.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-20018300.post-4657128882461953782</guid><pubDate>Tue, 21 Apr 2009 16:50:00 +0000</pubDate><atom:updated>2009-05-04T12:13:45.831-04:00</atom:updated><title>Optional arguments in Scala</title><description>I couldn't find much on the web with this search and it took me maybe 15 min to figure it out, so here's the low down on using optional arguments in Scala. There's a description in section 8.8 in the Programming in Scala book - they call them "repeated parameters".&lt;br /&gt;&lt;br /&gt;Using this notation you can overload Java methods with optional parms as well as pass them over to a "super." method (which was what I needed to do):&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;def takesOptionalArgs (x:String*) = {&lt;br /&gt;   println ("Scala println: ", x.mkString(" "))&lt;br /&gt;   java.lang.System.out.printf ("Java printf: %s %s %s", x:_*)&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;This special syntax instructs the compiler to pass the x array elements individually, not as an array!&lt;br /&gt;&lt;br /&gt;Cheers.&lt;br /&gt;&lt;br /&gt;[later edit] P.S. Note that there's an outstanding defect for overloading java vararg methods - it currently doesn't work: &lt;a href="https://lampsvn.epfl.ch/trac/scala/ticket/1459"&gt;https://lampsvn.epfl.ch/trac/scala/ticket/1459&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/20018300-4657128882461953782?l=blog.razie.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Razblog/~4/j2ng50Vukt0" height="1" width="1"/&gt;</description><link>http://feeds.razie.com/~r/Razblog/~3/j2ng50Vukt0/optional-arguments-in-scala.html</link><author>noreply@blogger.com (Razie)</author><feedburner:origLink>http://blog.razie.com/2009/04/optional-arguments-in-scala.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-20018300.post-809872695050601243</guid><pubDate>Tue, 14 Apr 2009 18:13:00 +0000</pubDate><atom:updated>2009-04-14T14:21:11.637-04:00</atom:updated><title>Agile Architecture talk from Coplien</title><description>&lt;p&gt;For a nice glimpse at the future of programming as it evolves, I strongly recommend this talk from my favorite architecture guy: Coplien. Prerequisites: get a beer, slippers and a robe, the conclusion is not light reading!&lt;/p&gt;&lt;p&gt;&lt;a href="http://blog.jaoo.dk/2009/03/04/handling-architecture-in-the-agile-world/"&gt;http://blog.jaoo.dk/2009/03/04/handling-architecture-in-the-agile-world/&lt;/a&gt; &lt;/p&gt;&lt;p&gt;Some of the things that deserve emphasis:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;The need that the application’s own model matches the model the users have in their head, i.e. the “view of the world” is obvious, but, unfortunately, it is not obvious to many…&lt;/li&gt;&lt;li&gt;Architecture is the essence of structure (the form), not the structure itself. &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;A good agile/lean architecture:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;supports change&lt;/li&gt;&lt;li&gt;Supports user interaction&lt;/li&gt;&lt;li&gt;Lowers discovery costs, rework&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Other memorables:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Habitable code – code where the designer could choose to live. Do you like your code? Would you live with it?&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Refactoring is bad! We want to avoid re-work…you need a system view, not code–as-you-think!&lt;br /&gt;&lt;/li&gt;&lt;li&gt;The long forgotten purpose of OO is to capture the model from the user’s mind, not create toys for developers!&lt;br /&gt;&lt;/li&gt;&lt;li&gt;(Razie says hmm): Do object diagrams instead of class diagrams – users think in terms of instances, not abstract classes.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;The GUI is not something between the GUI and the model, is a tool allowing the user to mess with the model! Kent Beck said “you can’t hide a bad architecture behind a good GUI”.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;(Razie says hmm): Requirements are the LAST thing you look at when doing architecture!&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Need architecture upfront, code just-in-time!&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Java is a TOY language.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Scala’s got traits, baby!&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;This is the brief follow up: &lt;a href="http://blog.jaoo.dk/2008/12/20/jaoo-video-2008-james-o-coplien/"&gt;http://blog.jaoo.dk/2008/12/20/jaoo-video-2008-james-o-coplien/&lt;/a&gt; &lt;/p&gt;&lt;ul&gt;&lt;li&gt;Peter Coad’s now a pilot, but his role-based color modeling should’ve taken off! &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/20018300-809872695050601243?l=blog.razie.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Razblog/~4/iw_UI2UXC2U" height="1" width="1"/&gt;</description><link>http://feeds.razie.com/~r/Razblog/~3/iw_UI2UXC2U/agile-architecture-talk-from-coplien.html</link><author>noreply@blogger.com (Razie)</author><feedburner:origLink>http://blog.razie.com/2009/04/agile-architecture-talk-from-coplien.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-20018300.post-2111007781862265238</guid><pubDate>Thu, 12 Mar 2009 14:44:00 +0000</pubDate><atom:updated>2009-03-12T10:49:19.254-04:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">design</category><category domain="http://www.blogger.com/atom/ns#">architecture</category><category domain="http://www.blogger.com/atom/ns#">principle</category><title>Components vs Frameworks</title><description>ABSTRACT: One of Razie's infamous uber-principles: I see frameworks as being the opposite of components. When architecting parts of a system, use this to decide on one or the other - this point of view could enrich the designer's arsenal of decision principles.&lt;br /&gt;TAGS: architecture, design, principle&lt;br /&gt;&lt;br /&gt;When you're talking about "writing code", the best option is generally reusing an existing piece of code and customizing it. Reusable pieces of code are normally in the category of either components or frameworks.&lt;br /&gt;&lt;br /&gt;Components are more or less black boxes with well defined inputs/outputs and customization settings.&lt;br /&gt;&lt;br /&gt;Frameworks, while they may also have defined inputs/outputs, they generally cannot be used as is. You write "plugins" (i.e. proxies or strategies) that customize a piece of the puzzle and then combine them to achieve the functionality the framework is intended for.&lt;br /&gt;&lt;br /&gt;I see frameworks as being the opposite of components, given how they're used: while components are pre-determined pieces of functionality, which you combine to achieve a flexible structure, frameworks define first an immutable structure and then allow you to customize some aspects of it.&lt;br /&gt;&lt;br /&gt;Patterns fall sqarely in the framework category, since they prescribe a structure with roles to fill out.&lt;br /&gt;&lt;br /&gt;In terms of initialization and configuration, components get everything up-front, while frameworks usually will use a callback to retrieve configuration, when needed. At least it's easier to always follow this pattern: use of factories indicates frameworks, for instance.&lt;br /&gt;&lt;br /&gt;Depending on the level you're at and your point of view, it is relative whether a given library falls in either category. For instance, a component could take a "strategy" as an input.&lt;br /&gt;&lt;br /&gt;When you look at a system, you will see components made of frameworks, made of components, made of frameworks etc. A system is made of sub-systems, which can only be of either kind :) since they're the two opposite forms of sub-system architecture.&lt;br /&gt;&lt;br /&gt;CONCLUSION&lt;br /&gt;&lt;br /&gt;Making the distinction and decision between component vs. framework, when designing, is important, since the denomination of "component" carries lots of semantics: independence, self-sufficiency, black-box, upfront initialization etc.&lt;br /&gt;&lt;br /&gt;Frameworks allow flexibility in the detail but are inflexible structure-wise. A framework that is too flexible is called a mess.&lt;br /&gt;&lt;br /&gt;A framework with all variabilities fixed is a component.&lt;br /&gt;&lt;br /&gt;Keep thinking and have fun, eh? I certainly am!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/20018300-2111007781862265238?l=blog.razie.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Razblog/~4/DBlHZ4bH0-k" height="1" width="1"/&gt;</description><link>http://feeds.razie.com/~r/Razblog/~3/DBlHZ4bH0-k/components-vs-frameworks.html</link><author>noreply@blogger.com (Razie)</author><feedburner:origLink>http://blog.razie.com/2009/03/components-vs-frameworks.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-20018300.post-4294438285939674855</guid><pubDate>Tue, 17 Feb 2009 17:18:00 +0000</pubDate><atom:updated>2009-02-18T14:39:53.536-05:00</atom:updated><title>Google Chrome and your passwords in clear-text</title><description>It was fun using the "remember passwords" feature until i figured out that Chrome will show your remembered passwords in clear-text...&lt;br /&gt;&lt;br /&gt;...it's probably the worse feature I've seen implemented so far, this year...but it's just february...and you didn't see what I have to say about CIRA-the Canandian internet registrar- yet, eh?&lt;br /&gt;&lt;br /&gt;[later edit]...this is especially evil since now evildoers could change the passwords to all your accounts and lock you out - otherwise, even if they find your laptop logged into all those accounts, they couldn't change your password before you did...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/20018300-4294438285939674855?l=blog.razie.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Razblog/~4/2tFMLuDNgvQ" height="1" width="1"/&gt;</description><link>http://feeds.razie.com/~r/Razblog/~3/2tFMLuDNgvQ/google-chrome-and-your-passwords-in.html</link><author>noreply@blogger.com (Razie)</author><feedburner:origLink>http://blog.razie.com/2009/02/google-chrome-and-your-passwords-in.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-20018300.post-8880714131354615570</guid><pubDate>Tue, 10 Feb 2009 17:27:00 +0000</pubDate><atom:updated>2009-02-18T14:43:04.673-05:00</atom:updated><title>Stupid feedburner</title><description>Sorry folks, after many troubles and wasted time trying to get my feedburner feed to work, AFTER migration to google, I am giving up on using feedburner. It's the worse cloud ever and the worse migration of anything, ever!&lt;br /&gt;&lt;br /&gt;This will be my feed. Yahoo pipes rock!&lt;br /&gt;&lt;br /&gt;xxx url&lt;br /&gt;&lt;br /&gt;Cheers!&lt;br /&gt;&lt;br /&gt;[later edit] ... came to my senses...they still suck, but you should use this feed instead: &lt;a href="http://feeds.razie.com/Razvan"&gt;http://feeds.razie.com/Razvan&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/20018300-8880714131354615570?l=blog.razie.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Razblog/~4/yC5FYQLJYOI" height="1" width="1"/&gt;</description><link>http://feeds.razie.com/~r/Razblog/~3/yC5FYQLJYOI/stupid-feedburner.html</link><author>noreply@blogger.com (Razie)</author><feedburner:origLink>http://blog.razie.com/2009/02/stupid-feedburner.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-20018300.post-1515391378955398057</guid><pubDate>Thu, 27 Nov 2008 13:51:00 +0000</pubDate><atom:updated>2008-11-27T08:56:50.379-05:00</atom:updated><title>Finally, a simple BASIC for kids</title><description>I've been looking for almost a year for a very simple programming environment to get my kids started in programming - obviously BASIC comes to mind...but couldn't find any!!!&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I know, it's unbelievable that there was no easy to use BASIC environment in the year 2008, but I'm not alone in that quest, read &lt;a href="http://www.salon.com/tech/feature/2006/09/14/basic/index.html"&gt;Why Johnny Can't Code&lt;/a&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Finally, I found and downloaded today a "simple basic" from the big "evil" dogs: &lt;a href="http://msdn.microsoft.com/en-us/devlabs/cc950524.aspx"&gt;http://msdn.microsoft.com/en-us/devlabs/cc950524.aspx&lt;/a&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;It works, it's very simple. It can have a litle more glitz in how it indicates the errors, but I love the content assist, although it doesn't actually complete the arguments but hey...it's better than Z80...&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Sweet, now i don't have to explain to my 8 year-old why he needs "static void main (String[] argv)" to write "Hello, Andrei".&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/20018300-1515391378955398057?l=blog.razie.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Razblog/~4/ONT-XUjkCII" height="1" width="1"/&gt;</description><link>http://feeds.razie.com/~r/Razblog/~3/ONT-XUjkCII/finally-simple-basic-for-kids.html</link><author>noreply@blogger.com (Razie)</author><feedburner:origLink>http://blog.razie.com/2008/11/finally-simple-basic-for-kids.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-20018300.post-7653075942415266890</guid><pubDate>Fri, 06 Jun 2008 20:28:00 +0000</pubDate><atom:updated>2008-06-06T16:32:27.954-04:00</atom:updated><title>testing disqus</title><description>apparently this disqus.com is a nice comment manager for blogs, where comments are managed in discussion threads etc. I moved my blogger to use disqus and I am now curious to see how it looks like.&lt;br /&gt;&lt;br /&gt;I'm assuming the comments will now be stored on the disqus site and meshed into my blog...&lt;br /&gt;&lt;br /&gt;I wonder what other use is there for this, other than just degenerate comments into threaded discussions...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/20018300-7653075942415266890?l=blog.razie.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Razblog/~4/8XkZtGjtrAA" height="1" width="1"/&gt;</description><link>http://feeds.razie.com/~r/Razblog/~3/8XkZtGjtrAA/testing-disqus.html</link><author>noreply@blogger.com (Razie)</author><feedburner:origLink>http://blog.razie.com/2008/06/testing-disqus.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-20018300.post-2205331987102667210</guid><pubDate>Wed, 16 Apr 2008 21:28:00 +0000</pubDate><atom:updated>2008-04-16T17:30:18.164-04:00</atom:updated><title>online graph, tag-based browsing</title><description>this type of technology, I believe, will be uniquitous in due time...it is really interesting to see the relationships that form. Graph mind-mappers are old, but this one's online based on flickr pic tags - really interesting:&lt;br /&gt;&lt;a href="http://taggraph.com/everybody/motorcycle"&gt;http://taggraph.com/everybody/motorcycle&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/20018300-2205331987102667210?l=blog.razie.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Razblog/~4/zyvYfmWYhAo" height="1" width="1"/&gt;</description><link>http://feeds.razie.com/~r/Razblog/~3/zyvYfmWYhAo/online-graph-tag-based-browsing.html</link><author>noreply@blogger.com (Razie)</author><thr:total>0</thr:total><feedburner:origLink>http://blog.razie.com/2008/04/online-graph-tag-based-browsing.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-20018300.post-2177116874472760438</guid><pubDate>Tue, 13 Nov 2007 16:37:00 +0000</pubDate><atom:updated>2007-11-13T11:39:59.104-05:00</atom:updated><title>new 105 km/h speed limit for trucks?</title><description>I sent this open letter to the Minister of Transportation and the Prime Minister of Ontario.&lt;br /&gt;&lt;br /&gt;I think this is a relevant issue that will affect us all every day.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The government is to promote truck-related accidents?&lt;br /&gt;&lt;br /&gt;I hear this more often: the government is thinking to limit the speed of heavy vehicles to 105 km/h. I challenge that that will actually cause more accidents, fatal ones too, due to a serious increase in truck traffic as well as the number of car-truck incidents.&lt;br /&gt;&lt;br /&gt;You surely know that most studies as well as common sense indicates that what causes collisions is not that much the absolute speed, but the difference in speed between vehicles. If three lanes of traffic are flowing down any 400 series at 120-130 km/h, there will be no accidents, no tailgating, no unsafe lane changes, nothing but a reasonably safe and steady flow of commuter cars.&lt;br /&gt;&lt;br /&gt;Assume now that those three or four lanes of packed traffic encounter a 50 ton, 18-wheeled speed hump doing 100 km/h down the middle. I have witnessed this first hand and I can tell you that you’ll see traffic scatter, unsafe speed and lane changes, heavy braking on all lanes, nothing safe, really! And this would happen every day, everywhere on our major highways!&lt;br /&gt;&lt;br /&gt;Now I see Quebec politicians proposing this as a law. I see the Canada Safety Council supporting this 105 km/h limit, stating that it will “reduce highway collisions related to tailgating and improper lane changes”, which are exactly the effects I witnessed first hand. Several truck collisions I heard of recently in the GTA were caused by cars cutting them off, another incident that will happen more frequently, given increased driver frustration and road-rage incidents.&lt;br /&gt;&lt;br /&gt;When we know the actual mean traffic speeds on the 400 series to be between 120-130 km/h especially outside the city, why on earth would it be safer to limit trucks to well below these speeds? Mind you, trucks do need to cross 3 or 7 lanes of traffic, even from left to right, to take certain exits or ramps.&lt;br /&gt;&lt;br /&gt;One of jokes I like most is about the plans, in Britain, to start driving on the right side of the road: the first day they’d switch the trucks and the second day the rest of the vehicles. Amusing, but I used to think it is an aberration…until now, that is!&lt;br /&gt;&lt;br /&gt;I urge you to let citizens focus on driving rather than dodging 18 wheelers. While a limit might make sense, 115 km/h is a perhaps manageable difference of only 10 km/h versus actual traffic speeds and overall a lot more safe and flexible while rooting out the inconsiderate speed daemons.&lt;br /&gt;&lt;br /&gt;In terms of traffic, it seems to me that merchandise will move 10% slower at 105 km/h vs. 115 km/h, meaning that at any point in time, there will be 10% less trucks available to load/unload (the trucks being on the road for 10% more time than before); less merchandise will reach its destination in any given day. Since people will not suddenly eat 10% less food nor buy 10% less toys, it will require the addition of 10% more trucks, with additional costs, insurance, diesel, pollution etc. Increasing truck traffic by 20% increases the truck-related accidents by the same 20% or more. (The same amount of trucks is on the road for 10% more time, plus the new 10% more trucks needed, equals 20% increase in truck traffic on our roads, to move the same volume).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;P.S. – On the speed limits.&lt;br /&gt;&lt;br /&gt;Before you reply that most citizens have no business exceeding the speed limits you so vigorously enforce, this is what they actually do and, by all accepted principles of law except Ontario’s traffic laws, what most people do defines the norm.&lt;br /&gt;&lt;br /&gt;The reason behind this105 km/h figure is the 100 km/h speed limit on our major highways. I have a hard time seeing what that limit has to do with actual traffic speeds, other than generate “government revenue” and put the people that actually observe it at risk. Study after study shows that drivers routinely ignore abnormally low speed limits and even that variations in speed limits (either up or down) do not cause significant changes in actual traffic speeds! People, on the average, drive with the speed they consider safe and reasonable for different sections of the road! Assuming anything else leads to the conclusion that the citizens of this country are either suicidal, bent on killing or impaired in some other ways, since most drive daily.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/20018300-2177116874472760438?l=blog.razie.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Razblog/~4/kLPM8B_4lNI" height="1" width="1"/&gt;</description><link>http://feeds.razie.com/~r/Razblog/~3/kLPM8B_4lNI/new-105-kmh-speed-limit-for-trucks.html</link><author>noreply@blogger.com (Razie)</author><thr:total>1</thr:total><feedburner:origLink>http://blog.razie.com/2007/11/new-105-kmh-speed-limit-for-trucks.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-20018300.post-113504516215124095</guid><pubDate>Tue, 20 Dec 2005 02:17:00 +0000</pubDate><atom:updated>2005-12-19T21:42:09.293-05:00</atom:updated><title>Good Software Design</title><description>Just saw another post somewhere with a nice definition of what makes a good design, something on the lines of “A good design allows your code to do things you never expected it to have to do”. [&lt;a href="http://jroller.com/page/fate?entry=the_black_art_of_good"&gt;http://jroller.com/page/fate?entry=the_black_art_of_good&lt;/a&gt;]&lt;br /&gt;&lt;br /&gt;Bang on...and enough...if you add some, I think obvious, other attributes: the said design must also be efficient, minimal and be reasonably generic (not super-generic, that is).&lt;br /&gt;&lt;br /&gt;This kind of extreme flexibility should be a side effect of good design, not a goal.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/20018300-113504516215124095?l=blog.razie.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Razblog/~4/XCmfkkMKQo4" height="1" width="1"/&gt;</description><link>http://feeds.razie.com/~r/Razblog/~3/XCmfkkMKQo4/good-software-design.html</link><author>noreply@blogger.com (Razie)</author><thr:total>1</thr:total><feedburner:origLink>http://blog.razie.com/2005/12/good-software-design.html</feedburner:origLink></item></channel></rss>
