the singularity of being and nothingness
Cool Stuff
ColdFusion 10: ArrayEach and StructEach, Hooray!
Feb 20th
Earlier today, I was looking through the “New Functions in ColdFusion 10” doc, and noticed a few gems: ArrayEach() and StructEach(). These are huge, because until now, there has been something of a disconnect between dealing with arrays and structures in CF, and their counterparts in other languages, like JavaScript. All JS libraries (like ExtJS) have “each” methods attached to basic objects which allows you to treat collections of the same kind of thing in a bulk way. Fortunately, CF10 introduces two very handy new methods to apply an “each”-like process to both arrays and structures.
ArrayEach()NOTE: The ArrayEach() and StructEach() functions act on the original array/struct. Therefore, if you make changes to the array/struct within these functions (as in the ArrayEach() example below), the original array/struct will be affected (thanks Andy!).
So, for example, let’s say you have an array of friends’ names, and you want to make the list all uppercase. Pre-CF10, you might approach this by looping over the array, and executing a function at each iteration. Fine, easy enough, and it works. However, with ArrayEach(), you can ditch the clunkiness of the for-loop, and keep everything self-contained to the array. And, you can execute either an “inline” function, or More >
Grouping in CFLoop…Finally!
Feb 18th
With the public release of ColdFusion 10 Beta yesterday, I thought I’d play around a bit with some of the new capabilities. One of the features added in this release is the ability to group in query loops using <cfloop>.
As expected, this is pretty straightforward, and has the same capabilities as the <cfoutput> corollary. Here’s a quick example:
<cfquery name="qproducts" datasource="somedatasource"> select * from products order by category,subcategory,product </cfquery> <cfoutput> <cfloop query="qproducts" group="category"> <h1>#category#</h1> <cfloop group="subcategory" groupcasesensitive="true" > <h2>#subcategory#</h2> <cfloop> #product#<br /> </cfloop> </cfloop> </cfloop> </cfoutput>
Pretty simple, but something which I know a lot of people have wanted for quite a while. Well, now you have it!
Learning Ruby: Day 5
Jan 26th
Today’s excursion into Ruby is a short one. The 3 Koans (constants, control statements, and true/false) are pretty basic. However, upon completing them, I am now officially over 50% done with Ruby Koans!
Of course, I am by no means ready to really start doing anything with Ruby. However, I do feel like I am grasping basic concepts, and my journey through the Koans is becoming less of flailing blindly and more of thinking about what I’ve learned and trying to reason through the challenges I encounter. Granted, not impressive, but it is progress
ConstantsThe first Koan dealt with the concept of constants. The role of constants in programming is pretty well-understood, so there’s nothing difficult to understand about their usage in Ruby…in fact, the Koan dealt mostly with how to access constants (within and outside of their definitions relative to particular classes). I did find a nice, more in-depth explanation of the role and usage of constants within Ruby. Check it out when you have a chance.
Control StatementsAh, what would programming be without control (if, else, for, while…) statements? Probably not worth doing!!
A couple cool things I want to point out about control statements in Ruby.
First, I’m warming to More >
CSS3 Infographic
Jan 22nd
There’s something with me, the weekend, and CSS3…hmm…
On Saturday, Google Politics & Elections posted an interesting infographic about search trends over the last week related to the four remaining GOP Presidential candidates.
Here’s the infographic:
From Google Politics & Elections
Overall, pretty nice. It makes good use of color, highlights the important details, and avoids loading the graphic with needless frills, pointless content, etc.
The one problem, though, is that it’s simply an image. While it’s nice to look at, it’s kind of boring.
Some CSS3 Up In HereSo as I was internally complaining about how boring the image qua image is, it occurred to me that some simple CSS3 flourishes could really make this nice.
Check Out the Example (note: you’ll need a more recent version of Webkit or Firefox for this to work…)
In this experiment, I’m using a few things I’ve not messed with much in the past: keyframes and the flex-box model.
Flex-Box ModelIf you’re a web designer, you’ve no doubt spent endless hours trying to coax HTML and CSS to do simple things like expand “columns” a particular percentage in width and height. This is a horrible nightmare to endure, and it usually ends in a lot of hacks and more cursing, just to More >
If You Want a Good Zombie Movie, Follow the Rules
Jun 1st
Over the last month or so, I’ve watched a BUNCH of zombie movies. From absolute classics like Night of the Living Dead, to foreign offerings like The Horde, I’ve seen the good, the bad, and the terrible in the way of zombie movies. While this is to be expected of all movie genres (but perhaps especially those which tend to hover around the B-movie monicker), for me, it’s not the typical things that make zombie movies great or awful. Some movies live and die on acting, special effects, and plot. While these are certainly not un-important in a zombie flick, they don’t sit on the top of the list in my book. Rather, what makes a great zombie movie is one which follows the rules of zombie movies.
The RulesOk, first of all, I don’t think there are *really* any hard-and-fast zombie rules. Sure, some will argue about whether zombies should be able to run, or whether they should be intelligent enough to organize efforts on a minimal level, or whether they should have enough dexterity to turn a doorknob. But in my thinking, trying to pigeon-hole such an expansive field of horror-creature is just wrong.
So these are not the More >
ColdFusion Wrapper for Aviary Effects API
May 11th
Sometime last week, Aviary (the super-sweet collection of online image editing tools) launched their new developer site, along with a new Effects API. When I see “API,” I think “ColdFusion wrapper,” so that’s exactly what I did
Epic Music Import of 2011: Some Stats
Feb 8th
A few days ago, I posted some reflections on my efforts to import my CD collection into iTunes. Well, it’s finally done, and here are the final stats:
No. Songs: 4595 No. Albums: 592 No. Genres: 45 Library Size: 21.1 GB Biggest Genre: Religious Year Span: 1940-2011 Best Album: In Shallow Seas We Sail (Emery) Best Artist: Emery Best Decade: 2000′s Best Genre: Rock Most Used Word in Song Titles: “Love” Best Discovery: I have about every Toad album ever Most Disturbing: Clay Aiken Christmas albums *shudder*
Chrome Web Apps Upgrade
Feb 4th
Just a quick note–if you didn’t see, Google Chrome has revamped the display for your personal app dashboard. You can now re-order apps by drag-n-drop, rather than installing and uninstalling in the right order.
Check it out
CDs are a Hassle
Feb 1st
For about the last 9 years, my wife and I have been lugging around giant, fabric-bound cases of CDs. While most of the music we listen to nowadays is delivered via iTunes or MOG, we’ve held onto these portable discs of sound…and I’m not really sure why.
Sure, there are some gems that I’ve found–albums that I’ve all-but-forgotten about, but smile fondly when I am now reminded. But, it’s still mostly a pile of garbage…and it’s still something I can’t bring myself to throw away!
But finally this weekend, after going through the collection for about the 1 billionth time, I decided that I had had enough. I vowed, then and there, to ditch this pile of garbage for good…after I imported them into iTunes, of course
So I started importing the music, disc by disc, album by album. And here’s something I’ve noticed: when your entire CD collection is spread across several zippered carrying cases, it doesn’t seem that large. However, when you pile them all up next to each other–and have to wait on a less-than-speedy CD drive, you realize (very quickly) just how much of a chore awaits you.
Now here I am, nearly 60 discs into the over 350-disc More >