.::output >> /dev/null::. : Archives for September 2007 http://blog.vazexqi.com/articles/2007/09.rss en-us 40 where otherwise good ideas go to waste On Screencasts <p><a href="http://blog.jayfields.com/2007/09/are-screencasts-future.html">Jay Fields Thoughts: Are Screencasts the Future?</a>: </p> <blockquote cite="http://blog.jayfields.com/2007/09/are-screencasts-future.html" title="Jay Fields Thoughts: Are Screencasts the Future?">He [<a href="http://nubyonrails.com/">Geoffrey Grosenbach</a>] sent back a few more reasons why he believes in screencasts as good teaching tools. <ul> <li>Efficiency of time: It takes dozens of hours to read a 300 page book straight through. But a screencast can pack the most relevant information into an hour.</li> <li>Passive/Active: You can sit back and pick up whatever elements are interesting to you. Some people say the most valuable part is learning auxiliary shell shortcuts or workflow tips.</li> <li>Graphical/Textual: I don't know any tech publisher who pays an artist to draw helpful diagrams. Screencasts are inherently graphical and it makes sense to include a few diagrams that explain the topic better than paragraphs of text would.</li> </ul> </blockquote> <p> I have been experimenting with doing screencasts for the class that I am a teaching assistant for. As far as I know, no other classes have been using this approach. I suspect that the HCI classes might use them but I have yet to verify that. </p> <p> Like the quote above, I believe that certain things are easier explained and demonstrated through screencasts. For instance, I started the first screencast for the class to illustrate how to handle resolving conflicts during a wiki edit. For people who have never used a wiki before, handling conflicts during an edit can be a confusing task. Especially if they have no idea what to do and why a conflict would occur. And so, they tend to ignore the conflict warning and erased a previous person's edit. </p> <p> After some students inadvertently destroy previous edits on the wiki, my initial thought was to write a short article on how to prevent this from happening in the future. It would have to contain numerous screenshots to actually show what was going on at each step. And then I realize how long it was going to be. Moreover, it would be hard to actually describe the conflict. Instead I opted for a screencast approach. </p> <p> I opened two browser windows side-by-side and edited the same page on the wiki. I then had one browser commit earlier than the other to simulate a conflict. From there I just recorded what I needed to do to resolve the conflict. The video took about 3-5 minutes and I was able to show the real scenario and what actually happens. I did not use audio in this screencast but opted to use the "show text" feature of Quicksilver to type out important messages as the video progressed. I think it worked well. </p> <p> I am also a fan of using <a href="http://en.wikipedia.org/wiki/Pattern_language">pattern languages</a> to describe best practices. So over this week (hopefully) I will have a set of screencast patterns done. I have already drafted the patterns map out and how each pattern related to another. I will admit that I am not expert in making screencasts but I have seen enough of them that I can tell which are good and which are confusing. I think my screencasts still fall into the category of the latter and would need some work on :) </p> Sun, 30 Sep 2007 18:49:18 -0700 urn:uuid:77b6046f-5d75-463c-8c8f-34c2e0a591dc http://blog.vazexqi.com/articles/2007/09/30/on-screencasts#comments college stuff http://blog.vazexqi.com/articles/2007/09/30/on-screencasts Metrics and Code Coverage in Eclipse 3.3 Europa <p> This is actually something that I spent two days on trying to get to work properly. There were a couple of variables that made this harder than necessary: the documentation on getting the latest version of <a href="http://www.eclipse.org/photran/" title="Photran - An Integrated Development Environment for Fortran">Photran</a> to compile was a bit out-dated (we need the latest version of the CDT from HEAD for the tests to run) and the fact that we are switching to Eclipse 3.3 which might not work well with all the plug-ins out there. </p> <p>The plan was to run some metrics and code coverage measurements on the Photran code base. Using the data that we gathered we could evaluate sections of code that needed refactoring and/or testing. We could only use free tools since we wanted the students to be able to run them on their own computers. Naturally, if we did not have this <em>major</em> restriction we would have chosen some better commercial tools.</p> <p>The <a href="http://eclipse-metrics.sourceforge.net/" title="Eclipse Metrics Plugin - State Of Flow">State of Flow Metrics</a> was the first one I tried but it does not do a good job. The UI and visual feedback were so bad that I did not even know if it was working. So, I ran the tool on a smaller project; it completed the analysis. However the information it provides is not presented intuitively. Instead it adds a little icon on the left margin of the editor that does nothing more than indicate that it had analyzed that method. Then the data is presented in the <em>Problems</em> view along with all the other errors and warnings. For small projects, this is fine but for larger ones with 100s (or 1000s like the CDT) of warnings, you <strong>cannot</strong> even determine which are warnings from the metrics tool (vs warnings from the Java compiler). So this is pretty much <strong>useless</strong> for large projects or workspaces with 1000s of warnings. It has an export feature that is supposed to export the data to HTML and CSV forms but it refuses to complete for me. </p> <p>The second <a href="http://metrics.sourceforge.net/" title="Metrics 1.3.6">metrics</a> plug-in I tested was much better. It had failed to work the first time I used it because it was not able to access the data that it had collected from the analysis. However, after upgrading to the latest version of Eclipse 3.3 (Version: 3.3.1 Build id: M20070921-1145) this problem vanished. </p> <p><img src="http://metrics.sourceforge.net/view.gif" width="400" height="218" /> <br /> <small>Metrics view using the Metrics Eclipse plug-in</small> </p> <p> So, now we needed a code coverage tool or more specifically one that could analyze the tests that have been written for Photran. This is <em>slightly</em> more tricky. We need code coverage tools that can measure coverage on <strong>JUnit plug-in tests</strong> (vs the normal JUnit tests). JUnit plug-in tests must <a href="http://dev.eclipse.org/newslists/news.eclipse.tptp/msg02546.html" title="[news.eclipse.tptp] Junit headless plug-in testing code coverage?">launch</a> an instance of Eclipse to successfully execute to completion. So a majority of the test coverage tools mentioned <a href="http://java-source.net/open-source/code-coverage" title="Open Source Code Coverage Tools in Java">here</a> cannot do a decent job. </p> <p> For instance, in Photran, if you just ran the normal JUnit tests there are only 125 such tests vs 1566 if you run the JUnit plug-in tests. So the coverage is going to be low for the former execution. </p> <p> There was only one free tool that I could find that offered support for measuring JUnit plug-in tests: <a href="http://www.eclemma.org/" title="EclEmma - Java Code Coverage for Eclipse">EclEmma</a>. The first time I installed EclEmma it corrupted my entire workspace and I had to restore everything from the repository. I installed EclEmma again today on the latest version of Eclipse 3.3 and I <em>think</em> I know the proper way to invoke it so that it will not corrupt the workspace: always create two different run configurations and never mix them. So, when running the Photran, you should always create 2 configurations &mdash; one that EclEmma will run and one that normal Eclipse will execute without coverage. And the workspace should also always be cleaned after running EclEmma. </p> <p> <img src="http://www.eclemma.org/images/screen.png" width="450" height="352"/> <br /> <small>EclEmma code coverage in action. </small> </p> <p> I believe that the Eclipse update fixed something to make EclEmma work properly on Mac OS X. Yesterday, there was no clean separation of an EclEmma run-time from a normal run-time. In fact, both of them were always merged in the same dialog. This could be why the workspace was being corrupted since EclEmma's instrumentation was replacing the normal ones.</p> <p> Bottom line, if you want to a good metrics and code coverage tool, go with the Metrics and EclEmma plug-ins. Of course, if you can afford it, go for a commercial tool like <a href="http://www.atlassian.com/software/clover/" title="Atlassian Clover &mdash; Code Coverage Analysis">Clover</a>. </p> Sun, 30 Sep 2007 16:50:44 -0700 urn:uuid:6dd8229b-02cb-4e42-90e2-44bcaba90cb1 http://blog.vazexqi.com/articles/2007/09/30/metrics-and-code-coverage-in-eclipse-3-3-europa#comments eclipse development http://blog.vazexqi.com/articles/2007/09/30/metrics-and-code-coverage-in-eclipse-3-3-europa Crimes Against Logic <img src="http://www.mhprofessional.com/covers/Jpeg_140-wide/0071446435.jpeg" alt="Crimes Against Logic" /> <p> After reading the <a href="/articles/2007/08/23/would-you-call-the-1-800-number-on-a-soap-bar"><em>Tipping Point</em></a> by Malcolm Gladwell, I have been slowly following a trail of books that were part of the "Customers Who Bought This Item Also Bought..." list from Amazon. And I can say that this approach seems to work quite well. All the books that I have picked up so far have been really enjoyable. </p> <p> This method of choosing new books to read also has it drawbacks -- mainly that I am only reading the same sort of things over and over. However, while browsing for the book at the local Borders (I am a member so I get 20% discount coupons each week to buy some new book) I also see some other books that are interesting and would be buy them once I run out of recommendations to read. One that has caught my fancy is <a href="http://www.amazon.com/Zen-Art-Motorcycle-Maintenance-Inquiry/dp/0060589469/"><em>Zen and the Art of Motorcycle Maintenance</em></a>. </p> <p> I have almost completed <a href="http://www.amazon.com/Freakonomics-Revised-Expanded-Economist-Everything/dp/0061234001/"><em>Freakonomics</em></a> and while it is an interesting read (full of unexpected outcomes) it does not warrant any real blogging on my part. In fact, I find those stories to be more entertaining -- think of coffee table conversations material with someone whom you have just met -- but not really useful in any other sense. I have some reservations toward the anecdotes in the book since there isn't enough proof to convince me of their credibility. Again, like I said, it's a book worth reading just to stump your friends on some aspect of life in the US. </p> <p> But <em>Crimes of Logic</em> by Jamie Whyte is something different. And did I mention that this book is thin, being around 130 pages, so you don't have to make a great commitment to read it. Probably all you need is about 4 hours before bed time. And since the chapters are short and non-continuous, you could easily read one or two during the times you are free and the book will still feel coherent. </p> <p> Compared to <em>Blnk</em>, <em>The Tipping Point</em> and <em>Freakonomics</em>, there are no out-of-the-box anecdotes that would stump most people. In fact, Whyte uses only simple examples that everyone has probably heard about through the media. And using this simple examples, he points out logical fallacies about them! And he writes with such clarity that it is impossible to miss the punch-line at the end of each chapter. And when you get it, you would be thinking to yourself: how did I fall for that in the first place?! </p> <p> I was surprised too that I had fallen for some of the logical fallacies while reading the newspaper or listening to the news. In fact this was <em>really</em> surprising. When I read academic papers, I tend to be more critical in my reading and can detect if certain sections are there just to finagle the reader into believing the paper. On the other hand when I read a non-technical article such as an article in a magazine or the newspaper, sometimes it feels that I just turn off part of my brain that does logical thinking. Yes, this is a very illogical thing to do since fallacies present themselves in all forms of writing and they especially abound in journalism. </p> <p> So why does my logical side of my brain turn itself off? Probably because I don't really care about the news that much so I cannot be bothered to analyze it. Or more likely that I had somehow succumb to the journalistic writing style that favors gossip and shenanigans such that those elements seem more interesting than the gist itself. Whatever the reason, Whyte has certainly produced a nice little catalogue of common fallacies that people commit and how to detect them. </p> <p> Now all he needs to do is convince the people who commit such fallacies to read them. </p> Sun, 30 Sep 2007 13:54:59 -0700 urn:uuid:2963ed4b-bdf7-403d-8097-90eb94363946 http://blog.vazexqi.com/articles/2007/09/30/crime-against-logic#comments paradigm readings http://blog.vazexqi.com/articles/2007/09/30/crime-against-logic