DevFi : http://devfi.com/articles.rss en-us 40 Developing Development DevFi Podcast #8 - Code Comments <p>Hey, look, another episode!</p> <p>This time around I&#8217;m talking smack about comments. To go with this episode, take a look at <a href="http://accu.org/index.php/journals/1396">this article</a> by Mark Easterbrook.</p> <p>During the podcast I give a few tips for writing better in-line comments. The most common reason used to justify in-line comments is to document complex code. Here are some tips for writing better code, so it doesn&#8217;t need comments:</p> <ul> <li>Ask a coworker or a friend for help</li> <li>Use <a href="http://www.google.com/codesearch">Google Code Search</a> to find similar implementations</li> <li>Write out the algorithm using pseudo-code</li> <li>Write a test as a way to become a user of your code</li> <li>Talk it out with a non-technical person</li> </ul> <p>I also talk about block-level comments, those are the comments you put before a function for <span class="caps">API</span> documentation. Here are some tips to keep them in good shape:</p> <ul> <li>Don&#8217;t write them if you don&#8217;t have to (e.g. private methods)</li> <li>Don&#8217;t go into unnecessary detail</li> <li>Try to make them invariable</li> <li>After changing code, read the comments and make sure they match</li> </ul> <p><strong>Files for this show:</strong></p> <ul> <li><a href="http://pmade.noscience.net/devfi/2008-10-23.m4a"><span class="caps">AAC</span></a></li> <li><a href="http://pmade.noscience.net/devfi/2008-10-23.mp3"><span class="caps">MP3</span></a></li> </ul> <p><strong>Feedback:</strong></p> <p>Please leave a comment, or send us an email. Motivate us to do more shows!</p> Fri, 24 Oct 2008 19:33:00 +0000 urn:uuid:91168414-3ed7-4e63-a7a1-29262c327ae1 http://devfi.com/articles/2008/10/24/devfi-podcast-8-code-comments#comments Podcast http://devfi.com/trackbacks?article_id=devfi-podcast-8-code-comments&day=24&month=10&year=2008 http://devfi.com/articles/2008/10/24/devfi-podcast-8-code-comments DevFi Podcast #7 - Reading Code <p>So, this time, Chris is the slacker. But here&#8217;s the newest episode just a week late. Chris puts forth the importance of reading other people&#8217;s code, and has suggestions of where to start if you don&#8217;t know where to go.</p> <p>Next week, Peter will release his episode on time&#8230; Probably.</p> <p>Please post any comments or suggestions right here on this blog.</p> Files: <ul> <li><a href="http://pmade.noscience.net/devfi/07-reading-code.m4a"><span class="caps">AAC</span></a></li> <li><a href="http://pmade.noscience.net/devfi/07-reading-code.mp3"><span class="caps">MP3</span></a></li> </ul> Wed, 08 Oct 2008 14:54:00 +0000 urn:uuid:145ca62e-2d47-48b2-9129-ace5567e88ef http://devfi.com/articles/2008/10/08/devfi-podcast-7-reading-code#comments Podcast http://devfi.com/trackbacks?article_id=devfi-podcast-7-reading-code&day=08&month=10&year=2008 http://devfi.com/articles/2008/10/08/devfi-podcast-7-reading-code DevFi Podcast #6 - Software Maintenance and Refactoring <p>Peter gets to rant all by himself, while Chris has to listen just like everyone else. This time Peter talks about software maintenance and refactoring, maintaing source code style, and adding features without just bolting them on.</p> <p>Please post any comments or suggests as a blog comment, or <a href="http://pmade.com/contact">email Peter</a> directly.</p> Files: <ul> <li><a href="http://pmade.noscience.net/devfi/2008-09-23.m4a"><span class="caps">AAC</span></a></li> <li><a href="http://pmade.noscience.net/devfi/2008-09-23.mp3"><span class="caps">MP3</span></a></li> </ul> Tue, 23 Sep 2008 17:45:00 +0000 urn:uuid:9d419dc2-afea-471b-a71f-d3a4a3899d92 http://devfi.com/articles/2008/09/23/06-refactoring#comments Podcast http://devfi.com/trackbacks?article_id=06-refactoring&day=23&month=09&year=2008 http://devfi.com/articles/2008/09/23/06-refactoring DevFi Podcast #5 - Automation <p>This week&#8217;s podcast is a little tour through the mind of someone, me, writing scripts to handle a certain part of my workday. I&#8217;m a pretty lazy guy, so if something can do some work for me, I&#8217;m all for it.</p> <p>This is also the debut of the new DevFi podcast format: a shorter, solo show, with the next one to follow closely.</p> <p>More tips and encouragement on automating your work can be found in two Pragmatic Programmer titles: <a href="http://www.pragprog.com/the-pragmatic-programmer">The Pragmatic Programmer</a> and <a href="http://www.pragprog.com/titles/mjwti/my-job-went-to-india">My Job Went To India</a>.</p> Mon, 15 Sep 2008 10:50:00 +0000 urn:uuid:d6368d61-21c5-4ad2-b6ec-8288ee6717c1 http://devfi.com/articles/2008/09/15/devfi-podcast-5-automation#comments Podcast http://devfi.com/trackbacks?article_id=devfi-podcast-5-automation&day=15&month=09&year=2008 http://devfi.com/articles/2008/09/15/devfi-podcast-5-automation DevFi Podcast #4 - Working Agile When Your Team Isn't <p><em>Star Wars</em> was way better than the prequels, and I think Peter and I are in a similar situation. We&#8217;ve arrived at Episode IV, <em>A New Hope</em>... I mean <em>Being Agile in a Waterfall</em>. We haven&#8217;t quite got our sound issues totally out of the way, but I wouldn&#8217;t be surprised if we get that all figured out next time.</p> <p>Until then, enjoy us giving a brief rundown of various development methodologies, and then how to sneak in Agile practices into a non-Agile team. We give some pointers on estimating, especially on getting better at it, and getting your team to incorporate some agile practices into their workflow.</p> <p>Peter recently wrote about <a href="http://pmade.com/articles/2008/project-planning">his project planning process</a>, which I recommend if you&#8217;d like to see how someone with <span class="caps">OCD</span> does it.</p> <p>Thanks for listening. Leave comments or suggestions below. And get ready for the next episode: <em>The Empire Strikes Back</em>...err, <em>Project Management for Developers</em>.</p> Files <ul> <li><a href="http://pmade.noscience.net/devfi/2008-08-20.m4a"><span class="caps">AAC</span></a></li> <li><a href="http://pmade.noscience.net/devfi/2008-08-20.mp3"><span class="caps">MP3</span></a></li> </ul> Tue, 19 Aug 2008 21:39:00 +0000 urn:uuid:f8c12e02-b358-40af-9e9f-559b5156825a http://devfi.com/articles/2008/08/19/devfi-podcast-4-working-agile-when-your-team-isnt#comments http://devfi.com/trackbacks?article_id=devfi-podcast-4-working-agile-when-your-team-isnt&day=19&month=08&year=2008 http://devfi.com/articles/2008/08/19/devfi-podcast-4-working-agile-when-your-team-isnt DevFi Podcast #3 – Promoting the Project and Encouraging Participation <p>Now that Peter and I got our remote recording situation settled, we can get back into the business of producing episodes. And, hopefully not too late, here&#8217;s number three. This episode&#8217;s about letting people know about your software project and getting them involved.</p> <p>We hit on a few things, from mailing lists to <a href="http://twitter.com/">twitter</a> to helping developers create patches.</p> <p>If you&#8217;re as excited about git as we are, and you&#8217;re looking for somewhere to host your project&#8217;s repository, you&#8217;ll want to check these sites out:</p> <ul> <li><a href="http://repo.or.cz/">repo.or.cz</a></li> <li><a href="http://github.com/">Github</a></li> <li><a href="http://gitorious.org/">Gitorious</a></li> </ul> <p>Questions? Comments? Manifestos?</p> <p>Links for direct download:</p> <ul> <li><a href="http://pmade.noscience.net/devfi/2008-08-06.m4a"><span class="caps">AAC</span></a></li> <li><a href="http://pmade.noscience.net/devfi/2008-08-06.mp3"><span class="caps">MP3</span></a></li> </ul> Wed, 06 Aug 2008 00:00:00 +0000 urn:uuid:ad22d2b1-0353-4dd2-b34c-2c51271b8f56 http://devfi.com/articles/2008/08/06/devfi-podcast-3-ndash-promoting-the-project-and-encouraging-participation#comments Podcast http://devfi.com/trackbacks?article_id=devfi-podcast-3-ndash-promoting-the-project-and-encouraging-participation&day=06&month=08&year=2008 http://devfi.com/articles/2008/08/06/devfi-podcast-3-ndash-promoting-the-project-and-encouraging-participation Next Episode Delayed, But Still Coming <p>As you&#8217;d expect, Chris has been a <span class="caps">PITA</span>. He took a vacation, and when he returned he took a new job. We have the content for the next episode, but Chris and I need to figure out how to get together to record the show.</p> <p>Rest assured, the next episode is coming, it&#8217;s just a tad bit delayed.</p> <p>In the meantime, if you have any show ideas, encouraging words, or more likely, criticisms, please post a comment.</p> <p>Oh, if you get the chance, sign Chris up for a few mailing lists, he loves spam.</p> Thu, 19 Jun 2008 21:17:00 +0000 urn:uuid:7042e5cc-a50b-408a-9560-c6ba3a6b0e6b http://devfi.com/articles/2008/06/19/next-episode-delayed-but-still-coming#comments http://devfi.com/trackbacks?article_id=next-episode-delayed-but-still-coming&day=19&month=06&year=2008 http://devfi.com/articles/2008/06/19/next-episode-delayed-but-still-coming DevFi Podcast #2 -- Releasing Open Source Software <p>In our sophomore effort we talk about some of the considerations needed when releasing a project under an open source license. We briefly discuss license choice, hosting your project, and why you might do so at all. We also touch on the expectations that users have once you&#8217;ve released your code, when to release, and how to let people know that you did.</p> <p>In the show, we promise an interview with Ara Howard. When we actually get his answers, we&#8217;ll post them here.</p> <p>If you&#8217;re looking for a comparison of licenses, check some of these links:</p> <ul> <li><a href="http://www.opensource.org/licenses">Licenses at opensource.org</a></li> <li><a href="http://www.onlamp.com/pub/a/onlamp/2004/11/18/licenses.html">Steven Fishman&#8217;s overview</a></li> <li><a href="http://developer.kde.org/documentation/licensing/licenses_summary.html">A simple chart by Zack Rusin</a></li> </ul> <p>We&#8217;ll go back to both using one good microphone next time, when we talk about version control options and encouraging participation in your open source project.</p> <hr /> <p>Downloads:</p> <ul> <li><a href="http://pmade.noscience.net/devfi/2008-05-19-b.m4a">Audio &#8211; <span class="caps">M4A</span></a></li> <li><a href="http://pmade.noscience.net/devfi/2008-05-19-b.mp3">Audio &#8211; <span class="caps">MP3</span></a></li> </ul> Mon, 19 May 2008 09:00:00 +0000 urn:uuid:7d5c0bf1-1e67-4592-a031-bd94d4d406d4 http://devfi.com/articles/2008/05/19/devfi-podcast-2-releasing-open-source-software#comments Podcast http://devfi.com/trackbacks?article_id=devfi-podcast-2-releasing-open-source-software&day=19&month=05&year=2008 http://devfi.com/articles/2008/05/19/devfi-podcast-2-releasing-open-source-software DevFi Podcast #1 -- Buy/Build/Fork <p>In our inaugural podcast, we discuss reinventing the wheel vs. buying a wheel vs. customizing an open-source wheel. When is one a better choice over the others? We tackle that and more.</p> <p>We also have an interview with <a href="http://www.oreillynet.com/pub/au/2999">Dan Berger</a>, long-time Ruby developer, who recently forked the <a href="http://www.ruby-lang.org/">Ruby</a> interpreter, creating the <a href="http://sapphire-lang.org/">Sapphire programming language</a>. His full answers are below:</p> <hr /> <p><strong>Is Sapphire good or bad for the Ruby community?</strong></p> <p>It&#8217;s good for the Ruby community the same way that Perl or Python or any other language is good for the Ruby community. Many languages have ideas that language designers can (and do) borrow. If the features I add to Sapphire prove to be useful and popular, there&#8217;s at least a chance that those features will be merged back into Ruby.</p> <p><strong>Do you see Sapphire as a long-term commitment, and if so, will it be a side- or full-time project?</strong></p> <p>It&#8217;s definitely a long term commitment, and one that I&#8217;ve put off for a long time precisely because I know how much work will be involved. For now it&#8217;s a part time project, because I have a full time job, and that limits how much time I can put into it. I&#8217;d love to work on it full time, though.</p> <p><strong>What specific changes have made [will make] Sapphire more Windows-friendly than Ruby?</strong></p> <p>Several core classes will be refactored, either to take advantage of native system calls or to fix incorrect behavior. This primarily affects the Kernel, IO, File, File::Stat and Process core classes. For example, IO.readlines will use scattered IO for improved performance on large files. File.basename and File.dirname will be fixed to work properly with <span class="caps">UNC</span> and root path names. Several methods in File::Stat that don&#8217;t work or aren&#8217;t supported will be made to work including, shockingly, the fact that File.size breaks on file sizes over 2gb on Windows. The Process.kill method will be improved to use a less brutal termination method. The list goes on.</p> <p>The standard library will see improvements by replacing Unix-only libraries with cross platform solutions or by refactoring existing libraries to become cross platform. For example, the etc library has been replaced by sys-admin, the dbm/gdbm/sdbm group of libraries will be replaced with kirbybase, and open3 will be made cross platform.</p> <p><strong>What sort of projects/developers would benefit switching to Sapphire from Ruby?</strong></p> <p>The sort that would like to have features integrated into the core language that Matz hasn&#8217;t expressed any interest in. I think Ruby is already falling behind languages like Python or Scala. Those languages, and others, have useful features that could be integrated into Ruby.</p> <p>I also suspect that Sapphire will appeal to developers who are unhappy with the way Ruby is being managed and some of the features that are being shoveled into the 1.8.x branch.</p> <p><strong>Are any of your concerns about Ruby being addressed by the 1.9 effort? Or <a href="http://rubini.us/">Rubinius</a>? Or <a href="http://jruby.codehaus.org/">JRuby</a>?</strong></p> <p>When it comes to <acronym title="Matz Ruby Interpreter"><span class="caps">MRI</span></acronym>, other than Unicode support, not really. The primary issues are management and evolution.</p> <p>There is still no real test suite in <span class="caps">MRI</span>. The Rubinius/JRuby spec, while a vast improvement, is still an afterthought among the core Ruby team. Plus, the spec itself is a moving target, especially with some of the major changes that 1.8.7 just incorporated. Mostly it&#8217;s still a case of Matz using the end users as beta testers. There&#8217;s no attention to compiler warnings, which can be significant, and virtually no effort goes into refactoring. That trend isn&#8217;t going to magically stop with 1.9/2.0. The upshot is that the end users are left to find the bugs, usually the hard way.</p> <p>There&#8217;s also the issue of dealing with bug reports and patches in a timely way. They&#8217;re often ignored for months or even years at a time. The same thing has happened with patches. Eric Mahurin&#8217;s array.c patch was the most notable example, which some people may remember from the <a href="http://www.zedshaw.com/rants/rails_is_a_ghetto.html">Zed Shaw rant</a>.</p> <p>When it comes to evolution Matz is moving Ruby in the wrong direction in my opinion. I see a lot of obsession over proc/block/lambda notation and semantics and a bunch of marginal methods being shoveled into the core language. Instead, I&#8217;d love to see some of the evolutionary changes that languages like Scala, Python 3000 and Fortress have implemented, along with some other fundamental changes, but Matz doesn&#8217;t seem interested. We&#8217;ve seen two iterations of the RCRchive fail because Matz ultimately demanded too much of the proposers and eventually lost interest. When he lost interest, so did the community.</p> <p>JRuby and Rubinius (and any other implementatinos out there) necessarily cannot address my issues either, since they are more or less bound by whatever Matz does with Ruby. That&#8217;s a terrible shame really, because I think both the JRuby and Rubinius core members could incorporate some fantastic ideas into the language, such as type inferencing (as Charles O. Nutter did with <a href="http://headius.blogspot.com/2008/03/duby-type-inferred-ruby-like-jvm.html">Duby</a>) or Behaviors from the old Sydney project. But, unless Matz gives the thumbs up, they&#8217;ll have to be side projects. That puts them in a serious dilemma.</p> <p><strong>If Ruby core were to ask to merge your changes into <span class="caps">MRI</span>, would you be willing and would you give up Sapphire?</strong></p> <p>No. It would never happen anyway because my changes require as much ripping out as they do adding in. Furthermore, we have seriously differing opinions about where the language should go and how it should be managed as I discussed previously.</p> <hr /> <p>We&#8217;d like to thank Dan for taking the time to answer our questions, and for open source in general for making project forking a possibility.</p> <p>Join us next week when we talk about releasing an open source project and all it entails.</p> <hr /> <p>Downloads:</p> <ul> <li><a href="http://devfi.com/files/01-buy-vs-build.m4a">Audio &#8211; <span class="caps">M4A</span></a></li> <li><a href="http://devfi.com/files/01-buy-vs-build.mp3">Audio &#8211; <span class="caps">MP3</span></a></li> </ul> Mon, 05 May 2008 13:00:00 +0000 urn:uuid:750fb32d-aa68-4ac9-b0f3-825b0f9777f7 http://devfi.com/articles/2008/05/05/devfi-podcast-1-buy-build-fork#comments Podcast http://devfi.com/trackbacks?article_id=devfi-podcast-1-buy-build-fork&day=05&month=05&year=2008 http://devfi.com/articles/2008/05/05/devfi-podcast-1-buy-build-fork Hello World! <p>No matter how you say Hello World:</p> <pre> printf("Hello, World!\n"); std::cout &lt;&lt; "Hello World!" &lt;&lt; std::endl; print "Hello World!\n" puts "Hello World!" write("Hello, world!\n") echo "Hello World!" putStrLn "Hello World!" io:format("Hello World! ~n"). alert("Hello World!"); (message "Hello World!") </pre> <p>We&#8217;ll have something interesting for you on the DevFi podcast.</p> <p>Chris and I are working on the first episode, with a planned release date of May 5th.</p> <p>Our first topic is going to be on using existing software vs. writing your own. We&#8217;re also going to touch on forking open source projects, and close with an interview with Dan Berger, a long time Ruby contributor who recently forked the language.</p> Thu, 01 May 2008 17:00:00 +0000 urn:uuid:ecae30b9-03a8-45ea-8c2b-af0dc539cbea http://devfi.com/articles/2008/05/01/hello-world#comments General http://devfi.com/trackbacks?article_id=hello-world&day=01&month=05&year=2008 http://devfi.com/articles/2008/05/01/hello-world