Phred's Friends' Journals Phred's Friends' use Perl Journals en-us use Perl; is Copyright 1998-2006, Chris Nandor. Stories, comments, journals, and other submissions posted on use Perl; are Copyright their respective owners. 2012-01-25T01:46:39+00:00 pudge Technology hourly 1 1970-01-01T00:00+00:00 Phred's Friends' Journals Perl hashes in comparison to C, C++, Python and Ruby I just came across <a href="">this blog post</a> which benchmarks several hash implementations in C and C++ including the hashes or Python and Ruby. <br> <br> I was wondering if someone wanted to <a href="">fork the benchmarks on GitHub</a> and add a Perl entry. I haven't done C in a while and I've never done XS, so I'm probably not the best person for that job. <br> <br> Any volunteers? mpeters 2010-03-25T14:47:41+00:00 journal <p>I'm trying to like the new site but every time I try to use it something goes wrong. Every time I try to comment on a post I get this strange error message (It's happened to me every day for at least a week. I decided to ignore the first few times since all sites have problems and it is still beta, but I guess I just got too annoyed today):</p><blockquote><div><p>Comment Submission Error</p><p>Your comment submission failed for the following reasons: Text entered was wrong. Try again.</p></div></blockquote><p>Really? My text was wrong? Do tell, how could it have been made "right".</p><p>Not only is this error message completely unhelpful, but it takes me to a separate page where I have to click my browser's back button to try again. Really? That's so 90's.</p><p>I've tried clearing out any cookies that might be bad for some reason; I've tried changing my content, my name, my url, etc. Nothing seems to work. Anyone know what's going on or have a clue as to how I can fix this?</p> mpeters 2010-02-11T15:35:07+00:00 journal Obligatory giving of Thanks! I'm currently waiting for the turkey and stuffing to cook and am feeling really grateful for lots of things, so I thought I'd share some of my programming gratitude here. In no particular order, I'm thankful for: <ul> <li> <strong>Mark Stosberg</strong> - Not only is he the driving force behind the CGI::App community but he's also great at helping out with important modules that have fallen a little stale (, CGI::Session, Data::FormValidator). He's also been a patient follower and contributor to my Smolder project. </li><li> <strong>Brad Oaks</strong> - Not a CPAN contributor, but the main organizing effort behind and a fellow co-worker. Our technical meetings are good geekery and our social meetings are pretty fun too. Not all of us programmers are good at organizing social things, so I'm glad that he is. Not only is he a good sounding board for my ideas at work but he makes me think of things that I didn't see on my own. </li><li> <strong>Ricardo Signes</strong> - Great speaker, prolific module author and very funny guy. I've had the privilege of hanging out with him at lots of YAPCs and a couple Perl QA Workshops and it's always a blast. His willingness to delve into the abyss that is Email and make it sane (or saner) for the rest of us is enough to earn him permanent Perl sainthood. </li><li> <strong>Perrin Harkins</strong> - mod_perl guru and former co-worker, I really learned a lot from him about architecture, code structure, maintenance and a million other things. He's usually playing with lots of different new toys and sharing all his benchmarks and comparisons so the rest of us can make better decisions. </li><li> <strong>Jim Brandt</strong> - Current President of the Perl Foundation which means he has the hardest thankless job which everybody takes for granted in the Perl community. It's amazing how much gets done in a completely volunteer effort like the TPF and we should all be grateful for his work (and those of past presidents like Allison Randall and Richard Dice). </li></ul><p> I know I've left lots of people off this list, but the turkey needs basting, so I'll leave the rest of the thanks to other people.</p> mpeters 2009-11-26T19:17:19+00:00 journal Help needed on a new 5.10 warning I'm trying to run an existing application on 5.10 for the first time (5.10.0 for right now) and am getting a warning that is not making it easy for me to track down. Any help from the lazy web would be appreciated.<br> <br> It goes like this:<blockquote><div><p> <tt>&nbsp; Variable "$x" is not available at (re_eval 1070) line 1.</tt></p></div> </blockquote><p>I'm assuming this is pretty deep inside some dependency I'm using (of which my application probably has an old version which doesn't play nicely with 5.10). Google is no help here as it returns a lot of CPAN testers results with the same warning for various modules (<a href=""></a>, <a href=";v=10">;v=10</a>).<br> <br> My normal trick of using</p><blockquote><div><p> <tt>&nbsp; $SIG{__WARN__} = \*Carp::cluck;</tt></p></div> </blockquote><p>to get a nice stack trace of where the warning is coming from is not actually giving me a stack trace. Anyone have any extra ideas?</p> mpeters 2009-09-15T21:48:20+00:00 journal What Perl can learn from OpenBSD Will all the talk about trying to improve the Perl core development and release process it's interesting to see what other (non-commercially backed) open source project are doing - <a href=""></a> <br> <br> From the slashdot overview:<blockquote><div><p>Twelve years ago OpenBSD developers started engineering a release process that has resulted in quality software being delivered on a consistent 6 month schedule &#8212; 25 times in a row, exactly on the date promised, and with no critical bugs. This on-time delivery process is very different from how corporations manage their product releases and much more in tune with how volunteer driven communities are supposed to function.</p></div> </blockquote> mpeters 2009-07-17T01:05:59+00:00 journal There is no Perl web hosting problem! <p>I keep seeing people refer to some kind of crisis in the world of cheap Perl web hosting. They talk about ISPs not supporting mod_perl and invoke PHP as an evil horde conquering all hosts.</p><p>Well, I'm fine with PHP, and congratulate it on its success. However, Perl is not in trouble.</p><p>First, for those who do want the full power of a mod_perl installation, or want to choose their own version of perl, their own webserver, etc., virtual hosting with root is available for about $30-$35 a month. That's not much for getting your own box. And yes, there's mod_perl hosting out there too, but I can't see why you'd use it when you can get full control this cheaply.</p><p>But obviously not everyone wants to administer their own system, so for everyone else there is FastCGI. Hosts with FastCGI are available for $5-$10 a month! Even if PHP became available for $2, that wouldn't be enough of a difference to matter. And FastCGI works just fine for perl.</p><p>There are other things you can complain about if you really want to: installing modules on some hosts is not obvious, and configuring FastCGI on some is not well-documented. However, unlike pricing, those are problems you can solve yourself. So please stop with the ISP panic. Perl web hosting is alright.</p> perrin 2009-07-08T13:31:03+00:00 journal My Slides from YAPC Just wanted to post links to my slides from YAPC for the 2 talks I did there. Not sure how interesting they are without my accompanying tenor, but here they are: <br> <br> <a href="">TAP in Depth</a> <br> <br> <a href="">Continuous Integration Testing in Perl</a> mpeters 2009-06-25T16:44:59+00:00 journal Open Source Advertising Just saw this <a href="">announcement on reddit</a>. <br> <br> Please take a few seconds to <a href="">find Perl and Parrot and upvote them</a>. And if you feel like downvoting some other projects, no one would hold that against you<nobr> <wbr></nobr>:) It's a nice way to show them that the un-dead Perl programmers can still click on links. mpeters 2009-06-10T18:27:28+00:00 journal Another perltidy lazyweb request Having been inspired by <a href="">Domm</a> to fix one of my perltidy annoyances (it says something about the greatness of a tool that I keep using it even though there are some annoyances...). <br> I have these<nobr> <wbr></nobr>.perltidyrc settings:<blockquote><div><p> <tt>--indent-columns=4<br>--cuddled-else<br>--nooutdent-long-quotes<br>--paren-tightness=<nobr>2<wbr></nobr> <br>--brace-tightness=2<br>--square-bracket-tightness=2</tt></p></div> </blockquote><p>And I have this code:</p><blockquote><div><p> <tt>Some::Class-&gt;create(<br>&nbsp; &nbsp; {<br>&nbsp; &nbsp; &nbsp; &nbsp; foo =&gt; 3,<br>&nbsp; &nbsp; &nbsp; &nbsp; bar =&gt; 2,<br>&nbsp; &nbsp; &nbsp; &nbsp; baz =&gt; 1,<br>&nbsp; &nbsp; }<br>);</tt></p></div> </blockquote><p>Now I want those opening and closing tokens to be closer together and not waste so much vertical space. So I added this:</p><blockquote><div><p> <tt>--stack-opening-tokens<br>--stack-closing-tokens</tt></p></div> </blockquote><p>Now my code looks like this:</p><blockquote><div><p> <tt>Some::Class-&gt;create({<br>&nbsp; &nbsp; &nbsp; &nbsp; foo =&gt; 3,<br>&nbsp; &nbsp; &nbsp; &nbsp; bar =&gt; 2,<br>&nbsp; &nbsp; &nbsp; &nbsp; baz =&gt; 1,<br>});</tt></p></div> </blockquote><p>Which is fabulous except that the inner args are indented 2 levels (8 spaces) instead of just 1 (4 spaces). So how do I get this?</p><blockquote><div><p> <tt>Some::Class-&gt;create({<br>&nbsp; &nbsp; foo =&gt; 3,<br>&nbsp; &nbsp; bar =&gt; 2,<br>&nbsp; &nbsp; baz =&gt; 1,<br>});</tt></p></div> </blockquote> mpeters 2009-06-09T20:37:41+00:00 journal Do you order your sub definitions? <p>Just curious. I usually try to arrange them so that most calls to other subs in the same file are forward references and the internal subs are defined close to where they are called most prominently. Does anyone else think about this?</p> perrin 2009-04-29T21:11:13+00:00 journal Article about Person duplicate data Just thought I'd mention it since it's in another place: <a href=""></a> mpeters 2009-04-21T18:06:02+00:00 journal Module::Build::Smolder <p>Building off my lastest CPAN release module (Module::Build::TAPArchive) I've just released Module::Build::Smolder. Now if you want to use Smolder in your Module::Build based projects all you need to do is use this new subclass and then you can say:</p><p> &nbsp; &nbsp; $]<nobr> <wbr></nobr>./Build smolder<nobr> <wbr></nobr>...</p><p>The "..." lets you specify which Smolder server the results are sent to and for which project, etc. Both this and Module::Build::TAPArchive are preludes to another big announcement that I was hoping to have done this morning, but looks like it will have to wait until at least later tonight.</p> mpeters 2009-03-30T13:12:45+00:00 journal Module::Build::TAPArchive <p>TAP Archives are nice little packages of your test run that contain all the different TAP streams as well as test suite metadata. It's an easy way to store the results of a test run and then analyze them later. This is what Smolder uses but it's not specific to Smolder.</p><p>While it's easy to use TAP::Harness::Archive yourself to create your own harness it's kind of overblown for small projects. prove -a works, but sometimes you really want it as part of your standard perl Build.PL &amp;&amp;<nobr> <wbr></nobr>./Build test style of work.</p><p>Enter Module::Build::TAPArchive. Just use it instead of Module::Build in your Build.PL and then you can do</p><p> &nbsp; &nbsp; perl Build.PL &amp;&amp;<nobr> <wbr></nobr>./Build test_archive</p><p>It's not doing anything really difficult behind the scenes, it should just make life a little easier for anyone who wants to play with TAP archives.</p> mpeters 2009-03-29T13:45:57+00:00 journal CHI::Driver::DBI released <p>If you haven't seen it yet, CHI is the new replacement for the nice-but-slow Cache::Cache modules. I uploaded a DBI driver for it to CPAN. If you're skeptical of the value, try benchmarking MySQL against memcached. It's pretty close for this kind of thing, and on a local connection MySQL wins by a fair amount. It's also a lot simpler than trying to get memcached or Cache::FastMmap going on some random shared hosting provider.</p><p>I have another driver for IPC::MMA mostly done, which is looking extremely fast. After that will be BerkeleyDB.</p> perrin 2009-03-20T23:36:07+00:00 journal eat your first cookie before asking for seconds I like Gabor a lot and I think his work with Padre is really going to pay off in efforts to attract new blood to the Perl community, but I couldn't read the latest post on his blog without writing this response (he doesn't have comments on his blog, instead he encourages people to respond to him on their own blogs). <br> <br> You should read <a href="">his original post</a> before continuing. <br> <br> Asking TPF to fund 2 more grant ideas when you haven't even finished the last one they gave you is just asking to be rejected. It reminds me of my 5 year old asking for more cereal when he still has half his bowl left. I'm extremely unlikely to get up and get him some more. <br> <br> I've been on the receiving end of the grant process and I know it's really hard to get motivated enough to finish those grants (the money doesn't help all that much). And in his case he admits to biting off a bit more than he can chew with the XS components. So I understand his desire to drop his current grant project. <br> <br> But he should have done that prior to applying for more grants. And even then I wouldn't blame TPF for not accepting him for the next round if he didn't finish his last. <br> <br> Like I said, Gabor is a great guy and really does good work, but I don't think he should see the rejection of his grants as a rejection of Padre by TPF. Instead look at it like they are good stewards watching over the Perl community's coffers and limited resources and being cautious with investments. mpeters 2009-03-05T20:54:09+00:00 journal Perl webapp frameworks: what to explore? <p>I've been working pretty much exclusively in Java for the last few years. However, we have a subproject to do some system/application automation work that's written in Perl. It's currently a CLI tool that allows us to install/upgrade our application remotely, restart the service(s) (the app runs on Solaris), and other fun stuff.</p><p>We're not only expanding its scope, but we're giving it a nice shiny GUI shell via a website. After working for years on Perl webapps I've been out of the loop for years. That can actually be a worse position than not knowing anything, because I have outdated ideas and biases as to how things 'should' work.</p><p>And now we get to my question. It looks like people are commonly using Catalyst, CGI:Application, Jifty. Are there others? And what's the "best" one to use?</p><p>Some constraints/ideas:</p><ul> <li>I hope to not have to deploy an RDBMS, so if a framework requires one it's out,</li><li>Built-in REST support would be nice,</li><li>Gobs of dependencies aren't too scary. We're hoping to deploy this in a Krang-like fashion, entirely self-sufficient and black-box[1],</li><li>Easy to start and easy to maintain (should go without saying, but these shouldn't be a trade-off),</li><li>Team composed of solid Perl folks but webapp newbies or webapp geezer (me).</li></ul><p>Perl is supported at our company for a nifty internal testing/automation suite, some build automation, and probably under-the-radar stuff, but that's about it.</p><p>By comparison, this is a project we're not only hoping will be long-lived, but it will be deployed on servers not in our control (thus the Krang-like deployment above), and used by people (mostly IT staff) not in our control.</p><p>Will they freak out that this is a Perl app? Unknown -- what do you think? (This is IT in healthcare, FWIW.) Do we even need to tell them it's Perl (e.g., "it's a black box")? Unknown, but IMO we likely do.</p><p>Reading the recent 'perl is dying/dead' threads here [on use.perl] also makes me wonder about hiring. Hearing that quality organizations are having trouble finding competent Perl developers is disturbing, whatever the reason. For instance, take <a href="">Grant Street</a>. From what I've heard, they have a solid team that gets to work on pretty interesting stuff, not your typical CRUD tedium. You'd think with that combo they'd attract competent people like honey attracts bears. But they're <b>always looking</b>.</p><p>There's always an argument that you can hire someone smart and they can just "pick up" the language/platform. I think that's true if you have 6-12 months to burn. It's easy to learn a language, even Perl. It's harder and more time-consuming to learn its ecosystem -- which modules to use and not-use, idioms, approaches for common tasks, etc. It's not that these things are <b>required</b> to get things done, it's that the rest of the team will have to go over all of the new hire's work much more closely.</p><p>----------</p><p>[1] Wasn't there a project to extract the Krang build logic into something self-contained? The projects occupying that area of my brain are 'Smolder' (which is aimed at code coverage and reports) and 'Matchstick' (which looks to have been abandoned). Is there something else?</p> lachoy 2008-12-11T22:15:13+00:00 journal Is he talking about JavaScript or Perl? Here's a great quote from Douglas Crockford's "JavaScript: The Good Parts":<blockquote><div><p>The worst features of a language aren't the features that are obviously dangerous or useless. Those are easily avoided. The worst features are the attractive nuisances, the features that are both useful and dangerous.</p></div> </blockquote> perrin 2008-09-12T20:15:33+00:00 journal LD_LIBRARY_PATH trick PART 2 In <a href="">my last post</a> I talked about a trick with setting LD_LIBRARY_PATH in the same script that needs it. Then I ran into some problems with code being run by a <code>perl -e</code> scenario. My new solution (with some help from <a href="">rjbs</a>) is actually even simpler than what I'm doing now. The downside is it's not really portable. Should work for most *nixes and I only really need it to work on Linux, so I'm good. <br> <br> The answer lies in asking<nobr> <wbr></nobr>/proc what command line options I was invoked with:<blockquote><div><blockquote><div><p> <tt>$ENV{LID_LIBRARY_PATH} = '/some/computed/path';<br>exec(split("\0", `cat<nobr> <wbr></nobr>/proc/$$/cmdline`));</tt></p></div> </blockquote></div> </blockquote> mpeters 2008-06-13T18:49:44+00:00 journal Why don't profilers default to wall time? It seems like at least once a week someone on PerlMonks or a mailing list I'm on is confounded by their profiler results. (Recent example <a href="">here</a>.) They look at the output, and nothing seems to be taking much longer than anything else, so they start chasing phantoms like method call overhead. <p>The problem is that they're measuring the wrong thing. Is your program taking too much CPU, or is it taking too much time? If you're running on a computer built in the last decade, it's probably time that's the issue. So why do we profile CPU cycles? </p><p>Nearly every program outside of the scientific community (or other math-heavy situations) is I/O bound. You don't see the I/O when you profile CPU time. It looks like it's not even there. </p><p>I've seen this happen so many times on the Class::DBI, Template Toolkit, and mod_perl lists. People show up all desperate to eliminate every method call or rewrite their templating module in C based on a profile they did. Then you tell them to do one by wall time and they find out that 99.9% of the run time is actually waiting for database calls to come back or something similar.</p> perrin 2008-06-12T19:43:05+00:00 journal LD_LIBRARY_PATH trick I have this problem a lot. I need to link some Perl module against some C library that is not in the standard system libs. Usually this is because it's a locally installed C thingy (like Swish-e or some payment processor API) that I don't want to pollute the system install. Plus it's nice and easy if the whole application is all bundled together. <br> <br> The easy way to do this is to set the <code>$ENV{LD_LIBRARY_PATH}</code> from your shell to point to the right place. But this is a bother, and not to mention really hard to do if you need some dynamic bits to figure out what the right path is. <br> <br> And for security reasons, programs can't set their own local version of <code>LD_LIBRARY_PATH</code> and have it be respected by the system's loader. It has to be done by the calling process (in most cases the shell). <br> <br> This little trick let's a script set it's own <code>LD_LIBRARY_PATH</code> by relaunching the same program with the same arguments as a new sub-process. Simply put a <code>BEGIN</code> block like this in your script:<blockquote><div><p> <tt>BEGIN {<br>&nbsp; &nbsp; if(! $ENV{LD_LIBRARY_PATH} ) {<br>&nbsp; &nbsp; &nbsp; &nbsp; $ENV{LD_LIBRARY_PATH} = join(':', @some_paths_I_need);<br>&nbsp; &nbsp; &nbsp; &nbsp; my $self_cmd = "$^X $0 " . join(' ', @ARGV);<br>&nbsp; &nbsp; &nbsp; &nbsp; system($self_cmd);<br>&nbsp; &nbsp; &nbsp; &nbsp; exit;<br>&nbsp; &nbsp; }<br>}</tt></p></div> </blockquote> mpeters 2008-05-15T23:05:53+00:00 journal perldoc pain You know when you perldoc a module, see what you need in the example code, copy it, paste it into your program, edit it a little, and then... it doesn't work? And you get really strange error messages? And finally you realize it's because the single-quotes or pipes that you pasted are some kind of insane unicode characters rather than the normal ASCII thing they look like? <p>I hate that.</p> perrin 2008-04-15T21:41:57+00:00 journal Oslo QA Workshop and Smolder <p>Smolder 1.21 has just been released thanks to the Oslo Perl QA Workshop and my<br>trip sponsored by and Linpro (Linpro was an amazing host for this event. They gave us free reign of their offices for the whole weekend, free food, drinks and travel). This releases fixes several installation<br>bugs on various platforms and other small bugs. It also adds several new<br>features. The highlights are:</p><p>+ Project categories have now been replaced by the more flexible smoke report tags<br>+ TAP archives can now be downloaded through the UI for a given report<br>+ Graphs can now be done on test run duration if that info was provided in the<br>archive. This was inspired by Ovid's work on the BBC's test suite's run time.<br>+ The default DB-Platform is now SQLite instead of MySQL</p><p>See the changle log for full details.<br></p><p>I was also pretty heavily involved in the group working on the next version of TAP. I have to say that this gave me a new appreciation for standards committees. It's really hard to balance extensibility, backwards compatability and ease of use. Especially with TAP since one of it's goals is being extremely human readable. We definitely made some progress and all of the new, slightly less readable features are completely optional so if authors don't want to use them, they don't have to. But Smolder is going to have fun with all this new information coming it's way!</p> mpeters 2008-04-07T22:02:04+00:00 journal "monkeypatching" considered bananas <p>Who would've thought? A Ruby programmer finally acknowledged that writing code which modifies other people's classes at runtime <a href="">might not have been the best idea</a> for writing maintainable code. He advocates writing and using actual APIs instead.</p> perrin 2008-02-26T06:05:08+00:00 journal Clarification on small teams <p>There's a nice response from Bob on my thoughts on small vs large teams. He raises a bunch of good points, go read 'em.</p><p>Re-reading <a href="">what I wrote</a>, it sounds a bit like I'm a large team guy. People I work with know better: I'm quite the opposite. The largest development team I've ever worked on is what I'm on now -- seven developers, four on the server-side (including me) and three for the application on our wearable device (although we get to steal them sometimes). And one of the server-side folks came on four weeks ago.</p><p>And even at one point when we had the potential of bringing other folks temporarily on the team for our last three months before product intro, I resisted. Primarily because software isn't a generic thing you're building, it only makes sense in a context. And our containx (nursing homes) isn't something you can pickup overnight. So I saw that maybe we could get lots of code produced, but we'd be cleaning it up for the life of the product. </p><p>Anyway, what I wrote was primarily a response what I saw as some naive thinking. When someone says that a team of three people can do anything, I hear "I've never put a system into production." (Yes, it's hugely unfair.)</p><p>But reaction pieces aren't affirmative, they don't really tell you what a person thinks, just what he doesn't think. So here's what I think: small teams kick ass. Products designed and built initially by a small team tend to have a greater cohesion than those built by larger groups, and I think this is an overlooked benefit for maintenance programmers.</p><p>But small teams can by risky, too. Developers tend not to talk about risk because we think we can steamroll over it by heroics and cleverness. You have to be much more careful about hiring -- bad apples spoil any team, but they're immediately fatal to a small team. And it's even riskier if you need to move quickly -- it takes time to find the right people.</p><p>Of course, the alternative is risky as well. Hiring any warm body may seem productive at first ("we hit our hiring numbers!"), but it won't buy you success. And adding warm bodies to a project in trouble is a sure way to tank it.</p><p>A number of the strengths of small teams have a double-edge. For instance: on a small team it's easier to trust everyone, to know that they're going to do their job so you don't need to cover for them. But when something unexpected comes up there are fewer people to deal with it. So people tend to work longer hours. Which isn't so bad for a short time, but that has a bad habit of going longer than anticipated. Not so good for people with families.</p><p>Compared to this, choices among programming languages or even frameworks seem secondary. Or maybe teams choose these things to fit the folks working there? (If they're able.)</p><p>Posted from <a href=""></a>; <a href="">read original</a> </p> lachoy 2007-11-29T06:20:58+00:00 journal Small teams and big jobs <p>Reg Braithwaite has a typically interesting post, <a href="">What if powerful languages and idioms only work for small teams?</a>. As usual I think things are more complex than most of the posters.</p><p>First, most of them completely disregard timeframe. Sure, as Carmack said, "a team of 3 focused and creative people can accomplish almost anything" -- given sufficient time. But time is the knob that many (most?) projects have little control over. Everybody has competitors, and everything needs to get out yesterday.</p><p>Second, most of the comments regard developers only. Does "small team" include QA? People to gather requirements? People to write documentation for users, or even other developers? Or do the developers do those too? (And if they do, see the first item.)</p><p>Third, I think there's a huge distinction between creating something and maintaining/improving it. I agree with Bob that it's possible to <b>create</b> complex software. But what happens when it gets in front of customers? And then when you can no longer count the number of customers on your fingers and toes? And assuming only half of them have potential ideas as to bugs and improvements, who's going to do all that <b>and</b> develop new features to keep up with the Jonses, or those left out from the last version due to time constraints?</p><p>Fourth, the examples brought up during the comments are all tools -- Linux, Delphi, even Quattro Pro. They're generic tools built without regard for any specific business logic. But I'd venture a guess that most developers don't work on such systems. They have to deal with automating processes that have been accreted for years on paper and informally in the brains of the workers. And even then they have to communicate with systems and coordinate not only protocols (which is what tools do) but content, even in the face of stupid implementations.</p><p>And doing all that for non-trivial businesses, with a small team, no matter what language, is a tough job. (Not even mentioning figuring out what it is you're supposed to build.) In a short amount of time? Approaching impossible.</p><p>Posted from <a href=""></a>; <a href="">read original</a> </p> lachoy 2007-11-26T02:31:09+00:00 journal I'm going to the Pittsburgh Perl Workshop, are you? <p>The second <a href="">Pittsburgh Perl Workshop</a> is this weekend, and twice as long as it was last year! There are lots of great talks lined up and even a full day opportunity to <a href="">get your Perl learn on</a>.</p><p>Even if you're not really a Perl person this is a fun time. My Perl status is grandfathered in from earlier jobs and projects so the talks aren't directly relevant to my job. But hanging out with a bunch of smart people together with ideas zipping by a mile a minute is never a bad idea. And throw in free food, you're golden.</p><p>See you there.</p><p>Posted from <a href=""></a>; <a href="">read original</a> </p> lachoy 2007-10-12T13:28:42+00:00 journal MacOS X is a harsh mistress <p>When MacOS X came out, combining things I like about the Mac with Unix, I was tempted. But I waited. I figured I'd give them time to iron out the bugs, time for the hardware to catch up to the new rendering technology, etc.</p><p>Now that Macs are running Intel chips, I figured I had waited long enough, and I bought one of the new iMacs. It's a really nice machine, and except for some glitchy rendering here and there (tooltips that remain on the screen, for example), it's a solid OS.</p><p>However, getting a dev environment that's as productive as Linux has been a real chore. Here are some of the things I've been dealing with:</p><p> <b>Terminals</b> </p><p>You don't expect to spend a lot of time fussing with terminals these days. They should just work, right? Well, I first tried the terminal app that comes with the OS. It had broken key mappings for page up/down, which I fixed. It also makes only a really half-hearted attempt to do X11-style mouse paste, which is really irritating since I'm so accustomed to it.</p><p>I tried an alternative, called iTerm. It has better mouse paste support, but it has broken arrow key mappings. When was the last time you had to fix your arrow keys on Linux? It's like 1997 all over again.</p><p>Both of these seem to confuse my screen session about their terminal capabilities. iTerm does better at showing color (e.g. in man page headings) but both of them cause screen to do its horrific visual bell ("Wuff wuff!") until I manually tell it to use a normal bell.</p><p> <b>Text Editors</b> </p><p>Everyone seems to love TextMate. I do plan to try it, but it's very unlikely that I'm going to pay $80 for a closed source text editor in this day and age. If you're one of those people who loves TextMate and thinks it's worth the money, I'd be interested to hear your reasons.</p><p>I have tried TextWrangler, and found it pretty decent in some ways. I got perltidy wired up to it without trouble, and the SFTP browser is pretty lame, but works. I also like the Emacs key support. However, it has no code folding, and the syntax coloring is pretty weak compared to most Linux editors, like Kate, vim, and Emacs.</p><p>I tried Eclipse + EPIC, which is actually better than I expected. Syntax coloring is nice, and it feels pretty responsive. On the downside, I can't figure out how to make a filter for perltidy to work on just a selected region rather than a whole file. I also can't figure out how to get<nobr> <wbr></nobr>.html files with Mason code in them to switch into Perl mode. And then there's all the project-oriented Java cruft in the menus.</p><p>I tried a promising-looking Emacs port called Aquamacs. It's Emacs with keys remapped to normal Mac bindings, and easy-to-use font menus, separate windows for each buffer, etc. It looked pretty nice, but none of the elisp extensions I want to use (tramp, mmm-mode) seem to work with it. I admit to being a novice at this stuff, but I gave it a pretty good try and couldn't make them work.</p><p>The Carbon Emacs package from Apple worked great with elisp packages. In fact, it's really nice all-around: good syntax coloring from cperl and mmm-mode, tramp for SSH access, easy perltidy integration. The only real issue I've had with it is how poorly it plays with the rest of the Mac. Copying and pasting something from the terminal or Firefox into it seems to require some tricky incantations. I haven't been able to do it without resorting to clicking on menus. I suspect there's three or more different copy/paste systems happening at once here and they are not playing well together. It also took me a crazy amount of effort to change my font size, which is very non-Mac but somewhat expected from Emacs.</p><p>Overall I do like my Mac, but it's disturbing how reminiscent of the early days of Linux this has been. I may resort to running X11 with an xterm and maybe Kate if I can figure out how to get it running. I figure if I have to I can always run a double-boot (or Parallels) with Fedora. If anyone has tips about getting X11 mouse paste to work on the Mac, or taming Carbon Emacs, or getting Kate to run, pass them over.</p> perrin 2007-09-30T23:23:59+00:00 journal Yeah, that me (view image: <a href="">long duk dong</a>) <p>MJD has been working on his <a href="">red flags</a> book for a while, and he's had an open invitation to Perl Mongers groups: he'll speak at your group for free as long as you give him something to talk about. This could be work you'd like to see improved, whatever</p><p>. </p><p>I can testify that in the absence of volunteers he'll find other work. In our case, he happened on the Class::Observable module when he came to Pittsburgh last year. I remember walking in just as they were handing out copies of the source code, and seeing '' at the top: my stomach plummeted.</p><p>Fortunately, he was extremely fair, and it was difficult to argue with any of his choices. The only one I could raise a tiny objection to was naming: I'd used 'update' to mirror the Java <tt>java.util.Observable</tt> interface, and on hearing that's why I chose it he said something like, "Oh, that makes sense." I'd also used a set of awkwardly-named methods like "_obs_foo_bar" but that's because I didn't want them overridden and Perl doesn't give you private methods. (At least, not by default.)</p><p>Unfortunately, I had to bail during MJD's presentation -- not because I couldn't take it anymore, but because it was early on in Barb's pregnancy and I had a strict time limit on how long I could be away from home. (Long story.) And because I came in late I couldn't explain this to MJD, but I figured that Casey, Tom or Rob would have told him I wasn't the shinking violet sort. (I did tell him later in an email.)</p><p>Anyway, I figured that was the end I'd hear of it until the book came out, and given the lead time of HOP I was comfortable with a few years for that. Until I got an email from Rob Blackwell: "You're an international red flag" along with a link to MJD's <a href="">YAPC::EU presentation</a>.</p><p>Ouch. Yeah, that me. But in my defense I think my overengineering tendencies have been greatly curbed in the last few years. And the few recent times at work I've strayed close to the overdesign line I've actually been rewarded when a changed or new requirement came up and it was a piece of cake to handle. We talk about "code smells" like they're so cut-and-dried, but they're not. In everyday work you often get to choose one way of doing things over another, and IMO it's experience with similar choices more than anything else that dictates which one will bear fruit, how successful your choices will be.</p><p>Wish I would have been there to see the whole presentation<nobr> <wbr></nobr>:-)</p><p>Posted from <a href=""></a>; <a href="">read original</a> </p> lachoy 2007-09-16T20:20:35+00:00 journal Which qualities are most important to project success? <p>Straw poll time. Rank these factors in order of how much effect they have on whether or not a project will succeed:</p><ol> <li>Good documentation.</li> <li>Choice of implementation language.</li> <li>Good (and plentiful) hardware.</li> <li>Coding skills of team members.</li> <li>Quality of project management.</li> <li>Automated tests.</li> <li>Clean, well-organized code.</li> <li>Choice of framework or tools (aside from language).</li> <li>Non-rushed deadline.</li> </ol> perrin 2007-09-13T23:14:39+00:00 journal Happy eight months, stinkyface! <a href="">(view image: </a><a href="">Ella the movie star</a>) <p>Eight months ago today we met Ella, and we've been remarkably lucky since. She's growing and learning like crazy that her time with us is both compressed and expanded: it seems like such a short time ago we brought her home, scared and jubilant at this new life, it seems like such a long time ago that she last slept in her swing, or couldn't pick herself up off her back.</p><p>The only way we could be happier is if she picked the winning powerball numbers last weekend.</p><p>Posted from <a href=""></a>; <a href="">read original</a> </p> lachoy 2007-08-27T19:33:01+00:00 journal