existdissolve.com

the singularity of being and nothingness

Follow me on TwitterRSS Feeds

  • Home
  • About
  • Auto-Tune Theology
  • CFAviary
  • Gloss
256px-Ruby_logo

Learning Ruby: Day 5

Jan 26th

Posted by existdissolve in Cool Stuff

No comments

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

Constants

The 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 Statements

Ah, 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 >

Koans, Ruby
im_a_dinosaur_rawr-1738

CSS3 Infographic

Jan 22nd

Posted by existdissolve in Cool Stuff

1 comment

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 Here

So 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 Model

If 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 >

CSS3, Flex-box, Infographic
256px-Ruby_logo

Learning Ruby: Day 4

Jan 19th

Posted by existdissolve in Ruby

No comments

I took a couple days’ break from the Ruby train. I had some other things I wanted to do, and darn it, I did them! I also needed some brain-recuperation time. Oh yeah, and I was finishing up the last episode (or 10…) of Nura: Rise of the Yokai Clan.

But now I’m back!

Day 4 of Ruby entails some tasty symbols, regular expressions, and methods.

Symbols

While I knew this going in, I’m finding more and more that Koans are a great tool for teaching how to use stuff in a language. What they are not great at, however, is explaining precisely what the “stuff” is.

Symbols are a great example of this gap. They’re scattered sneakily throughout the preceding examples, and seem easy enough to use. However, defining what a “symbol” is by virtue of the Koan itself leaves a bit to be desired.

So I did some reading. I eventually came across a nice article entitled “The Ruby_Newbie Guide to Symbols” by Steve Litt. In this article, Steve makes a helpful, birds-eye exploration of symbols in Ruby, sticking to broad categories and avoiding getting lost in the weeds of over-definition.

I’ll let you read Steve’s article for the full scoop, but my reading of symbols is More >

Ruby, Symbols
im_a_dinosaur_rawr-1738

Chunky Checker: Some CSS3 Fun

Jan 16th

Posted by existdissolve in Uncategorized

1 comment

In keeping with my New Year’s resolution to not get involved in “black-hole” projects so that I have more flexibility to pursue fun stuff on a whim, I whipped up a fun experiment in CSS3.

The Main Idea

If you design a lot of forms, you know that radio and checkbox lists are hard to style. And no matter how perfectly you lay them out, they are still just plain boring. I thought it would be fun to make checkbox and radio lists a bit more fun by going an entirely different route, and by getting a bit more 3D.

Enter “Chunky Checker.” This set of styles takes an ordinary list of checkboxes or radio buttons and converts them into a super-chunky 3D list. As the radios/checkboxes are activated, the particular segment of the list transforms, creating a “depressed” look, sort of as if a button was physically pressed.

The Markup

This approach is completely, 100% CSS and HTML–no JavaScript whatsoever. Moreover, it uses a pretty standard markup. The following is all that’s needed to recreate the demos:

<fieldset>
    <legend>Favorite Color:</legend>
    <input type="checkbox" name="color" value="Red" id="red" class="red"/>
    <label for="red">Red</label>
    <input type="checkbox" name="color" value="Orange" id="orange" class="orange" />
  More >
Checkbox, CSS3, HTML, Radio
256px-Ruby_logo

Learning Ruby: Day 3

Jan 14th

Posted by existdissolve in Ruby

No comments

Wow. Three straight days of the same thing, and I have yet to get distracted or go wandering off into some endless, pointless project. Maybe I’m learning something after all!

Day 3 of Ruby Koans brings 3 new lessons: array assignments, hashes, and strings.

Let the fun begin!

Array Assignments

With one significant exception the array assignment koan was pretty straightforward. Dealing with arrays in most languages is pretty straightforward, and the idioms used in Ruby are much of what you’d expect.

A couple interesting things, though.

First, let’s say that you try to access a position in the array that doesn’t exist:

icecream, gummybears = ["Vanilla"]
favorite = gummybears

In this example, I’m trying access the “gummy bears” position within the array. However, it doesn’t exist. Instead of annoyingly erroring out, Ruby returns nil. Remember, nil is an object. So no error, but something useful to deal with. Nice.

But the most interesting part in this koan was the brief example of using the “splat operator.” Before deferring to others for an explanation, here’s the example:

first_name, *last_name = ["John", "Smith", "III]
last_name = ["Smith", "III"]

In this example, using the splat operator (*) when assigning “last_name” not only assigned “Smith” and “III” to last_name, but additionally transformed them into an More >

Koans, Ruby
256px-Ruby_logo

Learning Ruby: Day 2

Jan 13th

Posted by existdissolve in Ruby

2 comments

Day 2 of my journey to learn Ruby covers 3 koans: nil, objects, and arrays. If anyone is interested in how I’m running the koan tests, I am simply loading the base-level path_to_enlightenment.rb file from Terminal, and I’m using Xcode to modify the individual koan files. Yes, I said it. I’m using Xcode.

Don’t be a hater. It was the program that opened when I double-clicked the first koan. It seems to work fine for what I’m doing. Will I try other editors? Probably. Are there better ones? I’m sure there are (VIM, maybe?), but I’ll never know which is the best until someone leaves a comment and tells me which one is best!

Alright, enough of that. On to the koans!

Crazy, Interesting Nil

When I saw nil, I thought, “oh, this is NULL”. A keyword, placeholder, something special that represents no-thing. In Ruby, though, nil is interesting, if for no other reason than that it is an object. Yep, an object…definitely not “NULL”.

As an object (e.g., nil.is_a?(Object) == true), nil has its own methods. Consider the following:

nil.to_s => "" (e.g., nil to string == empty string)
nil.to_i => 0 (e.g., nil to integer == 0)

So in a scenario in which you have to deal More >

Koans, Ruby
256px-Ruby_logo

Learning Ruby: Day 1

Jan 12th

Posted by existdissolve in Ruby

3 comments

So, 11 days into the new year, and I’m actually still going pretty strong with my resolution to make time for learning new (to me) development skills. Yay!

Recently, I was working on a small project where I needed to emulate some of the color transformations from SASS in JavaScript. In order to do this, I needed to dig into the source code, written in Ruby. I was able to suss out what I needed easily enough, but the syntax and approach in Ruby intrigued me. So I figured, what the heck, let’s learn Ruby!

Getting Started

I wanted to start small and easy, so after installing Ruby, I followed the nice and accessible “Ruby in Twenty Minutes” tutorial at the main Ruby site. It’s nothing earth-shattering: your typical “Hello World” turned “Say Hello to Everyone” introduction. However, the tutorial is easy to follow, gives you a nice overview of the some of the syntax conventions that are to come, and (at least for me) leaves you wanting to continue with exploring Ruby.

Where to Go From Here

As with any language, the obligatory “Hello World,” while giving you a taste of the language, does very little in the way of actually teaching you what Ruby is More >

Koans, Language, Ruby
sencha-logo

ColdFusion Queries to ExtJS Data Models

Jan 8th

Posted by existdissolve in ColdFusion

2 comments

I love data Models in ExtJS. They are extremely simple to use, but are amazingly powerful for driving robust JavaScript applications. In fact, I’ve gotten to the point where I use them in just about everything I do, and they are fast becoming an indispensible part of my JavaScript development approach.

A big part of the appeal of ExtJS data Models is their flexibility. While some data “plugins” in other JS frameworks certainly allow you mimic some of the behaviors of a data model, ExtJS’ data Model wins hands down because of its extreme flexibility. With a ExtJS Model, you can quickly and easily create powerful definitions of data objects (fields, data types, associations, validations, etc.) in your application. These models can then in turn be used to craft a data Store, which can themselves be plugged into many of ExtJS’ data components (DataView, Grid, Chart). What you end up with is a super-powerful, deeply-data-driven application in a ridiculously small number of lines of code.

Of course, the perfect complement to the simplicity and grace of ExtJS’s data Model is to “feed” it using ColdFusion. Below, I’ll outline how to retrieve data from CF, as well an extremely easy way (there are More >

ExtJS, Model
im_a_dinosaur_rawr-1738

Sugar: A Bit of JavaScript Sweetness

Jan 5th

Posted by existdissolve in JavaScript

3 comments

Twitter never lets me down

Today, I stumbled upon Sugar,  a really nice–and small–JavaScript library. Unlike monster libraries such as jQuery and ExtJS (which are awesome in their own ways…), Sugar is narrowly focused. It’s niche is simply extending native JS objects with intuitive methods.

So want to capitalize the first word in a string? Easy: string.capitalize(). Want to replace dashes/underscores with spaces? Nothing to it: string.spacify().

I’ve worked up a quick couple of demos of a few of the string methods, just to show how dead simple Sugar is to use. Of course, you should check out Sugar’s API for the full enchilada. Mmmm, enchildas…

Impressions

While I am a die-hard ExtJS user, there is something about the simplicity of Sugar that I really like. While it certainly won’t give you the tools to build a full-fledged web app with components, data grids, and what-not, it’s perfect for the small or one-off websites/pages where JS’ native objects could use some extra lovin’.

The one drawback (and it’s a slight one) is that there does not appear to be a way to do a custom build of Sugar to include *only* those methods which you need. According to their blog, this is because of some internals of Sugar More >

Javascript, Sugar
im_a_dinosaur_rawr-1738

Resolutions and Stuff

Jan 2nd

Posted by existdissolve in ColdFusion

No comments

I’m not big on resolutions. When I’ve made them in the past, I typically last about 3 whole days before they’re broken and forgotten. Besides, there’s something a bit odd about resolutions anyway. After all, why would we wait until a New Year to do something (lose weight, exercise more, etc.), when it makes a lot more sense to do these things *before* the year begins so that we have the benefit of whatever change for the whole year?

Ah, but that’s the neurosis of the Western mind; what can be done about it? Nothing

But even though I’m reticent about making resolutions, I have been thinking about the year that lies ahead, particularly from a professional standpoint. Over the last year, I’ve been very productive in my professional development. Particularly in relation to ColdFusion, JavaScript and SQL, I have tremendously expanded my competency, and I feel quite comfortable with where I am as a developer.

However, as we all know, complacency can be a silent killer. While it may not immediately harm a person in relation to their employment prospects, it can be detrimental in the long-term, if nothing else than by souring them to the prospects of learning new skills, More >

2012, ColdFusion, Resolutions
12345»102030...Last »
    • Recent comments
    • Popular posts
    • Archives
    • Tags
    • Categories
    • Adobe (1)
    • Audio (10)
    • Books (7)
    • ColdFusion (41)
    • Cool Stuff (35)
    • Flex (5)
    • General (25)
    • JavaScript (54)
      • AJAX (1)
      • ExtJS (25)
      • jQuery (1)
      • Sencha Touch (3)
      • Spry Framework (18)
    • Microsoft (8)
    • Mobile (4)
      • Sencha Touch (4)
    • Music (26)
    • Philosophy (16)
    • PHP (1)
    • Ruby (5)
    • SharePoint (8)
    • Sitecore (5)
    • Social Media (5)
    • Theology (81)
    • Travel (1)
    • Uncategorized (4)
    • Video Games (4)
    • Web Design (45)
      • CSS3 (3)
      • HTML5 (9)
    • Web Development (12)
    • WordPress (1)
    Adobe AIR AJAX Anthropology API Athanasius Atonement Atonement Theology Auto-Tune Blog Action Day CD Review CFScript CFSharePoint Christology ColdFusion ColdFusion 9 CSS CSS Gallery Emery Environment Eschatology ExtJS ExtJS 4 Facebook Forgiveness General HTML HTML5 Koans Linguistics Music Origins Probability Ruby Sencha Sencha Touch SharePoint Sitecore Spry Spry Framework theming Theology Web 2.0 Web Design WordPress
    • January 2012 (10)
    • November 2011 (2)
    • October 2011 (1)
    • September 2011 (5)
    • August 2011 (11)
    • July 2011 (3)
    • June 2011 (1)
    • May 2011 (4)
    • April 2011 (4)
    • March 2011 (4)
    • February 2011 (4)
    • January 2011 (3)
    • December 2010 (7)
    • November 2010 (10)
    • October 2010 (9)
    • September 2010 (8)
    • August 2010 (19)
    • July 2010 (16)
    • June 2010 (17)
    • May 2010 (7)
    • April 2010 (3)
    • March 2010 (4)
    • February 2010 (3)
    • January 2010 (7)
    • December 2009 (2)
    • November 2009 (4)
    • October 2009 (8)
    • September 2009 (3)
    • August 2009 (3)
    • July 2009 (1)
    • May 2009 (5)
    • April 2009 (2)
    • March 2009 (1)
    • February 2009 (1)
    • January 2009 (1)
    • December 2008 (3)
    • November 2008 (3)
    • October 2008 (4)
    • September 2008 (2)
    • August 2008 (5)
    • July 2008 (6)
    • June 2008 (6)
    • May 2008 (13)
    • April 2008 (4)
    • March 2008 (11)
    • February 2008 (3)
    • January 2008 (5)
    • December 2007 (5)
    • November 2007 (2)
    • October 2007 (10)
    • September 2007 (10)
    • August 2007 (9)
    • July 2007 (8)
    • June 2007 (28)
    • May 2007 (2)
    • April 2007 (2)
    • March 2007 (2)
    • January 2007 (2)
    • December 2006 (2)
    • August 2006 (2)
    • July 2006 (3)
    • June 2006 (4)
    • May 2006 (3)
    • April 2006 (4)
    • March 2006 (3)
    • February 2006 (4)
    • A Study Bible to End All Study Bibles (42)
    • A Little Taste of Spry 1.6 Goodness (22)
    • The Closing of the Evangelical Mind (20)
    • Where No Man Has Gone Before (19)
    • Thoughts on Christian Ecumenism (17)
    • Sencha Touch Theming: Building Our Custom Stylesheet with SASS (15)
    • Sara Bareilles – Little Voice (14)
    • Yet Another Reason Calvinism is Certain to Die (12)
    • Sencha Touch: JumpToNode and the NestedList (12)
    • Come Let Us Reason Together – A Call for Sacramental Reevaluation (11)
    • Taj: How do you get the dragons out of the breeding ground? Or are they stuck in there?
    • The One: Next time please put "Some Caveats" section up top!
    • existdissolve: Hi Dale-- Did you try using the "mapping" attribute in the field definition config? For example,...
    • existdissolve: Thanks for the link to the Ruby tutorials--i will definitely check it out!
    • Moorthy: Thanks! It helped me!
    • Dale: Any help would be appreciated.... I am using Coldfusion 9 and Extjs 4.0.7 This is my...
    • existdissolve: Thanks for the suggestion for extra reading...I will definitely check it out!
    • Ruben: Hey! Really interesting! My resolution for last year was learning Ruby (never happened) but this...
  • My latest tweets

    existdissolve
    existdissolve
    267 followers
    • Holy awesome this is awesome http://t.co/cYvw9osoabout 15 hours ago
    • My frantic attempts to choke Wolf Blitzer via the force aren't working #CNNDebateabout 17 hours ago
    • There are few things more pitiable than when mousy Santorum puts on his angry face. Poor guy... #CNNDebateabout 18 hours ago
    • Old white guys arguing about bond investments is hilarious #CNNDebateabout 18 hours ago
    Follow me on Twitter!
Mystique theme by digitalnature | Powered by WordPress
RSS Feeds XHTML 1.1 Top