Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A few suggestions #2

Open
tessus opened this issue Mar 15, 2021 · 0 comments
Open

A few suggestions #2

tessus opened this issue Mar 15, 2021 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@tessus
Copy link

tessus commented Mar 15, 2021

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.

@tarithj tarithj added the enhancement New feature or request label Mar 19, 2021
@tarithj tarithj added the good first issue Good for newcomers label Apr 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants