Cooking with Code: Mix until combined (or using While and Do-While loops in Apex & Java)

Loops are like a recipe instruction of "Mix until combined."

Welcome back to another episode of Cooking With Code, where I tempt you with food-inspired introductions to Object-Oriented Programming (OOP) concepts.

In previous posts, you’ve learned that Apex and Java, like other OOP languages, have basic building blocks or tools to help us program. Examples include: classes, objects, methods, and variables (both primitive and collections). Continue Reading

Cooking with Code: Amuse-bouche* of Apex Collections (Lists, Sets, and Maps)

Orchard with apples

In my last blog post, I wrote about variables, and in particular, primitives. Today I’m going to expand on variables and talk about the oh-so-powerful idea of “collections.”

Unlike Java, which only has one type of collection (Arrays, also know as a Lists), Apex has three to choose from: Lists, Sets, and Maps. Together, we’ll go into each of these types of collections and show you what they are best used for, and how to use them when you start coding. Continue Reading

Cooking with Code: Primitive Data Types in Apex and Java

Cooking with Code: Introducing primitive data types in Apex and JavaThinking about variables makes me hungry. That might be taking things a little far, but I’ve been preoccupied with cooking and coding recently, so they seem to be merging in my mind.  I think this stuff can be fun, and for me, silly analogies make it all easier to understand. Hopefully by the end of this post you’ll agree! Continue Reading

How buying a major appliance can help you understand Object-Oriented Programming

I’m working with a couple of different groups on various projects to learn and teach two related Object-Oriented Programming (OOP) languages: Apex and Java.

One of the big stumbling blocks for beginners is understanding OOP terminology and concepts. In this blog post, I’m taking the opportunity to gain better understanding of the terminology, by explaining it to you. Continue Reading