CompSci.ca/blog » Open Source http://compsci.ca/blog Programming, Education, Computer Science Fri, 30 Jun 2017 02:31:52 +0000 http://wordpress.org/?v=2.8.4 en hourly 1 Poems in Linux documentation http://compsci.ca/blog/poems-in-linux-documentation/ http://compsci.ca/blog/poems-in-linux-documentation/#comments Mon, 20 Aug 2007 11:00:27 +0000 Tony http://compsci.ca/blog/poems-in-linux-documentation/ Linux: monkey is not running

Programming is fantastic! Programming is full of art, humour, and creativity. Though sometimes it can be a challenge, and sometimes the monkey is not running (image from n#). Still, Computer Science manifests traditional art forms, and the poetry of programming finds a literal place in the Linux kernel.

Linus Torvalds himself contributed to the discussion with a limerick.

There once was a lad from Braidwood
With a wife and a hatred for FUD
He hacked kernels for fun,
couldn’t get them to run.
But he always felt that he should.

The programming themed poetry appeared in, and around the documentation patches for lguest — described as “a simple hypervisor for Linux on Linux”. Though kernel hacks aside, Rusty Russell’s contributing patches were originally met with a bit of skepticism, ironically enough in a form of more limericks.

There once was a man they called rusty
Who patches were terribly crusty
Though his patches were right
And Linus was bright
They sat on the list getting dusty.

All in all, it’s simply an amusing read. Though I like the message involved — “Perhaps this effort, if merged, will inspire others”. Perhaps indeed. Computer programming is an inspirational field, if one is truly interested.

No related posts.

]]>
http://compsci.ca/blog/poems-in-linux-documentation/feed/ 1
Hunting for programmer’s easter eggs with Google http://compsci.ca/blog/hunting-for-programmers-easter-eggs-with-google/ http://compsci.ca/blog/hunting-for-programmers-easter-eggs-with-google/#comments Sun, 08 Apr 2007 05:05:36 +0000 Tony http://compsci.ca/blog/hunting-for-programmers-easter-eggs-with-google/
  • The Open Source gift guide – MakeZine style!
  • ]]>
    Easter eggs

    In this seasonal entry we’ll be hunting for some virtual easter eggs in open source software programs. Computer programmers and software engineers are a creative group, often with a sense of humour, so eggs come in an abundance. Easter eggs, as hidden features, are left for a variety of reasons and come with a varying degree of stealth. Some are left to make a project more personal to a developer, others as a creative outlet in a purely functional piece of software. Many are humourous in nature.

    Our detective gear is simplistic in nature. Take one part Google Code Search, one part Regular Expressions, and garnish with a cleaver keyword. Apparently quite a number of easter eggs are labeled as “easter egg”s in source code’s comments.

    \/\*.*?easter egg.*?\*\/
    Here are some highlights from what comes up:
    FreeBSD is rolling out their Plan-0

    #include "util.h"
    /* easter egg */
    #include "plan-0.h"

    Gaim’s plugin clears up for production, but look around line 506 to turn on bonus features

    /* clear easter egg */
    features->mode = 0;

    It seems that one needs to be Colin’s girlfriend for this last one, but it’s an easter egg in an online bank account management tool. Interesting.

    <?php if (isset($l) && $l==1)
    /* easter egg for my S.O. ;-) */
    if ($JEPUTuserid == 30 && $JEPUTlogin=='clo')

    So here’s an open challenge – can you find a programming easter egg in the wealth of open sourced software? Blog about it (ping me with a trackback), or show off in the comments. Wrote your own easter egg? So have I! I’ll share the details in the comments, if someone talks about theirs first ;)

    Related posts:

    1. The Open Source gift guide – MakeZine style!

    ]]>
    http://compsci.ca/blog/hunting-for-programmers-easter-eggs-with-google/feed/ 7
    Software piracy in schools http://compsci.ca/blog/software-piracy-in-schools/ http://compsci.ca/blog/software-piracy-in-schools/#comments Sat, 10 Feb 2007 03:08:38 +0000 Tony http://compsci.ca/blog/software-piracy-in-schools/
  • Playing catchup with Open Source – Microsoft gives out (more) free software to students
  • French students to get open source software on USB key
  • The Open Source gift guide – MakeZine style!
  • ]]>
    tux the pirate avatar

    There is some buzz in world news on the state of software piracy in schools. Specifically in Russia, where a highly controversial case emerged over the use of a certain Operating System for educational purposes. Considering that Russia has one of the highest piracy rates in the world, the entire situation seems kind of ludicrous.

    a principal of a public school in a small village somewhere in the middle of Russia is accused of using an unlicensed copies of Microsoft Windows on school’s computers, and the penalty could be as high as five years in prison.

    World Trade Organization current members

    Interestingly enough Microsoft wasn’t even the one to initiate this legal action. It is suspected that the Russian government itself is behind the initiative, in a bid to enter the World Trade Organization. Though I’m not about to write on world politics, or economic state of Russian population. My interest is in students.

    Do students pirate software?

    • Students have little disposable income
    • Students don’t see a value in investing in a software license
    • Students are familiar with file distribution networks
    • There is little legal repercussion for highschool students below the age of majority

    This creates a problem with schools using proprietary software to teach courses. If the distribution license does not extend pass the classroom’s lab, each student is thrown into a dilemma at the sight of the first assignment – where to get a copy of the software used? I’ve been to classes that required AutoCAD drawings handed in. That is a $4000 piece of software, and even a greatly discounted student license did not seem reasonable at $400. “I just need to do this homework assignment…”

    What I think should be done

    Open Source Software is often a reasonable choice. Open Office is equivalent to Microsoft Office, is compatible with all major office suites, and is simply free. French authorities recognize this, and promote open source software in schools. Reports, presentations, spreadsheets – check!

    Other times it’s a tradeoff between available software, and software that’s actually being used in the industry. Alfred Thompson writes about choosing a Visual Studio flavour for use in school computer labs. At the student level, Microsoft’s Express Edition products are not too far off from the Professional counter-parts, but are free to use. Students like free.

    So both companies, and educational institutions need to realize that professional industry and students make up two different groups with two different objectives. Students don’t have as much money as industry does, but they want to learn, and industry needs them to learn. The software needs to be more readily available to students, and not force them into obtaining it via other means. That just teaches a bad lesson.

    Related posts:

    1. Playing catchup with Open Source – Microsoft gives out (more) free software to students
    2. French students to get open source software on USB key
    3. The Open Source gift guide – MakeZine style!

    ]]>
    http://compsci.ca/blog/software-piracy-in-schools/feed/ 4
    French students to get open source software on USB key http://compsci.ca/blog/french-students-to-get-open-source-software-on-usb-key/ http://compsci.ca/blog/french-students-to-get-open-source-software-on-usb-key/#comments Sun, 04 Feb 2007 01:15:20 +0000 Tony http://compsci.ca/blog/french-students-to-get-open-source-software-on-usb-key/
  • Playing catchup with Open Source – Microsoft gives out (more) free software to students
  • Firefox for school
  • Software piracy in schools
  • ]]>
    info world

    A recent InfoWorld story has caught my attention: open source software to be distributed to students.

    French authorities will give out 175,000 USB memory sticks loaded with open-source software to Parisian high-school students at the start of the next school year.

    What student doesn’t like free stuff? Though the concept of “free software” might be slightly lost on the Web 2.0 generation kids. BitTorrent makes things “free”. The project’s spokesperson says the aim is to “reduce the digital divide”. Though a fight on software piracy is a more viable theme. Not so much a “fight” as a push of free, open source alternatives, into mainstream use. Excellent!

    The sticks will probably contain the Firefox 2 Web browser, Thunderbird e-mail client, an office productivity suite such as OpenOffice.org 2, an audio and video player, and software for instant messaging.

    The exact software list will be determined by the company winning the contract to supply the USB keys. At $20 per student (the project’s cost), expect some heavy marketing thrown in. Otherwise it looks like at least the entire Portable Apps Suite – not bad.

    It’s a fascinating idea, really. Students get their own, customizable, applications (I need my Firefox extensions), personal data (bookmarks, email), and storage (for assignments and such) – all without being tied in to a specific computer or even a network. Thinking back to my highschool, I would have certanly preferred this over waiting to download my giant roaming profile, and constantly bothering sys-admin for permissions to install software.

    Well if all else fails, it is still a free flash drive, with someone’s logo on top.

    Related posts:

    1. Playing catchup with Open Source – Microsoft gives out (more) free software to students
    2. Firefox for school
    3. Software piracy in schools

    ]]>
    http://compsci.ca/blog/french-students-to-get-open-source-software-on-usb-key/feed/ 2
    The Open Source gift guide – MakeZine style! http://compsci.ca/blog/the-open-source-gift-guide-makezine-style/ http://compsci.ca/blog/the-open-source-gift-guide-makezine-style/#comments Fri, 24 Nov 2006 20:29:19 +0000 Tony http://compsci.ca/blog/the-open-source-gift-guide-makezine-style/
  • Programming an interactive multitouch ibar with vvvv
  • French students to get open source software on USB key
  • ]]>
    Just in time for the holiday shopping season, MAKE Magazine is publishing an “Open Source gift guide” – present ideas in the spirit / theme of Open Source. With my recent involvement into Open Source, this is naturally an interesting read.

    “There are hundreds of gift guides this holiday season filled with junk you can buy – but a lot of time you actually don’t own it, you can’t improve upon it, you can’t share it or make it better, you certainly can’t post the plans, schematics and source code either.”

    Since gifts are generally associated with something more tangeble than lines of code, the guide concentrates on Open Sourced hardware (schematics and parts) and devices or gadgets that run Open Source software.

    free beer as in open source

    An exception to this technology oriented list is Free Beer, that is free as in Open Source. A source of refreshment, confusion, and endless debates on philosophical and economic themes – this is a must get recreational refreshment for my next dorky party with fellow Engineers at the University.

    “The recipe and branding elements of FREE BEER is published under a Creative Commons (Attribution-ShareAlike 2.5) license, which means that anyone can use the recipe to brew their own FREE BEER or create a derivative of the recipe.”

    Cheers,
    – Tony

    Related posts:

    1. Programming an interactive multitouch ibar with vvvv
    2. French students to get open source software on USB key

    ]]>
    http://compsci.ca/blog/the-open-source-gift-guide-makezine-style/feed/ 0
    dotProject Percent Bar Gradient mod http://compsci.ca/blog/dotproject-percent-bar-gradient-mod/ http://compsci.ca/blog/dotproject-percent-bar-gradient-mod/#comments Tue, 21 Nov 2006 18:18:53 +0000 Tony http://compsci.ca/blog/dotproject-percent-bar-gradient-mod/
  • dotProject file icons mod
  • ]]>
    percent bar gradient preview

    Another one for dotProject – an Open Sourced Project Management software that I take interest in.

    Following the theme of my previous mod, the idea is to convey the most amount of information at a glance. Looking at the Project’s Progress (project percent complete) specifically, the best icon is a background bar graph representing the percentage. Alternativly this information can also be described by gradients of colours (colour keys are already used to differintiate between project’s tasks). This implemintation combines both, see preview above.

    The mod itself fits on a single line, so to jump right in, open projects/view.php locate

    <td align="right" nowrap><?php echo $AppUI->_('Progress');?>:</td>

    and replace the line after it with

    <td class="hilite" width="100%" style="border-style: solid; border-width: 1px;"><div style="background: #<?php echo ($obj->project_percent_complete < 50) ? "ff".str_pad(dechex(2.55*2*$obj->project_percent_complete), 2, '0', STR_PAD_LEFT)."00" : str_pad(dechex(2.55*2*(100 - $obj->project_percent_complete)), 2, '0', STR_PAD_LEFT)."ff00" ?>; width: <?php echo intval($obj->project_percent_complete ); ?>%;"><strong><?php printf( "%.1f%%", $obj->project_percent_complete );?></strong></div></td>

    Simple, isn’t it?

    The bar is drawn using CSS styles, so no images are required, and you get real gradient breakdown. The bar itself is a div tag with coloured background. The colour is determined from $project_percent_complete and figuring out where it is between #FF0000 Red and #00FF00 Green. dechex() converts decimals into colour hex, and str_pad() ensures that we’ll end up with a leading 0 if needed.

    Obviously the same idea can be applied to any block-level element holding a percent value. Some other good places to apply this in dotProject would be task’s progress, or assigned users’ percentage.

    Related posts:

    1. dotProject file icons mod

    ]]>
    http://compsci.ca/blog/dotproject-percent-bar-gradient-mod/feed/ 1
    dotProject file icons mod http://compsci.ca/blog/dotproject-file-icons-mod/ http://compsci.ca/blog/dotproject-file-icons-mod/#comments Tue, 14 Nov 2006 23:04:42 +0000 Tony http://compsci.ca/blog/dotproject-file-icons-mod/
  • dotProject Percent Bar Gradient mod
  • The Open Source gift guide – MakeZine style!
  • ]]>
    dotproject icons preview

    dotProject is an open source project management software that I’ve had a chance to work with a lot lately. I’ve gotten to be pretty active on the forums, but this is my first packaged open source contribution.

    I wanted to easily distinguish between various uploaded files, and loading assosiated icons seemed like a neat trick. The preview is on the left. The icons are taken from the Tango Desktop Project – free and open sourced.

    Upon upload, PHP determines file’s MIME type and picks the most appropriate icon. As of this version, 0.4, most of the common generic types are supported (application, audio, image, text, video). Microsoft’s Word, Powerpoint and Excel extensions are recognized as Document, Presentation and Spreadsheet document types. Additionally PDF, archives(ZIP, TAR, TAR.GZ), and web media (HTML, XML) extensions spot unique icons. PostScript files (such as Adobe’s Illustrator and Photoshop) are marked with an image icon.

    dotProject team

    I would like to thank the dotProject developers for comments, suggestions, feedback and support. Especially MacOfTheEast for all his contributions, and suggesting new type definitions.

    Installation

    It is assumed that the user has a clean 2.0.4 stable install.

    Download .tar package and follow instructions in readme.txt. Just a few quick changes. Files affected:

    • dotproject.sql – don’t forget to apply the change to your current database
    • modules/files/files.class.php
    • modules/files/do_file_aed.php
    • modules/files/index_table.php

    ChangeLog

    version 0.4 (November 22, 2006)

    - added text/html, /xml, application/x-tar, /x-gzip, /postscript support

    version 0.3 (November 21, 2006)

    - added application/zip support
    - no longer relies on file_category (it’s a configurable lookup)
    - new generic image (paper-clip)

    version 0.2 (November 20, 2006)

    - include PDF specific MIME type

    do_file_aed.php
    - recognition of PDF MIME type
    - bugfix: file_category was never considered in default fallback

    dotproject.sql
    - ADD/UPDATE files table
    - SQL to update existing file records to include icons

    Enjoy!
    – Tony

    Related posts:

    1. dotProject Percent Bar Gradient mod
    2. The Open Source gift guide – MakeZine style!

    ]]>
    http://compsci.ca/blog/dotproject-file-icons-mod/feed/ 2
    Copyrighting a Programming Language (syntax and other Intellectual Property) http://compsci.ca/blog/copyrighting-a-programming-language-syntax-and-other-intellectual-property/ http://compsci.ca/blog/copyrighting-a-programming-language-syntax-and-other-intellectual-property/#comments Thu, 09 Nov 2006 04:51:08 +0000 Tony http://compsci.ca/blog/copyrighting-a-programming-language-syntax-and-other-intellectual-property/
  • OpenT : A Free Alternative to Holtsoft’s Proprietary Turing IDE
  • The most important programming language
  • You don’t know that programming language
  • ]]>
    Over at the forums we’ve been getting pretty excited over the prospect of an openTuring project, but the current discussions focus more on the legal aspects rather than technical details. So this brings up the question:

    Can one copyright (or gain other intellectual property rights) to a programming language?

    This case study will use Holtsoft’s Turing for the example. Since the only current language compiler is distributed as a commercial product (for a whooping $75 per copy), it makes one wonder what kind of legal protection could possibly apply to the language.

    All of the intellectual property usually falls into one of four categories: patents, copyright, trade marks, and trade secrets. Industrial Design, sometimes in a category of its own, is not in this case applicable. And trade secrets only prevent the disclosure of the secrets, and can’t legally stop me from anything I can make on my own. Lets examine the remaining three types.

    Patents“may be granted for a new, useful, and non-obvious invention”. The IDE or the compiler could have some innovative way of working, and that particular part would be patentable. Though before getting into too much detail, a quick search at CIPO shows that HoltSoft does not own any patents. Besides, a clean room development should avoid any such incidents if the patents existed. Next!

    Copyright“at its most general, it is literally ‘the right to copy’ an original creation”. It usually applies to artistic works such as music, books, and software. Software? Now this is getting a little bit more interesting, but software refers to the IDE and the compiler, not the language. In fact, according to a Idea-expression dichotomy, “a copyright covers the expression of an idea, not the idea itself”. Meaning to say I cannot copy the source code behind the compiler or the compiler itself, but I could express the same idea (compiling the syntax) in a different way.

    Though what about the syntax specifically, can it be copyrighted? At the very basic level, it is just a collection of words. A unique arrangement (source code) could be copyrighted, as it expresses an idea. This brings up the first casualty of the project – Turing’s GUI module. Unlike most other commands, Turing’s GUI is actually written entirely in Turing itself, and is included as a source code attachment. The idea of implementing a graphical interface cannot be patented (it is not non-obvious), but this particular way of doing it is copyrightable.

    The syntax on its own is not. For the most part since programming languages borrow so heavily from each other, that a large subset of keywords has became very common in use. The examples would include if then else, for loop while, function, etc. In fact, Turing’s syntax is based on that of Pascal, the latter of which offers a number of compilers, including a GNU/GPL licensed FreePascal – an open sourced, cross-platform compiler. A role model for openTuring if you will.

    The remaining intellectual property type – trade mark offers perhaps the most viable legal ground. Once again with CIPO, we actually get a match!

    TRADE-MARK:
    TURING
    WARES:
    (1) Programming language software, namely, compilers, interpreters, editors, programming environment software, software for program development, manuals relating to programming languages and documentation relating to programming languages.

    The bold lettered TURING has been in this use since 1984, and Holtsoft has recently (2002) renewed the property. And while the trademark makes no mention of the language or syntax, it covers quite a scope of software used to deal with programming languages. The case here would be that if I refer to any of the above listed types of software as “Turing”, it could be confused for that of HoltSoft’s. Perhaps openTuring shall remain as the code-name only, and we would need to find another dead mathematician to honour.

    Note that this trademark would not prevent me from using “Turing” to refer to the product or the language, it just prevents the naming of software. Though I am rather skeptical of the “documentation relating to programming languages” clause. I can only speculate as to what extend this is actually covered, as I would think that referring to Turing in documentation (say for comparative purposes) is Fair Use.

    The mandatory disclaimer: I do not hold a degree in legal studies, or intellectual property. Though in the process of researching and writing this post, I have convinced myself that usage of a subset of mostly common words for the purposes of expression, cannot be legally restricted.

    Related posts:

    1. OpenT : A Free Alternative to Holtsoft’s Proprietary Turing IDE
    2. The most important programming language
    3. You don’t know that programming language

    ]]>
    http://compsci.ca/blog/copyrighting-a-programming-language-syntax-and-other-intellectual-property/feed/ 1