<?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"
	>

<channel>
	<title>sellmic.com</title>
	<atom:link href="http://sellmic.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://sellmic.com/blog</link>
	<description>Augusto's corner of art, code and fun</description>
	<pubDate>Mon, 19 May 2008 01:20:34 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<item>
		<title>My JavaFX presentation at PanamaJUG 2007 (JavaFX en Español)</title>
		<link>http://sellmic.com/blog/2008/05/18/my-javafx-presentation-at-panamajug-2007-javafx-en-espanol/</link>
		<comments>http://sellmic.com/blog/2008/05/18/my-javafx-presentation-at-panamajug-2007-javafx-en-espanol/#comments</comments>
		<pubDate>Sun, 18 May 2008 19:12:30 +0000</pubDate>
		<dc:creator>Augusto</dc:creator>
		
		<category><![CDATA[Java]]></category>

		<category><![CDATA[Software Development]]></category>

		<category><![CDATA[Technology]]></category>

		<category><![CDATA[Travel]]></category>

		<category><![CDATA[User Interface]]></category>

		<guid isPermaLink="false">http://sellmic.com/blog/2008/05/18/my-javafx-presentation-at-panamajug-2007-javafx-en-espanol/</guid>
		<description><![CDATA[Last December I did a presentation about JavaFX in Spanish for the Panama Java User&#8217;s Group (JUG). This event took place in the city of Chitre, and was a lot of fun to participate in, specially since it gave me a chance to visit my native country. The presentation aimed to serve as an introduction [...]]]></description>
			<content:encoded><![CDATA[<p><center><iframe src="http://docs.google.com/EmbedSlideshow?docid=avn83j2j7zf_10dzgx4ngh" frameborder="0" height="342" width="410"></iframe></center>Last December I did a presentation about JavaFX in Spanish for the Panama Java User&#8217;s Group (JUG). This event took place in the city of Chitre, and was a lot of fun to participate in, specially since it gave me a chance to visit my native country. The presentation aimed to serve as an introduction to JavaFX, providing an overview of the main features of the language. I showed some simple demos from Sun, and a few I created myself. At the end, we went over my <a href="http://sellmic.com/blog/2007/05/22/javafx-clock-update-now-with-transparency/">JavaFX clock</a> implementation and discussed a bit what place JFX occupies in the RIA technology space. The slides are featured at the top of this post, and are in Spanish of course.  Thanks to <a href="http://avbravo.blogspot.com/" onclick="javascript:pageTracker._trackPageview ('/outbound/avbravo.blogspot.com');">Aristides Villareal</a>, and the members of the Panama JUG for inviting me to this wonderful event! I was lucky enough to bring along one of my daughters, Sofia, and she enjoyed the trip very much.</p>
<p>I have to say, the most difficult part of preparing this presentation was trying to figure out the Spanish version of common programming words and concepts. Part of the problem is that when I was learning how to program in Panama (when I was around 10-12 years old) all of my resources; magazines, books, etc where all in English. So I never knew that array is &#8220;arreglo&#8221;, that a developer is called a &#8220;desarrollador&#8221;, or what the corresponding word for loop is. It would be really nice if there was some type of resource out there with a table with all these terms, and maybe other languages. One challenge is that it seems not all of these words are &#8220;settled&#8221;. I noticed some people were still pretty comfortable with the English versions, while others used the Spanish ones exclusively. Also, there are a lot of emerging technologies and concepts in Computer Science which I think still don&#8217;t have Spanish translations. Pretty much a more difficult challenge than I expected.</p>
<p><img src="http://sellmic.com/blog/wp-content/uploads/2008/05/javax-panama-jug.jpg" alt="javax-panama-jug.jpg" /></p>
<p>One more thing, JavaFX has changed a lot in the last year. When I did this presentation, I didn&#8217;t cover how much effort has gone into optimizing this technology or the new changes to the animation API (like the deprecated dur keyword). There is a preview JFX SDK coming out next month, and you can sign up for it at<a href="http://javafx.com" onclick="javascript:pageTracker._trackPageview ('/outbound/javafx.com');"> javafx.com</a>. I didn&#8217;t attend JavaOne this year, so I don&#8217;t know all the details, but I&#8217;m hoping the SDK comes with some of the tooling that Sun has promised. Designer level tools are key to this technology&#8217;s success. I hope to make a blog post with a quick review of the SDK once it comes out.</p>
]]></content:encoded>
			<wfw:commentRss>http://sellmic.com/blog/2008/05/18/my-javafx-presentation-at-panamajug-2007-javafx-en-espanol/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Parkzone T-28 Trojan maiden flight, with video!</title>
		<link>http://sellmic.com/blog/2008/05/01/parkzone-t-28-trojan-maiden-flight-with-video/</link>
		<comments>http://sellmic.com/blog/2008/05/01/parkzone-t-28-trojan-maiden-flight-with-video/#comments</comments>
		<pubDate>Thu, 01 May 2008 16:12:17 +0000</pubDate>
		<dc:creator>Augusto</dc:creator>
		
		<category><![CDATA[RC airplanes]]></category>

		<guid isPermaLink="false">http://sellmic.com/blog/2008/05/01/parkzone-t-28-trojan-maiden-flight-with-video/</guid>
		<description><![CDATA[Click on image to go to YouTube video
So last year around October I started to get into the RC airplane hobby, buying a simple 2 channel Firebird Commander 2. That plane was literally &#8220;gone with the wind&#8221; and I replaced it with a nice 3 channel Super Cub. The Super Cub is currently grounded because [...]]]></description>
			<content:encoded><![CDATA[<div class="caption right"><a href="http://www.youtube.com/watch?v=iUnWT0tLTRo" onclick="javascript:pageTracker._trackPageview ('/outbound/www.youtube.com');"><img src="http://sellmic.com/blog/wp-content/uploads/2008/04/t28-maiden.jpg" alt="t28-maiden.jpg" /></a><a href="http://www.youtube.com/watch?v=iUnWT0tLTRo" onclick="javascript:pageTracker._trackPageview ('/outbound/www.youtube.com');">Click on image to go to YouTube video</a></div>
<p>So last year around October <a href="/blog/2007/10/23/getting-into-the-rc-airplane-thing/">I started to get into the RC airplane hobby</a>, buying a simple 2 channel Firebird Commander 2. That plane was literally &#8220;gone with the wind&#8221; and I replaced it with a nice <a href="http://dan.idano.net/hobbyzone-super-cub-my-new-toy-298.htm" onclick="javascript:pageTracker._trackPageview ('/outbound/dan.idano.net');">3 channel Super Cub</a>. The Super Cub is currently grounded because I have to glue the tail together. I&#8217;m hoping to fix that soon.</p>
<p>The latest plane I bought is a T-28 Trojan from Parkzone. It&#8217;s an RTF (Ready to Fly) model which means it comes with everything. The radio, Li-Po batteries, servos, ESC, even the AA batteries for the remote! You can get one of these for around $219.99, but if you have the rest of the parts already you can get the PNP (Plug and Play) model that comes without the the Li-Po battery and radio which goes around $159.99.</p>
<div class="caption right"><img src="http://sellmic.com/blog/wp-content/uploads/2008/05/t28-trojan-schematic-fx.jpg" alt="t28-trojan-schematic-fx.jpg" />T-28 Trojan (you can see an animated version of this image in the video)</div>
<p><span id="more-147"></span><br />
One of the main differences between this model and my Super Cub is that this plane has ailerons. Before I had to steer the plane with the rudder, but now that I have ailerons available, you can do a lot of more maneuvers and the plane becomes much more responsive. It also makes flying a bit more difficult, however the T-28 is nice starter plane for people moving to 4 channels and the radio has a setting that prevents you from over steering the ailerons too much (you can turn off this setting of course).</p>
<p>The plane comes in a nice big box, with everything that you need except the screwdriver. I say that because for some reason the Super Cub came with that too, which I thought was overkill but greatly appreciated. Putting the plane together was not too complicated, however the front landing gear was a pain and I couldn&#8217;t install it. There&#8217;s a very small screw that clamps on the landing wheel, and the screw would not move at all, to the point were I forced it and ended up with a stripped screw. Luckly, the folks at <a href="http://www.hobbytown.com/flwm/" onclick="javascript:pageTracker._trackPageview ('/outbound/www.hobbytown.com');">HobbyTown in Melbourne, FL</a> removed and replaced it. Thanks!</p>
<p>This past Sunday, I made a short (2:30) video of my maiden flight with this plane and it was  a lot of fun. My wife was operating the camera and our baby was there with us supervising the event. Everything went fine, until the landing, when I got some cross wind and unfortunately hit the curb. The right landing gear fell off, but it should be easy to glue back to the wing. Also the front wheel fell off, but that was just a matter of screwing it back in.</p>
<p><object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/iUnWT0tLTRo&#038;hl=en"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/iUnWT0tLTRo&#038;hl=en" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object></p>
<p>Right click and chose <a href="http://sellmic.com/videos/t28-trojan-maiden-med.wmv"> &#8220;Save As &#8230;&#8221; on this video link</a> to download higher quality version.</p>
<p>I may get one of those <a href="http://www.flycamone2.com/index.php?id=20&amp;L=3" onclick="javascript:pageTracker._trackPageview ('/outbound/www.flycamone2.com');">FlyCamOne2</a> cameras, and get some more exciting onboard video. They seem to be around $100, I&#8217;m only worried about the image quality. It&#8217;s hard to evaluate as a lot of sample videos are in YouTube and that site really screws up with the original video quality.</p>
<p>I plan on flying this bird again this weekend, hopefully I&#8217;ll be able to make more maneuvers. One thing is, this plane is much faster than my Super Cub so I have to get used to that. For most of the time I was flying 1/4-1/3 throttle and it seemed pretty fast for me. It should be fun pushing this model to its limits to see how fast it can go. I&#8217;ll probably try a loop or two, but what I&#8217;m looking forward to is a bit of inverted flight. Not sure if I will be able to achieve that soon, but we&#8217;ll see.</p>
]]></content:encoded>
			<wfw:commentRss>http://sellmic.com/blog/2008/05/01/parkzone-t-28-trojan-maiden-flight-with-video/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Bug of the day : Negative screen resolution</title>
		<link>http://sellmic.com/blog/2008/04/18/bug-of-the-day-negative-screen-resolution/</link>
		<comments>http://sellmic.com/blog/2008/04/18/bug-of-the-day-negative-screen-resolution/#comments</comments>
		<pubDate>Fri, 18 Apr 2008 19:53:46 +0000</pubDate>
		<dc:creator>Augusto</dc:creator>
		
		<category><![CDATA[bugs]]></category>

		<guid isPermaLink="false">http://sellmic.com/blog/2008/04/18/bug-of-the-day-negative-screen-resolution/</guid>
		<description><![CDATA[
I&#8217;m not going to brag too much, but I may be the only user in the world with a monitor capable of -1x-1 screen resolution. Makes me feel special! Now if I could only find a game that supports this resolution, perhaps Duke Nukem Forever?
]]></description>
			<content:encoded><![CDATA[<p style="text-align: center" align="center"><img src="http://sellmic.com/blog/wp-content/uploads/2008/04/negative_screen_resolution.png" alt="negative_screen_resolution.png" /></p>
<p>I&#8217;m not going to brag too much, but I may be the only user in the world with a monitor capable of -1x-1 screen resolution. Makes me feel special! Now if I could only find a game that supports this resolution, perhaps <a href="http://en.wikipedia.org/wiki/Duke_Nukem_Forever" onclick="javascript:pageTracker._trackPageview ('/outbound/en.wikipedia.org');">Duke Nukem Forever</a>?</p>
]]></content:encoded>
			<wfw:commentRss>http://sellmic.com/blog/2008/04/18/bug-of-the-day-negative-screen-resolution/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Organic Software</title>
		<link>http://sellmic.com/blog/2008/03/26/organic-software/</link>
		<comments>http://sellmic.com/blog/2008/03/26/organic-software/#comments</comments>
		<pubDate>Wed, 26 Mar 2008 07:13:20 +0000</pubDate>
		<dc:creator>Augusto</dc:creator>
		
		<category><![CDATA[Firefox]]></category>

		<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://sellmic.com/blog/2008/03/26/organic-software/</guid>
		<description><![CDATA[
An article on treehugger has an interview with Paul Kim, VP of marketing for the Mozilla Corporation. The Mozilla marketing folks have decided to coin the term &#8220;organic software&#8221; in order to raise awareness of some of the other benefits of Mozilla besides its list of features.
Here is Paul&#8217;s rationale for using this term:

PK: I [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center" align="center"><img src="http://sellmic.com/blog/wp-content/uploads/2008/03/organic_software.jpg" alt="organic_software.jpg" /></p>
<p>An <a href="http://www.treehugger.com/files/2008/03/mozilla_firefox.php" onclick="javascript:pageTracker._trackPageview ('/outbound/www.treehugger.com');">article on treehugger</a> has an interview with Paul Kim, VP of marketing for the Mozilla Corporation. The Mozilla marketing folks have decided to coin the term &#8220;<a href="http://www.mozilla.com/en-US/firefox/organic/" onclick="javascript:pageTracker._trackPageview ('/outbound/www.mozilla.com');">organic software</a>&#8221; in order to raise awareness of some of the other benefits of Mozilla besides its list of features.</p>
<p>Here is Paul&#8217;s rationale for using this term:</p>
<blockquote>
<blockquote><p>PK: I should clarify that we&#8217;re not trying to create a new model. Instead, what we&#8217;re trying to do is to help new sets of people who know nothing about open source software quickly start to understand that Firefox is something different from the software they&#8217;re currently using to access the Web. &#8216;Organic software&#8217; is a concept we came up with that we thought would resonate with end users in ways that &#8216;free software&#8217; doesn&#8217;t. I think &#8216;free software&#8217;, at least in the US, doesn&#8217;t carry the same valence that &#8216;<a href="http://en.wikipedia.org/wiki/Alternative_terms_for_free_software#FLOSS" _base_target="_parent" onclick="javascript:pageTracker._trackPageview ('/outbound/en.wikipedia.org');">FLOSS</a>&#8216; does in, say, Europe.</p>
<p>PK: I think for people in the open source movement, the term &#8216;organic&#8217; is a lot clearer and immediately graspable. I think in the broader culture, and again I&#8217;m speaking of the US, the word &#8216;free&#8217; gets filtered through a consumer lens. So yes, it&#8217;s a terminology issue for end users - trying to communicate clearly what practitioners already grok.</p></blockquote>
</blockquote>
<p>I appreciate what the Mozilla folks are trying to do here, but this whole campaign seems wrongheaded and actually misleading. The term organic is often associated with organic food, which is supposed to be healthier and friendlier to the environment. That is acknowledged in the article. Using this term causes more confusion in my mind, when I first read it, I thought the Mozilla developers were making a &#8220;green&#8221; commitment and trying to save the environment by changing some of their habits (perhaps turn off their computers once in a while?).</p>
<p>What they should do is keep educating the public on the term &#8220;open source&#8221; instead of confusing the issue further. Their uses further overloads the word &#8220;organic&#8221; and I can also see companies jumping on the bandwagon and redefining the whole definition (ex: A software company pledges to go &#8220;green&#8221; and calls their software organic).</p>
<p>The article itself is proof of what I&#8217;m saying. It is from a site dedicated to environmental/green issues, and this Mozilla announcement has nothing to do with that, except that they now use the word organic.</p>
<p>Sorry Mozilla, a vote down on this marketing strategy from me.</p>
]]></content:encoded>
			<wfw:commentRss>http://sellmic.com/blog/2008/03/26/organic-software/feed/</wfw:commentRss>
		</item>
		<item>
		<title>The maximum number of methods in a class</title>
		<link>http://sellmic.com/blog/2008/02/28/the-maximum-number-of-methods-in-a-class/</link>
		<comments>http://sellmic.com/blog/2008/02/28/the-maximum-number-of-methods-in-a-class/#comments</comments>
		<pubDate>Fri, 29 Feb 2008 03:53:56 +0000</pubDate>
		<dc:creator>Augusto</dc:creator>
		
		<category><![CDATA[Java]]></category>

		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://sellmic.com/blog/2008/02/28/the-maximum-number-of-methods-in-a-class/</guid>
		<description><![CDATA[
 The other day I saw a Java interface with well over 300 methods (with no inheritance). It&#8217;s one of these interfaces that is a single point of entry into a system, and I&#8217;m partly to blame. Really didn&#8217;t think about how the API should scale, and now that there&#8217;s years and years of development [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center" align="center"><img src="http://sellmic.com/blog/wp-content/uploads/2008/02/penguins.jpg" alt="penguins.jpg" /></p>
<p> The other day I saw a Java interface with well over 300 methods (with no inheritance). It&#8217;s one of these interfaces that is a single point of entry into a system, and I&#8217;m partly to blame. Really didn&#8217;t think about how the API should scale, and now that there&#8217;s years and years of development depending on this interface, refactoring this single interface is not a trivial class (it would have to be broken up at least in a dozen smaller interfaces).</p>
<p>That got me wondering, what could be the maximum number of methods in a class. A quick google search yielded a forum discussion with the answer as defined in the <a href="http://java.sun.com/docs/books/jvms/second_edition/html/ClassFile.doc.html" onclick="javascript:pageTracker._trackPageview ('/outbound/java.sun.com');">JVM spec (2nd edition)</a>;</p>
<blockquote>
<blockquote><p>The number of methods that may be declared by a class or interface is limited to 65535 by the size of the <code>methods_count</code> item of the <code>ClassFile</code> structure <a href="http://java.sun.com/docs/books/jvms/second_edition/html/ClassFile.doc.html#74353" onclick="javascript:pageTracker._trackPageview ('/outbound/java.sun.com');">(§4.1)</a>. Note that the value of the <code>methods_count</code> item of the <code>ClassFile</code> structure does not include methods that are inherited from superclasses or superinterfaces.</p></blockquote>
</blockquote>
<p>So even if you have 300 methods you are still very far away from ever hitting the limit. I wonder if there are any open source projects out there with classes with this number of methods. If you count inheritance, some of the AWT/Swing classes do have a large amount of methods, but there have to be more examples of this.</p>
<p>Anyways, my little piece of advise is to be forward thinking when designing APIs and make sure the API can scale as more functionality is added. It is always a good idea to think very modular and to group functionality in classes and packages that make sense.</p>
<p>Obviously, when others depend on your code, it never hurts to practice good <a href="http://www.ddj.com/windows/184405654" onclick="javascript:pageTracker._trackPageview ('/outbound/www.ddj.com');">design usability</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://sellmic.com/blog/2008/02/28/the-maximum-number-of-methods-in-a-class/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Hanna Montana Guitar Piñata</title>
		<link>http://sellmic.com/blog/2008/02/28/hanna-montana-guitar-pinata/</link>
		<comments>http://sellmic.com/blog/2008/02/28/hanna-montana-guitar-pinata/#comments</comments>
		<pubDate>Fri, 29 Feb 2008 02:13:30 +0000</pubDate>
		<dc:creator>Augusto</dc:creator>
		
		<category><![CDATA[Art]]></category>

		<category><![CDATA[Family]]></category>

		<category><![CDATA[Life]]></category>

		<guid isPermaLink="false">http://sellmic.com/blog/2008/02/28/hanna-montana-guitar-pinata/</guid>
		<description><![CDATA[
 Monica&#8217;s latest party had a fun &#8220;super star&#8221; Hanna Montana theme, and I made her this  electric guitar piñata. We had a lot of fun making it, because of the shape there was no need for balloons or any messes with flour. I basically just used a box from one of my RC [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center" align="center"><img src="http://sellmic.com/blog/wp-content/uploads/2008/02/hanna_montana_pinata1.jpg" alt="hanna_montana_pinata1.jpg" /></p>
<p> Monica&#8217;s latest party had a fun &#8220;super star&#8221; Hanna Montana theme, and I made her this  electric guitar piñata. We had a lot of fun making it, because of the shape there was no need for balloons or any messes with flour. I basically just used a box from one of my RC airplanes, cut the shape with one face of the box and traced the bottom part with the other side. The corners were just slices from the same box folded to form the necessary shape.  Lots of tape was needed for this.</p>
<p>Because I was using a box and no paper mache, I was afraid the kids were going to have a hard time breaking it but no, it stood its ground and then broke when the bigger kids started hitting it.</p>
<p>One fun little detail where the knobs and the cords made out of colorful threads. Also added a little Hanna Montana sticker to keep up with the theme of the party.</p>
<p style="text-align: center" align="center"><img src="http://sellmic.com/blog/wp-content/uploads/2008/02/guitar_pinata_detail.jpg" alt="guitar_pinata_detail.jpg" /></p>
<p style="text-align: center" align="center"> BTW one of the top searches I keep getting is for &#8220;transformer piñata&#8221;, which almost makes me try to do one (Starscream or Optimus I guess). Too bad my girls are not really into the Transformers, but maybe I could do just for fun or give it to a friend.</p>
]]></content:encoded>
			<wfw:commentRss>http://sellmic.com/blog/2008/02/28/hanna-montana-guitar-pinata/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Cinderella&#8217;s Castle at night</title>
		<link>http://sellmic.com/blog/2008/02/24/cinderellas-castle-at-night/</link>
		<comments>http://sellmic.com/blog/2008/02/24/cinderellas-castle-at-night/#comments</comments>
		<pubDate>Sun, 24 Feb 2008 09:37:10 +0000</pubDate>
		<dc:creator>Augusto</dc:creator>
		
		<category><![CDATA[Family]]></category>

		<category><![CDATA[Life]]></category>

		<category><![CDATA[Travel]]></category>

		<guid isPermaLink="false">http://sellmic.com/blog/2008/02/24/cinderellas-castle-at-night/</guid>
		<description><![CDATA[
We all went to Disney&#8217;s Magic Kingdom last weekend, and I like this picture we took of the castle at night. Makes it look a bit spooky.
]]></description>
			<content:encoded><![CDATA[<p align="center"><img src="http://sellmic.com/blog/wp-content/uploads/2008/02/magic_kingdom.jpg" alt="magic_kingdom.jpg" /></p>
<p>We all went to Disney&#8217;s Magic Kingdom last weekend, and I like this picture we took of the castle at night. Makes it look a bit spooky.</p>
]]></content:encoded>
			<wfw:commentRss>http://sellmic.com/blog/2008/02/24/cinderellas-castle-at-night/feed/</wfw:commentRss>
		</item>
		<item>
		<title>GenderRenderer, GenderEditor and unfortunate class names</title>
		<link>http://sellmic.com/blog/2008/02/15/genderrenderer-gendereditor-and-unfortunate-class-names/</link>
		<comments>http://sellmic.com/blog/2008/02/15/genderrenderer-gendereditor-and-unfortunate-class-names/#comments</comments>
		<pubDate>Fri, 15 Feb 2008 14:19:19 +0000</pubDate>
		<dc:creator>Augusto</dc:creator>
		
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://sellmic.com/blog/2008/02/15/genderrenderer-gendereditor-and-unfortunate-class-names/</guid>
		<description><![CDATA[
&#160;
So the other day I&#8217;m looking at somebody&#8217;s code and notice a class name that caught my attention; &#8220;GenderEditor&#8221;. I think it was just your normal JTable class to show a &#8220;gender&#8221; property, but I thought it was kind of funny because the class name implied you could use this program to switch a user&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center" align="center"><img src="http://sellmic.com/blog/wp-content/uploads/2008/02/whoops2.jpg" alt="whoops2.jpg" /></p>
<p style="text-align: center" align="center">&nbsp;</p>
<p align="left">So the other day I&#8217;m looking at somebody&#8217;s code and notice a class name that caught my attention; &#8220;GenderEditor&#8221;. I think it was just your normal JTable class to show a &#8220;gender&#8221; property, but I thought it was kind of funny because the class name implied you could use this program to switch a user&#8217;s gender very easily (with no surgery!).</p>
<p align="left"> I talked to the developer and we had a good laugh about it. Then I noticed in the code a class called &#8220;GenderRenderer&#8221;. Well, you don&#8217;t have to use a lot of imagination to figure out how this class could be potentially a problem (what should we use to represent gender &#8230; hum).</p>
<p align="left"> There&#8217;s nothing wrong with these class names of course, but it made me think about how hard it is sometimes to come up with good names for our classes and how easy it is to come up with some awkward and sometimes embarrassing names.</p>
<p> I can&#8217;t remember any similar to GenderEditor, but I do know somebody that got carried away with naming everything *Broker. UserControllerBroker, GroupManagerBroker, SaveTheDolphinsBroker. If that wasn&#8217;t enough, then actual &#8220;broker&#8221; implementations just appened &#8220;Impl&#8221; at the end of the name, making things even more convoluted; UserControlerBrokerImpl, GroupManagerBrokerImpl, etc. I guess good descriptive names are nice, but you can get carried away trying to define what the object does in the name. We do have comment blocks in most languages, so sometimes it&#8217;s best to just say what the thing is supposed to do there.</p>
<p>I&#8217;m also not a big fan of putting a big &#8220;I&#8221; in front of interfaces. IUser, IConsumer, ICreditCard, this convention is used a lot by Microsoft and IBM. You look at the Eclipse code and it is littered with it. I see the point though, sometimes you want to make clear people separate interface from implementation, but we do have IDEs that let us know quickly and visually what is a class and what is merely an interface.</p>
<p>The again, having some basic naming conventions is often better than none at all. As long as you apply a bit of common sense and make sure you read the names you are using out loud, you won&#8217;t end up with weird names or potentially offensive sounding classes.</p>
]]></content:encoded>
			<wfw:commentRss>http://sellmic.com/blog/2008/02/15/genderrenderer-gendereditor-and-unfortunate-class-names/feed/</wfw:commentRss>
		</item>
		<item>
		<title>The &#8220;constructor that doesn&#8217;t construct&#8221; blooper of the day</title>
		<link>http://sellmic.com/blog/2008/02/15/the-constructor-that-doesnt-construct-blooper-of-the-day/</link>
		<comments>http://sellmic.com/blog/2008/02/15/the-constructor-that-doesnt-construct-blooper-of-the-day/#comments</comments>
		<pubDate>Fri, 15 Feb 2008 09:46:50 +0000</pubDate>
		<dc:creator>Augusto</dc:creator>
		
		<category><![CDATA[Code Bloopers]]></category>

		<guid isPermaLink="false">http://sellmic.com/blog/2008/02/15/the-constructor-that-doesnt-construct-blooper-of-the-day/</guid>
		<description><![CDATA[
Two people sent me this code blooper the other day, again, class and parameter names have been changed to protect the identity of the offender(s).

public SomeObject(
boolean lowSetting,
boolean highSetting,
boolean currentSetting,
Color lowColor,
Color highColor,
Color currentColor,
Color otherColor)
{
   super();
   lowSetting     = this.lowSetting;
   highSetting    = this.highSetting;
   [...]]]></description>
			<content:encoded><![CDATA[<p align="center"><img src="http://sellmic.com/blog/wp-content/uploads/2008/02/dead_fish1.jpg" alt="DeadFish2" /></p>
<p>Two people sent me this code blooper the other day, again, class and parameter names have been changed to protect the identity of the offender(s).</p>
<pre name="code" class="java">
public SomeObject(
boolean lowSetting,
boolean highSetting,
boolean currentSetting,
Color lowColor,
Color highColor,
Color currentColor,
Color otherColor)
{
   super();
   lowSetting     = this.lowSetting;
   highSetting    = this.highSetting;
   currentSetting= this.currentSetting;
   lowColor        = this.lowColor;
   highColor       = this.highColor;
   currentColor   = this.currentColor;
   otherColor      = this.otherColor;
}</pre>
<p>I have to admit I didn&#8217;t get it in the first couple of second, but it should be clear that this constructor is basically not doing anything. It basically overrides the constructor parameters with the current values in the object, which is more than likely not what we want to do.</p>
<p>BTW it also has a pet peeve of mine, it calls &#8220;super()&#8221; (the parent&#8217;s public no arg constructor). A lot of people don&#8217;t know that this is done automatically for you, no need to write code to for it.</p>
<p>Anyways, this one could have been prevented if you had a policy saying that method parameters should be named differently from class members. However, I personally like naming them the same. I guess it shouldn&#8217;t be unreasonable for the compiler to give you a warning when you do this, I&#8217;m going to guess most of the time you don&#8217;t want to do this.</p>
]]></content:encoded>
			<wfw:commentRss>http://sellmic.com/blog/2008/02/15/the-constructor-that-doesnt-construct-blooper-of-the-day/feed/</wfw:commentRss>
		</item>
		<item>
		<title>2007</title>
		<link>http://sellmic.com/blog/2007/12/31/2007/</link>
		<comments>http://sellmic.com/blog/2007/12/31/2007/#comments</comments>
		<pubDate>Tue, 01 Jan 2008 04:28:23 +0000</pubDate>
		<dc:creator>Augusto</dc:creator>
		
		<category><![CDATA[Life]]></category>

		<guid isPermaLink="false">http://sellmic.com/blog/2007/12/31/2007/</guid>
		<description><![CDATA[
Last post of the year. I haven&#8217;t updated the blog in a while, had kind of a longish vacation from work and was taking a bit of a break from the internet. In the middle of that, I had a very good trip to Panama and spoke at the corresponding JUG over there about JavaFX, [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center" align="center"><img src="http://sellmic.com/blog/wp-content/uploads/2008/02/fireworks.jpg" alt="fireworks.jpg" /></p>
<p>Last post of the year. I haven&#8217;t updated the blog in a while, had kind of a longish vacation from work and was taking a bit of a break from the internet. In the middle of that, I had a very good trip to Panama and spoke at the corresponding JUG over there about JavaFX, more on that in a later post.I wish everybody a happy new year, and hope to update the blog more frequently. This year has been good in my life and I&#8217;m hoping things get even better in 2008.</p>
<h2 class="r"><strong><span class="l">Feliz Año Nuevo!</span></strong></h2>
]]></content:encoded>
			<wfw:commentRss>http://sellmic.com/blog/2007/12/31/2007/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
