Prototyping and Rails
Marlon said: I've been a fan of HAML since before I was a fan of SASS! I love not having to remember to close tho...
[More]
Ayn Rand's Objectivism Embodied
jason olmsted said: @Hal - I really should remember to check your blog more frequently, I enjoy the thought provoking ar...
[More]
Over the last couple of weeks since starting this "Learning ColdBox" series, I've been working more extensively with the framework. There's a lot in ColdBox and it took me quite a while to really feel comfortable with it. Having gotten over that initial hurdle, I'm very glad I did. Many thanks to my colleague, Ben Densmore, who has been always willing to answer my naive ColdBox questions -- even at 2.00 AM. I'm by no means an expert; I've just gotten to the point where I'm happy being a bit reckless!
Before we get into writing the application, I want to ask about logging with LogBox. A while ago, I felt the need for something more than I could get with native logging. During development, I wanted to have the ability to log something. That something might be a simple value, an array, a struct, an object, etc.
While I didn't want logging to occur when code moved to production (for obvious reasons), I did want to leave the code in place (so that, for example, I could turn it on if some anomaly occurred or if I wished to time certain processes while running in production). And finally, I didn't want to wrap logging code in if statements. That's ugly and, with enough of them, could become expensive. What to do?
With the (very) basics behind, I'm ready to try my hand at a CRUD application. (Hopefully, that won't prove to be prophetically named...) But before I start, I want to explain how I do things presently -- and ask expert ColdBoxers for some guidance as to what should be changed to best use ColdBox.
In Learning ColdBox: I, we began creating an app by getting ColdBox installed and responding. Today, we're going to go a bit deeper -- adding event handlers and associated events.
So...my first step is going to the ColdBox site to download the framework: http://www.coldbox.org/download. I created a coldbox directory directly under wwwroot. For now, I'm going with my idea of a Philosopher Battle game (see yesterday's post). (BTW, as Phil Nacelli pointed out, ColdBox comes with several sample applications already! Why not just one of these? See below...) So, let's start with creating a "Philosophy Game" app.
Lately, I've undertaken to learn ColdBox, as I'll be using it on an upcoming project. ColdBox is a powerful, robust ColdFusion framework. Luis Majano and contributors have done a pretty terrific job, it appears to me. In fact, all FOSS developers could learn a great deal from how well documented the project is.
So I mean the project no disrespect when I say that, as a newb, what would be most welcome is a small but comprehensive sample application. Since version 3.0 was just released, (http://www.coldboxframework.com/), it seems that this would be a perfect time for such a sample app/tutorial.
Debt is an agreement whereby we receive a good today in exchange for future payments. In recent years, the term "technical debt" has found widespread adoption to describe a similar situation involved in producing software.
The good we receive? Producing deployable software. The future payments? Greater difficulty in maintaining that software.
Deploying (or shipping) software is always a tradeoff. As such, we always accumulate technical debt. The problem is that we often misunderstand just how corrosive to a system technical debt is -- how much those "low, easy payments" are going to be and to what degree they will cripple new development.
"Just once it might be instructive to pretend you're accepting an award for failure, just to see who you would thank." ~Robert Brault
There seem to be endless quotes related to failure. Many of them are a variation on "The only real failure is failing to try again." Heart-warming stuff. Encouraging. And dead wrong.
Posted At : November 20, 2010 5:14 PM | Posted By : Admin
Related Categories:
Code,Puzzle
Here's another little puzzle. Here, we're trying to come up with the least processor-intensive algorithm for determining, given an array of random integers, how many are even?
I have a solution that works, but I'm not sure it's the most efficient. What's your solution? (If you want to see mine, highlight the space below -- the code is white on white).
function evens( arr ) {
var numFound = 0;
var i = arr.length;
while ( i-- ){
if ( arr[ i ] % 2 > 0 ) {
continue;
} else{
numFound++;
}
}
alert ( numFound );
}
Posted At : November 20, 2010 1:13 PM | Posted By : Admin
Related Categories:
Code,Puzzle
Here's a fun puzzle for you to try in the language of your choice. We have two boolean contrarians, A and B. (A contrarian might be too-simply defined as someone who opposes the conventional wisdom on a topic.) Since they're contrarians, we expect/want them to not agree on a topic. If they do, we're in trouble.
What's the shortest function that will return true if A is true AND B is true OR A is false AND B is false?