Remember when you first learned the basics of programming and you wanted to write something, but when you tried to write something, you found yourself hitting a brick wall?

Did you find: a fun open source project that got stuck in the deployment environment, installation dependencies? And finally “die with a grudge”!

When I first learned to program, I opened the IDE more than once and watched the blinking cursor in a daze. My mind was as blank as a blank page. There’s no way to write, no way to play with other people’s projects. Suddenly from the book copy code stage, to their own ideas, design, writing code, this span is really a bit large. I felt like I had eaten all the grammar rules I had learned and left nothing behind.

Is there anyone like me who has been there or is in this situation. I was wondering if there was some kind of open source project that was longer than the example code in the book and had some practical use. That is:

A file, simple to run, a look to understand, interesting open source project!

Because a file’s project basically copies the code into an editor and runs, it’s easier to read the code by debugging it to see the results of each step. It’s important that it has a practical use, not a code example, so that you can show it to others and use it, and it’s very motivating to learn. Add more comments to the code. I like comments in the code better than dry tutorial articles.

Finally, I found them:

OneFile brings together just OneFile, a fun open source project.

Project address: github.com/521xueweiha…

Liverpoolfc.tv: hellogithub.com/onefile/

There are games, compilers, servers, tools, utility libraries, etc., that run simply or even copy code.

Let’s play it together!

1. Click stop

Kill time small game, just stop the ball in a colored area can score. All the code is only an HTML file, play tired can also right-click “show page source code”, under the source code how to cheat.

Demo: hellogithub.com/onefile/cod…

2. Tomato clock

A pure Python implementation of the command line tomato clock, plus support for installing extensions for desktop notifications. Copy the code to PyCharm to run.

Source: github.com/521xueweiha…

3. Mini compiler

A mini-compiler written in JavaScript to convert LISP into C code. Compiler projects that write more detailed comments at each step than code that everyone can understand. Open the “Developer Tools” page of the browser, go to the “Console” page, and paste the code to run.

 *                  LISP                      C
 *
 *   2 + 2          (add 2 2)                 add(2, 2)
 *   4 - 2          (subtract 4 2)            subtract(4, 2)
 *   2 + (4 - 2)    (add 2 (subtract 4 2))    add(2, subtract(4, 2))
Copy the code

Source: github.com/521xueweiha…

4. Character video

Turn on the webcam and you’ll see an image converted to ASCII code in real time. Browser right click “show page source code”, you can view all the source code.

Demo: hellogithub.com/onefile/cod…

Space invaders

The original Space Invaders was written by about 2k lines of 8080 assembly code, but the assembly language is too low-level to be easy to read. Today’s open source project SI78C was rewritten in C language according to the original assembly code. Although there is only one core file in this project, it is slightly complicated to run, so we are not afraid to have supporting articles.

Source: github.com/521xueweiha…


All things are difficult before they are easy, but these projects are not!

So many times I’ve wanted to write, but I don’t know where to start… Countless stuck nights… Countless urges to smash computers…

It’s all a thing of the past, and hopefully this week’s recommended open source project will give you the confidence to discover the joys of programming. Click to find out more!

Open source

Every open source project starts with a single file and becomes known and loved through iterations.

If you see a sore spot or an Epiphany, just create a file, document it, iterate on it and open source it. Ultimately, it can help more people, and one day it will amaze everyone, including you!

If you had to show “what you’ve learned in your life” in just one file, no programming language is required! What kind of work will you deliver?

A file programming challenge that requires the following:

  • A single file cannot be compressed and its size is less than 1 MB
  • The code is clearly structured, includes comments, and is less than 5000 lines long
  • No programming language, not only Markdown files
  • Don’t import any external files (images, videos, CSS, etc.)
  • The project is functional and has the value of learning or using
  • (Optional) Rely on at most one open source library or framework

Click to join and start your open source journey.