Giter Club home page Giter Club logo

trash-dump's People

Contributors

tarithj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

trash-dump's Issues

A few suggestions

I like the idea of your program, but I do have a few suggestions and ideas. IMO it should be a little bit more Unix like. Simple invocation, scriptable, ...
Currently you get output that has to be redirected to /dev/null if you want to use it in a script. Nobody really cares about text output in such a case. But for this program there's no text required at all. (Maybe you wanted to play with multiple languages, but it's just not necessary and superfluous output only annoys people - or at least it annoys me.)

Arguments are great, but there should be short and long options. e.g. -f for --filename, ...

The only important argument is the size, thus it should not need an argument at all. You shoud be able to create a file by just doing this:

$ trash-dump 1048576

and you get a 1 megabyte file called tdump.tdp (or whatever you want to choose as the default filename).

Which brings me to my next suggesttion. Allow modifiers like k, m, g, which multiply the size by a factor.
10m would be 10 * 1048576 bytes = 10 megabytes.

Also, the program should not output any text, unless invoked with -v or --verbose. Text output can be nice for statistics or other stuff, but there's nothing needed in the program. You can use time (Unix/Linux command) to measure the runtime. The size of the file was specified at input time. So why do we need a text output?

The return code usually tells me everything I want to know. 0 for success. 1 for error. You can use different error codes for different errors. (disk full = 2, file exists = 1, unspecified = 3, ....).

P.S.: A Makefile would be great to build and install the program.

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.