Now that you’re all set up and have the CodeStream plugin running in your IDE, it’s time to get down to the business of talking about code. Let’s start with a quick rundown on the basics of posting messages and participating in discussions about code.
CodeStream brings elements of team chat right into your IDE. The first thing you’ll notice is the addition of a new pane at the right side of the window. This is where the chat stream lives, and each file in your source tree has its own stream. That way discussions are kept in context, right in the relevant source file.
The source tree itself is now effectively a list of chat streams, and as you might expect from a chat service, it let’s you know when you have new messages and when you've been explicitly mentioned (blue badge).
If you are mentioned in a post, but either you don’t have your IDE open or the message was posted to a repository that you don’t currently have open, you’ll get notified via email. You can even reply to the email and the reply will get posted to the appropriate stream. No need to fire up the IDE, or open a different repo, if a quick reply to the email will suffice.
Read the guide to CodeStream notifications for more information on how notifications work and how you can configure them, including the ability to mute files and folders that aren't relevant to you
Posting messages is really straightforward. Just pick a source file, type your message, and hit Enter. Done! Everyone on your team can participate in the conversation. Type the @ sign and select a teammate from the list if you need to call out someone specifically. Right-click on one of your posts if you need to edit or delete it.
Sometimes the discussion in a particular source file is a general one, and not about specific lines of code. More often than not though, the discussion will be focused on a specific code block. Maybe you’re running into issues with a certain function. Maybe you want to get another set of eyes on a few lines. Or maybe you want to know why in the world something was implemented a certain way. Whatever the case may be, just select the code block and then click the "+" button that appears to the right of the selection.
The selected code is now displayed immediately above the compose box. You’ll notice that the most recent author of that code block is automatically mentioned, making it really easy to bring your post to the attention of the developer who might be best qualified to help. Of course, you can remove that mention if it’s not needed.
What if the code you want to discuss only exists in your buffer? No problem. When your teammates view the post they’ll have options to view the code as a diff (from what’s in their own buffer) or to apply the changes to their buffer. No need for you to push your code, and have them pull it, to have a discussion about work in progress.
We all know that chat streams can sometimes get a little messy with cross-talk, and that’s why CodeStream allows you to create threads to keep discussions together. Click on any post in the stream to view its thread, and add a reply. Clicking on a reply will also bring you into the thread in which it was posted.
You can even reply with a code block. Just have thread open in the right pane when you select the code block. For example, if back and forth discussion isn't getting the job done, you want to just show someone what to do. Make the changes in your buffer, select the code, and post it as a reply. Your teammate can apply the change to their buffer with the click of a button, and they’re done. All is good in the world, thanks to you!
Heading Off Problems
Heading off problems before they even happen is ideal, and to help facilitate that CodeStream will let you know when another developer is working in the file that you currently have open. Just look for the banner at the top of the CodeStream pane.
If you both start to edit the file, the banner will let you know that there's the possibility of a merge conflict. That way you can talk to the other developer and work things out now, rather than unwinding a merge conflict later!
Rules of Engagement
Well, there are no rules really. Just a few thoughts on how to think about getting the most out of CodeStream, and by extension, the most out of your development team.
Don’t hold back
CodeStream takes the friction out of talking about code, so don’t hesitate to ask questions early and often. The whole idea is to leverage your team’s knowledge and experience, and you need to initiate a discussion in order for that to happen.
Help out where you can, when you can
Some of that knowledge is in your head as well, so don’t be stingy with it! Offering your help and insights is easy. You don’t even need to switch apps! If you’re in the zone, stay there. Check messages and chime in when you can, although if you’ve been mentioned maybe your assistance is needed more urgently.
Think about the future (developers, that is)
Think about the long-term benefit of these discussions. Future developers will notice the bubbles along the right border of the source file and know that they can click on them to see past discussions about a particular block of code. Sometimes it’s a brand new developer trying to understand the code they’ve just inherited, and sometimes it’s just you just trying to remember what you did and why you did it!