The Blog

Feb 20, 2008

Eventual Consistency 

by Maxim Porges @ 7:34 PM | Link | Feedback (0)

The more I have learned as a software engineer over my career, the more I have come to realize that it's better to build systems that expect failure in dependent systems and to handle it gracefully than it is to try to build systems that eliminate the possibility of failure altogether.

This evolution in my personal thinking has come about as I have become more familiar with service architecture, asynchronous processes, and the like. It's also come from seeing just about everything fail in various scenarios, regardless of how robust each part of the system appeared to be.

This article from Werner Vogel (CTO at Amazon.com) does a really nice job of explaining the concept of "eventual consistency" at a high level. Basically, once you have accepted the fact that you can only have two of the trio scalability, reliability, and consistency, you have to decide which attributes are most important for your use case and design your system architecture accordingly.

I hope you find the article as useful as I did.

Feb 16, 2008

Totally Inane, But Incredibly Fun 

by Maxim Porges @ 1:56 PM | Link | Feedback (0)

I stumbled across Marc's Musings on particle emitters for Flash a while back.

Totally useless eye candy, but I made the sexiest rectangulary-constrained particle emission that would be perfect for a weird-and-wonderful Flex progress bar using his software. I might throw it in to Pudding if Sica likes the idea.

Joe Berkovitz Posts Updates on the MVCS Approach for Flex Applications 

by Maxim Porges @ 12:49 PM | Link | Feedback (0)

When I started to get in to Flex several years ago, I bought the only Flex book available at the time and got cracking.

The guys who had written the book had also written a framework, so I started using it. It seemed a little complicated at times, but it worked. After we built a few apps with it at CFI, we decided it wasn't for us; too much boilerplate for too little reward.

We started to discuss the fact that maybe we didn't need a framework for Flex as much as some best practices to follow. Flex introduced some obstacles we weren't familiar with, such as 100% asynchronous operation, so we winged it for a bit.

Then we came across Joe Berkovitz's post on MVCS. I drew a lot of inspiration from Joe's simple, framework-free approach to Flex development when I first came across this application. As many of you know, I have been blogging about this for a while, and will be discussing my findings in simplified framework-free Flex development at cf.objective() 2008 later this year.

Well, Joe has recently blogged to provide quick and easy reference links regarding his approach, plus some updated thoughts to best practices he has learned over time since his original article on Adobe's Flex developer connection. I'm very interested in looking at these as I refine my personal approach to Flex apps, and the content of my presentation in May.

There must be some interest in doing Flex framework-free across the community, since I was recently asked permission to republish my most recent blog post on this topic by a an online Flex news source. The editors and I decided that I would finish my sample app and write a full article instead, to provide some more substance/examples of the information being presented.

Thanks go to Joe for sharing his experience, being my original inspiration in this area, and giving Flex developers some alternative best practices from the existing Flex frameworks.

Indian Curry Recipe 

by Maxim Porges @ 12:20 PM | Link | Feedback (0)

I usually make a West Indian chicken curry in the slow cooker, but when choosing a recipe to make Jessica for dinner on Valentine's day, I figured I would give good ol' regular Indian curry a try. We eat Indian food pretty regularly, but I've never tried to make it before.

Unfortunately, most Indian dishes call for authentic spices, many of which you can't find outside of specialty stores in the US. So, I slightly modified a recipe I found online and spun the wheel, and it turned out pretty darn good. Thought I'd share the final recipe for the world to enjoy.

Goes great with Basmati rice. Expect your house to smell like an Indian restaurant for at least two weeks. :)

Ingredients
1.5 tbsps curry powder OR 4-5 curry leaves if you can find them
Chicken (boneless, skinless cutlets work best) - 1 lb
Spring Onions - 4, chopped finely
Tomatoes - 2 or 3 depending on size (they disintegrate and make the sauce)
Ginger paste - 1 tbsp
Crushed Garlic - 1 tbsp
Green Chilies - 2 (fresh) OR 1 can (tinned)
Coriander powder - 1/2 tbsp
Red chilli powder - 2-3 tbsp
Turmeric powder - 1/2 tbsp
Coriander leaves - a few
Olive Oil - 5 tbsp
Cumin Seeds or Ground Cumin - 1/2 tbsp
Salt

Preparation Instructions (about 25 minutes)
1. Begin heating a pan to medium-high heat. Clean the chicken and cut in to small pieces.
2. Coat the chicken in the tumeric and set aside for 10 mins while you work on the other stuff.
3. Cut the onions, tomatoes, green chilies, and coriander leaves separately.
4. Add oil to the hot pan. Once the oil is heated, add the following ingredients one by one, mixing them in to the oil: cumin, curry, green chillis, onions. Reduce heat to medium. Cook until the onions start to soften. Add some salt as you go.
5. Once the onions are cooked, add the ginger paste and garlic. Simmer for 3 mins.
6. Add the tomatoes and chicken. Simmer for 5 mins over medium/high heat. Stir to cook the chicken and begin to reduce the tomatoes in to the sauce
7. Add the red chilli powder, coriander, and salt. Simmer on medium/low heat for 10 mins, or until the tomatoes and sauce have reduced to a consistency you agree with. Add and mix in very small quantities of water as necessary to thin the sauce during reduction. Add salt and additional quantities of the spices used so far to taste.
8. If you like, garnish with coriander leaves and crushed pepper before serving. Serve the curry in a bowl on a large plate, with the rice on the plate.

Feb 15, 2008

Adobe Says: "Thousands of Developers are using CF 8" 

by Maxim Porges @ 10:48 AM | Link | Feedback (9)

I don't know if this is a good marketing message for Adobe. I read this as "we can only count thousands, not tens of thousands or hundreds of thousands."



I also think it's a little weird that they are marketing a technology by saying "really, people are doing this"... there is a hidden message I'm interpreting there (probably a wrong one, but this is my blog so I'll say what I think). To compare, I've seen marketing messages about Flex that say "Flex does X, learn how" but not "really, there are a lot of people learning/using Flex."

If you follow my blog, you know that I still like CF, but I think other technologies have begun to make HTML-based web development simpler and easier. That's kind of what technologies do; they evolve over time and supersede each other. Otherwise, we'd be writing web sites with punch cards. This is the reason we're using Flex for all new internal apps at CFI instead of Oracle Forms; Flex is just more capable for more reasons than I have time to list here.

I expect a flood of comments to this post about how "I'm working at X and I'm still productive in CF and I love it, it's not going anywhere..." etc., etc.,. I'm not saying that you can't use CF, or be productive in it, or that it's "bad", or dying imminently. I just think that for the most part, there are now technologies that supersede CF from a productivity perspective for most web development use cases.

*dons flame retardant underwear*

Feb 11, 2008

Leopard 10.5.2 In The Wild 

by Maxim Porges @ 10:20 PM | Link | Feedback (2)

Yep - 10.5.2 is out.

And while people may bitch about Vista (I polled the sys admins today and they said that the best time to go to Vista would be after global warming destroys the Earth), look at some of the crazy crap they had to fix in this latest release of OS X.

"Resolves an issue in which the Eject command could write to a disc in the optical drive."
WTF? I'd be pissed if I ejected a blank disk and it was written to and unusable.

"Addresses an issue in which Setup Assistant could unexpectedly appear each time Mac OS X 10.5 starts up."
Oooo... that would piss me off.

"Addresses an issue in which Finder could unexpectedly quit when displaying folder contents in Column view."
I'd be equally annoyed if Finder bounced itself while I was looking at files.

"Addresses a hanging issue that may occur when connecting to an AFP network volume."
I get weird hanging issues in Finder very occasionally (like, once every two months) when sleeping my Mac at the office while connected to a network share, and then bringing it home (or vice versa). Not sure why a UNIX-based OS has so many issues with this.

There's a few other doozies in there that I'm glad they fixed. So, I guess my point is, OS X ain't perfect either in any new releases, so give the Windows team a break. Although, Apple is on their second point release since a November launch, so they are clearly caning Microsoft in the OS update speed department (although that's nothing new).

On the plus side, here are a few things I'm glad to see added to Leopard.

"Adds a menu bar option for accessing Time Machine features (the menu extra can be enabled in Time Machine preferences)."
Convenient.

"Updates Stacks with a List view option, a Folder view option, and an updated background for Grid view."
Thanks for listening, Apple (item #2). And you all thought Jobs doesn't read my blog. First he rips off all my ideas, and now he tweaks the Dock like I said so. The least he could do in return is give me his GV. :)

I was waiting on 10.5.2 to upgrade my work laptop, so I guess it's almost time. I wish CheckPoint would hurry up and release a final version of the VPN client so I didn't have any remaining hurdles. For now, Tiger remains my friend.

JRuby and BlazeDS for Data Push 

by Maxim Porges @ 10:10 PM | Link | Feedback (0)

acts_as_conference 

by Maxim Porges @ 9:55 PM | Link | Feedback (1)

I was going to blog about the acts_as_conference, but honestly - why bother when LeGros has done such a great job already?

Feb 10, 2008

Finally - A Lightweight and Simple Flex Framework? 

by Maxim Porges @ 7:22 PM | Link | Feedback (2)

I've been messing around with dynamic classes in Flex today, and I've found some pretty neat ways to do things.

I got in to this while writing some code for my session at cf.objective() this year. I wanted a non-trivial (yet simple) example of how to just use Flex's built-ins to make a maintainable application, and so I started to roll some code.

A key part of my philosophy behind Flex apps is that they should be as easy to create and configure as I find Spring apps to be in Java. You should be able to combine a simple service/data/functionality "locator" object with regular old tried-and-trusted OO design patterns, and be able to end up with something simple that is exactly what you need. So, to start with, I created a basic "locator" object to enable any part of the application to find, bind to, and/or invoke other objects (usually Singletons) within the application. I got the basic app working and tested, and was ready to move on.

With this complete, an old desire within me was stirred up to be able to mix the XML syntax of MXML with the scriptability of ActionScript 3 to create a simple IoC-like object factory/locator for Flex apps. The ideal solution would allow you to do Spring IoC-like configuration in MXML, without having to use a bunch of special classes or write additional glue-code yourself. I always find I have to write two or three classes to abstract Spring when I use it in our Java services at work, which isn't a huge chore, but is totally unnecessary in Flex due to how cool the concept of MXML is.

This isn't the first time I've tried doing this, but I've always failed to find a good solution. I've failed mainly because I've relied on alpha frameworks from other people rather than just doing it myself. I downloaded something called Prana a while ago (couldn't get it working at the time as I recall [probably my fault] and it didn't leverage MXML like I want to), and while MG:Flex looked promising it was still going in a direction that looked more boilerplate-esque than I wanted. That being said, my stipulations were tight: I was looking for a zero-boilerplate solution.

Since Dan and I were looking at some cool stuff on the FlexOnRails site during the acts_as_conference, I had it fresh in my mind that the capabilities of dynamic classes and proxies in AS3 might be the key to what I wanted. After thinking about it a while, I did some Googling, and found an example of almost exactly what I had in mind. I modified the code slightly to add singleton-style behavior, did some experimenting, and voila - exactly what I wanted!

I'm going to share what I wrote with a few people I respect before I show it to the world, but I think I may have finally cobbled together the Flex framework I always wanted. At present, it consists of a whopping one class, which you don't even extend.

It's pretty hot. Since you configure everything in MXML, you can basically wire up your components to each other and declare event listeners and anything else you want to do all in one place. You can alternatively create multiple containers to isolate specific parts of app functionality/responsibility as you see fit, or bundle it all together in one file if you prefer - your choice. Adding access to the framework in your own files is as easy as writing a single tag.

Watch this space if you're interested. I hope to have something out on the web in a week or two once I've got it all vetted with my peers.

Feb 9, 2008

Photos From acts_as_conference in Orlando, FL 

by Maxim Porges @ 2:45 PM | Link | Feedback (0)

JRuby - The New Web Productivity Layer for Java 

by Maxim Porges @ 10:39 AM | Link | Feedback (0)

I remember years ago, Macromedia did a video that said that ColdFusion was the new productivity layer for J2EE apps. Well, I'm sitting here watching Charles Nutter demo the latest JRuby functionality at acts_as_conference, and I can definitively say that JRuby has taken CF's place.

I'll have more to come on this topic after the conference, so watch this space.

Feb 6, 2008

Call Me Apple-stradamus 

by Maxim Porges @ 10:37 PM | Link | Feedback (0)

Looking through some old blog posts in the archive today, I came across this post where I made some predictions on Apple's future direction. Following their keynote in January 2008, it seems that my predictions from July of 2005 weren't far off.

Read CHM Files on OS X With Chmox 

by Maxim Porges @ 10:25 PM | Link | Feedback (0)

A few weeks back I posted about us implementing HP's Quality Center suite, starting with TestDirector. I still find this to be a great product (we have teams productive with it after a two week ramp-up, if that gives you any idea of the simplicity of setup).

Unfortunately, since it's Windows-only and runs in IE, they built a lot of the API documentation in CHM files. For those of you who don't know, these files are the fodder consumed by the Windows Help utility, and they are not cross platform (surprise! a non-portable product from Microsoft).

A quick Google turned up Chmox. Yes, it's in it's 0.4-beta release, but who cares? Works great on my MacIntel MacBook Pro, and I can now read all the Quality Center docs in glorious Technicolor in Preview and Chmox instead of having to schlock about in Windows.

Java Migrations for Maven 

by Maxim Porges @ 10:16 PM | Link | Feedback (0)

It was only a matter of time before somebody did this. I'm pretty happy about the potential for this plugin after all the work we have done to integrate Maven in to our Flex and Java development at CFI.

Read more about a Maven Rails-style migration plug-in for Java at CarbonFive.com.

Feb 5, 2008

The Best Way To Predict The Future Is... To Have Funding? 

by Maxim Porges @ 9:33 PM | Link | Feedback (1)

I watch CNBC when I wake up in the morning. Since just about everything in the world is driven by capitalism, I find it to be the best news source for stuff that really matters.

They have a set of ads run with Jeff Daniels promoting Michigan as a place to start companies. While watching a version of this ad this morning, they showed office shots of an innovative advertising company, and I saw a poster on the wall of an employee's cube that said:

"The best way to predict the future is to invent it."

Couldn't agree more. Apparently Alan Kay invented that statement.

"Don't worry about what anybody else is going to do… The best way to predict the future is to invent it. Really smart people with reasonable funding can do just about anything that doesn't violate too many of Newton's Laws!"

I have no respect for Newton's laws. If only I were smart, all I would need is funding... *sigh*

The Gap Between CEO and Employee 

by Maxim Porges @ 8:59 PM | Link | Feedback (2)

I'm always amazed by the massive differences in the way different chief executives communicate with their employees.

There's clearly two extremes.

On the one hand, you have those that don't speak to the employees actually doing the work at all, and surround themselves with many layers of management. They appear periodically for ceremonial functions and make speeches. For obvious reasons, employees are intimidated by these chief executives, and act as they believe they "should" around them to avoid being fired or making severely career-limiting moves. Chief executives who operate like this can expect to be fed pleasantries and rose-tinted misinformation by their employees as opposed to being given candid, meaningful feedback that will help them steer their business the way they need to.

And then there are those on the opposite end of the spectrum - the every-man, the friend, the companion. The guy employees feel that they know, somebody they feel comfortable talking to openly. A leader who encourages, inspires, and earns trust. A real person who rubs shoulders with the troops and gets down and dirty to see what's happening rather than relying on being told by the SVPs and other C-level executives. These are the guys who can get in and see the business for what it is, and make educated decisions based on feedback from employees; employees who become all the more loyal for seeing their suggestions being put into action.

Read this, and tell me which type you think Howard Shultz is. Then tell me which one you work for in your organization, or if they are somewhere in-between.

I strongly intend to run my own company at least once before I die. If I have my way, I'll be a Howard Shultz.