Think you understand Daml Templates? Take this quick refresher and test your knowledge

Hi Everyone, for those new to Daml there’s a lot of information to digest. It can sometimes be overwhelming. We are creating a series of video “shorts” as quick refreshers to many of the Daml structures you need to learn. Here’s an example of one. Check out “Deconstructing Daml Templates” and let us know what you think!

2 Likes

Hi, @Chris_Olson! Thanks for sharing this preview. The professional narration makes for really easy listening. Nice!

And the integrated knowledge checks are nice too.

I did get stuck on Question 3, by the way. But I’m sure these types of bugs will be worked out.

screen recording

@Chris_Olson
This is a nice video, and I think it’s very useful as a quick overview or a review of the structure of a Daml template.
Here are some issues I noticed.

  • The code snippet uses deprecated “controller … can” syntax for choice declaration. Both the code and the narration (that points out that specifying the observers is redundant in this example) need to be updated to use the new choice syntax.
  • Question #3 in the knowledge assessment at the end is misleading. Daml contracts cannot be changed. The mutability is modeled is Daml by archiving the contract that we want to modify and creating a new one based on the original contract with mutated values for the fields.
  • Neither of the two-choice answers to Question #3 is accepted. Which is correct (see the previous comment). But it doesn’t allow to move on to questions 4 and 5, as @WallaceKelly pointed out.
  • The audio is slightly cut off at the very end. It feels like the speaker doesn’t finish pronouncing the last word.

Thanks Alex…good catch…we will fix ASAP

As mentioned above, nice video and hits all the main points.

One small point on observers, they don’t just get to see the contract, they also get to see the ledger event which eventually consumes the contract and by extension the entire sub-transaction tree at that point. This may not be a level of detail we care about with this level of tutorial, but you were extremely emphatic that “seeing the contract” is the only effect of an observer.

Also, a couple of /nits.

  • The ensures block is greater or equal to zero in the code.
  • The captions put a space in the keyword nonconsuming which shouldn’t be there

I would also consider picking an example with fewer fields, this would allow space for an example where the choice does take an argument, and then does perform a fetch and assert to illustrate your discussion on choice contents.

Great presentation. I did note that when you switch to the Video in a Chrome tab, it autoplays. Not a showstopper but annoying.

Some of the pauses between a spoken sentence and the next one are sometimes not handled cleanly.

An example is at 4:28m:

‘key of this tuple of party. party and text is your owner’ all spoken in one breath.

Suggestion: I made a key of this Tuple. PAUSE. This tuple includes a Party PAUSE. A second Party PAUSE. and the Text is your contract owner.

I know from using a commercial AI Voice service, that sometimes you need to add twice as much pause between one paragraph to another, to make the syntax break clear but natural.

Apart from that, it was informative and I think that this style applied to all of our training videos would be a great instructive benefit, for both internal and external users.

Wait?! That was not a human?!

DevRel can confirm but I am confident that this is AI-generated Voice, both the Male and Female.

Pretty high quality, right?

If not for language flow, cadence issues, one might never know.

1 Like

Yes, the narration is recorded using commercial AI voice service, which allows us to easily update the audio whenever we want. Pretty cool, isn’t it?

1 Like

It had me fooled.

2 Likes