Give me some action!

I have to start by apologizing. That post title is pretty misleading, but I had writer’s block while trying to come up with something, and it’s the best I could do. Today’s dev words are about when your code goes into action, so it’s not *that* misleading — right? I’ll just say that you agree & we move on to the learning bit! Today we’ve got one big concept one, followed by two easy ones.

  • Bulkify – You’ve probably heard this term a lot. The basic concept is that when you bulkify, you are making sure that your code properly handles more than one record at a time.  This becomes important, because Force.com code runs in a shared environment, so you don’t want to be hogging all the virtual memory. Think of someone on the subway taking up 6 seats for no reason – jerk, right? Don’t be that guy.
  • Compile – This is just turning your code from human-esque speak to the zeros and ones that computers use to do their magic. If your code doesn’t make sense, or is written wrong, you’ll get a lovely compile error — but at least you won’t break anything!
  • Run – OK, easy one. Think of this as hitting the “Go!” button on your code.

And there you have it – the action words that go with code!

We are now 24 days (and 3 blog posts) away from Dreamforce! If you haven’t registered yet, here’s a $100 off. Now go sign up!

Advertisements

2 Comments to “Give me some action!”

  1. Great post. I would add that Bulkifying your code is necessary to avoid hitting Salesforce.com imposed governor limits. If you doing a bulk load of 1000 records using the data loader they will be processed in groups of 200. If you have a query inside a loop, you will execute that query 200 times. Actually, you will execute it 100 times and then an error will get thrown.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: