• About
  • Projects & Research
  • Publications
  • Archives
  • Categories
  • JUnit

    2010 - 02.03

    JUnit is a unit testing framework developed for Java programs. It’s not my favorite thing in the world. For starters, it only tests public methods. Which is a bit of a problem if from a development standpoint; many internal “heavy lifting” methods are not needed by outside classes and should be private. In addition, I cannot use Eclipse, my IDE, to debug as I do with other code.

    For my software engineering course, I am creating a very simple Roman to Arabic numeral converter. (If anyone knows what the unicode character for Roman numeral 5000, a V with a line over it, I would appreciate it for accuracy.) It isn’t the converter program that is important. The purpose is to demonstrate black box testing methodologies: testing without knowledge of the internals of a program.

    I developed a test plan and wrote the test cases in JUnit, as instructed, before proceeding on to writing the actual converter. I then ran my tests. A couple failed and a hand full had an error. I rewrote the code; the class is small enough to justify it, rather than worry about where my sometimes failing  bug was.

    Yet, I still had the same problems. So, I copied the short bits of code into a main() function to use the debugger. The debugger revealed no faults: my system produced the correct output. JUnit had produced a false negative. I didn’t know it could even do that. It did not occur across similar tests with identical assert statements, so I’m not sure what it could be.

    Intellectual Property IV: Public Domain

    2010 - 01.26

    Note: This is from my original blog, written December 2008. This is US-centric. I’ve decided to revive some of them.

    What do Beethoven’s “Piano Sonata No. 14″ (also known as the “Moonlight Sonata”), Frank Capra’s It’s a Wonderful Life, and photographs from the Hubble Space Telescope have in common? In case the title wasn’t a giant clue, these are all works in the public domain.

    Property in the public domain belong to, well, the public. Anyone can use content in the public domain and could create new protected materials from them. Copyrights, patents, and trademarks, once the protection ends, enter the public domain. In addition, works by the United States government (and several other governments) automatically enter the public domain.

    Works created based on public domain content can have their own shiny new intellectual property protections (same as if the work were made from scratch). For example, modern productions of Hamlet are protected under copyright laws despite the play being in the public domain.

    And, seeing as the protections are already covered, here’s a list of places to get public domain content:

    (Also see Wikipedia’s list of public domain resources

    Intellectual Property III: Patents

    2010 - 01.26

    Note: This is from my original blog, written December 2008. This is US-centric. I’ve decided to revive some of them.

    And now to part 3. This is much shorter because I really don’t care much for patent laws.

    Patents are mostly to protect inventions. Patented inventions are protected against other people from making, using, or selling them. Utility patents extend about 20 years, while design patents only last 14 years. Utility patents also require maintenance fees for the 3½, 7½ and 11½ years into the granted period; the patent can be removed then. Patents can be extended, but this is much fuzzier than trademarks: the U.S. patent office chooses if and for how long the extension should be for. Like trademarks, patents must be filed for each country.

    Patents have much more criticism than copyrights and trademarks. These include:

    1. Prevention of new inventions: Pharmaceutical companies notoriously patent chemicals and do no further research with them; this prevents the chemicals to be used for other’s research. (See “Patent trolling“)
    2. Complaints against simultaneous inventions: It’s perfectly possible for two people, with no connections, to invent the same thing. That does not matter for patent law; whoever filed first (rather than finished inventing first) keeps the patent.

    Some interesting aspects of patents, is that they can cover things not covered by copyright, like fashion designs and recipes. It’s still under debate whether software should be patented in addition to copyrighted.

    Intellectual Property II: Trademarks

    2010 - 01.26

    Note: This is from my original blog, written December 2008. This is US-centric. I’ve decided to revive some of them.

    Next up, something I got way to familiar with as an ad major: trademarks.

    Trademarks are the little things that discern one service or product from another, like logos or slogans. (Branding is built around these things. But, that’s a topic for another time.)

    In the U. S., trademarks must be used in commerce before they can be filed. That said sticking a small “TM” (trademark) or “SM” (service mark) next to or on a trademark can be used until it’s registered. Once registered, the trademark will be active for 10 years and can be renewed for 10 years (and then renewed again). Unlike copyright laws, there are not international trademark protections; a trademark will need to be registered for every country it will be in effect for.

    When it’s being registered, a trademark can either be granted to a person or a business/organization. In most cases, it’s wiser to keep it with the person and just license it for a set period. It makes sure that if the company is taken over, closes, etc. that the creator actually gets to keep their creations.

    So, what’s so great about them? Sounds like copyrights would be better. First, many trademarks can’t be copyrighted. Words, phrases, and colors cannot be copyrighted. What’s special about “Puma” or “Good to the Last Drop” or the pink color used for Owens Corning’s fiberglass insulation?

    Even better, knockoffs are also prevented. While there are a variety of mice in overalls, Disney will get involved if there’s something akin to Mickey Mouse, particularly in animation.

    Intellectual Property I: Copyright

    2010 - 01.26

    Note: This is from my original blog, written December 2008. This is US-centric. I’ve decided to revive some of them.

    Alright, I’m a little pissy about intellectual property. Digital content is ridiculously easy to share. For people growing up with digital content, there’s lots of temptation to use readily available materials to be creative (animated music videos come to mind). Uh, yeah. That’s illegal.

    So, I’m going to do a nice series on the topic. I expect something in the format of:

    1. Copyright: protections for creative endeavors.
    2. Trademarks: protecting identifiers (slogans, logos, and colors).
    3. Patents: protects inventions and discoveries.
    4. Fair use: staying out of trouble
    5. Alternatives: public domain and creative commons.

    Copyright protects artistic work including literary, dramatic/choreographed, musical, pictorial/graphic/sculptural, film/audiovisual, sound recordings, and architectural. It should be stated that copyright does not protect ideas, slogans, non-tangible works (like not recording a dance routine), and works that solely use public content (units of measurement, for example).

    In the U.S., copyright is granted to every applicable thing created, but the copyright will need to be registered for legal considerations. Copyright extends 90 years from creation or 120 years from publication (whichever’s shorter). In terms of the owner of the copyright, that’s usually the creator(s). If you were to buy a painting, the artist probably did not also sell the copyrights to it.

    So, what does a copyright protect? These are the exclusive rights that are granted to the copyright holder:

    • To reproduce the work in copies or phonorecords.
    • To prepare derivative works based upon the work.
    • To distribute copies or phonorecords of the work to the public by sale or other transfer of ownership, or by rental, lease, or lending.
    • To publicly perform the work, in the case of literary, musical, dramatic, and choreographic works, pantomimes, and motion pictures and other audiovisual works.
    • To publicly display the work, in the case of literary, musical, dramatic, and choreographic works, pantomimes, and pictorial, graphic, or sculptural works, including the individual images of a motion picture or other audiovisual work.

    Yep. You cannot legally copy and distribute works (no P2P downloads), create works based on a work (like, oh, fanfiction), or have it readily available to the public (damn, no projecting WALL•E onto buildings). These exclusive rights are not dependent on who makes money, so that “no money = okay” excuse can get someone into trouble.

    Alright then, how can there be so much blatant use of copyrighted materials? One option is that someone wrote the copyright holder and was granted permission (more effective for a lone musician than RCA).

    But, in addition to the rights there’s also a list of limitations in copyright. These include: fair use, reproduction by archives and libraries, and creation of an accessible copy for a person with a disability that would not be able to access the material.