You have a git submodule. You want to update it (e.g. get the newest freshest code). Here’s what
you do:

I’ve already initialized my submodule of course:

git submodule add git@github.com:mysubmodule mySubmoduleDir

At some point later I try this.

git submodule update 

Ha ha you fool! This only gets you the copy that your submodule is already frozen at.

Try this instead:

cd mySubmoduleDirectory
git checkout master
git pull

Yes, I was the fool. You can go away now.

I stayed up until around three in the morning one night last week finishing this super addictive and awesome tutorial by jQuery creator John Resig. I’ve been through some little ditty tutorials on closures and had people attempt to explain what it is before, but Resig’s tutorial is to your average online tutorial what a tanto is to a wiener.

Even though in a certain sense I’ve never met a wiener I didn’t like, I’d prefer that if you were fighting on my side you had a proper weapon –
and no matter how many skillz you got, it always helps to sharpen them.

Part of the reason I like this approach so much is that there is very little unnecessary baggage. You figure out what you need to by reading the code, with a few quizzes where you write some code so that the lessons sink in. As things stand I think the quizzes are a little bit under-developed, and as a whole it could probably be a bit more content as far as examples and gradually developing a theme, but hey JResig has a whole book coming out soon. Another fantastic feature is that you can edit each example as you go along, so if something is not immediately obvious you can tweak it or can add in the necessary log statements.

As far as this goes, I believe this is the future of programming education (and education in general). Less paper, less explanation, more interaction, more cementing of the material. In other words, less talking, more doing.

Keep in mind this is a Ninja-level tutorial, so it assumes a fair bit of knowledge of Javascript that you probably won’t have if you’ve just been waving around a wiener. That said and despite some rough edges, I will repeat and say it is the best online tutorial I have ever seen.

Here are some highlights:

Context – One of the funkier bits of JS.
Closures – Show don’t tell. Love it!
Function Prototypes – A lot you can do here but tricky to get right
Inheritance – You have to understand this well if you are doing any Advanced Javascript

Truly awesome is when you get to see how all the building blocks fit together towards the end of the book as Resig appropriate builds up to (rather than dissects) the Prototype bind function.

I end with this beautiful example:

var ninja = { 
  yell: function(n){ 
    return n > 0 ? ninja.yell(n-1) + "a" : "hiy"; 
  } 
}; 

In case you were wondering, we are hiring ninjas over at Tquila.

Today I was performing some maintanence in Facebook and got caught in a wonderful infinite recaptcha loop, where Facebook asked me for my password, got it, asked me to fill out a recaptcha, I filled it out, and then kept asking me to fill out more and more recaptchas. I gave up after about ten. I tried again later and same problem.

If you are experiencing this problem, the solution is probably to switch accounts. In my case I was in as one of my Page accounts instead of my normal accounts. Once I switched back recaptcha worked as usual.

Hope this helps someone!

Dreamforce is crazy. So many sessions, so many people to see, so little time. Moreover, there were a bunch of sessions related to Ruby, and it wasn’t always easy to know what sort of content would be covered ahead of time (esp. since some of them were added at the last minute).

I will summarize here all of the sessions covering Heroku and Ruby along with what you should know about the status of Ruby right now in the enterprise world, then present a summary and evaluation of Dreamforce presentations as a whole. It’s worth mentioning that all of these are among the most popular sessions, both from impressions at Dreamforce and Youtube views afterwards.

From high-level to very technical:


Platform State of the Union
The Platform State of the Union is the one *must* attend event for all developers. Highlights were the vision for the future of the platform by Byron Sebastian (former CEO Heroku, now Senior Vice President of Platform Technology), from 2:01-6:30, an appearance by the creator of Ruby and now, employee at Heroku, Matz, 6:40 – 8:40, as well as an extensive example from Barry Newman of Saveology of utilization of Heroku and Force.com platforms 35:48 – 45:00, followed and preceded by comments by Dave Carroll, Director of Dev Evangelism for Salesforce.


Heroku in the Enterprise
Oren Teich, COO @ Heroku
Very visually compelling and enthusiastic presentation by Oren Teich that gives a good introduction to the Heroku platform. Appropriately emphasized the core strengths of Heroku,”You as a developer have complete control over what is going on in your app.” Didn’t quite connect the dots as far as what would be compelling use cases for existing Salesforce customers. Nonetheless, my favorite presentation at Dreamforce.


Connecting Ruby Apps with Force.com
Alex Sutherland (Mavens) and Joel Dietz (me!)
Originally slated to be a more technical presentation, ended up being a high-level presentation of the use cases for hybrid apps that leverage the strengths of using the right tool for the right job. Also gives the history of Ruby integrations from the folks with the most experience (mainly Alex). Presented some compelling use cases for Ruby/Heroku utilization (although Joel Dietz said “umm” too many times, esp. at the beginning).


Building and Deploying Great Applications with Salesforce, Ruby, and Heroku
Danny Burkes, Pivotal Labs
Presentation by lead developer on how to use the new Database.com gem released by Salesforce at Dreamforce (see my earlier post for some background on this).


Using Ruby on Heroku
Alex Wong, Salesforce.com
Starter presentation on how to get a Ruby on Rails app running on Heroku. Another presentation with similar content was given by Morten Bagai (but doesn’t seem to have made its way to youtube).


Connect your Clouds with Force.com
Jeff Douglas, Appirio
Attempting to do a bit of everything and generally succeeding is Jeff Douglas. See his high-level description at 3:55 and demo of a mobile device focusing on Heroku at 36:14.

In general, all of the bases were covered somewhere at Dreamforce. There were introductory sessions for Ruby the language, introductory sessions for how to employ Heroku, high-level introductory sessions to the platform, and a couple sessions that showed compelling use cases and showed the when and what is the right tool for the job. In general, the Heroku sessions set a new standard for compelling presentations, and I’m confident that things will continue to progress in this direction — despite the fact that some of us (::cough cough::), continue to be forced to use the standard Salesforce powerpoint template.


Another thing, and I am confident that this will be resolved in the next six months or so, is the lack of an unified and compelling vision for what is the right tool when. The increased investment in all parts of the platform is fantastic, but there is still a bit more to be done as far as connecting the dots with existing enterprise clients of Salesforce and Heroku.

What follows are instructions on how to get started with the databasedotcom gem, released yesterday afternoon at Dreamforce.

The examples here will be assuming you use Heroku for hosting and deployment although you can use all of the features mentioned without Heroku if you so chose.

This is also for the most part a tutorial and not a replacement for the existing documentation includes as part of the databasedotcom gem on Github and shared via Ruby docs, which hopefully will be expanded as the gem gets some love.

There are two main components of the current release:

(1) A wrapper for the Force.com REST API which currently works with both Force.com and Database.com
(2) A wrapper for the Chatter API which will not be useful until Winter ’12 (or in orgs w/ api v. 23 already enabled)

There is also an additional controller released separately on Github which provides a class that your controllers (assuming you are using a Rails app) can extend. By doing so they will instantly get access to the Force.com or Database.com backend you are hooking into.

As of right now, the gem only supports Ruby 1.9.x, although support for earlier versions of Ruby is promised within the very near future. Although the development of the gem was commissioned by Salesforce/Heroku, maintenance is less certain and depends largely on your contributions.

The first thing you need to do is include the gem in your app. Add the databasedotcom gem to your Gemfile.

gem 'databasedotcom'

If desired, use the edge version instead of the released gem version. This will allow you to get the latest version (you will probably want this if testing in the next couple of days, not necessarily later once the few warts have been ironed out).

gem 'databasedotcom', :git => "https://github.com/heroku/databasedotcom.git"

I’m assuming you’ve already initialized your app on Heroku. If not, go through the Heroku starter tutorial and create your heroku app.

I also recommend adding ssl to your Heroku app:

heroku addons:add ssl:piggyback

The first thing you need to do is add your credentials. You will need to add remote access for your heroku app in Salesforce (Setup -> Develop -> Remote Access).

Note your consumer key and secret. For the purposes of this gem, the client id is always your consumer key, and client secret is the same as consumer secret.

You can add this information to your app in one of three ways: (1) explicitly passing a hash. (2) Setting environment variables via Heroku (3) setting up a yml file in your config folder with the credentials. I recommend doing (3) unless you have a reason to use one of the other options.

The second thing you need to do to authenticate is do the OAuth handshake.
I recommend using the username and password combination for the user with the appropriate permissions for your org.

These can also be set in your yml file. I recommend also turning on debugging.

This will lead to a file called “databasedotcom.yml” in the config folder with the following info:

client_id: CONSUMER_KEY_FROM_REMOTE_ACCESS
client_secret: SECRET_FROM_REMOTE_ACCESS
username: SALESFORCE_USERNAME
password: PASSWORD_PLUS_SEC_TOKEN
debugging: true

Now make sure that is included and deploy the yml to Heroku.

To actually use the gem I recommend starting by extending the databasedotcom controller. Your code will look like this:

class SObjectNameController < DatabasedotcomController

You can then easily refer to the objects you need in that controller.

For instance in the index method you can do

@users = User.all

Where “User” is now your automagically instantiated SObject class queried via the REST API. The way this works is that if you use a variable (e.g. “User”) that is unknown to the class it will find all of the available SObjects and attempt to instantiate a new instance.

That should be enough to get you started. A bunch of other useful examples are in dburkes’ example code.

One note of caution, there is as of yet no session management for this app, so if your auth token times out you will need to re-authenticate yourself.

Byron Sebastian, formerly CEO of Heroku and now GM of both Heroku and SVP Platforms for Salesforce pointed out in a recent interview of the different nature of developers currently working on the Force.com platform and those which Heroku reaches out to. Although this is highly recommended, there is little in the way of publicly available information on the difference between these two developer communities. So here’s the difference, exaggerated somewhat:

Dress code

Force: Probably forced to wear a suit from time to time and doesn’t mind it all that much, so long as it doesn’t always include a tie.
Heroku: Will look at you in a strange way if you suggest they wear a suit. And probably never talk to you again…

Emerging Tech

Force: Laughs at Salesforce announcements while reading the safe harbor statement and knows that he won’t get promised tech for a few more release cycles.
Heroku: Itching to get hands on new tech (Clojure, Node, etc.), spends his evenings working on side projects for fun.

Tools
Force: Likely using a snazzy IDE like the Force.com IDE (harhar). Occasionally upvotes ideas for new and better tools in the IdeaExchange but knows that his voice is not likely to be heard. Like here. ::cries::
Heroku: Very comfortable on the command line and using a text editor w/ nifty shortcuts like Textmate or a pro editor like Vim/Emacs. Generally sets up his own environment and doesn’t think or care much for the IDE world.

$$$
Force: Paid because every company of a certain size uses Salesforce because it is baddest most kick-ass CRM solution ever.
Heroku: Probably leveraging Rails or another Ruby framework to deliver small to mid-size web apps. When finds that some client uses Salesforce is a bit confused as to why. Looks at the UI and says, “Aaaaah! So 1990!” May attempt to convince VCs that they can build the next Salesforce on Rails.

Meetups
Force: Goes to conferences, listens to lots of lame jokes, drinks many liters of koolaid, and shouts or tweets “hurrah! hurrah!” as much as he possibly can. Possibly stops going out.
Heroku: Goes to conferences that are for developers only and heatedly discusses the pain points of the new edge rails version over a pint afterwards.

Configuration/Division of Labor
Force: Probably ends up doing some configuration because, oh my goodness, Salesforce is hella complex. Err, shouldn’t there be an admin here somewhere? Thankfully most of the time there is (I love you admins!). Designers are usually not employed, because Salesforce provides all the design for you (but should it? Stay tuned for my top secret jQuery Theme Engine for Salesforce…).
Heroku: Everything is code. There are only developers, no admins. Designers usually deliver css, etc. developers, who implement, although sometimes you have designers that can touch up Rails views themselves.

Integration
Force: Knows that the watchword of every mid-to-large size company is “integration” and probably spends lots of time with different APIs moving information from one data silo to another.
Heroku: If asked about integration, will say “Here is the sexy JSON REST API for my app, integrate to it however you want!”

Enterprise
Heroku: Enterprise epitomizes needless cruft and annoyances that developers who care about pushing forward technological possibilities shouldn’t have to worry about.
Force: What’s to think about? What is, is. Back to waiting for an awesome new version of the Force.com IDE. Oh, can I please get my stapler back?

It sounds like Byron Sebastian & co at Salesforce are not particularly keen to attempt to integrate these two communities, which makes a good deal of sense. It isn’t clear to me that they can co-exist. However, the road forward is far from clear. Much, although certainly not all of the Salesforce developer community are not developers in the traditional sense, having started with Salesforce’s “Clicks not Code” mantra and gone on to occasionally build triggers and other things necessary in the Salesforce environment that will be unusual if not incomprehensible to those used to working on smaller apps. This is entirely different from enthusiast programmers, who, despite a lot of experience with certain aspects of the cutting edge, usually don’t worry about problems of a certain annoyance level and/or complexity (e.g. scaling, integration) that every large company has to worry about. In other words, there is often a “bite the bullet and get the job done” attitude among experienced Force developers that makes them optimally suited for solving the sorts of problems that large companies have.

Great developers in both worlds will see the benefits that are there on each platform and the accompanying community. Salesforce should take every opportunity to merge these where this is appropriate, providing a seamless experience to those who want to bridge the gap. With this, there is an increasing need for elite teams that can acknowledge and utilize the strengths of both areas. In fact, this will be a major focus in my Dreamforce session on connecting Ruby on Rails apps with Force.com. Stay tuned.

We announce KittenForce, yet another Fractastical Labs production. KittenForce provides furry placeholder images for your page as follows:

   <c:kitten myHeight="200" myWidth="200" />

The result is quite predictable.







Meow!




If you are more bold you might try something like the following:

   <c:kitten myHeight="200" myWidth="200" darylShaber="true" />

If you are curious to see what your page would look like without any of the usual Salesforce images, try this:

   <c:kitten myHeight="400" myWidth="300" applyToAll="true" />

I don’t recommend doing this with Daryl. Although you can…

Install KittenForce here.

Special thanks to PlaceKitten and Lsemel. Source can be found on Github.

Krishnan Subramanian and Ben Kepes have just delivered a needed update on the state of cloud warfare, focusing especially on recent moves by Heroku (where I was earlier today). Krish of CloudAve breaks down the contenders into three main groups:

Traditional (Heroku) Server like a repository. You push. Everything just works.
Packaged (Amazon). Push, but exposed IaaS layer.
Federated (VMWare). Network of clouds, customization in side.

Krish expects federated servers to win out. Although he doesn’t pick any winners, he says Cloud Foundry/VMWare is the front runner at the moment. Folks like Heroku aren’t apparently not competitive for big enterprise apps.

Ben Kepes suggest the division is more like this:

Infrastructure PaaS (Heroku, Amazon). Caters to developers used to working with infrastructure. Customization where you need it.
Application PaaS (Force.com). Just get to the app! Fully managed infrastructure.

He also suggests that these are fairly separate arenas and are diverging.

First of all, I’m more on the Ben Kepes side of things. Basically, how you manage your PaaS offering (hopefully well!) is a distinct issue to how it appears to the world. Architectural decisions are not features. Choosing to expose certain aspects to your users or provide for certain technologies and not others is. However, diversification is frequently not a winning strategy if it ends up with feature bloat — too many features requiring maintenance without necessarily meeting the needs of paying users. What do the users want? I’d guess the main aspects are the following: ease of use, scalability, features, price. The fact that different market segments will weight different aspects differently is a good reason why despite a crowded market there will probably be a lot of contenders for quite some time.

Second, it is worth noting who is not mentioned. Microsoft is still here (albeit not a front runner), but Google and other Ruby cloud folks (Engine Yard) are not highlighted at all. Yikes!

Third, it is worth noting the challenge of the “enterprise,” which most likely still hasn’t moved much if any of its core services into the cloud. Yes, Salesforce is “enterprisy,” but apps are usually extensions of its core CRM functionality, not fully featured “standalone” apps. Who will service them? I think that is still to be determined, and I wouldn’t write off any of the main contenders just yet.

Heroku co-founder Adam Wiggins stated in a recent interview that Salesforce is “Really good with business and enterprise, but … not necessarily as knowledgeable about how to engage developers.” That started this fascinating exchange with Salesforce’s ISV Architect Evangelist Shoby Abdi:






 


So is there an “engagement equation” ? Why are developers interested, engaged, and passionate in certain things and not others?

Regardless of what Salesforce is doing or not doing, here are my suggestions for how to engage developers better:

Tools that are awesome
– If you want developers to be productive and happy, give them good tools

Tools that can be modified
– Good developers, like folks in other fields, like to tweak their tools. Also try not to lock people into tools that you’ve made.

Cutting-edge technology
– Awesomeness in technology usually means things that are pushing some technological edge. Integrations between existing technologies frequently do not meet this standard (hint: XML and SOAP are not cutting-edge any more).

Push your edge
– Not just with respect to technologies, but also more broadly with respect to how you work and who you work with — competitions and late night coding sessions are awesome! As Yehuda Katz says, “Find something impossible and do it.”

Props
– Don’t leave your developers in the basement contemplating how to siphon fractions of cents from your corporate bank account. Give them props for what they do. Open source is a lot about props. People can see what you did and what you can do (follow me on Github!).

Independence

– Brilliant people frequently want to work on a variety of stimulating things since they get smarter that way. Remember, more challenge (usually) equals better. There needs to be room for people hack here, hack there, hack around, whatever. Don’t put chains on your developer!

Insulate

– Specialization is awesome. Some folks work really well on some things but don’t want to deal with others. Don’t make your developers do things other than development or sit through the presentations of people who do. CIOs should get paid more to drink corporate kool-aid. Don’t make your developers!

$$$

Not the number one concern for awesome developers, admittedly, but a concern. Don’t throw pennies at people contributing in awesome ways. Find some way to make them part of a thriving ecosystem. They don’t want to starve (me neither, hire me!)

I’m not going to issue a Salesforce grade in each of these areas, but I think it is clear that Wiggins is correct in general. Salesforce has a way to go in engaging developers. Hopefully Heroku can be a turning point.

I’ve today moved a bunch of old projects from other repositories (including some Salesforce Chatter stuff, jQuery libraries, Ruby/Rails Apps, Google Wave integrations and App Engine demos) to Github. Take a look!

Some related news in the past couple weeks as the library Apex-Lang has moved to Github and become Apex Commons. I participated in the Documentation Jam and hope that we can have more code/documentation jams in the near future.

I also moved the 42 code snippets I had on Snipplr.com to Gist to keep things in the same place (link).

To make things simpler I changed my Github name to “fractastical” to make things easier but lost a few followers as a result. So follow me now! ;)

@fractastical updates

 

June 2012
M T W T F S S
« May    
 123
45678910
11121314151617
18192021222324
252627282930  
Follow

Get every new post delivered to your Inbox.

Join 1,312 other followers