abstractwankery.com
taking it to the next level
MooseX::Declare, TextMate, and TmCodeBrowser
Posted by Nick at 2:01 PM
Do you use TextMate?
Do you use TmCodeBrowser?
Do you use MooseX::Declare?

Must be a pain that nothing shows up the side pane when you start using it. It was for me.

Open '~/Library/Application Support/TextMate/PlugIns/TmCodeBrowser.tmplugin/Contents/Resources/.ctags.tmcodebrowser' in a text editor. Add the following:

--regex-perl=/^[ \t]*(class)[ \t]+([^\ \t;]+)\s*[ \t]*[{;]/\2/c,class,classes/
--regex-perl=/^[ \t]*has[ \t]+'([^\ \t;\(]+)'/\1/p,property,properties/
--regex-perl=/^[ \t]*method[ \t]+([^\ \t;\(]+)/\1/m,method,methods/


Reload TextMate.

Bask in the awesome.
0 comments
Adventures in Objective-C
Posted by Nick at 1:32 PM
I think that as time goes on, programmers, coders, and hackers tend to get stuck in their ways. Listening to friends and I go on about the latest fad and how horrible it is outlines that fact, and my recent trip to a Perl conferencesolidifies it. In my high school days, I liked to write in three different languages, with varying levels of success -- Visual Basic, C, and Perl. VB was for playing with Windows apps, C was for hacking around with my BBS and attempting to do Mac development, and Perl was for the web. I didn't do a great job of coding at any of the three languages, as I lacked any formal training. They did get the job done, and I had a lot of fun doing it. Once I was employed as a Perl programmer, I effectively re-learned the language, and have been working primarily with Perl ever since. A few of the jobs have afforded me the opportunity to work with other languages, some C and REALbasic at one, some C# at another, PHP and Python at a different one. None of them became my primary languages. Most fell off my radar after I stopped being required to work with them.

A few years ago, I started to become anywhere from dissatisifed to annoyed with Perl, and started a search for my "next language", something I could enjoy programming in as much as I enjoyed Perl. I played with Python for some time, and I also checked out Ruby with the Rails web framework. I knew about PHP enough that I didn't care to deal with it any more than I had to. I actually got a kick out of Python, but lacked any real world application for it to really do something more substantial. I may still head that direction.

As Catalyst, and later Moose started really building up, I started doing more work in Perl again. Moose made OO programming in Perl not only sane, but actually enjoyable. The Catalyst framework made web development structured, easy to deal with, but powerful to work with and quick to deploy. It was hard to go wrong, and I've been on that path since. My only real deviation was finally getting the chance to really learn Java beyond the theoretical by starting with Android development, and releasing my first Android application, ElJay.

In a sick sort of way, Java really clicked for me. Sure, it takes 10x the lines of code to do the same thing as I'd do elsewhere, but the great threading architecture and the strict typing really turned my crank. Unfortunately, writing Java applications generally means that your app is slow and ugly on every platform, instead of at least having one good one. Android, at least, provides an obvious foundation for Java applications, screwing up that rule.

My latest round of experiments have been using Objective-C. The most common application of that language is as the primary language of Mac OS X and iPhone, using Apple's Cocoa framework. I've been hanging out mostly in the basic CoreFoundation framework using command line tasks, and really enjoying the message sending features, obvious and straightforward OO implementation, and the raw speed of a natively compiled application. My 'big project' is investigating how realistic writing a web application framework in Objective-C would be. How 'realistic' it is can be a challenge to define, but I see it as a few separate things.

* How easy is it to generate a basic framework, similar to the core of Catalyst, that can respond to FastCGI requests quickly?
* How easy is it to extend it to multiple engines, and the opportunity to plug in other models and views?
* How easy is it for the end developer to then write an application against this framework?
* How many developers would be willing to write web applications in a strict typed environment?

I've managed to get through the first and half of the second bulletpoints. I now have a loadable framework that can be plugged into an application that allows basic dispatching of pathnames to a controller via FastCGI, plugged into Apache. The FastCGI component is actually loaded as an engine, and a basic CGI engine is also available. Engines are an abstract class that acts as a simple API, and one could theoretically write ISAPI or other types of connection engines into it. Models and views are not done yet, the controller is just spitting out HTML. I know, I know, that's a big no-no. That comes soon.

Numbers three and four are a little fuzzier. If I take the idea that a lot of newer developers are easily able to create new applications for the iPhone, one would say that Objective-C is not a terribly difficult language to pick up. In fact, the hard piece of just about any language is not the language itself but the framework. Java is easy. Android makes it tougher. Objective-C is easy. Cocoa makes it tougher. In that same vein, a developer may be willing to write a web app in ObjC as long as the framework itself makes it easy for them to do so. If I also add the idea that enterprise developers are now writing web applications in Java and C#, I can't see a reason that another strictly typed language would be an issue. I think the main issue that would need to be overcome is making it easy for people to add new components to the system. Perl has CPAN, Ruby has Gems, and while having something generic for Objective-C may not be appropriate, something specific to the framework just might be. If I follow a similar design pattern as Catalyst, it starts to make more sense. For instance, there are a few ORM systems that are available as C, C++, or ObjC libraries. One would not need to care about grabbing this generic-orm component, but somebody would certainly want an already assembled library for interfacing this web framework with that generic-orm (a la Catalyst::Model::DBIC::Schema).

Anyway, that was a long introduction and explanation to show you that, yes, it's starting to actually work. :)
(click to enlarge)
0 comments
Speaking at Frozen Perl 2010
Posted by Nick at 3:43 PM
I just did my first talk -- ever -- at Frozen Perl 2010, on DBIx::Class in the Real World. Unfortunately, I realized after the talk was accepted just how much content I wanted to go over, so there's a lot of stuff left to talk about.

For those who were there, thank you for dealing with me, and here are the slides. Feel free to contact me if you have any questions, comments, or concerns, and I'll try to help the best that I can.

For those who weren't there, carry on, there's nothing to see here.
0 comments
Things that are dumb: Android Emulator
Posted by Nick at 5:35 PM
In today's episode of Things That Are Dumb:

I sat here fighting with the Android emulator, trying to get it to work in Snow Leopard. Every time I started it up, no matter if I started the Android 2.0 SDK or the 1.6 SDK, it would start, then force quit with a EXC_BAD_ACCESS error. Twenty minutes of this crap, no luck. I'm rebooting, moving things around, and finally pull everything from the machine.

It was my USB headset.

That's dumb.
0 comments
Releasing Products
Posted by Nick at 8:20 PM
It's such a rush to finally release a long-running project.

My primary full time work involves contracting to a large company in the healthcare field. After nearly twenty months of stop and start work, and then a few months of 100% work, we finally released a fully rewritten site this evening. Is it everything we wanted? No. Are there large pieces that I don't like about it? Sure.

Did we finally do it?

Yes.

Sweet.

(Yes, of course the site is written in Perl. We're using DBIx::Class, Template Toolkit and a custom mod_perl framework over Apache2 and MySQL.)
1 comment
Development on Maemo
Posted by Nick at 12:29 PM
Is it just me, or is development on Maemo/Gnome 10x more annoying and difficult than Android or iPhone development? Seems you're stuck with C and GObject, and the scaffolding is terrible. I would like to think I can use Vala, but the bindings seem to be missing for Maemo 5, and there is always QT, but then you're just increasing the pain to C++.

Maybe I'm just turning into a lazy programmer, and feel that life is too short for C.

Maybe I just need to write some Objective-C bindings for Hildon.
1 comment
Web Application Design Patterns
Posted by Nick at 8:34 AM
I was speaking to a PHP developer recently on the architecture of their web applications, out of morbid curiosity. We were discussing templating systems, and found out that they created theirs in house. It was a coded document, with classes defined for each entity, and they'd load up an object with the proper properties, stream it out to the processor, and it would generate the page. They would then have the designers just write CSS to make the markup do what they wanted it to do.

I had never heard of this before, and to me, that sounds horrible. You have a huge cost for all of that object creation, and then you have to find a web developer who is willing to only use CSS.

Anyone else do something similar?
1 comment
The greatest perl5 evangelism talk I've heard
Posted by Nick at 7:19 AM
mst from Shadowcat Systems does a rant at the Nordic Perl Workshop about Perl5 and raising awareness. I'm not sure if I have the stamina to participate in the "Ironman" competition, but it certainly fires me up.
1 comment
New design, new blog software
Posted by Nick at 6:28 AM
Welcome to the first release of the Parchment Content Platform. It is not much right now, effectively a viewer for the entries on my old blog, but it is not bad for a few hours of work. I wanted a blog platform that I could run as a process through nginx, and I did not want to use WordPress.

Comments should be working, I would love to hear what you think.
3 comments
Lenovo, I love you.
Posted by Nick at 9:42 AM
I just wanted to say that Lenovo is still one of the best computer manufacturers around today.

I know that the designs are polarizing, due to them looking virtually the same as they did years ago, but you cannot beat the performance for the money, the keyboard sent from heaven, or the customer service department that appears to bend over backwards to make sure you're happy.

This note comes kind of late, as it's been almost a month since my service call with them, but needless to say, I think I'm going to continue buying Lenovo products.
1 comment