Ready, fire, aim

Agile is not Ready, Fire, Aim

(Disclaimer: this article is not about what Agile is, the term is used only for blatant marketing purposes. Some principles were violated in the writing of this post)

A colleague of mine recently said something to the effect of “the goal of agile is faster delivery”.  This is a common misconception fostered by the improved velocity that agile teams can achieve in the context of enhancing software with new or improved features. The goal of agile is higher quality software, where quality is defined as meeting the intended functionality in a reliable manner. (lots of paraphrasing there, so please don’t flame me about accuracy). Another root of this misconception is that people who do not participate in agile projects (sometimes referred to as chickens) want agile to be about time-to-market (I’m working on a longer rant on that topic alone). Just like some people want agile to eliminate the need for planning and documentation, not be because these things are not critical (apologies for the double negative), but because they are tedious. They are certainly not mindful, because one focuses on the past and the other on the future, and we all want our features right now. Agile without planning and documentation leads to technical debt (something I grumbled about recently, with more to come).

Technical debt is the driver behind this particular rant, as I recently observed the creation of an equivalent jumbo mortgage with an early balloon payment due. In the same recent article linked earlier I mentioned how sometimes a platform migration is driven by a desire to get out of unacknowledged tech debt. In this instance, I witnessed the debt being incurred as a result of the migration. Specifically, the approach was taken to manually migrate data that was in immediate use while configuring the application without documentation in order to get into production as quickly as possible (the root cause of most tech debt). The idea was to migrate the rest of the data later. This migration, like many these days, was from one SaaS to another. The secret to a maintainable and extensible SaaS application is including flex fields in the data model. These are fields that have no pre-defined purpose so that customers can use them for customization and the vendor can avoid the hairball that results from customizing for each customer. The downside to this data model is that if the customer changes default labels and makes heavy use of the flex fields without documenting all of these changes, the data migration effort increases several-fold.

So, here is a real-world example of the impact of technical debt in a compressed timeline that is easy to follow: Short cuts were taken to quickly “realize value” from a new platform, and then to fully taken advantage of the platform subsequent efforts are increased, resulting in a much higher total cost and longer timeline to completion to get that short term win. None of this is the result of bad people or malicious intent, in fact, quite the opposite. It is the result of a “modern” business culture that has evolved to focus on quarterly earnings. It also explains why businesses that really want to innovate either do so before their IPO or go private to get back on track. It’s not because software can’t be done right in a standard corporate structure, but that “Continuous attention to technical excellence and good design enhances agility”.

If you found this interesting, please share.

© Scott S. Nelson
IT Design

(Some) Best Practices in Design

Note: This is far from an exhaustive list, and will be updated occasionally to reflect that.

Design First

Always design first. Even if it is an agile project with an aggressive timeline, a clear understanding of what your solution will look like and the steps to get there will make the path easier to get to. Designing first is the opportunity to think through what you will be doing and recognize potential issues in advance. Often when design issues show up late they are dealt with as code flaws rather than design flaws, taking longer to correct and often leaving the design issue in the “fixed” result.

When I can recall the exact wording and attribution I will update this post…meanwhile, not defining an architecture is an architecture. Some refer to it as a Big Ball of Mud. I particularly like Gregor Hohpe’s many takes on this choice. Here is a link to an older-but-still-accurate blog post of his.

Developers need to Design, too

Your design can be as simple as stubbing out all of your classes before developing them. This way, issues that were missed during the design phase are more likely to be discovered earlier, before they become harder to fix.

Test-Driven Development is another approach to catch issues early on.

Insist on Design Review

Have a technical lead or peer review your design. The additional perspective is always helpful, either by validating that your approach is sound or questioning choices and reviewing options found by a fresh set of eyes.

Environment Variables

Environment variables should be maintained in the environment. Placing these variables in components where they must be updated between environments reduces the value of such variables and increases the chance of errors when migrating deployments between environments.

Balance Early Adoption with Out-of-Date

Going first in a presentation is brave. Being first to apply a new technology in an enterprise is always risky, and those risks must be seriously weighed beyond the “cool factor” of being an early adopter. Once you have committed to early adoption, mitigate risk with thorough testing and following any active communities taking the same journey.

Because of the frequent and rapid changes in technology, the familiar approach is not always the safest. Libraries, functions, features and patterns currently in use at your enterprise may be heading toward deprecation and retirement. With vendor products, especially cloud platforms, a newer, better approach could be available that is solid and well-tested (depending on the vendor, YMMV). Always check for newer alternatives before committing to a solution, and weigh the alternatives for fit both from a functional perspective and maintenance implications. And…

Don’t Trust, Verify

Vendor claims are written by the marketing team, not the development or support teams. If a vendor states that Product X provides feature Y, validate that it does and that it does it in a way that supports your design before committing to it.

DevOps

Yes, DevOps is a category unto itself, and it also needs to be considered during the design phase. Retrofitting DevOps practices is often difficult. For greenfield projects, prepare a detailed recommendation on the benefits of DevOps for the application and the steps necessary to implement and maintain. For enhancement projects, review the technology landscape for potential and recommend accordingly.

Test Automation Design

Not all applications are the same, so using the same tools and patterns for all applications won’t work. That isn’t to say they can’t be reused across applications. What is important is not to assume fit for purpose. At a minimum, review the current state of the are for the tools you are familiar with, who their competitors are, and then try things yourself before believing any hype. This review should be repeated regularly once the test stack is designed to maintain relevance.

If you found this interesting, please share.

© Scott S. Nelson
Select Query in Workbench

How to re-assign Salesforce object ownership in bulk

Here is a question I see frequently in the Trailhead Community: How do you re-assign the ownership of objects in bulk? I’m sure there is an app to make this easier, and I suggest you look in the AppExchange if the policy for your org is to use apps first. And I know there are other solutions, this is just one that I find quick and easy because I don’t have to give it too much thought.

Accounts before Owner Change

First: Always try it in a sandbox first and test the results before doing it in production.

Second first, locate the user id of the person who’s object owners ship you want to change from. From their user page (or just copying the link), grab the object ID from the URL.

Find Object Owner

Copy Object ID
Copy Object ID

Now open Salesforce Workbench in another tab, login and navigate to Queries > SOQL queries. If you are adept at SOQL, create a query to pull all of the object you want to re-assign based on the user id. If you are not comfortable writing your own SOQL or just feeling lazy, use Workbench to help create the query:

Select Query in Workbench

The key values you want are the object ID and the owner ID, though adding a Name field to check the values can be helpful. Be sure to select View as Bulk CSV then run the query. Save the resulting file. I recommend naming it something that is meaningful to you rather than accepting the long string produced by default. Open in your favorite CSV editor to see the object and owner ids.

Next, get the user ID of the new owner(s) the same way you did for the current owner. In the CSV file, change the OwnerId value as desired.

For safety reasons, delete all columns from the csv file except Id and OwnerId, then save it with a different name as a CSV file.

Object and Owner IDs only

Back in Workbench, go to Data > Update. Select the object type and click the Choose File button and select the file you just created with the new OwnerId(s), then click Next.

On the mapping screen the values should already be mapped. Check that only the ID and OwnerId are mapped and click the Map Fields button. If there are many records, check the “Process records asynchronously via Bulk API” option on the resulting page then Confirm Update. Note that if rules were changed since the records were created you may have errors that will require fixing the records before they can be updated.

Could happen if rules changed since created

And in list view:

After Owner Change

If you found this interesting, please share.

© Scott S. Nelson

Fixing SourceTree Credentials on Mac After Password Change

This happens every time I update my network password (as required every 60 days). It wasn’t until the third time that I made a note of what to do, and the fourth time where I posted it here so I can find it! I do not use a Mac regularly and freely admit I do not know the reason behind all of the steps (though I do for some, and won’t say which). I will say these steps worked consistently for the last 4 updates:

Log out of BitBucket from the browser

Do a full shut down of Source Tree

Back up and delete ~/Library/Application Support/SourceTree:

cd ~/Library/"Application Support"
mv SourceTree SourceTree.bak

Log in through the browser. Hopefully prompted with Captcha. May take a few tries (more consistent with Chrome than Safari).

Check something out through browser and enter new credentials when prompted. Remember to uncheck save credentials so it will use OAuth.

And yes, I know that this is unnecessary if using the command line. I like the Source Tree UI for managing conflicts and researching who made the change in the source that is currently driving me nuts 🙂

If you found this interesting, please share.

© Scott S. Nelson

Preparing for (and passing) the Salesforce Certified Platform Developer I Exam (WI19)

(Originally published at InfoWorld, this version has an additional section on test taking tips.)

I’m ambivalent about certifications. Because I spent enough time in school for the equivalence test validation to be embedded in my psyche I have enough certificates to fill a two-inch binder clip. Because I have been working in the real world long enough to know what most of them truly reflect, I actually display them all in two-inch binder clip with a sticky-note on top that says “Pick One”. Anyone who has multiple certification knows that not all are of equal value in terms of proof of knowledge. I have one from an enterprise vendor that is a household name, very fancy looking with a hologram in the middle. It is the result of showing up for class every day for two weeks and the check clearing. Yet I learned a great deal achieving it. Another was acquired as a pre-requisite for continued employment following a merger, which was easily achieved with no study and only a third of the allotted test time. The next took a solid year of daily study and was taken in hopes of leveraging it to leave the employer that required the previous one. 

My most recent certification was one of the more difficult to study for: The Salesforce Certified Platform Developer I (WI19). While I have plenty of practical experience working with Salesforce, there are many aspects of the product that are required knowledge for certification that just haven’t come up for the businesses requirements I have been fulfilling. However, I enjoy working with the product and Salesforce has done a good job of convincing decision makers of the value of certification as an indicator of ability that I wanted to have it to please those decision makers. So here is how I went about it.

Trailhead

Trailhead is an invaluable resource for learning Salesforce, regardless if you are seeking certification or not. I use it all the time to keep up on new and updated features and whenever I run across a requirement where a tool that I’m not thoroughly familiar with may be helpful. Also, in 2018, Salesforce move the certification verification to Trailhead as well as the maintenance exams.

If you have not already created a Trailhead account, do so before reading on. If you already have a free Developer org, sign up at Salesforce Trailhead. If not, go to the Developer Edition site and get yourself one first. Pro tip: Don’t use your email address as your user ID for the Developer org, even though that is the default value on the sign-up form. User IDs must be unique to all of Salesforce, not just the org.

On Trailhead, navigate through the menus under Credentials > Certifications then to the specific certification you are interested in (or jump to the Platform Developer I (PDI) page). Here you will find the Exam Guide, which is a good way to understand the structure of the exam. There is also a link to a Trailmix. Trailmixes are groupings of Trailhead training modules and super badges created by Salesforce and other Trailhead users. These are a great way to begin preparation for a certification. If you have been working with Salesforce, many of the modules will be topics you are already familiar with. Skip those according to your own confidence level. I will add this personal anecdote about skipping Trailmix modules: The second-lowest score I received on the exam was in a category I work with regularly. The exam questions were about aspects that I no longer consciously think about, similar to how it may be hard to give directions with street names for a route you travel daily because you traverse them on autopilot. A refresher may be useful.

Udemy

I used Udemy to great success for the Salesforce Administrator’s exam by taking an excellent preparation course taught by Francis Pindar and then a practice test course with three practice tests. Preparing for the Developer’s exam was a bit more daunting, mostly because the nature of the exam has evolved in the last couple of years and the courses have not caught up with it.

Before you get sticker shock looking at the Udemy courses, here is the strategy to pay a reasonable price for Udemy courses in general. Create your account on Udemy and take one or two free courses (there are many worth doing). Eventually (at longest up to three months) you will receive and offer for all courses for a flat rate per course that is quite reasonable. If your employer has a discount program that includes Udemy (such as Fond), you can get an even better price. I only paid $9.99 per course through my company’s Fond program.

As of this writing, the best Udemy course I found for the Developer’s exam is Salesforce Platform Developer 1 Certification Course by Deepika Khanna. It seems to be an Apex developer course that was later re-purposed for certification prep. As such, most of the content is there, though it may not be clear how it translates to the exam. There are also several course files that are not referenced in the course. One of these is a practice exam that has all of the answers in Word. Most of these questions are also in Salesforce Certified Platform Developer practice Tests, so I suggest you not read the Word document until after you have gotten everything you can from the practice exams.

I had taken another prep course on Udemy that had a great outline, but I did not find it a good learning resource as evidenced by the abysmal score I achieved on the first of the two practice exams.

The practice exam on Udemy is not the greatest, though it does reflect the actual exam process well, if not the questions themselves. There are a lot of spelling and grammatical errors in the practice exams and the mistake I made was to assume that an incorrectly spelt answer was automatically wrong. The spelling issue is not seen in the actual exam, so it is just an issue with the practice exam author.

Another lesson about practice exams is to avoid the temptation to take them early. There are only so many questions and you can end up memorizing the answer to those rather than learning the topic well enough to answer similar-but-different questions on the actual exam.

Other practice exam sites

The site I got the most from for drilling on test questions is a ProProfs Quiz, appropriately titled  Salesforce Platform Developer 1. Questions are added and updated occasionally. There were 131 questions available the final week before I took the exam. The same spelling issues seen on the Udemy practice tests are there, and many of the same questions. I also noted questions from the course quizzes from the exam preparation course I took, though not sure who copied who there. One thing to be aware of is that not all of the questions have the correct answers. Believe it or not, that is a good thing if you use the strategy I did. Every time I took the exam, I would research the questions I missed to better understand the concepts. This helped a lot. I also would save the final page with the answers to a PDF that I stored on my phone and reviewed when idle.

Some other useful practice sites:

  • Salesforce Certification Dev 401 #1 (also on ProProfs Quiz) is for the older exam. Most of the questions are still relevant, as the new exam has more topics than the old one.
  • Salesforce Certified Platform Developer 1 Quiz at Salesforce Tips, Tricks, & Notes is short but some of the questions are really hard. The order of events question was especially helpful in getting this topic down.
  • Simplilearn’s Free Salesforce Platform Developer I Practice Test is very hard, probably because they sell a certification preparation course. It requires some contact info, but I found they only send you ads a couple of times. No telling if they sell the info, though. Which is why I keep an anonymous account for such registrations.

Key topics to study

  • There are many questions related to Triggers and Order of Execution. Memorize this as best you can.
  • Knowing the Data Model well will boost your score. If you are good at memorizing things, the link will be sufficient. Otherwise, hands on experience (at work or on Trailhead) is the best way to embed the key points into your subconscious. I studied this the least and it was my highest scoring area from a combination of project work and Trailhead modules. YMMV.
  • Apex Testing has a multitude of sub-topics and there are some over-lapping concepts that can be confusing if you don’t regularly use this aspect of Salesforce.

Test Taking Tips

(This is a bonus section for readers of my LinkedIn or Solutionist blogs)

The process of answering the test questions is just as important as the approach to preparation in ensuring a passing score. I first go through the test quickly, reading each question and response options and answering those that are immediately obvious to me. I then go through a second time, answering the questions skipped the first time through and marking for review any that I don’t feel 100% confident about. An advantage to this approach is that sometimes one question is worded in such a way that I easily remember the answer and it reminds me of the correct answer to another, related question.

I then go back and review all of the questions marked for review, re-read the question and answer and asses my confidence. I do this in order of the exam questions because I still might leave it marked for review on this pass. The ones I was still unsure of on the review I then re-review. Finally, I go through the test from start to finish, reviewing each answer.

While this may sound very time consuming, I usually still finish with 20 – 30 minutes to spare.

Some final comments about certifications

The Salesforce employment market is heavily slanted towards certified applicants, so if you really like working with Salesforce and aren’t already in your dream job (or are a consultant who is always pursuing new clients), Salesforce certification is a must have. The Salesforce Administrator certificate I find the easiest to achieve, and if you are serious about Salesforce development I recommend getting both certificates because knowing enough administration to be certified will help you in designing better components.

No matter how hard or how easy a certification is to obtain, almost all are proof only of knowledge. In general, the application of knowledge is where the value is. As someone pursuing certification, continue your learning after certification. I find participating on the support discussions and completing Trailhead modules regularly to be a good way to grow beyond the day-to-day tasks.

And for employers, please weigh overall experience with certification achievements. Someone that has years of technical experience on multiple platforms and coding languages will be able to become very proficient in Salesforce in a short period of time, and someone with several certifications who has little experience outside of Salesforce and all within a small variety of orgs may not be the right fit for a complex implementation.

Finally, my own score on the exam was not in proportion to my actual capabilities. The exam results are broken down by category. In one case I scored very low in an area that I use regularly and frequently advise others on. In another case I scored quite high in an area I rarely use and most of my learning was academic. Having previously passed the administrator’s exam, it is no surprise that my best categories were the areas that overlap.

If you found this interesting, please share.

© Scott S. Nelson