Enterprise LAMP

Graham Dumpleton: Going To Singapore PyCon.

It is still a bit over 2 months away, but have organised myself a holiday for Singapore the second week of June. This just so happens to coincide with the PyCon conference being held in Singapore this year. So, as well as getting some shopping done with the family and eating all the great Singapore food, I intend to drop in on the conference talks and also maybe the tutorials. I will be in

Calvin Spealman: Ways Django Can Import Things

How many ways can django import a module?

Grep is hard for this.

In .py files

"import (.*)\..*"
"from (.*)\..* import .*"
"patterns\(['"](.*)['"]"
"url(r?['"].*, ['"](.*)"

In INSTALLED_APPS and other settings.

Am I missing any? Better question: Why do I have to wonder if I’m missing any?

Perl 6 Design Minutes for 24 March 2010

The Perl 6 design team met by phone on 24 March 2010. Larry, Allison, Patrick, Jerry, and chromatic attended. Larry:
clarified that nearly all normal operators autothread, including === and eqv specced the \| parcel parameter syntaxdocumented that R m…

Perl 6 Design Minutes for 17 March 2010

The Perl 6 design team met by phone on 17 March 2010. Larry, Allison, and chromatic attended. Larry:
documented which ops don’t autoclose with *, including assignmentconjectured a generalization of the closure-calling context (value-only lists) that …

Why People Don’t Contribute to OS Projects, and What We Can Do About It – Elizabeth Naramore

Why I care, and you should too.

Many people know that when I can, I help Ed Finkler out with Spaz. I don’t contribute to the code base, but I help with end-user support, and I help coordinate the efforts of other end-user support people. Many people also know that I work with PHPWomen and of our attempts to boost open source involvement with our members through the PHPWomen Partnership Program.

Interestingly, the issues involved with both of these groups overlap. As those in the open source community who either contribute to, use, or advocate open source projects, we understand the importance of keeping them vibrant and active. We understand how great it is to be a part of a growing project we believe in. We understand the benefits of being an active community member. We understand that it not only helps the good of those around us, but it helps us hone our own skills. So what can we all do to get more people to contribute? Even if you aren’t a project lead on an open source project, you don’t want to see it fail. The obligation to keep things going lies within us all.

I get curious about things sometimes, and when I wondered “where is everybody?” I wasn’t sure of the answer. There are so many great opportunities in open source projects. Are people taking advantage of them? Do they even know about them? Do people even care?

What the “research” showed.

Naturally, my first thought was to ask Twitter. So in this completely non-scientific poll, I asked developers who weren’t contributing to an OS project, why they weren’t contributing. At the time of this post, there were responses from 264 people, and I allowed people to choose more than one reason. Of course this is by no means exhaustive, nor is it meant to be a substitute for any real research on the matter. But I think this does give a little insight.

<script src=”http://twtpoll.com/js/badge.js” type=”text/javascript”/><script src=”http://twtpoll.com/badge/?twt=7bcf9g&r=1&s=250&b=1″ type=”text/javascript”/>

Although there are many things that keep us from contributing (including one person who “thinks people like Ed Finkler are scary”), the top three replies, by far, were these:

1. Not enough time.
2. Not sure where or how to contribute
3. I’m not confident enough in my own skills.

Numbers 1 and 2 were no surprise to me. Funny thing about Number 3, though; I added that as an afterthought. It was one reason I personally always shied away from contributing, but I figured surely others were more confident in themselves. I found these results quite interesting, and I’m a bit relieved that I’m not the only self-conscious one out there.

So what?

How can we overcome these obstacles to encourage more participation in our projects?

Let’s look first at Number 1: TIME.

It would be great to have more time. We all need more time. Nobody has enough time. Yeah, yeah. We get it. I don’t foresee that changing anytime soon, so how can we work with this? Here are some ideas for project leaders/devs:

  • Break up big jobs into little jobs. If you need help with documentation, break it into smaller, more manageable chunks. Chances are, you’ll have better luck getting someone to write a one-page doc as opposed to a 20-page doc.
  • Quantify time commitments. I tried being a member of our elementary school’s PTA, but for some reason I didn’t quite fit in with the other moms (long story; I’ll tell you over a beer sometime.). While I still think those people are crazy, one thing I’ll give them credit for is that they know how to recruit volunteers. They tell you up front how much time a task will take. Only then can volunteers make an informed decision about whether they can step up. Much like putting a monetary price on something, you are telling people how much it will “cost” them.
  • Keep time commitments minimal.. Something else the PTA does right, is that they’ve mastered the art of breaking things into 15 or 30 minute increments. They tell you up front “this task will take you 15 minutes” or “we need someone to take carnival tickets for 15 minutes.” And really, who doesn’t have 15 minutes in the day to work on something they care about? (Ok, there may be one guy out there; his comment on the poll was that “his wife would kick his ass for doing something that took away from family time without financial recompense.” He might not really have 15 minutes to spare, poor guy). Even bigger tasks can be broken up per day; 15 minutes a day works out to almost 2 hours a week. Not too shabby.

What about Number 2? UNCLEAR EXPECTATIONS.

People aren’t mind readers; they li

Truncated by Planet PHP, read more at the original (another 2548 bytes)

IronPython-URLs: SharpDevelop 3.2 RC1 – with support for IronPython 2.6.1 RC1

IronPython 2.6.1 will bring some nice performance improvements and some big Unicode compatibility improvements to IronPython 2.6.

The release candidate of SharpDevelop (Windows IDE with superlative support for IronPython) includes support for the IronPython 2.6.1 release candidate.

The first release candidate for SharpDevelop 3.2 comes with updated language support, fixes to various features (eg C# <-> VB.NET conversion), as well as improvements you have asked for in our forums.
The highlights:

  • IronRuby 1.0 RC2 support
  • IronPython 2.6.1 RC1 support
  • Microsoft F#, February 2010 CTP support
  • SHFB 1.8.0.3 support
  • SDR: Absolute and relative filenames for images
  • SDR: Zoom in Report Viewer


PyCharm: PyCharm build 96.18 is available

We’re happy to announce the release of a new build of PyCharm. It includes a number of new features and many minor improvements:

  • Class name completion (completion of classes which haven’t been imported with automatic insertion of import statements), activated by pressing Ctrl-Alt-Space
  • Syntax highlighting and validation for regular expressions in Python code and Django routes
  • Fixed bug which caused PyCharm to be incompatible with PyQt4 and similar libraries
  • Improved completion in Python and Django consoles
  • Improved Django template support, including navigation completion for block names, resolve and completion for custom tags and filters, and quick documentation for tags and filters
  • A number of predefined live templates (snippets) for quickly writing Django templates

You can download PyCharm from the EAP page, or find the complete list of changes for the new build in the Release Notes page.

Parsing XML documents with CSS selectors – Fabien Potencier

html and XML documents are the bread and butter of web developers. On a day to
day basis, you probably create a lot of html documents. And odds are you also
need to parse some from time to time: because you consume a web service and
want to extract some information, or because you want to gather data from
scraped web pages, or just because you want to write functional tests for a
website. Retrieving the document is quite easy, but how do you navigate
through it to extract the information you need?

PHP already comes with a lot of useful tools for parsing XML documents:
SimpleXML, DOM, and XMLReader, just to name a few. But as soon as you
need to extract information deeply embedded in the document structure, things
are not as easy as they should be. Of course, XPath is your best friend when
you need to select elements, but the learning curve is really steep. Even
expressions that should be easy can be complex. As an example, here is the
XPath expression to retrieve all h1 tags that have a foo class:

h1[contains(concat(' ', normalize-space(@class), ' '), ' foo ')]
 

The XPath expression is complex because a tag can have several classes:

<h1 class="foo">Foo</h1>
<h1 class="foo bar">Foo</h1>
<h1 class="foobar bar">Foo</h1>
 

The expression should match the first two h1 tags, but not the third one.

Of course, everybody knows that doing the same with a CSS selector is a piece
of cake:

h1.foo
 

For Symfony 2 functional tests, I wanted a way to leverage the power and
expressiveness of CSS selectors with the tools we already have in PHP. The
first idea that came to my mind was to convert a CSS selector to its XPath
equivalent. But is it possible? The answer is a surrounding ‘YES’.

As John Resig wrote in a blog
post some time ago about the
same topic: “The biggest thing to realize is that CSS Selectors are,
typically, very short – but woefully underpowered, when compared to XPath.”

Writing a tokenizer, a parser, and a compiler able to convert CSS selectors to
XPath is no trivial task. So, instead of reinventing the wheel, I looked for
some existing libraries. I didn’t look too much before stumbling upon lxml, a
Python library. The
lxml.cssselect module of lxml
does exactly this. So, I took the time to translate the Python code to PHP,
added some unit tests, and voilà, the Symfony 2 CSS Selector component was
born.

symfony 1 has a sfDomCssSelector class, but it does not convert the CSS
selector to XPath. It does the job nicely but it is limited to very simple
CSS selectors and it cannot easily be used with standard XML tools.

The Symfony 2 CSS Selector component does only one thing, and it tries to do
it well: converting CSS selectors to XPath expressions. Using it is dead
simple:

use Symfony\Components\CssSelector\Parser;
 
$xpath = Parser::cssToXpath('h1.foo');
 

The $xpath variable should now contain h1[contains(concat(' ',
normalize-space(@class), ' '), ' foo ')]
.

Let’s take an example to see how you can use it. Let’s say you want to
retrieve all post titles and URLs for this blog (the information is available
at http://fabien.potencier.org/articles).

use Symfony\Components\CssSelector\Parser;
 
$document = new \DOMDocument();
$document->loadhtmlFile('http://fabien.potencier.org/articles');
 
$xpath = new \DOMXPath($document);
foreach ($xpath->query"/>

Truncated by Planet PHP, read more at the original (another 3496 bytes)

Mike Pirnat: Exceptions, Error Recovery, and Man Purses

My friend and coworker Aaron Oliver has had a lightbulb moment about exceptions, error recovery, and man purses that Python folks might be interested in reading.

Christian Scholz: Plone Cathedral Sprint Report and interview

Plone Cathedral Sprint

On March 15-19 the Plone Cathedral Sprint happened at the GFU Cyrus AG in Cologne, Germany. Focus was on fixing outstanding bugs in Plone 4.0 (soon to be released) and to start work on Plone 4.1.

The Sprint Team

About 25 sprinters have been on site working on it for 5 days. I took the opportunity to talk to Eric Steele, the release manager of Plone 4.0 for COM.lounge TV:

[audio:http://comlounge.tv/files/cltv49.mp3]
(Download MP3)

Eric was also asking people to perform screencasts on what they have been working on and as videos show more than 1000 words, here are those demos:

ReferenceBrowserWidget Overlays by Tom Gross

(Link to video)

New Search Results by Denys Mishunov

(link to video)

A new UI for Collections by Geir Baekholt

(link to video)

A new discussion component by Timo Stollenwerk

(link to video)

Updates on Plone Events by Vincent Fretin

(link to video)

A Finder for Plone by Robert Niederreiter

(link to video)

There of course has been lots more going on such as:

  • German and dutch translations for Plone 4 (Martijn Schenk and Jan Ulrich Hasecke)
  • Performance Improvements including the storage and handling of image data (Andreas Zeidler and Simon Pamies)

Here are more photos from the sprint and the tour of the bewery by Armon Stross-Radschinski:

A big thanks to the organizers for doing a great job on organizing such a productive sprint!

keep looking »

Warning: include(/home/remarkwit/enterpriselamp.org/wp-content/themes/Enterprise_LAMP/r_sidebar.php) [function.include]: failed to open stream: No such file or directory in /home/remarkwit/enterpriselamp.org/wp-content/themes/Enterprise_LAMP/archive.php on line 23

Warning: include() [function.include]: Failed opening '/home/remarkwit/enterpriselamp.org/wp-content/themes/Enterprise_LAMP/r_sidebar.php' for inclusion (include_path='.:/usr/local/lib/php:/usr/local/php5/lib/pear') in /home/remarkwit/enterpriselamp.org/wp-content/themes/Enterprise_LAMP/archive.php on line 23