Giter Club home page Giter Club logo

admission_task's People

Contributors

bodhish avatar gigincg avatar github-actions[bot] avatar shaileshaanand avatar vigneshhari avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

admission_task's Issues

admission_task

No explanation of problem is provided and no platform to solve the problem

Suggestions

Don't use priority as an identifier

I suggest avoiding the use of task priority as the identifier to pick a todo item. In any real-world-ish implementation, the priority is bound to be stored separately from any identifier.

Allow multiple TODO items to have the same priority

Again, in real world implementations, it's common to have multiple todo items in a list that share the same priority.

So instead of using priority as an identifier, let's use that to sort the output of the program? For example, here's a sample scenario:

./tasks add 2 "A thing I need to do"
# Added task: "A thing I need to do" with priority 2

./tasks add 2 "Another thing I need to do"
# Added task: "Another thing I need to do" with priority 2

./tasks add 4 "A not-so-important thing I need to do"
# Added task: "A not-so-important thing I need to do" with priority 4

./tasks add 1 "Quite an important todo item"
# Added task: "Quite an important todo item" with priority 1

./tasks ls
# 1. Quite an important todo item [1] 
# 2. A thing I need to do [2] 
# 3. Another thing I need to do [2] 
# 4. A not-so-important thing I need to do [4]

./tasks done 2
# Marked "A thing I need to do" as done

./tasks report
# Pending: 3
# 1. Quite an important todo item [1] 
# 2. Another thing I need to do [2] 
# 3. A not-so-important thing I need to do [4]
#
# Completed: 1
# 1. A thing I need to do

Note how the identifier is basically just indexing of an array sorted by priority.

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.