<?xml version="1.0" encoding="UTF-8"?>
<!--Generated by Squarespace Site Server v5.11.81 (http://www.squarespace.com/) on Tue, 29 May 2012 07:23:22 GMT--><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><title>Shaheeb Roshan -My most profound thoughts on pants</title><link>http://www.shaheeb.com/blog/</link><description></description><lastBuildDate>Mon, 05 Mar 2012 22:20:34 +0000</lastBuildDate><copyright></copyright><language>en-US</language><generator>Squarespace Site Server v5.11.81 (http://www.squarespace.com/)</generator><item><title>Understanding Options Trading</title><category>Personal</category><category>investment</category><category>options</category><category>trading</category><dc:creator>Shaheeb</dc:creator><pubDate>Fri, 02 Mar 2012 23:20:35 +0000</pubDate><link>http://www.shaheeb.com/blog/2012/3/2/understanding-options-trading.html</link><guid isPermaLink="false">290186:2961060:15273661</guid><description><![CDATA[<p>I have been a Malkiel fan, and a committed <a href="http://amzn.to/z2tJeT">Random Walker</a>&nbsp;for some years, and simple techniques like <a href="http://bit.ly/xVM6Hj">Dollar Cost Averageing</a>&nbsp;have served me well. &nbsp;However, I've grown interested in some more advanced investment techniques to boost my portfolio, and of these, Options Trading has really caught my attention.</p>
<p>Here are some resources that have helped formulate a basic understanding for me:&nbsp;</p>
<ul>
<li><a href="http://bit.ly/AdrPc5">Khan Academy: &nbsp;American Call Options</a> 
<ul>
<li>A great little video to introduce the concept. &nbsp;Sal's graphical, example oriented approach was an extremely instructive nugget to get me started</li>
</ul>
</li>
<li><a href="http://bit.ly/y32Xdh">Khan Academy: &nbsp;Call Options as Leverage</a> 
<ul>
<li>Reinforced the concept that a call option is a "force multiplier" and can yield magnitudes higher percent returns, while simultaneously reducing the required upfront capital.</li>
</ul>
</li>
<li><a href="http://bit.ly/xIjNdN">Yale Econ 252: &nbsp;Financial Markets - Lecture 23</a> 
<ul>
<li>With Khan Academy piqueing my interest in the topic, I found a more rigorous lecture on the topic. &nbsp;While Shiller is not exactly the most dynamic instructor (at least this was my impression from this single lecture), the video provides an excellent historical and theoritical foundation on options markets.</li>
</ul>
</li>
<li><a href="http://www.tdameritrade.com">TD Ameritrade</a>'s Investor Education 
<ul>
<li>I have been a TDAmeritrade customer for years, and have found that their online portfolio management tools are simple and intuitive, yet quite powerful in terms of access to instruments.</li>
<li>They are definitely not the cheapest alternative in terms of trade commissions, but this has not yet been a concern for me given my preference for particular ETFs which TD offers commission free.</li>
<li>Their Investor Education center is geared primarily toward the use of TD trading platform, but the tutorials were very instructive in learning hw to read options chains and understand how to evaluate key attributes such as the option Strike Price, Expiration date, bid/ask spread etc.</li>
</ul>
</li>
</ul>
<p>The basics on Options Trading are easy to grasp, but (as with all other aspects of investing) are only just the beginning. &nbsp;I have decided that I am most interested in taking advantage of the leverage advantage that call options offer. &nbsp;In order to apply this concept, I first need to find an equity to formulate a position around.</p>
<p>In the meanwhile, I have been thinking that it would be very useful to have a simple calculator that accepts parameters like the option strike price, expiration date, commission rate etc. and returns back a single value for potential profit or loss. &nbsp;The ones I've found are quite complex and attempt to estimate profits along a continuum with assumptions for volatility, and other "greeks". &nbsp;More on that later perhaps?</p>
<p>&nbsp;</p>]]></description><wfw:commentRss>http://www.shaheeb.com/blog/rss-comments-entry-15273661.xml</wfw:commentRss></item><item><title>T.R. Reid's Healing of America</title><category>B-School</category><category>healthcare</category><category>management</category><dc:creator>Shaheeb</dc:creator><pubDate>Sat, 18 Feb 2012 15:57:36 +0000</pubDate><link>http://www.shaheeb.com/blog/2012/2/18/tr-reids-healing-of-america.html</link><guid isPermaLink="false">290186:2961060:15087440</guid><description><![CDATA[<p>I read <a href="http://www.amazon.com/Healing-America-Global-Better-Cheaper/dp/0143118218/ref=sr_1_1?ie=UTF8&amp;qid=1329581090&amp;sr=8-1">T.R Reid's Healing of America</a> last year for a graduate course on Healthcare Management, and found the text very thoughtful and engaging. &nbsp;The debate around healthcare is certainly not as urgent today as it was when Obama was in the process of signing the Health Care Reform act into law. &nbsp;Still, Reid raised some crucial points that remain relevant, at the very least in terms of the impact that Healthcare Management is due to experience.</p>
<p><span id="internal-source-marker_0.2485713770147413"><strong>What are the management implications for the US healthcare delivery and financing systems?</strong><br /> </span></p>
<ul>
<li>One of Reid's central tenants is that the financing of healthcare cannot be a for-profit enterprise.&nbsp; Needless to say, moving toward a non-profit model for this entire industry will be nothing short of a sea-change.&nbsp; While it is difficult to fathom the full extent of the changes that would result from such a transformation, some simple items to prepare for may be the shift away from the focus on medical billing, more centralized negotiation on prices for supplies and services, and greater focus on mission and vision values than profitability.</li>
<li><span>Healthcare providers will need to accept a reduction in compensation, a greater degree of scrutiny on their costs, and a greater accountability for the quality of the care they provide.&nbsp; I imagine that this will drive (or attract) practitioners into more and higher administrative roles as management objectives will necessarily be more directly connected to the quality of outcomes in care settings.&nbsp;</span></li>
<li>While much has been made of the profit-oriented motivation of insurance companies, I believe medical providers will also face similar pressures to behave in an even more socially responsible manner.&nbsp; Reid focuses his attention to the payor role, but I believe hospitals will face a more stringent requirement on providing charity care and proving their benefit to the communities they serve.</li>
</ul>
<p>&nbsp;</p>
<p><span style="font-weight: bold;">Is there anything I disagree with?</span></p>
<p>&nbsp;</p>
<ul>
<li><strong>Are Insurance Companies truly evil?</strong> 
<ul>
<li>More clearly than any other point in the book, Reid paints a bright target on the for-profit insurance industry as the cause of human suffering in our country. &nbsp;I can certainly appreciate that some practices that are commonplace in the individual health insurance companies can appear obtuse and in some cases even cruel. &nbsp;But I think its important to recognize that these practices are in fact legal and quite well known, if a little technically difficult to understand. &nbsp;</li>
<li>Rescission, for example, is not revoking someone's insurance coverage at will or because they don't feel like paying a claim. &nbsp;Rescission is a measure to identify and penalize fraud. &nbsp;If an applicant omits or misrepresents information that would have materially changed an underwriter&rsquo;s decision to issue a policy, then that individual should not have an expectation to benefit from that type of fraud. &nbsp;Afterall, if I misrepresent my income to qualify for a loan and purchase a large home, I cannot reasonably expect much sympathy when the bank repossess it after a few missed payments.</li>
</ul>
</li>
<li><strong>Are the systems in other countries really "better", and can we really transplant what works abroad into our system?</strong>&nbsp;
<ul>
<li>
<div id="_mcePaste">In a late 2009 New Yorker article on health reform, Atul Gawande talks about the concept of "path dependence" as a major reason for the state of any country's health care system. &nbsp;Essentially he argues that the systems one observes today are not the product of discreet events or sheer will of any particular political party. &nbsp;Rather, these highly complex systems are the result of the momentum that builds over many years and many small decisions; each reflecting the unique set of circumstances of any particular time. &nbsp;</div>
<div></div>
In a late 2009 New Yorker article on health reform, Atul Gawande talks about the concept of "path dependence" as a major reason for the state of any country's health care system. &nbsp;Essentially he argues that the systems one observes today are not the product of discreet events or sheer will of any particular political party. &nbsp;Rather, these highly complex systems are the result of the momentum that builds over many years and many small decisions; each reflecting the unique set of circumstances of any particular time. &nbsp;</li>
<li>Following that argument, I am skeptical that we have a reasonable chance of deploying the Carte Vitale next year, or that we can impose a Japanese style "source of truth" index of fees the year after that. &nbsp;Rather, I think we need to drive reform by evolving our current system; jettisoning the baggage and nurturing the good points.</li>
</ul>
</li>
</ul>
<p><span style="font-weight: bold;"><strong>Can we Americans think about and answer the "First Question" as it was intended - an ethical barometer for our outlook on the question of health?</strong></span></p>
<p>
<ul>
<li>Moral questions appear to have common understanding in these other countries. &nbsp;Part of what defines our culture (and I believe is a strong reason for our success as a society) is that we are rigorously individualistic. &nbsp;Inherently, we resist morality (at least I do), especially if it comes attached with a sense of a "right answer". &nbsp;We are loathed to hear what we are "supposed to do". &nbsp;That said, we have no choice but to drive reform in our healthcare system. &nbsp;So I am holding out hope that we can achieve this reform without necessarily arriving at a univeral agreement on this moral/ethical question of right to healthcare.</li>
</ul>
</p>]]></description><wfw:commentRss>http://www.shaheeb.com/blog/rss-comments-entry-15087440.xml</wfw:commentRss></item><item><title>What Get Set...GO! has taught me about mobile web development...</title><category>GetSetGo</category><category>getsetgo</category><dc:creator>Shaheeb</dc:creator><pubDate>Sun, 29 Jan 2012 17:40:44 +0000</pubDate><link>http://www.shaheeb.com/blog/2012/1/29/what-get-setgo-has-taught-me-about-mobile-web-development.html</link><guid isPermaLink="false">290186:2961060:14775997</guid><description><![CDATA[<p>With just over 20 hours <span style="text-decoration: line-through;">sunk</span> invested into my beta/prototype of <a href="http://www.getsetgomobile.com">Get Set...GO!</a>, I've picked up on a few realities of mobile web development.</p>
<p><strong>Let me first introduce you to Get Set...GO!</strong> &nbsp;</p>
<p>Think of middle school recess or those hot summer afternoons when you and your friends from the block would race to the end of the street. &nbsp;Think of that free, simple feeling of just tearing down the alley to see who could get to that mailbox first (you know, that yellow one next to the big tree?). &nbsp;There were no rules, and what you won was bragging rights. &nbsp;</p>
<p>Get Set Go! revives that same simple sense of competition as a location-aware mobile game. &nbsp;You pick a destination (maybe that Alterra coffeeshop two blocks over), send a challenge via sms or email to a few friends, and its game on! &nbsp;Get Set Go! tracks your location, as well as your friends, and the first one to get there is checked in as the winner. &nbsp;</p>
<p>You pick up points for races you start and join (with bonus badges for wins). &nbsp;Businesses that sponsor destinations can offer prizes to winners and other checkin rewards to other racers.</p>
<p><strong>Minimum Viable Prototype...</strong></p>
<p>Planning is key (I'm told). &nbsp;I forced myself to spend a few hours paper-napkin-ing the idea. &nbsp;I developed a flow for the app (try <a href="http://www.lucidchart.com">LucidChart</a> for dirt simple flowcharting), thought about some basic game mechanics and worked out a value-proposition for the race sponsors (ie my revenue model). &nbsp;The exercise helped me land on a basic spec for the game that would allow me to get my phone out and tap on some screens as I pitched the concept to <span style="text-decoration: line-through;">friends</span> anyone who'd listen.</p>
<p>I decided to try wireframes using <a href="http://www.balsamiq.com/products/mockups/mybalsamiq">Balsamiq</a> and some others, but found that for my own use, the mockups made the app much harder to visualize. &nbsp;I decided to try platforms like <a href="http://www.applicationcraft.com">ApplicationCraft</a>&nbsp;and <a href="http://rhomobile.com/">Rhomobile</a>&nbsp;to simplify the visual aspects of designing a mobile application flow. &nbsp;Now these tools are incredibly powerful, and while they do simplify certain advanced aspects of multiple platform targeting, they do come with a non-trivial learning curve.</p>
<p>My needs were centered around developing a usable protoype of the concept, quickly and cheaply. &nbsp;I've written some code now and again, and decided that it would be faster for me to whip something together myself, and then transition to ApplicationCraft when I'm ready to refine the prototype into a more beta product.</p>
<p><strong><a href="http://jquerymobile.com">jQueryMobile</a> to the rescue...</strong></p>
<p>Any developer familiar with the incredibly powerful and popular jQuery framework can be extremely productive extremely quickly using the jQueryMobile platform. &nbsp;However! &nbsp;Beware. &nbsp;I was surprised to find so much of what I needed to accomplish required various degrees of hackery. &nbsp;</p>
<ul>
<li>Cross-domain requests or Same Origin Policy woes 
<ul>
<li>http://www.giantflyingsaucer.com/blog/?p=2682</li>
<li>Not quite a hack per se, but the whole concept of how JSONP is implemented is oddly complex, but a necessary reality in mobile web development</li>
</ul>
</li>
<li>Variety of mobile specific implementations of the Google Map API 
<ul>
<li>Google's eerily awesome javascript mapping API <a href="http://code.google.com/apis/maps/documentation/javascript/">(v3)</a></li>
<li>Best API to the API I've found (<a href="http://www.smashinglabs.pl/gmap">GMap</a>). &nbsp;Certainly consuming the Google API directly is likely the best way to go for reliability and performance, but in reality fairly routine operations like <a href="http://www.smashinglabs.pl/gmap/labs#markerkeys">searching for markers on a map</a> is often easier through wrappers than dealing with the core API.</li>
</ul>
</li>
<li>Implementing fixed headers and footers 
<ul>
<li>Various approaches ranging from the <a href="http://jquerymobile.com/test/docs/toolbars/bars-fixed.html">standard</a>&nbsp;to some <a href="http://stackoverflow.com/questions/4377062/how-to-fix-jquery-mobiles-fixed-footer">more</a> <a href="http://stackoverflow.com/questions/4724068/how-to-keep-jquery-mobile-header-and-footer-fixed">exotic</a> approaches.</li>
</ul>
</li>
</ul>
<p>Now, I'm not complaining mind you! &nbsp;Just cautioning that although access to the raw tools can empower you to produce workable prototypes with minimal friction, you have to evaluate whether its sustainable for you to deal with build challenges *and* business development priorities.</p>
<p>So what can I say about my experience so far with mobile development:</p>
<p>&nbsp;</p>
<ol>
<li><strong>Plan</strong>. &nbsp;Committing to a hardline spec for your prototype will bound the scope of your effort, and also go a long way in refining your best available options to deliver that desired state.</li>
<li><strong>Build it yourself.</strong> &nbsp;At least in the beginning. &nbsp;You will very quickly learn the key challenges you will need to invest the greatest amount of resources into as you move further toward delivery.</li>
<li><strong>Share it. </strong>&nbsp;Its a difficult proposition, but share what you have early and often. &nbsp;Its painful to hear comments like "is it supposed to look like that??", or "huh, that didn't quite work!", but you will end up directing your effort more accurately toward the right challenges in your project. &nbsp;That is, the ones your users and customers care about; &nbsp;and these may not be the ones you thought of first!</li>
</ol>
<p>&nbsp;</p>
<p>&nbsp;</p>]]></description><wfw:commentRss>http://www.shaheeb.com/blog/rss-comments-entry-14775997.xml</wfw:commentRss></item><item><title>Shabana's guest post on Disability.gov</title><category>Bluefrog</category><category>Personal</category><category>personal</category><dc:creator>Shaheeb</dc:creator><pubDate>Sat, 17 Dec 2011 17:35:07 +0000</pubDate><link>http://www.shaheeb.com/blog/2011/12/17/shabanas-guest-post-on-disabilitygov.html</link><guid isPermaLink="false">290186:2961060:14153836</guid><description><![CDATA[<p>My sister (<a href="http://www.linkedin.com/in/shabanawollin">Shabana Wollin</a>) was invited as a guest blogger at <a href="http://blog.govdelivery.com/">Disability.gov</a>. &nbsp;She <a href="http://blog.govdelivery.com/usodep/2011/12/5-helpful-tips-to-successfully-negotiate-in-a-tough-job-market.html">wrote a post</a> on negotiating in a tough job market. &nbsp;I can tell you from personal experience, Shabana has mastered the art of understanding a client's technical problem space, figuring out if she's the right solution fit, and then agressively negotiating an arrangement that benefits both parties. &nbsp;<a href="http://blog.govdelivery.com/usodep/2011/12/5-helpful-tips-to-successfully-negotiate-in-a-tough-job-market.html">Check out the post and comment!</a></p>]]></description><wfw:commentRss>http://www.shaheeb.com/blog/rss-comments-entry-14153836.xml</wfw:commentRss></item><item><title>A quick note about Hu Moments (re: DARPA Shredder Challenge)</title><category>darpa</category><category>shredder</category><category>software</category><dc:creator>Shaheeb</dc:creator><pubDate>Wed, 09 Nov 2011 04:46:44 +0000</pubDate><link>http://www.shaheeb.com/blog/2011/11/8/a-quick-note-about-hu-moments-re-darpa-shredder-challenge.html</link><guid isPermaLink="false">290186:2961060:13651010</guid><description><![CDATA[<p>Kat Scott from the <a href="http://www.simplecv.org">SimpleCV</a>/<a href="http://www.ingenuitas.com">Ingenuitas</a>&nbsp;team was gracious enough to share some feedback with me on my use of the SimpleCV package and approach to the Shredder Challenge. &nbsp;Not surprisingly, she and her colleagues have had their own thoughts on how to tackle the puzzles, and I for one am eagerly looking forward to their attempts.</p>
<p>Kat (very diplomatically!) confirmed my comment that shape matching would not work, and then very kindly shared some specific technical information on why. &nbsp;&nbsp;</p>
<blockquote>
<p>"Your approach is a good first start, but unfortunately the Hu moment is not going to work in this situation. The Hu moment is a measure of the image moment, which is kinda like a moment in physics. Basically a moment describes how much work you have to do to get something to spin. Round things have less of a moment and spin easily, long things are a lot more difficult to spin. Moments are actually a good way to match things that are similar shapes, but not to align edges that are a like puzzel pieces."</p>
</blockquote>
<p>Kat also forwarded a video of a simplified visual explanation of the math behind the Hu moments that illustrates how robust the calculations are in identifying a particular image, regardless of transformations applied to it: &nbsp;<a href="http://www.youtube.com/watch?v=O-hCEXi3ymU" target="_blank">http://www.youtube.com/watch?v=O-hCEXi3ymU</a>&nbsp;</p>
<p>Personally, I found that while the video definitely drove the point home, Kat's simple, straightforward explanation was key for me in understanding the nature of this feature.</p>
<p>I hope this little bit sets off a light bulb or two for others, as it did for me. &nbsp;At the moment, my thinking on the first puzzle has turned to collision detection; the type you might be familiar with if you've played any old-school platform scroller arcade game. &nbsp;These games determined when two polygons intersected each other, and I think the principle should apply to determine whether two puzzle pieces in the shredder challenge are a good fit.</p>
<p>My latest homework is to understand the <a href="http://www.codezealot.org/archives/55#sat-intro">Separating Axis Theorem</a>&nbsp;and see if I can develop an approach based on this concept.</p>]]></description><wfw:commentRss>http://www.shaheeb.com/blog/rss-comments-entry-13651010.xml</wfw:commentRss></item><item><title>DARPA Shredder Challenge - Part Deux</title><dc:creator>Shaheeb</dc:creator><pubDate>Fri, 04 Nov 2011 03:28:17 +0000</pubDate><link>http://www.shaheeb.com/blog/2011/11/3/darpa-shredder-challenge-part-deux.html</link><guid isPermaLink="false">290186:2961060:13590662</guid><description><![CDATA[<p>As promised, here is a bit of code that follows my preliminary line of thinking on Puzzle1:&nbsp;</p>
<div class="codeSnip">#!/usr/bin/python<br /> from SimpleCV import *<br /> from optparse import OptionParser<br /> import random<br /> <br /> cmdOptParser = OptionParser()<br /> cmdOptParser.add_option("-i","--input",dest="inputFilename",help="Filename of the image to operate on")<br /> cmdOptParser.add_option("-o","--output",dest="outputFilename",help="Filename of the image to save on")<br /> <br /> (options,args) = cmdOptParser.parse_args()<br /> puzzleImg = Image(options.inputFilename)<br /> #&nbsp;&nbsp;The source images for the challenges are flippin huge.  So let's up the recursion limit to support the search for many blobs<br /> sys.setrecursionlimit(10000)<br /> #&nbsp;&nbsp;Kick things off by creating a binarized() version of the source image<br /> binarizedSrc = puzzleImg.binarize()<br /> #&nbsp;&nbsp;Now lets find the blobs.  Lets set some mins to make sure we don't worry about the itty bitty scraps<br /> binBlobs = binarizedSrc.findBlobs(-1,2000)<br /> #&nbsp;&nbsp;We have a set of identified blobs, so we can do some basic analysis.  Let's just stupidly try to match up blobs.  This won't really work for us because we are not trying to find duplicates etc, we need matching tiles.  But anyway.<br /> blobBestMatches = {}<br /> for i,blob in enumerate(binBlobs):<br /> &nbsp;&nbsp;blobMatchSet = {}<br /> &nbsp;&nbsp;for c,blobCmp in enumerate(binBlobs,1):<br /> &nbsp;&nbsp;&nbsp;&nbsp;blobMatch = blob.match(blobCmp)<br /> &nbsp;&nbsp;&nbsp;&nbsp;if (blobMatch &gt; 0):&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#blobMatch at 0 means it is itself<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;blobMatchSet[c] = blobMatch<br /> &nbsp;&nbsp;blobBestMatches[i] = min(blobMatchSet,key=blobMatchSet.get)&nbsp;&nbsp;&nbsp;&nbsp;#this clever little bit identifies the index of the dict that contains the lowest possible match value.<br /> for k,v in blobBestMatches.iteritems():<br /> &nbsp;&nbsp;randomColor = (random.randint(0,255),random.randint(0,255),random.randint(0,255))<br /> &nbsp;&nbsp;print randomColor<br /> &nbsp;&nbsp;binBlobs[k].draw(randomColor,-1,-1,binarizedSrc.dl())<br /> &nbsp;&nbsp;binBlobs[v].draw(randomColor,-1,-1,binarizedSrc.dl())<br />&nbsp; binarizedSrc.save(options.outputFilename)</div>
<p>&nbsp;</p>
<p>Forgive me if the code formatting creates issues for you. &nbsp;The script is dirt simple, and should be easy to follow. &nbsp;It is only a proof of concept that (usefully) gets as far as identifying the distinct blobs. &nbsp;From there, I've asked it to perform a simple match and identify the pairs by coloring each of the matches the same. &nbsp;Running the script produces something similar to this:</p>
<p><span class="full-image-block ssNonEditable"><span><img src="http://www.shaheeb.com/storage/post-images/puzzle1_titlecropped_manip5.png?__SQUARESPACE_CACHEVERSION=1320378372089" alt="" /></span><span class="thumbnail-caption" style="width: 350px;">Doesn't that look a lot easier now?</span></span></p>
<p>This last bit is not at all useful in solving the puzzle because we are not attempting to identify duplicates in the image. &nbsp;Rather we need to match each shred to a "fit match". &nbsp;I have not yet figured out the math to express the "fit match", but at least I'm a step closer in this marathon.</p>]]></description><wfw:commentRss>http://www.shaheeb.com/blog/rss-comments-entry-13590662.xml</wfw:commentRss></item><item><title>DARPA Shredder Challenge - Preliminary (quarter-baked) thoughts...</title><dc:creator>Shaheeb</dc:creator><pubDate>Mon, 31 Oct 2011 21:38:20 +0000</pubDate><link>http://www.shaheeb.com/blog/2011/10/31/darpa-shredder-challenge-preliminary-quarter-baked-thoughts.html</link><guid isPermaLink="false">290186:2961060:13543454</guid><description><![CDATA[DARPA recently opened its Shredder Challenge, and I for one am eager for the opportunity to play engineer and think about how I might think about a problem like this!]]></description><wfw:commentRss>http://www.shaheeb.com/blog/rss-comments-entry-13543454.xml</wfw:commentRss></item><item><title>Paramiko: easy, native ssh in Python...</title><dc:creator>Shaheeb</dc:creator><pubDate>Sat, 13 Aug 2011 18:25:41 +0000</pubDate><link>http://www.shaheeb.com/blog/2011/8/13/paramiko-easy-native-ssh-in-python.html</link><guid isPermaLink="false">290186:2961060:12505533</guid><description><![CDATA[<p>I just discovered Paramiko (<a href="http://www.lag.net/paramiko/docs/">docs here</a>)! &nbsp;This module allows SSH interaction natively (meaning directly through code, and not through system calls), and supports a pretty comprehensive scope of operations over ssh. &nbsp;The key items that caught my attention are:</p>
<p>&nbsp;</p>
<ul>
<li>Intutive syntax and application      
<ul>
<li>
<div class="codeSnip">mysshclient = paramiko.SSHClient() mysshclient.connect('hostadd',username='user',password='pass')</div>
</li>
<li>Addressed the missing host key issue we are all familiar with directly on the shell
<div class="codeSnip">mysshclient = paramiko.SSHClient() mysshclient.set_missing_host_key_policy(paramiko.AutoAddPolicy())</div>
</li>
</ul>
</li>
<li>Key based authentication      
<ul>
<li>Terrific <a href="http://segfault.in/2010/03/paramiko-ssh-and-sftp-with-python/">example here</a></li>
<li>
<div class="codeSnip">mysshclient = paramiko.SSHClient() mysshclient.set_missing_host_key_policy(paramiko.AutoAddPolicy()) privateKeyPath = '/path/to/your/key' privateKey = paramiko.RSAKey.from_private_key_file(privateKeyPath) mysshclient.connect('hostaddr',username='user',pkey=privateKey)</div>
</li>
</ul>
</li>
<li>Send commands and interact with output on the remote machine      
<ul>
<li>
<div class="codeSnip">mysshclient = paramiko.SSHClient() mysshclient.set_missing_host_key_policy(paramiko.AutoAddPolicy()) mysshclient.connect('hostaddr',username='user',password='pass') stderr, stdout, stdin = myssh.exec_command('ls -latrh') stdout.readlines()</div>
</li>
</ul>
</li>
</ul>
<p>&nbsp;</p>
<p>Brilliant. &nbsp;Will be applying Paramiko to a teeny automation script that will start an Amazon EC2 instance, run a series of commands on the server (neat scraping and analysis stuff I hope to write more about), and then process some post shutdown ops.</p>
<p>&nbsp;</p>]]></description><wfw:commentRss>http://www.shaheeb.com/blog/rss-comments-entry-12505533.xml</wfw:commentRss></item><item><title>Mint.com let me down today...</title><dc:creator>Shaheeb</dc:creator><pubDate>Wed, 13 Oct 2010 23:28:38 +0000</pubDate><link>http://www.shaheeb.com/blog/2010/10/13/mintcom-let-me-down-today.html</link><guid isPermaLink="false">290186:2961060:9180127</guid><description><![CDATA[<p>I have been a loyal Mint.com user for over 2 years, and today I experienced a level of dissatisfaction with the service that surprised me.</p>
<p>&nbsp;A little background: &nbsp;At around 6:45am CST today (10/13/2010), I received an email with no message body or subject line from "<span class="gD">Mint.com</span>&nbsp;<span class="go">&lt;stage-mini@mint.com&gt;". &nbsp;The message contained an single 1x1 pixel image that "phoned home" to mkt41.net - an email marketing firm that presumably tracks visits and message load statistics. &nbsp;After a little Googling, I <a href="http://gsfn.us/t/1n67r">learned</a> that Mint.com apparently sent a "flood of emails" the previous morning due to a "simple" misconfiguration of a test server "with no customer data". &nbsp;Stephen Mann (Mint.com's Director - Customer Advocacy) assures us (other loyal users like me no doubt) that measures were being put in place to ensure this never happens again.</span></p>
<p>So when I received a second blank email - identical to the first - about 6 hours later, I was upset. &nbsp;I then learned that many others had received a half dozen or more emails well after Stephen Mann's rather inadequate message. &nbsp;As I re-read that message that Mann posted early on 10/13, I grew more upset as I saw clearly both the incompetence and the utter lack of professionalism represented in the content. &nbsp;</p>
<p>Here are my two main issues with Mint.com/Stephen Mann's message:</p>
<ul>
<li>Stephen Mann's choice of language in posting "sorry for being annoying" and "We also apologize if we woke you up from your sleep! " indicates that he thinks he's managing the social presence for a brand new shiny web2.0 side project. &nbsp;Mint.com manages the personal financial information for hundreds of thousands (millions?) of users. &nbsp;Stephen Mann should take this more seriously. &nbsp;Moreover, a $30million sale to Intuit should firmly signal (at least to Mint.com) that Mint.com has a greater responsibility to its userbase. &nbsp;We should not be subject to amateurish mistakes like allowing a test server to communicate with the outside world.</li>
<li>I believe Stephen Mann is either too incompetent to have correctly determined the technical details of the problem, or outright lied in this message. &nbsp;If the mistake occurred on a test-system with "no customer data", how was the email delivered to my email address? &nbsp;If the test system has access to my email address, what other detail exists in this environment?</li>
</ul>
<p>My final concern is that not many people appear to be aware of this problem! &nbsp;To my own tiny part, I have hooked the RSS feed for this utterly shameful feedback thread into twitterfeed. &nbsp;Any updates to the forum will be pumped into my <a href="http://www.twitter.com/shaheeb">embarrassingly lonely twitter stream</a>.</p>
<p>&nbsp;</p>
<p>For shame Mint.com. &nbsp;Cereal.</p>
<p>&nbsp;</p>
<p>Track the Forum Here: &nbsp;<a href="http://gsfn.us/t/1n67r">http://gsfn.us/t/1n67r</a></p>
<p>&nbsp;</p>]]></description><wfw:commentRss>http://www.shaheeb.com/blog/rss-comments-entry-9180127.xml</wfw:commentRss></item><item><title>On becoming a positive deviant...</title><dc:creator>Shaheeb</dc:creator><pubDate>Wed, 14 Apr 2010 03:59:00 +0000</pubDate><link>http://www.shaheeb.com/blog/2010/4/13/on-becoming-a-positive-deviant.html</link><guid isPermaLink="false">290186:2961060:7319027</guid><description><![CDATA[<p>I just finished Atul Gawande's "<a href="http://amzn.com/0312427654">Better</a>" and found his closing thought particularly inspiring.  Gawande is a gifted author, and masterfully guides his readers through a series of case studies that illustrate instances of remarkable achievement, how these were accomplished (and then replicated), and what he learned about the people that dedicated themselves to the relentless pursuit of "better".</p>
<p>Gawande's closing centers around a lecture he once gave to medical students that he hoped would help guide them in their own efforts to distinguish themselves in their careers (and likely their lives in general).  He offers his students 5 ideas that he feels would condition them into a pattern of behavior that would set them in the right direction:</p>
<p>&nbsp;</p>
<ul>
<li><strong>Ask an unscripted question</strong>:  he encourages stepping outside the routine to establish a more human connection; not just with patients, but also with collegues or friends.</li>
<li><strong>Count something</strong>:  in one of my favorite lines in the book, Gawande suggests that everyone should be a scientist in their world. &nbsp; Counting something - as he did the number of instances sponges or tools were left behind in the body after surgeries - conditions the mind to ask the types of probing questions that invariably lead to innovation and change.</li>
<li><strong>Embrace change</strong>:  he is careful to caution against blind adoption.  Rather he encourages the willingness to learn, critically evaluate, and adopt new ideas if they bear merit.</li>
<li><strong>Don't complain</strong>:  Gawande suggests (from his own experience) that nothing is as demoralizing in healthcare than hearing doctors complain. &nbsp; I'm inclined to think that a variation of that sentiment applies equivalently to virtually any situation.</li>
<li><strong>Write something</strong>:  perhaps this last suggestion was the most compelling as it motivated me to write this short blurb.  I find that writing (particularly about things that are meaningful to me personally) naturally forces me to think more critically and creatively. &nbsp; At the very least it has forced me to put the iPad keyboard through it's paces! (this post was authored on my spanking new iPad using SquareSpace's iPhone app. &nbsp;Thanks Mona!)</li>
</ul>
<p>&nbsp;</p>
<p>I highly recommend <a href="http://amzn.com/0312427654">Better</a>, as well as Gawande's other texts (including <a href="http://amzn.com/0805091742">The Checklist Manifesto</a>, and his very <a href="http://bit.ly/b6B1XD">insightful</a> <a href="http://bit.ly/bEVs4Z">contributions</a> in the <a href="http://bit.ly/bCakQ5">New Yorker</a>).</p>]]></description><wfw:commentRss>http://www.shaheeb.com/blog/rss-comments-entry-7319027.xml</wfw:commentRss></item></channel></rss>
