NaNoWriMo 2013
Every year, on my birthday, I make a new year’s resolution. Rather than using the arbitrary January 1st, I use the day that marks the beginning of my very existence to choose to start something anew.
This year, I’ve dedicated myself to writing. While I don’t have anything I can really show people yet, I’m developing a habit of getting words out of my head. Another step in that direction is National Novel Writing Month, or NaNoWriMo.
I last participated in 2006 (and last wrote about it in 2004), so it’s been a long hiatus, but I’m really going for it this year. Novel or bust! Who’s with me??
If you use Lift, you can follow my NaNoWriMo Lift Plan to hopefully arrive at a full-blown novel on November 30th.
The Arrested Development Documentary Project by Jeff & Neil — Kickstarter
If you love the show Arrested Development, like I do, you should consider donating to this documentary like I did.
I’ve made a huge mistake…
The Arrested Development Documentary Project by Jeff & Neil — Kickstarter.
jSimpleFader
TL;DR Introducing jSimpleFader, a jQuery plugin to simply fade between images.
UPDATE You can now visit the jSimpleFader Github Page for a live demo, since I know you’re lazy.
UPDATE Added a new option: animationStyle. Right now, the values are fade or crossfade.
UPDATE Added a new option: links. Set this to an array of hyperlinks you want to wrap around your images.
It’s something I’d done a hundred times before. You have a folder of images, numbered in sequence, that you want to fade and rotate through on your webpage. It’s a simple rotator (although, strictly speaking, nothing rotates) that I’ve copy and pasted from project to project with tweaks here and there. So when our designer asked if I knew of any good jQuery plugins that did that, I decided I should just make one myself. Introducing: jSimpleFader.
jSimpleFader is a jQuery plugin to simply fade between images. All it really needs is the total number of images you have, and it rotates through them. The code is straightforward. Just call $('#fader1').simplefader( 10 ); That’s it.
The plugin tries to do a lot of figuring out for you. Your images don’t need any particular naming convention; they just need a number in them. You don’t even need any particular HTML structure; there just needs to be an <img> somewhere. The script has a simple limitation: your images should start numbering at 1, although the first image doesn’t have to be the one on your webpage.
After the number of images, you can pass in an object of options. Here are the options you can set:
- speed – the speed of rotation in ms (default: 5000)
- animationSpeed – the speed of fading animation in ms (default: 600)
- animationStyle – the style of animation: fade, crossfade (default: fade)
- links – an array of hyperlinks
Like all jQuery plugins, you can have multiple faders on one page, with their own options, and everything should work fine.
Check out the project on Github, and feel free to participate.
Mixin and Variable Cascading in LESS
TL;DR Variables in LESS get overwritten, but mixins get combined. To overwrite a mixin, you’ll have to use CSS techniques or guard expressions.
LESS is a dynamic stylesheet language which adds a lot of features to CSS that are common to most programming languages. There’s a lot LESS can do, including adding variables, mixins, and math. Yes, math. You then compile your LESS files into the CSS that our browsers know and love. Whether you hate CSS or love it (like I do), LESS is awesome.
I’ve only started using LESS, and I was curious how it handles variables and mixins that have the same name. In a lot of programming languages, re-declaring a variable or function has the effect of overwriting the original. In CSS, the rules are cascaded, newer ones having precedence over older ones, depending on specificity. How does it work in LESS?
Variables get overwritten. If you first write @value: #000; and later write @value: #999; the value of @value when your CSS is compiled will be #999. This is true for @value everywhere, including previously included files. (Of course, follows the rules of scoping in LESS apply.)
Mixins, including parametric mixins with the same signature, get combined. Literally identical declarations will not be duplicated, but all other rules, even for the same property, just get concatenated together in one large block. Rules are listed in the order that the mixins are declared. The exception is identical rules, which are placed at their last declaration.
This behavior is probably deliberate, since it falls in line with CSS’s cascading nature. It appears that if you want to overwrite a mixin, you either have to redefine those properties the same way you would in pure CSS, or you can write a series of parametric mixins with guard expressions to ensure you get the mixin you want.
Here’s some code to illustrate the behavior I saw. There’s an included_file.less and styles.less which get compiled into the styles.css.
Shortcut Functions in CFML
TL;DR Create shortcuts to long-named functions: variables.__ = intermediateFunction;
For a recent project at work, I found that a function I was going to be calling a lot had a very long name. The function was a translation look-up. I pass in a string which represents a language key, and the function returns a value for the target language.
Because our project is heavily translated, it meant I’d be calling the method many times per page. It would going to be a lot of extra typing. The solution we found, to reduce that typing to a minimum, is something I’m calling “shortcut functions”.
Shortcut functions take three parts: the original function, an intermediate function, and the assignment of the shortcut function. With a shortcut function, you can go from writing application.translations.getTranslation( string ) to __( string ).
Don’t give me that look. That’s pretty cool.
- You should already have your original function. Chances are, it lives in another CFC somewhere, and that’s why you want to shortcut the name.
- Next you have to write your intermediate function. The goal of this function is to call your original function. We need this intermediate function to preserve the scoping of the original function. I like the pattern
shortcutOriginalFunction. Your intermediate function can be an anonymous function, too, which might be less confusing for some people. - Finally, you write your assignment. The assignment puts the intermediate function into the variables scope, so we can call it without an explicit scope. The assignment needs to go into the onRequest method of your Application.cfc and should not use parentheses. It should look something like this:
variables.__ = intermediateFunction;
Let’s look at some code. Included is an index.cfm, a translation CFC (which contains our original function), and the Application.cfc that works our magic. This code has only been tested on Adobe ColdFusion 10.
Introducing Ainsley Ann Rausch!

Well, the Miles Rausch family welcomed its newest member this week: Ainsley Ann.
Her stats:
- Born September 23, 2012
- At 5:59 pm
- Weighing 7 pounds & 3 ounces
- Measuring 19 inches & ½ of another inch
- Tends to sound like a pterodactyl
Everyone is doing well. Older brother, Ian, is absolutely obsessed with baby sister, which is a mixed blessing that will eventually get better.
Dinosaur Comics – September 17th, 2012 – awesome fun times!
Friday Fun: Yelp Review
Update: Bryce won. Read his entry.
Have a Yelp account, plan on eating out today, and want to have some fun? Well, you’re uniquely suited to play Friday Fun: Yelp Review!
The rules:
- Have a lovely meal out, but it must happen today
- Make or sign in to your Yelp account
- Write the funniest or most creative review you can before midnight in your timezone
- Leave a comment on this blog post with a link to your review sometime this weekend
- Repeat 1 – 4, if you want
- Come back on Monday to vote
- FAME
- FORTUNE (in the form of ADDITONAL FAME)
- A whole bunch of losers will post links to your review (see FAME and FORTUNE above)
- NO FAME
- ALSO NO FORTUNE
- You must post a link to the winning review on your social media with the explanation, “My Yelp review wasn’t as funny as this!”
I’ll put up a PollDaddy poll by Monday morning, I’ll leave it open for a couple days, and then announce the winner NEXT FRIDAY! Want an example? Check out Christopher Miles’s review of The Patriot Saloon.
And, have fun!
xkcd: Cautionary Ghost
.sosumi
After heavily drooling over iPhone 5 and iOS 6, I was reading the HTML for Apple.com‘s homepage, and I came across something that made me smile.
Here’s the snippet:
The division of code that details their legal info has a class of “sosumi”, which intentionally sounds and looks Japanese but is really a reference to a famous Apple sound and trademark dispute.
The short story is that Apple Computer had been fighting against Apple Corps for the right to use the name “Apple”. Apple Corps (owned The Beatles) gave them that right if they stayed out of music. Things got tricky, however, when it came down to anything even slightly musical, including system alert sounds.
When Jim Reekes was designing sound for System 7, the now-famous sosumi alert was thought, by Apple’s legal team, to be too musical. “So sue me” was Jim’s reply, which he then used as the name for the sound. Written as “sosumi”, he convinced the lawyers that it was Japanese, and they allowed it.
It seems someone on Apple’s web team remembers that story and still has a sense of humor about it. You can read (slightly) more on the sosumi Wikipedia page.
A Drip in the Space Time Continuum : diesel sweeties robot webcomic & geeky t-shirts
This is totally me, today.
A Drip in the Space Time Continuum : diesel sweeties robot webcomic & geeky t-shirts.
Playing with ColdFusion 10 locally on IIS 7.5 and Windows 7
TL;DR
My (current) preferred setup for developing on ColdFusion 10, IIS 7.5, ColdFusion Builder 2 on Windows 7:
- Create the CF Builder project
- Add a virtual host
- Add the IIS site
- Add the virtual host to the CF Builder server
- Update CF Builder project to use the new virtual host
Something new I’m trying at Security Labs is doing more local development, then pushing to a development server for testing. In the last couple of days, I’ve played with some setup, and I think I found the right mix for me.
- Right-click in the Navigator
- Choose New > ColdFusion Project
- Complete Project Details
- Project Name
- Use Default Location or Choose another location
- Choose CFML Dictionary Version (probably ColdFusion 10)
- Click Finish
Adding a Virtual Host
- Launch Sublime Text 2 as administrator
- Go to File > Open File…
- Navigate to C:\Windows\System32\drivers\etc
- Select “hosts”
- Click Open
- Add a new entry like:
- 127.0.0.1 testing.dev
- Save
- Ctrl + W to close the file
- Ctrl + W to close the app
- Launch IIS 7.5
- Expand to Sites
- Right-click > Add Web Site…
- Fill out web site details
- Name: project name above
- Select “ColdFusion” for the Application Pool
- This is a custom Application Pool that I made. It’s probably not necessary, and I don’t quite understand the settings.
- .NET Framework version: No Managed Code
- Managed pipeline mode: Classic
- Browse to physical path for your files from above
- Connect As…
- I use my Windows domain user
- Test Settings… should be all green
- Host Name: virtual host above
- Click OK
- Right-click the site > Add Virtual Directory…
- Alias: jakarta
- Physical Path: C:\ColdFusion10\config\wsconfig\1
- Right-click the site > Add Virtual Directory…
- Alias: CFIDE
- Physical Path: C:\ColdFusion10\cfusion\wwwroot\CFIDE
- Click OK
- Right-click the server > Edit Server
- Click Next >
- Click Virtual Host Settings tab
- Click New
- Name: project name above
- Host Name: virtual host above
- Port: 80
- Type: http
- Document Root: path to project above
- Click Apply
- Click Finish
- Right-click the project > Properties
- Select ColdFusion Server Settings
- Choose appropriate local server-host name
- Note: the Sample URL should use your virtual host from above
- Click OK




