The codemash organizers have graciously donated a free pass to the upcoming Codemash conference to be given away to one lucky webdevradio.com listener. To enter in to the drawing, listen to the codemash episode interview podcast on webdevradio with Jim Holmes, follow the instructions, and hope your name is drawn.
Archive for the ‘Perl’ category
Codemash free admission drawing giveaway
December 6th, 2007New podcast up
December 2nd, 2007Latest podcast episode up. I cover feedback from the last episode (thanks on the questions answered everyone!). A few news tidbits cropped up – Perl on Rails, Seaside was brought to my attention, I point over to Paul Spoerry’s blog to a great list of resources for web developers, and I wrap up with a question about what collaborative tools you’re all using.
Listen up and subscribe over at http://www.webdevradio.com
Latest podcast up
November 26th, 2007I put up a new webdevradio podcast last week, day after Thanksgiving (or was it the day before? I forget now). Anyway, I’ve turned on the comments – apparently there was a bug that was stopping it from working – and am inviting more feedback and audio comments from listeners. The podcast is short this time (15 minutes) but I specifically invite comments on two topics. I get a lot of questions on these two, so I opened up the floor instead of just spouting off.
1. For someone just getting in to web development, what should they study/focus on? LAMP? Java? .NET? Rails? Flash? What would you recommend and why?
2. What are some good resources for learning advanced PHP, and more specifically good PHP OO practices?
There’ve been a few good responses already at http://www.webdevradio.com, but more are always appreciated, either text or audio (just upload an mp3 file!)
Thanks!
Looking for book reviewers
October 10th, 2007Specifically of technical books. I’ve got a small backlog of books I wanted reviewed for techbookreviews.com. I thought I had more time than I did, but I don’t (isn’t that always how it goes?). So, in the interests of time and getting other people besides myself involved, I’d like to invite some of you to help. I’ve done the first experiment, and it’s turned out pretty good so far. In return for reading through a technical book (such as a PHP, Javascript, Ruby, .NET or other book) and providing a review of anywhere from 500-1000 words, you get a free book, your review posted at techbookreviews.com, and some pay. I’ve not firmed this up yet – it’ll probably decide on the size of the book to some extent, but either a paypal xfer or amazon certificate for $5 or $10.
If you’re interested in participating, send me an email to mgkimsal@gmail.com with your name, mailing address, a list of technologies you’re interested in reviewing, and ideally links to some writing samples. I currently have books on C# and Javascript and DotNetNuke and possibly Ruby in my backlog, and more are in the pipeline.
Looking forward to hearing from you all!
Linux distros – does personality matter?
July 26th, 2007I got a question from my brother the other day about why Mandriva wasn’t as well received as a distro. It’s his primary distro, and was mine for about 2 years. I don’t think there’s all that much ‘wrong’ with it, but I went to ubuntu about 2 years ago, mostly to ride the momentum (packaging of current projects, primarily). One key thing that struck me about Mandriva (formerly Mandrake) compared to ubuntu, redhat/fedora, gentoo, debian, slackware and others is that there’s no core personality behind Mandriva.
There’s not behind fedora anymore, but redhat was (in my mind) synonymous with Bob Young. Slackware = Patrick V. Ubuntu = Mark Shuttleworth. Debian = Ian (Murdock?) Gentoo is/was Daniel Robbins. For better or for worse, the early adopters of these distros often feel a connection with the personality behind the project. It’s the same with many popular open source projects in general. Linux=Linus. Perl = Larry Wall. PHP=Rasmus. Rails=DHH. MySQL=Monty. Even though many people complain about his, DJB’s tools (dns, qmail, etc) are widely adopted often *because* of his personal views on competing software, bugs, development and so on. Compare some of these tools and their passionate adoption rates vs Java. Java might = James Gosling in some sense, but I never saw as much passion around Java adoption as around the LAMP stack. Java just felt too ‘corporate’ (not just to me but to many I’ve spoken with during the early->mid ‘net years – ’96-> early ’00s)
Obviously it’s not the same for *all* distros and projects. However, having a recognizable personality/face/name with a project will, I believe, boost its popularity. Am I barking up the wrong tree? Are these wholly coincidental, or is there a causal link between these concepts?
Do you ever cut corners?
May 29th, 2007This is a general question, but possibly aimed at the PHP crowd more because it’s often easier to cut corners when doing development than in other languages.
“Cutting corners” can mean almost anything from skipping unit tests to skipping documentation to lax variable names to almost anything that you know isn’t optimal but you skip for one reason or another. What corners do you ever cut, and what are your reasons?
My own corners tend to be unit tests. Some projects I write them before (rare), some projects I write them after (rare as well) and some projects I don’t use them (majority). There are two primary excuses I use but they both come down to time. For example, at work, the primary project I’m maintaining is un-unit-testable (is that the proper way to write that?). The time it takes to refactor even small portions which any new code I’d write touches is often beyond the time allocated for the thwork. I did make some headway last year in refactoring some sections of the code to make some of the core libraries testable, but I was pulled off that work for another project. Basically, in that case, it boils down to the notion that the company itself doesn’t value testing as much as getting code out on o the floor in to production, nevermind the notion that future changes become that much more difficult and we end up with less confidence in the production code. It’s been a slow evolution to this point, and it’s like we’re the frog in boiling water – the water’s come to the boil only gradually.
I had this idea some time ago that the ‘strongly typed’ platforms such as Java and .NET made unit-testing a breeze, but my view now is that regardless of the language, the notion of having components testable is something that needs to be designed in from the ground up. Java and .NET seem to make refactoring existing code in to testable code much easier, though (“Refactor! Pro!” was simply amazing when I saw a demo).
So, if you ever cut corners on your projects, what do you cut and why?
Someone’s anti-php rant…
October 8th, 2006Wow… via Patrick Mueller @ IBM I found a post on techrepublic stating that ‘PHP is doomed’. Patricks’ response is done pretty well, but I thought I’d add a few observations as well.
The original poster’s point that PHP is doomed stems from a lack of threading model in PHP. While I’d say that PHP might benefit on the whole from having a threading system in place, it would also require a radical shift in architecture, which would ultimately limit where it can be effectively deployed (I think it would be limited from a practical sense to only Apache 2 running on certain architectures).
Some of the responses to Justin (the original poster) argued that threads aren’t necessary, and that not all developers understand threads. He counters that developers who don’t understand threads will be unemployed in a few years. Personally, I find that a big stretch, and if it’s true, most of the developers I know wouldn’t be employed then. Yet they’re still managing to provide business value to their employers, clients and customers.
Some of you who know me have heard this, but I’ll repeat it here for posterity. I worked in a company with a small PHP team and a large Java team. Some of the Java team had been working on an upgraded system to provide cross platform authentication services. This was to be exposed as a SOAP service. There was about a 15 page spec, and this had apparently been in the works for months before I got there. It didn’t affect me, so I didn’t know about it, until the day it DID affect me. I was told my project had to work with that project, but there was nothing to test against. I was told by that team that it wouldn’t be ready to test against for another 3 months minimum. So, I took the spec and wrote a SOAP server in PHP to implement what was documented. It took about 3 days, and during that time I had a Java developer write a sample Java client to test against it, so we had Java and PHP clients and a PHP server in under a week, functional according to the specs.
Politically, I was like a bull in a china shop, but was also really just trying to get things done so my project could progress. I presented this to the players involved as something we could use as an interim solution while the Java one was finalized. Other projects that needed the SOAP server could use it as well, letting everyone progress, and perhaps taking a little pressure off the Java team (or maybe putting more on?)
I got a couple major putdowns of the system, most of which centered on these two main points:
‘It uses MySQL – that’s a toy!’ – there was incredibly simple SQL which was using generated data objects and an abstraction layer – porting and testing to another platform (MSSQL) would probably have taken 2-3 days.
‘PHP doesn’t have threads!’ – that was it. That was the primary stated reason why we couldn’t use it. Turns out later there were many other smaller – yet bigger – reasons which were completely non-technical, which was all the more frustrating, because there was no need to throw out ‘PHP has no threads!’ as an excuse. There was a functioning and tested system which was already working, but somehow because it didn’t have threads in it it didn’t count. I *never* understood that.
Having seen some of the other code they were in the middle of, and some Java code from others I’ve worked with, I’d say that many (perhaps most) Java developers have no real, or very limited, understanding of the true impact of how threads work, interact with each other and the system, and the things to guard against. As an aside, I’ve complained about Java app GUIs for years – you can usually tell when you’re using a Java GUI because everything is so slow. Go read up on Java defenders’ counters to those complaints – “people writing the apps don’t understand GUI threading!”. I read that gem years ago, and have seen it come up again and again. If it’s so difficult, why don’t any of the IDEs out there help you write properly threaded GUI code? It can’t be that every single person goes out of their way to write code by hand. Most people use some sort of IDE – commercial or otherwise – yet almost all Java apps seem to suffer this fate.
I’ve seen numerous issues affect Java apps, and many (probably 40% of the ones I can think of in the past few years) involved a misuse or misunderstanding of threading. I’m not sure that .NET is any better, as the same issues would likely affect a developer, but certainly Microsoft had the benefit of watching the missteps of Java developers for years and could help .NET developers avoid many of the potential pitfalls threading can bring. Early classic ASP employed a default threading model for the session management which kept sessions bound to a particular CPU, such that heavily hit sites could not use multi-processor servers efficiently. And that was something that there really wasn’t much of a workaround for, save for writing your own session handling code full stop.
Had to rant about this a bit. PHP is certainly not a perfect platform for web app development, but lack of a threading model is not, for most (or nearly all) situations, even an issue. I think part of the original poster’s point was that a main server would spawn threads to hit various web services, then assemble the data, and complete the request. As Patrick points out, this type of model brings up more questions than it answers, and forces the developer to have a much deeper understanding of threading and system architecture in general. Most businesses will be better served by having development staff spend more time on documentation and having a deeper understanding existing and future business logic rather than becoming fluent with threading models.
Someone’s anti-php rant…
October 8th, 2006Wow… via Patrick Mueller @ IBM I found a post on techrepublic stating that ‘PHP is doomed’. Patricks’ response is done pretty well, but I thought I’d add a few observations as well.
The original poster’s point that PHP is doomed stems from a lack of threading model in PHP. While I’d say that PHP might benefit on the whole from having a threading system in place, it would also require a radical shift in architecture, which would ultimately limit where it can be effectively deployed (I think it would be limited from a practical sense to only Apache 2 running on certain architectures).
Some of the responses to Justin (the original poster) argued that threads aren’t necessary, and that not all developers understand threads. He counters that developers who don’t understand threads will be unemployed in a few years. Personally, I find that a big stretch, and if it’s true, most of the developers I know wouldn’t be employed then. Yet they’re still managing to provide business value to their employers, clients and customers.
Some of you who know me have heard this, but I’ll repeat it here for posterity. I worked in a company with a small PHP team and a large Java team. Some of the Java team had been working on an upgraded system to provide cross platform authentication services. This was to be exposed as a SOAP service. There was about a 15 page spec, and this had apparently been in the works for months before I got there. It didn’t affect me, so I didn’t know about it, until the day it DID affect me. I was told my project had to work with that project, but there was nothing to test against. I was told by that team that it wouldn’t be ready to test against for another 3 months minimum. So, I took the spec and wrote a SOAP server in PHP to implement what was documented. It took about 3 days, and during that time I had a Java developer write a sample Java client to test against it, so we had Java and PHP clients and a PHP server in under a week, functional according to the specs.
Politically, I was like a bull in a china shop, but was also really just trying to get things done so my project could progress. I presented this to the players involved as something we could use as an interim solution while the Java one was finalized. Other projects that needed the SOAP server could use it as well, letting everyone progress, and perhaps taking a little pressure off the Java team (or maybe putting more on?)
I got a couple major putdowns of the system, most of which centered on these two main points:
‘It uses MySQL – that’s a toy!’ – there was incredibly simple SQL which was using generated data objects and an abstraction layer – porting and testing to another platform (MSSQL) would probably have taken 2-3 days.
‘PHP doesn’t have threads!’ – that was it. That was the primary stated reason why we couldn’t use it. Turns out later there were many other smaller – yet bigger – reasons which were completely non-technical, which was all the more frustrating, because there was no need to throw out ‘PHP has no threads!’ as an excuse. There was a functioning and tested system which was already working, but somehow because it didn’t have threads in it it didn’t count. I *never* understood that.
Having seen some of the other code they were in the middle of, and some Java code from others I’ve worked with, I’d say that many (perhaps most) Java developers have no real, or very limited, understanding of the true impact of how threads work, interact with each other and the system, and the things to guard against. As an aside, I’ve complained about Java app GUIs for years – you can usually tell when you’re using a Java GUI because everything is so slow. Go read up on Java defenders’ counters to those complaints – “people writing the apps don’t understand GUI threading!”. I read that gem years ago, and have seen it come up again and again. If it’s so difficult, why don’t any of the IDEs out there help you write properly threaded GUI code? It can’t be that every single person goes out of their way to write code by hand. Most people use some sort of IDE – commercial or otherwise – yet almost all Java apps seem to suffer this fate.
I’ve seen numerous issues affect Java apps, and many (probably 40% of the ones I can think of in the past few years) involved a misuse or misunderstanding of threading. I’m not sure that .NET is any better, as the same issues would likely affect a developer, but certainly Microsoft had the benefit of watching the missteps of Java developers for years and could help .NET developers avoid many of the potential pitfalls threading can bring. Early classic ASP employed a default threading model for the session management which kept sessions bound to a particular CPU, such that heavily hit sites could not use multi-processor servers efficiently. And that was something that there really wasn’t much of a workaround for, save for writing your own session handling code full stop.
Had to rant about this a bit. PHP is certainly not a perfect platform for web app development, but lack of a threading model is not, for most (or nearly all) situations, even an issue. I think part of the original poster’s point was that a main server would spawn threads to hit various web services, then assemble the data, and complete the request. As Patrick points out, this type of model brings up more questions than it answers, and forces the developer to have a much deeper understanding of threading and system architecture in general. Most businesses will be better served by having development staff spend more time on documentation and having a deeper understanding existing and future business logic rather than becoming fluent with threading models.
Rails uptake analysis
July 19th, 2006Couldn’t think of a better title for this, but it’s not that newsworthy or anything – I’m just putting this here because it’s one of the better explanations of why some advocacy works and some doesn’t, yet still succint…
http://www.gadgetopia.com/post/4104
The part that caught my eye was some of a response, which I’ll quote here…
This is the problem I’ve had with Rails so far — all the promotional material is full of indirect insults to everything else. The Rails camp makes it completely clear that this is a huge advance over everything else and that all the other platforms and frameworks have been doing it all wrong and that Rails is the one, true platform that finally understands the problem like no one else ever has.
I’m trying to get past that and embrace Rails because it’s so good, but to do this I’ve had to look past a lot of stuff that alienates the hell out of non-Rails developers. All the material on Rails has a huge “you’re an idiot because you haven’t been doing it this way all along” subtext to it.
That and: “Forget everything you know, because it’s all been a waste of time. All those years you spent perfecting your [insert your platform here] skills — a complete waste. Throw it all away and we’ll teach you the right way to do it.”
Very well put, imo.
Why perl still sucks…
July 19th, 2006Today I had to get perl up and running on a new CentOS machine, and I remembered why I don’t like perl. I tried to do everything from the CPAN system. I got things working after hunting and doing things by hand, but the crux of the problem was:
perl -MCPAN -e shell
>install HTML::Mason
… needs to install Module::Build …
… Module::Build dies stating that it can’t find version.pm …
>install version
… dies stating that it can’t find Module/Build.pm
*CIRCULAR DEPENDANCIES* suck. In all my years of dealing with compiling and installing PHP, I can’t recall ever coming across one. It might have happened in PEAR, which I rarely use, but certainly not in the core system. Yes, it’s apples and oranges, because my core perl was working, but you can not be effective with perl without CPAN up and running, while in PHP you can.
In the end, I had to make a ‘version’ directory in the /usr/lib/perl5/perl5.8.5 directory, well, I’ll just show you.
>mkdir /usr/lib/perl5/5.8.5/version
>cp /root/.cpan/build/version-0.65.1/lib/version.pm /usr/lib/perl5/5.8.5/
>cp /root/.cpan/build/version-0.65.1/vperl/vpp.pm /usr/lib/perl5/5.8.5/version
Yes, I finally got it working. No, the perl tools didn’t help me – I had to fight against them then do stuff by hand. It’s these sorts of things which are continually marginalizing perl (over and above difficult-to-read code).