abstractwankery.com
taking it to the next level
MooseX::Declare and huge warnings.
Posted by Nick at 2:07 PM
Did you upgrade Moose and started seeing this warning all over the place in your MooseX::Declare modules?
The old Moose::Util::MetaRole API (before version 0.94) has been deprecated
Upgrade MooseX::LazyRequire while you're at it.
0 comments
Subversion to Git
Posted by Nick at 3:05 PM
I, for the first time, switched one of my bigger projects from Subversion (svn) to Git last night. I've been using Git for a few months now at my new employer, and finally have enough of a workflow set up with it that I'm fairly productive with it, and want to see what it's like with my home projects.

The only problem is, now I feel like a douchebag. Hopefully I won't start writing Rails apps soon.
0 comments
Technology kicks ass and sucks rocks.
Posted by Nick at 8:59 AM
Since it's apparently impossible for me to keep a laptop longer than six months, I am now the semi-proud owner of a ThinkPad X100e. This is part of what I'm calling Lenovo's "experimental" line, joining forces with the ThinkPad Edge. How are these experimental? Well, they have far fewer LEDs, to start. They don't have the rubberized paint applied to them. They have curves and bevels. They look like they were designed some time in the last ten years. This is new territory for the ThinkPad lineup, and I applaud the effort, though I miss my ThinkLight (but love that there's still a TrackPoint).

What is the X100e? This is the first 'netbook' type of ThinkPad, but it skirts the edge of the former 'subnotebook' classification. Instead of a 10" 1024x600 display, it's an 11.6" 1366x768 display, and instead of a single core Atom, there is a dual core Athlon Neo L625 hiding inside. You also get a Radeon HD 3200 instead of GMA 500 or something equally lame, so it's a very peppy, portable little machine. I really dig it.



The hardware is mostly good. It has the hard drive protection system, that kills the spindle when acceleration or movement is detected. The keyboard, though a departure from previous ThinkPad models by being more Sony/Apple style, is fantastic, with beveled and differently shaped keys with great spring action compared to the MacBook I had before. The multitouch trackpad is generously sized for the small footprint of the machine, and the TrackPoint buttons are large and easy to find. Getting access to PCIe and memory is much easier (if that was possible) than easier models, with six screws to remove on the back panel before the whole thing comes off.

Two things stand out as ridiculously horrible, though. First off, the wireless card, manufactured by Realtek. I had been conditioned that "ThinkPad Wireless" was a nice Atheros card, as it's been since the T4x series, and was elated to see it on the order sheet. When it arrived, it was a Realtek 8192SE bgn card, with awful signal, an unstable connection, and was even more worthless in Linux with dropped connections and crashes using WPA2 Enterprise. I waited for a month for anything to improve, but obviously Realtek doesn't care at all, so I managed to find an Intel 5100 abgn card, in half height, Lenovo-branded form, for a very small price on eBay. I am now enjoying semi-reliable wireless, which is better than nothing. Second is the battery life. You'd think with a fuel-sipping-in-comparison-to-a-C2D Athlon Neo and a six cell battery, you would get more than three hours of battery life. Haha! No, fool, you get three hours if you're lucky! It seems weird that I got better life out of my 2.2 GHz MacBook Pro than this machine, but at least I have something that approaches portable.

I've been trying to use Linux on this machine, as my primary development language is Perl, and having a UNIX environment is really handy. I use it at work, but I have very defined tasks, so it's easy to deal with, especially compared to Windows XP. For my home laptop, the variables get bigger. My Mac OS X desktop machine acts as my primary, with my photos, music, and all of the data I've ever collected, where my laptop just becomes a satellite machine, so it gets a little easier. That said, I have to use VMware to use Office 2010, as OpenOffice sucks. I'm stuck using Thunderbird as a mail client, which has improved significantly over the years, but is still crippled by horrible, focus stealing UI. Media players aren't great, though they're improving, too. I also can't do Cocoa development on it anymore, not that I've had any time. I don't have any serious complaints, I think I'm just used to OS X still, and can't get over not using it. If Apple realizes some day that some people want more portability (that you can install your own software on and has a keyboard, ffs), or more resolution (take that screen from the iPhone 4, put about 16 of them in a laptop), maybe I'll go back to them for hardware.

Or, maybe Haiku will become useful. :)

Not entirely sure why I wrote this entry. Maybe I just needed to talk it out.
0 comments
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