<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Mind Dump</title>
	<atom:link href="http://lostechies.com/ryansvihla/feed/" rel="self" type="application/rss+xml" />
	<link>http://lostechies.com/ryansvihla</link>
	<description>The small minded meanderings of the confused</description>
	<lastBuildDate>Wed, 10 Apr 2013 00:28:41 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.2</generator>
		<item>
		<title>An Evernote backed Journal using Vim/Emacs</title>
		<link>http://lostechies.com/ryansvihla/2013/04/07/an-evernote-backed-journal-using-vimemacs/</link>
		<comments>http://lostechies.com/ryansvihla/2013/04/07/an-evernote-backed-journal-using-vimemacs/#comments</comments>
		<pubDate>Sun, 07 Apr 2013 16:54:31 +0000</pubDate>
		<dc:creator>Ryan Svihla</dc:creator>
				<category><![CDATA[Evernote]]></category>
		<category><![CDATA[Vim]]></category>

		<guid isPermaLink="false">http://lostechies.com/ryansvihla/?p=73</guid>
		<description><![CDATA[I journal quite a bit and my holy grail has been using my favorite text editor (Vim or Vim bindings) with Evernote to store the everything in a smart searchable format. Today I stumbled onto a neat little tool that makes&#160;&#8230; <a href="http://lostechies.com/ryansvihla/2013/04/07/an-evernote-backed-journal-using-vimemacs/">Continue&#160;reading&#160;<span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I journal quite a bit and my holy grail has been using my favorite text editor (Vim or Vim bindings) with Evernote to store the everything in a smart searchable format. Today I stumbled onto a neat little tool that makes this all happen called Geeknote http://www.geeknote.me/.  It&#8217;s written in Python and works fine on my Mac.</p>
<h3>Installing Geeknote</h3>
<div>In the directory of your choosing run the following script.  This will checkout the latest copy from source and allow you to login:</div>
<div>
<blockquote>
<div id="file-install_geeknote-LC1" class="line"><span class="c" style="color: #999988; font-style: italic;">#!/bin/sh</span></div>
<div id="file-install_geeknote-LC2" class="line"><span class="c" style="color: #999988; font-style: italic;"># Download the repository.</span></div>
<div id="file-install_geeknote-LC3" class="line">git clone git://github.com/VitaliyRodnenko/geeknote.git</div>
<div id="file-install_geeknote-LC4" class="line"></div>
<div id="file-install_geeknote-LC5" class="line"><span class="nb" style="color: #0086b3;">cd </span>geeknote</div>
<div id="file-install_geeknote-LC6" class="line"></div>
<div id="file-install_geeknote-LC7" class="line"><span class="c" style="color: #999988; font-style: italic;"># Launch Geeknote and go through login procedure.</span></div>
<div id="file-install_geeknote-LC8" class="line">python geeknote.py login</div>
<div id="file-install_geeknote-LC9" class="line"><span class="c" style="color: #999988; font-style: italic;">#change vim to whatever you want it to be</span></div>
<div id="file-install_geeknote-LC11" class="line">python geeknote.py settings &#8211;editor vim</div>
</blockquote>
</div>
<div></div>
<div>Then add the following script and execute it from whatever directory you want to install Geeknote into</div>
<div>
<blockquote>
<div id="file-gistfile1-sh-LC1" class="line"><span class="c" style="color: #999988; font-style: italic;">#!/bin/sh</span></div>
<div id="file-gistfile1-sh-LC2" class="line"></div>
<div id="file-gistfile1-sh-LC3" class="line"><span class="c" style="color: #999988; font-style: italic;">#change checkout_dir to match where you&#8217;ve checked out the latest</span></div>
<div id="file-gistfile1-sh-LC4" class="line"><span class="nv" style="color: teal;">checkout_dir</span><span class="o" style="font-weight: bold;">=</span>~/Documents/geeknote</div>
<div id="file-gistfile1-sh-LC5" class="line"><span class="c" style="color: #999988; font-style: italic;">#change notebook to whatever notebook you use as your journal</span></div>
<div id="file-gistfile1-sh-LC6" class="line"><span class="nv" style="color: teal;">notebook</span><span class="o" style="font-weight: bold;">=</span>Journal</div>
<div id="file-gistfile1-sh-LC7" class="line"><span class="nv" style="color: teal;">title</span><span class="o" style="font-weight: bold;">=</span><span class="nv" style="color: teal;">$1</span></div>
<div id="file-gistfile1-sh-LC8" class="line"><span class="k" style="font-weight: bold;">if</span> <span class="o" style="font-weight: bold;">[</span> -z <span class="s2" style="color: #dd1144;">"$1"</span> <span class="o" style="font-weight: bold;">]</span></div>
<div id="file-gistfile1-sh-LC9" class="line"><span class="k" style="font-weight: bold;">    then</span></div>
<div id="file-gistfile1-sh-LC10" class="line"><span class="nv" style="color: teal;">        title</span><span class="o" style="font-weight: bold;">=</span><span class="k" style="font-weight: bold;">$(</span>date +%Y-%m-%d<span class="k" style="font-weight: bold;">)</span></div>
<div id="file-gistfile1-sh-LC11" class="line"><span class="k" style="font-weight: bold;">fi</span></div>
<div id="file-gistfile1-sh-LC12" class="line"><span class="nb" style="color: #0086b3;">echo </span>creating a note named <span class="nv" style="color: teal;">$title</span> in the <span class="nv" style="color: teal;">$notebook</span> notebook</div>
<div id="file-gistfile1-sh-LC13" class="line"></div>
<div id="file-gistfile1-sh-LC14" class="line">python <span class="nv" style="color: teal;">$checkout_dir</span>/geeknote.py create &#8211;title <span class="nv" style="color: teal;">$title</span> &#8211;notebook <span class="nv" style="color: teal;">$notebook</span> &#8211;content <span class="s2" style="color: #dd1144;">&#8220;test&#8221;</span></div>
<div id="file-gistfile1-sh-LC15" class="line">python <span class="nv" style="color: teal;">$checkout_dir</span>/geeknote.py edit &#8211;note <span class="nv" style="color: teal;">$title</span> &#8211;notebook <span class="nv" style="color: teal;">$notebook</span> &#8211;content <span class="s2" style="color: #dd1144;">&#8220;WRITE&#8221;</span></div>
</blockquote>
</div>
<div>
<h3>Writing Journal Entries</h3>
<div>My script is named journal so for me I just type either of the following:</div>
<blockquote>
<div><span style="background-color: white; font-family: monospace; font-size: 12px; line-height: 16px; white-space: pre;">journal </span> <span style="background-color: white; color: #999988; font-family: Consolas, 'Liberation Mono', Courier, monospace; font-size: 12px; font-style: italic; line-height: 16px;">#creates a note in journal with todays date as the title</span></div>
</blockquote>
<div>or</div>
<blockquote>
<div><span style="background-color: white; font-family: monospace; font-size: 12px; line-height: 16px; white-space: pre;">journal custom_title </span> <span style="background-color: white; color: #999988; font-family: Consolas, 'Liberation Mono', Courier, monospace; font-size: 12px; font-style: italic; line-height: 16px;">#no spaces allowed and will use the title specified</span></div>
</blockquote>
<div></div>
<h3>Summary</h3>
<div>With a few simple scripts and in moments you two can be writing notes in the command prompt. I highly recommend you extend these scripts to your needs or just use the Geeknote command prompt as you see fit.  <span style="background-color: white; font-family: Consolas, 'Liberation Mono', Courier, monospace; font-size: 12px; line-height: 16px;"> </span></div>
<p>&nbsp;</p>
</div>
<p><font color="#B4B4B4" size="-2">Post Footer automatically generated by <a href="http://www.freetimefoto.com/add_post_footer_plugin_wordpress" style="color: #B4B4B4; text-decoration:underline;">Add Post Footer Plugin</a> for wordpress.</font></p>
]]></content:encoded>
			<wfw:commentRss>http://lostechies.com/ryansvihla/2013/04/07/an-evernote-backed-journal-using-vimemacs/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Ruth&#8217;s Story</title>
		<link>http://lostechies.com/ryansvihla/2013/02/04/ruths-story/</link>
		<comments>http://lostechies.com/ryansvihla/2013/02/04/ruths-story/#comments</comments>
		<pubDate>Mon, 04 Feb 2013 11:28:45 +0000</pubDate>
		<dc:creator>Ryan Svihla</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://lostechies.com/ryansvihla/?p=63</guid>
		<description><![CDATA[Ruth Ann Svihla came into this world screaming and angry on October 30 2011 at 6:57 am. She was and has always been a beautiful, intelligent child that brought us a great deal of joy, but she was born with&#160;&#8230; <a href="http://lostechies.com/ryansvihla/2013/02/04/ruths-story/">Continue&#160;reading&#160;<span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Ruth Ann Svihla came into this world screaming and angry on October 30 2011 at 6:57 am. She was and has always been a beautiful, intelligent child that brought us a great deal of joy, but she was born with many challenges to overcome.</p>
<h2>Cleft</h2>
<p>The first such challenge we faced was a pretty severe cleft lip and pallet. Although this turned out to the be the most minimal of her problems, it was significant at the time. She was unable to eat on her own that first day, and we had to feed her through a nose tube. Attempts to teach her how to eat were met with frustration, both from my daughter and from us as well. I went to bed that night distraught and worried at challenges of being a new father of &#8220;special needs&#8221; child. Would my wife and I be able to cope?</p>
<p>The next day brought more of the same, frustrated parents and angry frustrated baby. But somewhere along the way I realized that she was frustrated not with attempting to eat, nearly as much as being helped to eat. So we stopped trying to help her and she began to eat on her own instantly. We were told most cleft lip and pallet babies take 2 weeks to learn to eat as well as Ruth did that second day. Only two days old and already adaptable and fiercely independent!</p>
<h2>A &#8220;Normal&#8221; Life</h2>
<p>After that we settled into being mostly normal parents, my wife made weekly trips to Houston from San Antonio for her plastic surgery consults and we looked forward to the day when she would just be a &#8220;normal&#8221; kid. However, around Christmas time she became extra colicky and struggled to hold down any food, but otherwise was largely consolable. Eventually she was down to 1/4 of what she&#8217;d been able eat before and we ended up in the hospital for a week, just to try to get her some nutrition. She did well once we started getting her fed and we were ready to go home. About an hour before leaving, the doctor pulled us aside in a very concerned tone. Within the hour, we were in an ambulance on our way to Texas Children&#8217;s Hospital in Houston and so began our next chapter.</p>
<h2>Pompe Disease</h2>
<p>We went through so many hills and valleys with our subsequent trip to Houston, which would become our home, that it would take a book to tell it all. Let me summarize and tell you all that I have watched my daughter lose the ability to move entire limbs, to smile, to otherwise become inert for long periods of time, but I&#8217;ve also had the opportunity to watch her go through a lifetime&#8217;s worth of conquered challenges.</p>
<p>Pompe disease can be quite deadly and horrible to go through. The key metrics for survivability are catching it quickly (which we did), and having a type of the disease that responds to treatment (which Ruth had). The journey to finding out those two realities unfortunately took a month and a half and the damage in the meantime was quite severe. Pompe disease is exceedingly rare (1 in 40k births depending on population) and is rarely caught when it occurs. Most cases are believed to be misdiagnosed as SIDS as the infantile form of Pompe disease typically has a 6-8 month life span. Pompe patients are unable to process glycogen fully and so it stores in their muscles. Once the levels become toxic the muscle tissue becomes damaged, sometimes permanently. Despite this it can be managed often quite well, and we&#8217;d incorrectly believed at the time of her diagnosis we could return her to a &#8220;normal&#8221; life with some small challenges.</p>
<p>Ruth to her credit treated life as &#8220;normal&#8221;. Despite having a heart far weaker and larger than many kids on the transplant list and having a muscular dystrophy she was able to become a constant ball of motion and troublemaking whereas many kids on the transplant list are suffering.</p>
<h2>Home</h2>
<p>After 2 1/2 months in TCH thanks to some amazing doctors, nurses, and therapists (OT/PT and RT) we were able to go to our new home in Houston and manage her disease from there, which was within a mile of TCH so we could make her multiple per week appointments. Initially everyone was pleased with Ruth&#8217;s progress and we were filled with hope. However, after 4 months her heart remained stubbornly weak and it had actually slightly grown over the preceding months. Most kids with Pompe disease that can handle it&#8217;s primary treatment Myozyme get fully healthy functional hearts in time, their other physical attributes often never fully recover. In Ruth&#8217;s case she was able to physically move as if the Myozyme was working exceptionally well, but her heart was telling us it was not working at all.</p>
<h2>Routine checkups can be so very non-routine</h2>
<p>On sept 18 we checked back into the hospital after routine checkup told us her measurements for heart failure had suddenly gotten very bad.  Within the day we were told she was going to have to be intubated and at her level of heart failure it was extremely risky and likely lethal  Within 5 hours one change led to my daughter sitting up on my lap and giggling as if nothing wrong had ever happened. By 3 am that night she&#8217;d woken up half the infant pod on the CVICU floor with her squeals of delight. I realize looking back now this was the moment that Ruth proved she was just content to find what joy she could at any time. She&#8217;d had at least 2 near death experience before her first birthday, and I think she knew at some level she could feel terrible one minute and great the next, so why not just enjoy the good ones.</p>
<p>I wish I could tell you it was an amazing recovery after that. We tried many times to get her onto &#8220;normal&#8221; support and we failed many times to do so. Her patience with hospital care basically became zilch, however, otherwise she continued to be a very happy baby. She learned a great deal, started to sit up on her own support for up to a minute at a time, and in general was a complete joy in our life. She became very sneaky. She would spend hours trying to pull bandages off, or pull out NG tubes, and do &#8220;fake&#8221; coughs for somehow more attention. She did all of this in between the constant attention and support she received from her mother, her aunt and I, not to mention the whole hospital of people trying to help us.</p>
<h2>Christmas</h2>
<p>Nevertheless her heart continued to be stubborn. We tried to get the board to consider a heart transplant, but as there were many complicating medical factors I chose not to go into that could lead to the heart being destroyed in a matter of months, they were obviously unwilling to take a heart away from another kid waiting transplant that would benefit. By Christmas time the side effects of heart failure led to her lungs filling up with fluid and she became oxygen dependent. We slowly watched her fade away by inches and we were convinced that we&#8217;d lost her, despite our constant efforts and the level of care she was receiving. A preliminary genetic test came back indicating she may have a chromosomal defect related to dilated cardio myopathies. This could explain how her heart was so much weaker than is normally seen in Pompe patients, it could explain how the Myozyme was not remodeling her heart. However, this along with several other factors made her case completely unique in the truest sense (the only child on record with her genetic variant of Pompe), and so it made the path much murkier for us and for her team of doctors. It also probably meant that not only would we never be able to give her a &#8220;normal&#8221; life, and we would be in for the fight of our life to keep her alive. She could have not one by two commonly fatal conditions that have expected lifespans less than she was already alive.</p>
<p>Despite all of the bad news and despair her parents were feeling, Ruthie decided it was time to get better. So much so that we reduced support until we were able to get home January 18th, four months to the day after checking into the hospital this last time.</p>
<h2>Joy and Heartache</h2>
<p>My daughter was probably happier than all of us to be home. She was surrounded by those she loved the most and was no longer being poked and prodded by strangers. We began to believe again that she may yet surprise us and recover completely. Then one morning she became very clingy. I had to hold her that entire weekend as she seemed unable to be away from me for any length of time. After having gone through what we had I was completely content with the task of holding my daughter close, until Sunday afternoon when she became very uncomfortable. I wrote in my journal that day that I was suddenly fearful she did not have nearly as long as we&#8217;d hoped and I was afraid that this may be it. We talked to the on call medical staff, her recent labs had been a bit elevated but otherwise in range for her, they were concerned but knew we didn&#8217;t want to go back into the hospital as everyone knew we may never get back out. So we decided to make adjustments in her care to compensate (lay off some diuretics and add some pain meds) and stay home until her appointment the next morning.</p>
<p>Unfortunately, at that appointment her labs came back horrifyingly bad. Her kidneys were in the process of completely shutting down. We tried one last ditch attempt to save her and checked her into the hospital and tried IV therapy. You see if you have an extremely bad heart and your kidneys shut down you&#8217;re in a very bad place. Most of the interventions you&#8217;d do for one problem are blocked by the other problem. Over the next 16 hours my daughter degraded quickly. We got her quickly into hospice care and at 9am on January 30 2013 while bathed in sunlight and surrounded by family my daughter finally rested a rest that was more complete than her mother and I could ever give her.</p>
<h2>A Lesson Of Resilience</h2>
<p>It&#8217;s easy to see nothing but heartache and tragedy in Ruth&#8217;s story, and my humble writing skills and lack of eloquence do her an injustice. Despite this I hope you were able to see that no matter what happened to my daughter, she was happy every moment she could be. She got better every chance she got.</p>
<p>Through all of her tragedy and setbacks my daughter played video games meant for 7 year olds on her iPad, got to see her first birthday, learned how to smile not once but two times, had favorite movies, danced to Miles Davis and Louis Armstrong and screamed for joy an untold amount of times. I&#8217;ve never loved anything more on this earth, and I&#8217;ve never been so proud of anyone ever as my daughter. She had a mountain sized heart physically and in spirit, and she never ever gave up.</p>
<p>At this horrible time it&#8217;s easy to want to stop trying to try at all, but she was unrelenting in trying no matter the difficulty. It&#8217;s easy to be sad all the time, but she was happy every chance she got. It&#8217;s so incredibly easy to not want to live anymore, but that would do the ultimate disservice to her repeated attempts to live.
<p><font color="#B4B4B4" size="-2">Post Footer automatically generated by <a href="http://www.freetimefoto.com/add_post_footer_plugin_wordpress" style="color: #B4B4B4; text-decoration:underline;">Add Post Footer Plugin</a> for wordpress.</font></p>
]]></content:encoded>
			<wfw:commentRss>http://lostechies.com/ryansvihla/2013/02/04/ruths-story/feed/</wfw:commentRss>
		<slash:comments>22</slash:comments>
		</item>
		<item>
		<title>Rail 3.1 CI setup with Jenkins, Test Unit &amp; SimpleCov on OS X Lion.</title>
		<link>http://lostechies.com/ryansvihla/2011/09/25/rail-3-1-ci-setup-with-jenkins-test-unit-simplecov-on-os-x-lion/</link>
		<comments>http://lostechies.com/ryansvihla/2011/09/25/rail-3-1-ci-setup-with-jenkins-test-unit-simplecov-on-os-x-lion/#comments</comments>
		<pubDate>Sun, 25 Sep 2011 17:04:54 +0000</pubDate>
		<dc:creator>Ryan Svihla</dc:creator>
				<category><![CDATA[CI]]></category>
		<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://lostechies.com/ryansvihla/?p=53</guid>
		<description><![CDATA[I recently had to setup a build server for some rails work I&#8217;m doing. Still wanting to support my other projects I setup Jenkins. I ran into several issues. Running Jenkins as a hidden user First I noticed that jenkins&#160;&#8230; <a href="http://lostechies.com/ryansvihla/2011/09/25/rail-3-1-ci-setup-with-jenkins-test-unit-simplecov-on-os-x-lion/">Continue&#160;reading&#160;<span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I recently had to setup a build server for some rails work I&#8217;m doing. Still wanting to support my other projects I setup Jenkins. I ran into several issues.</p>
<h2>Running Jenkins as a hidden user</h2>
<p>First I noticed that jenkins was running as the &#8220;daemon&#8221; user, this obviously wasn&#8217;t going to work for github and rvm needs. So I did some googling and had some guides to get Jenkins running as a specific user. I did the following (sourced from http://colonelpanic.net/2011/06/jenkins-on-mac-os-x-git-w-ssh-public-key/ ).</p>
<pre>sudo dscl . create /Users/jenkins
sudo dscl . create /Users/jenkins PrimaryGroupID 1
sudo dscl . create /Users/jenkins UniqueID 300
sudo dscl . create /Users/jenkins UserShell /bin/bash
sudo dscl . passwd /Users/jenkins $PASSWORD
sudo dscl . create /Users/jenkins home /Users/Shared/Jenkins/Home/</pre>
<p>Note: That&#8217;s really $PASSWORD up above. This gives you a prompt to enter that password. Next you&#8217;ll need to stop the Jenkins service and edit the plist and start the service back up.</p>
<pre>sudo launchctl unload -w /Library/LaunchDaemons/org.jenkins-ci.plist
sudo vim /Library/LaunchDaemons/org.jenkins-ci.plist
sudo launchctl load -w /Library/LaunchDaemons/org.jenkins-ci.plist</pre>
<p>&nbsp;</p>
<p>You&#8217;re plist file should end up like this.</p>
<p><img title="file_to_edit.png" src="http://lostechies.com/ryansvihla/files/2011/09/file_to_edit.png" border="0" alt="File to edit" width="600" height="355" /></p>
<h2>RVM issues</h2>
<p>Now my next issue was despite what I&#8217;d read elsewhere I was unable to get Jenkins to use the default ruby provided by RVM. So I just pasted the commands that I would run anyway in the &#8220;Execute Shell&#8221; build step.</p>
<p><img title="rvm_workaround.png" src="http://lostechies.com/ryansvihla/files/2011/09/rvm_workaround.png" border="0" alt="Rvm workaround" width="600" height="161" /></p>
<h2>Getting Jenkins to see tests</h2>
<p>I&#8217;ve been using Test:Unit/Minitest lately just to keep more consistent with my day to day work. However I haven&#8217;t found a way to get my tests to show when using the &#8220;Execute Shell&#8221; task. I found a little gem called ci_reporter that exports to the standard junit format, unfortunately it doesn&#8217;t work with minitest yet. That&#8217;s ok I haven&#8217;t done anything that Test:Unit doesn&#8217;t support so far so I added the the following to my Gemfile (note the part about unit-test 2.0):</p>
<pre>group :development, :test do
  gem 'ci_reporter', '1.6.3'
  gem 'test-unit', '~&gt; 2.0.0'
  # Pretty printed test output
  gem 'turn', :require =&gt; false
end</pre>
<p>Running &#8220;rake ci:setup:testunit test&#8221; should give you a bunch of xml files in tests/reports. Now we need to tell Jenkins where to find those reports so add a post build action to pick them up as junit reports.</p>
<p><img title="post_build_actions.png" src="http://lostechies.com/ryansvihla/files/2011/09/post_build_actions.png" border="0" alt="Post build actions" width="600" height="82" /></p>
<h2>Rcov reports</h2>
<p>This was pretty easy.</p>
<ol>
<li>Install Jenkins plugin for RCov (it&#8217;s in the plugin list in the admin section).</li>
<li>add simplecov and semiplecov-rcov to your Gemfile.</li>
<li>add the following 4 lines to the TOP of your tests/test_helper.rb file:</li>
</ol>
<pre brush="ruby">
require 'simplecov'
require 'simplecov-rcov'
SimpleCov.formatter = SimpleCov::Formatter::RcovFormatter
SimpleCov.start 'rails'
</pre>
<p><br/></p>
<h2>In closing</h2>
<p>This took a fair amount of time, but the end result was quite satisfying. I now have CI with tests, tests coverage, RVM to target different versions of Ruby and bundler to make sure my Gem environment is sane.
<p><font color="#B4B4B4" size="-2">Post Footer automatically generated by <a href="http://www.freetimefoto.com/add_post_footer_plugin_wordpress" style="color: #B4B4B4; text-decoration:underline;">Add Post Footer Plugin</a> for wordpress.</font></p>
]]></content:encoded>
			<wfw:commentRss>http://lostechies.com/ryansvihla/2011/09/25/rail-3-1-ci-setup-with-jenkins-test-unit-simplecov-on-os-x-lion/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The difficult definition of professional software development</title>
		<link>http://lostechies.com/ryansvihla/2011/02/04/the-difficult-definition-of-professional-software-development/</link>
		<comments>http://lostechies.com/ryansvihla/2011/02/04/the-difficult-definition-of-professional-software-development/#comments</comments>
		<pubDate>Fri, 04 Feb 2011 22:51:00 +0000</pubDate>
		<dc:creator>Ryan Svihla</dc:creator>
				<category><![CDATA[Craftsmanship]]></category>

		<guid isPermaLink="false">/blogs/rssvihla/archive/2011/02/04/the-difficult-definition-of-professional-software-development.aspx</guid>
		<description><![CDATA[Here are some of the contradictory phrases (and a few paraphrases) I&#8217;ve overheard used to define what is &#8220;good&#8221; and &#8220;bad&#8221; code. Code should always be well commented Maintainable code has unit tests and well named methods therefore needs little&#160;&#8230; <a href="http://lostechies.com/ryansvihla/2011/02/04/the-difficult-definition-of-professional-software-development/">Continue&#160;reading&#160;<span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Here are some of the contradictory phrases (and a few paraphrases) I&#8217;ve overheard used to define what is &#8220;good&#8221; and &#8220;bad&#8221; code. </p>
<ul>
<li>Code should always be well commented</li>
<li>Maintainable code has unit tests and well named methods therefore needs little if any comments</li>
<li>Class explosion is to be avoided at all costs</li>
<li>Many small simple well named classes are the key to well organized code</li>
<li>Unit tests really don&#8217;t test anything useful</li>
<li>Dependency injection leads to an unusable mess</li>
<li>Dependency Injection is a very useful tool for making your code extensible and easily reused&#8221;</li>
<li>Inheritance leads to solid code reuse</li>
<li>Inheritance is the strongest coupling of your code you can have</li>
<li>Functional programming simplifies and minimizes the complexity of your code</li>
<li>Functional programing just makes my eyes bleed!</li>
<li>Static global references are &#8216;just programming&#8217; and something you have to learn how to manage to make simple easy to understand code</li>
<li>Static global spiderwebs are crippling to maintenance and program lifetime</li>
</ul>
<p>&nbsp;</p>
<p>The part that is most difficult about that list for me is while I agree with half of it strongly and respect the people who said those things,  the other half that list I do not agree with, has all come from people I respect and who overall do some pretty impressive things. They&#8217;ve certainly created things by all measures more impressive than anything I&#8217;ve ever produced</p>
<p>This leads me to question how much do software principles matter when taking them out of the context of yourself but viewing it in a bigger picture.  Thinking about it, 95% of the software that I actually like probably wasn&#8217;t using any TDD at any point in time and certainly violates a number of things that I would consider required for &#8220;professional software&#8221;.  I keep reinforcing this fact every time I checkout the source of a major software project I&#8217;ve used for years and gasp in horror at the spaghetti code I find.</p>
<p>Worse still the different schools of thought are not compatible in the slightest, and one side views the other side as wholly unprofessional (granted for different reasons) to the point that I&#8217;ve realized I myself was perceived as the one being &#8220;amateur&#8221; by those with a different definition of what makes good and bad software. I of course unfortunately often thought the same of them, regardless of how I felt about them personally.</p>
<p>Anyway, this is all food for thought and I have not yet come to any conclusion what it all means. It&#8217;s just easily the most frustrating thing about our profession and has on more than a few occasions had me long to return to being a sysadmin (too bad I really love making things).  I know I&#8217;ve tried coding under other schools of thought and while through practice I was able to deliver well enough, I&#8217;m far slower and more error prone with no TDD, big mega classes, and avoiding dependency injection</p>
<p><font color="#B4B4B4" size="-2">Post Footer automatically generated by <a href="http://www.freetimefoto.com/add_post_footer_plugin_wordpress" style="color: #B4B4B4; text-decoration:underline;">Add Post Footer Plugin</a> for wordpress.</font></p>
]]></content:encoded>
			<wfw:commentRss>http://lostechies.com/ryansvihla/2011/02/04/the-difficult-definition-of-professional-software-development/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Java IoC containers and classpath scanning (or what I’ve been looking for from .NET for months)</title>
		<link>http://lostechies.com/ryansvihla/2010/09/19/java-ioc-containers-and-classpath-scanning-or-what-i-ve-been-looking-for-from-net-for-months/</link>
		<comments>http://lostechies.com/ryansvihla/2010/09/19/java-ioc-containers-and-classpath-scanning-or-what-i-ve-been-looking-for-from-net-for-months/#comments</comments>
		<pubDate>Sun, 19 Sep 2010 19:01:00 +0000</pubDate>
		<dc:creator>Ryan Svihla</dc:creator>
				<category><![CDATA[IoC]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Spring]]></category>

		<guid isPermaLink="false">/blogs/rssvihla/archive/2010/09/19/java-ioc-containers-and-classpath-scanning-or-what-i-ve-been-looking-for-from-net-for-months.aspx</guid>
		<description><![CDATA[Frustrated with the typical way I saw IoC used in Java where every example I found involved thousands of lines of XML and/or Java code to configure Java beans or components.&#160; This is very different than IoC typically used in&#160;&#8230; <a href="http://lostechies.com/ryansvihla/2010/09/19/java-ioc-containers-and-classpath-scanning-or-what-i-ve-been-looking-for-from-net-for-months/">Continue&#160;reading&#160;<span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Frustrated with the typical way I saw IoC used in Java where every example I found involved thousands of lines of XML    <br />and/or Java code to configure Java beans or components.&#160; This is very different than IoC typically used in .NET where most IoC containers allow     <br />you to &quot;autowire&quot; in their terminology up every class in an assembly with a couple of lines of code.&#160; Having been coding in that fashion     <br />for several years in .NET I was dismayed when none of my fellow Java coders that I worked with or knew personally had any concept     <br />of the equivalent functionality, and instead informed me the IDE would be my help in maintaining these massive XML files. </p>
<p>Not content with their answers I burrowed into Spring, Guice and PicoContainer docs and found &quot;classpath scanning&quot; which is roughly    <br />equivalent to &quot;autowire&quot; in .NET. Below is an example of this in Spring 3:</p>
<p>MyStuff.java (my main class note his has 2 dependencies which you can view on my <a href="http://github.com/rssvihla/SpringDemo/tree/master/src/org/foo" target="_blank">github repo</a>)</p>
<div style="padding-bottom: 0px;margin: 0px;padding-left: 0px;padding-right: 0px;float: none;padding-top: 0px" class="wlWriterEditableSmartContent">
<div style="font-family:consolas,lucida console,courier,monospace">
<span style="color:#008000"><b>package</b></span>&#160;org<span style="color:#666666">.</span><span style="color:#7D9029">foo</span><span style="color:#666666">;</span></p>
<p><span style="color:#008000"><b>import</b></span>&#160;<span style="color:#0000FF"><b>org.springframework.beans.factory.annotation.Autowired</b></span><span style="color:#666666">;</span><br />
<span style="color:#008000"><b>import</b></span>&#160;<span style="color:#0000FF"><b>org.springframework.stereotype.Service</b></span><span style="color:#666666">;</span></p>
<p><span style="color:#AA22FF">@Service</span>&#160;<span style="color:#408080"><i>//one&#160;way&#160;of&#160;marking&#160;this&#160;as&#160;a&#160;component&#160;to&#160;register<br />
</i></span><span style="color:#008000"><b>public</b></span>&#160;<span style="color:#008000"><b>class</b></span>&#160;<span style="color:#0000FF"><b>MyStuff</b></span>&#160;<span style="color:#666666">{</span><br />
&#160;&#160;&#160;&#160;<span style="color:#008000"><b>private</b></span>&#160;<span style="color:#008000"><b>final</b></span>&#160;DependencyWithNoInterface&#160;first<span style="color:#666666">;</span><br />
&#160;&#160;&#160;&#160;<span style="color:#008000"><b>private</b></span>&#160;<span style="color:#008000"><b>final</b></span>&#160;DependencyInterface&#160;second<span style="color:#666666">;</span></p>
<p>&#160;&#160;&#160;&#160;<span style="color:#AA22FF">@Autowired</span>&#160;<span style="color:#408080"><i>//tells&#160;spring&#160;which&#160;constructor&#160;to&#160;use&#160;for&#160;it&#8217;s&#160;dependencies<br />
</i></span>&#160;&#160;&#160;&#160;<span style="color:#008000"><b>public</b></span>&#160;<span style="color:#0000FF">MyStuff</span><span style="color:#666666">(</span>DependencyWithNoInterface&#160;first<span style="color:#666666">,</span>&#160;DependencyInterface&#160;second<span style="color:#666666">)</span>&#160;<span style="color:#666666">{</span></p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<span style="color:#008000"><b>this</b></span><span style="color:#666666">.</span><span style="color:#7D9029">first</span>&#160;<span style="color:#666666">=</span>&#160;first<span style="color:#666666">;</span><br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<span style="color:#008000"><b>this</b></span><span style="color:#666666">.</span><span style="color:#7D9029">second</span>&#160;<span style="color:#666666">=</span>&#160;second<span style="color:#666666">;</span><br />
&#160;&#160;&#160;&#160;<span style="color:#666666">}</span></p>
<p>&#160;&#160;&#160;&#160;<span style="color:#008000"><b>public</b></span>&#160;<span style="color:#B00040">void</span>&#160;<span style="color:#0000FF">run</span><span style="color:#666666">(){</span><br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;System<span style="color:#666666">.</span><span style="color:#7D9029">out</span><span style="color:#666666">.</span><span style="color:#7D9029">println</span><span style="color:#666666">(</span><span style="color:#BA2121">&#8220;foo&#160;me&#8221;</span><span style="color:#666666">);</span><br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;first<span style="color:#666666">.</span><span style="color:#7D9029">foo</span><span style="color:#666666">();</span><br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;second<span style="color:#666666">.</span><span style="color:#7D9029">superFoo</span><span style="color:#666666">();</span><br />
&#160;&#160;&#160;&#160;<span style="color:#666666">}</span><br />
<span style="color:#666666">}</span>
</div>
</div>
<p>appContext.xml (seems you still need some XML)</p>
<div style="padding-bottom: 0px;margin: 0px;padding-left: 0px;padding-right: 0px;float: none;padding-top: 0px" class="wlWriterEditableSmartContent">
<div style="font-family:consolas,lucida console,courier,monospace">
<span style="color:#BC7A00">&lt;?xml&#160;version=&#8221;1.0&#8243;&#160;encoding=&#8221;UTF-8&#8243;?&gt;</span><br />
<span style="color:#008000"><b>&lt;beans</b></span>&#160;<span style="color:#7D9029">xmlns=</span><span style="color:#BA2121">&#8220;http://www.springframework.org/schema/beans&#8221;</span><br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;<span style="color:#7D9029">xmlns:xsi=</span><span style="color:#BA2121">&#8220;http://www.w3.org/2001/XMLSchema-instance&#8221;</span><br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;<span style="color:#7D9029">xmlns:context=</span><span style="color:#BA2121">&#8220;http://www.springframework.org/schema/context&#8221;</span><br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;<span style="color:#7D9029">xsi:schemaLocation=</span><span style="color:#BA2121">&#8220;http://www.springframework.org/schema/beans<br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;http://www.springframework.org/schema/beans/spring-beans-3.0.xsd<br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;http://www.springframework.org/schema/context<br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;http://www.springframework.org/schema/context/spring-context-3.0.xsd&#8221;</span><span style="color:#008000"><b>&gt;</b></span><br />
&#160;&#160;&#160;&#160;&#160;<span style="color:#008000"><b>&lt;context:component-scan</b></span>&#160;<span style="color:#7D9029">base-package=</span><span style="color:#BA2121">&#8220;org.foo&#8221;</span><span style="color:#008000"><b>/&gt;</b></span><br />
<span style="color:#008000"><b>&lt;/beans&gt;</b></span>
</div>
</div>
<p>Application.java (the initialization)</p>
<div style="padding-bottom: 0px;margin: 0px;padding-left: 0px;padding-right: 0px;float: none;padding-top: 0px" class="wlWriterEditableSmartContent">
<div style="font-family:consolas,lucida console,courier,monospace">
<span style="color:#008000"><b>package</b></span>&#160;org<span style="color:#666666">.</span><span style="color:#7D9029">foo</span><span style="color:#666666">;</span></p>
<p><span style="color:#008000"><b>import</b></span>&#160;<span style="color:#0000FF"><b>org.springframework.context.ApplicationContext</b></span><span style="color:#666666">;</span><br />
<span style="color:#008000"><b>import</b></span>&#160;<span style="color:#0000FF"><b>org.springframework.context.support.ClassPathXmlApplicationContext</b></span><span style="color:#666666">;</span></p>
<p><span style="color:#008000"><b>public</b></span>&#160;<span style="color:#008000"><b>class</b></span>&#160;<span style="color:#0000FF"><b>Application</b></span>&#160;<span style="color:#666666">{</span><br />
&#160;&#160;&#160;&#160;<span style="color:#008000"><b>public</b></span>&#160;<span style="color:#008000"><b>static</b></span>&#160;<span style="color:#B00040">void</span>&#160;<span style="color:#0000FF">main</span><span style="color:#666666">(</span>String&#160;args<span style="color:#666666">[]){</span><br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;ApplicationContext&#160;ctx&#160;<span style="color:#666666">=</span>&#160;&#160;&#160;<span style="color:#008000"><b>new</b></span>&#160;ClassPathXmlApplicationContext<span style="color:#666666">(</span><span style="color:#BA2121">&#8220;appContext.xml&#8221;</span><span style="color:#666666">);</span>&#160;<span style="color:#408080"><i>//the&#160;IoC&#160;container<br />
</i></span>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;MyStuff&#160;stff&#160;<span style="color:#666666">=</span>&#160;ctx<span style="color:#666666">.</span><span style="color:#7D9029">getBean</span><span style="color:#666666">(</span>MyStuff<span style="color:#666666">.</span><span style="color:#7D9029">class</span><span style="color:#666666">);</span>&#160;<span style="color:#408080"><i>//my&#160;fully&#160;injected&#160;class<br />
</i></span>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;stff<span style="color:#666666">.</span><span style="color:#7D9029">run</span><span style="color:#666666">();</span><br />
&#160;&#160;&#160;&#160;<span style="color:#666666">}</span><br />
<span style="color:#666666">}</span>
</div>
</div>
<p>&#160;</p>
<p>&#160;</p>
<p>Now I’m sure for the .NET developers familiar with StructureMap, Windsor, Autofac, etc this is completely unimpressive. I’m also sure there are Java developers that are somewhat unimpressed with this but for reasons that involve holding onto giant configuration artifacts. <strong>Manual IoC component registration falls where hand writing SQL for trivial data access does for me, extra repetitive work that has been solved years ago</strong>. </p>
<p>Edit:</p>
<p>It appears you can forgo XML as well in your main class use a different Application context and add the refresh and scan lines</p>
<div style="padding-bottom: 0px;margin: 0px;padding-left: 0px;padding-right: 0px;float: none;padding-top: 0px" class="wlWriterSmartContent">
<div style="font-family: consolas,lucida console,courier,monospace"><span style="color: #008000"><b>package</b></span> org<span style="color: #666666">.</span><span style="color: #7d9029">foo</span><span style="color: #666666">;</span>       </p>
<p><span style="color: #008000"><b>import</b></span>&#160;<span style="color: #0000ff"><b>org.springframework.context.annotation.AnnotationConfigApplicationContext</b></span><span style="color: #666666">;</span>       </p>
<p><span style="color: #008000"><b>public</b></span>&#160;<span style="color: #008000"><b>class</b></span>&#160;<span style="color: #0000ff"><b>Application</b></span>&#160;<span style="color: #666666">{</span>       <br />&#160;&#160;&#160; <span style="color: #008000"><b>public</b></span>&#160;<span style="color: #008000"><b>static</b></span>&#160;<span style="color: #b00040">void</span>&#160;<span style="color: #0000ff">main</span><span style="color: #666666">(</span>String args<span style="color: #666666">[]){</span>       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; AnnotationConfigApplicationContext ctx <span style="color: #666666">=</span>&#160;&#160; <span style="color: #008000"><b>new</b></span> AnnotationConfigApplicationContext<span style="color: #666666">();</span>&#160; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; ctx<span style="color: #666666">.</span><span style="color: #7d9029">scan</span><span style="color: #666666">(</span><span style="color: #ba2121">&quot;org.foo&quot;</span><span style="color: #666666">);</span>&#160;<span style="color: #408080"><i>//scans the org.foo package          <br /></i></span>&#160;&#160;&#160;&#160;&#160;&#160;&#160; ctx<span style="color: #666666">.</span><span style="color: #7d9029">refresh</span><span style="color: #666666">();</span>&#160;<span style="color: #408080"><i>//needed to load them for some reason          <br /></i></span>&#160;&#160;&#160;&#160;&#160;&#160;&#160; MyStuff stff <span style="color: #666666">=</span> ctx<span style="color: #666666">.</span><span style="color: #7d9029">getBean</span><span style="color: #666666">(</span>MyStuff<span style="color: #666666">.</span><span style="color: #7d9029">class</span><span style="color: #666666">);</span>       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; stff<span style="color: #666666">.</span><span style="color: #7d9029">run</span><span style="color: #666666">();</span>       <br />&#160;&#160;&#160; <span style="color: #666666">}</span>       <br /><span style="color: #666666">}</span>       </div>
</p></div>
<p><font color="#B4B4B4" size="-2">Post Footer automatically generated by <a href="http://www.freetimefoto.com/add_post_footer_plugin_wordpress" style="color: #B4B4B4; text-decoration:underline;">Add Post Footer Plugin</a> for wordpress.</font></p>
]]></content:encoded>
			<wfw:commentRss>http://lostechies.com/ryansvihla/2010/09/19/java-ioc-containers-and-classpath-scanning-or-what-i-ve-been-looking-for-from-net-for-months/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Anti-Pattern: Too much of your application is about interacting with external resources</title>
		<link>http://lostechies.com/ryansvihla/2010/07/16/anti-pattern-too-much-of-your-application-is-about-interacting-with-external-resources/</link>
		<comments>http://lostechies.com/ryansvihla/2010/07/16/anti-pattern-too-much-of-your-application-is-about-interacting-with-external-resources/#comments</comments>
		<pubDate>Fri, 16 Jul 2010 02:24:00 +0000</pubDate>
		<dc:creator>Ryan Svihla</dc:creator>
				<category><![CDATA[Anti-Patterns]]></category>

		<guid isPermaLink="false">/blogs/rssvihla/archive/2010/07/15/anti-pattern-too-much-of-your-application-is-about-interacting-with-external-resources.aspx</guid>
		<description><![CDATA[Firstly, what am I talking about? Applications that meet some of the following descriptions: Stored procedures with a fair amount of conditional logic or complicated business rules buried in a sub-query (some would argue sprocs at all). Web pages with&#160;&#8230; <a href="http://lostechies.com/ryansvihla/2010/07/16/anti-pattern-too-much-of-your-application-is-about-interacting-with-external-resources/">Continue&#160;reading&#160;<span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Firstly, what am I talking about? Applications that meet some of the following descriptions:</p>
<ol>
<li>Stored procedures with a fair amount of conditional logic or complicated business rules buried in a sub-query (some would argue sprocs at all).</li>
<li>Web pages with lots of conditional output again encoding business rules in snippets of view logic. if else checks that display the latest price for something if before and certain date or a default price.</li>
<li>The majority of ‘unit tests’ require a database, or web and application server to be up and running.</li>
<li>The majority of code files make reference to language default I/O or database libraries.</li>
<li>Hours are spent trying to determine if differences in version of infrastructure are the cause of certain bugs.</li>
<li>Changing database schema results in hours of refactoring, as hundreds of querys and sprocs are hunted through to see if this index or that index is being properly hit.</li>
</ol>
<p>Why is this an anti-pattern? First before I bore you with endless reasoning behind SOLID principles, proper OO etc if you’re reading this and you’re of a bent that disagrees with me so far entirely..none of that will mean anything to you, and none of it will mean anything to your customers so let me put this in the most practical terms I can. </p>
<p><em><strong>It is not testable in the slightest in any practical sense</strong></em>. You will be counter with well that with that sort of application and making everything a front to back test that you KNOW when things are working, <em><strong>yes but you RARELY if EVER know in a quick sense why things are not working.</strong></em> If i can reliably eliminate any chance that my actual code or business logic is the cause of a problem, if all of my fancy business rules are in something that can be run thousands of times a second, then I can throw all sorts of corner cases at my code base and not increase my verification time. If the majority of my application is business logic and plain old code then I can save my slow manual testing to the areas that are so bullet proof and only have a slice of my application doing front to back testing to yes, make sure things really work.</p>
<p><font color="#B4B4B4" size="-2">Post Footer automatically generated by <a href="http://www.freetimefoto.com/add_post_footer_plugin_wordpress" style="color: #B4B4B4; text-decoration:underline;">Add Post Footer Plugin</a> for wordpress.</font></p>
]]></content:encoded>
			<wfw:commentRss>http://lostechies.com/ryansvihla/2010/07/16/anti-pattern-too-much-of-your-application-is-about-interacting-with-external-resources/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Project Management in Java: A Confused .NET Developer’s Perspective</title>
		<link>http://lostechies.com/ryansvihla/2010/07/12/project-management-in-java-a-confused-net-developer-s-perspective/</link>
		<comments>http://lostechies.com/ryansvihla/2010/07/12/project-management-in-java-a-confused-net-developer-s-perspective/#comments</comments>
		<pubDate>Mon, 12 Jul 2010 11:00:00 +0000</pubDate>
		<dc:creator>Ryan Svihla</dc:creator>
				<category><![CDATA[Ivy]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Maven]]></category>
		<category><![CDATA[MSBuild]]></category>

		<guid isPermaLink="false">/blogs/rssvihla/archive/2010/07/12/project-management-in-java-a-confused-net-developer-s-perspective.aspx</guid>
		<description><![CDATA[When I was first introduced to workplace Java the amount of ways one could define a project appeared to be restrictive, confusing and a point of frequent friction. While those things may all be true, it’s a great deal better&#160;&#8230; <a href="http://lostechies.com/ryansvihla/2010/07/12/project-management-in-java-a-confused-net-developer-s-perspective/">Continue&#160;reading&#160;<span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>When I was first introduced to workplace Java the amount of ways one could define a project appeared to be restrictive, confusing and a point of frequent friction. While those things may all be true, it’s a great deal better than I would have expected since I was coming from a world where an upgrade to a newer version of Visual Studio requires your whole team to sync up to that same version!&#160; So how do cross IDEA teams get any work done in the Java workplace? Do Java OSS projects require everyone uses Eclipse, NetBeans, or IntelliJ?&#160; Does every new IDE need to have import/export filters for all of the other existing ones and if it becomes popular do the already present IDE’s have to include this? Which system is the best and what matters?</p>
<p>To answer these questions let break down what makes a project and while doing so compare and contrast the Java perspective with the .NET one.</p>
<h3>Compilation</h3>
<p>Java IDE’s (Intellij/Eclipse/Netbeans) – basically run “make” on the fly and pass everything to javac.</p>
<p>JAVA IDE (Maven, Gradle) -agnostic project systems – adding all the references contained directly to the classpath and then calling javac.</p>
<p>.NET (Visual Studio,MSBuild)&#160; – MSBuild feeds all references to csc.</p>
<p>In summary, there is more similar than different here.</p>
<h3>Strong Versioning</h3>
<p>Java IDE’s – at least in the case of IntelliJ I ended up manually writing a MANIFEST.MF file.</p>
<p>Java IDE-agnostic project systems – still manual editing a lot of the time but usually just one line already filled out by your template that you edit.&#160; I know NetBeans gives you a GUI to edit this. </p>
<p>.NET – GUI but you can manually edit an assembly.cs file. </p>
<p>In summary,&#160; Java IDE’s at least in the case of IntelliJ really are using default Java by hand stuff.</p>
<h3>Dependencies</h3>
<p>Java IDE’s&#160; – All use convention! Basically, search for jar files in your source tree, if the IDE finds them it assumes you need them and adds them as references in your project format. Works pretty nice on a whole and allows for manual tweaking in the oddball cases.</p>
<p>Java IDE &#8211; agnostic project systems&#160; – requires explicit dependency reference by version, however they will download them automatically from remote locations and put them in your file-system in a specific way (defined by them unless overridden by you). Since both of these are also responsible for your compilation you have to basically run everything through them or your IDE has to be aware of them.</p>
<p>.NET – requires explicit reference to DLL’s on the file system.</p>
<p>In summary, .NET and the Java IDE-agnostic systems are VERY similar here in approach, whereas the Java IDE’s take a convention over configuration approach. I’d say there are times I definitely prefer the Java IDE approach and there are times the capabilities of the Java IDE-agnostic systems are worth it.</p>
<h3></h3>
<h3>Source References</h3>
<p>All Java solutions – do reference by directory structure and wild card matching.</p>
<p>.NET – explicit references to <strong><u>each class file</u></strong> .</p>
<p>In summary, this is the HUGE difference. Java takes more of a Make based approach where it’s EXPECTED this will not be the only IDE/project system ever used on this source tree, and this is where the Visual Studio/.NET experience starts to fall apart when trying to use cross-ide’s or versions. It has forced everyone to implement and keep up with MSBuild’s format to enable other IDE’s to be used, and don’t talk about actual alternatives to MSBuild. At this point even though things like NAnt and Rake/Albacore are more popular among agile .NET teams than scripting MSBuild almost all of those scripts still call MSBuild to do the compile step! </p>
<h3>Questions Answered</h3>
<p>Q. How do Java OSS projects deal with all the different IDE’s out there and even different project formats?/How do cross IDE teams get work done?</p>
<p>A. They don’t have to worry about it as much as .NET devs. A friend of mine who a lead contributor to the Apache Cassandra project in fact included a Maven file for the “enterprise types” but by and large use Ant’s to do their builds and he himself has used a number of IDE’s on that same codebase. .NET OSS development is still a bit hamstrung by MSBuild and really alternative IDE’s are keeping in sync with that project management format. There are real problems with style and code format guidelines, but there are usually workarounds or ways of solving this if code style guidelines is something you really care about ( which I don’t).</p>
<p>Q. Which system is the best?</p>
<p>A. There is no one size fits all answer here. I now know Apache Maven solves some problems for people and even though I don’t appreciate it’s approach to things, it’s done some valuable good for the community.&#160; The IDE-centric approach really works pretty well a lot of the time for projects. Gradle, while being the closest to what I want is very young and has limited IDE support, at least it’s not easy enough for this Java n00b to figure out how to use with IntelliJ without some friction.</p>
<h3>Summary</h3>
<p>I hope that all wasn’t too confusing, it sure was for me to go through while I had all these options , and in a completely different environment to what I was used to. Worse a lot of the folks I talked to saw these IDE-agnostic project systems as solving problems they didn’t have. Maven, Ivy, etc was a world that was buzzword laden (I’m really looking at you Maven and Ivy), involved heavy setup time for relatively simple tasks, incomplete documentation (looking at you Gradle) and was frequently badly misused (those who know me know what I’m referring too here). In the end an IDE-centric approach in the Java world does not seem to tie you to that IDE in any way I can find, and for getting started had little friction, and for people new to Java it seemed to be the best way to get started. Besides in Java at least it’s easy to change your mind later.</p>
<p><font color="#B4B4B4" size="-2">Post Footer automatically generated by <a href="http://www.freetimefoto.com/add_post_footer_plugin_wordpress" style="color: #B4B4B4; text-decoration:underline;">Add Post Footer Plugin</a> for wordpress.</font></p>
]]></content:encoded>
			<wfw:commentRss>http://lostechies.com/ryansvihla/2010/07/12/project-management-in-java-a-confused-net-developer-s-perspective/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>MySQL 5 Performance Tuning Toolkit</title>
		<link>http://lostechies.com/ryansvihla/2010/07/02/mysql-5-performance-tuning-toolkit/</link>
		<comments>http://lostechies.com/ryansvihla/2010/07/02/mysql-5-performance-tuning-toolkit/#comments</comments>
		<pubDate>Fri, 02 Jul 2010 02:57:00 +0000</pubDate>
		<dc:creator>Ryan Svihla</dc:creator>
				<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">/blogs/rssvihla/archive/2010/07/01/mysql-5-performance-tuning-toolkit.aspx</guid>
		<description><![CDATA[Recently we’d played with table partitioning and because of the limitations of it and some decisions we’d made a very long time ago we ended up spending a couple of days tracking down hotspots. In the process I picked up&#160;&#8230; <a href="http://lostechies.com/ryansvihla/2010/07/02/mysql-5-performance-tuning-toolkit/">Continue&#160;reading&#160;<span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Recently we’d played with table partitioning and because of the limitations of it and some decisions we’d made a very long time ago we ended up spending a couple of days tracking down hotspots. In the process I picked up a few tricks, I’m not even an authority on any of this but I figured it’d help out others in the same spot.</p>
<h3>Logging Toolkit</h3>
<p>If you have a slow loading page or test and have no idea which one of the thirty or so queries going on is the cause how to do you find it.&#160; Slow query log and logging queries that are not using indexes. Adding the following to your my.ini, my.cnf or whatever your mysql config file is named on your system and you’ll be able to get a list of offenders to further investigate.</p>
<h3>MySQL Console Toolkit</h3>
<p>SHOW INNODB STATUS – gives tons of useful information on what the current state of deadlocks, transactions and all sorts of information.</p>
<p>SHOW FULL PROCESSLIST – shows the current threads and queries running on them. running this over and over again can show you queries that are hanging.</p>
<p>EXPLAIN &lt;QUERY&gt;– Just in place of query type your full query statement, particularly in sub-queries, this is great for pointing out potential problems, in my most recent case I had an uncacheable sub-query, pointing out quickly something that was just not going to work no matter what. </p>
<h3></h3>
<h3>Final Notes</h3>
<p>Anyway this is only a smidgen of the useful stuff you need in your toolkit and I’m certainly no expert. I want to plug <a href="http://www.amazon.com/gp/product/0596101716/ref=s9_simh_gw_p14_i1?pf_rd_m=ATVPDKIKX0DER&amp;pf_rd_s=center-http://www.amazon.com/High-Performance-MySQL-Optimization-Replication/dp/0596101716/ref=pd_sim_b_1">High Performance MySQL: Optimization, Backups, Replication, and More</a> and the <a href="http://www.mysqlperformanceblog.com/">http://www.mysqlperformanceblog.com/</a> for it’s help and as a reference for those wanting to go into deeper study.</p>
<p><font color="#B4B4B4" size="-2">Post Footer automatically generated by <a href="http://www.freetimefoto.com/add_post_footer_plugin_wordpress" style="color: #B4B4B4; text-decoration:underline;">Add Post Footer Plugin</a> for wordpress.</font></p>
]]></content:encoded>
			<wfw:commentRss>http://lostechies.com/ryansvihla/2010/07/02/mysql-5-performance-tuning-toolkit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Java Dependency Management with Apache Ivy</title>
		<link>http://lostechies.com/ryansvihla/2010/06/29/java-dependency-management-with-apache-ivy/</link>
		<comments>http://lostechies.com/ryansvihla/2010/06/29/java-dependency-management-with-apache-ivy/#comments</comments>
		<pubDate>Tue, 29 Jun 2010 13:10:00 +0000</pubDate>
		<dc:creator>Ryan Svihla</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">/blogs/rssvihla/archive/2010/06/29/java-dependency-management-with-apache-ivy.aspx</guid>
		<description><![CDATA[Not wanting to ditch your already built well working ant scripts for the plugin-centric view of Maven, especially if your project structure doesn&#8217;t line up quite right with Maven&#8217;s point of view? Enter Apache Ivy which like Maven can automatically&#160;&#8230; <a href="http://lostechies.com/ryansvihla/2010/06/29/java-dependency-management-with-apache-ivy/">Continue&#160;reading&#160;<span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Not wanting to ditch your already built well working ant scripts for the plugin-centric view of Maven, especially if your project structure doesn&#8217;t line up quite right with Maven&#8217;s point of view?  Enter Apache Ivy which like Maven can automatically download and resolve all of your dependencies and their dependencies for you with just a few simple lines of XML (if only I could get rid of the XML Part).</p>
<p><span style="font-size: 14px;font-weight: bold">Pros</span></p>
<ul>
<li>Integrates with Ant, but can still be run standalone.</li>
<li>By default dumps all dependencies into your lib folder which makes it super easy to use with most IDE&#8217;s.</li>
<li>Works with existing Maven 2 repositories, allowing you to leverage work already done by the Maven community.</li>
</ul>
<h3>Cons</h3>
<ul>
<li>Despite lots of documentation, too much focus on theory with little practical example of how to do simple things. Maybe I&#8217;m missing something but I did waste a fair amount of time trying to get a custom 3rd party repository working without crippling the defaults for Ivy.  Again I may be just dense, but this was harder for me than either Gradle or Maven to do, and I ran into a couple of hiccups from there.</li>
<li>Limited IDE support compared to say Maven at least in the case of Intellij. Part of this is Maven has some pretty snazzy integration with Maven and I know on more than a couple of occasions I&#8217;ve just started projects with Maven because Intelij makes it super simple and gives me lots of nice integration for adding dependencies with the classic alt+enter .</li>
</ul>
<p>I decided to include the default scripts I start with. This should get you up and running and give you a template for solving some of the hassle I went through.  Just place next to each other in your top level project directory, ivy.xml, ivysettings.xml, and build.xml if you plan on using Ant integration. Also for ant integration make sure you have ivy-2.1.0.jar in &#8220;$ANT_HOME/lib&#8221; and all should be well.  Please ask for clarification on anything, I&#8217;ll do another post if I get enough questions.</p>
<p>&nbsp;</p>
</p>
<p><font color="#B4B4B4" size="-2">Post Footer automatically generated by <a href="http://www.freetimefoto.com/add_post_footer_plugin_wordpress" style="color: #B4B4B4; text-decoration:underline;">Add Post Footer Plugin</a> for wordpress.</font></p>
]]></content:encoded>
			<wfw:commentRss>http://lostechies.com/ryansvihla/2010/06/29/java-dependency-management-with-apache-ivy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hibernate Connection Pooling: why isn&#8217;t the default one for production?</title>
		<link>http://lostechies.com/ryansvihla/2010/06/26/hibernate-connection-pooling-why-is-the-default-one-for-production/</link>
		<comments>http://lostechies.com/ryansvihla/2010/06/26/hibernate-connection-pooling-why-is-the-default-one-for-production/#comments</comments>
		<pubDate>Sat, 26 Jun 2010 13:50:00 +0000</pubDate>
		<dc:creator>Ryan Svihla</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">/blogs/rssvihla/archive/2010/06/26/hibernate-connection-pooling-why-is-the-default-one-for-production.aspx</guid>
		<description><![CDATA[Hibernate unlike NHibernate comes with a variety of connection pooling options. The three primary ones of which I&#8217;m aware are Proxool, Apache DBCP, and c3p0 . I myself have only so far used c3p0 and it works quite well having&#160;&#8230; <a href="http://lostechies.com/ryansvihla/2010/06/26/hibernate-connection-pooling-why-is-the-default-one-for-production/">Continue&#160;reading&#160;<span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Hibernate unlike NHibernate comes with a variety of connection pooling options. The three primary ones of which I&#8217;m aware are <a href="http://proxool.sourceforge.net/">Proxool</a>, <a href="http://commons.apache.org/dbcp/">Apache DBCP</a>, and <a href="http://sourceforge.net/projects/c3p0/">c3p0</a> . I myself have only so far used c3p0 and it works quite well having saved me from a couple of jams so far where the default one was in use previously.  First why not use the default one? Because the official Hibernate documentation says in a big yellow box marked caution the following words:</p>
<p><span style="font-family: 'Lucida Grande', Geneva, Verdana, Arial, sans-serif;color: #533500;line-height: 18px"></span></p>
<blockquote><p>The built-in Hibernate connection pool is in no way intended for production use. It lacks several features found on any decent connection pool.</p></blockquote>
<p>Yet on almost every single Java project I&#8217;ve worked on the default is in use.  I wouldn&#8217;t care so much but this has personally wasted a fair amount of time for me and I&#8217;ve had to approach this as an outsider every time getting into the argument &#8220;it hasn&#8217;t cause any issues before&#8221;.  Yet usually within a couple of days of that discussion I or someone else has resolved a &#8220;well it just does that sometimes&#8221; problem just by switching the connection pool. However, in implementing an alternate connection pool I should share a couple of gotcha&#8217;s</p>
<p>1) Turn on logging for Hibernate and read the logs and make sure your connection pool of choice is actually activated and not the default one.</p>
<p>2) Older examples of the documentation I found for c3p0 did not include the necessary line for the C3P0Connection provider. If this line is not included in version 3.x version of hibernate regardless of what else is configured hibernate will use the default connection pool.</p>
<p>3) If the class you specified for connection provider line is not found for some reason, also the default connection pool will be used. Depending on your version of hibernate you may have to reference a different jar.</p>
<p>Below is the config borrowed from the hibernate connection tutorial only with c3p0 configured, please borrow it instead of using the default one.</p>
</p>
<p><font color="#B4B4B4" size="-2">Post Footer automatically generated by <a href="http://www.freetimefoto.com/add_post_footer_plugin_wordpress" style="color: #B4B4B4; text-decoration:underline;">Add Post Footer Plugin</a> for wordpress.</font></p>
]]></content:encoded>
			<wfw:commentRss>http://lostechies.com/ryansvihla/2010/06/26/hibernate-connection-pooling-why-is-the-default-one-for-production/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
