These are the sorts of details that always puzzled me about development. Things like where does the coding actually take place? How does the code know which system to relate to? Today there were a lot of details that we covered.
I learned about how classes are used in Salesforce to store code. You can then refer to those classes with other code, such as with a trigger, open execute anonymous and other classes. Or more likely, refer to methods within those classes.
There was quite a lot of focus on syntax. I saw coding in action, and therefore the syntax that was used. Thimgs like “myClass.method”. Or Account a = new Account.
I learned some more abstract lessons about coding. For example the reason you might create new account a and another one b. The meaning of static (single instance) and void (returns nothing). I was pleased that I already understood public and private pretty well.
I learned about constructors. About those statements where you declare the class or the method. What that “promises”. For example, does it promise a string when you run that method. I saw an example of method overloading, which I was familiar with.
On a more human level I feel like today was a good reference experience for how to be in the workplace when working in tech. I noticed a lot of crossover between this and meditation. What I mean is that I had an object upon which to continually refocus my attention (the task or subject matter at hand) but also I found it effective to practise patient loving-kindness towards myself when my mind wandered. I find that practising this towards oneself makes you feel that way towards others and it makes the workplace better overall. So there’s a balancing act between active communication, focus and attitude towards imperfection.
Below is the program(s) that we designed today.
There is a trigger on the Account object, which updates a field based on a method within a class, which is pictured below. The method accepts type and returns free if it’s education, otherwise, it returns commercial. This string returned is what the trigger updates the license type field to.