<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" 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" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;Ak4EQ3k8eip7ImA9WhFSFUQ.&quot;"><id>tag:blogger.com,1999:blog-1280594010967081625</id><updated>2013-06-18T19:41:42.772-04:00</updated><category term="mobile" /><category term="linux" /><category term="frisky" /><category term="business" /><category term="javascript" /><category term="java" /><category term="erlang" /><category term="riak" /><category term="web" /><category term="apple" /><category term="gwt" /><category term="cloud" /><category term="magnum" /><category term="golang" /><category term="go" /><category term="pylons" /><category term="dart" /><category term="dartlang" /><category term="android" /><category term="python" /><category term="spread" /><category term="turbogears" /><category term="nonblocking" /><category term="nosql" /><category term="performance" /><category term="architecture" /><category term="async" /><category term="coffeescript" /><category term="pypy" /><category term="rant" /><category term="database" /><category term="fawps" /><title>Hacking Thought Blog</title><subtitle type="html">Ranting about writing software...</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://blog.hackingthought.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://blog.hackingthought.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/1280594010967081625/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>Lateef Jackson</name><uri>https://plus.google.com/104965469689680679178</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-kwKiEJ2Nxbw/AAAAAAAAAAI/AAAAAAAAOpc/hr8MB2NSJK4/s512-c/photo.jpg" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>73</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/atom+xml" href="http://feeds.feedburner.com/HackingThoughtBlog" /><feedburner:info uri="hackingthoughtblog" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;C0INSHk-cCp7ImA9WhBUFE8.&quot;"><id>tag:blogger.com,1999:blog-1280594010967081625.post-6451525234782907158</id><published>2013-05-01T11:19:00.003-04:00</published><updated>2013-05-01T11:19:59.758-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-05-01T11:19:59.758-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="javascript" /><category scheme="http://www.blogger.com/atom/ns#" term="dart" /><title>Notes from my first real Dart Web App</title><content type="html">I mostly build interfaces for IE. Well they have to be&amp;nbsp;compatible&amp;nbsp;for IE7+ so like most web developers I build them on Chrome and then fix the IE issues. Since Dart or dart2js only works with IE9+ I didn't have any projects that I could use for it. Finally I have a contact database I needed to build that I only needed to support HTML5 browsers! I figured I would give Dart a real shake down. I didn't want to build everything from scratch which I was&amp;nbsp;luckily&amp;nbsp;that &lt;a href="http://dartwebtoolkit.com/" target="_blank"&gt;DWT&lt;/a&gt; (Dart Web Toolkit) existed.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
Dart&lt;/h3&gt;
The language type system is a little Java ishy but that makes it really trivial to learn if you know Java. I find this mainly annoying with Generics but it is just one of those things that is here to stay I suppose. It is dynamic enough to do things like for(var x in [foo, bar, bat]) {x.show();}. After writing Python for almost a decade I have a hard time living without a level of flexibility. I like the Javascript bits since it make for first pass coding really fast and then it can be statically typed on future passes. I love being able to organize the code in files that make sense and not worry about some complex build process since dart2js will optimize it for me (dependency management is so much better done by machines).&lt;br /&gt;
&lt;h3&gt;
DWT&lt;/h3&gt;
&lt;div&gt;
I spent a couple years writing GWT code and it has its ups and downs of which I have written about extensively. I have also written a good mountain of Javascript and more recently Coffeescript. DWT give that rich API from GWT, I have found the static typing makes it easy to read libraries and consistant coding. Fast development combined with a great widget library and code that is not a complete mess to look at. Honestly I have been amazed at how easy it is to write DWT. I have found it faster to write DWT that it does GWT mainly because Dart is not the pig Java is. It has been&amp;nbsp;relatively&amp;nbsp;easy to style with the existing application using bootstrap.&lt;/div&gt;
&lt;h3&gt;
var's, typedef's and dynamic's oh my!&lt;/h3&gt;
Oh how I love &lt;b&gt;var&lt;/b&gt;. Even though I write static typed code all the time I love being able to just type var when I am in the zone. Save from having to look up a type or to create it and loose the flow. Many times I am not sure exactly what the type is going to be so better to just have a place holder and then during a code cleanup pass fix the var types.&lt;br /&gt;
&lt;b&gt;dynamic&lt;/b&gt; is the type that json.parse returns. I have found this extremely useful for two purposes. I like being able to configure using it like I do with the DataTable in dwt_lhj. JSON from the backend is another thing I often don't think needs a formally design data structure.&lt;br /&gt;
&lt;b&gt;typedef&lt;/b&gt; is how to define a function. Say I have a function that take to int and I need to call it once the server responds. For example the Paginator that I wrote in the dwt_lhj tables code:&lt;br /&gt;
&lt;span class="kd" style="background-color: white; border: 0px; color: #333333; font-family: Consolas, 'Liberation Mono', Courier, monospace; font-size: 12px; font-weight: bold; line-height: 18px; margin: 0px; padding: 0px; white-space: pre;"&gt;typedef&lt;/span&gt;&lt;span style="background-color: white; color: #333333; font-family: Consolas, 'Liberation Mono', Courier, monospace; font-size: 12px; line-height: 18px; white-space: pre;"&gt; &lt;/span&gt;&lt;span class="n" style="background-color: white; border: 0px; color: #333333; font-family: Consolas, 'Liberation Mono', Courier, monospace; font-size: 12px; line-height: 18px; margin: 0px; padding: 0px; white-space: pre;"&gt;SelectedPage&lt;/span&gt;&lt;span class="p" style="background-color: white; border: 0px; color: #333333; font-family: Consolas, 'Liberation Mono', Courier, monospace; font-size: 12px; line-height: 18px; margin: 0px; padding: 0px; white-space: pre;"&gt;(&lt;/span&gt;&lt;span class="kt" style="background-color: white; border: 0px; color: #445588; font-family: Consolas, 'Liberation Mono', Courier, monospace; font-size: 12px; font-weight: bold; line-height: 18px; margin: 0px; padding: 0px; white-space: pre;"&gt;int&lt;/span&gt;&lt;span style="background-color: white; color: #333333; font-family: Consolas, 'Liberation Mono', Courier, monospace; font-size: 12px; line-height: 18px; white-space: pre;"&gt; &lt;/span&gt;&lt;span class="n" style="background-color: white; border: 0px; color: #333333; font-family: Consolas, 'Liberation Mono', Courier, monospace; font-size: 12px; line-height: 18px; margin: 0px; padding: 0px; white-space: pre;"&gt;page&lt;/span&gt;&lt;span class="p" style="background-color: white; border: 0px; color: #333333; font-family: Consolas, 'Liberation Mono', Courier, monospace; font-size: 12px; line-height: 18px; margin: 0px; padding: 0px; white-space: pre;"&gt;,&lt;/span&gt;&lt;span style="background-color: white; color: #333333; font-family: Consolas, 'Liberation Mono', Courier, monospace; font-size: 12px; line-height: 18px; white-space: pre;"&gt; &lt;/span&gt;&lt;span class="kt" style="background-color: white; border: 0px; color: #445588; font-family: Consolas, 'Liberation Mono', Courier, monospace; font-size: 12px; font-weight: bold; line-height: 18px; margin: 0px; padding: 0px; white-space: pre;"&gt;int&lt;/span&gt;&lt;span style="background-color: white; color: #333333; font-family: Consolas, 'Liberation Mono', Courier, monospace; font-size: 12px; line-height: 18px; white-space: pre;"&gt; &lt;/span&gt;&lt;span class="n" style="background-color: white; border: 0px; color: #333333; font-family: Consolas, 'Liberation Mono', Courier, monospace; font-size: 12px; line-height: 18px; margin: 0px; padding: 0px; white-space: pre;"&gt;start&lt;/span&gt;&lt;span class="p" style="background-color: white; border: 0px; color: #333333; font-family: Consolas, 'Liberation Mono', Courier, monospace; font-size: 12px; line-height: 18px; margin: 0px; padding: 0px; white-space: pre;"&gt;);&lt;/span&gt;&lt;br /&gt;
When the user selects a different page then the paginator will call this function. Compile time failure if it doesn't work woot!&lt;br /&gt;
&lt;h3&gt;
dwt_lhj&lt;/h3&gt;
This are a handful of things I wrote that seem to be missing. I am sure eventually there will be better implementations however I figured I would share them in case someone else had simular needs.&lt;br /&gt;
UL and LI elements in HTML tags are missing in GWT as well in DWT. Since I use them a lot for navigation (bootstrap) and for making list of things! &lt;a href="https://github.com/lateefj/dwt_lhj/blob/master/html_lists.dart" target="_blank"&gt;I created pretty simple wrappers&lt;/a&gt;. It is very self&amp;nbsp;explanatory&amp;nbsp;and easy to use with very little code.&lt;br /&gt;
Displaying tabular data is another thing that is currently not implemented in DWT. GWT calls them &lt;a href="https://developers.google.com/web-toolkit/doc/latest/DevGuideUiCellWidgets" target="_blank"&gt;cell widgets&lt;/a&gt;. These are pretty large undertaking from a code perspective to implement for DWT. I have used Cell Widgets a lot in GWT. I find them very tedious to code. I have been using Datatables.net which is pretty nice Javascript library but I have found the API to be pretty complex for the functionality I am looking for (maybe that is just the docs). I was hoping to build something in the middle that I could quickly build but would have a lot of future flexibility that I could change the behavior in. &lt;a href="https://github.com/lateefj/dwt_lhj/blob/master/tables.dart" target="_blank"&gt;So I built one.&lt;/a&gt; I also built a simple paginator that I use with the bootstrap paginator css classes. I am hot real happy with the code but it works and I look forward to improving it in the future.&lt;br /&gt;
&lt;a href="https://github.com/lateefj/dwt_lhj/blob/master/route.dart" target="_blank"&gt;Wrote a regex routing library&lt;/a&gt; because I couldn't get the existing&amp;nbsp;&lt;a href="https://github.com/dart-lang/route"&gt;https://github.com/dart-lang/route&lt;/a&gt; library to work. Based on the tickets they seem to exclude the features I needed. I decided to write a simple one that uses the DWT History package however I think it could quickly be improved and migrated to be a more general purpose library. When I get some better docs and examples up and someone finds it useful I will publish it in the pub.dartlang.org repository.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
Mopping up&lt;/h3&gt;
So far development in dart has been pretty fantastic. There are a couple bumps in the road with bugs in DWT or old examples to dart code online. I think in a year most of this will get sorted out. There seems to be some amount of effort going into coding Dart for the backend. In general I don't find much advantage to this. I find languages like Python and Go to be much better language for solving those types of problems. As a "unicorn" (I code both front end and backend) I find certain&amp;nbsp;languages&amp;nbsp;have strengths that&amp;nbsp;appeal to the types of front end or backend problems (Dart craptastic support for concurrency IMO is one reason I wouldn't want to use it for backend coding). &amp;nbsp;&amp;nbsp;For building large code base of widgets Dart seems to be fitting the bill nicely. This app will hopefully go into production in June and I will follow up with another post then.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;img src="http://feeds.feedburner.com/~r/HackingThoughtBlog/~4/RKfpuvyoOv0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.hackingthought.com/feeds/6451525234782907158/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.hackingthought.com/2013/05/notes-from-my-first-real-dart-web-app.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1280594010967081625/posts/default/6451525234782907158?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1280594010967081625/posts/default/6451525234782907158?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/HackingThoughtBlog/~3/RKfpuvyoOv0/notes-from-my-first-real-dart-web-app.html" title="Notes from my first real Dart Web App" /><author><name>Lateef Jackson</name><uri>https://plus.google.com/104965469689680679178</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-kwKiEJ2Nxbw/AAAAAAAAAAI/AAAAAAAAOpc/hr8MB2NSJK4/s512-c/photo.jpg" /></author><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://blog.hackingthought.com/2013/05/notes-from-my-first-real-dart-web-app.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0cGQnk5fSp7ImA9WhBXE0k.&quot;"><id>tag:blogger.com,1999:blog-1280594010967081625.post-2693516732448245759</id><published>2013-03-26T20:43:00.001-04:00</published><updated>2013-03-26T20:43:43.725-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-03-26T20:43:43.725-04:00</app:edited><title>My first live Dart + Go web app (lhj.me)</title><content type="html">Last year I wrote a url shortener using Go and Riak. Trying to eat my own dog food since I wrote a &lt;a href="https://bitbucket.org/lateefj/goriak" target="_blank"&gt;REST API for Riak in Go&lt;/a&gt;. It used jQuery and just so I could get this up and running as quickly as possible. I put this up on&amp;nbsp;&lt;a href="http://lhj.me/"&gt;lhj.me&lt;/a&gt;. Partly to test my libraries &lt;a href="https://bitbucket.org/lateefj/goriak" target="_blank"&gt;goriak&lt;/a&gt; and &lt;a href="https://bitbucket.org/lateefj/httphacks" target="_blank"&gt;httphacks&lt;/a&gt; that I wrote in Go. It was a fun project! I was amazed how much I used&amp;nbsp;&lt;a href="http://golang.org/doc/effective_go.html#goroutines" target="_blank"&gt;goroutines&lt;/a&gt;&amp;nbsp;in such a small app.I used this app just for personal use and&amp;nbsp;experimentation. Basically just a dev instance and it crashed and died a week ago or so. So by by database and all.&lt;br /&gt;
This motivated me to bring her back up again instead of ec2 I thought I would try rackspace. Replace the javascript with Dart! Well technically javascript generated by Dart. I have been writing a lot of Coffeescript lately which I don't mind but I really want to find something with DEPENDENCY MANAGEMENT! So Dart it was to see what it is like to code in.&lt;br /&gt;
First I made some Golang code updates to make hosting the static content a bit easier in the future. Then it was writing Dart. I tried the &lt;a href="http://www.dartlang.org/dartium/" target="_blank"&gt;Chromium&lt;/a&gt;&amp;nbsp;that is distributed with Dart to make the coding faster. I wasn't able to get it working quickly. Since it was a simple ajax request I just compiled Dart to Javascript from the command line using &lt;a href="http://www.dartlang.org/docs/dart-up-and-running/contents/ch04-tools-dart2js.html" target="_blank"&gt;Dart2js&lt;/a&gt;&amp;nbsp;tool. The Dart code:&amp;nbsp;&lt;a href="http://lhj.me/dart/ushort.dart" target="_blank"&gt;http://lhj.me/dart/ushort.dart&amp;nbsp;&lt;/a&gt;&lt;br /&gt;
I have already written about some of my complaints about Dart for a intro presentation I did last summer. The presentation and code are &lt;a href="https://github.com/lateefj/dart-intro" target="_blank"&gt;here&lt;/a&gt;. The presentation was more of an intro to the language as a general purpose language. Major complaints I had was about concurrency and some confusing OO features but mostly I found it an improvement on Javascript. Since I complain about... well ... everything it was a pretty short list of complaints.&lt;br /&gt;
A language that requires or is a pain to use without an IDE like Java I tend to shy away from. I mean it is hard enough to write code but to be fighting complex builds systems or tools that make coding extremely slow makes me want to run away. Vim (my editor of choice) has a &lt;a href="https://github.com/bartekd/vim-dart" target="_blank"&gt;bundle&lt;/a&gt; for syntax highlights for Dart which I installed. The indention is not so good but I assume it will get better as Dart becomes more popular. If I build anything more complex than a page of code I plan to use the IDE. The most surprising thing to me was when I went to compile it with type checking it failed to import the html package! ERROR: "Do not know how to load 'dart:html'". I guess this makes sense but I was pretty shocked thinking the types I was using would get checked. The type checks are a bit sad (dart --enable_type_checks) since it is a long command line option you pass to the dart vm. Takes digging for in the&amp;nbsp;documentation&amp;nbsp;to find (it will not show up if you type dart --help).&lt;br /&gt;
Since I know both Java and Javascript the syntax seems very natural. The API could use some help. I found the &lt;a href="http://api.dartlang.org/docs/releases/latest/dart_html/HttpRequest.html" target="_blank"&gt;HttpRequest&lt;/a&gt; documentation much to be desired. It took me a lot of trial and error to figure out how to do a POST with JSON. They added some useful things like a HttpRequest.get static method. I was surprised to find out there was no HttpRequest.post static method. Giving an intro screencast on how to build a Dart web app in 10 minutes 'get' save a lot of code however for the web apps I build I use POST as much if not more than GET.&lt;br /&gt;
From languages like Python, Ruby, Go or Coffeescript there seems to be a lot of typing. Compared to Java on the flip side it is a very terse language. About the same as Javascript maybe a small amount more if I want to compile with types.&lt;img src="http://feeds.feedburner.com/~r/HackingThoughtBlog/~4/QS_Sab4T3Og" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.hackingthought.com/feeds/2693516732448245759/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.hackingthought.com/2013/03/my-first-live-dart-go-web-app-lhjme.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1280594010967081625/posts/default/2693516732448245759?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1280594010967081625/posts/default/2693516732448245759?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/HackingThoughtBlog/~3/QS_Sab4T3Og/my-first-live-dart-go-web-app-lhjme.html" title="My first live Dart + Go web app (lhj.me)" /><author><name>Lateef Jackson</name><uri>https://plus.google.com/104965469689680679178</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-kwKiEJ2Nxbw/AAAAAAAAAAI/AAAAAAAAOpc/hr8MB2NSJK4/s512-c/photo.jpg" /></author><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://blog.hackingthought.com/2013/03/my-first-live-dart-go-web-app-lhjme.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0QMRno_fyp7ImA9WhBQEko.&quot;"><id>tag:blogger.com,1999:blog-1280594010967081625.post-194520584382248782</id><published>2013-03-14T10:29:00.003-04:00</published><updated>2013-03-14T10:29:47.447-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-03-14T10:29:47.447-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="rant" /><category scheme="http://www.blogger.com/atom/ns#" term="javascript" /><category scheme="http://www.blogger.com/atom/ns#" term="coffeescript" /><category scheme="http://www.blogger.com/atom/ns#" term="gwt" /><category scheme="http://www.blogger.com/atom/ns#" term="web" /><title>Coffeescript + requirejs keeping web app development bearable</title><content type="html">I have been building web applications since the turn of the&amp;nbsp;century&amp;nbsp;(and I have the grey hair in my beard to prove it). Back in my college days M$ was basically the only UI. Legacy Unix apps had X support and Linux seemed like it might be give no Windows GUI's a comeback until 2000 tech crash right when I graduated. Luckily my network programming and database programming allowed me to write web applications aka the only other interface game other than Windows. At the time Javascript was a dirty word. It was a&amp;nbsp;gimmicky Netscape (pre Mozilla pre Firefox) feature that didn't work on IE (90% of the market). IE6 came out and Firefox which had good Javascript support but maintaining 2 code bases for each browser to handle the&amp;nbsp;inconsistencies&amp;nbsp;seemed expensive. More importantly I developed on Linux and IE was 90% of the platform so I would have to develop on gasp XP?&lt;br /&gt;
Sea change game when Gmail was released combined with some snazzy demos with sprinkling of Javascript and AJAX! Autocomplete was what converted me over. Autocomplete user experience was worth the extra work. I was dipping my toe in for a while from 2004 to 2008 when I realized the change in Javascript AJAX request was going to also mean a change in backend server. I blogged back in 2008 about this: &lt;a href="http://blog.hackingthought.com/2008/09/new-web-server-design-for-new-web.html" target="_blank"&gt;"&lt;span style="background-color: white; color: #444444; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;"&gt;The new web seems to be lot of little request which means more small requests and it is going to require a lot more static resources.&lt;/span&gt;"&lt;/a&gt;&amp;nbsp;from then on I would start spending 50% of my development in Javascript GUI land.&lt;br /&gt;
I basically went though three phases before settling on what I am coding in now.&lt;br /&gt;
&lt;h4&gt;
Phase 1&lt;/h4&gt;
Generated Javascript by the backend was my first approach. All the apps I was building in the early days where based on web pages with some limited interactivity. Wanting to minimize browser&amp;nbsp;computability by&amp;nbsp;building backend widgets that would generate the HTML and Javascript so once a widget was made compatible with all the browsers it could be added to any web page with some level of confidence. This worked great for legacy apps that could be improved greatly with some simple show/hide or single ajax widget like autcomplete. This fell apart as the Javascript became the majority of the code being written.&lt;br /&gt;
&lt;h4&gt;
Phase 2&lt;/h4&gt;
The second generation was using jquery, YUI and other Javascript frameworks. Writing mountains of Javascript (10-100K) for a page. Selenium test made browser&amp;nbsp;compatibility&amp;nbsp;possible. The first advantage was being able to decouple the Javascript code base from the backend (Python/Java). Quickly found that Javascript lack of basic tooling like dependency&amp;nbsp;management, packaging and performance optimization really stood out. Reinventing the wheels was tedious and ineffective.&lt;br /&gt;
&lt;h4&gt;
Phase 3&lt;/h4&gt;
GWT solved all of these problems! The biggest problem was learning Java which I had been coding since the 90's in, so no big deal right. Wrong! Swapped out one build mess for another. A lot of developer seem to love Maven however I found it as time consuming if not more so than Makefiles or ant. Development was slow! Java may be fast at number crunching but it has always been a resource hog. 8Gigs of ram dual core 64bit solid state drive. Sit back and wait for you changes to get rebuilt before you can view them. Another trade of writing software is slow but managing it and running it is quick.&lt;br /&gt;
&lt;h4&gt;
Current Phase&lt;/h4&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/_AGPFq30aqYY/TVC8GrqRGXI/AAAAAAAAKcI/58gcjf_DcyY/s1600/bring+out+your+dead.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="176" src="http://3.bp.blogspot.com/_AGPFq30aqYY/TVC8GrqRGXI/AAAAAAAAKcI/58gcjf_DcyY/s320/bring+out+your+dead.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
Enter &lt;a href="http://requirejs.org/" target="_blank"&gt;Requirejs&lt;/a&gt; and &lt;a href="http://coffeescript.org/" target="_blank"&gt;Coffeescript&lt;/a&gt;! All tool choices are compromises. Making code changes and seeing those changes&amp;nbsp;immediately makes me more productive, keeps the momentum (critical&amp;nbsp;in any project)&amp;nbsp;and is more fun (look forward to&amp;nbsp;return&amp;nbsp;back to coding after a day off)! Coffeescript allows for immediate generation of Javascript so I don't have to wait for a compile step. It provides a sane for loops and other syntactical sugar greatly reducing lines of code. Requirejs make dependency management in Javascript bearable. As a backend developer I find manual dependency management feels like the dark ages (bring out your dead) of coding. Especially after the &lt;a href="http://blog.hackingthought.com/2012/02/golang-go-command-dependency-management.html" target="_blank"&gt;automagic of dependency management of a language like Go&lt;/a&gt;. I still waste a lot of time thinking about what file I should use to make sure the page loads faster and trying to manually consolidate code. There is a way to generate single Javascript files however after GWT all these techniques are pretty lame. Now that I embed my html templates in the Coffeescript source files and I render things in a way that lazy loads I am not loosing to much performance (famos last words about unmeasured performance).&lt;br /&gt;
&lt;h4&gt;
Future Phase?&lt;/h4&gt;
Dart seems to be a pretty good future option that solves some of the problems. Still has manual dependency management but it won't compile if that is wrong. Since I need to support 3-4 versions of IE back I am hoping I can fully test it out once IE12 comes out (not holding my breath on that release date). Until then I hope they fix the dependency management stuff using some type of url import statement. Until then I am just thankful for the great work of the Requirejs and Coffeescript teams.&lt;br /&gt;
&lt;br /&gt;&lt;img src="http://feeds.feedburner.com/~r/HackingThoughtBlog/~4/xBNDSIDkquk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.hackingthought.com/feeds/194520584382248782/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.hackingthought.com/2013/03/coffeescript-requirejs-keeping-web-app.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1280594010967081625/posts/default/194520584382248782?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1280594010967081625/posts/default/194520584382248782?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/HackingThoughtBlog/~3/xBNDSIDkquk/coffeescript-requirejs-keeping-web-app.html" title="Coffeescript + requirejs keeping web app development bearable" /><author><name>Lateef Jackson</name><uri>https://plus.google.com/104965469689680679178</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-kwKiEJ2Nxbw/AAAAAAAAAAI/AAAAAAAAOpc/hr8MB2NSJK4/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/_AGPFq30aqYY/TVC8GrqRGXI/AAAAAAAAKcI/58gcjf_DcyY/s72-c/bring+out+your+dead.jpg" height="72" width="72" /><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://blog.hackingthought.com/2013/03/coffeescript-requirejs-keeping-web-app.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkYGSH4zeCp7ImA9WhJVGUk.&quot;"><id>tag:blogger.com,1999:blog-1280594010967081625.post-7585305043518471582</id><published>2012-09-06T12:12:00.000-04:00</published><updated>2012-09-06T12:15:29.080-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-09-06T12:15:29.080-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="javascript" /><category scheme="http://www.blogger.com/atom/ns#" term="dartlang" /><title>Presentation / Discussion of Dart</title><content type="html">This blog post is about two months late since I gave the presentation / hosted a discussion about Dart over two months ago. 
This is the first talk I did which was all code. I figured it was an intro to a language so everything should be in that language. I organized it via a github repo: &lt;a href="https://github.com/lateefj/dart-intro"&gt;https://github.com/lateefj/dart-intro&lt;/a&gt;&amp;nbsp;I had all the slides opened in a vim tab and just when though each one demoing the code and discussing it.&lt;br /&gt;
&lt;br /&gt;
There where three types of developers at the meeting (technically&amp;nbsp;it was a Python/Django group but other came). These where some observations I had from the different groups.&lt;br /&gt;
Python/Django - They generally write backend software that uses mostly static web pages. Or generators like Rails, Django admin stuff. By and large they enjoy backend programming (Python / Ruby) and find Javascript for some snazzy UI stuff annoying to write in. Dart is not very appealing to them because it is a more taxing syntax "Javaish".&lt;br /&gt;
Java/GWT - By and large they see that Google is moving its mindshare to Dart from GWT and came wondering what all the hoopla is about. As a long time Java developer it is frustrating that the Java community has turned into a monolanguage culture. Since there is a library somewhere to do just about anything in Java it make most Java programmers look at everything with blinder. Dart looks like Java, smells like Java and&amp;nbsp;specifically&amp;nbsp;for GWT folks it generate Javascript so what is the point?&lt;br /&gt;
Javascript - The latest rage (or has it already died out). Anyway Javascript developers don't really see why an alternative is&amp;nbsp;necessary.&lt;br /&gt;
&lt;br /&gt;
In general I think everyone in the discussion found it&amp;nbsp;interesting even if most couldn't figure out why? My motivations was to learn mostly by discussing it with other developers. Bottom line for the types of large web applications that I have been developing I have tried man approaches (GWT, Coffeescript ect) but it all comes down to Javascript was design and built in the 90's and it is very difficult to over come its limitations. Will leave my thoughts about Dart for the next post....&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;img src="http://feeds.feedburner.com/~r/HackingThoughtBlog/~4/lSPo52G_KEI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.hackingthought.com/feeds/7585305043518471582/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.hackingthought.com/2012/09/presentation-discussion-of-dart.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1280594010967081625/posts/default/7585305043518471582?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1280594010967081625/posts/default/7585305043518471582?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/HackingThoughtBlog/~3/lSPo52G_KEI/presentation-discussion-of-dart.html" title="Presentation / Discussion of Dart" /><author><name>Lateef Jackson</name><uri>https://plus.google.com/104965469689680679178</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-kwKiEJ2Nxbw/AAAAAAAAAAI/AAAAAAAAOpc/hr8MB2NSJK4/s512-c/photo.jpg" /></author><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://blog.hackingthought.com/2012/09/presentation-discussion-of-dart.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0AASX4-eCp7ImA9WhVXEkk.&quot;"><id>tag:blogger.com,1999:blog-1280594010967081625.post-665295338969529890</id><published>2012-04-11T17:40:00.000-04:00</published><updated>2012-04-12T10:42:28.050-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-04-12T10:42:28.050-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="dartlang" /><category scheme="http://www.blogger.com/atom/ns#" term="python" /><category scheme="http://www.blogger.com/atom/ns#" term="pypy" /><category scheme="http://www.blogger.com/atom/ns#" term="golang" /><title>Part 2  Dart vs Go vs Python (and PyPy) Performance</title><content type="html">UPDATE: In the comments Will pointed out I had a bug in the Python code so updated 22:00 EST sorry.&lt;br /&gt;
UPDATE 2: Anonymous posted a more comparable version of the Go (http://pastie.org/3772555) so I updated the numbers 04-12-2012 09:00 EST (sorry). Please let me know if there are any other bug fixes!&lt;br /&gt;
&lt;br /&gt;
The previous post I wrote&amp;nbsp;&lt;a href="http://blog.hackingthought.com/2012/04/surprising-performance-from-dart.html"&gt;Surprising performance from Dart&lt;/a&gt;&amp;nbsp;inspired me to do some more test runs with Dart, Go, Python and PyPy. For round two of some simple performance&amp;nbsp;comparisons between&amp;nbsp;&amp;nbsp;Dart, Go, Python and PyPy I decided to do some basic file reading and processing. Since the vast majority of data that I process is JSON I decided to generate some random JSON data and store it into a file. Using each language read the entire file and for each line parse the JSON and aggregate it. Assuming I wrote the code right (big assumption) then I can get an idea which language is best for processing large sums of JSON. &lt;br /&gt;
&lt;br /&gt;
The code basically is broken down into a module (package) that contains an Aggregator class (type) and the main file which reads from the data file. The hosted repository is on &lt;a href="https://bitbucket.org/lateefj/dart_compare/src/9b832b7ef749/json"&gt;bitbucket&lt;/a&gt;.&lt;br /&gt;
Dart code:
&lt;script src="https://bitbucket.org/lateefj/dart_compare/src/9192e74713ca/json/stream.dart?embed=t"&gt;
&lt;/script&gt;
&lt;br /&gt;
I was able to code this using async style programming which in theory would maximize for IO performance if Dart supported async IO. I was a bit shaky at first with the terse syntax of the onLine callback but I am getting a bit ok with it. &amp;nbsp;The duplicate use of StringInputStream seems a bit wordy, probably could have just said "var stream" instead of "StringInputStream stream" to increase&amp;nbsp;readability&amp;nbsp;(Go got this right with the := syntax). Otherwise the code is very straight forward.&lt;br /&gt;
&lt;br /&gt;
Since Dart is design for the browser and it is a preview the IO would be very slow but I expected it to be able to process JSON very fast since that is a large part of what a modern web application does. This also means that the StringInputStream should be pretty fast since it will be the main source of data for the application. Go would probably outperform Python and not really sure about Python vs PyPy. I figured PyPy would use more memory but be faster for doing&amp;nbsp;aggregation.&lt;br /&gt;
&lt;br /&gt;
Runtime comparison:&lt;br /&gt;
&lt;script src="https://www.google.com/jsapi" type="text/javascript"&gt;
&lt;/script&gt;
  &lt;script type="text/javascript"&gt;
      google.load("visualization", "1", {packages:["corechart"]});
      google.setOnLoadCallback(drawChart);
      function drawChart() {
        var data = new google.visualization.DataTable();
        data.addColumn('string', 'Language');
        data.addColumn('number', 'Runtime');
        data.addRows([
          ['Python', 1.399],
          ['PyPy', 2.717],
          ['Dart', 26.454],
          ['Go (run)', 3.042],
          ['Go', 2.845]
        ]);

        var options = {
          title: 'Runtime Performance',
          vAxis: {title: 'Seconds',  titleTextStyle: {color: 'red'}},
          hAxis: {title: 'Language', titleTextStyle: {color: 'red'}}
        };

        var chart = new google.visualization.ColumnChart(document.getElementById('json_runtime_div'));
        chart.draw(data, options);
      }
    
&lt;/script&gt;
&lt;br /&gt;
&lt;div id="json_runtime_div" style="height: 600px; width: 600px;"&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is only 10,000 JSON documents in a single file. I have no idea how it does it but Python just kills it. Not that surprising that it is 18x faster than Dart but 2x (roughly) faster than Go is pretty amazing I knew the Python 2.x IO was fast but I didn't realize it was this fast. I think there could be a faster way to process the JSON in Go it just didn't jump out at me to do it without using the Unamarshal.&lt;br /&gt;
&lt;br /&gt;
Memory comparison:&lt;br /&gt;
&lt;script type="text/javascript"&gt;
      google.load("visualization", "1", {packages:["corechart"]});
      google.setOnLoadCallback(drawChart);
      function drawChart() {
        var data = new google.visualization.DataTable();
        data.addColumn('string', 'Language');
        data.addColumn('number', 'Runtime');
        data.addRows([
          ['Python', 4692],
          ['PyPy', 56844],
          ['Dart', 503024],
          ['Go (run)', 37712],
          ['Go', 2076]
        ]);

        var options = {
          title: 'Memory Performance',
          //vAxis: {title: 'Seconds',  titleTextStyle: {color: 'red'}}
          hAxis: {title: 'Language', titleTextStyle: {color: 'red'}}
        };

        var chart = new google.visualization.ColumnChart(document.getElementById('json_memory_div'));
        var formatter = new google.visualization.NumberFormat({pattern:'#,###'});
        formatter.format(data, 1); // Apply formatter to second column
        chart.draw(data, options);
      }
    
&lt;/script&gt;
&lt;br /&gt;
&lt;div id="json_memory_div" style="height: 600px; width: 600px;"&gt;
&lt;/div&gt;
&lt;br /&gt;
I expected Go to have used the least memory but didn't expect it to be so tiny (2,076, after update Python is 4,692). Dart was unusable but that is expected in a preview release. PyPy is not much better I guess I need to send them a note and ask them what they think. Python again rock star here.&lt;br /&gt;
&lt;br /&gt;
I have&amp;nbsp;chosen&amp;nbsp;to kick the tires at a pretty high level but I think it is a realistic situation since web apps these days are processing a lot of JSON. Dart faired as expected for a preview release. Python rock star status as usual. PyPy we will see what happens when I contact them about it. Finally Go was very&amp;nbsp;disappointing&amp;nbsp;how much runtime it took to process the JSON, however it did recover some dignity by it exceptional use of memory.&lt;img src="http://feeds.feedburner.com/~r/HackingThoughtBlog/~4/v1mBipXIAZg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.hackingthought.com/feeds/665295338969529890/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.hackingthought.com/2012/04/part-2-dart-vs-go-vs-python-and-pypy.html#comment-form" title="22 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1280594010967081625/posts/default/665295338969529890?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1280594010967081625/posts/default/665295338969529890?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/HackingThoughtBlog/~3/v1mBipXIAZg/part-2-dart-vs-go-vs-python-and-pypy.html" title="Part 2  Dart vs Go vs Python (and PyPy) Performance" /><author><name>Lateef Jackson</name><uri>https://plus.google.com/104965469689680679178</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-kwKiEJ2Nxbw/AAAAAAAAAAI/AAAAAAAAOpc/hr8MB2NSJK4/s512-c/photo.jpg" /></author><thr:total>22</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://blog.hackingthought.com/2012/04/part-2-dart-vs-go-vs-python-and-pypy.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkcDRXY-cSp7ImA9WhVXEkk.&quot;"><id>tag:blogger.com,1999:blog-1280594010967081625.post-4463592864957711094</id><published>2012-04-05T22:00:00.000-04:00</published><updated>2012-04-12T10:14:34.859-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-04-12T10:14:34.859-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="dartlang" /><category scheme="http://www.blogger.com/atom/ns#" term="python" /><category scheme="http://www.blogger.com/atom/ns#" term="pypy" /><category scheme="http://www.blogger.com/atom/ns#" term="golang" /><title>Surprising performance from Dart</title><content type="html">About every two years I try to learn a new programming language. I find the new language opens up a new set of applications and I can use it to improve existing applications. Dart this year mainly because I have been writing a lot of GWT (Java -&amp;gt; Javascript) and Javascript over the last couple years. They both have a lot going for them and against them. From what I have read about Dart it takes the best parts from both.&lt;br /&gt;
&amp;nbsp;GWT Complaints:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Costly project setup and&amp;nbsp;maintenance&lt;/li&gt;
&lt;li&gt;Java development is slow&lt;/li&gt;
&lt;li&gt;Language and library&amp;nbsp;incompatibilities&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&amp;nbsp;Trying to setup and maintain a GWT application is a project in itself. From what I have used of Maven it seems to save little time if any. Then there are a lot of choices of design vs performance and cross browser support that are pretty loose / loose.&lt;br /&gt;
Java development is slow. Yep I said it and many say it isn't but it is. The JVM is extremely fast at doing a lot of things&amp;nbsp;unfortunately&amp;nbsp;it seems all development type things like IDE (GUI), compilation and building use excessive amounts of CPU and memory in the JVM. It is jaw dropping to see a hello world REST service take up the better part of 100MB (jar dependencies mostly from maven). Reloading a page using GWT (any servlet for that matter) requires a recompile step that is slow and bottom line a momentum killer.&lt;br /&gt;
GWT has support for calling into other Javascript libraries but it is not trivial. A lot of productivity is lost not being able to add a jquery plugin to a page in 10 seconds.&lt;br /&gt;
&lt;br /&gt;
Where GWT kills it is deployment. The end product (assuming you can get it built) is a fully optimized cross platform&amp;nbsp;wonderfulness&amp;nbsp;that would take massive amounts of time to get equivalent Javascript app built.&lt;br /&gt;
&lt;br /&gt;
Javascript Complaints:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Hard to manage large code bases&lt;/li&gt;
&lt;li&gt;Browser&amp;nbsp;incompatibilities&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
Trying to manage a large Javascript code base extremely painful. After a couple files it gets messy and slow. Keeping related code in&amp;nbsp;separate&amp;nbsp;files is really nice however it has an impact that those files have to get loaded into the browser unless you are using some build system. Then there is a lot of decorating of pages that only need X amount of code vs another page which needs a different set. There are ways but namespace seems like something that should be built into the language like almost every other programming language.&lt;/div&gt;
&lt;div&gt;
Debugging IE is what my generation of developers will be telling war stories over someday I suppose. However I feel like it is time to move on. Over a decade of doing it is time to&amp;nbsp;innovate&amp;nbsp;beyond these kind of&amp;nbsp;shenanigans.&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
The great part about Javascript is it is extremely fast to develop. I don't even have to download the framework I can just add a script tag to the page and reload the page. This is really great for getting products built quickly or adding features quickly.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Dart:&lt;/div&gt;
&lt;div&gt;
Static type safe compilation as an option for those really large code bases (libraries anyone). However also the ability to just reload the browser for fast development. New language but with very simular syntax as Javascript that compiles to Javascript to support legacy browsers? Maybe the best of both worlds plus a bit more ontop?&lt;/div&gt;
&lt;div&gt;
With most programming languages I play with I start with &lt;a href="http://en.wikipedia.org/wiki/Fibonacci_number"&gt;Fibonacci&lt;/a&gt;&amp;nbsp;number sequence as the first program. I am a fan of Fibonacci and it is a very simple algorithm to get the basics of a language. So lets take a look at the code:&lt;/div&gt;
&lt;div&gt;
Dart fib code:&lt;/div&gt;
&lt;pre class="js" name="code"&gt;fib(int n) {
  if (n == 1) {
    return 1;
  } else if (n == 0) {
    return 0;
  } else {
    return fib(n-1) + fib(n-2);
  }
}

  main() {
    var length = 35;
    for (int i = 0; i &amp;lt; length; i++) {
      print(fib(i));
    }
  }
&lt;/pre&gt;
&lt;div&gt;
&lt;br /&gt;
I decided to benchmark compare Dart with Python, PyPy and Go run (go run fib.go) &amp;nbsp;which compiles and runs the the program and then compiled it to see it fully optimized.&lt;br /&gt;
&lt;script type="text/javascript" src="https://www.google.com/jsapi"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt;
      google.load("visualization", "1", {packages:["corechart"]});
      google.setOnLoadCallback(drawChart);
      function drawChart() {
        var data = new google.visualization.DataTable();
        data.addColumn('string', 'Language');
        data.addColumn('number', 'Runtime');
        data.addRows([
          ['Python', 9.632],
          ['PyPy', 0.774],
          ['Dart', 0.255],
          ['Go (run)', 0.201],
          ['Go', 0.161]
        ]);

        var options = {
          title: 'Runtime Performance',
          vAxis: {title: 'Seconds',  titleTextStyle: {color: 'red'}},
          hAxis: {title: 'Language', titleTextStyle: {color: 'red'}}
        };

        var chart = new google.visualization.ColumnChart(document.getElementById('runtime_div'));
        chart.draw(data, options);
      }
    &lt;/script&gt;
&lt;div id="runtime_div" style="width: 600px; height: 600px;"&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
Then I compared memory utilization:
&lt;br /&gt;
&lt;script type="text/javascript"&gt;
      google.load("visualization", "1", {packages:["corechart"]});
      google.setOnLoadCallback(drawChart);
      function drawChart() {
        var data = new google.visualization.DataTable();
        data.addColumn('string', 'Language');
        data.addColumn('number', 'Runtime');
        data.addRows([
          ['Python', 3992],
          ['PyPy', 26832],
          ['Dart', 5056],
          ['Go (run)', 6256],
          ['Go', 572]
        ]);

        var options = {
          title: 'Memory Performance',
          //vAxis: {title: 'Seconds',  titleTextStyle: {color: 'red'}}
          hAxis: {title: 'Language', titleTextStyle: {color: 'red'}}
        };

        var chart = new google.visualization.ColumnChart(document.getElementById('memory_div'));
        var formatter = new google.visualization.NumberFormat({pattern:'#,###'});
        formatter.format(data, 1); // Apply formatter to second column
        chart.draw(data, options);
      }
    &lt;/script&gt;
&lt;div id="memory_div" style="width: 600px; height: 600px;"&gt;&lt;/div&gt;
  


&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Fat disclaimer about the benchmark is that this is basically a number crunching thing that I ran a couple times to take these numbers for what they are (primitive). PyPy being way faster than Python is not a surprise at all. Lets take Python out because it is is skewing the chart.&lt;br /&gt;
&lt;script type="text/javascript"&gt;
      google.load("visualization", "1", {packages:["corechart"]});
      google.setOnLoadCallback(drawChart);
      function drawChart() {
        var data = new google.visualization.DataTable();
        data.addColumn('string', 'Language');
        data.addColumn('number', 'Runtime');
        data.addRows([
          ['PyPy', 0.774],
          ['Dart', 0.255],
          ['Go (run)', 0.201],
          ['Go', 0.161]
        ]);

        var options = {
          title: 'Runtime Performance',
          vAxis: {title: 'Seconds',  titleTextStyle: {color: 'red'}},
          hAxis: {title: 'Language', titleTextStyle: {color: 'red'}}
        };

        var chart = new google.visualization.ColumnChart(document.getElementById('runtime_short_div'));
        chart.draw(data, options);
      }
    &lt;/script&gt;
&lt;div id="runtime_short_div" style="width: 600px; height: 600px;"&gt;&lt;/div&gt;

&lt;br /&gt;
&lt;br /&gt;
The first really big surprise was the Dart was faster than PyPy. Another big surprise was how much memory PyPy was using like 5X (JIT maybe that is why Java is such a memory hog). Dart had amazing performance and memory utilization for a preview release of a&amp;nbsp;language. The compiled version of Go had amazingly low memory utilization which lines up with my experience running a web app written in Go. &amp;nbsp;This is very primitive experiment so I think I will try something next time with a little more complexity to see if CPU and memory hold up with a little bit of pounding. This is exciting news because I think Dart can be not only a front end web language but also a backend language. Gives me ideas!&lt;br /&gt;
&lt;br /&gt;
Update: &lt;a href="http://blog.hackingthought.com/2012/04/part-2-dart-vs-go-vs-python-and-pypy.html"&gt;Part 2&lt;/a&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/HackingThoughtBlog/~4/_dlE5lEo8ps" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.hackingthought.com/feeds/4463592864957711094/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.hackingthought.com/2012/04/surprising-performance-from-dart.html#comment-form" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1280594010967081625/posts/default/4463592864957711094?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1280594010967081625/posts/default/4463592864957711094?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/HackingThoughtBlog/~3/_dlE5lEo8ps/surprising-performance-from-dart.html" title="Surprising performance from Dart" /><author><name>Lateef Jackson</name><uri>https://plus.google.com/104965469689680679178</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-kwKiEJ2Nxbw/AAAAAAAAAAI/AAAAAAAAOpc/hr8MB2NSJK4/s512-c/photo.jpg" /></author><thr:total>3</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://blog.hackingthought.com/2012/04/surprising-performance-from-dart.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0EMRns6fSp7ImA9WhVSE0k.&quot;"><id>tag:blogger.com,1999:blog-1280594010967081625.post-3170512213682389632</id><published>2012-03-09T22:16:00.002-05:00</published><updated>2012-03-09T22:21:27.515-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-03-09T22:21:27.515-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="riak" /><category scheme="http://www.blogger.com/atom/ns#" term="go" /><category scheme="http://www.blogger.com/atom/ns#" term="golang" /><category scheme="http://www.blogger.com/atom/ns#" term="database" /><title>Added Secondary Index support to goriak</title><content type="html">Have been pretty heads down on writing business software and was getting a little burnt. So to revive I hacked a little on the driver I have been playing with for &lt;a href="http://golang.org/"&gt;Go (golang)&lt;/a&gt; to use &lt;a href="http://wiki.basho.com/Riak.html"&gt;Riak&lt;/a&gt;. There are basically 3 motivations other than I need to do a little fun hacking to recharge the batteries.&lt;br /&gt;
&lt;div&gt;
&lt;ol&gt;
&lt;li&gt;Go weekly is getting close to version 1 so they added packaging using the "go command" which I cover in a &lt;a href="http://blog.hackingthought.com/2012/02/golang-go-command-dependency-management.html"&gt;previous blog&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Riak add &lt;a href="http://wiki.basho.com/Secondary-Indexes.html"&gt;secondary index&lt;/a&gt;&amp;nbsp;which is so much more developer friendly than before.&lt;/li&gt;
&lt;li&gt;The types of problems I really enjoy solving are ones that Go and Riak would be good tools for.&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
Quick recap is that I had the basic support for key/value store with a hint to the type to structure to marshal it would do the conversion of struct to json and back. Get, Put and Delete basically was all that was implemented at the time.&amp;nbsp;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
Secondary Indexes provide a binary (string) and integer types for indexing. I implemented exact match and range queries. So method signatures:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
SearchBin(bucketName, index, value string) ([]string, error)&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
SearchBinRange(bucketName, index string, start, end string) ([]string, error)&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
SearchInt(bucketName, index string, value int) ([]string, error)&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
SearchIntRange(bucketName, index string, start, end int) ([]string, error)&amp;nbsp;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Now there is a complete example included with the source code:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;script src="https://bitbucket.org/lateefj/goriak/src/505f8a7e1728/examples/basic.go?embed=t"&gt;
&lt;/script&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Time to billed that kill web service! Source code is on bitbucket:&amp;nbsp;&lt;a href="https://bitbucket.org/lateefj/goriak/"&gt;https://bitbucket.org/lateefj/goriak/&lt;/a&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/HackingThoughtBlog/~4/Rrl7huLLTao" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.hackingthought.com/feeds/3170512213682389632/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.hackingthought.com/2012/03/added-secondary-index-support-to-goriak.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1280594010967081625/posts/default/3170512213682389632?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1280594010967081625/posts/default/3170512213682389632?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/HackingThoughtBlog/~3/Rrl7huLLTao/added-secondary-index-support-to-goriak.html" title="Added Secondary Index support to goriak" /><author><name>Lateef Jackson</name><uri>https://plus.google.com/104965469689680679178</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-kwKiEJ2Nxbw/AAAAAAAAAAI/AAAAAAAAOpc/hr8MB2NSJK4/s512-c/photo.jpg" /></author><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://blog.hackingthought.com/2012/03/added-secondary-index-support-to-goriak.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkIHR3o-eyp7ImA9WhVTF08.&quot;"><id>tag:blogger.com,1999:blog-1280594010967081625.post-7633878492366172972</id><published>2012-03-02T15:34:00.001-05:00</published><updated>2012-03-02T15:35:36.453-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-03-02T15:35:36.453-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="javascript" /><category scheme="http://www.blogger.com/atom/ns#" term="cloud" /><category scheme="http://www.blogger.com/atom/ns#" term="python" /><category scheme="http://www.blogger.com/atom/ns#" term="architecture" /><title>Presentation on Error Handling with event sourcing</title><content type="html">Slides:https://docs.google.com/presentation/d/1Xs-Q1ZkiDW9wolk3vYqqyq9aBpdImv_xzYxlJYfKxzQ/edit#slide=id.p&lt;br /&gt;
In my ever growing desire to be able to automate&amp;nbsp;capturing&amp;nbsp;all errors and being able to validate fixing them I put together a demo and some simple code&amp;nbsp;https://github.com/lateefj/cltpy_chat. Basically it captures all events and marks session that have a strack trace error in them so that they can be later found and rerun on the system. The idea being some day to be able to capture all events and then rerun them agains the code that has fixed them to prove that the fix will work. I am hoping to come out with some tools for Javascript and Python to be able to easily automate this.&lt;img src="http://feeds.feedburner.com/~r/HackingThoughtBlog/~4/_s540xbbEdw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.hackingthought.com/feeds/7633878492366172972/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.hackingthought.com/2012/03/presentation-on-error-handling-with.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1280594010967081625/posts/default/7633878492366172972?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1280594010967081625/posts/default/7633878492366172972?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/HackingThoughtBlog/~3/_s540xbbEdw/presentation-on-error-handling-with.html" title="Presentation on Error Handling with event sourcing" /><author><name>Lateef Jackson</name><uri>https://plus.google.com/104965469689680679178</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-kwKiEJ2Nxbw/AAAAAAAAAAI/AAAAAAAAOpc/hr8MB2NSJK4/s512-c/photo.jpg" /></author><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://blog.hackingthought.com/2012/03/presentation-on-error-handling-with.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CU8AQX4zfip7ImA9WhRaGE4.&quot;"><id>tag:blogger.com,1999:blog-1280594010967081625.post-7263940890314499541</id><published>2012-02-21T09:17:00.002-05:00</published><updated>2012-02-21T09:17:20.086-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-02-21T09:17:20.086-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="java" /><category scheme="http://www.blogger.com/atom/ns#" term="python" /><category scheme="http://www.blogger.com/atom/ns#" term="go" /><category scheme="http://www.blogger.com/atom/ns#" term="golang" /><title>golang go command &amp; dependency management</title><content type="html">&lt;span style="font-size: x-large;"&gt;Finally decent dependency management!&lt;/span&gt;&lt;br /&gt;
The&amp;nbsp;elephant&amp;nbsp;in the room has always been that the code depends on specific versions of software to build and or run. Once you accept this putting dependencies in the source code is very obvious. A quick comparison of the languages I use most:&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-size: large;"&gt;Javascript:&lt;/span&gt;&lt;br /&gt;
Bottom line javascript doesn't really do any dependency management that is left for the most part up to the developer to make sure that all the required packages are included on the page or using some framework. There seems to be some magic possible with coffeescript, GWT or other web frameworks that provide dependency management however are not interoperable. This is nasty as web apps get really large. I am looking to&amp;nbsp;&lt;a href="http://www.dartlang.org/"&gt;Dart&lt;/a&gt;&amp;nbsp;in the future to solve this.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-size: large;"&gt;Java:&lt;/span&gt;&lt;br /&gt;
The only real game in town is &lt;a href="http://maven.apache.org/"&gt;Maven&lt;/a&gt;. The XML file configuration is horrendous IMO especially compared to Ant. The&amp;nbsp;enormous&amp;nbsp;amount of jars and memory needed to compile a simple web service is surprising. Finally the support for maven repository is far from universal.&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-size: large;"&gt;Python:&lt;/span&gt;&lt;br /&gt;
Probably the best with a combination of virtualenvwrapper, pip and running pip freeze this is by far the fastest and easiest to use until go get command came along. There is still manual tracking of dependencies where even if it is simple "pip freeze &amp;gt; deps.txt".&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-size: large;"&gt;Go:&lt;/span&gt;&lt;br /&gt;
This is covered pretty completely &lt;a href="http://areyoufuckingcoding.me/2012/02/14/the-go-tool/"&gt;here&lt;/a&gt;&amp;nbsp;(caution for the&amp;nbsp;sensitive the blog is pretty graphic). Bottom line if I have added dependency I run "go get" and they are automatically downloaded from the import statements in my source code. I can run "go build" without any Makefile or build script. Once I has pushed up my library into the interwebs and another library is added to the go world.&lt;br /&gt;
&lt;br /&gt;
This forces the master/default/trunk of the repo to be production. New code must be developed in a branch but isn't that how it should be anyway? The dependency (pom.xml, pip freeze, ect) configuration is commit into the source tree anyway (usually with some&amp;nbsp;additional&amp;nbsp;instructions). Lets hope other languages start supporting this!&lt;img src="http://feeds.feedburner.com/~r/HackingThoughtBlog/~4/zEwEcDB7jFg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.hackingthought.com/feeds/7263940890314499541/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.hackingthought.com/2012/02/golang-go-command-dependency-management.html#comment-form" title="4 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1280594010967081625/posts/default/7263940890314499541?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1280594010967081625/posts/default/7263940890314499541?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/HackingThoughtBlog/~3/zEwEcDB7jFg/golang-go-command-dependency-management.html" title="golang go command &amp; dependency management" /><author><name>Lateef Jackson</name><uri>https://plus.google.com/104965469689680679178</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-kwKiEJ2Nxbw/AAAAAAAAAAI/AAAAAAAAOpc/hr8MB2NSJK4/s512-c/photo.jpg" /></author><thr:total>4</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://blog.hackingthought.com/2012/02/golang-go-command-dependency-management.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C08DQn0-fip7ImA9WhRbGEw.&quot;"><id>tag:blogger.com,1999:blog-1280594010967081625.post-4114309542592128669</id><published>2012-02-09T13:24:00.000-05:00</published><updated>2012-02-09T13:24:33.356-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-02-09T13:24:33.356-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="nosql" /><category scheme="http://www.blogger.com/atom/ns#" term="architecture" /><title>Event Sourcing</title><content type="html">&lt;a href="http://martinfowler.com/eaaDev/EventSourcing.html"&gt;Event Sourcing&lt;/a&gt;: Bingo! I have started to experiment by building applications. Now that NoSQL and cloud storage solution allow for basically unlimited storage capacity this is very accesible option. Event Sourcing could be added an application that is using an RDBMS. Storing the current state in and RDBMS or any indexed data store (in my case MongoDB with some tuned indexes). One of the main goals I have it to track all the UI (Javascript) events so that any error I can replay everything that happens to debug it. I have done this before in a game but never hooked in the error replay so can't wait to see how it works.&lt;img src="http://feeds.feedburner.com/~r/HackingThoughtBlog/~4/5AiwbMXzrbE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.hackingthought.com/feeds/4114309542592128669/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.hackingthought.com/2012/02/event-sourcing.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1280594010967081625/posts/default/4114309542592128669?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1280594010967081625/posts/default/4114309542592128669?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/HackingThoughtBlog/~3/5AiwbMXzrbE/event-sourcing.html" title="Event Sourcing" /><author><name>Lateef Jackson</name><uri>https://plus.google.com/104965469689680679178</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-kwKiEJ2Nxbw/AAAAAAAAAAI/AAAAAAAAOpc/hr8MB2NSJK4/s512-c/photo.jpg" /></author><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://blog.hackingthought.com/2012/02/event-sourcing.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C04EQns_eyp7ImA9WhRQEk8.&quot;"><id>tag:blogger.com,1999:blog-1280594010967081625.post-7899641461482363029</id><published>2011-12-06T17:23:00.000-05:00</published><updated>2011-12-06T20:38:23.543-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-12-06T20:38:23.543-05:00</app:edited><title>InfoQ: Events Are Not Just for Notifications</title><content type="html">&lt;a href="http://www.infoq.com/presentations/Events-Are-Not-Just-for-Notifications"&gt;InfoQ: Events Are Not Just for Notifications&lt;/a&gt;: &lt;br /&gt;
&lt;br /&gt;
It is nice to see a fantastic&amp;nbsp;explanation&amp;nbsp;of what I think of as Event Programming. I have blog about a way to implement a simple&lt;a href="http://blog.hackingthought.com/2008/08/event-programming-using-google.html"&gt; Javascript dispatcher&lt;/a&gt; and implementing a&lt;a href="http://blog.hackingthought.com/2009/10/adventures-in-event-everywhere.html"&gt; cross platform event system&lt;/a&gt;. And have been chomping at the bit to implement a fully audited application that stores all the events in one of these new document databases (MongoDB, Riak). To be able to mark any user session with an error (or even allow them to report an error) and then to "replay" that users session would be pretty hot. The concept is difficult but&amp;nbsp;implementation&amp;nbsp;is so much easier especially testing. Now to just&amp;nbsp;evangelize&amp;nbsp;until it is&amp;nbsp;considered&amp;nbsp;a "Best Practice".&lt;img src="http://feeds.feedburner.com/~r/HackingThoughtBlog/~4/WZx-Roy9up8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.hackingthought.com/feeds/7899641461482363029/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.hackingthought.com/2011/12/infoq-events-are-not-just-for.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1280594010967081625/posts/default/7899641461482363029?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1280594010967081625/posts/default/7899641461482363029?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/HackingThoughtBlog/~3/WZx-Roy9up8/infoq-events-are-not-just-for.html" title="InfoQ: Events Are Not Just for Notifications" /><author><name>Lateef Jackson</name><uri>https://plus.google.com/104965469689680679178</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-kwKiEJ2Nxbw/AAAAAAAAAAI/AAAAAAAAOpc/hr8MB2NSJK4/s512-c/photo.jpg" /></author><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://blog.hackingthought.com/2011/12/infoq-events-are-not-just-for.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0MFRns7cCp7ImA9WhdaEUw.&quot;"><id>tag:blogger.com,1999:blog-1280594010967081625.post-5919332470267492824</id><published>2011-10-20T08:56:00.002-04:00</published><updated>2011-10-20T08:56:57.508-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-20T08:56:57.508-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="cloud" /><category scheme="http://www.blogger.com/atom/ns#" term="python" /><category scheme="http://www.blogger.com/atom/ns#" term="nosql" /><category scheme="http://www.blogger.com/atom/ns#" term="architecture" /><category scheme="http://www.blogger.com/atom/ns#" term="database" /><title>Presentation on Cloud Deployment &amp; Mongodb @ Charlotte Python Group</title><content type="html">A few weeks back I have a presentation on using Fabric to deploy Python WSGI application in the cloud. &amp;nbsp;The slides are:&lt;a href="https://docs.google.com/present/view?id=dg3v9j47_210cxt77g7h"&gt;https://docs.google.com/present/view?id=dg3v9j47_210cxt77g7h&lt;/a&gt; &lt;br /&gt;
The code from the demo is here:&lt;a href="http://www.blogger.com/%C2%A0https://github.com/lateefj/RTC-example"&gt;&amp;nbsp;https://github.com/lateefj/RTC-example&lt;/a&gt;&lt;br /&gt;
In the presentation I displayed how taking down one node in the cluster would not interrupt the other two nodes. Using fabric this was not only&amp;nbsp;feasible&amp;nbsp;but&amp;nbsp;relatively&amp;nbsp;easy once you understand the architecture. I also review the tools that I used like supervisor to restart WSGI (Flask), fabric for deployment and servers setup and finally mongodb for data storage.&lt;br /&gt;
&lt;br /&gt;
I also quickly introduced mongodb:&amp;nbsp;&lt;a href="https://docs.google.com/present/view?id=dg3v9j47_212g2kvq2tv"&gt;https://docs.google.com/present/view?id=dg3v9j47_212g2kvq2tv&lt;/a&gt;&lt;br /&gt;
The main point I was trying to make was that in early development RDBMS strict&amp;nbsp;schema&amp;nbsp;just get in the way of fast development. It is a great tool for prototyping. I use it anytime at the beginning of a project because I don't know the final data model. Also my past experience is that every mature application that has an RDBMS is that the schema is totally crazy to work with. So why not start with a very flexible schema and give it some room to evolve as the application matures.&lt;img src="http://feeds.feedburner.com/~r/HackingThoughtBlog/~4/V3lUqV9BfBc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.hackingthought.com/feeds/5919332470267492824/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.hackingthought.com/2011/10/presentation-on-cloud-deployment.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1280594010967081625/posts/default/5919332470267492824?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1280594010967081625/posts/default/5919332470267492824?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/HackingThoughtBlog/~3/V3lUqV9BfBc/presentation-on-cloud-deployment.html" title="Presentation on Cloud Deployment &amp; Mongodb @ Charlotte Python Group" /><author><name>Lateef Jackson</name><uri>https://plus.google.com/104965469689680679178</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-kwKiEJ2Nxbw/AAAAAAAAAAI/AAAAAAAAOpc/hr8MB2NSJK4/s512-c/photo.jpg" /></author><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://blog.hackingthought.com/2011/10/presentation-on-cloud-deployment.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkMDQX47fSp7ImA9WhZaEkQ.&quot;"><id>tag:blogger.com,1999:blog-1280594010967081625.post-345314250683420440</id><published>2011-06-12T09:40:00.003-04:00</published><updated>2011-06-28T15:47:50.005-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-06-28T15:47:50.005-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="cloud" /><category scheme="http://www.blogger.com/atom/ns#" term="linux" /><category scheme="http://www.blogger.com/atom/ns#" term="architecture" /><title>Startup Cloud Cluster on a Budget</title><content type="html">&lt;div style="background-color: transparent; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;h3 id="internal-source-marker_0.9483688059262931"&gt;&lt;span class="Apple-style-span" style="font-family: Arial;"&gt;&lt;span class="Apple-style-span" style="white-space: pre-wrap;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Recently I have been working on a project that needed a highly available service. Since I have been pitching “the three pillars of a service: robust, fast and accessible”. With all the marketing hype around cloud computing and choices from something like Google AppEngine that provides a very restricted environment to something like Amazon AWS which just provides virtual hardware. The problem is that creating a service from scratch but I can’t live with the restrictions of something like AppEngine or Heruku nor do I want to spend a ton of time setting up something like AWS and Cassandra. This is a two part blog on setting up a robust, fast and accessible service in a few hours and for a very affordable price. &lt;/span&gt;&lt;br /&gt;
&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;This blog will cover the concepts and overview of the solution and the technologies used for the implementation. The second blog will cover the configuration and deployment.&lt;/span&gt;&lt;br /&gt;
&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h2&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 18pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;3-legged Table&lt;/span&gt;&lt;/h2&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;I have come to the belief that for any service to compete it has to be supported by a three legged table where the legs are Robust, Fast and Accessible. Without any one of these the table is only valuable to produce heat in the fireplace.&lt;/span&gt;&lt;br /&gt;
&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h3&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 14pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Robust&lt;/span&gt;&lt;/h3&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Web systems should not have “scheduled downtime”. I think that the convergence of two things have force us web developers to architect for 0 scheduled downtime. The first is to provide a 24/7 business platform for our users. The second is after launch the software is alive with continues updates until it gets turned off. Traditional business systems ran during business hours and then could be “maintained” from 5pm pacific time to 8am eastern time. There is a general move to a continuous updates of software where the more frequently the updates the more stable the system is and faster the technology can adjust to the business need (I am a fan). &lt;/span&gt;&lt;br /&gt;
&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h3&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 14pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Fast&lt;/span&gt;&lt;/h3&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Usage can be directly correlated to the performance of a service. In a competitive market slow services will not be able to compete. Premature optimization has been the road to ruin of many a project but the ability to quickly optimize the service after launch will decide the success of the product. &lt;/span&gt;&lt;br /&gt;
&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h3&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 14pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Accessible&lt;/span&gt;&lt;/h3&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;The point of a service is for it to be access by users. One of the reasons I think that JSON became so popular is it simplicity. Again in competitive markets the barrier to entry approaches zero. This mean well document services that support 80% of the platforms (mobile, desktop ect) is a requirement to compete in the marketplace. &lt;/span&gt;&lt;br /&gt;
&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h2&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 18pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Tools&lt;/span&gt;&lt;/h2&gt;&lt;h3&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 14pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Linux&lt;/span&gt;&lt;/h3&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;This is a given for they types of service that I build. I could see a specific service that was for M$ that required using libraries that only work with Windows however I don’t image easy would be a part of that setup. Specifically I use Ubuntu however the configuration files / deploy script could very quickly be changed to use any Linux / BSD distribution. &lt;/span&gt;&lt;br /&gt;
&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h3&gt;&lt;a href="http://docs.fabfile.org/"&gt;&lt;span style="background-color: transparent; color: #000099; font-family: Arial; font-size: 14pt; font-style: normal; font-weight: bold; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;"&gt;Fabric&lt;/span&gt;&lt;/a&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 14pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt; &lt;/span&gt;&lt;/h3&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Fabric is a Python tool for doing system administrative tasks. There are a lot of tools that do this most are pretty specific I find this tool provides the best balance between easy of use and flexibility. The problem I have with shell scripts is they tend to be great to start with but quickly find the limits when needing to do some string manipulation. &lt;/span&gt;&lt;br /&gt;
&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h3&gt;&lt;a href="http://nginx.net/"&gt;&lt;span style="background-color: transparent; color: #000099; font-family: Arial; font-size: 14pt; font-style: normal; font-weight: bold; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;"&gt;Nginx&lt;/span&gt;&lt;/a&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 14pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;/h3&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;This is my web server of choice at the moment. I don’t think this matters so much but it provides very simple and quick configuration which is key the the easy part of setting up a cloud. Ultimately most web service is going to run proxied by something like this that will do all the gzip compressing and static file serving ect.&lt;/span&gt;&lt;br /&gt;
&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h3&gt;&lt;a href="http://www.mongodb.org/"&gt;&lt;span style="background-color: transparent; color: #000099; font-family: Arial; font-size: 14pt; font-style: normal; font-weight: bold; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;"&gt;MongoDB&lt;/span&gt;&lt;/a&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 14pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;/h3&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Mongo is one of those new fangled database under the NoSQL (not only SQL). I think it provides the most general purpose and easiest to setup. The console is very easy to manage data. However for this exercise the critical part was the two line configuration change difference between master and slave. This made failover very simple. I think that &lt;/span&gt;&lt;a href="http://redis.io/"&gt;&lt;span style="background-color: transparent; color: #000099; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;"&gt;redis&lt;/span&gt;&lt;/a&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt; would have also been as easy and the configuration probably as simple but I liked having some of mongo’s mixtures of traditional and modern features like having indexes and map/reduce support.&lt;/span&gt;&lt;img height="606px;" src="https://lh6.googleusercontent.com/TAOdUFqnl12ucbK-ZUrZfzTEwmNpVr1UEr5kyUBZygtjPkj8RD46FgSbPgRQP1hoccKYoW_uiS67pykScVuC24bssN-qkw7VIEsnLRs7DYmhdzqzBGk" width="648px;" /&gt;&lt;br /&gt;
&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h2&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 18pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Architecture&lt;/span&gt;&lt;/h2&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;In this case I am using a load balancer &lt;/span&gt;&lt;a href="https://docs.google.com/document/d/1MgBaIIk1bU8_ZUh9LweqCCU4mQWjJcg8uMIO-nUUw1I/(http://www.rackspace.com/cloud/cloud_hosting_products/loadbalancers/technology/)"&gt;&lt;span style="background-color: transparent; color: #000099; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;"&gt;(http://www.rackspace.com/cloud/cloud_hosting_products/loadbalancers/technology/)&lt;/span&gt;&lt;/a&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt; which I am not exact sure the specifics but they suggest only need to configure one load balancer it is automagically high availability. We also assume that the client that is talking to mongo has the proper settings that it will automatically roll over to the slave if the master goes down. There is not panacea we still could have a data center failure (as happend recently with Amazon cloud) so we might want to locate a slave replica in another data center ect. However I wanted to maintain a balance between highly available, easy to maintain, fast to setup and low cost. &lt;/span&gt;&lt;br /&gt;
&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h2&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 18pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Summary&lt;/span&gt;&lt;/h2&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;My goal to create a starter cluster or cloud infustructure that focused on highly available, setup in an hour, easy to maintain and most critically low cost solution. I have published a basically template code &lt;/span&gt;&lt;span style="background-color: transparent; color: #000099; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;"&gt;(&lt;a href="https://bitbucket.org/lateefj/easy_cloud"&gt;https://bitbucket.org/lateefj/easy_cloud&lt;/a&gt;)&lt;/span&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; vertical-align: baseline;"&gt;&lt;span class="Apple-style-span" style="font-size: 11pt; white-space: pre-wrap;"&gt; which I will highlight the configuration in my next blog. This example setup that I have uses two virtual servers plus you would have to manually configure the load balancer (took me 2 minutes) but the base price is around 35$ a month which is mind blowingly low cost in time and money for what you get (YMMV this is the minimum it can cost with basically 0 &lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: 15px; white-space: pre-wrap;"&gt;bandwidth&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: 11pt; white-space: pre-wrap;"&gt; usage). I will be hosting all my projects soon on this type of setup soon so I can sleep better at night.&lt;a href="https://bitbucket.org/lateefj/easy_cloud"&gt;https://bitbucket.org/lateefj/easy_cloud&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/HackingThoughtBlog/~4/xzV3wbNdsZU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.hackingthought.com/feeds/345314250683420440/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.hackingthought.com/2011/06/startup-cloud-cluster-on-budget.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1280594010967081625/posts/default/345314250683420440?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1280594010967081625/posts/default/345314250683420440?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/HackingThoughtBlog/~3/xzV3wbNdsZU/startup-cloud-cluster-on-budget.html" title="Startup Cloud Cluster on a Budget" /><author><name>Lateef Jackson</name><uri>https://plus.google.com/104965469689680679178</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-kwKiEJ2Nxbw/AAAAAAAAAAI/AAAAAAAAOpc/hr8MB2NSJK4/s512-c/photo.jpg" /></author><thr:total>2</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://blog.hackingthought.com/2011/06/startup-cloud-cluster-on-budget.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEUCRX05fip7ImA9Wx9VE0w.&quot;"><id>tag:blogger.com,1999:blog-1280594010967081625.post-4725329410781426175</id><published>2011-01-26T09:54:00.001-05:00</published><updated>2011-01-29T09:44:24.326-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-01-29T09:44:24.326-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="python" /><title>Testing in Python with a bit of Django</title><content type="html">Gave a presentation last night (January 25, 2011) to the Charlotte Django and Python group. Base don the feedback I got from the last presentation I tried to change things up. Mainly by using only 4 slides (including title slide) and lots of code. Which I basically just went though writing a test on a django model.&lt;br /&gt;
&lt;br /&gt;
Slides:&amp;nbsp;&lt;a href="https://docs.google.com/present/edit?id=0Af1-cNaYamXFZGczdjlqNDdfMTk4ZGN3dmZod24&amp;amp;hl=en"&gt;https://docs.google.com/present/edit?id=0Af1-cNaYamXFZGczdjlqNDdfMTk4ZGN3dmZod24&amp;amp;hl=en&lt;/a&gt;&lt;br /&gt;
Code:&amp;nbsp;&lt;a href="https://bitbucket.org/lateefj/py_testing/overview"&gt;https://bitbucket.org/lateefj/py_testing/overview&lt;/a&gt; (still have to fix views.py)&lt;br /&gt;
&lt;br /&gt;
The best part was the discussion (as always). I would love to do a full day on this which would include setting up buildbot and selenium.&lt;img src="http://feeds.feedburner.com/~r/HackingThoughtBlog/~4/sUZHwUFun3E" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.hackingthought.com/feeds/4725329410781426175/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.hackingthought.com/2011/01/testing-in-python-with-bit-of-django.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1280594010967081625/posts/default/4725329410781426175?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1280594010967081625/posts/default/4725329410781426175?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/HackingThoughtBlog/~3/sUZHwUFun3E/testing-in-python-with-bit-of-django.html" title="Testing in Python with a bit of Django" /><author><name>Lateef Jackson</name><uri>https://plus.google.com/104965469689680679178</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-kwKiEJ2Nxbw/AAAAAAAAAAI/AAAAAAAAOpc/hr8MB2NSJK4/s512-c/photo.jpg" /></author><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://blog.hackingthought.com/2011/01/testing-in-python-with-bit-of-django.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkcDQX45eip7ImA9Wx9WGEo.&quot;"><id>tag:blogger.com,1999:blog-1280594010967081625.post-2675177554608619768</id><published>2011-01-24T09:07:00.000-05:00</published><updated>2011-01-24T09:07:50.022-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-01-24T09:07:50.022-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="erlang" /><category scheme="http://www.blogger.com/atom/ns#" term="nonblocking" /><title>Erlang First Impressions</title><content type="html">I attended an Erlang training Saturday January 22, 2011 taught by &lt;a href="http://weblog.hypotheticalabs.com/"&gt;Kevin Smith&lt;/a&gt;&amp;nbsp;(&lt;a href="http://twitter.com/kevsmith"&gt;twitter&lt;/a&gt;) of much Erlang fame. I first met him last year when he did an &lt;a href="http://wiki.basho.com/"&gt;Riak&lt;/a&gt; presentation to the Charlotte Ruby group. Anyway he is an excellent instructor (maybe a couple to many emacs plugs ;) and it was an amazing class. It was so good I feel like my brain is a little hung over from the experience (or maybe the beer we had after). In an effort to try to medicate I figured I would write up my thoughts.&lt;br /&gt;
&lt;br /&gt;
The good:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Concurrency #1 implementation detail&lt;/li&gt;
&lt;li&gt;Runtime reload of code&lt;/li&gt;
&lt;li&gt;Shell&lt;/li&gt;
&lt;li&gt;Atoms&lt;/li&gt;
&lt;li&gt;Pattern matching parameter over loading / conditional methods&lt;/li&gt;
&lt;li&gt;Message passing as core part of language is easy and wonderful&lt;/li&gt;
&lt;li&gt;Monitor / Subervisor to restart services that fail&lt;/li&gt;
&lt;/ul&gt;&lt;div&gt;The bad:&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Strings (this is pretty bad since it is the most used datatype)&lt;/li&gt;
&lt;li&gt;Contextual termination ",", ";", "." can all terminate a line / function (I almost like it but don't)&lt;/li&gt;
&lt;li&gt;Syntax is 30 years old and has not aged well&lt;/li&gt;
&lt;li&gt;Immutable types&lt;/li&gt;
&lt;/ul&gt;&lt;div&gt;Erlang make concurrency very easy in some ways by making a lot of other programming very difficult. Writing simple service oriented things like key/values stores or simple, reliable CRUD task it is perfect for. Where as for algorithms, string processing and other complex operations it is a poor solution for.&amp;nbsp;Unfortunately&amp;nbsp;I don't have many concurrent distributed problems where the difficult part is getting the concurrency right. However I now understand why databases like CouchDB and Riak are written in erlang. At the moment I am not writing a lot of simple services however I can see how it would be helpful in the future for simple services.&lt;/div&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/HackingThoughtBlog/~4/FieBkfLeWv4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.hackingthought.com/feeds/2675177554608619768/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.hackingthought.com/2011/01/erlang-first-impressions.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1280594010967081625/posts/default/2675177554608619768?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1280594010967081625/posts/default/2675177554608619768?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/HackingThoughtBlog/~3/FieBkfLeWv4/erlang-first-impressions.html" title="Erlang First Impressions" /><author><name>Lateef Jackson</name><uri>https://plus.google.com/104965469689680679178</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-kwKiEJ2Nxbw/AAAAAAAAAAI/AAAAAAAAOpc/hr8MB2NSJK4/s512-c/photo.jpg" /></author><thr:total>1</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://blog.hackingthought.com/2011/01/erlang-first-impressions.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0QERXs9eSp7ImA9Wx5bF0g.&quot;"><id>tag:blogger.com,1999:blog-1280594010967081625.post-495999269697930704</id><published>2010-11-02T23:35:00.000-04:00</published><updated>2010-11-02T23:35:04.561-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-11-02T23:35:04.561-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="java" /><category scheme="http://www.blogger.com/atom/ns#" term="python" /><category scheme="http://www.blogger.com/atom/ns#" term="business" /><category scheme="http://www.blogger.com/atom/ns#" term="apple" /><title>Shelving Java and OS X</title><content type="html">&lt;div class="p1"&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;History.&lt;/span&gt;&lt;/div&gt;&lt;div class="p1"&gt;The nature of the relation I have as a developer is changing with Mac the operating system that I use for development and Java which is currently the language I used second most (could have been #1 but lets not get ahead). I wrote my first Java back in 1998 where I locked myself in a basement to teach myself a programming languge. I started professionally using OS X back in 2003 or so. At the time I was developing J2EE deployed in a JBoss container.&amp;nbsp; So pretty much I have been developing on Mac the last 7 years and Java for 12.&amp;nbsp;&lt;/div&gt;&lt;div class="p2"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="p1"&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;Why Java?&lt;/span&gt;&lt;/div&gt;&lt;div class="p1"&gt;I taught myself Java in college for a couple reasons:&lt;/div&gt;&lt;div class="p1"&gt;&amp;nbsp; * The compiler was free&lt;/div&gt;&lt;div class="p1"&gt;&amp;nbsp; * Easier and faster development than C/C++&lt;/div&gt;&lt;div class="p1"&gt;&amp;nbsp; * Cross platform&lt;/div&gt;&lt;div class="p1"&gt;All in all I am really happy it gave me a good 10 years of employment and I learned a lot more about software development than if I was focusing on keeping track of seg falts, memory and pointers. Sun slapped an @depricated on Java when it decided to never open source it. Sun and friends controlled the language basically killing the evolution of the language. Even though it did make Java very popular in the enterprise market for new products as well as replacing mainframes. As I saw the companies that control Java (mainly Sun) could send an army of typing monkeys to build their products on. My developer interests were for the language to continue to evolve so that I could maximize productivity and have fun. I think if Java was open sourced a couple years back, then it would meet more of my developers interests. On the plus side my experience with writing Java software means a lifetime of work even though the mindshare of developers is waving good bye (hopefully that is including me).&amp;nbsp;&lt;/div&gt;&lt;div class="p2"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="p1"&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;Why Mac?&lt;/span&gt;&lt;/div&gt;&lt;div class="p1"&gt;&amp;nbsp;&amp;nbsp; * Unix, a decent terminal and all the wonderful developer tools&lt;/div&gt;&lt;div class="p1"&gt;&amp;nbsp;&amp;nbsp; * Hardware support so plugin monitor and it works, or usb drive or projector&lt;/div&gt;&lt;div class="p1"&gt;&amp;nbsp;&amp;nbsp; * Pretty does matter even as a developer I would rather work on something that is not hurting my eyes&lt;/div&gt;&lt;div class="p1"&gt;The last couple of years with the Mac has been a lot of fun. Even when I decided to get a Apple laptop I always thought the move was somewhat temporary and that in a couple years the Linux desktop would catch up and I would switch back. OS X was a great transition not only because it solved a lot of the hardware issues like plugging in second monitor just works, a unix shell and the list of Windows issues (most of which still exist on Windows 7) to many to mention. Back in the early 2000’s Apple was providing an attractive option. Even though OS X has stagnated since Leopard was release for obvious reasons of the devices that start with an ‘i’ Apple has been changing its attitudes toward developers. My current running theory is that it has something to do with the fact that they have vendor locked a lot of developers via the iPhone. I do write some mobile apps but I do it on Android (it was not rocket science to predict a much larger market share to Android years ago) and I am mostly interested in web applications. I can’t blame Apple for not caring about the small group of developers who they do not make money off of via iTunes app or will not be making money off of. We ultimately are just a small niche user group with really loud mouths ;). Apple got the boost it needed to get back into the game with FreeBSD and focused on a good product and the succeeded. If Apple sees the future as selling consumer devices and making a cut on the software it is distributing to the consumer what can I say I am envious.&amp;nbsp;&lt;/div&gt;&lt;div class="p2"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="p1"&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;Java on Apple doesn’t matter.&lt;/span&gt;&lt;/div&gt;&lt;div class="p1"&gt;Apple’s future is on devices and software righten in a platform they control which is currently Objective-C. The more they control the market place and the platform the more value they see they are adding for their customer and I guess they can rationalize charging for it? I am not high and mighty I purchased a Wing IDE license because it save me time and ultimately makes me more valuable. I am a believer paying for software (it is nice to eat). Even I think the small amount for the OS X platform was a good deal with all the software it came with. As a developer the more open the platform / language / environment is the more creative and possibilities there are for me to create value. That is why the web is so awesome. Creative freedom seem to have pass by both Java and Apple these days and that is why Java or Apple or Java on Apple doesn’t matter.&lt;/div&gt;&lt;div class="p2"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="p1"&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;What operating system then?&lt;/span&gt;&lt;/div&gt;&lt;div class="p1"&gt;Short answer: I am working on it. &amp;nbsp;&lt;/div&gt;&lt;div class="p2"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="p1"&gt;Long Answer:&lt;/div&gt;&lt;div class="p1"&gt;Windows being the master of the closed platform that is not an option. From what I have seen and played with on Ubuntu the platform seem solid and the hardware issues are no worse than on any of the other Linux distros. They have a really great package management system. The Unity UI looks pretty enough for my needs.&lt;/div&gt;&lt;div class="p2"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="p1"&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;What about a programming language?&lt;/span&gt;&lt;/div&gt;&lt;div class="p1"&gt;Programming language is less clear. I can use Python for most of the backend programming I need to do. Since web development is mainly IO bound with rare exception I can use Python. I use hand coded Javascript only for trivial things where I only need a couple lines. GWT has pretty much converted me into thinking that it is the way to go for web application so I need something that fast enough to be able to render optimized Javascript. As Java currently also supports Android it would be nice if I could learn one language to do all the frontend development.&amp;nbsp;&lt;/div&gt;&lt;div class="p1"&gt;&lt;b&gt;Erlang?&lt;/b&gt;&lt;/div&gt;&lt;div class="p1"&gt;Erlang sound fantastic for distributed server side coding. I don’t have much need for writing distributed server things like databases. Sometimes I need to hack a little Python web service and maybe a bit more but I really don’t have a use case unless I start hacking databases.&lt;/div&gt;&lt;div class="p1"&gt;&lt;b&gt;Foo on JVM?&lt;/b&gt;&lt;/div&gt;&lt;div class="p1"&gt;JVM derived language. Really, I mean really?&amp;nbsp; If any of those languages get ported to another VM that is _OPEN_ we can talk until then GOTO @depricated Java.&lt;/div&gt;&lt;div class="p1"&gt;&lt;b&gt;C# (mono)?&lt;/b&gt;&lt;/div&gt;&lt;div class="p1"&gt;C# (mono) might not be a bad option for the near term. There is an Android port for mono already &lt;a href="http://monodroid.net/"&gt;http://monodroid.net/&lt;/a&gt; even if the tutorial talks about using it in visual studio this could be a contender. As far as GWT replacement &lt;a href="http://projects.nikhilk.net/ScriptSharp"&gt;http://projects.nikhilk.net/ScriptSharp&lt;/a&gt; S# or script# is the only thing that comes up when I google it. Will this be an open solution for the long term? Will Microsoft decide to do what Oracle and Apple are doing now? I don’t see this as a long term solution because of the risk of it ending up in the same place.&lt;/div&gt;&lt;div class="p1"&gt;&lt;b&gt;Golang?&lt;/b&gt;&lt;/div&gt;&lt;div class="p1"&gt;Golang (Go) is the the language I like the most however it is in such a primitive stage. On the plus side the language was created by sponsored by Google and both Android and GWT are basically Google open source projects. As much as I would rather not look to another company academia doesn’t seem to be interested in creating programming language (or significantly contributing to open source projects) for developers like myself who are on the ground.&amp;nbsp;&lt;/div&gt;&lt;div class="p2"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="p1"&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;Filling the vacuums.&lt;/span&gt;&lt;/div&gt;&lt;div class="p1"&gt;The Mac vacuum is a relatively small gap to fill since we (open source community) will probably just need to tweak an existing solution. The Java vacuum is much larger one. Java was successful as a backend tool where I think golang and I get the impression erlang could fill. On the frontend I have noticed that Wing IDE written in Python is so much faster than Eclipse or Netbeans (not that this is news).&amp;nbsp; &lt;a href="http://pyjs.org/"&gt;http://pyjs.org/&lt;/a&gt; is a nice port of GWT to Python which means that Python could be a good replacement for both frontend and backend. I think there is still a need for a statically compiled GUI language.&lt;/div&gt;&lt;div class="p2"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="p2"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/HackingThoughtBlog/~4/Qs1ABCHUSKc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.hackingthought.com/feeds/495999269697930704/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.hackingthought.com/2010/11/shelving-java-and-os-x.html#comment-form" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1280594010967081625/posts/default/495999269697930704?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1280594010967081625/posts/default/495999269697930704?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/HackingThoughtBlog/~3/Qs1ABCHUSKc/shelving-java-and-os-x.html" title="Shelving Java and OS X" /><author><name>Lateef Jackson</name><uri>https://plus.google.com/104965469689680679178</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-kwKiEJ2Nxbw/AAAAAAAAAAI/AAAAAAAAOpc/hr8MB2NSJK4/s512-c/photo.jpg" /></author><thr:total>3</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://blog.hackingthought.com/2010/11/shelving-java-and-os-x.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUIMQXs8fCp7ImA9Wx5UFEQ.&quot;"><id>tag:blogger.com,1999:blog-1280594010967081625.post-5525501167749195223</id><published>2010-10-18T18:43:00.001-04:00</published><updated>2010-10-19T10:13:00.574-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-10-19T10:13:00.574-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="async" /><category scheme="http://www.blogger.com/atom/ns#" term="nonblocking" /><category scheme="http://www.blogger.com/atom/ns#" term="python" /><title>Enlightenment though eventlet</title><content type="html">I did a &lt;a href="http://blog.hackingthought.com/2010/08/nonblocking-async-tornado-presentation.html"&gt;presentation on Tornado Web&lt;/a&gt; to the local Python user group a couple weeks ago. There is one annoying thing about Tornado and one show stopper for most development. Tornado&amp;nbsp;depends on&amp;nbsp;pycurl for doing client request which is pretty strange since the core module can do client and server sockets. For any nonblocking to work with Tornado it has to have an implementation using the core Tornado library. So out goes all legacy clients that use Python sockets (very few use nonblocking sockets).&lt;br /&gt;
&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;Blinded By Idealism&lt;/span&gt;&lt;br /&gt;
My first impression was that monkey patching the standard library was ugly. In reality this makes eventlet usable for legacy projects as well as very simple to write backward libraries that support both blocking and nonblocking. I was caught in the idealism trap where I wanted a clean paradigm to exist though the entire stack.&amp;nbsp;Re-implementing&amp;nbsp;all socket libraries is to large a barrier to change mindshare that nonblocking is a better programming paradigm. Especially if the new implementation is dependent on a non standard library like Tornado, Twisted ect.&lt;br /&gt;
&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;&lt;a href="http://eventlet.net/"&gt;Eventlet&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
The&lt;a href="http://us.pycon.org/2010/conference/schedule/event/128/"&gt; PyCon 2010 presentation&lt;/a&gt;&amp;nbsp;is excellent overview. Bottom line eventlet provide a synchronous interface to nonblocking io or can just write&amp;nbsp;nonblocking&amp;nbsp;io using coroutines. Eventlet is mature, stable, fast and documented. This makes it very usable right now using existing libraries and the benefit of the improved paradigm/performance can be taken&amp;nbsp;advantage&amp;nbsp;of without much code change. Also as I have had more time to use Go and it concurrency model I am realizing the power of coroutines in any language.&lt;br /&gt;
&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;In Practice&lt;/span&gt;&lt;br /&gt;
This all came about because I needed to write something that would traverse a site and validate the responses based on content type and regexes. Things like correct encoding to making sure the proper data is being displayed on a specific url. So a spider with validators that can be hooked in based on a regex or content type. Writing the test code I was able to create a eventlet server and have it output data so that I could test that the full stack of the spider code.&lt;br /&gt;
&lt;br /&gt;
Yet again I learn though my mistakes.&lt;img src="http://feeds.feedburner.com/~r/HackingThoughtBlog/~4/TkbfLsyL-es" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.hackingthought.com/feeds/5525501167749195223/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.hackingthought.com/2010/10/enlightenment-though-eventlet.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1280594010967081625/posts/default/5525501167749195223?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1280594010967081625/posts/default/5525501167749195223?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/HackingThoughtBlog/~3/TkbfLsyL-es/enlightenment-though-eventlet.html" title="Enlightenment though eventlet" /><author><name>Lateef Jackson</name><uri>https://plus.google.com/104965469689680679178</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-kwKiEJ2Nxbw/AAAAAAAAAAI/AAAAAAAAOpc/hr8MB2NSJK4/s512-c/photo.jpg" /></author><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://blog.hackingthought.com/2010/10/enlightenment-though-eventlet.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEAAR385eyp7ImA9Wx5WE0s.&quot;"><id>tag:blogger.com,1999:blog-1280594010967081625.post-6236713174758547473</id><published>2010-09-24T18:19:00.000-04:00</published><updated>2010-09-24T18:19:06.123-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-09-24T18:19:06.123-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="business" /><title>Lawyers trade marked me!</title><content type="html">Well first time for everything I suppose. I built this widget which new name will is HT Walkability Score since the old name is trade marked but I can link to the website &lt;a href="http://walkscore.com/"&gt;walkscore.com&lt;/a&gt;. Since this was just a hobby project and something I enjoyed doing and just kicking around to continue to improve my Android skills it is no big deal. I suppose they are about to build there own or something because other wise they wouldn't really care that much I am guessing. Hoping they will ring me up to work on it!&lt;img src="http://feeds.feedburner.com/~r/HackingThoughtBlog/~4/zZeZLpfOZo0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.hackingthought.com/feeds/6236713174758547473/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.hackingthought.com/2010/09/lawyers-trade-marked-me.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1280594010967081625/posts/default/6236713174758547473?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1280594010967081625/posts/default/6236713174758547473?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/HackingThoughtBlog/~3/zZeZLpfOZo0/lawyers-trade-marked-me.html" title="Lawyers trade marked me!" /><author><name>Lateef Jackson</name><uri>https://plus.google.com/104965469689680679178</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-kwKiEJ2Nxbw/AAAAAAAAAAI/AAAAAAAAOpc/hr8MB2NSJK4/s512-c/photo.jpg" /></author><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://blog.hackingthought.com/2010/09/lawyers-trade-marked-me.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUIEQ3cyeyp7ImA9Wx5XEUs.&quot;"><id>tag:blogger.com,1999:blog-1280594010967081625.post-5201444898231989940</id><published>2010-09-10T21:11:00.002-04:00</published><updated>2010-09-10T21:11:42.993-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-09-10T21:11:42.993-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="android" /><title>There was life before G1 and now there is life before Nexus One</title><content type="html">My Nexus One arrive today. Since I wrote &lt;a href="http://weruat.com/story"&gt;weruat.com&lt;/a&gt;&amp;nbsp;for the first &lt;a href="http://code.google.com/android/adc/adc_gallery/"&gt;Android Challenge&amp;nbsp;&lt;/a&gt;&amp;nbsp;of which I ended up just paying a chunk load of time. I got a G1 when they first came out and started to play around with some fun mobile applications. Last January I bought my wife a Nexus One (just love the idea of Freedom!). So I kind had an idea of what I was getting myself into.&lt;br /&gt;
&lt;br /&gt;
I didn't think I took for granted the Android Navigation but I think I was not using my phone because it had gotten so slow. It reminds me how important speed is for any software. I was starting to think I would use my phone less now that my Google Voice number ring in gmail so I just answer most calls with my headset. Then I realized how much dead time I have waiting for a meeting to start or end as the case may be.&lt;br /&gt;
&lt;br /&gt;
Just made me realize building a better mouse trap doesn't have to be innovative or more feature filled it could just be FASTER!&lt;img src="http://feeds.feedburner.com/~r/HackingThoughtBlog/~4/_tAxpVMNy4c" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.hackingthought.com/feeds/5201444898231989940/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.hackingthought.com/2010/09/there-was-life-before-g1-and-now-there.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1280594010967081625/posts/default/5201444898231989940?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1280594010967081625/posts/default/5201444898231989940?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/HackingThoughtBlog/~3/_tAxpVMNy4c/there-was-life-before-g1-and-now-there.html" title="There was life before G1 and now there is life before Nexus One" /><author><name>Lateef Jackson</name><uri>https://plus.google.com/104965469689680679178</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-kwKiEJ2Nxbw/AAAAAAAAAAI/AAAAAAAAOpc/hr8MB2NSJK4/s512-c/photo.jpg" /></author><thr:total>1</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://blog.hackingthought.com/2010/09/there-was-life-before-g1-and-now-there.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0cNQHs9eip7ImA9Wx5QE00.&quot;"><id>tag:blogger.com,1999:blog-1280594010967081625.post-7130345466580542648</id><published>2010-08-31T21:38:00.000-04:00</published><updated>2010-08-31T21:38:11.562-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-08-31T21:38:11.562-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="async" /><category scheme="http://www.blogger.com/atom/ns#" term="nonblocking" /><category scheme="http://www.blogger.com/atom/ns#" term="python" /><title>NonBlocking (Async) Tornado Presentation for CharPy</title><content type="html">&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;NonBlocking (Async) Tornado&amp;nbsp;Presentation&amp;nbsp;for Charlotte Python Group&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
There are &lt;a href="https://docs.google.com/present/view?id=dg3v9j47_184fvtr8qgr"&gt;slides&lt;/a&gt; and &lt;a href="http://bitbucket.org/lateefj/tnio_presentation"&gt;example&amp;nbsp;code&lt;/a&gt;. I had a lot of fun making and giving this presentation. Got some good feedback and would like to give it again so I can continue to improve it and my presentation skill. Please give me feedback to&amp;nbsp;improve&amp;nbsp;the presentation or let me know if any other groups would be&amp;nbsp;interested&amp;nbsp;in it.&lt;img src="http://feeds.feedburner.com/~r/HackingThoughtBlog/~4/eU_mCNfEdsI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.hackingthought.com/feeds/7130345466580542648/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.hackingthought.com/2010/08/nonblocking-async-tornado-presentation.html#comment-form" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1280594010967081625/posts/default/7130345466580542648?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1280594010967081625/posts/default/7130345466580542648?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/HackingThoughtBlog/~3/eU_mCNfEdsI/nonblocking-async-tornado-presentation.html" title="NonBlocking (Async) Tornado Presentation for CharPy" /><author><name>Lateef Jackson</name><uri>https://plus.google.com/104965469689680679178</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-kwKiEJ2Nxbw/AAAAAAAAAAI/AAAAAAAAOpc/hr8MB2NSJK4/s512-c/photo.jpg" /></author><thr:total>3</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://blog.hackingthought.com/2010/08/nonblocking-async-tornado-presentation.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUMBSX8yeip7ImA9Wx5SFkw.&quot;"><id>tag:blogger.com,1999:blog-1280594010967081625.post-5988311295837620911</id><published>2010-08-12T07:44:00.000-04:00</published><updated>2010-08-12T07:44:18.192-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-08-12T07:44:18.192-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="riak" /><category scheme="http://www.blogger.com/atom/ns#" term="golang" /><title>goriak API tweaks</title><content type="html">&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;My initial attempt at coding goriak was a mess (as expected). As I started adding read,write and links to the API I started to realize the failing of my modeling. The new API is based on a Document struct:&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Lucida Grande';"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Lucida Grande';"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;// Define a basic document to reduce API calls&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;type Document struct {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Bucket string&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Key string&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Value []byte&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Links []*Link&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;JSONObject interface{}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;}&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;This encapsulates most of the values that I was passing as parameters to the functions. Since Riak is a key/value it is pretty straight forward that a Put(doc) will store the for the string Key the bytes in Value. However if JSONObject != nil then it will marshal it. This works in reverse for Get(doc) if the JSONObject != nil then it will unmarshal.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;// Definition of a link from one document to another&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;type Link struct {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Bucket string&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Key string&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Tag string&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;Link between documents is such a simple feature but is also very powerful. Using links can quickly turn a key/value database into a graph. Specifically with the linkwalking that will allow traversal of the graph. &amp;nbsp; &amp;nbsp;To support it I just had to parse and set the header "Link:". Both Put and Get now support storing or retrieving the list of Links associated with a document.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;The API now:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;PutWDWReturn(doc *Document, &amp;nbsp;w, dw int, returnObject bool)&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;Put(doc *Document)&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;DeleteRW(bucketName, key string, rw int)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;Delete(bucketName, key string)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;GetR(doc *Document, r int)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;Get(doc *Document)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;The methods with r,w,dw and rw are all wrappers around the Riak REST API. The default is to use whatever the bucket is configured for node&amp;nbsp;persistence&amp;nbsp;control. Since the expectation is the exception that to override the bucket default configuration I provide the wrapper like Get that&amp;nbsp;wraps&amp;nbsp;GetR to save typing.&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;Next on my list to implement is LinkWalking!&lt;/span&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/HackingThoughtBlog/~4/__yefMwGccA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.hackingthought.com/feeds/5988311295837620911/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.hackingthought.com/2010/08/goriak-api-tweaks.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1280594010967081625/posts/default/5988311295837620911?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1280594010967081625/posts/default/5988311295837620911?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/HackingThoughtBlog/~3/__yefMwGccA/goriak-api-tweaks.html" title="goriak API tweaks" /><author><name>Lateef Jackson</name><uri>https://plus.google.com/104965469689680679178</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-kwKiEJ2Nxbw/AAAAAAAAAAI/AAAAAAAAOpc/hr8MB2NSJK4/s512-c/photo.jpg" /></author><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://blog.hackingthought.com/2010/08/goriak-api-tweaks.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUEHRHwyeyp7ImA9Wx5TEk0.&quot;"><id>tag:blogger.com,1999:blog-1280594010967081625.post-6498138721257363183</id><published>2010-07-27T00:07:00.000-04:00</published><updated>2010-07-27T00:07:15.293-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-07-27T00:07:15.293-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="riak" /><category scheme="http://www.blogger.com/atom/ns#" term="golang" /><title>Goriak uploaded code to the public</title><content type="html">&lt;a href="https://code.google.com/p/goriak/"&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;Goriak&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt; a &lt;/span&gt;&lt;a href="http://golang.org/"&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;Go&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;&amp;nbsp;(golang) library for the &lt;/span&gt;&lt;a href="http://riak.basho.com/"&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;Riak&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt; database.&lt;/span&gt;&amp;nbsp;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;Got enough time to learn enough Go to code up a basic key/value interface to Riak. It is still missing a couple of the REST API calls which I plan to implement over the next couple weeks. I figured it had enough work on it to share with the world and hopefully some one else can review my code and contribute to it. I originally looked to just contribute to another project but the only project I could find was &lt;a href="http://github.com/c141charlie/riak.go"&gt;riak.go&lt;/a&gt; and it didn't have as complete an implementation as I had. I was able to use a couple lines of &lt;a href="http://github.com/c141charlie/riak.go"&gt;riak.go&lt;/a&gt; and it really helped me implementing the Put function so I am really glad it is there. Also the author is really nice he is just going off to work on something else so I decided to create a new repository for the project.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;The current API has three functions:&lt;/div&gt;&lt;div&gt;GetBucket - Retrieves a Bucket type which contains all kinds of information about the bucket&lt;/div&gt;&lt;div&gt;Get - Marshals the JSON that is returned by the request into a the interface that is passed in.&amp;nbsp;&lt;/div&gt;&lt;div&gt;GetCAP - Same as get but support an option for the number of nodes that need to agree before returning&lt;/div&gt;&lt;div&gt;Put - Unmashals the type passed in and uploads it to the server&lt;/div&gt;&lt;div&gt;PutCAP - Same as Put but can specify the number of nodes that need to write the json&lt;/div&gt;&lt;div&gt;Delete - Removes the object from the cluster&lt;/div&gt;&lt;div&gt;DeleteCAP - Same as above but can specify number of nodes to delete it from&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;I still need to implement MapReduce, LinkWalk, Ping and ServerStatus. These should come over the next couple weeks as I get time to spend on them. MapReduce being the only non trivial one.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;I did start to experiment with some concurrent access patterns. The first I call BackgroundWait which can make Get or Put which return a request id. The responses are stuffed in a channel until the code calls Wait(requestId). Instead of waiting for every single request it can do many requests at the same time and just wait when required. This reduces the number of choke points. Assuming web applications do something like this:&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;Check Authentication&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Application configuration / setup that where user is not required&lt;/li&gt;
&lt;li&gt;Based on user / permissions additional data is requested&lt;/li&gt;
&lt;li&gt;Possible a second round of data based on application data&lt;/li&gt;
&lt;li&gt;Response returned&lt;/li&gt;
&lt;li&gt;Logging&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;div&gt;As the use of key/value and document databases increase I think this will be more important to maximize backend performance. Riak ability to scale up both for reading and writing allows for this type of access pattern&amp;nbsp;similarly&amp;nbsp;to memcached. I don't know of any RDMBS (maybe VoltDB?) that could handle a large number of concurrent requests since they have very constrained IO or process (thread) resources. It is a lot of fun to think about ways that increase IO distribution could mean potential new access patterns for low latency data access.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;Would be happy for any help, code review and contribution much appreciated.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/HackingThoughtBlog/~4/SfaM22oWI_o" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.hackingthought.com/feeds/6498138721257363183/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.hackingthought.com/2010/07/goriak-uploaded-code-to-public.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1280594010967081625/posts/default/6498138721257363183?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1280594010967081625/posts/default/6498138721257363183?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/HackingThoughtBlog/~3/SfaM22oWI_o/goriak-uploaded-code-to-public.html" title="Goriak uploaded code to the public" /><author><name>Lateef Jackson</name><uri>https://plus.google.com/104965469689680679178</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-kwKiEJ2Nxbw/AAAAAAAAAAI/AAAAAAAAOpc/hr8MB2NSJK4/s512-c/photo.jpg" /></author><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://blog.hackingthought.com/2010/07/goriak-uploaded-code-to-public.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEUHQHw9cSp7ImA9Wx9RFU0.&quot;"><id>tag:blogger.com,1999:blog-1280594010967081625.post-2649548274472861882</id><published>2010-07-20T16:48:00.001-04:00</published><updated>2010-12-16T08:30:31.269-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-12-16T08:30:31.269-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="performance" /><category scheme="http://www.blogger.com/atom/ns#" term="python" /><category scheme="http://www.blogger.com/atom/ns#" term="golang" /><title>Concurrently golang programming</title><content type="html">I would guess like most developer my first exposure to concurrency was in my parallel programming class in college. MPI and PVM where rather painful libraries to C/C++ experiences to cute my teeth on but it was a very exciting and rewarding experience. When I started writing Java thread programs there was an uneasy sense that parallel programming couldn't be this easy (after all the locks and&amp;nbsp;synchronous&amp;nbsp;calls there wasn't many operations running in parallel) but it sure was a lot of fun. In Python I found threads to be crazy simple but only useful for IO wait and loving miltiprocess programming. &lt;a href="http://www.parallelpython.com/"&gt;Parallel Pytho&lt;/a&gt;n was the only thing that actually provided the same true parallelism as the original MPI and PVM but was also amazingly simple. Goroutines (coroutines) make me never want to see thread programming again. The killer combination of channels (kinda like a queue in the thread world) and coroutines are really enjoyable to code compared to threads and queues.&lt;br /&gt;
&lt;br /&gt;
Currently I am working on creating a library for golang to talk to &lt;a href="http://riak.basho.com/"&gt;riak&lt;/a&gt;. If multiple request need to be made then they can be done using goroutines. Thus reducing round trip wait time. Depending on IO limitations this could increase the speed of web pages that need multiple resource for a specific url. For things like memecache and very fast datastores this would work great. The downside is that potential overloaded IO situations would be made much worse by the increase number of connections. This would probably limit to nonblocking IO datasources which most new datasources can handle a large number of connections.&lt;img src="http://feeds.feedburner.com/~r/HackingThoughtBlog/~4/rsDSJxh5yt8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.hackingthought.com/feeds/2649548274472861882/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.hackingthought.com/2010/07/concurrently-golang-programming.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1280594010967081625/posts/default/2649548274472861882?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1280594010967081625/posts/default/2649548274472861882?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/HackingThoughtBlog/~3/rsDSJxh5yt8/concurrently-golang-programming.html" title="Concurrently golang programming" /><author><name>Lateef Jackson</name><uri>https://plus.google.com/104965469689680679178</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-kwKiEJ2Nxbw/AAAAAAAAAAI/AAAAAAAAOpc/hr8MB2NSJK4/s512-c/photo.jpg" /></author><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://blog.hackingthought.com/2010/07/concurrently-golang-programming.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEQCSX84fip7ImA9WxFUGU4.&quot;"><id>tag:blogger.com,1999:blog-1280594010967081625.post-8004015093637308550</id><published>2010-06-30T18:19:00.000-04:00</published><updated>2010-06-30T18:19:28.136-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-06-30T18:19:28.136-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="golang" /><title>First Impressions of golang</title><content type="html">&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;Another language?&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
Yep &lt;a href="http://golang.org/"&gt;golang&lt;/a&gt; or just go depending if you want to find anything from a search result. For me I write mainly in Python, Java, Javascript. Python as my GOTO (pun intended) language because I can write thing extremely quickly and sometimes even cleanly. Java for embedded platforms and GWT. Javascript the language of the web so that mean almost all developers use it (or should be). It is inevitable that a new language will replace older ones but I think there are two things that might have delayed the creation of golang and&amp;nbsp;ultimately&amp;nbsp;what I intend to use it for.&lt;br /&gt;
The first and largest is if Java continued to evolve not just its libraries but significant syntactical changes. Java from a completeness of implementation is great and the toolset is wonderful. Java requires way to much code volume. Code generators help however the code that is not generated has to access a majority of the generated code and no matter what there is a feeling of bloat. All the performance improvements in Java have yet to make development feel faster.&lt;br /&gt;
The second thing is Objective-C lack of popularity. Maybe because like Darwin it has a kinda of open source aspect to it but really the only significant implementation is&amp;nbsp;proprietary&amp;nbsp;implementation by Apple. Even though the IPhone has help its popularity it has reduced it&amp;nbsp;openness&amp;nbsp;and reduced its ability to become a general purpose language.&lt;br /&gt;
Golang fate could be&amp;nbsp;similar&amp;nbsp;because Google could be the Sun of Java (even more bad&amp;nbsp;punning) or the Apple of Objective-C. Golang is not currently on that projection but I would not rule it out as a&amp;nbsp;possibility.&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;Golang's Niche&lt;/span&gt;&lt;br /&gt;
I would like golang to replace everything I use Java and Objective-C. There is a lot of Python code that I think should be in a statically typed language but for various reasons mainly time I will note rewrite but golang would be great. Even though golang is very productive to develop in for a static language, on occasion my face slams into STATIC TYPE. For real stable API's that could have a real a large amount of dependent code I can see it will fit nicely. Until I get proficient with it I am going to try to keep working with it on simple projects.&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;Tasty Features&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;Terse Syntax&lt;/b&gt;&lt;br /&gt;
With exceptions of languages like Perl less typing is better. Golang shines in this manner. It is the most&amp;nbsp;terse&amp;nbsp;static typed language I have ever programmed in. Refreshing from a Java perspective and surprisingly close to Python.&lt;br /&gt;
&lt;b&gt;Type System&lt;/b&gt;&lt;br /&gt;
I must say I really loved C when I first learned about stucts and header files to define functions. There is something really solid about the type system that I haven't felt since a C header file except more terse. Make me never want to see another Java interface in my life.&lt;br /&gt;
&lt;b&gt;Channel&lt;/b&gt;&lt;br /&gt;
I am a bit of a server&amp;nbsp;performance&amp;nbsp;geek and well what can I say channels are just awesome. I have yet to write any code with channels but it is one of the things I am most excited about. I plan to use it when I write a golang driver for Riak. I would like to write a WSGI inspired web server in golang that I could access from Python and that is where I look forward to testing the mettle of channels.&lt;br /&gt;
&lt;b&gt;Testing&lt;/b&gt;&lt;br /&gt;
When it come to code it is all about "hitting the ground testing". The development tool gotest makes this fast and easy.&lt;img src="http://feeds.feedburner.com/~r/HackingThoughtBlog/~4/S4MEj7OJZ2c" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.hackingthought.com/feeds/8004015093637308550/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.hackingthought.com/2010/06/first-impressions-of-golang.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1280594010967081625/posts/default/8004015093637308550?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1280594010967081625/posts/default/8004015093637308550?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/HackingThoughtBlog/~3/S4MEj7OJZ2c/first-impressions-of-golang.html" title="First Impressions of golang" /><author><name>Lateef Jackson</name><uri>https://plus.google.com/104965469689680679178</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-kwKiEJ2Nxbw/AAAAAAAAAAI/AAAAAAAAOpc/hr8MB2NSJK4/s512-c/photo.jpg" /></author><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://blog.hackingthought.com/2010/06/first-impressions-of-golang.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0MASXs_cSp7ImA9WxFVEkQ.&quot;"><id>tag:blogger.com,1999:blog-1280594010967081625.post-2010429176801676842</id><published>2010-06-11T17:24:00.000-04:00</published><updated>2010-06-11T17:24:08.549-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-06-11T17:24:08.549-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="android" /><title>Walkscore Widget with Ads!</title><content type="html">So my adventure into mobile development continues. The new version of Walkscore Widgets has ads!&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_gdF4RvqRiIw/TBKosOBJxLI/AAAAAAAAE3E/-Apnyvd7MaM/s1600/device.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://2.bp.blogspot.com/_gdF4RvqRiIw/TBKosOBJxLI/AAAAAAAAE3E/-Apnyvd7MaM/s320/device.png" width="180" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
The widget didn't change much. The app got a lot of features besides Ads (going to need to support my habit of writing code somehow). Progress bar and better messaging to explain why a lookup failed. The progress bar was difficult until I figured out that threads are really needed for good UI development. Over all I am pretty happy about it. As always I figured out more features I would like to add and I had a bug fix 24 hours after the release but in general I am much happier. Still could use some graphic design help but maybe the next app...&lt;img src="http://feeds.feedburner.com/~r/HackingThoughtBlog/~4/5W1mJYY3KNc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.hackingthought.com/feeds/2010429176801676842/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://blog.hackingthought.com/2010/06/walkscore-widget-with-ads.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1280594010967081625/posts/default/2010429176801676842?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1280594010967081625/posts/default/2010429176801676842?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/HackingThoughtBlog/~3/5W1mJYY3KNc/walkscore-widget-with-ads.html" title="Walkscore Widget with Ads!" /><author><name>Lateef Jackson</name><uri>https://plus.google.com/104965469689680679178</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-kwKiEJ2Nxbw/AAAAAAAAAAI/AAAAAAAAOpc/hr8MB2NSJK4/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_gdF4RvqRiIw/TBKosOBJxLI/AAAAAAAAE3E/-Apnyvd7MaM/s72-c/device.png" height="72" width="72" /><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://blog.hackingthought.com/2010/06/walkscore-widget-with-ads.html</feedburner:origLink></entry></feed>
