<?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>Practically Agile &#187; Programming</title>
	<atom:link href="http://practicallyagile.com/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://practicallyagile.com</link>
	<description>Using Agile in less-than-perfect situations since Y2K</description>
	<lastBuildDate>Mon, 27 Dec 2010 18:15:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>The Best You Can Afford</title>
		<link>http://practicallyagile.com/2010/12/the-best-you-can-afford/</link>
		<comments>http://practicallyagile.com/2010/12/the-best-you-can-afford/#comments</comments>
		<pubDate>Mon, 27 Dec 2010 18:15:20 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[agile]]></category>
		<category><![CDATA[improving]]></category>
		<category><![CDATA[philosophy]]></category>
		<category><![CDATA[podcast]]></category>
		<category><![CDATA[project management]]></category>

		<guid isPermaLink="false">http://practicallyagile.com/?p=148</guid>
		<description><![CDATA[It&#8217;s nearing the end of the year, which is a good time to reflect on things. I have found myself reflecting a bit on adages, axioms, and the like. You know, the &#8220;stitch in time saves nine,&#8221; &#8220;look before you leap&#8221; kinds of things. Those little snippets of wisdom that help to convince us to [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s nearing the end of the year, which is a good time to reflect on things. I have found myself reflecting a bit on adages, axioms, and the like. You know, the &#8220;stitch in time saves nine,&#8221; &#8220;look before you leap&#8221; kinds of things. Those little snippets of wisdom that help to convince us to do the right thing.</p>
<p>Software development has a few of these:</p>
<ul>
<li>red, green, refactor</li>
<li>Individuals and interactions over processes and tools</li>
<li>Don&#8217;t break the build</li>
<li>Perfect is the enemy of the good</li>
</ul>
<p>That last one really started off a train of thought for me. How do we know when we&#8217;ve reached &#8220;good&#8221; and when we&#8217;re trying too hard to reach perfect? This is particularly interesting to me as I often struggle with &#8220;leaving well enough alone,&#8221; to pull out another cliché. I&#8217;m not sure of the exact set of circumstances that led to it, but somehow I started thinking about value versus cost. All of that coalesced to this:</p>
<blockquote><p>The Best You Can Afford</p></blockquote>
<p>That&#8217;s how you know when to stop. When you can&#8217;t afford to keep making it better anymore. That is, when the value of what you&#8217;re working on isn&#8217;t worth the effort compared to the other things you could spend that effort on. (I&#8217;m sure that&#8217;s one of the worst-written sentences ever, but it makes the point.)</p>
<p>At first blush this seems obvious. We all apply this every day to an extent right? Well, not necessarily. The best you can afford is very easy to confuse with the <em>worst</em> you can afford. That is putting in the least effort possible to just get by. We see and do this all the time.</p>
<p>What, really, is the difference? The difference is in what these two tactics get you in the long run. Aiming for the worst is attractive because it is, somewhat obviously, the cheaper option. However, that obvious cheapness results in, well, results that are obviously cheap. In physical products this can mean flimsy plastic parts and a shorter life span. In software, this can mean more defects, a hard-to-use product, and upset end users. Worse yet for software, it often also means a harder time performing the maintenance tasks that can be more than 80% of the cost and time spent working on the software.</p>
<p>Aiming for the best is harder to justify up front because so many of those costs are unknown. However, the attention to detail means physical products that people love to use, use for a longer time, and will recommend to others. It mostly means the same in software. Another benefit for software is that maintenance takes less time and is easier for those who must do it.</p>
<p>So now we have a guideline that can tell us when we are spending too much on heading for perfect: when the value of what you are doing is less than the value of doing something else.</p>
<p>I&#8217;m going to finish up with an example that a lot of people have used when making similar points. I&#8217;m sure a number of readers will roll their eyes as soon as I mention the product, but I urge you to not focus on that, but instead pick some other product or product category and make some comparisons of your own. When has the &#8220;worst&#8221; product won? How did it win? When has the &#8220;best&#8221; product won? How did it win? Which of those products started out ahead an then lost?</p>
<p>The product that I think I can most easily make a case for being built using &#8220;the best you can afford&#8221; mentality is: the iPhone. To see why, we have to go back to before the iPhone was announced or really speculated about. Back in the early 2000s, there were rumors of Apple working on a tablet computer. These rumors persisted ultimately until the iPad was released. It seems, based on all accounts, that these rumors were true. And again based upon what we have heard, Apple was working on what would become the iPad *before* the iPhone.</p>
<p>This is significant because it points out that Apple, whether you decide that means Steve Jobs, Jonny Ive, a host of other folks, or the combination of all of them, Apple was focused on making the best thing they could. At some point, who knows exactly when, someone realized that what they had—a touchscreen computer with a simplified OS—would make a great phone. At that point, the team felt that the iPad was the &#8220;best&#8221; product, but the &#8220;best they could afford&#8221; to make at the time was the iPhone.</p>
<p>Further, it is obvious that Apple doesn&#8217;t and never did release a version of the iPhone (or iPad) without work already being in progress on the next version. This implies that the &#8220;best we can afford&#8221; is a philosophy deeply ingrained into Apple. They are continually working on something better, but they release something that is &#8220;good enough&#8221;.</p>
<p>There are a number of people out there who will point out that the iPhone isn&#8217;t the number one phone any longer or that it won&#8217;t stay that way for long. I&#8217;m sorry, but I don&#8217;t buy it. For one thing, there are at most two kinds of iPhones (not counting storage size differences) available for sale at any one time. This isn&#8217;t true for any other type of phone. Also, while Apple only has a certain share of the number of devices sold, its share of the <em>profits</em> is much larger. That is, Apple can afford to sell fewer units because it can also manage to charge more for them. Profit is the goal of a company. Selling the most units is worthless if you don&#8217;t also have profit.</p>
<p>I humbly believe another example of the application of &#8220;the best you can afford&#8221; is the Improving Podcasts that I co-host with Allen Hurst. This was an idea that Allen and I had around two years ago. We wanted to create a software development podcast and have it associated with our company, Improving Enterprises. We spent several months getting some momentum built and finally realized that it was at a point where we had to release something or risk never publishing an episode. Because of that, the first episodes were more work, and the audio quality was suspect. Over time the best we could afford got better until we found, espeically due to the time involved, recording all audio over Skype was a solid balance of creating something of value without detracting from our other valuable works. This reduced the editing time significantly, allowed for remote participation, and was repeatable by either one of us. However, it also means that occaisionally we are subject to the audio difficulties and other problems associated with remote audio.</p>
<p>I could go on, but at this point this article is as long as I—and probably you as well—can afford. It is also the best I can afford right now. I&#8217;m sure I could fix some grammar, make some points more clearly, etc. However, I have other work to do and family to be with. I leave you with this question: How might your life and the lives of those around you improve if you stopped doing the worst you can afford and instead did the best you can afford?</p>
]]></content:encoded>
			<wfw:commentRss>http://practicallyagile.com/2010/12/the-best-you-can-afford/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Informix on a Mac, Part 2</title>
		<link>http://practicallyagile.com/2010/01/informix-on-a-mac-part-2/</link>
		<comments>http://practicallyagile.com/2010/01/informix-on-a-mac-part-2/#comments</comments>
		<pubDate>Fri, 15 Jan 2010 22:57:03 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[informix]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[snow leopard]]></category>

		<guid isPermaLink="false">http://practicallyagile.com/?p=138</guid>
		<description><![CDATA[Yesterday, I posted my technique for installing Informix on a Mac. Well, it turns out I wrote just a bit too soon. What I had was indeed working, but only for the &#8220;dbaccess&#8221; tool that ships with Informix. Trying to connect from a Java (JDBC) application failed. Thanks to Eric Herber&#8217;s comment on that post, [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday, I posted my technique for <a href="http://practicallyagile.com/2010/01/installing-informix-on-a-mac/">installing Informix on a Mac.</a> Well, it turns out I wrote just a bit too soon. What I had was indeed working, but only for the &#8220;dbaccess&#8221; tool that ships with Informix. Trying to connect from a Java (JDBC) application failed.</p>
<p>Thanks to Eric Herber&#8217;s <a href="http://practicallyagile.com/2010/01/installing-informix-on-a-mac/#comment-54">comment</a> on that post, the <del datetime="2010-08-05T20:59:03+00:00"><a href="http://www.xmission.com/~dbaresrc/Intro_IDS_on_Mac_v3.pdf" class="broken_link">PDF</a></del> <em>[PDF no longer there. I have not yet found a replacement.]</em> it mentions, and a bit more research, I was able to make a two significant updates to my installation.</p>
<h4>Group Settings</h4>
<p>Reading through the PDF, it notes that the informix user and group are required in order for things to work properly. Examining my install, it seems that the IDS installer tried to create the informix group, but somehow assigned it the same group ID as the _lpoperator group. I believe _lpoperator is the group of people who can use the Mac&#8217;s printers. Regardless, it wasn&#8217;t the informix group that it should have been.</p>
<p><strong>Important!</strong> If you don&#8217;t understand what is meant by user and group here, my best advice would be to get someone who does to help you. I don&#8217;t want to insult anyone, but making changes to the things I am about to mention could render your machine unusable. Here be dragons!</p>
<p>To fix this issue, I had to do two things. First, create the informix group and make it the informix user&#8217;s &#8220;primary&#8221; group. Second, I had to change the group ownership of everything in my Informix install directory from _lpoperator to the new informix group. The PDF talks about using the Workgroup Manager that is available in the OS X Server Admin Tools. I will let you read that for the details except to say that the correct URL for acquiring the tools depends on the version of OS X you have. Regardless, the URL in the PDF is outdated, as is one I found in a search on <a href="http://macosxhints.com">MacOSXHints</a>. The best means I have found is to go to the <a href="http://support.apple.com/kb/index?page=search">Apple Support site&#8217;s Advanced Search</a>, enter &#8220;server admin tools&#8221;, select the radio button to match all keywords, use the drop-down to restrict the document type to &#8220;Downloads&#8221;, and pick the version you want from the results. I am far from certain, but it would make sense to pick the one closest to your version of OS X.</p>
<p>Once you have the Server Admin Tools download, it is a simple, and typical Mac install. Once installed, you can run the Workgroup Manager tool more or less as stated in the PDF.  Do not skip the step that asks you to select &#8220;Show All Records&#8221; from the &#8220;View Menu&#8221;. This may be &#8220;Show System Records&#8221; depending on the version of the tool. If you know a little about Unix user management, the tool is fairly intuitive. If you know a lot about Unix user management, you may prefer the command line tools that can do the same thing. Regardless, I simply had to create the informix group and make it the informix user&#8217;s primary group.</p>
<p>It is worth noting that if I had created the informix user and group using this tool <strong>before</strong> running the installer, I probably would not have had the _lpoperator nonsense nor would I have had to do the next step: changing the group ownership of all the files in my Informix install.</p>
<p>To change the group ownership, I went back to the command line and did the following:</p>
<pre class="brush: bash; title: ;">
$ cd /Applications/IBM/informix
$ ls -l
total 11656
drwxr-xr-x    3 root      staff         102 Aug 15  2008 CSDK
drwxr-xr-x    5 root      staff         170 Aug 15  2008 DBLD
drwxr-xr-x    3 root      staff         102 Aug 15  2008 ICONNECT
-rw-r--r--    1 root      staff        5904 Aug 14  2008 README.html
drwxr-xr-x    7 root      staff         238 Aug 15  2008 SERVER
drwxrwxr-x    4 informix  _lpoperator      136 Jan 13 15:50 aaodir
drwxr-xr-x  109 informix  _lpoperator     3706 Jan 13 15:54 bin
...
-rwxr-xr-x    1 root      _lpoperator    29713 Aug 14  2008 uninstallserver
$ sudo chgrp -R informix aaodir
...
</pre>
<p>Note: The &#8220;&#8230;&#8221; on line 11 means there were a lot of other entries. The one at the end means that I repeated that &#8220;sudo chgrp&#8221; for all of the files and directories that had group ownership of _lpoperator.</p>
<h4>The &#8220;sqlhosts&#8221; File</h4>
<p>That group information was annoying and tedious to fix, but it was not really the problem. If you recall from the earlier post, there are some environment settings that need to be loaded. One points to a file that is very important to enabling clients to connect to the server: INFORMIXSQLHOSTS. The whole purpose of the file is to define the mechanisms by which clients can connect, this means whether they must be using shared memory space or can use sockets and what port they use to connect. The one created by the installer for the demo database has a single line that looks like this:</p>
<pre class="brush: plain; title: ;">
demo_on    onsoctcp    yoda.local    9088
</pre>
<p>The first is the dbservername and is correct for the demo database. The second is a three-part string that identifies how clients can connect. In short, &#8220;on&#8221; means a regular database server (short for on-line as in OLTP maybe), &#8220;soc&#8221; means sockets as opposed to &#8220;shm&#8221; for shared memory, and &#8220;tcp&#8221; means the network protocol. So, this seems right as well. The other two entries are the machine hostname and the port. However, although my Mac is named &#8220;Yoda&#8221; (yes, I&#8217;m a Star Wars geek), that is not listed in the /etc/hosts file. I changed this to &#8220;localhost&#8221; which <em>is</em> in the hosts file. Finally, that last entry is meant to be the service name from the /etc/services file, not the port number. To figure out how to change this, I used the following command:</p>
<pre class="brush: bash; title: ;">
$ cat /etc/services | grep Informix
sqlexec         9088/tcp    # IBM Informix SQL Interface
sqlexec         9088/udp    # IBM Informix SQL Interface
sqlexec-ssl     9089/tcp    # IBM Informix SQL Interface - Encrypted
sqlexec-ssl     9089/udp    # IBM Informix SQL Interface - Encrypted
</pre>
<p>My final file still contains one line, which looks like this:</p>
<pre class="brush: plain; title: ;">
demo_on    onsoctcp    localhost    sqlexec
</pre>
<p>And now, everything is working smoothly. Whew!</p>
]]></content:encoded>
			<wfw:commentRss>http://practicallyagile.com/2010/01/informix-on-a-mac-part-2/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Installing Informix on a Mac</title>
		<link>http://practicallyagile.com/2010/01/installing-informix-on-a-mac/</link>
		<comments>http://practicallyagile.com/2010/01/installing-informix-on-a-mac/#comments</comments>
		<pubDate>Thu, 14 Jan 2010 16:22:20 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[informix]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[snow leopard]]></category>

		<guid isPermaLink="false">http://practicallyagile.com/?p=127</guid>
		<description><![CDATA[Update: I had some problems connecting to Informix via Java. Also, the process below led to an issue with the &#8220;informix&#8221; user&#8217;s group settings. I have created a &#8220;part 2&#8243; post to detail what happened and how I managed to fix it. Please read that before using these instructions to perform your own install. I [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Update:</strong> <em>I had some problems connecting to Informix via Java. Also, the process below led to an issue with the &#8220;informix&#8221; user&#8217;s group settings. I have created a <a href="http://practicallyagile.com/2010/01/informix-on-a-mac-part-2/">&#8220;part 2&#8243;</a> post to detail what happened and how I managed to fix it. Please read that before using these instructions to perform your own install.</em></p>
<p>I have recently started a project with a group that uses Informix as the database. To set up my development environment to match production as closely as possible, I have installed IDS for Mac. The instructions that you can find on the web caused me some difficulty. There is a video available from IBM that would be great, but it seems to be outdated slightly. (Viewing it may still give you some benefit, so you can find it <a title="Video and PDF transcript available here" href="http://www.ibm.com/developerworks/offers/lp/demos/summary/dm-installidsmac.html">here</a>.) To save myself time in the future if other Mac users need to join the project, I have documented what I believe to be the final process here.</p>
<p>Caveats:</p>
<ul>
<li><strong>Do not start this process without a current system backup. System settings are going to be modified.</strong></li>
<li>I tried to document this as I went, however I did make some discoveries late and then inserted them where I believe I should have done them. Those have not been retested.</li>
<li>It is likely there are better/faster ways to do some of these things.</li>
<li>There may well be additional steps needed to add additional databases or if your usage is heavier than mine to date.</li>
</ul>
<p>If you try this out and find some things that don&#8217;t work or ways to make it faster or easier, please let me know in the comments. I will happily incorporate them.</p>
<p>One quick formatting note, when command examples are given, the &#8220;$&#8221; at the beginning of a line is in place of the command prompt. By default in the Mac Terminal app, this is usually of the form &#8220;hostname:current_directory username$&#8221;. If you copy and paste the commands, remove the &#8220;$&#8221; and the space after it.</p>
<h4>Installing IDS</h4>
<ol>
<li>Download IDS <a href="http://www-01.ibm.com/software/data/informix/mac/">here</a></li>
<li>Mount the downloaded IDS disk image (iif.11.50.FC2DE.macosx64.dmg)</li>
<li>Double-click the install package (iif.11.50.FC2DE.macosx64.pkg) and follow the prompts.</li>
<li>Enable root user and log in as root. Note: It might be possible to follow the steps using only sudo, but most on-line instructions say to use the root account method. As such, this is what has been tested. Instructions provided below are for Snow Leopard 10.6.2.
<ol>
<li>Open System Preferences</li>
<li>Click “Accounts”</li>
<li>Click “Login Options” (just above the lock in the bottom-left)</li>
<li>Click the button next to “Network Account Server:” (near bottom-middle)</li>
<li>Click “Open Directory Utility…”</li>
<li>Click the lock (bottom-left) and enter admin password</li>
<li>In the menu-bar, choose “Edit” then “Enable Root User”</li>
<li>Enter a password for the root user</li>
<li>Quit Directory Utility.</li>
<li>Close System Preferences</li>
<li>Log out</li>
<li>Choose “Other” from the log-in menu and provide the root as the username and the password entered previously.</li>
</ol>
</li>
<li>Kernel options:
<ol>
<li>Kernel options should be as follows per the IDS README files. (To avoid issues, system settings can be higher, but not lower):
<pre class="brush: plain; title: ;">kern.sysv.shmmax=4398046511104
kern.sysv.shmmin=1
kern.sysv.shmmni=512
kern.sysv.shmseg=512
kern.sysv.shmall=1073741824
kern.sysv.semume=10
kern.sysv.semmsl=87381
kern.sysv.semmnu=87381
kern.sysv.semmns=87381
kern.sysv.semmni=87381
kern.maxfiles=2147483647
kern.maxfilesperproc=40000
kern.maxvnodes=150000</pre>
</li>
<li>To check them, use the following command:
<pre class="brush: bash; title: ;">
$ sysctl kern.sysv.shmmax kern.sysv.shmmin kern.sysv.shmmni kern.sysv.shmseg kern.sysv.shmall kern.sysv.semume kern.sysv.semmsl kern.sysv.semmnu kern.sysv.semmns kern.sysv.semmni kern.maxfiles kern.maxfilesperproc kern.maxvnodes
</pre>
</li>
<li>Compare the output to the list above.</li>
<li>To adjust any that need to be changed, use the following command (may not work for kern.sysv.shmmni):
<pre class="brush: bash; title: ;">
$ sysctl -w
</pre>
<p>And copy the key-value from the list above (ex. kern.sysv.shmmax=4398046511104)</p>
</li>
<li>Those command-line changes will disappear after a reboot. To make them permanent, edit /etc/sysctl.conf and simply paste the desired key-values. <strong>This is an important system file. Make a backup of the file first!</strong></li>
</ol>
</li>
<li>Two options (the first runs a CLI installer, the second <em>may</em> run a GUI installer):
<ol>
<li>Open a terminal window, navigate to /Applications/IBM/informix and run “ids_install”</li>
<li>Open the finder, navigate to /Applications/IBM/informix and double-click “ids_install”</li>
</ol>
</li>
<li>Follow the installer prompts. Accept defaults as much as is possible <em>except</em> for the demo server installation and terminal emulator. Be sure to select “Yes” for the demo server and do not use the terminal emulator option.</li>
<li>Launch a terminal window.</li>
<li>Execute the following command (assuming a Bash shell):
<pre class="brush: bash; title: ;">
$ . /Applications/IBM/informix/demo/server/profile_settings
</pre>
</li>
<li>If desired, copy the settings in that profile_settings file to your profile (as well as the profile of root and/or the informix user created by the installation).</li>
<li>Run the following command to load the demo database, which will not be in your path (actual location: /Applications/IBM/informix/bin):
<pre class="brush: bash; title: ;">
$ dbaccessdemo
</pre>
</li>
<li>Run the following command to connect to the database:
<pre class="brush: bash; title: ;">
$ dbaccess
</pre>
</li>
<li>The interface is navigable using the arrow keys on the keyboard, go to “Table”</li>
<li>Select the database “stores<em>demo@demo</em>on”</li>
<li>Select “Info”</li>
<li>Select the “‘root’.stock” table</li>
<li>Select “Columns”</li>
<li>View the information (no more detail will be gone into here on using the tool)</li>
<li>Select “Exit” and repeat until the tool quits.</li>
<li>You can now log out as root and back in as your normal user.</li>
<li>If you want to use the informix user to start/stop your database, continue. Otherwise, you can use the root user. Both will work from a terminal.</li>
<li>Open Terminal and navigate to the /Users directory.</li>
<li>By default, the install creates the informix user’s home directory but leaves it owned by the root user. To change the owner use (enter your password when prompted):
<pre class="brush: bash; title: ;">
$ sudo chown informix informix
</pre>
</li>
<li>Use “su” command in the Terminal to log in as the informix user (enter the informix user’s password when prompted):
<pre class="brush: bash; title: ;">
$ su - informix
</pre>
</li>
<li>Use the command below to print the contents of the needed settings to the terminal:
<pre class="brush: bash; title: ;">
$ cat /Applications/IBM/informix/demo/server/profile_settings
</pre>
</li>
<li>Select the text (using the mouse) and copy it using Command-C.</li>
<li>Edit (or create) a .profile file in the informix user’s home directory:
<pre class="brush: bash; title: ;">
$ cd ~
$ vim .profile
</pre>
</li>
<li>Enter VI’s insert mode by pressing “i”, and paste the copied settings using Command-V.</li>
<li>Save and exit VI by pressing Escape, then entering “:wq” (without the quotes).</li>
<li>Log out as informix and setup is complete.</li>
</ol>
<h4>Starting IDS</h4>
<ol>
<li>Open a terminal and use the “su -” command to log in as root or the informix user. The “-” is important, as it ensures the user’s profile is loaded. If the informix user was enabled to start/stop the database according to the optional steps during installation, this loads the appropriate settings and &#8220;informix$&#8221; will now be the command prompt. Otherwise, the settings in /Applications/IBM/informix/demo/server/profile_settings must be loaded manually using this command:
<pre class="brush: bash; title: ;">
$ . /Applications/IBM/informix/demo/server/profile_settings
</pre>
</li>
<li>Run the commands below. The output should match:
<pre class="brush: bash; title: ;">
$ oninit
$ onstat -

IBM Informix Dynamic Server Version 11.50.FC2DE — On-Line — Up 00:00:09 — 41756 Kbytes
</pre>
</li>
</ol>
<h4>Stopping IDS</h4>
<ol>
<li>Open a terminal and use the “su -” command to log in as root or the informix user. (Note: &#8220;informix$&#8221; is now the command prompt.)</li>
<li>Make sure the settings in /Applications/IBM/informix/demo/server/profile_settings are part of the environment.</li>
<li>Run the commands below. The output should match.
<pre class="brush: bash; title: ;">
$ onmode -ky&lt;/blockquote&gt;
$ onstat -&lt;/blockquote&gt;

shared memory not initialized for INFORMIXSERVER ‘demo_on’
</pre>
</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://practicallyagile.com/2010/01/installing-informix-on-a-mac/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Java Dates Still Suck</title>
		<link>http://practicallyagile.com/2009/05/java-dates-still-suck/</link>
		<comments>http://practicallyagile.com/2009/05/java-dates-still-suck/#comments</comments>
		<pubDate>Fri, 29 May 2009 14:28:06 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[calendar]]></category>
		<category><![CDATA[date]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[rant]]></category>

		<guid isPermaLink="false">http://practicallyagile.com/?p=90</guid>
		<description><![CDATA[At the risk of this becoming a bile blog, I have another Java rant. It has been a long-standing tradition (12 years?) among Java developers to cry out that the date implementation in Java is pretty terrible. So, it&#8217;s not just me As a bit of history, the folks at Sun (soon to be Oracle) [...]]]></description>
			<content:encoded><![CDATA[<p>At the risk of this becoming a bile blog, I have another Java rant. It has been a long-standing tradition (12 years?) among Java developers to cry out that the date implementation in Java is pretty terrible. So, it&#8217;s not just me</p>
<p>As a bit of history, the folks at Sun (<a title="Oracle Buys Sun" href="http://www.oracle.com/us/corporate/press/018363">soon to be Oracle</a>) tried to fix this by all but requiring that <code>Date</code> objects be wrapped with <code>Calendar</code> objects in JDK 1.1. They couldn&#8217;t just fix the date implementation directly because of another long-standing tradition: new Java versions must be backward-compatible with previous versions. Regardless, this fix has long been considered a kludge at best, but most of us learned to live with it. Preamble out of the way&#8230;</p>
<p>I was working with someone today who had a <code>Calendar</code> object. They wanted to compare it with another object to see which was earlier. So, they called <code>Calendar.after(Object)</code>. Makes sense right? Only this method returned <code>false</code> even when the other object was definitively a representation of a time after that represented by the <code>Calendar</code> object. This seemed odd to the developer in question.</p>
<p>The observant among you may have noticed that I did not say they were comparing with another <code>Calendar</code> object. They were, in fact, comparing against a <code>Date</code> object. Knowing that, I immediately suspected the problem. A quick trip to the <a title="Calendar.after(Object) API Javadoc" href="http://java.sun.com/javase/6/docs/api/java/util/Calendar.html">API docs</a> showed me this gem:</p>
<blockquote><p>Returns whether this <code>Calendar</code> represents a time  after the time represented by the specified  <code>Object</code>&#8230; if and only if <code>when</code> is a <code>Calendar</code> instance. Otherwise, the method returns <code>false</code>.</p></blockquote>
<p>So, rather than throwing an <code>IllegalArgumentException</code> or having the method specifically only take a <code>Calendar</code> object, this method and the corresponding <code>before(Object)</code> method both just return <code>false</code> when you send in&#8230; anything else. So <code>Calendar.after("dates in Java suck")</code> returns <code>false</code>.</p>
<p>There are no good reasons for this that I can think of, so I went to the <a title="Sun's Bug Database" href="http://bugs.sun.com/bugdatabase/">Bug Parade</a>. There, I found a few tickets that were marked as fixed or otherwise closed. However, this is still obviously a problem, right? Refining my search, I found what I think is <a title="Bug ID: 6609391" href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6609391">the most recent one</a>. It is marked as &#8220;Closed, Will Not Fix&#8221;. Why? Here is the relevant part of the comment:</p>
<blockquote><p>It&#8217;s hard to change the implementation at this point. Please use compareTo(Calendar) added in 1.5.0.</p></blockquote>
<p>I&#8217;m sorry, can&#8217;t we at least deprecate things that are this broken? Do we not do that after the heckling caused by deprecating 60% of the methods in <a title="java.util.Date API Javadocs" href="http://java.sun.com/javase/6/docs/api/java/util/Date.html">Date</a>?</p>
<p>A follow up question&#8230; Where is the replacement library? We had <code>java.nio</code>, why not create a new <code>java.date</code>? For that matter, why hasn&#8217;t a third party library really taken off here? My suspicion is that JPA integration is the main challenge. Especially since, in addition to the problem of them having the same class name, <code>java.sql.Date</code> extends <code>java.util.Date</code>.</p>
<p>Maybe I&#8217;ll try out <a title="Joda Time on Sourceforge" href="http://joda-time.sourceforge.net/index.html">Joda Time</a> or another 3rd party replacement. Does anyone know how their Hibernate sub-project works in the field? (Update: The goal of <a title="JSR-310 project page on java.net" href="https://jsr-310.dev.java.net/">JSR-310</a> is actually to get Joda Time into core Java. It had been tentatively scheduled for Java 1.7. A quick look around shows that there was some struggling to get it completed and tested for inclusion. I was not able to determine an outcome. Anyone know?)</p>
<p>I&#8217;ll try to make my next post about something more positive.</p>
]]></content:encoded>
			<wfw:commentRss>http://practicallyagile.com/2009/05/java-dates-still-suck/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Java No Longer My First Choice</title>
		<link>http://practicallyagile.com/2009/02/java-no-longer-my-first-choice/</link>
		<comments>http://practicallyagile.com/2009/02/java-no-longer-my-first-choice/#comments</comments>
		<pubDate>Wed, 11 Feb 2009 00:45:22 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://practicallyagile.com/?p=53</guid>
		<description><![CDATA[The last few months have been pretty mixed for me as a programmer. I have been a Java developer since the 1.0 days circa 1996-1997. (Netscape IFC anyone?) For me, it was a great change from C and C++. That&#8217;s twelve-ish years with most of my professional work in one language. For the last couple [...]]]></description>
			<content:encoded><![CDATA[<p>The last few months have been pretty mixed for me as a programmer. I have been a Java developer since the 1.0 days circa 1996-1997. (<a title="Wikipedia - Internet Foundation Classes" href="http://en.wikipedia.org/wiki/Internet_Foundation_Classes">Netscape IFC</a> anyone?) For me, it was a great change from C and C++. That&#8217;s twelve-ish years with most of my professional work in one language. For the last couple of years, I have been doing a bit more project and people management and less programming. When I have done programming, it has been largely Ruby, HTML/CSS, Javascript and even some C#.</p>
<p>Therefore, it was with a great deal of happiness that I was able to take on a much more developer-oriented role in my latest Java project. I was back in the groove. There were some annotations I had to learn or re-learn, but they mostly made sense. I was concretely producing value again rather than just enabling others to do so.</p>
<p>Over time, I found myself stumbling over difficulties that were entirely Java-centric. I kept running into problems with Generics. Java reflection was a morass of generics and class-casts. I found myself every single day having to say, &#8220;I hate Java Generics.&#8221;</p>
<pre class="brush: java; title: ;">
// a sample usage of generics
// based on a real usage in my current project

Map&lt;Class&lt;ReasonableClassName&gt;, ReasonableClassName&gt; objectByType =
     new HashMap&lt;Class&lt;ReasonableClassName&gt;, ReasonableClassName&gt;();

// pre 5.0
Map objectByType = new HashMap();
</pre>
<p>I was never a fan of the Generics proposal for Java 5. It is just overly verbose as the example above shows. The Java 5 version provides type safety, but at what cost? Fortunately, back then, I was able mostly to ignore this. I only really used generics when using collections, and I tend to wrap those in more domain-friendly objects. That practice also meant I didn&#8217;t really need generics in the first place, but c&#8217;est la vie. I was happy enough.</p>
<p>In the current project things are somewhat different. I am building upon legacy code, using a lot of collections in a single class, and using a lot of reflection. I found APIs that were inconsistent in their use of Generics. For example:</p>
<pre class="brush: java; title: ;">
// from java.lang.Class

public Constructor&lt;T&gt; getDeclaredConstructor(Class&lt;?&gt;... parameterTypes) {
    // ...
}

public Constructor&lt;?&gt;[] getDeclaredConstructors() {
    // ...
}
</pre>
<p>Note that when getting a single declared constructor, it returns a properly specified constructor that will create something of the type of the class. However, if I want the full list of constructors, the array returned now doesn&#8217;t know what type the created objects would be. There is a reason for this: having a &#8220;genericized&#8221; array is &#8220;bad&#8221;. Don&#8217;t ask me why. Folks much more familiar with the generics implementation <a href="http://weblogs.java.net/blog/arnold/archive/2005/06/generics_consid_1.html">struggle</a> to understand the reason for this.</p>
<p>Regardless, it means I need to cast the result. Is that not what generics were supposed to save me from? This also could lead (depending on the context) to entirely unnecessary type checks or even a compiler warning for &#8220;unchecked type cast&#8221;. In short, what I have found is that for every benefit generics provide, there are multiple hoops to jump through or other problems that detract from it. Yes, some of this is caused by the implementation and not the concept, but that makes me think worse of Java, not better.</p>
<p>There is also a push to add more &#8220;safety&#8221; to the language through annotations and other means. Java cannot take more overhead pushed into doing simple things. I am far from the only one to think this. As an example, see <a href="http://www.michaelnygard.com/blog/2008/05/when_should_you_jump_jsr_308_t.html">this post</a> from almost a year ago.</p>
<p>I am pretty fluent in Java (sans generics) at this point. It is by far the language I know best. However, I now realize that while Java may continue to be what I am paid to do, my personal first choice will have to be something else. Using the language is too much work; it is too cumbersome. I like Ruby already, but maybe I&#8217;ll delve deeper into Scala. At least both of them run on the JVM.</p>
]]></content:encoded>
			<wfw:commentRss>http://practicallyagile.com/2009/02/java-no-longer-my-first-choice/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

