Coder Social home page Coder Social logo

read-code-daily's Introduction

Helper to randomly pick some code to read

Inspired by Adam Wołk's blogpost about reading BSD code daily.

The idea is to pick a project (or a few) and read at least one source code file a day for educational purposes. He chose BSD's base system and userland, I have chosen the Linux kernel and some GNU system utilities.

Which projects will you chose?

Inspiration

"OpenBSD Daily" https://blog.tintagel.pl/2017/06/09/openbsd-daily.html

read-code-daily's People

Contributors

luisbg avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

jesusbv

read-code-daily's Issues

Add an argument to ignore entries

Add an argument, "-i" / "--ignore" sounds good, to ignore entries. So for example you could ignore the drivers folder in the kernel tree, by doing "-i drivers".

Select number of random files to print out

Maybe the user wants to see 5 random files to then chose the one that looks the most interesting. Add an argument to select how many files are printed out, having 1 as the default.

Handle case of no files found

When there isn't a single file found rng.gen_range(0, files.len()) will explode.

Handle this by printing out there are no files found and exiting.

Change unwrap() to a match

let file_path = entry.path().to_str().unwrap();

should do a match and ignore the file if the path isn't valid.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.