Sample Programs 500 Code Snippet Release

Sample Programs 500 Code Snippet Release Featured Image

Welp, Hacktoberfest is back, and it’s brought along quite a few pull requests. We’re just a third of the way through (at the time of writing), and we’ve already hit two milestones. Today, we’ll be talking about how we hit 500 code snippets!

Table of Contents

Project Overview

Before we talk about the latest achievement, I find it helpful to give a quick overview of the project and how we got here.

First, the Sample Programs repo is a collection of code snippets in as many programming languages as possible. This idea originally stemmed from me hopping on the 100 Days of Code bandwagon where I had the idea to generate Hello World in a different language every day. Now, the codebase features over 500 code snippets in over 125 languages.

As you can image, this project is no longer home to Hello World; that’s just the starting place. Now, we feature over 25 projects that you’re welcome to contribute to.

To ensure quality of code snippets, we have two rules in place:

  • Projects must be documented before you contribute to them
  • Projects must have tests written for them

These rules allow us to enforce a baseline level of quality across all code snippets. In other words, you can be sure that every time you see a Hello World program, it will behave according to our specifications.

As an added bonus, we try to document all our snippets. That said, because writing is so unpopular, we don’t really have as much of a standard of quality. It’s unfortunate, but we hope to rectify that someday!

That said, we’re not here to mope; we’re here to celebrate our latest achievement! Let’s talk about it.

500+ Code Snippets

As the title of this article implies, we’ve finally hit 500 code snippets after roughly two years of grinding away on this repo. Unfortunately, I’ve never really been good at monitoring these milestones, so the release pageOpens in a new tab. is usually a bit late. That said, here’s what those changes look like:

Languages That Start With A

Language# of Snippets
Abap1
Ada1
Agda1
ALGOL681
Apex2 (+2)
AppleScript1
AutoHotKey1 (+1)
Totals8 (+3)

Languages That Start With B

Language# of Snippets
Ballerina1
Bash14 (+8)
Batch1 (+1)
Befunge3 (+1)
Boo2 (+2)
Brainfuck3
Totals24 (+12)

Languages That Start With C

Language# of Snippets
C23 (+12)
C++21 (+17)
C#20 (+2)
C*1
Carp1
Chapel1
Clipper1
Clojure4 (+3)
COBOL1
CoffeeScript3 (+2)
Crystal3
Totals79 (+36)

Languages That Start With D

Language# of Snippets
D2
Dale1
Dart14 (+12)
Dg5
Dusk1
Totals23 (+12)

Languages That Start With E

Language# of Snippets
Egison1
Elena1
Elixir6 (+5)
Elm1
Emojicode1
Erlang6 (+5)
Eve1
Totals17 (+10)

Languages That Start With F

Language# of Snippets
F#2 (+1)
Factor1
Felix1
Fennel1
Ferret1
Fetlang1
Formality1 (+1)
Forth1
FORTRAN3 (+1)
Frege1
Totals13 (+3)

Languages That Start With G

Language# of Snippets
Gerbil1 (+1)
Gluon1
Go22 (+15)
Goby1
Golo1
Google Apps Script1
Gravity1
Groovy8 (+6)
Totals36 (+22)

Languages That Start With H

Language# of Snippets
Hack1
Haskell21 (+2)
Totals22 (+2)

Languages That Start With I

Language# of Snippets
Idris1
Totals1

Languages That Start With J

Language# of Snippets
Janet1 (+1)
JavaScript20 (+15)
Java23 (+16)
Julia7 (+3)
Totals51 (+35)

Languages That Start With K

Language# of Snippets
Kitten1
Koka1
Kotlin14 (+9)
Totals16 (+9)

Languages That Start With L

Language# of Snippets
Lily1
Lisp6 (+4)
Little1
Livescript1 (+1)
Lobster1 (+1)
Lolcode2 (+1)
Lua13 (+10)
Lucee1 (+1)
Totals26 (+18)

Languages That Start With M

Language# of Snippets
MATLAB10 (+9)
Microsoft Macro Assembler1 (+1)
Modula21 (+1)
MojiScript1
MoonScript1
Totals14 (+11)

Languages That Start With N

Language# of Snippets
Never2
Nim3 (+2)
Totals5 (+2)

Languages That Start With O

Language# of Snippets
Objective C6 (+5)
OCAML1
Octave1
Odin1
Opa1
Orc1
Owl Lisp1
Totals12 (+5)

Languages That Start With P

Language# of Snippets
P1 (+1)
Pascal2
Perl14 (+11)
Perl61 (+1)
PHP22 (+19)
PicoLisp2
Pony1
PowerShell3
PureScript1
Pyret1
Python32 (+12)
Totals80 (+44)

Languages That Start With Q

Language# of Snippets
Quack1
Totals1

Languages That Start With R

Language# of Snippets
R2 (+1)
Racket4 (+3)
Red1
Rexx1
Ring1
Ruby9 (+2)
Rust11 (+5)
Totals29 (+11)

Languages That Start With S

Language# of Snippets
Sather1 (+1)
Scala8 (+6)
Scheme3 (+1)
Shen1
Smalltalk1
Solidity1
Solisp4 (+4)
Swift6 (+2)
Totals25 (+14)

Languages That Start With T

Language# of Snippets
Tcl1
Tex2
TI-BASIC1 (+1)
TypeScript9 (+4)
Totals13 (+5)

Languages That Start With V

Language# of Snippets
Verilog2 (+1)
Vimscript3
Visual Basic4 (+2)
Totals9 (+3)

Languages That Start With W

Language# of Snippets
Whitespace1 (+1)
Wren1
Wu1
Wyvern1
Totals4 (+1)

Summary Statistics

One thing I always like to do is report out on what the repo looked like at this time. Here are a few of those statistics:

  • 4,147 Commits
  • 7 Tags
  • 236 Contributors
  • 505 Forks

Also, it’s totally reasonable to be skeptical of some of these metrics. I’m not sure how many of them are updated on GitHub when I select the tag, but I write this close enough to the milestone that it should be somewhat reflective. Same goes for the following language breakdown:

  • Python: 14.1%
  • C: 8.3%
  • C++: 8.0%
  • Java: 7.8%
  • JavaScript: 5.2%
  • PHP: 5.1%
  • Other: 51.5%

Since the last update, it looks like Haskell has gone missing. Let’s see if we can bring it back to life in the next release! In the meantime, let’s talk about next steps.

The Future of Sample Programs

At this point, Sample Programs is a project that we tend to maintain only around this time of year as it’s the only time we can get help. That said, I’m hoping that as this project grows, we’ll retain some of the folks that helped out. It’s a stretch, but hey! AuroqOpens in a new tab. still helps quite often.

At this point, we’re really trying to tackle the tech debt issue. In particular, we’re asking contributors to write their own documentation and tests for us. That way, new contributions don’t add tech debt, and we can focus on the existing tech debt. For instance, someone recently helped use add testing to Kotlin!

I suspect that we’ll be addressing this tech debt issue for awhile, but I’m actually really excited about that. The more legitimate we can make the repo appear, the more folks will want to be a part of it.

With that said, that’s all I have for the update! There will be a similar update coming out shortly to highlight project testing. In the meantime, you can help the project grow by heading over and throwing it a starOpens in a new tab.. We’d really appreciate it!

Also, you can help support The Renegade Coder by visiting the following list. It includes links to the Discord, YouTube channel, and Newsletter. In addition, here are a couple articles about the Sample Programs repo:

Otherwise, thanks for stopping by! Take care.

Sample Programs Repo News (19 Articles)—Series Navigation

Everyone once in awhile, I like to update y’all on what’s going on in the Sample Programs repo. At this point, I’ve written quite a few updates, so I figured it might be helpful to group them as a series.

Jeremy Grifski

Jeremy grew up in a small town where he enjoyed playing soccer and video games, practicing taekwondo, and trading Pokémon cards. Once out of the nest, he pursued a Bachelors in Computer Engineering with a minor in Game Design. After college, he spent about two years writing software for a major engineering company. Then, he earned a master's in Computer Science and Engineering. Today, he pursues a PhD in Engineering Education in order to ultimately land a teaching gig. In his spare time, Jeremy enjoys spending time with his wife and kid, playing Overwatch 2, Lethal Company, and Baldur's Gate 3, reading manga, watching Penguins hockey, and traveling the world.

Recent Posts