Code Snippets on Medium: Image or Gist?

Abhishek Soni
codeburst
Published in
2 min readJul 17, 2018

--

Medium is home to some of the best articles containing tons of lines of code related to Machine Learning, JavaScript, Data Structures and Algorithms, etc. It is also a hunting ground for beginners to learn about these concepts and kick start their career as a Software Engineer.

However, a lot of times, because of the lack of an in-built code highlighter, writers (who already spent a lot of time compiling the resources and code) have three options to include the code snippets in their article:

  1. GitHub Gists
  2. Images
  3. In-built code blocks

Let’s not talk about the last type for obvious reasons. (Hey, Medium! Are you working on providing an in-house code highlighter?)

Code as Image | Credits: Javascript ES6
Code as Gist | Credits: Machine Learning with JavaScript : Part 1

As for the other two cases, there is an apparent division between the two. That is the reason why I created this Google Form to determine which type of embedded code snippets do readers (and writers) deem more effective as far as writing on medium is concerned. The form is situated below, and I appreciate your time and effort in helping the Medium community figure out which is better. (and, consequently, convince the folks at Medium to work on an in-house code highlighter!)

Feel free to share this article with others so that we can generalize the findings and stay tuned for the responses!

✉️ Subscribe to CodeBurst’s once-weekly Email Blast, 🐦 Follow CodeBurst on Twitter, view 🗺️ The 2018 Web Developer Roadmap, and 🕸️ Learn Full Stack Web Development.

--

--