Live data from Hacker News

Show HN: Scaffolder, CLI tool to generate project structure, taken from YAML

github.com

21–29 of 29 posts

Re: Show HN: Scaffolder, CLI tool to generate project structure, taken from YAML

#21
post #15
post #12

Unpopular opinion: If such a tool is useful for you, you are doing something wrong. There is maybe a valid exception for use cases that intentionally create projects that require manual work (university and other trainings), but generally if you spend time by creating the same folder structure over and over again, you're probably working at the wrong level of abstraction. (And if you are creating so many micro servic…

I don't agree. Setting up a brand new project always requires boilerplate code. Either you waste time manually filling in all that boilerplate, or you just create everything from scratch with a helper command. Microsoft recognized this need by updating its .NET CLI to create projects based on project templates. I know for a fact that at least one FANG has a couple of internal tools to create projects and CICD infrast…

I typically rely on the framework to have a tool to do this.

When I wrote my own framework, Nexus (for Nim), I wrote a CLI for this sort of thing. It uses variables in naming things, and is quite specialized. I don't think I could use a generic tool.

Re: Show HN: Scaffolder, CLI tool to generate project structure, taken from YAML

#22

I wish people would stop needlessly using yaml or claiming it to be a simple format. Show me your yaml spec compliant parser that you wrote in a day. The number of times I had to think "That would not have happened with a JSON file." ... But I guess the debate is so well known on HN, that I don't need to go into it now.

I wish people would stop seeing the world so black or white. JSON is not the the be-all and end-all of formats. All formats have their drawbacks, and there is not one format that is THE BEST for absolutely everything. The author never claimed that YAML is simple, or whatever. But what I can see, is why'd they use YAML instead of JSON for this specific project. The first thing that comes to mind is multiline strings,…

> The author never claimed that YAML is simple, or whatever. But what I can see, is why'd they use YAML instead of JSON for this specific project.

I think you should read the OP again.

Re: Show HN: Scaffolder, CLI tool to generate project structure, taken from YAML

#23

Earlier quoted context omitted.

I wish people would stop seeing the world so black or white. JSON is not the the be-all and end-all of formats. All formats have their drawbacks, and there is not one format that is THE BEST for absolutely everything. The author never claimed that YAML is simple, or whatever. But what I can see, is why'd they use YAML instead of JSON for this specific project. The first thing that comes to mind is multiline strings,…

> The author never claimed that YAML is simple, or whatever. But what I can see, is why'd they use YAML instead of JSON for this specific project. I think you should read the OP again.

Would you like to answer a bit more explicitly about what exactly you mean? Or am I supposed to guess the meaning?

Re: Show HN: Scaffolder, CLI tool to generate project structure, taken from YAML

#24

Unless I'm missing something, it seems like you could just make your template by hand with files and folders and just copy that folder to get the same result? If you added simple variable substitution to use in filenames and file contents that would kick it up quite a few notches. Especially if you could use the result of bash command instead of static text.

Variables were added now

Re: Show HN: Scaffolder, CLI tool to generate project structure, taken from YAML

#25
post #3

Looks nice, any plans to add variables and prompts? I'd recommend adding at the very beginning of the README a short yaml sample. That's the first thing I wanted to look at, but I had to get some understanding and then I found the scaffolder-config repo.

Hey, variables are there now

Re: Show HN: Scaffolder, CLI tool to generate project structure, taken from YAML

#26
post #15
post #12

Unpopular opinion: If such a tool is useful for you, you are doing something wrong. There is maybe a valid exception for use cases that intentionally create projects that require manual work (university and other trainings), but generally if you spend time by creating the same folder structure over and over again, you're probably working at the wrong level of abstraction. (And if you are creating so many micro servic…

I don't agree. Setting up a brand new project always requires boilerplate code. Either you waste time manually filling in all that boilerplate, or you just create everything from scratch with a helper command. Microsoft recognized this need by updating its .NET CLI to create projects based on project templates. I know for a fact that at least one FANG has a couple of internal tools to create projects and CICD infrast…

There are two cases where such a tool could be useful:

1. You have no clue about what "boilerplate" is required or why.

2. You know what's required but you need to generate the boilerplate often.

In the first case, just stop. Using a tool might give you some kind of result, but the quality of what you do is already subpar from the beginning. Learn your effing tools.

In the second case, stop, too. Work with a higher abstraction layer, instead.

> I know for a fact that at least one FANG has a couple of internal tools to create projects and CICD infrastructure from scratch using project templates.

Imagine what that means for the ICs in that FANG: They don't know why the boilerplate is what it is or what part they could or should replace with something more modern .

Re: Show HN: Scaffolder, CLI tool to generate project structure, taken from YAML

#27

Unless I'm missing something, it seems like you could just make your template by hand with files and folders and just copy that folder to get the same result? If you added simple variable substitution to use in filenames and file contents that would kick it up quite a few notches. Especially if you could use the result of bash command instead of static text.

Variables were added now

Ayyy nice work! You actually implemented it exactly how I would have lol

Re: Show HN: Scaffolder, CLI tool to generate project structure, taken from YAML

#28

Earlier quoted context omitted.

> The author never claimed that YAML is simple, or whatever. But what I can see, is why'd they use YAML instead of JSON for this specific project. I think you should read the OP again.

Would you like to answer a bit more explicitly about what exactly you mean? Or am I supposed to guess the meaning?

> YAML is very easy for both humans and programs to work with and parse, hence why it's the most logical choice in context of Scaffolder.
Post reply on HN