
WhiteHouse.gov Releases Open Source Code - Anon84
http://www.whitehouse.gov/tech
======
metachris
Wow, great -- four drupal 6 modules and five links to drupal.org from the
white house!

* Akamai Integration: <http://drupal.org/project/akamai>

* Context HTTP Headers: <http://drupal.org/project/context_http_headers>

* Node Embed: <http://drupal.org/project/node_embed>

* GovDelivery: <http://drupal.org/project/govdelivery>

All released under the GPLv2.

~~~
erlanger
Really they are only open-sourcing GovDelivery. There's a lot of questionable
code in there. Is this really how you'd do this?

    
    
      // the user may have put in an address of the form "Full Name" <email@domain.tld> instead of just the address,
      // so we want to filter to the right address
      function govdelivery_filter_email($address) {
        
        // borrowed from the drupal valid_email_address($mail) function
        $user = '[a-zA-Z0-9_\-\.\+\^!#\$%&*+\/\=\?\`\|\{\}~\']+';
        $domain = '(?:(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.?)+';
        $ipv4 = '[0-9]{1,3}(\.[0-9]{1,3}){3}';
        $ipv6 = '[0-9a-fA-F]{1,4}(\:[0-9a-fA-F]{1,4}){7}';
        
        // setup an array for the matching expression
        $matches = array();
        
        // the regex below is adapted from drupal's valid_email_address($mail) function
        preg_match("/$user@($domain|(\[($ipv4|$ipv6)\]))/", $address, $matches);
        return $matches[0];
      }
    

The module uses MySQL-specific functions (FROM_DAYS, TO_DAYS, FROM_UNIXTIME)
so it is not portable. Relying on these instead of the PHP equivalent makes me
wonder how many other shortcuts are in there.

Several undefined constants are referenced (NAGIOS_STATUS_*).

I'm not sure what's going on in odmService.php.

The module was authored by Chris D'Antonio of Acquia (which we can assume has
a contract with Uncle Sam), aka <http://drupal.org/user/250704>

~~~
jordanb
If you use Drupal much at all, you'll find that, while the core is cross-
database, 90% of contributed modules are MySQL-only. It's what you get when
you don't provide an ORM, I guess.

Internal code is _always_ very specific to the platform upon which it's
installed. It's hard to justify spending time to make software run in
environments you're not using.

Now, there's a school of thought which holds that you shouldn't open-source
something without going through and auditing it for local-isms. There's
another that holds that it's better to get the software out there.

I'm not sure into which of those schools I fall personally, but if getting
this stuff open-sourced was a bottom-up effort, it'd be hard to get the
higher-ups to say 'yes' and then immediately ask them to invest a ton of
developer time on the process.

~~~
DrSprout
>Internal code is always very specific to the platform upon which it's
installed. It's hard to justify spending time to make software run in
environments you're not using.

I'm having a lot of fun with that right now, knowing that we're doing a
migration in the next year or so, but not having a clear path to write my code
so it will carry over to the new platform.

Of course, we still don't have nailed down what that platform will be, but so
it goes. It's just painful to write code you know will be obsolete inside of a
year.

------
cwisecarver
They should do is with all unclassified govt software. American tax dollars
paid for it why shouldn't everyone be able to use it?

~~~
Avshalom
I wonder if source code can be requested under the Freedom of Information Act.
The act only applies to the executive branch but that's still probably a lot
of software.

~~~
arst
I'm not sure of the details, but this may be complicated by the fact that a
lot of government source code was produced by outside contractors.

~~~
acdha
This varies widely but our website code is definitely owned by NASA - they
even run the version control system to make sure that other contractors don't
"forget" to give it to them.

------
natfriedman
Under section 105 of the US Copyright Act, works produced by the US government
are not entitled to domestic copyright protection and are therefore,
essentially, public domain.

IANAL but we've been down this road with the license on the White House flickr
feed.

Apparently this does not apply to contractors - which I find rather
inconsistent.

[http://en.wikipedia.org/wiki/Copyright_status_of_work_by_the...](http://en.wikipedia.org/wiki/Copyright_status_of_work_by_the_U.S._government)

Of course, whether the government actually publishes those works or not is an
entirely separate question. So it's great to see this happening.

~~~
blasdel
But they're derivative works of Drupal, which is GPLv2:
<http://drupal.org/licensing/faq>

~~~
jluxenberg
So maybe that means they can't write code for Drupal?

------
JairusKhan
I've helped the Bank of Canada (which is the Fed of the North) to start
releasing Wordpress plugins:
<http://wordpress.org/extend/plugins/profile/bankofcanada>

------
th
I'm not surprised. All third-party content on whitehouse.gov has been under a
Creative Commons licence since Obama took office:
<http://www.whitehouse.gov/copyright>

------
orangecat
Not generally a fan of the Obama administration, but this is very cool.

------
mcantelon
Nice to see them release some software. Would also be nice to see them release
some human beings (i.e. Guantanamo).

------
iamdave
This is absolutely awesome

------
superjared
The Akamai project they released is licensed under GPLv2. I'm too lazy to find
out the truth, but I suspect the other projects have the same license.

~~~
macrael
Node embed has the same license. What is dupral licensed under?

~~~
mechanical_fish
GPL v2:

<http://drupal.org/licensing/faq>

------
caccount
?

