Bookmarklet for Lightning Doc App

Posted on Mar 11, 2017

This is a simple javascript bookmarklet that will take you to the Lightning Documentation App from any SF page on your domain.  Works with Lightning or Classic.

javascript:'https://' + window.location.host.split('.')[0] + '.lightning.force.com/auradocs/reference.app#'

To use the link, create a bookmark with that code as the URL, or drag this link to your bookmarks toolbar.

Partial Copy Sandboxes: "Ghost Dad"

Posted on Feb 27, 2017

Salesforce gave us Partial Copy Sandboxes (which I think have been renamed Partial Data Sandboxes) and Sandbox Templates a few releases ago, the former of which is sort've halfway between a Developer Pro sandbox and a Full sandbox, where it doesn't have all your data and can be refreshed more quickly than a full sandbox, and the latter is used to specify the data you want to copy from prod when refreshing a Full or Partial Copy Sandbox.

I wanted to write about some weirdness with Partial Copy Sandboxes.

Partial Copy Sandboxes have some limits, which (as of this posting) are namely a 5 GB total database space limit, and a 10,000 record limit per object.

Datetime sensitive operations? Make sure your application can control its own dates

Posted on Feb 03, 2017

Just a short post about an old lesson that I was reminded of today.

I've done a few projects for some financial institutions that include date sensitive operations and calculations, things that have to be aware of the current date and will change values depending on what the date is, or processes that need to execute in a certain order and need to be completed all within the same day, etc.

One of the key things we realized early on is that we would need to build these calculations (and to some extent the processes) so that:

  • The calculations had the flexibility to be executed "out of time" ie. you had the ability to simulate what the current date/date time was so you could get the results out of the calculations that you wanted.
  • The system had built-in time-senstive reminders to prompt users to take certain actions and not forget.

In the former, this was important for a few reasons:

lightning:icon, Lightning Design System & Winter '17: did these people talk to each other?

Posted on Oct 20, 2016

I'm working on my first proper Lightning Component project, and the experience has been both frustrating and pleasant. Pleasant in the sense that it reminds me of my days working with Flash and Actionscript, where you'd build movie clips (child components) with discrete animations or functionality, and they would dispatch events to listeners on the _root level/stage. (your parent, master component) The correlation is made all the more stronger since we're dealing with UI in both situations.

At any rate, this is a short post to talk about the Winter '17 lightning component, <lightning:icon />, and the recommended markup for UI components provided by the Lightning Design System (SLDS).

"Counting Frames": academic discussion on fighting games

Posted on Sep 04, 2015

Really great academic talk (1hr) from Frank Lantz at NYU Game Center about fighting games, how they differ culturally, historically and mechanically from other game genres. I found the sections on the "Paradox of Competition" (you are trying to defeat and yet at the same time co-operate with your foes; you create a game for them to play at the same time as you play the game), the fighter in history and philosophy, and game mastery really fascinating.

Made me really miss my time spent in arcades, mastering SF2, MK1 & 2, KI and others. I miss the competition and that mastering of a skill, and I love the beautiful designs in the modern fighting games we have, but I can't justify the time investment, at least not without a community of people to play against. :/

JS to quickly check Salesforce field-level visibility checkboxes

Posted on Jul 07, 2015

This is a small, handy little javascript that will check all the checkboxes on the Field Visibility screen for a user profile.  Should work in the javascript console of all modern browsers.

var x = document.querySelectorAll(".displayedCol input"); for (var i = 0; i < x.length; i++) { x[i].checked="checked"; }

Sometimes while setting up objects and profiles for a project, you might do things out of order, or create objects using the Schema Builder or the Meta API, neither of which lets you set field permissions for user profiles.  Then you find yourself needing to go to each user profile, go to the field-level visibility settings of each object you created, and check all those boxes so the fields will be visible to the new profile.  The above javascript will check all the boxes for you; it's basically a "select all" for the Visibility column.

Darkest Dungeon: dungeon crawler meets sports management

Posted on Jun 21, 2015

I picked up Darkest Dungeon in the Steam Summer Sale last week and I've been really enjoying my time with it.  It's a gothic fantasy RPG resource/team management game that was KickStarted in Mar 2014 and is currently on Steam Early Access while under development.  Don't let "Early Access" disuade you, the game is fully playable right now.

You don't play any singular character in Darkest Dungeon but instead manage a roster of adventurers who you lead into the areas surrounding your town to defeat monsters, push the story forward, and get loot to build up your town and recruit more adventurers.

On using hash tags in your code comments

Posted on Jun 09, 2015

I write a lot of code comments. It helps me structure my code and make it a bit easier to scan, but it helps my future self too: understand why I did something; alerts for pitfalls or not so obvious code structures; etc.  I've also written apologies to other developers who may come across my code one day. :P

Something that I've started doing in the past year is "tagging" my code: adding hashtags to act as bookmarks to help me find key lines of code that are related to something I'm working on or something I did in the past.

Some examples:

// #tags #kludge #revisit

...or...

// #tags #2015rebuild #govLimits

They always start with "#tags" so I can find all the tags later (doing a search inside project files) and remind myself of what keywords I used, and then follow up with something more descriptive about whatever I'm tagging.

Javascript access to Media Queries & Link dump: Connection latency, the fate of client services and more

Posted on Feb 18, 2015

Since the new year I've been doing some research about what's being going on in the front-end dev world in the last few years since I've been away from it.  The times, they are a changing, and they are a changing rapidly!  I've pulled together a link dump of a bunch of articles that I found really interesting on a range of topics, you may find some of this useful and insightful...

Link: On being a great programmer...

Posted on Feb 11, 2015

I was watching this talk on how to go from being an intermediate developer to a expert programmer, and ended up pulling out this great nugget from a gentleman named Ed Weissman:

A smart accountant once told me that the answer to “How much money did you make?” is always, “Who wants to know?” If it’s an investor, the answer is “A lot.” If it’s a customer, the answer is “A little.” If it’s the IRS, the answer is “None.”

Same thing here. The answer to “Who is a good programmer?” is always, “Who wants to know?”

To a project manager, the programmer who hits every deadline (regardless of quality) is a good programmer.

To a customer, the programmer who solves their problem quickest is a good programmer.

To a business owner, the programmer who makes them the most money is a good programmer.

Pages