Give a talk at FOSDEM

So, FOSDEM is approaching. If you don't know what FOSDEM is, it's a very big European technology conference, taking place in Brussels, Belgium. Usually it deals with generic topics, such as "systems administration", "BSD", "GNU", "accessibility" and such, but this time Gabor Szabo was able to secure a devroom specifically for Perl!

This is a great opportunity in presenting Perl both to more mongers, but also to the external geek community (outside of Perl Mongers, CPAN authors, and other Perl community members) and showcase some of our stuff.

People have volunteered and we're going to have a few really cool talks: Moose, Dancer, PEG, Packing Perl, Tracing Perl with DTrace/SystemTap, Template::Zoom, SPORE and Padre are just some of the talks you'll see.

However, we still have a few slots open, so please do submit a talk if you're coming!

And remember, if you see me there, don't be afraid to step up and say hi, because I'll probably be too shy to do it! :)

Update: to submit a talk, contact me via xsawyerx AT cpan DOTT org.

Perlbal - load balancing white paper

I've added a new White paper to Perl.org: Perl load balancer - which is really there to make people aware of Perlbal.

Thanks to a TPF Grant there is now actual Documentation which really makes using it a whole lot easier! I've had this in production for about 4 years now and it's very stable. Being able to change which servers (or ports) your entire sites traffic goes to make gradual rollouts (and quick rollbacks!) very easy. It also makes upgrading your servers far less complex.

If your not already using a web load balancer infront of your web server check it out!

What's "a good book about programming for Unix"?

What's a good book about programming for Unix? In Learning Perl, while showing the file test operators, we say:

Don't worry if you don't know what some of the other file tests mean--if you've never heard of them, you won't be needing them. But if you're curious, get a good book about programming for Unix.

But, we then leave the reader hanging without giving them an idea which book they might. I guess Chapter 4 of Stevens's Advanced Programming in the UNIX Environment might be the answer, but is there something else?

What's New in WebGUI 8 #2: Auth Improvements

Auth changes

WebGUI::Auth was developed as part of 6.0.0, back in 2003. To put that into perspective:

  • Auth predates Facebook, which was founded in 2004.

  • Since Auth, there have been two Summer Olympiads.

  • Auth was written when I was still in college.

Since then, it has not fundamentally changed, though everything about the Internet surely has.

We began our planning for 8.0 with the idea to completely rebuild Auth from scratch, but that quickly got scrapped when we realized both the scope of that project. But since Auth is one of the most visible parts of a WebGUI site for the end-user, who must be able to quickly and simply create an account and log in to participate in the community of your website, we decided to take a closer look at what we could do to improve the Auth API.

What resulted were a series of small changes (and only one break) that has made it far easier to create convenient choices for your users.

Multiple Methods

Using each() to iterate over an array

In perl 5.12, each() - as well as keys() and values() - works on arrays, where previously these functions were restricted to hashes. When iterating over an array, each() returns both the index and the value.

my @x = 50..59;
while(my ($i, $v) = each @x) {
    say "index $i, value $v";
}

will print:

Padre 0.78 has been released - the late announcement...

Well, for those of you who have installed Padre from CPAN recently or who upgrade frequently, will know that Padre is now on CPAN and it's at version 0.78.

I've been rather slow getting back into the swing of things after the Christmas break, so after rolling out the release, I promised to myself that I'd get the announcement done the following night, only to become distracted with pretty much everything and anything else.

So for those of you who actually track changes to Padre via these announcements, my apologies for my apathy.

To be honest, I really thought that development might have taken a bit of a back seat over the break, however the Changes file indicates this isn't the case, even with Adam Kennedy being busy coding on a project in SDL that Kartik Thakore some how goaded him into. ;)

So the quick summary for Padre: "Making Padre play nicer when working with projects on locally mounted remote filesystems" - Adam Kennedy #padre.

A Perl interface for sharktools

Sinan Ünür created a first pass at a Perl interface to sharktools so you can have all the fun of Wireshark right in your Perl program. Why should Java and Python have all of the fun while analyzing network traffic?

I'm paying him to do it because I need it for a project and he's much better than I am at that sort of thing. However, I bet a lot of other Perl people would find it useful, so we're making it open source. Sinan already set up the github repository, and eventually that will make its way to CPAN as Net::Sharktools under the Artistic License.

If you're interested in helping with the project, don't be shy. As with most projects, we can always use help with testing or documentation. I know some of you out there have Wireshark expertise. It doesn't bundle the rawshark stuff (so far). Anyone want to make an Alien distribution for that other stuff?

Template Toolkit and Emacs

I am messing around with Template::Toolkit. Found the Emacs mode for template toolkit written by Dave Cross : https://github.com/davorg/tt-mode

Put the file tt-mode.el somewhere in your Emacs path and add these lines to your .emacs config file:

;; tt-mode
(load "tt-mode.el")
(setq auto-mode-alist (append '(("\\.tt$" . tt-mode)) auto-mode-alist ))
(setq auto-mode-alist (append '(("\\.tt2$" . tt-mode)) auto-mode-alist ))

works like a charm. Thank you Dave !

Caching multi-statement computations using an anonymous subroutine

Suppose that a subroutine gets called several times and that in the subroutine you need to use some computational result that stays the same for every call. You could use a state variable or an our variable.

sub foo {
    # ...

    state $some_value //= ... some computation ...;

    # ...
}

Using the defined-or operator, the value will only be computed the first time the subroutine is called.

But what if the computation takes several statements? You could move it to its own subroutine and call it with a single statement, or you might resort to something like:

Debugging in the (Very) Large

Debugging in the (Very) Large describes Microsoft's challenges in implementing Windows Error Reporting. Those challenges include TBs of data, 1 billion+ computers running WER, and multiple entities accessing that data (anyone that can afford a VeriSign certificate can use WER for their own Windows applications and drivers). Worth a look (hey, it is even a SIGOPS paper).

warnings::unused versus PPI

I had the following in my .bash_aliases file:

alias unused='perlcritic --single-policy ProhibitUnusedVariables'

However, I found a few cases where it didn't work. That's when mithaldu told me about warnings::unused. I installed it locally and ran it on some code which had a case that ProhibitUnusedVariables didn't find:

$ unused $some_module
$some_module source OK
$ perl -Mwarnings::unused -c $some_module 2>&1 | wc -l
34

Whoa! The one area were Perl::Critic modules repeatedly break for me is when I'm dealing with scope issues. It appears to miss where a variable is legitimately declared and used in one sub, but declared and unused in another. It also missed something like the following:

The Puneet of the Dancer Community

There are definitely more and more people involved with Dancer which makes me proud.

Alberto Manuel Brandão Simões (ambs) has been putting a lot of development work into Dancer recently, improving it in ways we haven't even thought about. Flavio Poletti has been also offering some commits, and more importantly, takes the time to help newbies within the Dancer community (successfully, might I add!) and we can see more and more new-comers giving us good feedback and pull requests.

However, as much as all the aforementioned people deserve their own posts for their work (which isn't just the code, but the motivation they give others), this post is about someone else. A person by the name of Puneet Kishor.

Puneet has been a member of the Dancer community for a long while now. He has been writing quite a bit on the mailing list, and raises a lot of inquiries, possible bugs, feature suggestions and general issues such as recommended writing methodologies.

Useful Links

Here are some useful resources.

Khan Academy If you have or know any children who are in school, this is an awesome resource, Sal is an excellent and talented teacher . The video's are ten minutes in length and of very good quality.

This Javascript exercise by John Resig ( Jquery creator) is a good way to learn some advance javascript

This Clojure article is a pretty good way to get your feet wet in getting started with Clojure programming.

If you want to get started with HTML5 this is a pretty good book , You can also order a print version here

WebService::Yahoo::BOSS open sourced

My employer kindly (and prudently) gave me the go ahead to open source our interface to Yahoo's awesome search API. First release version is crude, but it works. Patches welcome. I just pushed 0.03 to PAUSE, so it should be available at a CPAN mirror near you shortly.

What standard for storing people-information?

For a long time now, I've been thinking how to organize my information about people, their addresses, phone numbers and birthdays, their websites and code they've contributed to, codename "Hoover". But there are some problems that always keep me from writing more than the bland user interface I've come up with so far.

The main problem is, that I'm no good with user interfaces. So I'd like to reuse somebody elses user interface and just import the data into it. Perl is good at that. But I'm not aware of a sufficiently good data store with sufficiently nice user interface. There are some proprietary solutions that have good to horrible integration with other programs:

The Windows Address Book is a pain to import and export, and it doesn't support custom properties of contacts.

Thunderbird is fair to automate (through Mozrepl). Adding custom fields is possible, and there are already some premade importers, for example for Gravatar images.

Building my own LDAP schema would be the enterprisey solution, but getting applications to talk to it seems hard. Having only Thunderbird available to read from the LDAP also makes this a solution less desireable.

Ideally, I want a storage format that (I) can synchronize with my mobile phone and automate from Perl, to keep the information synchronized with the interwebs.

Why don't they contribute to open source projects

Recently, on the Israel.pm list Gabor Szabo wrote:

In a recent poll conducted by Elizabeth Naramore people were asked why they don't contribute to open source projects?

He also linked, at the bottom, to Shlomi Fish's article about How to start contributing to or using Open Source Software.

Both articles are a mouthful, and try to be very thorough in the advices and ideas they present. Sadly, both miss the point completely by assuming that "contributing" means "committing code". And this is not only wrong, its part of the reason people hesitate to contribute

For starters, "Open Source" projects tend to be seen as a hard-core programmers-only club, where you have to know how to program (mainly in C/C++), or you have no reason to be there. Seeing that the high profile projects are such complex systems, I can understand how did this image.

My Dist::Zilla and git/GitHub workflow

There has been a bit of discussion recently on the #distzilla IRC channel about how people are integrating their CPAN distribution development with Git, and in particular some of the Dist::Zilla Git plugin(s). I thought it might contribute to a useful discussion if I show how I have things set up.

Like many, I want to host my code on GitHub and then periodically publish to CPAN. Dist::Zilla helps in both these by providing plugins to automatically push releases to GitHub, and then also upload to CPAN.

What bothers some is the stage at which these things happen, and also how the branches and tags are represented on GitHub. In particular, folks might want:

  • a "clean" git branch which tracks CPAN releases
  • another branch which is the "trunk" of development
  • a user browsing the GitHub website to see the CPAN branch (with the README, etc)
  • sane commit messages and tags

Dancer::Plugin::Database 1.00 released

I've just released Dancer::Plugin::Database 1.00 to CPAN. This includes Alan Haggai's patch to supply runtime configuration info to the database keyword as a hashref (thanks, Alan!) which was already released as a developer release, 0.91_01.

I've bumped the version to 1.00 to indicate that I consider it stable and ready for use in production, for those users who mistrust any module with a 0.xx version number.

Role::Basic - what does DOES do?

Over the years it has become abundantly clear to me that people who object to OO fall into two categories:

  1. A handful of people who really understand object-oriented programming.
  2. Wankers with blogs.

Though I don't object to OO, it's still unclear which of the above categories I fall into. I suspect it's not the first.

This brings me to a lovely quote from H. L Mencken, "for every complex problem, there is a solution that is simple, neat, and wrong" (annoyingly, there are tons of subtle variations on that quote. I need to find the original). A "solution" I had in Role::Basic was was simple, neat, and wrong. I'm kicking myself, but my problem was my failure to apply what I thought I had "learned" from the original traits papers.

Looking For A IT Specialist (Perl Required)

All:
The group I manage is severely understaffed and one of my most competent employees has just tendered their resignation.

This blog entry is not an official job announcement. The official announcement will be made available online once it is finalized. I would just like to touch base with anyone who might be interested.

I want to be clear that, though we use perl every day, this is not a "software developer" position. My group works in a technical support capacity doing everything from providing recommendations on architecture and design reviews to writing utilities to extract data from logs. The primary skills that I need are scripting (perl/shell), SQL/stored procedures, trouble shooting/problem solving/critical thinking, Unix (AIX/Solaris) and security concepts/best practices.

The position is in the Baltimore/Washington D.C. area and relocation expenses are not included.

Please contact me if you are interested so that we might touch base.

Cheers,
Joshua Gatcomb
a.k.a. Limbic~Region

About blogs.perl.org

blogs.perl.org is a common blogging platform for the Perl community. Written in Perl with a graphic design donated by Six Apart, Ltd.