News for hackers. Stuff that matters.
Re:WhiteHouse.gov Releases Open Source Code by metachris on Wednesday April 21, 2010 @06:21PM (#1283374)
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.

Re:WhiteHouse.gov Releases Open Source Code by erlanger on Wednesday April 21, 2010 @07:15PM (#1283499)
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 protected]> 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

Re:WhiteHouse.gov Releases Open Source Code by jordanb on Wednesday April 21, 2010 @09:21PM (#1283770)
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.

Re:WhiteHouse.gov Releases Open Source Code by DrSprout on Wednesday April 21, 2010 @09:42PM (#1283817)
>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.

Re:WhiteHouse.gov Releases Open Source Code by endlessvoid94 on Wednesday April 21, 2010 @07:34PM (#1283540)
Criticizing the quality of open source code is a little weird, isn't it? Contribute a fix and make it better. This is a huge step.
Re:WhiteHouse.gov Releases Open Source Code by erlanger on Wednesday April 21, 2010 @07:47PM (#1283565)
Surely the foremost benefit of governmental transparency is the opportunity to criticize...I don't think that code is somehow excluded from this.
Re:WhiteHouse.gov Releases Open Source Code by derwiki on Wednesday April 21, 2010 @08:13PM (#1283631)
I disagree that "opportunity to criticize" can be seen as a benefit. "Opportunity to help" seems like the biggest benefit.
Re:WhiteHouse.gov Releases Open Source Code by erlanger on Wednesday April 21, 2010 @08:43PM (#1283695)
The government is accountable to us, and we subsidize this work.
Re:WhiteHouse.gov Releases Open Source Code by pak on Wednesday April 21, 2010 @09:15PM (#1283758)
But your criticisms primarily address portability and well-packagedness which was probably not an original design requirement. Now that it is open source it may be an issue, but is it a valid target issue for tax dollars?

I believe this is an appropriate point for the community to step in.

These aren't worthless modules either; they all address needs that core Drupal lacks. Node Embed particularly sounds useful to me.

Re:WhiteHouse.gov Releases Open Source Code by erlanger on Wednesday April 21, 2010 @09:56PM (#1283856)
If open-sourcing becomes policy, I just hope there's better stuff to show than this (which I'm sure there is). Until then, the effort seems token.
Re:WhiteHouse.gov Releases Open Source Code by bmelton on Wednesday April 21, 2010 @09:10PM (#1283746)
It's a minor nit to pick, but I believe the majority of this was done pre-election, and hence, paid for out of campaign dollars. That isn't to say that some of us didn't pay for it, but the initial development of these plugins was almost certainly not done with taxpayer money.

If you're ever in the DC area, I'll be more than happy to depress you with all of the ways in which taxpayer money is all but thrown away by the millions, but in this particular instance, I think we're okay.

Re:WhiteHouse.gov Releases Open Source Code by ummyea on Wednesday April 21, 2010 @07:52PM (#1283575)
you don't get open source, do you?
Re:WhiteHouse.gov Releases Open Source Code by cwisecarver on Wednesday April 21, 2010 @06:30PM (#1283397)
They should do is with all unclassified govt software. American tax dollars paid for it why shouldn't everyone be able to use it?
Re:WhiteHouse.gov Releases Open Source Code by Avshalom on Wednesday April 21, 2010 @06:41PM (#1283418)
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.
Re:WhiteHouse.gov Releases Open Source Code by ggruschow on Wednesday April 21, 2010 @08:37PM (#1283686)
I was told my work could be requested under the FOIA when I programmed for the army.
Re:WhiteHouse.gov Releases Open Source Code by arst on Wednesday April 21, 2010 @09:04PM (#1283732)
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.
Re:WhiteHouse.gov Releases Open Source Code by acdha on Wednesday April 21, 2010 @11:41PM (#1284061)
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.
Re:WhiteHouse.gov Releases Open Source Code by adolph on Wednesday April 21, 2010 @10:32PM (#1283917)
Yes, an example is Vista. It is electronic medical record software for the Veterans Affairs department. See:

http://en.wikipedia.org/wiki/VistA

Re:WhiteHouse.gov Releases Open Source Code by elblanco on Wednesday April 21, 2010 @09:12PM (#1283751)
Many times, those pieces of software integrate with commercial third party components. In most of those cases, the government produced software is basically just glue to bind together lots of libraries.

In other words, it would likely be useless.

Re:WhiteHouse.gov Releases Open Source Code by ibsulon on Wednesday April 21, 2010 @07:50PM (#1283570)
Well, that's how Expect became public domain...
Re:WhiteHouse.gov Releases Open Source Code by natfriedman on Wednesday April 21, 2010 @06:44PM (#1283426)
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...

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

Re:WhiteHouse.gov Releases Open Source Code by blasdel on Wednesday April 21, 2010 @09:08PM (#1283744)
But they're derivative works of Drupal, which is GPLv2: http://drupal.org/licensing/faq
Re:WhiteHouse.gov Releases Open Source Code by jluxenberg on Thursday April 22, 2010 @12:51AM (#1284206)
So maybe that means they can't write code for Drupal?
Re:WhiteHouse.gov Releases Open Source Code by protomyth on Wednesday April 21, 2010 @06:52PM (#1283441)
The contractor clause is because of the military.
Re:WhiteHouse.gov Releases Open Source Code by dirkstoop on Wednesday April 21, 2010 @07:32PM (#1283534)
But it sure comes in handy for other stuff.

If the contractor clause is not applicable to this work even releasing it under the GPL is questionable, because that's most decidedly not the same as releasing it to the public domain.

Re:WhiteHouse.gov Releases Open Source Code by jrockway on Thursday April 22, 2010 @12:45AM (#1284193)
I'm not sure they have the choice about whether or not to GPL it. They are building on GPL'd code, which means their code must be GPL'd. Perhaps there's a formal way to say, "we won't go after you if you use our code against the terms of the GPL, but we can't control what Drupal does".
Re:WhiteHouse.gov Releases Open Source Code by protomyth on Thursday April 22, 2010 @10:37AM (#1285178)
or they can't use GPL software because of the license....

They really need to obey the law and should have an actual statement about how this works.

Re:WhiteHouse.gov Releases Open Source Code by stilist on Wednesday April 21, 2010 @10:35PM (#1283924)
Still, it’s the sort of unforseen problem you want to have.
Re:WhiteHouse.gov Releases Open Source Code by rlpb on Thursday April 22, 2010 @06:43AM (#1284676)
> 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.

What if the works are derivative of works licensed under the GPL?

Re:WhiteHouse.gov Releases Open Source Code by rbanffy on Thursday April 22, 2010 @08:17AM (#1284827)
I would suppose the diff is public domain while the original retains its protection.

Otherwise, every document produced by the US government derived from another document would put the original under public domain.

Re:WhiteHouse.gov Releases Open Source Code by JairusKhan on Wednesday April 21, 2010 @07:14PM (#1283495)
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
Re:WhiteHouse.gov Releases Open Source Code by th on Wednesday April 21, 2010 @06:57PM (#1283452)
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
Re:WhiteHouse.gov Releases Open Source Code by orangecat on Wednesday April 21, 2010 @06:37PM (#1283409)
Not generally a fan of the Obama administration, but this is very cool.
Re:WhiteHouse.gov Releases Open Source Code by mcantelon on Wednesday April 21, 2010 @07:07PM (#1283481)
Nice to see them release some software. Would also be nice to see them release some human beings (i.e. Guantanamo).
Re:WhiteHouse.gov Releases Open Source Code by iamdave on Wednesday April 21, 2010 @06:15PM (#1283365)
This is absolutely awesome
Re:WhiteHouse.gov Releases Open Source Code by superjared on Wednesday April 21, 2010 @06:19PM (#1283370)
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.
Re:WhiteHouse.gov Releases Open Source Code by macrael on Wednesday April 21, 2010 @06:42PM (#1283424)
Node embed has the same license. What is dupral licensed under?
Re:WhiteHouse.gov Releases Open Source Code by mechanical_fish on Wednesday April 21, 2010 @06:53PM (#1283445)
Re:WhiteHouse.gov Releases Open Source Code by caccount on Wednesday April 21, 2010 @06:33PM (#1283402)
?