06.29.2011
Robotlegs is a fantastic micro-architecture for ActionScript. One pattern used with Robotlegs is the command pattern. Commands are generally short-lived objects that execute a segment of code in response to an event. By encapsulating code in a command, you can maintain low coupling in your app (the view and the command don’t need to be aware of each other) and reduce duplicate code. See the Robotlegs Best Practices page for more info regarding commands.
You may run into situations where you wish to batch commands. Macrobot simplifies this process and provides two ways to batch commands:
Sequence: The batch of commands will be executed in order. The second command will not be executed until the first is complete, the third command will not be executed until the second is complete, and so on. The batch will not be complete until all its commands are complete.
Parallel: The batch of commands will be executed as quickly as possible without respect to completion of any of the other commands. The commands may complete out-of-order. The batch as a whole will not be complete until all its commands are complete. Continue reading »
4 Comments »
05.23.2011
I read, watch, and listen to a lot of financial material and one question that comes up over and over again goes something like this:
Hi, we currently own a home and are looking to purchase a larger one for our growing family. Should we buy now or wait until the bad housing market is over?
When it comes to buying and selling homes, “bad” is a relative word. If you’re trying to sell your home and you’re underwater in your mortgage (owe more than the home is worth) then, yeah, it’s a bad market. But mortgage financing aside–if we’re strictly talking house prices–it’s very possible you have a good housing market and a great time to buy! Continue reading »
2 Comments »
05.19.2011
News has been rampant lately when it comes to marriage–in particular the definition of marriage. At times these discussions and arguments have become violent and have raised anger levels amongst various social groups to dangerous levels. Some argue under the banner of morality and religion that the right to marry should be reserved for a man and a woman. Others argue under the banner of tolerance and equality that two people of the same gender should be able to marry one another. But what perpetuates the argument itself is government intervention.
While the arguments have almost wholly surrounded how the government should define marriage, I propose that the argument should instead be whether the government should be involved in defining marriage at all. What’s the purpose? What business does a government have in recognizing a sacred/emotional/spiritual commitment between citizens? Why must it determine who can officiate marriages? Why must its tax and social security laws distinguish between being married and not? Why is it involved at all? Continue reading »
1 Comment »
04.30.2011
For most first-time homeowners, private mortgage insurance (PMI) is a necessary evil. It really doesn’t do a thing for you except allow you to own a home without putting down 20% of the cost up-front. The insurance is actually for the lender in case you bail on them.
Being the frugal fella you are, you have spare cash each month and you need to decide what to do with it. You probably have several options: pay down the mortgage, pay down student loans, invest in a retirement account, pay off credit card debt (credit card debt? but you’re a frugal fella, right?), or put it under a mattress. Whether you’re earning interest or paying interest, these can still be compared to find the most qualified suitor for your cash. Let’s take a look at some numbers, however accurate they may be, for each of these sinkholes:
- Pay down the mortgage: 5% (mortgage interest rate)
- Pay down student loans: 4% (student loan interest rate)
- Invest in a retirement account: 9% (rate of return)
- Pay off credit card debt: 12% (credit card interest rate)
- Put it under a mattress: 0% (rate of return)
Now, if you subscribe to the idea that you should put your extra cash in the one with the highest rate, this would lead you to believe you should pay down the credit card. Most people would stop there. Continue reading »
1 Comment »
02.24.2011
Here’s a Spark-based progress bar. This component provides the ability to set an “event source” like a URLLoader. When the event source dispatches progress events, the progress bar will automatically update. On the other hand, if you don’t need automatic updating from an event source and just want to set a min, max, and current value, you really don’t need this component. Instead, you can use the Range component that comes with the Flex SDK and skin it just like this one is skinned. Right click the app to view the source. Enjoy!
3 Comments »
02.05.2011
In my last post, Collections And Chaining For Separate Presentation, I mentioned a few data structures for holding a group of objects. These are great for their purpose but sometimes they can be enhanced for a particular project. In this post, I’ll show you a great way to maintain a custom index for a group of items for easy and efficient lookup. Continue reading »
3 Comments »
02.05.2011
The purpose of this post is to describe the various collection data structures used in Flex and how they relate. Once we understand that, we’ll look at a problem I see commonly in Flex apps regarding separate collection presentations and how to fix it. Continue reading »
1 Comment »
10.24.2010
Along with Flex came IViewCursor which provides a way to itererate through ICollectionView classes like ArrayCollection and XMLListCollection. Sometimes though we’re dealing with Vector or Array or are developing an ActionScript-only project. Here’s a cursor/iterator that will allow you to navigate a Vector or Array: Continue reading »
3 Comments »
10.23.2010
Scrapbooking just went from crafty women huddled around piles of paper shreds to online digital awesomeness. Not that crafty women or piles of paper shreds aren’t awesome. Nay. But for many, this translates into finding babysitters or a willing spouse; finding large blocks of time; purchasing a gajillion expensive scissors, stamps, buttons, papers, and ribbons; finding storage for such paraphernalia; and discovering craftiness from within. I mean, seriously, does this or this look fun to clean up? I’ll pass.
For the last year and a half at Rain I’ve been working on Studio J, Close To My Heart‘s flagship online scrapbooking application. It’s been quite a ride but the result is really quite revolutionary. Continue reading »
No Comments »
10.05.2010
True story: A man lives in a county where residents must pay $75 at the beginning of each year if they want fire protection from a nearby city. The man’s house caught fire. The man never paid the $75, so the city didn’t save his house.
I couldn’t have designed a better case study for the polar ideals of American legislation if I tried! Don’t get me wrong–it sucks to have anyone’s house burn down, but I absolutely love this as a case study. Continue reading »
3 Comments »