Table of Contents
Collaboration to Develop Code in Loop
On May 23, 2023, Microsoft hinted in a tweet that they would soon bring code blocks to Loop. The idea is that users can insert code blocks in Loop workspaces and pages to collaborate with other people to develop ideas, fix bugs, and otherwise explore code. Last week, code blocks finally showed up in the Loop app (still in preview). The new type doesn’t appear in the set of Loop components currently available in Teams chat and Outlook. This is probably a timing issue and upcoming builds are likely to include the code component soon.
Writing PowerShell in the Loop App
The Office 365 for IT Pros eBook contains over 1,200 PowerShell examples, so I decided to use the Loop app to write some PowerShell. In a page, I typed “/” to see the set of blocks available and chose “Code” from the list. I then started to write PowerShell code (Figure 1).
The editor used for the code block is very simple. It’s like the editor invoked by Teams when people insert code snippets in chat or channel messages. Don’t expect to find code syntax checking of the type available in Visual Studio Code because none exists. Cmdlet parameters and variable names don’t autocomplete either.
But having a simple way to input rough code might be OK. The purpose of the code block is to share code with others to develop a collaborative solution to a problem. Once those involved have collaborated to find an answer, the resulting code can be copied into a development environment to check for syntax errors before testing.
Sharing Code Through Teams and Outlook
Astute observers will note that the code shown in Figure 1 is in a Loop component. That’s because I wanted to share the code with others through Outlook and Teams. Because the Loop integration with these apps only supports Loop components, it’s necessary to create a Loop component from the code block. This action results in the creation of a shareable file in Syntex Repository Services. You can then copy the component (or rather, generate a link to the component) and paste it into Teams chat (Figure 2) or an Outlook message.
It’s possible that by the time you read this text, you’ll be able to create a Loop code component in Teams and Outlook and do the reverse by including that component in a page in the Loop app.
Will People Use Code Blocks in Loop
Although it’s nice to be able to create code in the Loop app, a big question remains whether anyone will use Loop as the basis for collaboration for code-based projects. If the code block was more intelligent and incorporated syntax checking, then I would be more positive. For now, the code block is a good way to jot down some rough approximate ideas in pseudo code with the big caveat that whatever’s produced must be copied to a development environment for validation and testing.
The fact that Loop remains an internal-facing application with no ability to share outside a tenant is also problematic. Many of the folks I ask questions of when I run into a coding issue work outside of my tenant. I can’t drop some code into Loop and ask those people to collaborate with me in a code block or code component because they can’t access the code. I guess I’ll continue to paste code into Teams federated chat or email when I need an external answer to a problem.
So much change, all the time. It’s a challenge to stay abreast of all the updates Microsoft makes across Office 365. Subscribe to the Office 365 for IT Pros eBook to receive monthly insights into what happens, why it happens, and what new features and capabilities mean for your tenant.