655 words
@scottmcclung

Personal Organization: The PARA Method

It's a bit cliche to be thinking about personal organization around the new year, but the gaps in my current method of capturing, organizing, and using information became painfully clear last year and I have a bit of breathing room in my schedule to explore some new habits.

I tripped over this article about the PARA method from Forte Labs this week and am intrigued by the ideas and it appears to be exactly what I need.

In particular, Tiago does a good job of articulating of the problem I've faced in the past...how to define the difference between the notion of a "Project" and an "Area" and how to fit those concepts into an organizational system.

It's going to take a while to get my head around this so it becomes more of a habit. Wish me luck.

Edge case date issues in APEX

Chris Peterson tweeted a good reminder this morning that the subtle difference between YYYY and yyyy in the Java date format can lead to unexpected date bugs in your APEX code around this time of year.

For most of the year, the output of Datetime.format('MM/dd/YYYY') and Datetime.format('MM/dd/yyyy') will appear to be interchangeable and all your tests will seem to pass.

The java date format documentation doesn't make it particularly clear that the YYYY year format is using the ISO week date calendar while the yyyy format uses the Gregorian calendar.

These two calendars will appear to align throughout the year and the difference in their outputs will only be noticeable a few days before and/or a few days after the end of a year.

For example, today is December 31, 2020 according to the Gregorian calendar, but if using the MM/dd/YYYY date format, the output will be 12/31/2021.

Try it for yourself...

Datetime calendarDay = Datetime.newInstance(2020,12,31);

System.debug('Gregorian Calendar Date: ' + calendarDay.format('MM/dd/yyyy'));
System.debug('ISO Weeks Calendar Year Format: ' + calendarDay.format('MM/dd/YYYY'));

Lightning Component input and output behavior in Salesforce Flows

When using lightning components in flows, the behavior of input and output variables can be really strange when navigating backward through the process. Should the component remember its default value or if the value has mutated, should it use the new value?
I've struggled with this a couple times on client work.

While not perfect, Alex Edelstein shares some tricks to getting it to behave the way you want. UnofficialSF

Death of good conversation

The attempt to change someone's mind is the death of good conversation.

- Celeste Headless - Jordan Harbinger Show ep. 423

I am...

We've been fooled into believing that titles like writer, leader, or artist are birthrights. Something we either are or aren't. That leaders are given talents or privileges, not choices.
If you want to be a leader, then lead.
If you want to be a writer, then write.
Once you begin, you are. Do, then be.

- Seth Godin - The Practice

Begin...

Effective goals aren't based on the result. They are commitments to the process. That commitment is completely under your control (even if the end result can't be) but the only way to have a commitment is to begin.

- Seth Godin - The Practice

Create Static Resources in SFDX Source Format

Static resources can be a single file or a zipped collection of files.

  • If the resource is a collection of files, the SFDX CLI will automatically zip and unzip the files when it does a push or pull.
  • The default path in an SFDX project is force-app/main/default/staticresources

To create a new zipped resource

  • Create a new directory inside the staticresources directory and give it the name of the static resource.
  • Add a metadata file in the new directory with the name: <folder name>.resource-meta.xml
  • Add the following content to the body of metadata file.
<?xml version="1.0" encoding="UTF-8"?>
<StaticResource xmlns="http://soap.sforce.com/2006/04/metadata">
    <cacheControl>Public</cacheControl>
    <contentType>application/zip</contentType>
</StaticResource>

The files contained in the new directory will get zipped and uploaded as a new resource on the next push.

First Commit

git commit -m 'First Commit'

Trying out Listed as a better way of keeping track of the things I'm learning.