SlideShare ist ein Scribd-Unternehmen logo
1 von 19
Apex for Humans (and recently turned zombies)
Kevin Poorman
Principal Architect
@CodeFriar
Hey, I know we just met, and I know this’ll sound
crazy but here’s my twitter: @codefriar, so follow
me maybe?
Kevin Poorman
Principle Architect.
Agenda
Our Goal: Ensure everyone has the capability to read and understand Apex.
• A note on the philosophy of language
• Grammar school
• Diagram all the things!
• There will be a quiz
Metaphors we live by
A quick recap of vocabulary from third grade
• Metaphors are statements of comparison
between two objects that have a
non-logical, or non-obvious similarity.
• Similes are like Metaphors, but they use
‘Like’, or ‘As’ to make the comparison.
(see what I did there?)
It's language for everybody, there is no difference!
Language, regardless of it's primary usage
for human or computer communication;
utilizes metaphor to help assign
meaning to objects and actions.
So why do we call them programming languages?
• Because they utilize metaphor to help assign meaning.
• In addition to the use of metaphor, computer languages have the following traits as
well:
– Grammar
– Dialect
– Idioms
– Vocabulary
Grammar is Hard. Lets go to the Expo floor.
The grammar, or “syntax” of a language’s written form is the first hurdle to learning
any language.
• It’s also the easiest thing to learn about
a language. We pick it up, just by using
the language!
• That said …
Why is it hard?
• Grammar has subtle, often physically hard
to see marks.
• Consider:
– Let’s eat Grandma!
– Let’s eat, Grandma!
The single most likely cause of an extinction-event
level robot rising is a software grammar bug. – me.
Diagraming all the code!
Or: Learn you some apex grammar for great good!
Ground Rules
• Apex’s grammar says that complete thoughts are
ended with a semi-colon rather than a period
– We call complete thoughts “statements”
– Incomplete thoughts are “expressions”
• Additionally, Apex’s grammar dictates that
paragraphs, are grouped by { and } rather than
indentation and line breaks.
– Rarely are the {} on the same line.
• Most importantly: You are a Salesforce
Developer.
Ground Rules
• Variables
– Proper Names
• Types. Literally the hardest part of this.
– Apex is strongly typed, which is zombie speak for saying
that it’s a rather dumb language that demands you tell it
what kind of variable you’re creating.
– All Standard Objects are types
– All Custom Objects are types (Zombie__c)
– Built in types for Integer, String, Boolean etc.
– Type_name variable_name …
– Variable_name = (type_name) …
Ground Rules
• Methods
– “Last year at Dreamforce …”
– Also typed. You have to specify what kind of data the
method is going to return.
• Keywords / Reserved Words.
– Kind of like curse words, regardless of the language you
have to learn what you can and can’t say.
– abstract, break, catch, class, continue, do, else, enum, extends, false,
final, finally, for, global, if, implements, instanceOf, interface, new, null,
override, private, protected, public, return, static, super, testmethod, this,
throw, transient, trigger, true, try, webService, while, 'with sharing',
'without sharing' and virtual.
Ground Rules – last one I promise
• Sometimes we have complex types that only a
compiler could love.
– List<type_name> i.e.: List<Account>
– Set<type_name> i.e.: Set<Contact>
– Map<Set_type_name,List_Type_name> i.e.:
Map<Id,Zombie__c>
– Think about a roll of crackers.
Tasty tasty brainz crackers.
Now for the Quiz(es)
This is the interactive part, don’t make me call on you third person from the left in row
5.
Diagraming some Code
1. Type listType = Type.forName('List<' + objType + '>');
2. if (listType == null) {
3. return makeError('The requested resource does not exist',
'NOT_FOUND');
4. }
This code snippet has Statements, one Expression and one Paragraph. Can you
find them?
For 10,000 internet points* What line contains the creation of a variable and what’s
its type?
*redeemable only on the third Tuesday of the 5th month after the first blue moon for funny-cat-photos
Diagraming some Code
1. Zombie__c mattyb = Type.forName('List<‘Zombie__c’>');
2. Id objId = (id) ‘001abc1234LAKFR’;
3. String awesomeSauce = ‘Awesome Sauce’;
4. Account ZombieAccount = new Account();
For another 10,000 internet points, which of these has the type …
Diagraming some Code
1. Public Static Country__c getCountry() {
2. Integer i = TestUtils.getRandomNumber(10000);
3. return new Country__c(Name = 'Test Country' + i,
4. Sub_Region__c = 'Test Region’+ i,
5. Region__c = 'Test Location' + i,
6. English_Speaking__c = 'Yes');
7. }
Questions & Answers.
Apex for humans

Weitere ähnliche Inhalte

Andere mochten auch

Rs 12.03.2013
Rs 12.03.2013 Rs 12.03.2013
Rs 12.03.2013 gherardini
 
Η εποχή της ακμής
Η εποχή της ακμήςΗ εποχή της ακμής
Η εποχή της ακμής4gymsch
 
HFE: The Ultimate Guide to Prenatal Exercise
HFE: The Ultimate Guide to Prenatal ExerciseHFE: The Ultimate Guide to Prenatal Exercise
HFE: The Ultimate Guide to Prenatal ExerciseInbound Digital
 
Finding a good development partner
Finding a good development partnerFinding a good development partner
Finding a good development partnerKevin Poorman
 
Ιουστινιανός
ΙουστινιανόςΙουστινιανός
Ιουστινιανός4gymsch
 
3739 barry ave listed by rick page
3739 barry ave listed by rick page3739 barry ave listed by rick page
3739 barry ave listed by rick pageRick Pack
 
Efficient and simple porting processes make one day porting a reality
Efficient and simple porting processes make one day porting a realityEfficient and simple porting processes make one day porting a reality
Efficient and simple porting processes make one day porting a realityBSP Media Group
 
How effective is the combination of your main product and ancillary texts?
How effective is the combination of your main product and ancillary texts?How effective is the combination of your main product and ancillary texts?
How effective is the combination of your main product and ancillary texts?zombiejuicek
 
114 i quesiti sul decreto 81 le sanzioni per gli accordi formativi
114   i quesiti sul decreto 81  le sanzioni per gli accordi formativi114   i quesiti sul decreto 81  le sanzioni per gli accordi formativi
114 i quesiti sul decreto 81 le sanzioni per gli accordi formativihttp://www.studioingvolpi.it
 
Apex 10 commandments df14
Apex 10 commandments df14Apex 10 commandments df14
Apex 10 commandments df14Kevin Poorman
 

Andere mochten auch (14)

Rs 12.03.2013
Rs 12.03.2013 Rs 12.03.2013
Rs 12.03.2013
 
Η εποχή της ακμής
Η εποχή της ακμήςΗ εποχή της ακμής
Η εποχή της ακμής
 
Blog
BlogBlog
Blog
 
HFE: The Ultimate Guide to Prenatal Exercise
HFE: The Ultimate Guide to Prenatal ExerciseHFE: The Ultimate Guide to Prenatal Exercise
HFE: The Ultimate Guide to Prenatal Exercise
 
Finding a good development partner
Finding a good development partnerFinding a good development partner
Finding a good development partner
 
Ιουστινιανός
ΙουστινιανόςΙουστινιανός
Ιουστινιανός
 
3739 barry ave listed by rick page
3739 barry ave listed by rick page3739 barry ave listed by rick page
3739 barry ave listed by rick page
 
Efficient and simple porting processes make one day porting a reality
Efficient and simple porting processes make one day porting a realityEfficient and simple porting processes make one day porting a reality
Efficient and simple porting processes make one day porting a reality
 
50320140502001 2
50320140502001 250320140502001 2
50320140502001 2
 
How effective is the combination of your main product and ancillary texts?
How effective is the combination of your main product and ancillary texts?How effective is the combination of your main product and ancillary texts?
How effective is the combination of your main product and ancillary texts?
 
Final assessment
Final assessmentFinal assessment
Final assessment
 
114 i quesiti sul decreto 81 le sanzioni per gli accordi formativi
114   i quesiti sul decreto 81  le sanzioni per gli accordi formativi114   i quesiti sul decreto 81  le sanzioni per gli accordi formativi
114 i quesiti sul decreto 81 le sanzioni per gli accordi formativi
 
115 federlazio accordo-attrezzature
115   federlazio accordo-attrezzature115   federlazio accordo-attrezzature
115 federlazio accordo-attrezzature
 
Apex 10 commandments df14
Apex 10 commandments df14Apex 10 commandments df14
Apex 10 commandments df14
 

Ähnlich wie Apex for humans

Ähnlich wie Apex for humans (20)

Fluid, Fluent APIs
Fluid, Fluent APIsFluid, Fluent APIs
Fluid, Fluent APIs
 
ppt7
ppt7ppt7
ppt7
 
ppt2
ppt2ppt2
ppt2
 
name name2 n
name name2 nname name2 n
name name2 n
 
name name2 n2
name name2 n2name name2 n2
name name2 n2
 
test ppt
test ppttest ppt
test ppt
 
name name2 n
name name2 nname name2 n
name name2 n
 
ppt21
ppt21ppt21
ppt21
 
name name2 n
name name2 nname name2 n
name name2 n
 
ppt17
ppt17ppt17
ppt17
 
ppt30
ppt30ppt30
ppt30
 
name name2 n2.ppt
name name2 n2.pptname name2 n2.ppt
name name2 n2.ppt
 
ppt18
ppt18ppt18
ppt18
 
Ruby for Perl Programmers
Ruby for Perl ProgrammersRuby for Perl Programmers
Ruby for Perl Programmers
 
ppt9
ppt9ppt9
ppt9
 
ACM init() Spring 2015 Day 1
ACM init() Spring 2015 Day 1ACM init() Spring 2015 Day 1
ACM init() Spring 2015 Day 1
 
Write your Ruby in Style
Write your Ruby in StyleWrite your Ruby in Style
Write your Ruby in Style
 
Culture And Aesthetic Revisited
Culture And Aesthetic RevisitedCulture And Aesthetic Revisited
Culture And Aesthetic Revisited
 
ACM Init() lesson 1
ACM Init() lesson 1ACM Init() lesson 1
ACM Init() lesson 1
 
F# for startups
F# for startupsF# for startups
F# for startups
 

Kürzlich hochgeladen

The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 

Kürzlich hochgeladen (20)

The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 

Apex for humans

  • 1. Apex for Humans (and recently turned zombies) Kevin Poorman Principal Architect @CodeFriar Hey, I know we just met, and I know this’ll sound crazy but here’s my twitter: @codefriar, so follow me maybe?
  • 3. Agenda Our Goal: Ensure everyone has the capability to read and understand Apex. • A note on the philosophy of language • Grammar school • Diagram all the things! • There will be a quiz
  • 4. Metaphors we live by A quick recap of vocabulary from third grade • Metaphors are statements of comparison between two objects that have a non-logical, or non-obvious similarity. • Similes are like Metaphors, but they use ‘Like’, or ‘As’ to make the comparison. (see what I did there?)
  • 5. It's language for everybody, there is no difference! Language, regardless of it's primary usage for human or computer communication; utilizes metaphor to help assign meaning to objects and actions.
  • 6. So why do we call them programming languages? • Because they utilize metaphor to help assign meaning. • In addition to the use of metaphor, computer languages have the following traits as well: – Grammar – Dialect – Idioms – Vocabulary
  • 7. Grammar is Hard. Lets go to the Expo floor. The grammar, or “syntax” of a language’s written form is the first hurdle to learning any language. • It’s also the easiest thing to learn about a language. We pick it up, just by using the language! • That said …
  • 8. Why is it hard? • Grammar has subtle, often physically hard to see marks. • Consider: – Let’s eat Grandma! – Let’s eat, Grandma! The single most likely cause of an extinction-event level robot rising is a software grammar bug. – me.
  • 9. Diagraming all the code! Or: Learn you some apex grammar for great good!
  • 10. Ground Rules • Apex’s grammar says that complete thoughts are ended with a semi-colon rather than a period – We call complete thoughts “statements” – Incomplete thoughts are “expressions” • Additionally, Apex’s grammar dictates that paragraphs, are grouped by { and } rather than indentation and line breaks. – Rarely are the {} on the same line. • Most importantly: You are a Salesforce Developer.
  • 11. Ground Rules • Variables – Proper Names • Types. Literally the hardest part of this. – Apex is strongly typed, which is zombie speak for saying that it’s a rather dumb language that demands you tell it what kind of variable you’re creating. – All Standard Objects are types – All Custom Objects are types (Zombie__c) – Built in types for Integer, String, Boolean etc. – Type_name variable_name … – Variable_name = (type_name) …
  • 12. Ground Rules • Methods – “Last year at Dreamforce …” – Also typed. You have to specify what kind of data the method is going to return. • Keywords / Reserved Words. – Kind of like curse words, regardless of the language you have to learn what you can and can’t say. – abstract, break, catch, class, continue, do, else, enum, extends, false, final, finally, for, global, if, implements, instanceOf, interface, new, null, override, private, protected, public, return, static, super, testmethod, this, throw, transient, trigger, true, try, webService, while, 'with sharing', 'without sharing' and virtual.
  • 13. Ground Rules – last one I promise • Sometimes we have complex types that only a compiler could love. – List<type_name> i.e.: List<Account> – Set<type_name> i.e.: Set<Contact> – Map<Set_type_name,List_Type_name> i.e.: Map<Id,Zombie__c> – Think about a roll of crackers. Tasty tasty brainz crackers.
  • 14. Now for the Quiz(es) This is the interactive part, don’t make me call on you third person from the left in row 5.
  • 15. Diagraming some Code 1. Type listType = Type.forName('List<' + objType + '>'); 2. if (listType == null) { 3. return makeError('The requested resource does not exist', 'NOT_FOUND'); 4. } This code snippet has Statements, one Expression and one Paragraph. Can you find them? For 10,000 internet points* What line contains the creation of a variable and what’s its type? *redeemable only on the third Tuesday of the 5th month after the first blue moon for funny-cat-photos
  • 16. Diagraming some Code 1. Zombie__c mattyb = Type.forName('List<‘Zombie__c’>'); 2. Id objId = (id) ‘001abc1234LAKFR’; 3. String awesomeSauce = ‘Awesome Sauce’; 4. Account ZombieAccount = new Account(); For another 10,000 internet points, which of these has the type …
  • 17. Diagraming some Code 1. Public Static Country__c getCountry() { 2. Integer i = TestUtils.getRandomNumber(10000); 3. return new Country__c(Name = 'Test Country' + i, 4. Sub_Region__c = 'Test Region’+ i, 5. Region__c = 'Test Location' + i, 6. English_Speaking__c = 'Yes'); 7. }

Hinweis der Redaktion

  1. Commas save lives, sure. Sure are hard to see sometimes.
  2. You can do this, it’s like learning English, and heck, most of us did that as a toddler.
  3. We use variables to store data in memory for us. You can think of memory as a pantry of sorts, full of cans and boxes and what have you, all of which are variables, each of which has a Name. Types are a difficult beast to wrap your head around the first time. If our pantry of variables were real, we could look in and see a few boxes labeled “Account” and some Cans labeled” contact and maybe some other shaped cans labeled “Zombie__c” Each Type has a different shape, and different properties and Apex requires us to declare what kind of box, or can we want to put in the pantry. Best part, We already know how to think in terms of Types, because Every object in our org is a type.
  4. We use variables to store data in memory for us. You can think of memory as a pantry of sorts, full of cans and boxes and what have you, all of which are variables, each of which has a Name. Types are a difficult beast to wrap your head around the first time. If our pantry of variables were real, we could look in and see a few boxes labeled “Account” and some Cans labeled” contact and maybe some other shaped cans labeled “Zombie__c” Each Type has a different shape, and different properties and Apex requires us to declare what kind of box, or can we want to put in the pantry. Best part, We already know how to think in terms of Types, because Every object in our org is a type.
  5. These complex types are all collections, not unlike the roll of brain crackers. But they’re also generic, allowing you to specify what goes in the roll. You could have a roll of Account crackers, or contact crackers The simplest collection type we have is a list. A list is an ordered … well list, of whatever object you’ve specified. These are used all the time. With a list of zombies, you would be guaranteed that your zombies were in a given order, and you’d only have to fight them off one by one. A set has no order, but is guaranteed to be unique. If you were given a set of zombies that was 25 elements long, you’d have to run away from 25 zombies! Finally, a Map is a mashup of set and list. The first type given, is the keyset, and the second is the value type. You’ll see maps used a lot so that you can pull Specific data out of a map just by knowing it’s name. It’s a bit like a phone book that way. Remember those? If you knew someone’s name you could find their contact record.
  6. This contains: 1. Statement (lines 1 & 3) 2. Expression (line 2) 2. Paragraph (lines 2-4 denoted by the {}'s) Line one contains a variable definition!
  7. String Id Zombie__c Account
  8. String Id Zombie__c Account