<?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:blogger='http://schemas.google.com/blogger/2008' 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-5581773176406300971</id><updated>2024-09-08T21:03:39.545-07:00</updated><category term="conformity"/><category term="framework"/><category term="unification"/><category term="what"/><category term="wtf"/><title type='text'>Coding the right way.</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://l2codelol.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5581773176406300971/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://l2codelol.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>The Fritz</name><uri>http://www.blogger.com/profile/04144970582797949072</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>6</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5581773176406300971.post-6290087261516151685</id><published>2011-05-24T13:09:00.000-07:00</published><updated>2011-05-24T13:16:11.388-07:00</updated><title type='text'>Birthing an unprofessional society</title><content type='html'>I found something interesting a couple days ago.&lt;br /&gt;
&lt;br /&gt;
Computational linguists/NLP researchers/implementers are really bad at communicating.&lt;br /&gt;
&lt;br /&gt;
Obviously, the problem does not lie in their language skills.&lt;br /&gt;
&lt;br /&gt;
Now, here is the issue. The ACL (Association of Computational Linguistics) is more or less the only association that binds together people interested in CL/NLP. And well, they are an academic association, interested in things like membership dues, trade shows, focus groups, papers, publishing, etc.&lt;br /&gt;
&lt;br /&gt;
Nobody cares about the ACL, except professors trying to get/keep tenure, researchers looking to steal/borrow ideas, and engineers who have no clue where to start. Start with the research, that makes sense. Or does it?&lt;br /&gt;
&lt;br /&gt;
I looked really hard in and around the ACL, and couldn&#39;t even find a forum or a chatroom.&lt;br /&gt;
&lt;br /&gt;
No forum. No chatroom.&lt;br /&gt;
&lt;br /&gt;
To me, this is the internet equivalent of a city with no phone lines. There is no way to ask questions, show off stuff, or do jack, really.&lt;br /&gt;
&lt;br /&gt;
So, there&#39;s a vaccum. Time to fill the vaccum. The thoughts that I have had for CL/NLP community are as follows:&lt;br /&gt;
&lt;br /&gt;
1) Must have a community website. A good example of a thriving community is &lt;a href=&quot;http://teamliquid.net/&quot;&gt;TeamLiquid.net&lt;/a&gt; -- a Starcraft 2 community.&lt;br /&gt;
&lt;br /&gt;
2) Must have examples. LOTS of examples of functioning, attachable code. If I want to know how to perform the TFIDF method, I should be able to see that and work through it, step by step. To this end, a wiki needs to be attached. This is the groundwork necessary to perform automated ranking and testing in a non-piecewise way.&lt;br /&gt;
&lt;br /&gt;
3) May be sponsored, never affiliated. Anything left here is free for the taking. This would represent published, open techniques that are plentiful. This is very different from a professional society, because it taps the sea of amateurs. It places demands on the CL/NLP community to have their algorithms available as web services, as applications that can be interfaced with everything and anything else.&lt;br /&gt;
&lt;br /&gt;
4) Communication must be informal, instantaneous, and recordable. Forums and chatrooms are perfect for this.&lt;br /&gt;
&lt;br /&gt;
5) Quality must be ever-improving, but with a low bar of entry. Quality takes time. Hacks take less time. Both show off a concept, and one is simply more attractive than the other.&lt;br /&gt;
&lt;br /&gt;
Work may begin on this soon, but so far this is the whole of the problem that I see in getting the Semantic Web established and integrated with CL/NLP. They need each other, and one currently has no way to speak ot the other. So... here we go.</content><link rel='replies' type='application/atom+xml' href='http://l2codelol.blogspot.com/feeds/6290087261516151685/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5581773176406300971/6290087261516151685' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5581773176406300971/posts/default/6290087261516151685'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5581773176406300971/posts/default/6290087261516151685'/><link rel='alternate' type='text/html' href='http://l2codelol.blogspot.com/2011/05/birthing-unprofessional-society.html' title='Birthing an unprofessional society'/><author><name>The Fritz</name><uri>http://www.blogger.com/profile/04144970582797949072</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5581773176406300971.post-5328163895178008610</id><published>2011-05-20T09:24:00.001-07:00</published><updated>2011-05-20T09:45:16.162-07:00</updated><title type='text'>Integrating GWT with a Google Chrome Extension</title><content type='html'>As of late, my joy in life has been writing a Google Chrome Extension in the Google Web Toolkit (GWT). All in all, it is not too terrible of an operation. Here is the path that I have taken.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;1) Hook Chrome Extension button in a background page, pass signals (via Chrome&#39;s cross-plugin/content script communication layer) via a content script to acquire all HTML in all frames, then pass signals to the main page.&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  &gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  &gt;chrome.browserAction.onClicked.addListener( function(tab) {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  &gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;engageOverlay(tab,false);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  &gt;});&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  &gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  &gt;function engageOverlay(tab,clickthrough) {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  &gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;chrome.tabs.executeScript(null, {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  &gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;  &lt;/span&gt;code: &quot;ucaster_engage_overlay(&quot;+clickthrough+&quot;);&quot;,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  &gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;}, function() {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  &gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;  &lt;/span&gt;chrome.tabs.getSelected(null, function(tab) {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  &gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;   &lt;/span&gt;chrome.tabs.sendRequest(tab.id, {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  &gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;    &lt;/span&gt;action: &quot;go&quot;,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  &gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;    &lt;/span&gt;url: tab.url,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  &gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;    &lt;/span&gt;app: &quot;chromeucaster&quot;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  &gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;   &lt;/span&gt;});&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  &gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;  &lt;/span&gt;});&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  &gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;});&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  &gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;2) Embed IFrame into webpage, pointing at the GWT Entry page. In this case, I made the IFrame transparent and 100% height/width of the screen, providing a nice overlay.&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  &gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  &gt;&lt;div&gt;var src = &quot;popup.html&quot;;&lt;/div&gt;&lt;div&gt;var id = &#39;ucaster-overlay&#39;;&lt;/div&gt;&lt;div&gt;var windowSrc = chrome.extension.getURL(src);&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  &gt;$(&#39;body&#39;).prepend(&quot;[iframe class=&#39;ucaster-overlay&#39; id=&#39;&quot; + id + &quot;&#39; src=&#39;&quot; + windowSrc + &quot;&#39; name=&#39;&quot; + id + &quot;&#39;][/iframe]&quot;); //Square Brackets-&amp;gt;Angle Brackets&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  &gt;$(&#39;#&#39; + id).load(function () {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  &gt;  $(&#39;#&#39; + id).show();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  &gt;  $(&#39;#&#39; + id).focus();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  &gt;});&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;3) I pass information into the IFrame via the window object, which the IFrame internally is polling for.&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  &gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  &gt;window.pageUrl=pageUrl;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  &gt;window.pageContent=pageContent;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;span&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;4) The IFrame passes information out via the localStorage variable, which the plugin is happily linked to, since they share the same URL prefix (and hence same localStorage), however the background page must poll localStorage for any information that is coming out of the plugin.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;5) I write happy little GWT code inside popup.html. It all works remarkably well, and has produced some of the best looking plugins for minimal effort (The folks at &lt;a href=&quot;https://chrome.google.com/webstore/detail/gnohhoamnkpiniaciibhaacocojfpncj?hl=en&quot;&gt;Glass&lt;/a&gt; make some very pretty plugins) and without having to write very much stupid JavaScript, which is anathema to a &#39;real application developer&#39; like me.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;Check out the ongoing results of GWT+Chrome Extension at the &lt;a href=&quot;https://chrome.google.com/webstore/detail/onbhfocmgcbigbfhfahccflfpicbonjp?hl=en&quot;&gt;UCASTER plugin&lt;/a&gt;.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;Feel free to comment/poke me if you want more details or get stuck doing this.&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://l2codelol.blogspot.com/feeds/5328163895178008610/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5581773176406300971/5328163895178008610' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5581773176406300971/posts/default/5328163895178008610'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5581773176406300971/posts/default/5328163895178008610'/><link rel='alternate' type='text/html' href='http://l2codelol.blogspot.com/2011/05/integrating-gwt-with-google-chrome.html' title='Integrating GWT with a Google Chrome Extension'/><author><name>The Fritz</name><uri>http://www.blogger.com/profile/04144970582797949072</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5581773176406300971.post-7138716601411274521</id><published>2010-05-26T11:52:00.000-07:00</published><updated>2010-05-26T12:19:00.970-07:00</updated><title type='text'>Where is my web based cmd/bash?</title><content type='html'>&lt;div&gt;It is possible to think of the internet as a gigantic hard drive.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;There are files to get, there are web pages to look at, there are even programs to run.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;We&#39;ve all downloaded a file, and we&#39;ve all looked at a webpage... This is akin to running a GUI app. But what about web services?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I am pretty sure GUI apps are to Web pages as Command line programs are to Web services.&lt;/div&gt;&lt;div&gt;Maybe we have been treating web services wrong. Any shell hacker knows that the best place to put documentation is into a /? or --help parameter. Why haven&#39;t we done this with Web services?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;What is it about web services that make us want to take everything, and stuff them into the equivalent of a help file? You remember those. They are bothersome, and only necessary for exhaustive searches about how to use something. Much better instead to just run the command line app, and read the usage.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Well guess what guys, I don&#39;t see a usage in any web service anywhere. In fact, the URL bar kinda bothers me, because it doesn&#39;t even have the basic functionality required to perform the most simple things, like piping.In short, web browsers make for crappy terminals. I can&#39;t even assemble a multi-part piece of form data without building a webpage to do it.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;What I see as the future steps to get this working well:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Build a command line shell where web service calls/Javascript/web browsing/JSON extraction/etc are pretty much all first level members. Superstars. Bash for the web.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Eventually, one day, I might be able to do this:&lt;/div&gt;&lt;div&gt;&lt;i&gt;http://api.twitter.com/1/statuses/user_timeline.json -id=lomilar -count=50 | jsongrep text | http://service.metaglance.com/api/json/getmetadatatext -key=blahblah&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;It will go fetch all my tweets, rip the text out of them, assemble them into a multi-part form request, ship them to the Metaglance web service with my key, and return back the metadata that I need.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Doesn&#39;t that seem better than the couple _pages_ of Javascript that it takes to do that?&lt;/div&gt;&lt;div&gt;--Fritz&lt;/div&gt;&lt;div style=&quot;background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(255, 255, 255); font: normal normal normal 13px/19px Georgia, &#39;Times New Roman&#39;, &#39;Bitstream Charter&#39;, Times, serif; padding-top: 0.6em; padding-right: 0.6em; padding-bottom: 0.6em; padding-left: 0.6em; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-family: &#39;Times New Roman&#39;; font-size: medium; &quot;&gt;&lt;p&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;lucida grande&#39;;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://l2codelol.blogspot.com/feeds/7138716601411274521/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5581773176406300971/7138716601411274521' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5581773176406300971/posts/default/7138716601411274521'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5581773176406300971/posts/default/7138716601411274521'/><link rel='alternate' type='text/html' href='http://l2codelol.blogspot.com/2010/05/where-is-my-web-based-cmdbash.html' title='Where is my web based cmd/bash?'/><author><name>The Fritz</name><uri>http://www.blogger.com/profile/04144970582797949072</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5581773176406300971.post-6892337743076221312</id><published>2008-08-13T10:56:00.001-07:00</published><updated>2008-08-13T11:29:04.753-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="conformity"/><category scheme="http://www.blogger.com/atom/ns#" term="framework"/><category scheme="http://www.blogger.com/atom/ns#" term="unification"/><title type='text'>Unification of a framework.</title><content type='html'>In this post, I explore the prudence of unification and conformity in code.&lt;br /&gt;&lt;br /&gt;I subscribe to this philosophy: &quot;There should only be one way to do anything, in code.&quot;&lt;br /&gt;&lt;br /&gt;There&#39;s a few reasons for this. The first is that duplicate code is bad, mmkay? Having two ways of accomplishing the same thing is equivalent to duplicate code. They may not look the same. They may not act the same. But they perform the same task.&lt;br /&gt;&lt;br /&gt;Building a framework is all about building the tools to quickly and efficiently create an application. You want to use the right tools for the job. Anyone who has tried to drop a transmission without a transmission jack can agree with me on this. If you use a standard jack, it is possible, but it is unstable, unwieldy, and takes a lot more work (more lines of code) than is necessary.&lt;br /&gt;&lt;br /&gt;When pounding a post into the ground, you should not want to use a giant hammer. You can miss the post, you can hit yourself with the hammer, and it takes a lot of swings to hammer a post into the ground. You want a post pounder, which is a giant heavy metal sleeve that pounds posts into the ground.&lt;br /&gt;&lt;br /&gt;That is why, with a great framework, there is only one way to do anything. Assuming your staying within the confines of a namespace, there is no hammer. There is no universal tool. There is a specialized tool for each thing you want to do. Want to pound in a nail? Here is a nail gun. Want to pound in a post? Here&#39;s a post pounder. You could use a hammer for each of those tasks, but a hammer, while suited well to the task, is not crafted specially for any particular thing.&lt;br /&gt;&lt;br /&gt;Hammers are for people who don&#39;t exactly know what they will be doing.&lt;br /&gt;&lt;br /&gt;To continue, want to bend a piece of metal? No. That is not a valid operation within the framework, because you aren&#39;t being specific enough with your requirements. You could use plyers, but we took away the plyers, because they are too general purpose. We have the Daimler (very large semi-truck building company) tool shed at our disposal, I am sure you can either find a tool that does the job exactly, or cast one for this very specific purpose.&lt;br /&gt;&lt;br /&gt;An alarm that should be going off any time something seems frustrating in code is: Is this the right tool for the job? We should not have to fenaggle and coerce code to work, because our tools don&#39;t take up any space and are instantly available to us. One tool, one job, that&#39;s it. If it doesn&#39;t exist, build it and add it to the framework.</content><link rel='replies' type='application/atom+xml' href='http://l2codelol.blogspot.com/feeds/6892337743076221312/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5581773176406300971/6892337743076221312' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5581773176406300971/posts/default/6892337743076221312'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5581773176406300971/posts/default/6892337743076221312'/><link rel='alternate' type='text/html' href='http://l2codelol.blogspot.com/2008/08/unification-of-framework.html' title='Unification of a framework.'/><author><name>The Fritz</name><uri>http://www.blogger.com/profile/04144970582797949072</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5581773176406300971.post-1267837333694793294</id><published>2008-08-06T09:42:00.001-07:00</published><updated>2008-08-06T10:03:02.146-07:00</updated><title type='text'>Loose coupling. Friend or foe?</title><content type='html'>Disclaimer: This is C#. I also have coded in java, but it was in a framework that was so well built that it was boring.&lt;br /&gt;&lt;br /&gt;I recently ran into a situation where loose coupling is touted as a virtue of some code, but I am not personally seeing it.&lt;br /&gt;&lt;br /&gt;I see it as a bit of a trade off. Quite a bit.&lt;br /&gt;&lt;br /&gt;I measure the effectiveness of many patterns and design ideas in the overall effects they have on the code. This includes things like obscurity of the pattern, difficulty to learn/intuit the pattern, time it takes to refactor the pattern, etc. This can all be added up into a theoretical value called potential bugs.&lt;br /&gt;&lt;br /&gt;Loose coupling is indeed nice when you are taking input from the rest of the world. I have currently run into a situation though where we use loose coupling to determine what services we are attaching ourselves to within the program.&lt;br /&gt;&lt;br /&gt;You&#39;ve probably seen this before. An application config with some fully qualified class names in it (good luck renaming those classes/namespaces without ripple effects), ConfigurationElementCollection, searching assemblies for classes, the good ol&#39; Activator.CreateInstance.&lt;br /&gt;&lt;br /&gt;This pattern is good when being used in a fashion that would benefit loose coupling, like a plugin, where you don&#39;t know what you are signing up for. But we, our team, controls both sides of the equation.&lt;br /&gt;&lt;br /&gt;Argument against: The compiler is your friend. Refactoring tools are your friend. The easier (and faster) your code can be manipulated as a whole, the less bugs your going to going to see, and your code will become a lot more simple. When you control both sides of an equation, leave it out. This is unless you are using dynamic binding or something where loose coupling saves you complexity and numbers of lines of real code.&lt;br /&gt;&lt;br /&gt;(Real code is french for code that can&#39;t be code generated, or isn&#39;t absurdly simple.)&lt;br /&gt;&lt;br /&gt;Conclusion: Avoid Loose coupling, because it sabotages a lot of the tools at your disposal. Use when interacting with unknown parties, or dynamic binding to something. (Web services, DLLs, plugins, runtime code generation, etc)&lt;br /&gt;&lt;br /&gt;Reasons:&lt;br /&gt;The most boring code is the easiest to understand. (Readability)&lt;br /&gt;Don&#39;t architect for something that isn&#39;t going to exist in the immediate future. (Simplicity)&lt;br /&gt;Tools are your friends. Don&#39;t sabotage them by creating disjoint code if it is unnecessary. (Continuity)&lt;br /&gt;The easier and faster you can refactor your code, the less bugs you are going to see. (Flexibility)&lt;br /&gt;&lt;blockquote&gt;&lt;/blockquote&gt;</content><link rel='replies' type='application/atom+xml' href='http://l2codelol.blogspot.com/feeds/1267837333694793294/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5581773176406300971/1267837333694793294' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5581773176406300971/posts/default/1267837333694793294'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5581773176406300971/posts/default/1267837333694793294'/><link rel='alternate' type='text/html' href='http://l2codelol.blogspot.com/2008/08/loose-coupling-friend-or-foe.html' title='Loose coupling. Friend or foe?'/><author><name>The Fritz</name><uri>http://www.blogger.com/profile/04144970582797949072</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5581773176406300971.post-5615963464615585638</id><published>2008-08-06T09:38:00.000-07:00</published><updated>2008-08-06T09:42:07.945-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="what"/><category scheme="http://www.blogger.com/atom/ns#" term="wtf"/><title type='text'>What is this?</title><content type='html'>This, more or less, is a place to record and discuss software engineering &#39;the correct way&#39;. The majority of this is going to be me pursuing the correct way to code, but may contain thoughts on other aspects of a software engineer&#39;s life.&lt;br /&gt;&lt;br /&gt;As always, this is basically from a hacker&#39;s perspective, and is meant to be informative with no guarantee of prudence, high mindedness, politeness, or anything of the like.</content><link rel='replies' type='application/atom+xml' href='http://l2codelol.blogspot.com/feeds/5615963464615585638/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5581773176406300971/5615963464615585638' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5581773176406300971/posts/default/5615963464615585638'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5581773176406300971/posts/default/5615963464615585638'/><link rel='alternate' type='text/html' href='http://l2codelol.blogspot.com/2008/08/what-is-this.html' title='What is this?'/><author><name>The Fritz</name><uri>http://www.blogger.com/profile/04144970582797949072</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>