"fallenrogue" Under Leon's hat.

Sun Dec 20

JavaScript Part 5 - The Client Side

So, if JavaScript ever really had a true intention, I believe that intention was to bring static HTML documents to life. I’m sure if we read the history since 1995 (give or take a year) then we’ll notice that most work with JavaScript was aimed at giving the static web a much needed shot in the arm.

To understand how JavaScript works its magic we have to dive into the DOM or Document Object Model and it’s relationship to the document being rendered to the client.

DOM: The Document Object Model

At the top of the stack we have the object that does the presenting to the user: The Window aka The browser. This is represented as the Window object. A window is presenting one document at a time (I mean, you can’t have more than one URL at once, right? Well, frames but those are children of the main document.) and therefore Window has a property of Document.

window.document

or just…

document

Why can we just call on document? Because our top level object is implicitly the window. Pretty sweet, right? Making sense? I hope you said yes. If not, we’re just looking at the HTML document you requested from the server the same way JavaScript does… as objects. Now we know we’re speaking the same dialect but what else is added?

In plain English: The DOM is an object model for traversing and manipulating documents rendered by web browsers. There is a W3C standard for the DOM and the reason that JavaScript can hurt is because it is inconsistently implemented by browsers. So developers took to writing a lot of boiler plate “browser sniffer” code to ensure that behaviors were similar for all users viewing their sites. Internet Explorer is typically dragged through the mud because it’s version 6 of the browser was exceptionally slow to adopt DOM elements and events as standard and instead continued down its own path. But why? The answer is simple. IE 4 and 5 drove innovation in the DOM/JavaScript space. IE added additional attributes and events, e.g. drag and drop

As you can imaging there are various objects representing the HTMLElements that are part of the document (and some that may not be!) so we won’t list all of them here, I just wanted to let you know the top level context in client side JavaScript (window) so that you’re not surprised but what you’re going to see when we move to the bane of client side JavaScript: Events. (this is, without jQuery or your lib of choice!)

So, working with the DOM is made stupid easy when you’ve got help in the form or jQuery or MooTools or Prototype or some other lib that equalizes the DOM implementations of various browsers. Those folks are doing great work and I encourage you to use them (I certainly do!) for your work. BUT let’s look at what Mozilla’s Firefox does with HTML events so we can see how these event objects and the implicitly passed this contextual object cause confusion to the uninitiated.

First we have to establish an event to listen for. We do this in Mozilla’s flavor of JavaScript by doing adding a “listener” to a particular event. How about a click on a button? Easy enough. :)

Here’s the HTML document we’re going to use. Save it as an html page and open that document in Firefox. Open Firebug and follow along.

OK, first up is to grab a reference to the button element in the document.

var btn = document.getElementById("clickr");

Now, let’s create a simple function that will handle clicks the user makes on “clickr”.

function ourCallback(evt){
    alert(evt);
    alert(this);
};

Now let’s listen for clicks on btn.

btn.addEventListener("click", ourCallback, false);

If you’ve been reading along then it should come as no surprise the to types of objects that are alerted when we run this code in the Firebug JavaScript console.

The event object sent as an explicit argument is… [object MouseEvent] The this operator at this point gets the value of the implicitly passed sender… [object HTMLButtonElement]

So our button is this because it directly broadcasted the click and all listeners know who initiated the click.

That should make pretty good sense by now but what happens if the callback function has expectation on this that we’re not going to know at runtime? Here’s a case where things can be odd and cause lots and lots of frustration, well at least for programmers in the late 90s. :) Let’s create an object that simply counts a number every second. We’ll add an interval counter that alerts that value. Sounds simple right? It is, if you know what to expect when using this. Consider the following…

var ob = {count:1, currentCount: function(){ alert("my count is "+ this.count);}}
ob.currentCount();
setTimeout(ob.currentCount, 2000);

So, what’s going to happen when we run this sample? We’ve created an object to do our incrementing (even if we don’t have an incrementer for it… details!) for us. On line 2, ob calls currentCount and then on line 3 we ask the window to tell ob to call currentCount after 2 seconds. right? well, not so much, go ahead on run it. If you’re following along you’re going to see the following message alerted to the window:

my count is 1
my count is undefined

OH NOES!!! That’s right, friends, let’s read these same 3 lines of code the way JavaScript did… in plain english:

“Ok, the programmer created an object with one property and one method and assigned it to a variable named ‘ob’. Cool. I can do that. Next the programmer is asking ob to call currentCount. Cool, no problem. Finally they want the window to call currentCount in 2 seconds. done and done!”

You see, here we have our first curiosity caused by the simplicity and power of JavaScript. Remember when we said functions where higher order and first class citizens? Remember how “this” refers to the contextual object? Well if you do, then in plain english, what is happening here is that we’re delegating the function defined in ob.currentCount which is

function(){ alert("my count is "+ this.count);}

So, when we call the setTimeout method we’re just caching the function signature and not any reference to the parent object that references the function. So when the function is called after 2 seconds what is really being called is this:

window.currentCount(); 

But that’s not what we mean. We want ob to call it. SO, let’s not forget that other great feature of JavaScript: closures. Let’s instead, curry the exact state that we want in the form of a closure to be called at the timeout.

setTimeout(function(){ob.currentCount();}, 2000); 

Now when you run line 3, you should see the right alert message. WOW! Isn’t JavaScript cool?! I think so! Anyway, I hope that goes a long way to helping you understand what’s going on in the browser when you’re using JavaScript. Even though libraries like jQuery let us forget about these particulars when we code it’s nice to know what’s going on under the covers. :)

Comments (View)
Wed Dec 16

JavaScript Part 4 - the “this” operator

OK, take a deep breath, hold your nose and get ready to finally understand this.

When my friends first dive into JavaScript the this operator throws people for a major curve. To really understand what it is I’m going to try my best to distill its essence into a simple explanation that while not fully encompassing the nuances of “this” use should go along way to helping you understand the resulting behaviors of using this.

From Mozilla:

The this keyword refers to the context object aka the current object.

See, that’s simple right? Well, not really. The problem presents itself when we add in JavaScripts scoping rules (hopefully in this series soon!).

OK, first this being a pointer to the context object is passed into functions implicitly. That’s right folks, it’s not sitting there waiting in the scope that it was originally created in, no, it’s actually passed through to functions auto-magically when you call a function. Consider the following code running in a browser context.

var frank = {name:"Frank"};
var betty = {name:"Betty"};

function sayMyName(){
    document.write(this.toString()+"'s name is "+this.name+"<br>");
}

betty.sayMyName = frank.sayMyName = sayMyName;

All we’ve done here is introduce a few new objects, frank and betty, a globally accessible function called “sayMyName” and gave both betty and frank properties that will call that function. So, if we run this we’re going to see…

[object Window]'s name is
[object Object]'s name is Betty
[object Object]'s name is Frank

Ah, did you see what happened there? the first time we call it the current top level context in the browser is actually the Window object! It was passed to our function (because there’s always a caller) implicitly. So, when betty calls the function the betty object is the current object making the call. Therefore, we see it’s something of type Object (remember where we inherit from?) and that it responds to name with Betty. Frank is the same.

The lesson here is that this is not set when the function is defined it’s determined when the function is executed and the current contextual object is this. So, where does this mess with people’s heads? Check this example out…

Let’s run this sample and then run it again with the commented out line… well back into the code. That should bring this crazy subject clearly into light.

The important thing to remember is that this is a reference to context object. When we transfer the context to a variable in the top level (global) space we’re really adding that as a property on Window in the case of browser scripting. So, the first time we call it, name is not defined, but if you call it a second time, you’ll notice that name is updated to the variable and since window now has a name value it’s printed to the screen.

There’s a whole host of variations on this very wide topic but I believe if you understand exactly what this is referring to it can help you to quickly identify when it’s been used in an unintentional way in your JavaScript code. In fact, having written this part, I believe we could do another follow up on the quirks of this in the browser which is where most will have context to it. Events… yes… events + this can be tricky. Stay tuned for that. :)

Comments (View)

JavaScript Part 3 - Prototype Based Language

For a few years the alpha geek crowd has been debating (read: justifying their own preferences) what type of Object Oriented Language features are the most developer friendly. I never have the heart to remind these folks that everyone experiences the world differently and some will always understand class based OO and others want something else. Well, one of those “something else” is used in JavaScript: Prototype Based Objects.

Given my known readership and audience I’m going to assume you’re all familiar with a class based language. I’m going to use C# in this example but the comparison should hold up for similar languages like Java.

Let’s take a look at defining a class with with to create objects (a.k.a. instances). My example is a simple model that most folks can relate to… Person!

C#

Now let’s do the same thing in JavaScript…

JavaScript

These examples are nearly identical from the standpoint that they represent the same data. They are 2 ways of saying the same thing, one in class based way and the other in a prototype based way. By assigning the proto attribute on a prototype based language you’re essentially saying this is your new “parent”, thus providing the object the features and functionality.

Now, in the JavaScript version we did not create a constructor for creating those objects but we can do that too if we like…

And finally, remember that our functions are first class citizens and can be used to establish members for an object.

Now, proto is not the idiomatic why of defining this inheritance. Most the time you’ll see the more common “prototype” property. Why did I show the other? Just giving you options. Here’s a slight variation on what we’ve done using the prototype object.

As you can see, this is very close to the version I presented and is more common. It’s nice to know but methods just for your own reference. I personally prefer the latter but that could be habit more than preference.

OK, well, that’s basically it for now from a 500000 foot view. Well talk more about this awesome topic soon!

Comments (View)

JavaScript Part 1 - hello JavaScript!

JavaScript is an object oriented scripting language.

It is a dialect of the ECMAScript standard.

It is dynamic, loose typed and prototype-based.

It has first-class functions. That means a function is an object in JavaScript. You can treat it as such.

If you’re looking for some history of the language and an introduction of the “why” check out Mozilla’s A re-introduction to JavaScript And once you’ve ready that or if you’re skipping it please continue…

It’s time to say hello to one of my favorite languages again. This time from my perspective. If there’s something you love, I believe you have little reason not to share it with the world. Do I want everyone to start programming in JavaScript? Well, that’s a lofty goal and not really my point here. My point is more to share my passion and clear up a few misconceptions.

So, play along with me friends… first task is to create a way to play. There are many but I’m going for low barrier for entry. Open firefox and download (if you don’t have it) firebug.

Now that you’ve got a way to play with JavaScript and the DOM, let’s start building a better understanding the features of the language. Create a blank HTML page and open it in Firefox. This will be the blank canvas with which we experiment with the language in a REPL style system via Firefox and Firebug. Let’s play with the loose type system first. Try assigning a variable a numeric value and then assign the same variable a string.

See? Type is loose.

Wanna see why we functions are “first-class” or “objects”? Let’s create a function. The syntax for creating a function is…

function [name](params[,n]){
    //method body
}

Now, why is name optional? Because functions, even without a name, are still objects. A common practice is to keep the function anonymous but assign it to a variable for later use.

var sayHello = function(say){alert(say);}

If you type both types of function into firebug you’ll see…

That they can be called the same way and as objects can be passed around just as you would any other type of object.

Internet darling jQuery makes extensive use of this feature in its implementation. It typically calls this practice “accepting a callback” which is just another way of saying “give me a function to call when I’m done doing whatever I’m doing and I’ll call it. I will also pass that function data related to my initial task.”

Finally, what does it mean to be “prototype based”? Well, that’s where we’re going to start Part 3, so until next time write something fun using Firebug and JavaScript. Try using the DOM’s document object to write something to the page.

See, good times. gooooood times. :)

Comments (View)

JavaScript Part 2 - The Free Stuff

This is a tough one. I don’t generally like to discuss the built in objects of a language because they are easily searched for. Instead I’ll list a few and then talk about using them as that’s a little more subjective and worthy of discussion and continual review.

Quick Reference:

Types

  • Numbers
  • Strings
  • Booleans (true|false)
  • Objects
  • undefined and null

Special Objects

  • Date
  • Regular Expression
  • Functions
  • Array

So, yeah, mostly these will function as you’d expect them to. Therefore, as I stated before, let’s skip that. Instead let’s discuss some fun things that are legitimately ambiguous to developers sharpening their JavaScript knives.

Objects in JavaScript

One of the things that throws folks is the notion of object being a specific type and staying that way after being initialized from a class. But in JavaScript objects are more like Hashes in Ruby or Dictionary<key, value> in C#. If you make that mental connection then seeing the JavaScript Object Notation (or JSON) will provide context for what you’re working with.

If you remember from part one, our first object creation was done as such:

If you look the object is created as it’s defined using the object notation which looks remarkably familiar to just some key-value collections mentioned about. When doing this you can then access those properties on the person instance using the dot or [] notation

person.name
person["name"]

both are fine ways to access the properties on your objects. So, knowing that, there are a couple of ways to create new objects in JavaScript they both establish a direct relationship to the super “Object” class.

var person = new Object();
var person = {}; 

{} is object notation so by specifying it on the right side of the assignment operator (=) yields a new Object instance to person.

There are many different ways to use the properties of this new object (which we mentioned earlier see new/[]) but the important thing to note is that since our objects have no concrete relationship to strong types we can access and assign properties on our objects at will.

person.likes_cake = true

if perfectly legal even if the member “likes_cake” is not a property on person. This allows for some real dynamic behaviors to occur at runtime. So, why would you use [] vs the . property syntax? Well, if you’re a daring individual you could assign properties that are named the same as reserved keywords. for example, “if” is a reserved keyword in JavaScript so just coming out with

var letter = {};
letter.for = "leon@foo.com"

is not going to work. BUT if use the [] property notation we can!

var letter = {};
var letter["for"] = "Leon@foo.com"

pretty cool stuff there! I don’t know that you’d want to do it from an idiomatic standpoint but it’s possible if you’d like to have it.

Functions

Functions are important to understand and as a bonus they are remarkably simple to understand. Basically, here are the “rules” to live by…

  • defined with the function keyword
  • optional name
  • optional argument list
  • code block to be executed when the function is executed.

AND as a bonus every function gets a few properties that may be of value. One of my favorites is the “arguments” object. It’s just an array of all the arguments that were passed to the function. Let’s play a bit with it.

pretty excellent stuff, right? many languages share this feature but I enjoy the compact way that JavaScript lets you extend the use of a functional all the way to runtime. Now that’s fun but with all languages that provide higher order functions it becomes very important to understand how they can be called recursively. Tail recursion (in short: last part of the function calls itself again until told not to) is an important concept but how do you know what do call again if your function has no name? Well, the answer lies in the arguments object. Let’s write a small tail recursive anonymous function. We’ll assign it so that we can call it a first time but since it doesn’t know what it’s own name we’ll use the arguments object’s callee property to call the method until we’re done. Type along with me using FireBug…

In there we see 2 things: first that the callee property is a little more than just a pointer to the current function, it also is an object that is persisted across the function calls so we were able to use that to hold a reference to a number as we counted down from the first argument that was passed in. Pretty cool, right!? That’s some wonderful, powerful introspection and provides JavaScript some of that signature magic that makes me fall in love with it over and over again.

Next we’ll take a look at arguably the most powerful feature in JavaScript and one that has gained a lot of exposure in other languages recently: closures.

Closures

Now closures have variation of definition and the minutiae of that semantic debate are not in the scope of this article. Instead let’s go with the following simplistic definition: closures maintain the scope of the variable at the time that the function is created and persisted after you believe they have fallen from scope. A simple example of this “scoping” would be using an inner function to establish an outer scope while establishing an inner scope for later use.

function greeting(prefix){
    return function(name){
     return prefix + " " + name;
 };
}

helloTo = greeting("hello there,")
document.write(helloTo.toString());
document.write("<br><br>");
document.write(helloTo("Leon"));

let’s run this code to examine the results in our REPL environment: FireFox+FireBug :)

That’s enough for now, friends!

Comments (View)
Wed Nov 25

Cucumber intro

Well, I’ve had a few requests for the slides on this one. So, without further adieu, I present the slides for my cucumber introduction.

I will also be presenting this topic at CodeMash in January and the Cleveland Ruby Brigade on 11/30/09. So, stop on by and let’s talk BDD in person.

Comments (View)
Thu Nov 5

Re: “It’s OK not to unit test” or what you do on your time is your business.

Read this. Don’t skim, read the whole thing. Then come back here. I have a thought that I wish to express here and it may be controversial to some. You’ve been warned.

The issue in this cashto’s blog entry hovers mostly around platform and language. Simply put, unit testing is the art of testing small units of code. In Test Driven Development you do not write new code until you’ve written a test that clearly articulates your intent. You essentially use the code that you plan to implement via a test and only then write the implementation behind the api that you’ve just crafted. That process has a side effect, commonly referred to as “Emergent Design”. One commonly documented side effect of Emergent Design is that it encourages highly modular, de-coupled sections of code that have high cohesion and low coupling. In some circles, these are indications of a healthy code base.

Now, having spent a great deal of time in C# and about a year doing Ruby professionally, I can say that the approach that I prefer to take, BDD, is significantly more complex in a static language on a proprietary platform than when writing similar software in a dynamic language on an open platform. Therein lies the difference. When I read articles like this, I see them almost universally from the static language camp. By camp, I mean to imply that these are folks that have chosen to work in static typed languages on open and closed platforms. The bemoan the time it takes to craft tests, ponder their significance and after some frustrating exploration chalk it up to another fad but ivory tower academics. The problem with this assumption is that these techniques are solving big problems for folks like me who, in a dynamic language, needs a little more coverage to ensure that the expectations I’ve defined for the system are being met. Unit testing provides this. If I were interoperating with SharePoint’s object model (and I have… extensively) then I would not worry about unit testing. Why? Because the effort that it takes to isolate the units provides diminishing returns against how I will write it. So, if you want to skip it there… I’m not gonna hold it against you. BUT, if you write a Ruby gem that I plan to use and I install it and run the tests and there are no tests then you’re not playing nice and I WILL hold it against you.

Yes, my expectations for cultures and communities is slightly different. That’s me. that’s my experience. How about an analogy? In static languages, I believe that Dependency Injection is a valid and powerful pattern. In Dynamic languages it’s a waste of time that provides no value. Does that mean that DI is bad because I prefer a dynamic language? No, of course not. It only means, given my circumstances, DI is worthless. Is DI worthless? no. Make sense? Yes. Sound overly politically correct? Yes.

This is all to provide the following context: The blog above was written by a man who works for Microsoft on Microsoft products. Given their slow uptake for developer testing support and de-emphasis on unit testing and TDD(ing) .NET projects. That’s the experience that has shaped cashto’s reality and you should know that when you read that article. It’s no wonder, to me, that when developers look to gain from the experiences of developers outside their home platform they grow frustrated and no amount of practice ever seems to make the problem go away. The reason is not that they don’t understand or haven’t tried the idioms they see rather that culturally, it is not valued in the same way that watching the compiler fail is, or in the case of ASP.NET, the same way pressing F5 and getting a mini browser REPL going is.

When I worked, briefly, at Telligent their code base was written using that “Microsoft” model. I often tried, sophomorically, to get the entire team to see the benefits of testing, because I was needed it in my own workflow. As the other developers either sided with me or against me I noticed how smart people with lots of experience can simple never come to an agreement. If I wasn’t laid off, then it was clear to me that we were probably never going to be a match made in heaven. That’s not a slight on Telligent, they were a great employer and I got to work with some very highly respected developers in the Microsoft domain. It simply proved to me, that I didn’t belong there. So, I joined EdgeCase. Suddenly I’m not fighting anymore. I’m not arguing. I’m back to the business of writing software and not fighting ideological battles and writing “memos”.

So, is it “Ok not to write unit tests”? Sure, of course it is! If you wish to do so, it’s quite alright. The chances are, though, you will find it difficult to relate to and work with an increasing number of talented software craftspeople who believe in automated testing as a fundamental aspect of their workflow and that would be the real shame.

Comments (View)
Sat Oct 17

My jQuery talk for the MVC firestarter

Hey, if you would like to follow along today during my 1:00 talk please feel free. If you missed it, here are the slides, I’ll publish the code samples some other time.

Comments (View)
Fri Oct 16

Goodbye, Twitter

Twitter has done more harm to my emotional state than it has ever done good. The good is that for people that I really enjoy communicating with I get insight into their lives and what they are into. Twitter was a place that helped me find EdgeCase and for that I’m grateful but one good thing and n+1 arguments, well, it’s not balance.

The bad part is that sometimes you do not want a direct line into someone’s inner most thoughts, including my own. People sometimes get quite hostile when you’re not agreeing with them and they often think that an alternative opinion is ALWAYS a request for debate. Sometimes it’s not. Sometimes it’s just view from an alternative perspective. Not a excuse for a 140 character lecture.

Anyway, the signal to noise ratio on twitter has led me to the point of truly diminishing return with the service and I’ve deleted my account. Who know, perhaps this will get me back into blogging… probably not too heavy though.

The point of this post is that while I had fun, everything ends and for me Twitter ends today.

Comments (View)
Tue Oct 6

Because I’m lazy… Fundamentals of OOP in C#

Here you go friends, I’m sorry this took soooooo long but it’s up.

Fundamentals of OOP in C#

:) Please to enjoy!

Comments (View)
Thu Sep 17

The Leon Gersing over-exposure tour continues!

If there is such a thing as over exposure, then I’m experiencing it at the moment. So, please try to bear with me and I’ll do my best to keep from jumping the shark. For those interested here’s a list of some shows that feature me. Also, a few notices of where I’ll be speaking in the near future, please drop by and let’s chat! :)

David Giard’s Technology and Friends - Leon Gersing on Ruby We had a great time taping this during DevLink!

Dot Net Rocks #476 - Is Software Too Complex? I’m not featured but do speak from the audience… which lead to:

Dot Net Rocks #482 - Leon has a love affair with Ruby! - That’s me talking about using language as the right abstraction.

Deep Fried Bytes #36 - What happens in the speaker room is supposed to stay in the speaker room - What started as a group session for my burnout has become a podcast! Make sure you listen through the credits for some great outtakes!

UPCOMING DATES -

Tuesday 9/22 - Quick Solutions Suite in Polaris - Cucumber 11:30 AM - This lunch and learn goes over the basics of BDD and using Cucumber as a tool to bridge the gap between technology and business.

Wednesday 9/23 - Software Engineering 101 - Introduction to OOP using C# and TDD hands on - in the first session we’ll cover the basics of OOP and how those are applied to C#. In the TDD session in the afternoon we’ll be building a small game together using the TDD method. Bring a laptop and courage!

10/15 - Louisville .net user group - Cucumber talk from above

10/17 - ASP.NET MVC firestarter - JQuery 101 - what it is, what it does and how to use it. In this session we’re going to talk about jquery from bottom to top.

That’s it for now! Come say hi!

Comments (View)
Sun Aug 2

Value and Money are not the same.

It’s difficult in the U.S. to really understand value. The value of a hard day’s work. The value of a hug. The value of trust. The value of the qualitative. When commoners in the middle to lower classes in America debate politics they do so in an aimless, impotent fashion that allows them to build fortresses of self perpetuating plausible deniability. Instead of understanding issues fully, contemplating the nuance and subtly of an issue, many resort to scripted straw man rhetoric recycled from the “news”. I use “news” in quotes because in a for-profit market even the news is bought and paid for. The information is presented in the same way it is regurgitated and our collective ability to think critically and creatively suffers.

When I think back to my youth I think back to my parents talking of times of social change and solidarity. They were hippies by their own admission but it’s clear to me that my mother more than my father held to their ideals. It’s possible, I assume, that he was just trying to get laid (successfully, if you count me and my brother) but I digress.

The health care debate rages on in Washington DC but just like the last 6 elections in this country the debates and arguments are semantic bordering on dogmatic. Representatives are not listening to their constituents because they don’t need to. The changes proposed feed a for-profit medical system at the expense of the very constituency it’s trying to help.

Single Payer is not on the table and Obama’s solution is a government run insurance plan. Wait… what? you mean, it’s more of the same I just pay for it via my taxes instead of the tax I’m essentially paying by being employed? Who does that help? How does that help? It seems to benefit only one class of people in the equation: insurance companies. By introducing a public insurance company cost of frequently covered procedures will drop, same with some medications and they will see themselves getting paid due to the lower prices. They’ll complain at first because they have to wait 2 years instead of 2 months to buy that island in the South Pacific but they’ll get over it when the number of delinquent accounts is dramatically lower.

Which brings me around to my point. Value is not only calculated in monetary terms; even in a capitalist society like ours in the US. It can be calculated there but other factors must be considered as well. For instance, as some point we decided that having our neighbor’s homes burn to the ground when someone could have done something about it killed the private Fire Brigade system we had the US. We agreed, collectively, that since we have to pay for it anyway, we might as well make Fire a government run program. It’s locally run and funded and works really well. Is it better than a private only fire system? I suppose that debatable but it’s certainly easier to understand and benefit from. We value that service in our neighbors and communities and we benefit from it personally when/if we need it. If you don’t think your neighborhood suffers from a burnt lot, you’ve never lived near one.

I don’t know if single payer is the best solution to the problem but I do know that a healthy society that can go to the doctor without fear of losing everything they’ve ever worked for in their lives is more valuable to me than the executives lining their pockets at the expense of my friends and family. I already pay a high premium to insure my family (and it doesn’t cover everything) and if that same money could be used to equally care of my neighbors I’d gladly continue to pay it. If it meant that I never have to spend a day requesting medication that my doctor has prescribed can actually be given to me then that is worth more than any amount of money I can dream of.

The value of my neighbors’ health; the value of my community is in actively participating in its success not becoming a profiteer in its inevitable hardships.

In my opinion, and this is simply my opinion, it’s incumbent upon us to care for each other. To value life and freedom over profits. Money is not everything, it’s not even half of everything. The minute we remember that a friendship and health are more important than the bill for those things is the minute we know exactly what adds value.

UPDATE: for the record, I’m not saying Single Payer is without fault or that it’s even the best solution. I’m just saying there’s got to be a way to care for people without compromising on the quality of that care. I simply do not believe the for-profit medical system works to that end. The details for that I leave in the hands of politicians. I’m just trying to put my thoughts down so I do not have to repeat them in public over and over again. :)

Comments (View)

Apple’s Google Voice Fail.

Look, I’m no pundit. I’m just a developer trying to do right by the world. When giant corporate entities start pissing all over one another I could usually care less. The PC vs Mac debate, for instance, is something I never really cared about. I don’t prefer the Windows OS. I prefer OS X. That’s a preference not a condemnation of Windows. I develop on/for windows machines, happily.

So, when I noticed that Google has filed with the FCC because Apple has rejected their app due to competitive issues I have to side with Google. Mostly because I believe if you have a marketplace to sell apps you should be given a choice in apps. I mean, I loathe the Apple iPhone Mail application. I HATE it. I would love to see a great alternative but that’s probably not going to happen anytime soon because Apple will reject the app before anyone gets the chance to choose an alternative. I’m sure most people love it, and that’s great but limiting my choice so you can lock folks into your idea of a good app is pretty lame.

But Google vs Apple… I don’t really care. They make enough money to make Solomon blush so what the hell do I care. The truth is that Apple wants you to use their shitty phone service because of ATT. Google wants to funnel your calling through it’s Google Voice app to provide Google Voice customers a seamless experience. Either way I’m making phone calls and ATT and Apple both benefit by my using the phone even if it goes through the Google Voice proxy. But they want to have a “bottom-line-fight” to ensure that their projections are accurate and revenue streams do not dry up due to… dare I say… competition.

All of that will be fought in courts and we’ll hear of it second hand and yawn. I’ve made a financial commitment to Apple’s iPhone platform (for 12 months that is) and during that time, I don’t care.

What I DO care about is this gem which is about how Apple then went after 3rd party developers looking to provide a bridge to the Google Voice service in the form of a native app on the iPhone. Apple, unceremoniously, pulled all GVoice apps from the store and placed the onus back onto the developers to communicate the change to their customers. The essentially removed a product from the public market without notice, making the developers look bad and ensuring a horrible customer service experience from the folks that purchased apps in earnest.

Not only is this poor form but it’s monopolization reminiscent of IE 6 on Windows. When that was the default browser and it couldn’t be uninstalled from the system and bullied others out of the market. A few law suits from the Europeans and finally we get choice on Windows and less lock in from the vendor. That’s what’s happening on iPhone right now. The suits are doing all the thinking and it’s making life shitty for the people who are constantly paying into the closed iPhone system.

I’m now seriously considering my options for the phone that I’m going to choose in 12 months. If this is how Apple chooses to conduct its business, it’s developers and the community that’s formed around these products then I may have to see what all the buzz is about in Palm Pre or Android’s neck of the woods.

UPDATE: here’s another account of Apple’s Douche nozzlery

Comments (View)
Fri Jul 24

Coming to a town near you… ME!

Ok, kittens, I’m fixin to get my speak on. Recently, given my move to becoming a professional rubyist, I’ve shifted my speaking to be on topics more relevant to topic that are closer to my heart and closer aligned with my day to day operations and growing expertise. With that and by the grace of my wonderful EdgeCase family I’ve taken a larger step into the Ruby presenting community with 2 upcoming talks. Oh don’t think you Microsofties are rid of my loud mouth either, I’ll be contributing to several .NET talks coming up soon too.

Here it comes…. the list…

erubycon - Testing the Enterprise This session will be about how we brought Ruby testing into Gap Inc Direct. GID has campuses in Columbus, San Francisco and offshore. In addition to the challenges in a distributed environment, training QA resources and developers new to Ruby, Watir, other libraries; we’ll be talking about incremental adoption of Ruby in the Enterprise, and how it enables us to move from a Waterfall SDLC into an Agile model.

We’ll be going over lessons learned, pitfalls and successes. The points of view will be from Charley Baker, who has been responsible for the adoption of Ruby at our San Francisco campus over the past 4 years, and Leon Gersing from EdgeCase, who’s working with our Columbus distribution IT organization as they adopt Agile practices and using Cucumber have bridged the gap between developers, QA and product teams.

devLink - The Ruby Koans The Ruby language has gotten a lot of buzz in the IT industry lately. It is a highly expressive language that comes with great increases in productivity, or so some say. Test Driven Development is a “Best Practice” that has become quite popular for developing rock solid application with reduced debugging time. Ruby and TDD: two great tastes that taste great together. This tutorial will combine TDD and Ruby training in a way to introduce you to the “Ruby Way” through tests. In this tutorial we will introduce you to the Ruby language. We will show you the basics of creating objects, control structures, using meta programming and an extended discussion on blocks and the things that might look a bit odd. You will walk away with a solid understanding of basic areas of ruby, a persistent knowledge base, in the form of a test suite, to take home and build upon, and a hunger to learn more and join the growing community of ruby developers.

Ruby Hoedown - Appcelerator Titanium: Desktop and Mobile development for web developers So, you’re a web ninja. You’ve mastered CSS, XHTML, JavaScript, Ruby on Rails, Django and are pretty sure that HTML 5 is going to render Silverlight and Flex completely useless. You’re so 1337 that lesser developers cower at your web development prowess. Then someone asks you to create an iPhone app or Andriod app or Mac Desktop app or gasp a Windows Desktop app… you’re starting to sweat at the thought of quirky platform specific languages and behavior. FEAR NOT, CITIZEN! A new open source framework by Appcelerator called Titanium allows you to use your incredible web skills to create cross platform, desktop and mobile applications. Come spend some time learning about this new framework while we take a lap around the basics of the framework and create a simple mobile application that can run on either Apple’s iPhone or Google’s Andriod OS! (Tech used: Titanium Desktop/Mobile beta, Ruby, HTML, CSS)

So, please, come check it out and say hi! I’ll be the portly fellow with the beard and plaid hat on. :)

Comments (View)
Sun Jul 19

HAPPY BIRTHDAY DAD!

Comments (View)