Skip to content

ComputerBytez/LinesOrLess

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

The Lines Or Less Challenge

A repository of Lines or Less challenges.

Every challenge in this repository is under the MIT license, unless otherwise specified.

The challenge rules can be found at that link. It basically comes down to this:

  1. You must complete the goal of the challenge. I know that shouldn't need to be said, but just for clarity: If the challenge says to do something, you must do it. For instance, if it says you must have a front-end interface, it needs to have that interface. Back-end code, for instance, wouldn't be enough. It must have a front-end interface if it's in the challenge. Of course, if the challenge doesn't specify you need one, then you don't need one.
  2. All files count. You can have multiple files in a valid entry. However, all of their lines count count against you.
  3. Testing code doesn't count against you if it's in an external file. For instance, if the challenge was to make a linked list, only the list counts against you. Any code you write to test it will not, provided it is in another file and isn't mangled into your other code.
  4. External libraries are allowed unless explicitly prohibited. If you think a challenge can be quicker accomplished with Numpy, that's fine. All of Numpy's code certainly won't count against you, even though your environment is no longer vanilla Python. However, you have to state this in your entry.
  5. Your final score for a challenge is the sum of all the lines in all the files that are part of your entry. "All the lines" refers to the count that something like Windows Explorer would say is the line count of your file. This just makes scoring easier. As a result, blank lines and comments count against you. This includes blank lines at the end of your file, so before you calculate your score it is best to remove them.

Also worth noting: In languages other than Python, it is possible to make your entire project on 1 "line". Please don't do that. Your code must be somewhat readable, even if you skimp on comments.

With that, feel free to challenge yourself and try some of this yourself.

100 lines or less

  1. The Calculator (Blog post)
  2. Tic Tac Toe Game (Blog post)

Note: this list is a work in progress and will get updated as I complete more challenges.

If you want to challenge me to write something in 100 lines or less, feel free to open an issue, or you can contact me through my website.

About

A repository of Lines or Less challenges.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published