<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Kevin Gilpin</title>
    <description>The latest articles on Forem by Kevin Gilpin (@kgilpin).</description>
    <link>https://forem.com/kgilpin</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F555587%2F2be89914-0dee-4f3f-a4f0-2102df256d7d.jpeg</url>
      <title>Forem: Kevin Gilpin</title>
      <link>https://forem.com/kgilpin</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/kgilpin"/>
    <language>en</language>
    <item>
      <title>Data is coming in - from Microsoft, CircleCI, and others. AI coding assistants can't make reliable commits. Let's talk about the RIGHT way to use AI for software development.</title>
      <dc:creator>Kevin Gilpin</dc:creator>
      <pubDate>Fri, 30 May 2025 14:29:54 +0000</pubDate>
      <link>https://forem.com/kgilpin/data-is-coming-in-from-microsoft-circleci-and-others-ai-coding-assistants-cant-make-reliable-11je</link>
      <guid>https://forem.com/kgilpin/data-is-coming-in-from-microsoft-circleci-and-others-ai-coding-assistants-cant-make-reliable-11je</guid>
      <description>&lt;div class="ltag__link--embedded"&gt;
  &lt;div class="crayons-story "&gt;
  &lt;a href="https://dev.to/kgilpin/ai-coding-assistants-drive-developers-crazy-and-submit-broken-code-507c" class="crayons-story__hidden-navigation-link"&gt;AI coding assistants "drive developers crazy" and "submit broken code"&lt;/a&gt;


  &lt;div class="crayons-story__body crayons-story__body-full_post"&gt;
    &lt;div class="crayons-story__top"&gt;
      &lt;div class="crayons-story__meta"&gt;
        &lt;div class="crayons-story__author-pic"&gt;

          &lt;a href="/kgilpin" class="crayons-avatar  crayons-avatar--l  "&gt;
            &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F555587%2F2be89914-0dee-4f3f-a4f0-2102df256d7d.jpeg" alt="kgilpin profile" class="crayons-avatar__image"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div&gt;
          &lt;div&gt;
            &lt;a href="/kgilpin" class="crayons-story__secondary fw-medium m:hidden"&gt;
              Kevin Gilpin
            &lt;/a&gt;
            &lt;div class="profile-preview-card relative mb-4 s:mb-0 fw-medium hidden m:inline-block"&gt;
              
                Kevin Gilpin
                
              
              &lt;div id="story-author-preview-content-2545502" class="profile-preview-card__content crayons-dropdown branded-7 p-4 pt-0"&gt;
                &lt;div class="gap-4 grid"&gt;
                  &lt;div class="-mt-4"&gt;
                    &lt;a href="/kgilpin" class="flex"&gt;
                      &lt;span class="crayons-avatar crayons-avatar--xl mr-2 shrink-0"&gt;
                        &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F555587%2F2be89914-0dee-4f3f-a4f0-2102df256d7d.jpeg" class="crayons-avatar__image" alt=""&gt;
                      &lt;/span&gt;
                      &lt;span class="crayons-link crayons-subtitle-2 mt-5"&gt;Kevin Gilpin&lt;/span&gt;
                    &lt;/a&gt;
                  &lt;/div&gt;
                  &lt;div class="print-hidden"&gt;
                    
                      Follow
                    
                  &lt;/div&gt;
                  &lt;div class="author-preview-metadata-container"&gt;&lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;

          &lt;/div&gt;
          &lt;a href="https://dev.to/kgilpin/ai-coding-assistants-drive-developers-crazy-and-submit-broken-code-507c" class="crayons-story__tertiary fs-xs"&gt;&lt;time&gt;May 30 '25&lt;/time&gt;&lt;span class="time-ago-indicator-initial-placeholder"&gt;&lt;/span&gt;&lt;/a&gt;
        &lt;/div&gt;
      &lt;/div&gt;

    &lt;/div&gt;

    &lt;div class="crayons-story__indention"&gt;
      &lt;h2 class="crayons-story__title crayons-story__title-full_post"&gt;
        &lt;a href="https://dev.to/kgilpin/ai-coding-assistants-drive-developers-crazy-and-submit-broken-code-507c" id="article-link-2545502"&gt;
          AI coding assistants "drive developers crazy" and "submit broken code"
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;div class="crayons-story__tags"&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/ai"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;ai&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/programming"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;programming&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/webdev"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;webdev&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/productivity"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;productivity&lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="crayons-story__bottom"&gt;
        &lt;div class="crayons-story__details"&gt;
          &lt;a href="https://dev.to/kgilpin/ai-coding-assistants-drive-developers-crazy-and-submit-broken-code-507c" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left"&gt;
            &lt;div class="multiple_reactions_aggregate"&gt;
              &lt;span class="multiple_reactions_icons_container"&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/exploding-head-daceb38d627e6ae9b730f36a1e390fca556a4289d5a41abb2c35068ad3e2c4b5.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/multi-unicorn-b44d6f8c23cdd00964192bedc38af3e82463978aa611b4365bd33a0f1f4f3e97.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/sparkle-heart-5f9bee3767e18deb1bb725290cb151c25234768a0e9a2bd39370c382d02920cf.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
              &lt;/span&gt;
              &lt;span class="aggregate_reactions_counter"&gt;6&lt;span class="hidden s:inline"&gt; reactions&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/a&gt;
            &lt;a href="https://dev.to/kgilpin/ai-coding-assistants-drive-developers-crazy-and-submit-broken-code-507c#comments" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left flex items-center"&gt;
              Comments


              1&lt;span class="hidden s:inline"&gt; comment&lt;/span&gt;
            &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="crayons-story__save"&gt;
          &lt;small class="crayons-story__tertiary fs-xs mr-2"&gt;
            2 min read
          &lt;/small&gt;
            
              &lt;span class="bm-initial"&gt;
                

              &lt;/span&gt;
              &lt;span class="bm-success"&gt;
                

              &lt;/span&gt;
            
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;/div&gt;


</description>
      <category>ai</category>
      <category>programming</category>
      <category>webdev</category>
      <category>productivity</category>
    </item>
    <item>
      <title>AI coding assistants "drive developers crazy" and "submit broken code"</title>
      <dc:creator>Kevin Gilpin</dc:creator>
      <pubDate>Fri, 30 May 2025 14:27:28 +0000</pubDate>
      <link>https://forem.com/kgilpin/ai-coding-assistants-drive-developers-crazy-and-submit-broken-code-507c</link>
      <guid>https://forem.com/kgilpin/ai-coding-assistants-drive-developers-crazy-and-submit-broken-code-507c</guid>
      <description>&lt;p&gt;The last twelve months have seen an explosion in AI coding assistants. The hype about these tools has focused on developer replacement - "developers will lose their jobs to AI". &lt;/p&gt;

&lt;p&gt;How's that going? If you're following the news and metrics, a very different reality is becoming apparent.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;🐛 Does code review come too late to be useful? Get AI-assisted code review suggestions automatically in real-time: bugs, security flaws, and performance problems.&lt;/p&gt;

&lt;p&gt;💡 Check out my open source VSCode extension - &lt;a href="https://marketplace.visualstudio.com/items?itemName=kgilpin.opentips" rel="noopener noreferrer"&gt;OpenTips&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Here are two specific ways in which AI software assistants are falling short of the hype.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. (reddit) AI is driving developers "insane"
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.reddit.com/r/ExperiencedDevs/comments/1krttqo/my_new_hobby_watching_ai_slowly_drive_microsoft/" rel="noopener noreferrer"&gt;(reddit) My new hobby: watching AI slowly drive Microsoft employees insane&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl48x76y5oao57zcjwfvn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl48x76y5oao57zcjwfvn.png" alt="Reddit discussion" width="800" height="329"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Microsoft developers are playing whack-a-mole with AI coding assistants while they run around in circles, fixing one bug while introducing another and paying no attention to the design of the project.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"No real understanding of what it's doing, it's just guessing"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  2. (CircleCI) Real data about the impact of AI code on code velocity
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.linkedin.com/pulse/hype-cycle-real-impact-ai-code-software-delivery-outcomes-circleci-0pbje/" rel="noopener noreferrer"&gt;(CircleCI) Hype cycle: The real impact of AI code in software delivery outcomes&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk9wd6tfubbnryumq7q27.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk9wd6tfubbnryumq7q27.png" alt="MTTR" width="800" height="498"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;41% rise in bug rates&lt;/li&gt;
&lt;li&gt;40% lower success rate of CI jobs&lt;/li&gt;
&lt;li&gt;50% increase in mean time to recovery (MTTR)&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;"developers using AI assistants ... more likely to introduce vulnerabilities while overestimating their code's security"&lt;/p&gt;

&lt;p&gt;"while AI speeds up coding tasks, it also leads to more frequent failures"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;My take - while AI coding assistants can be very useful, they are frequently being used in completely the wrong way, and by the wrong people.&lt;/p&gt;

&lt;p&gt;First, don't expect AI coders to take the place of developers; even junior developers. Read the whole Reddit thread above if you want to see exactly why AI is not even capable of providing quality bug fixes for well-defined issues.&lt;/p&gt;

&lt;p&gt;Second, don't use AI to generate code commits. Use it to:&lt;/p&gt;

&lt;p&gt;1) Generate code design ideas&lt;br&gt;
2) Help with troubleshooting&lt;br&gt;
3) Get code review suggestions&lt;/p&gt;

&lt;p&gt;In all of these cases, it's incumbent on the developer to curate and ultimately approve or reject the AI coding output.&lt;/p&gt;

&lt;p&gt;I see no indicate that this fundamental partnership between AI and software developers is going to change any time soon. &lt;/p&gt;

&lt;p&gt;Embrace this partnership in your work - value both the AI and the person, and let's stop with hype about AI as a human-replacing technology in software development.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;🐛 Does code review come too late to be useful? Get AI-assisted code review suggestions automatically in real-time: bugs, security flaws, and performance problems.&lt;/p&gt;

&lt;p&gt;💡 Check out my open source VSCode extension - &lt;a href="https://marketplace.visualstudio.com/items?itemName=kgilpin.opentips" rel="noopener noreferrer"&gt;OpenTips&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>ai</category>
      <category>programming</category>
      <category>webdev</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Should you accept an AI coding suggestion?</title>
      <dc:creator>Kevin Gilpin</dc:creator>
      <pubDate>Fri, 21 Mar 2025 16:32:08 +0000</pubDate>
      <link>https://forem.com/kgilpin/should-you-accept-an-ai-coding-suggestion-224i</link>
      <guid>https://forem.com/kgilpin/should-you-accept-an-ai-coding-suggestion-224i</guid>
      <description>&lt;p&gt;How do you know if you should accept an AI code suggestion? I’m a software engineer with 30 years of experience and I’ve built AI coding tools myself, including &lt;a href="https://marketplace.visualstudio.com/items?itemName=appland.appmap" rel="noopener noreferrer"&gt;AppMap&lt;/a&gt; and &lt;a href="https://marketplace.visualstudio.com/items?itemName=SgtAirRaid.opentips" rel="noopener noreferrer"&gt;OpenTips&lt;/a&gt;. In this vide, I break down how to analyze AI code suggestions to get the best results. I have a lot of experience doing this and I can quickly simplify this process down to its essential steps. &lt;/p&gt;

&lt;p&gt;This video uses an example of an OpenTips AI suggestion for an iOS app. I discuss the two criteria that I use to decide if I want to accept the tip:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Is it needed?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;1) Does it fill an essential gap in the user experience?&lt;br&gt;
2) Does it fix a security problem?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Is the implementation correct?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;1) Do I understand it? If not, is it worth the research?&lt;br&gt;
2) Is it adding a new tool or library? It has to add something that would be hard to do myself. &lt;br&gt;
3) Does it follow the conventions of the existing code? &lt;br&gt;
4) Will it make the code simpler without breaking a lot of tests? &lt;/p&gt;

</description>
      <category>ai</category>
      <category>programming</category>
      <category>vscode</category>
      <category>githubcopilot</category>
    </item>
    <item>
      <title>Caption this image! (Azure &amp; CrowdStrike outages)</title>
      <dc:creator>Kevin Gilpin</dc:creator>
      <pubDate>Fri, 19 Jul 2024 13:36:11 +0000</pubDate>
      <link>https://forem.com/kgilpin/caption-this-image-azure-crowdstrike-outages-57dh</link>
      <guid>https://forem.com/kgilpin/caption-this-image-azure-crowdstrike-outages-57dh</guid>
      <description>&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F64qvf01uds5v62758yyu.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F64qvf01uds5v62758yyu.jpg" alt="Software emergency"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Context: &lt;a href="https://www.theguardian.com/technology/article/2024/jul/19/crowdstrike-microsoft-outage" rel="noopener noreferrer"&gt;https://www.theguardian.com/technology/article/2024/jul/19/crowdstrike-microsoft-outage&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I admit that this is just cheap fun at their expense but hey - if I take down the entire global infrastructure of hospitals, government, and airlines someday, you can feel free to razz me too.&lt;/p&gt;

</description>
      <category>humor</category>
      <category>security</category>
      <category>programming</category>
    </item>
    <item>
      <title>How AppMap Navie solved the SWE bench AI coding challenge</title>
      <dc:creator>Kevin Gilpin</dc:creator>
      <pubDate>Tue, 25 Jun 2024 16:11:31 +0000</pubDate>
      <link>https://forem.com/appmap/how-appmap-navie-solved-the-swe-bench-ai-coding-challenge-20an</link>
      <guid>https://forem.com/appmap/how-appmap-navie-solved-the-swe-bench-ai-coding-challenge-20an</guid>
      <description>&lt;p&gt;&lt;a href="https://appmap.io/product/appmap-navie.html" rel="noopener noreferrer"&gt;AppMap Navie&lt;/a&gt; is an AI coding assistant that you can use directly in your VSCode or JetBrains code editor.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.swebench.com/" rel="noopener noreferrer"&gt;SWE Bench&lt;/a&gt; is a benchmark from Princeton University that assesses AI language models and agents on their ability to solve real-world software engineering issues. It's made up of 2,294 issues from 12 popular Python repositories, along with their human-coded solutions and test cases. It is considered to be the most difficult of the well-known coding benchmarks.&lt;/p&gt;

&lt;p&gt;AppMap Navie recently posted 14.6% on SWE Bench, ahead of Amazon Q and 8 other tools. We were able to process the entire benchmark in under 4 hours, and at the lowest recorded cost of operation - up to 95% less expensive than other solvers.&lt;/p&gt;

&lt;p&gt;How did we do it? Read on for useful techniques that you can apply to your own AI programming.&lt;/p&gt;

&lt;h1&gt;
  
  
  Why basic solvers fail
&lt;/h1&gt;

&lt;p&gt;The easiest way to use an LLM to solve a code issue is simply to send the issue description to the LLM along with all the code files and prompt the LLM to generate a patch file. This is basically what the first generation of SWE bench solvers attempted to do. However, the solution rate of this approach is very low (single digit percents).  Why?&lt;/p&gt;

&lt;p&gt;1) &lt;strong&gt;Wrong context&lt;/strong&gt; Most LLMs have a context limit which is too small to load the entire codebase. So, some guesses have to be made about which files to give the LLM. And when those guesses are wrong, the LLM fails to generate the right solution.&lt;/p&gt;

&lt;p&gt;2) &lt;strong&gt;Failed patching&lt;/strong&gt; LLMs are not good at creating patch files. Most LLM-generated patch files will fail to apply.&lt;/p&gt;

&lt;p&gt;3) &lt;strong&gt;Broken code&lt;/strong&gt; LLMs will generate code that is malformed. It won't even run cleanly, never mind pass the test cases.&lt;/p&gt;

&lt;p&gt;4) &lt;strong&gt;Wrong code design&lt;/strong&gt; The LLM does not understand the project design and architecture. So, it tries to solve the problem in the wrong place; or it fixes one problem while creating another.&lt;/p&gt;

&lt;p&gt;You can see some of these early solvers on the SWE bench leaderboard:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fplpj8td6mxgzyl0w8l5o.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fplpj8td6mxgzyl0w8l5o.png" alt="Early SWE Bench solvers"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Generation 2 - Agentic architecture
&lt;/h1&gt;

&lt;p&gt;The next generation of solvers adopted a more complex architecture, in an effort to solve the problems above.&lt;/p&gt;

&lt;p&gt;Basically, the idea of an "agent" is to give the LLM a wider variety of tools, and then run a loop in which the LLM chooses a tool and examines the results of using it.&lt;/p&gt;

&lt;p&gt;Tools do things like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;Search&lt;/code&gt; the code for a keyword&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Inspect&lt;/code&gt; a file&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Run&lt;/code&gt; a program and examine the console output&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Edit&lt;/code&gt; a file&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Agents do substantially better on the benchmark:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr1kny5n6n2ouxutuiqdj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr1kny5n6n2ouxutuiqdj.png" alt="Agents"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;However, most of the "agentic" solutions only appear on the SWE Bench "Lite" leaderboard. Why is that? &lt;/p&gt;

&lt;p&gt;1) 💸 &lt;strong&gt;Cost&lt;/strong&gt; Every tool an agent uses consumes tokens. Tokens cost money. Agentic loops use tokens over and over.&lt;br&gt;
2) 🐢 &lt;strong&gt;Speed&lt;/strong&gt; By design, agentic solvers can take a lot of time to explore the problem space. They can backtrack and repeat things they've already done. They can get stuck. &lt;/p&gt;

&lt;h1&gt;
  
  
  AppMap Navie architecture - Semi-agentic
&lt;/h1&gt;

&lt;p&gt;Agents have a higher pass rate than Basic solvers, but they are slow and expensive. AppMap Navie takes an intermediate architecture, in which the solver is provided with powerful capabilities:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Rich, but selective, code context to enable &lt;a href="https://research.ibm.com/blog/retrieval-augmented-generation-RAG" rel="noopener noreferrer"&gt;retrieval-augmented generation&lt;/a&gt; (RAG) architecture.&lt;/li&gt;
&lt;li&gt;A powerful and reliable tool for making file edits.&lt;/li&gt;
&lt;li&gt;Self-healing feedback for fixing code.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr95e33a7gzxdorbm936r.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr95e33a7gzxdorbm936r.png" alt="Navie architecture"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Code context
&lt;/h2&gt;

&lt;p&gt;It's inefficient and expensive to send huge amounts of code context to the LLM. Embeddings are slow and expensive to generate. But without the right code context, the LLM-generated solution will fail. &lt;/p&gt;

&lt;p&gt;Navie uses a technique called "client-side RAG", in which the code is organized and searched locally. Client-side compute is fast, cheap, and much more efficient than sending huge token payloads to the LLM or building expensive embeddings.&lt;/p&gt;

&lt;h2&gt;
  
  
  Planning
&lt;/h2&gt;

&lt;p&gt;With the right context selected, it's time to get right to code generation - right?&lt;/p&gt;

&lt;p&gt;Wrong. Before code generation comes Planning. Human developers don't dive into coding without some kind of plan. Building an understanding of the system architecture is an essential step, it can't be skipped over by humans, and it shouldn't be skipped by AI coders either.&lt;/p&gt;

&lt;p&gt;So, Navie performs an explicit planning step, in which the the issue description is combined with the context to produce a detailed plan. The plan includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A restatement of the problem.&lt;/li&gt;
&lt;li&gt;A high level solution description.&lt;/li&gt;
&lt;li&gt;A list of files to be modified.&lt;/li&gt;
&lt;li&gt;For each file, a description (no code, yet), of how that file will be changed.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here's an &lt;a href="https://gist.github.com/kgilpin/32857849619aed2e4d4df88152333909" rel="noopener noreferrer"&gt;example of a Navie-generated plan&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  File editing
&lt;/h2&gt;

&lt;p&gt;Now, with the plan in hand, the LLM is ready to change code files.&lt;/p&gt;

&lt;p&gt;Navie doesn't ask the LLM to generate patch files; it doesn't work. Instead, the LLM generates a "search / replace" pair of code snippets. This works most of the time, and a simple retry loop fixes up most of the occasions when it doesn't.&lt;/p&gt;

&lt;p&gt;Here are the &lt;a href="https://gist.github.com/kgilpin/c15fda05ee41e1f6ba16df33c8e9d869" rel="noopener noreferrer"&gt;Navie-generated code changes&lt;/a&gt; that implement the Plan.&lt;/p&gt;

&lt;h2&gt;
  
  
  Lint repair
&lt;/h2&gt;

&lt;p&gt;The LLM still might get something wrong. Common cases include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Mistakes with indenting (particularly with Python).&lt;/li&gt;
&lt;li&gt;Missing imports.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The Navie solver runs a linter, then feeds the linter errors back into the AI code editor. Most lint errors can be fixed this way.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://gist.github.com/kgilpin/9d7e77cbd87b2fc2f8c7a69817bea6d8" rel="noopener noreferrer"&gt;An example of lint errors fixed by Navie&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Test repair
&lt;/h2&gt;

&lt;p&gt;Still not done! If the solution generated by Navie breaks existing tests, it's probably not going to fix the issue properly. So the Navie solver runs the application test cases to try and catch and fix any incompatibilities that may have been introduced.&lt;/p&gt;

&lt;h2&gt;
  
  
  Now, it's ready
&lt;/h2&gt;

&lt;p&gt;Now a patch file is created by simply diff-ing the AI-edited code with the Git base revision. This patch file is submitted to the SWE Bench harness for evaluation.&lt;/p&gt;

&lt;h1&gt;
  
  
  How is this so efficient?
&lt;/h1&gt;

&lt;p&gt;The Navie solver runs for about 1/3 the cost of most other solvers; and it's 95% cheaper than some of the most intensive agentic solvers on the benchmark (of those that post their costs; many don't 🙁). &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Efficient client-side RAG context saves $$ on embeddings and LLM tokens.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Lint repair and test repair fixes solutions that might be almost, but not quite, correct. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A smaller "tool" suite and a linear approach to solving the problem prevents the LLM from wandering down dead ends or getting lost in pointless loops.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffypvf5w7rr9tc20suzwx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffypvf5w7rr9tc20suzwx.png" alt="Dollar cost SWE bench"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Try Navie yourself!
&lt;/h1&gt;

&lt;p&gt;Navie is available today, with no wait list. Here's how to get Navie, or learn more about AppMap:&lt;/p&gt;

&lt;p&gt;⬇️ Download AppMap Navie for VSCode and JetBrains: &lt;a href="https://appmap.io/get-appmap" rel="noopener noreferrer"&gt;https://appmap.io/get-appmap&lt;/a&gt;&lt;br&gt;
⭐ Star AppMap on GitHub: &lt;a href="https://github.com/getappmap" rel="noopener noreferrer"&gt;https://github.com/getappmap&lt;/a&gt;&lt;br&gt;
📰 Follow on LinkedIn: &lt;a href="https://www.linkedin.com/company/appmap" rel="noopener noreferrer"&gt;https://www.linkedin.com/company/appmap&lt;/a&gt;&lt;br&gt;
💬 Join AppMap Slack: &lt;a href="https://appmap.io/slack" rel="noopener noreferrer"&gt;https://appmap.io/slack&lt;/a&gt;&lt;br&gt;
ℹ️ Read the AppMap docs: &lt;a href="https://appmap.io/docs" rel="noopener noreferrer"&gt;https://appmap.io/docs&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>vscode</category>
      <category>llm</category>
      <category>python</category>
    </item>
    <item>
      <title>Announcing AppMap for GitHub - Runtime Code Reviews for Every Pull Request</title>
      <dc:creator>Kevin Gilpin</dc:creator>
      <pubDate>Thu, 09 Nov 2023 01:17:20 +0000</pubDate>
      <link>https://forem.com/appmap/announcing-appmap-for-github-runtime-code-reviews-for-every-pull-request-47km</link>
      <guid>https://forem.com/appmap/announcing-appmap-for-github-runtime-code-reviews-for-every-pull-request-47km</guid>
      <description>&lt;p&gt;Most of us have a love-hate relationship with code reviews. We rely on code reviews to ensure that the code we send to production is clean, performs well, and is free of security flaws. But code reviews can also add a lot of overhead and delays to shipping code.&lt;/p&gt;

&lt;p&gt;Some people suggest that code reviews should be eliminated altogether. Well, I'm not in that camp, and here's why: Unexpected code behavior and deep runtime defects are responsible for a staggering 40% of performance problems¹ and 50% of security concerns² in software development. But, I do think that it's important to make code reviews easier for developers, and at AppMap we've created AppMap for CI to help do that.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Security and performance reviews are part of the process on any engineering team, and ours is no different. It can take months to find issues and weeks to fix problems using static analysis and code reads. With AppMap, that time is reduced to minutes.”&lt;br&gt;&lt;br&gt;
 -Padraig Coffey, CEO at Zartis.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If you know AppMap already, you know us for our &lt;a href="https://marketplace.visualstudio.com/items?itemName=appland.appmap"&gt;VS Code&lt;/a&gt; and &lt;a href="https://plugins.jetbrains.com/plugin/16701-appmap"&gt;JetBrains&lt;/a&gt; extensions that automatically generate complete, accurate, interactive diagrams of your code. So now, with AppMap for CI, we've built on the solid foundation of AppMap to make code reviews easier, better, and faster. &lt;/p&gt;

&lt;p&gt;The first CI platform we support is GitHub Actions. Our solution combines an &lt;a href="https://github.com/marketplace/get-appmap"&gt;AppMap GitHub App&lt;/a&gt; with GitHub Actions. When you build your project, the &lt;a href="https://github.com/marketplace/actions/appmap-analysis"&gt;AppMap Analysis Action&lt;/a&gt; analyzes AppMaps from before and after each code change. It's able to identify critical performance, security, and stability issues and annotate specific lines of code in the pull request. It also performs deep analysis of test case failures and web service API changes, giving you a big head start on code review. And by the way, the performance and security flaws that AppMap finds are not discoverable by static analysis tools - because modern code is too dynamic for static analysis tools to understand.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“When we initially adopted AppMap, we were only using it for visualizing N+1 queries locally. We later integrated it into our CI run, and we are finding the GitHub comments posted by AppMap to be very useful. The OpenAPI integration, in particular, was a surprise: it’s nice to see an automatically generated summary of what endpoints have changed in a PR."&lt;br&gt;&lt;br&gt;
-Paul Kuruvilla, CTO at CodeCrafters.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Your data stays with you
&lt;/h2&gt;

&lt;p&gt;We know that your code is sensitive, and you don't want it to be transmitted to 3rd parties. All AppMaps are stored as artifacts in your GitHub build system and are sent directly to your browser when you view them. The data only resides in two places - the GitHub Actions environment, and your machine. &lt;a href="https://appmap.io/security"&gt;Learn more at appmap.io/security&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  A tour of AppMap's "runtime code review"
&lt;/h2&gt;

&lt;p&gt;✅ AppMap issues a summary report of its runtime analysis as a comment on every PR. The PR comment includes four key categories:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Failed tests&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Identifies the root cause of test failures with detailed insights and direct links to the line of code which caused the error. AppMap also includes source diffs and behavioral sequence diffs for efficient debugging.  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;API Changes&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Detects API route differences, including new, deleted, or modified routes, as well as alterations in response attributes like body, content, and descriptions.  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Security flaws&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Uncovers issues such as broken or missing access control, deprecated cryptography, improper session management, and missing authentication. AppMap focuses on the runtime security flaws that dominate the &lt;a href="https://owasp.org/www-project-top-ten/"&gt;OWASP Top 10&lt;/a&gt;, and can't be reliably detected by static analysis.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Performance problems&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Identifies performance problems like N+1 SQL queries, very complex queries, RPC anti-patterns, and plain old slow code. &lt;/p&gt;

&lt;h3&gt;
  
  
  Example - Performance problems
&lt;/h3&gt;

&lt;p&gt;Here's an example of a code change that introduces four new performance problems.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0dz2ozc0mfx7vkm21yr7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0dz2ozc0mfx7vkm21yr7.png" alt="Performance flaw summary" width="800" height="398"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The AppMap runtime code review includes details about the flaws detected, a stack trace, and links to the offending source code.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fczksqcrzdzo1lkvbwrg1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fczksqcrzdzo1lkvbwrg1.png" alt="Performance flaw details" width="800" height="556"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;AppMap highlights specific code changes that are contributing to the flaw. It's able to focus on the specific code changes that are relevant to the newly introduced problem.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2ol3cuyvbgm2t0ganr2t.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2ol3cuyvbgm2t0ganr2t.png" alt="Performance flaw source diff" width="800" height="295"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;AppMap also links to an interactive "diff" diagram showing how the code change has introduced the flaw. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0zyypkgqcyuayedl3q9j.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0zyypkgqcyuayedl3q9j.png" alt="Performance flaw source diff" width="800" height="556"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Example - Security flaw
&lt;/h3&gt;

&lt;p&gt;Here is an example of AppMap describing a security flaw and the code change that produced it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9u4re8g0orrz58xpwgx7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9u4re8g0orrz58xpwgx7.png" alt="Security flaw details" width="800" height="377"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Included in the comment is a stack trace showing what led to the security flaw, including links to the source code.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7hg757k5xitiwrjrj9hr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7hg757k5xitiwrjrj9hr.png" alt="Security flaw stack trace" width="800" height="203"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;AppMap also provides a full set of interactive visualizations that describe the code behavior that resulted in the security flaw.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq7ayep580rg2f3fvo3q0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq7ayep580rg2f3fvo3q0.png" alt="Security flaw AppMap" width="800" height="521"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Wrap-up
&lt;/h2&gt;

&lt;p&gt;To get started, &lt;a href="https://github.com/marketplace/get-appmap"&gt;install the AppMap GitHub App from the GitHub Marketplace.&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;Not ready to try it for yourself? We have &lt;a href="https://appmap.io/docs/setup-appmap-in-ci/example-projects.html"&gt;example projects on our GitHub&lt;/a&gt; so you can check out AppMap for GitHub Actions at work. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Links&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;🤖 AppMap for GitHub Actions: &lt;a href="https://getappmap.com"&gt;https://getappmap.com&lt;/a&gt;&lt;br&gt;
⬇️ Download AppMap for VSCode and JetBrains: &lt;a href="https://appmap.io/download"&gt;https://appmap.io/download&lt;/a&gt;&lt;br&gt;
⭐ Star AppMap on GitHub: &lt;a href="https://github.com/getappmap"&gt;https://github.com/getappmap&lt;/a&gt;&lt;br&gt;
📹 Follow on: &lt;a href="https://youtube.com/@appmap"&gt;https://youtube.com/@appmap&lt;/a&gt;&lt;br&gt;
💬 Join AppMap Slack: &lt;a href="https://appmap.io/slack"&gt;https://appmap.io/slack&lt;/a&gt;&lt;br&gt;
ℹ️ Read the AppMap docs: &lt;a href="https://appmap.io/docs"&gt;https://appmap.io/docs&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;References&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://research.facebook.com/publications/fausta-scaling-dynamic-analysis-with-traffic-generation-at-whatsapp/"&gt;(1) FAUSTA: Scaling Dynamic Analysis with Traffic Generation at WhatsApp
&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://cwe.mitre.org/top25/"&gt;(2) CWE Top 25 Most Dangerous Software Weaknesses&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ruby</category>
      <category>java</category>
      <category>python</category>
      <category>node</category>
    </item>
    <item>
      <title>Unlock developer creativity with GitHub Actions</title>
      <dc:creator>Kevin Gilpin</dc:creator>
      <pubDate>Tue, 24 Oct 2023 16:27:48 +0000</pubDate>
      <link>https://forem.com/appmap/unlock-developer-creativity-with-github-actions-211j</link>
      <guid>https://forem.com/appmap/unlock-developer-creativity-with-github-actions-211j</guid>
      <description>&lt;p&gt;Since its release in November 2019, GitHub Actions has continued to gain in popularity. Fully 72% of &lt;a href="https://appmap.io" rel="noopener noreferrer"&gt;AppMap&lt;/a&gt; users tell us that their team is using GitHub Actions! I've been personally using GitHub Actions intensively for about six months, and it feels to me like a substantial leap forward in automation technology. Why? As CI/CD has gained importance, it has increasingly become disconnected from the productivity needs of developers, primarily due to security concerns. I find that GitHub Actions allows me to automate code in innovative ways that are not possible within the confines of traditional CI/CD pipelines. &lt;/p&gt;

&lt;h2&gt;
  
  
  How GitHub Actions works
&lt;/h2&gt;

&lt;p&gt;In case you're new to GitHub Actions, here's a quick overview:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A GitHub Action is a &lt;strong&gt;code snippet&lt;/strong&gt; that runs on &lt;strong&gt;GitHub-hosted infrastructure&lt;/strong&gt; (or you can provide your own compute).&lt;/li&gt;
&lt;li&gt;GitHub Actions can be &lt;strong&gt;combined&lt;/strong&gt; together into sequences called &lt;strong&gt;Workflows&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;A GitHub action can be defined in a GitHub repository, and imported by other projects. So they are highly &lt;strong&gt;sharable&lt;/strong&gt; and reusable.&lt;/li&gt;
&lt;li&gt;A Workflow is a &lt;strong&gt;YAML&lt;/strong&gt; file that lives in the &lt;code&gt;.github&lt;/code&gt; folder of the code itself. &lt;/li&gt;
&lt;li&gt;Because a workflow is a git-managed file, each &lt;strong&gt;version&lt;/strong&gt; of the code &lt;strong&gt;can have its own workflows&lt;/strong&gt;. That makes it easy to try out new workflows on a branch, and then merge them to &lt;code&gt;main&lt;/code&gt; when they are debugged.&lt;/li&gt;
&lt;li&gt;There are lots of different ways to &lt;strong&gt;trigger workflows&lt;/strong&gt;. Common triggers include "run on pull request", "run on push", and "run on schedule".&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With this combination of features, GitHub Actions gives developers the power to easily create just about any kind of code automation. &lt;/p&gt;

&lt;h2&gt;
  
  
  How we got here
&lt;/h2&gt;

&lt;p&gt;I'm, um, old enough that when I started my career, manual builds were the norm. Build automation tools like Jenkins came along pretty soon afterwards, and brought repeatability to the build + test + package cycle. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flyn1p38d4o9yoiqv801g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flyn1p38d4o9yoiqv801g.png" alt="Good 'ol Jenkins"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Deployment was still almost always a manual step. The next big step was CI/CD, which moved build automation to cloud-hosted infrastructure and also automated the deploy steps - this, of course, was made possible by cloud computing infrastructure: Amazon EC2 and all the services that derived from it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Trouble in paradise
&lt;/h2&gt;

&lt;p&gt;CI/CD became the core of DevOps, which expanded automation into many new areas. Most of this growth and expansion has been very positive, but the rigor of the automation has actually had some drawbacks for developers. Why? Because CI/CD has such &lt;em&gt;so&lt;/em&gt; much power to package and deploy code, it's also become an area of high security risk.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcjrgbn6vzs3hy6xmol0l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcjrgbn6vzs3hy6xmol0l.png" alt="Cyber attack on the CI/CD pipeline"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Hackers quickly identified and exploited multiple avenues of attack:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Inject malicious code directly into the target software as it's being built.&lt;/li&gt;
&lt;li&gt;Use a compromised CI job is a stepping-stone for access to production systems.&lt;/li&gt;
&lt;li&gt;Use inside knowledge of the code to build the perfect exploit or backdoor. &lt;/li&gt;
&lt;li&gt;Attack the CI/CD vendor directly to obtain credentials in bulk. (Four well-known vendors in the CI/CD space have all been breached in the last decade).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Security is a real concern with CI/CD systems. As a result, they are now highly protected. This is necessary - but it's also meant that CI/CD is not a developer-friendly environment anymore. CI/CD is too tightly controlled to be a good place for developers to try out new experiments in code automation.&lt;/p&gt;

&lt;h2&gt;
  
  
  GitHub Actions to the rescue
&lt;/h2&gt;

&lt;p&gt;This is where GitHub Actions comes in. A GitHub Action does  &lt;em&gt;not&lt;/em&gt; need to be part of the "blessed" CI/CD process. It can perform any kind of ad-hoc job that a developer might want it to. For example, there are GitHub Actions to report test status, inject comments into commits and PRs, synchronize with other systems, generate code, send notifications, look for bugs, etc. And it can do these things "off to the side", out of the way of the official pipeline job. It's no longer necessary to modify the master build file (think: &lt;code&gt;travis.yml&lt;/code&gt;, &lt;code&gt;Jenkinsfile&lt;/code&gt;, &lt;code&gt;.circleci&lt;/code&gt;) in order to try out some new code automation. &lt;/p&gt;

&lt;p&gt;Since Actions are controlled by YAML files that any developer can create and modify - and they run in the cloud with direct and easy access to project source code - GitHub Actions combine power and safety in a way that's not found either in local developer environments or in traditional CI/CD tools.&lt;/p&gt;

&lt;h2&gt;
  
  
  Powerful, tune-able performance
&lt;/h2&gt;

&lt;p&gt;As a developer, you have a good understanding of performance considerations such as CPU capabilities, memory use, and parallelization. So, you'll be glad to know that GitHub Actions is powerful enough to let you control and optimize exactly how your workflow uses and consumes compute and storage. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Each Workflow runs on a pre-defined runner instance, which is basically a container running with a pre-defined allocation of CPU cores and amount of memory. So you can run small, lightweight jobs with little cost.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Is your Workflow slow and sluggish? You've got options; several options in fact. First, you can bump the workflow up to a larger runner instance. How does 64 cores and 256GB of RAM sound? You can get that. What if the code you are running doesn't scale that well with cores? Well, you can apply matrix build strategies as well. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You can store and retrieve data within and across workflows. Both a cache store and artifact store are available. The cache is really fast, and it can only be accessed from within Workflows. Artifacts are slower, but they can be accessed from anywhere using the GitHub REST API. Cache expiration times and artifact retention times are both customizable, so you can tune the amount of money you are spending on these storage resources.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Proceed! (With caution)
&lt;/h2&gt;

&lt;p&gt;While it is separate from the official CI/CD pipeline, the privileged operation of GitHub Actions does still pose a security risk. GitHub Actions have access to the code; can commit and push code; can be given access to secrets that may be mishandled. Recognizing this, GitHub provides repository and organization settings that can be used to control which GitHub Actions are allowed to run, and even whether the feature is enabled at all. &lt;/p&gt;

&lt;p&gt;Furthermore, each GitHub Action Workflow runs with its own explicit permissions. So, the security capabilities of each Workflow are clearly stated, and less-trusted Actions can be run with lower privilege settings than more-trusted Actions. This type of "least-privilege" access management is a highly effective security strategy, and it's not possible in monolithic and/or legacy CI/CD jobs. &lt;/p&gt;

&lt;p&gt;As always, freedom comes with responsibility and we've heard of at least one organization that has locked its developers out of GitHub Actions after incidents of careless, insecure coding. So, be aware and mindful of the security controls that are available, and use them!&lt;/p&gt;

&lt;h2&gt;
  
  
  How we're using GitHub Actions and AppMap together to improve code quality
&lt;/h2&gt;

&lt;p&gt;AppMap is a tool that records code traces into JSON data files, which can be visualized and analyzed to improve code understanding and quality. GitHub Actions offers a way to create a comprehensive AppMap data set for every pull request, providing a complete profile of the runtime architecture, performance, and security characteristics of your application.  It also offers a way to compare the AppMap data sets of two different code versions. &lt;/p&gt;

&lt;p&gt;Comparing AppMaps of two code versions (a baseline and a proposed change set) is an amazingly powerful technique for analyzing code for architecture changes, security flaws and performance problems. With &lt;a href="https://appmap.io/product/appmap-in-ci" rel="noopener noreferrer"&gt;AppMap for GitHub Actions&lt;/a&gt;, we are offering exactly this capability. Our Early Access program is wrapping up now, and we are transitioning to general availability. Come check it out!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj29aweqvac13h8zpaggg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj29aweqvac13h8zpaggg.png" alt="AppMap for GitHub Actions"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Because AppMap runs in &lt;em&gt;your&lt;/em&gt; GitHub account, the data is processed within your account and it stays within the boundaries of it. You don't have to share source code or sensitive data with any third party. This is the type of win/win/win capability that GitHub Actions offers. A high level of developer control, good performance, and good security characteristics.&lt;/p&gt;

&lt;h2&gt;
  
  
  How are you using GitHub Actions?
&lt;/h2&gt;

&lt;p&gt;Has your organization adopted GitHub Actions? How enabled are developers to add and change GitHub Actions? Did you encounter any problems or mishaps along the way that others could benefit from hearing about? We would love to hear about it in the comments below.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Links&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;🤖 Get Early Access to AppMap for GitHub Actions: &lt;a href="https://getappmap.com" rel="noopener noreferrer"&gt;https://getappmap.com&lt;/a&gt;&lt;br&gt;
⬇️ Download AppMap for VSCode and JetBrains: &lt;a href="https://appmap.io/download" rel="noopener noreferrer"&gt;https://appmap.io/download&lt;/a&gt;&lt;br&gt;
⭐ Star AppMap on GitHub: &lt;a href="https://github.com/getappmap" rel="noopener noreferrer"&gt;https://github.com/getappmap&lt;/a&gt;&lt;br&gt;
📹 Follow on: &lt;a href="https://youtube.com/@appmap" rel="noopener noreferrer"&gt;https://youtube.com/@appmap&lt;/a&gt;&lt;br&gt;
💬 Join AppMap Slack: &lt;a href="https://appmap.io/slack" rel="noopener noreferrer"&gt;https://appmap.io/slack&lt;/a&gt;&lt;br&gt;
ℹ️ Read the AppMap docs: &lt;a href="https://appmap.io/docs" rel="noopener noreferrer"&gt;https://appmap.io/docs&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>githubactions</category>
      <category>productivity</category>
      <category>cicd</category>
    </item>
    <item>
      <title>How to interpret a sequence diagram</title>
      <dc:creator>Kevin Gilpin</dc:creator>
      <pubDate>Tue, 23 May 2023 14:03:56 +0000</pubDate>
      <link>https://forem.com/appmap/how-to-interpret-a-sequence-diagram-5816</link>
      <guid>https://forem.com/appmap/how-to-interpret-a-sequence-diagram-5816</guid>
      <description>&lt;p&gt;Follow along on this tour of a sequence diagram, covering the following concepts:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Lifeline&lt;/strong&gt;: A vertical line that represents an object or component in the system. The lifeline shows the lifetime of the object/component and its existence over time.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Object header&lt;/strong&gt;: The rectangular box attached to the top of the lifeline that contains the name of the component (package, class, etc.) that the lifeline represents.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Activation bar&lt;/strong&gt;: A horizontal line that represents the duration of time when an object is performing an action or processing a message. It is shown as a solid line on top of the lifeline.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Message&lt;/strong&gt;: A horizontal arrow that represents the communication between objects or components. It is shown as a line with an arrowhead pointing from the sender to the receiver. Messages can be synchronous, asynchronous, or self-referential.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Return message&lt;/strong&gt;: A horizontal arrow with a dashed line that represents the return message from the receiver to the sender.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Self-message&lt;/strong&gt;: A message that is sent by an object to itself.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Combined fragment&lt;/strong&gt;: A diagram fragment representing a specific flow of control. It is shown as a box with a label that indicates the condition under which it is executed.&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>productivity</category>
      <category>webdev</category>
      <category>tutorial</category>
      <category>sequencediagram</category>
    </item>
    <item>
      <title>Quickly learn how new-to-you code works using sequence diagrams</title>
      <dc:creator>Kevin Gilpin</dc:creator>
      <pubDate>Mon, 22 May 2023 16:27:10 +0000</pubDate>
      <link>https://forem.com/appmap/quickly-learn-how-new-to-you-code-works-using-sequence-diagrams-h9g</link>
      <guid>https://forem.com/appmap/quickly-learn-how-new-to-you-code-works-using-sequence-diagrams-h9g</guid>
      <description>&lt;p&gt;You may have heard about or experienced the value of sequence diagrams. In this article, I’ll introduce sequence diagrams and describe what they are good for. I’ll also give you a tour through the features of sequence diagrams, and explain how to use each feature to interpret the behavior of your code. Then I’ll show how AppMap makes sequence diagrams even better, by (a) generating diagrams from your running code and (b) making diagrams fully interactive.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is a sequence diagram?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Sequence diagrams are a type of &lt;a href="https://cs.smu.ca/~porter/csc/341/notes/uml.html" rel="noopener noreferrer"&gt;Unified Modeling Language&lt;/a&gt; (UML) diagram that shows the interactions between different components or objects in a system over time. They show the flow of messages and the order in which these messages are exchanged. They are great for understanding how code works because they show enough detail to communicate the key elements of code behavior while being compact enough to fit a lot of information onto a single page.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Uses of sequence diagrams&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Sequence diagrams are particularly useful for designing and testing software systems that involve multiple components, asynchronous events, or complex control flows. Here are some common use cases for sequence diagrams:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Understanding system behavior&lt;/strong&gt;: Sequence diagrams can help you understand how different parts of a system interact with each other, and how the system behaves in response to different inputs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Designing new systems&lt;/strong&gt;: Sequence diagrams can be used as a tool to design new systems, by helping to identify the components needed and how they should interact.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Communication&lt;/strong&gt;: Sequence diagrams can be used as a visual aid to communicate system behavior and design to stakeholders, such as developers, project managers, and clients.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Documentation&lt;/strong&gt;: Sequence diagrams can be used to document the design and behavior of a system, providing a clear and concise description of how the system works.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;How to interpret a sequence diagram&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Let’s talk about the basic features of a sequence diagram. These features are present in any sequence diagram; we’ll look at interactive AppMap capabilities in a later section.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/ImM2-u3Po0I"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2r75xff6dn9nizr78m2a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2r75xff6dn9nizr78m2a.png" alt="How to read a sequence diagram"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Lifeline&lt;/strong&gt;: A vertical line that represents an object or component in the system. The lifeline shows the lifetime of the object/component and its existence over time.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Object header&lt;/strong&gt;: The rectangular box attached to the top of the lifeline that contains the name of the component (package, class, etc.) that the lifeline represents.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Activation bar&lt;/strong&gt;: A horizontal line that represents the duration of time when an object is performing an action or processing a message. It is shown as a solid line on top of the lifeline.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Message&lt;/strong&gt;: A horizontal arrow that represents the communication between objects or components. It is shown as a line with an arrowhead pointing from the sender to the receiver. Messages can be synchronous, asynchronous, or self-referential.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Return message&lt;/strong&gt;: A horizontal arrow with a dashed line that represents the return message from the receiver to the sender.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Self-message&lt;/strong&gt;: A message that is sent by an object to itself.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Combined fragment&lt;/strong&gt;: A diagram fragment representing a specific flow of control. It is shown as a box with a label that indicates the condition under which it is executed.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Here’s what this particular sequence diagram can tell us about the code that it models. The first &lt;strong&gt;message&lt;/strong&gt; begins from outside of the diagram, indicating that it originates from a source external to the system being diagrammed. In the case of this diagram, the external source is whatever entity made the &lt;code&gt;POST&lt;/code&gt; request. The next message is the function call to &lt;code&gt;process_action&lt;/code&gt; in the &lt;code&gt;actionpack&lt;/code&gt; package, which then “activates” the &lt;code&gt;actionpack&lt;/code&gt; &lt;strong&gt;lifeline&lt;/strong&gt;, as can be seen from the lifeline changing from a dashed line to a rectangular box, which is the &lt;strong&gt;activation bar&lt;/strong&gt;. This means that the package is now “active” in the system. Next, as part of the &lt;code&gt;process_action&lt;/code&gt; message, we see a loop with two calls to the &lt;code&gt;write&lt;/code&gt; function in the &lt;code&gt;activesupport&lt;/code&gt; package. The loop is depicted as a &lt;strong&gt;combined fragment&lt;/strong&gt;, as depicted by the grey box labeled “loop”. Within this loop box, we see our first example of a &lt;strong&gt;return message&lt;/strong&gt;, which is the dashed arrow with &lt;code&gt;integer&lt;/code&gt; above it, indicating the return type. This indicates that the &lt;code&gt;write&lt;/code&gt; function executes and returns before we proceed to the next function call. If we skip a couple of function calls to &lt;code&gt;update&lt;/code&gt;, we see an example of a &lt;strong&gt;self-message&lt;/strong&gt;, where the &lt;code&gt;actionpack&lt;/code&gt; package makes a call from one part of itself to another, which is depicted by a message arrow originating from the &lt;code&gt;actionpack&lt;/code&gt; lifeline and then returning to the same lifeline. You can see that this increases the width of the activation bar temporarily. There are more function calls after these, but that covers the basics. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Making sequence diagrams interactive&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;As useful as sequence diagrams are, there can be made even better. &lt;a href="https://appmap.io" rel="noopener noreferrer"&gt;AppMap&lt;/a&gt; is a tool that adds two great features to sequence diagrams - automatic diagram generation, and interactivity. &lt;/p&gt;

&lt;p&gt;Let’s get right into an example. Here’s a sequence diagram that was generated by running a test case for a Twitter-like application. The name of the AppMap is:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://app.land/scenarios/ea87106d-7e5c-4f50-85ce-e94ffc145309?state=eyJjdXJyZW50VmlldyI6InZpZXdTZXF1ZW5jZSIsInNlbGVjdGVkT2JqZWN0IjoiaHR0cDpIVFRQIHNlcnZlciByZXF1ZXN0cyIsImZpbHRlcnMiOnsiaGlkZU5hbWUiOlsicGFja2FnZTphY3Rpb25wYWNrIiwicGFja2FnZTpsb2dnZXIiLCJwYWNrYWdlOmFjdGl2ZXN1cHBvcnQiLCJwYWNrYWdlOmpzb24iLCJwYWNrYWdlOm9wZW5zc2wiLCJwYWNrYWdlOnJ1YnkiXX19" rel="noopener noreferrer"&gt;&lt;code&gt;Following should unfollow a user with Ajax&lt;/code&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;☝️ Click here to open a live diagram! ☝️&lt;/p&gt;

&lt;p&gt;When you click on this diagram, you’ll see immediately that the diagram is “alive.” You can expand, collapse, refine, and drill down for detailed trace information. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How to interact with AppMap sequence diagrams&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/3elyrR2eLJI"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Here are several tips for getting the most out of AppMap sequence diagrams:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Show event parameters, return values, and a link to source code&lt;/strong&gt;: If you click on the name of the message arrow, then that event will be selected, and you can see more information about it in the sidebar.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F20vzaoc0cwifgz15jixn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F20vzaoc0cwifgz15jixn.png" alt="Show event details"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Hide a lifeline&lt;/strong&gt;: If you click on the small x icon in the top right corner of an Object header, then you will hide that lifeline. This can be useful if the sequence diagram is too large and contains code that is not useful for the task at hand. For example, you might suspect that there’s a bug in the code, and you have a hypothesis that the &lt;code&gt;logger&lt;/code&gt; package is not relevant. In that case, you can hide the &lt;code&gt;logger&lt;/code&gt; lifeline to make it easier to find the relevant information in the diagram.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxffdmau9gv26an6xqrwm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxffdmau9gv26an6xqrwm.png" alt="Hide a lifeline"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Collapse a section of the sequence diagram&lt;/strong&gt;: You can click on the &lt;code&gt;[-]&lt;/code&gt; button on a message arrow, next to the function name, and it will collapse that section of the diagram. This is useful in a similar way that hiding a lifeline is useful. Sometimes there is extraneous information in a diagram that is not relevant to your current task. Temporarily hiding that information is a great way to quickly find what you’re looking for.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdr1g8gmw6kycyguy362z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdr1g8gmw6kycyguy362z.png" alt="Collapse a section"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr4p8h774olgq3wzzzef1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr4p8h774olgq3wzzzef1.png" alt="Collapse a section"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Expand a package into classes&lt;/strong&gt;: If an object header is a package and it contains two or more classes, then you can click on the icon in the top left corner of the object header and expand the package. This lets you get a more detailed view of the interactions between objects in the system and can help you better understand the code.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk99akw46b6pw5mgwn7cd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk99akw46b6pw5mgwn7cd.png" alt="Expand a package"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frkscw1m1nql5o9xe2adm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frkscw1m1nql5o9xe2adm.png" alt="Expand a package"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The power of interactive sequence diagrams&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Sequence diagrams are a valuable tool in software engineering for modeling and visualizing complex interactions between objects in a system. Interactive sequence diagrams take it to the next level, enabling you to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Select specific events for more details.&lt;/li&gt;
&lt;li&gt;Expand and collapse object headers.&lt;/li&gt;
&lt;li&gt;Hide lifelines to remove clutter and focus on the most relevant information.&lt;/li&gt;
&lt;li&gt;Collapse sections to focus on the high level information.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How have sequence diagrams helped (or hurt!) you?
&lt;/h2&gt;

&lt;p&gt;Have you used sequence diagrams on a project? Please share  your personal experience by adding a Comment.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Links&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;⬇️ Get AppMap for VSCode and JetBrains: &lt;a href="https://appmap.io/get-appmap" rel="noopener noreferrer"&gt;https://appmap.io/get-appmap&lt;/a&gt;&lt;br&gt;
⭐ Star AppMap on GitHub: &lt;a href="https://github.com/getappmap" rel="noopener noreferrer"&gt;https://github.com/getappmap&lt;/a&gt;&lt;br&gt;
🐦 Follow on Twitter: &lt;a href="https://twitter.com/getappmap" rel="noopener noreferrer"&gt;https://twitter.com/getappmap&lt;/a&gt;&lt;br&gt;
💬 Join AppMap Slack: &lt;a href="https://appmap.io/slack" rel="noopener noreferrer"&gt;https://appmap.io/slack&lt;/a&gt;&lt;br&gt;
ℹ️ Read the AppMap docs: &lt;a href="https://appmap.io/docs" rel="noopener noreferrer"&gt;https://appmap.io/docs&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Acknowledgements&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Thanks to Adam Trotta for the first draft of this post, as well as for the images.&lt;/p&gt;

</description>
      <category>vscode</category>
      <category>productivity</category>
      <category>webdev</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Automatically generate interactive sequence diagrams of your Java code's runtime behavior</title>
      <dc:creator>Kevin Gilpin</dc:creator>
      <pubDate>Tue, 11 Apr 2023 19:14:58 +0000</pubDate>
      <link>https://forem.com/appmap/automatically-generate-interactive-sequence-diagrams-of-your-java-codes-runtime-behavior-2jg0</link>
      <guid>https://forem.com/appmap/automatically-generate-interactive-sequence-diagrams-of-your-java-codes-runtime-behavior-2jg0</guid>
      <description>&lt;p&gt;The AppMap team is excited to announce that automatic, interactive sequence diagrams for Java applications in the &lt;a href="https://plugins.jetbrains.com/plugin/16701-appmap" rel="noopener noreferrer"&gt;IntelliJ IDE&lt;/a&gt; is live!&lt;/p&gt;

&lt;p&gt;(Also available &lt;a href="https://marketplace.visualstudio.com/items?itemName=appland.appmap" rel="noopener noreferrer"&gt;in VS Code&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F16chnp50hv1r5f6fdhzv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F16chnp50hv1r5f6fdhzv.png" alt="See the new sequence diagrams tab at the top"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Sequence diagrams are incredibly powerful for visualizing and understanding runtime behaviors. Their inherent structure - objects flowing across the page, time flowing down the page - is intuitive and easy to learn. And they are one of the best tools for developers and technical non-developers (like engineering managers and product managers) to use when discussing code design.&lt;/p&gt;

&lt;p&gt;AppMap can now generate sequence diagrams automatically from any running Java application.&lt;/p&gt;

&lt;p&gt;Before, sequence diagrams can only be created by manually inspecting code listings or debugging a system. With AppMap, you simply run your application and accurate sequence diagrams are generated instantly.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/8l4-hNih_GQ"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  They're interactive 🖱!
&lt;/h2&gt;

&lt;p&gt;Once you &lt;a href="https://plugins.jetbrains.com/plugin/16701-appmap" rel="noopener noreferrer"&gt;install AppMap into IntelliJ&lt;/a&gt; and generate your own sequence diagrams, you can click on any function call in the sequence to inspect the code.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Franj6yk20nh439y0m0t9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Franj6yk20nh439y0m0t9.png" alt="Inspecting the code"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Each vertical "lifeline" in the diagram floats as you scroll down long interactions, making it easy to keep track of which lifeline is involved in any function call. &lt;/p&gt;

&lt;p&gt;Lifelines can also be hidden to make the sequence diagram even more readable. This is especially useful if you want to hide calls to things which are less important (for example, a logging class).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7xc7wthzd2kq7bhpgc1o.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7xc7wthzd2kq7bhpgc1o.png" alt="Keeping track of lifelines"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Examine loops and call timings ➰
&lt;/h2&gt;

&lt;p&gt;Loops are automatically detected and rendered in a summarized fashion to prevent the sequence diagram from becoming too long. All function call durations are shown, so you can quickly see where your code is spending the most time doing its processing.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frr4lk7accmlflgm0qmh4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frr4lk7accmlflgm0qmh4.png" alt="Examining the loop"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Always accurate sequence diagrams ✅
&lt;/h2&gt;

&lt;p&gt;The biggest challenge with manually-created sequence diagrams is that they quickly go out of date compared to the current behavior of the system. Because AppMap records the runtime behavior of your application, the sequence diagrams it creates are always guaranteed to be accurate and complete.&lt;/p&gt;

&lt;h2&gt;
  
  
  Easily view database queries - even auto-generated ones 👀
&lt;/h2&gt;

&lt;p&gt;AppMap captures all SQL queries made to a database while your application runs, even if your database queries are automatically generated by an ORM/JPA framework like Hibernate.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flek4jshujnxq9aq8g3tn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flek4jshujnxq9aq8g3tn.png" alt="Capturing all SQL queries"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  3 simple steps
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;a href="https://plugins.jetbrains.com/plugin/16701-appmap" rel="noopener noreferrer"&gt;Install&lt;/a&gt; the AppMap plugin into JetBrains&lt;/li&gt;
&lt;li&gt;Run your application (or your tests) with the AppMap library loaded&lt;/li&gt;
&lt;li&gt;Open the generated AppMap to view the sequence diagram&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnqlmdn5y7echc16qvdsw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnqlmdn5y7echc16qvdsw.png" alt="Running an application with the AppMap library loaded"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Available now for IntelliJ and JetBrains
&lt;/h3&gt;

&lt;p&gt;AppMap with sequence diagram support is now available for installation from the JetBrains marketplace, and it is free for personal use and for open source projects. &lt;a href="https://plugins.jetbrains.com/plugin/16701-appmap" rel="noopener noreferrer"&gt;Get it now!&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;(Also &lt;a href="https://marketplace.visualstudio.com/items?itemName=appland.appmap" rel="noopener noreferrer"&gt;available in VS Code&lt;/a&gt;)&lt;/p&gt;

</description>
      <category>java</category>
      <category>productivity</category>
      <category>programming</category>
      <category>codenewbie</category>
    </item>
    <item>
      <title>Auto-magically generate sequence diagrams of your code's runtime behavior</title>
      <dc:creator>Kevin Gilpin</dc:creator>
      <pubDate>Tue, 29 Nov 2022 19:43:46 +0000</pubDate>
      <link>https://forem.com/appmap/auto-magically-generate-sequence-diagrams-of-your-codes-runtime-behavior-597a</link>
      <guid>https://forem.com/appmap/auto-magically-generate-sequence-diagrams-of-your-codes-runtime-behavior-597a</guid>
      <description>&lt;p&gt;Sequence diagrams are frequently described as "the best part of UML". Their inherent structure - objects flowing across the page, time flowing down the page - is intuitive and easy to learn. And they are one of the best tools for developers and technical non-developers (like engineering managers and product managers) to use when discussing code design. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Update! April, 2023&lt;/strong&gt; We now have developed a new version of this feature, which is fully interactive and doesn't require Java or PlantUML. Read more about &lt;a href="https://dev.to/appmap/automatically-generate-interactive-sequence-diagrams-of-your-java-codes-runtime-behavior-2jg0"&gt;AppMap interactive sequence diagrams for JetBrains&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Or,&lt;/strong&gt; keep reading to see how we first developed this feature using AppMap and PlantUML 👇 👇 👇&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Historically, creating a sequence diagram required specialized software. But accordance with the “everything as code” movement, tools like &lt;a href="https://plantuml.com/sequence-diagram" rel="noopener noreferrer"&gt;PlantUML&lt;/a&gt; and &lt;a href="https://mermaid-js.github.io/mermaid/#/sequenceDiagram" rel="noopener noreferrer"&gt;Mermaid&lt;/a&gt; have kept sequence diagrams relevant by providing a fairly basic text language that can be used to generate sequence diagrams. Think: Markdown for diagrams.&lt;/p&gt;

&lt;p&gt;But while it’s fairly easy (and rewarding!) to create sequence diagrams using text files, it still takes effort. And, being documentation, diagrams-as-code still suffer from the achilles heel of documentation, namely - getting out of date.&lt;/p&gt;

&lt;p&gt;What if you could have the best of both worlds - sequence diagrams, with no effort? Read on, to learn how you can generate sequence diagrams just by running your code.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt; Would you prefer to watch rather than read? Check out &lt;a href="https://www.youtube.com/watch?v=40qU-ENNkPk" rel="noopener noreferrer"&gt;"Auto-magically generate sequence diagrams of your Rails App using VSCode" on YouTube&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9iq984y9xzdm3z6hyg09.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9iq984y9xzdm3z6hyg09.png" alt="Video thumbnail" width="800" height="473"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  How it works
&lt;/h2&gt;

&lt;p&gt;A sequence diagram illustrates a particular code flow, like an HTTP request or the processing of a job. So the first step in generating a sequence diagram is to run your code through a particular flow. I suggest two ways you can do this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Run a test case&lt;/li&gt;
&lt;li&gt;Run your app and interact with it, either through its UI or by sending API requests from a tool like &lt;a href="https://learning.postman.com/docs/getting-started/introduction/" rel="noopener noreferrer"&gt;Postman&lt;/a&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In order to generate a diagram of the code behavior, we need to record exactly what happens as the code runs. For this, we’ll use AppMap, a free and open source runtime code analysis tool that I created. You can use AppMap with Ruby, Python, Java and JavaScript - you can find &lt;a href="https://appmap.io/docs/your-first-15-minutes-with-appmap" rel="noopener noreferrer"&gt;AppMap setup instructions here&lt;/a&gt;. AppMap can record both test cases and live application API requests, so you can use either technique to acquire the diagram data.&lt;/p&gt;

&lt;p&gt;Once you’ve recorded a test case or an interactive session, you can use either the AppMap CLI or the AppMap extension for VSCode to generate a sequence diagram. I’ll cover both options here.&lt;/p&gt;

&lt;p&gt;In both cases, the AppMap tools will generate a PlantUML file, which will then be rendered as SVG. So, before proceeding, &lt;a href="https://github.com/plantuml/plantuml/releases" rel="noopener noreferrer"&gt;download the PlantUML JAR file&lt;/a&gt;; the latest version at the time of this writing is &lt;em&gt;plantuml-1.2022.13.jar&lt;/em&gt;. The rest of this post will assume that you’ve saved this file as &lt;em&gt;~/Downloads/plantuml.jar&lt;/em&gt;. Adjust as necessary.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt; You'll also need to have &lt;code&gt;java&lt;/code&gt; available. On MacOS, you can simply run &lt;code&gt;brew install java&lt;/code&gt;.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt; You can find copies of all the files used in this blog post &lt;a href="https://gist.github.com/kgilpin/82a8032d02db72741a2c052f3c23516c" rel="noopener noreferrer"&gt;in this Gist&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  VSCode extension
&lt;/h2&gt;

&lt;p&gt;First, using the VSCode extension - because it’s a bit easier. &lt;/p&gt;

&lt;p&gt;Start by installing the &lt;a href="https://marketplace.visualstudio.com/items?itemName=appland.appmap" rel="noopener noreferrer"&gt;AppMap extension&lt;/a&gt; from the VSCode Marketplace. You’ll be prompted to configure your project for AppMap, if you haven’t done so already. Once you’ve set up your project, commit the AppMap configuration changes to Git so that other members of your team can use AppMap without having to go through the setup process themselves.&lt;/p&gt;

&lt;p&gt;Now, open VSCode Settings:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe6ssm18syp89kj6zlseg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe6ssm18syp89kj6zlseg.png" alt="Open VSCode settings" width="800" height="149"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then search for “AppMap Sequence Diagram” and configure the location of the PlantUML JAR.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw4i26x5ue7lpj89c3p94.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw4i26x5ue7lpj89c3p94.png" alt="Configure PlantUML JAR location" width="800" height="180"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You’re ready to generate a sequence diagram! Open the AppMap view by clicking the icon in the extensions sidebar, then right-click an AppMap to open the context menu. Choose “AppMap View: Generate Sequence Diagram”.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Folb4ts2ohbm2avyw8xao.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Folb4ts2ohbm2avyw8xao.png" alt="AppMap sequence diagram context menu" width="800" height="654"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now you’ll get prompted twice. The first time through, just hit &lt;em&gt;Enter&lt;/em&gt; to accept the defaults. Once you've seen the generated diagram, you can customize its behavior using these options.&lt;/p&gt;

&lt;p&gt;You’ll see a brief progress indicator, and then your diagram will open in the browser! &lt;/p&gt;

&lt;h2&gt;
  
  
  Interpreting the diagram
&lt;/h2&gt;

&lt;p&gt;Here’s a sequence diagram that I generated from the &lt;a href="https://github.com/land-of-apps/sample_app_6th_ed" rel="noopener noreferrer"&gt;Rails Sample App 6th Edition&lt;/a&gt;. (Are you feeling adventurous? Try &lt;a href="https://dev.to/appmap/visualizing-mastodon-internals-1198"&gt;generating AppMaps of Mastodon&lt;/a&gt;!).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh2xq1crl053bhe9jgkgx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh2xq1crl053bhe9jgkgx.png" alt="Example sequence diagram" width="800" height="474"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;From left to right, you see the inbound HTTP server request &lt;code&gt;POST /login&lt;/code&gt;. From there, the code flows to the &lt;code&gt;controllers&lt;/code&gt; package, then through &lt;code&gt;helpers&lt;/code&gt;, &lt;code&gt;models&lt;/code&gt;, to the database, and through &lt;code&gt;views&lt;/code&gt;. &lt;/p&gt;

&lt;p&gt;Each left-to-right arrow is an HTTP server request, function call, SQL query, or HTTP client request. The right-to-left arrows are the return values. &lt;/p&gt;

&lt;p&gt;When code runs in a loop, you’ll see a &lt;code&gt;Loop&lt;/code&gt; box enclosing the repeated behavior.&lt;/p&gt;

&lt;p&gt;Here’s an example of a Loop, also from the Rails Sample App, in which a sequence of two SQL queries is repeated 29 times! This is a common performance flaw called N+1 query - here’s &lt;a href="https://appmap.io/blog/2021/02/04/eager-loading-and-the-n-plus-one-query-problem/" rel="noopener noreferrer"&gt;a blog post all about N+1 queries in Rails&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8r5f6zww6uyvh09y0yko.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8r5f6zww6uyvh09y0yko.png" alt="Sequence diagram loop example" width="800" height="341"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;N+1 queries can be tricky to find, because all these queries are issued automatically by an ORM system like ActiveRecord (Rails), Hibernate (Java), or Django ORM (Python). In a sequence diagram, they are really obvious! (You can also use AppMap to &lt;a href="https://appmap.io/docs/your-first-15-minutes-with-appmap/appmap-analysis.html" rel="noopener noreferrer"&gt;automatically identify performance flaws like this one&lt;/a&gt;.)&lt;/p&gt;

&lt;h2&gt;
  
  
  Exporting and sharing
&lt;/h2&gt;

&lt;p&gt;If you want to see the generated the PlantUML code, click an AppMap to open it and then go to the Explorer view. Next to the appmap.json file, you’ll see the PlantUML file (&lt;em&gt;.uml) and SVG (&lt;/em&gt;.svg). &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv5w8re41k4o1n7qwhf41.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv5w8re41k4o1n7qwhf41.png" alt="PlantUML and SVG code" width="800" height="320"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can take this UML file or SVG and drop it into any other tool, like a GitHub Issue, Jira ticket, pull request, or Slack message.&lt;/p&gt;

&lt;h2&gt;
  
  
  CLI
&lt;/h2&gt;

&lt;p&gt;You can also generate sequence diagrams using the AppMap CLI. The AppMap CLI is an NPM package called &lt;code&gt;@appland/appmap&lt;/code&gt;, so there are three ways to invoke it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Install it with npm (&lt;code&gt;npm install --save-dev @appland/appmap; npm run appmap&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Install it with yarn (&lt;code&gt;yarn add --dev @appland/appmap; yarn run appmap&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Run it with npx (&lt;code&gt;npx @appland/appmap@latest&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I’ll use option (3), because it’s easy to document. But to avoid downloading the package from NPM over and over, you’ll probably want to use (1) or (2). &lt;/p&gt;

&lt;p&gt;First, let’s look at the command help.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ npx @appland/appmap@latest sequence-diagram --help
appmap sequence-diagram appmap

Generate a sequence diagram for an AppMap

Positionals:
  appmap                                                     [string] [required]

Options:
      --version     Show version number                                [boolean]
  -v, --verbose     Run with verbose logging                           [boolean]
      --help        Show help                                          [boolean]
  -d, --directory   program working directory                           [string]
      --output-dir  directory in which to save the sequence diagrams
      --format      output format
                             [choices: "plantuml", "json"] [default: "plantuml"]
      --exclude     code objects to exclude from the diagram
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For basic usage, the only option you really need is the &lt;code&gt;appmap&lt;/code&gt; argument. Here’s an example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ npx @appland/appmap sequence-diagram tmp/appmap/minitest/Following_followers_page.appmap.json
Printed diagram tmp/appmap/minitest/Following_followers_page.sequence.uml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Note that the diagram is printed as a &lt;code&gt;*.sequence.uml&lt;/code&gt; file in the same directory as the AppMap file. Now, we’ll use PlantUML to convert this to an SVG.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ java -jar ~/Downloads/plantuml-1.2022.8.jar -tsvg tmp/appmap/minitest/Following_followers_page.sequence.uml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check that the file exists:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ ls tmp/appmap/minitest/Following_followers_page.sequence.svg       
tmp/appmap/minitest/Following_followers_page.sequence.svg
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Open it in the browser:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ open tmp/appmap/minitest/Following_followers_page.sequence.svg       
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There you have it! Of course, if you want to you can edit the UML by hand, and you can upload and share both the UML and SVG files anywhere you like. &lt;/p&gt;

&lt;h2&gt;
  
  
  Wrap-up
&lt;/h2&gt;

&lt;p&gt;The AppMap CLI &lt;code&gt;@appland/appmap&lt;/code&gt; includes the &lt;code&gt;sequence-diagram&lt;/code&gt; command which generates a PlantUML text file from AppMap data (which, by the way, is JSON). The PlantUML JAR file can transform the text file into SVG (or other formats like PNG). The AppMap extension ties all these tools together into an integrated UI experience that makes it easy to continuously write code, run your app, write tests, create AppMaps, generate sequence diagrams and share them with your team. &lt;/p&gt;

&lt;p&gt;Now, try it yourself! If you have questions, thoughts or comments, join us in the &lt;a href="https://appmap.io/community" rel="noopener noreferrer"&gt;AppMap Slack&lt;/a&gt;. We’d love to hear from you.&lt;/p&gt;

</description>
      <category>emptystring</category>
    </item>
    <item>
      <title>Visualize the architecture of your Node.js app in under 5 minutes</title>
      <dc:creator>Kevin Gilpin</dc:creator>
      <pubDate>Tue, 01 Feb 2022 13:48:10 +0000</pubDate>
      <link>https://forem.com/appmap/visualize-the-architecture-of-your-nodejs-app-in-under-5-minutes-3po5</link>
      <guid>https://forem.com/appmap/visualize-the-architecture-of-your-nodejs-app-in-under-5-minutes-3po5</guid>
      <description>&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/qFjBiLVGXgg"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;&lt;a href="https://marketplace.visualstudio.com/items?itemName=appland.appmap"&gt;AppMap&lt;/a&gt; is an open source VSCode extension which helps you improve your code by showing you how it really behaves, feature by feature, as you work. It does this by automatically generating beautiful, interactive maps of architecture and code behavior right in your editor.&lt;/p&gt;

&lt;p&gt;This less-than-5-minute video shows how install the AppMap extension, how to configure it to map your Node.js code, and how to navigate your code using the interactive diagrams.&lt;/p&gt;

&lt;p&gt;It uses an Express.js app as an example program. &lt;/p&gt;

&lt;p&gt;For full usage instructions, check out &lt;a href="https://appland.com/docs/quickstart/"&gt;the AppMap documentation&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>node</category>
      <category>javascript</category>
      <category>architecture</category>
      <category>vscode</category>
    </item>
  </channel>
</rss>
