Advice about sharing code toys

I have a function written in powershell that I would like to share. The problem is that it’s only a toy. The process section is only about five lines long. It could be useful to some poeple, but I don’t want people to be misled into downloading it, and then being disappointed when it doesn’t include the expected functionality.

The tool is called Expand-csv. It is what might be called a poor man’s template engine. It only does variable substitution. It doesn’t do transclusion, or switching, or any of those other fancy things. But I have found several uses for it in my own activities. It’s available on Github under my username, dcressey.

I am seeking advice about how to proceed with sharing it. Maybe share it as is, with suitable disclaimers about not having fetures one would expect in a full blown template engine. Maybe add functionality. Maybe convert it from a function into a module. Maybe just quit pushing it. Maybe clean it up for inclusion in the gallery. Your thoughts are welcome.

Hi, welcome to the forum :wave:

Some suggestions:

Link directly to your repo. Don’t make people do extra work looking you up.

Blog about it and submit it for inclusion in regular round-ups such as:

Post about it on LinkedIn.

Create a YouTube video demonstrating the module.

If you’re feeling particularly brave, post it on /r/powershell on Reddit and tag it with the ‘Script Sharing’ flair. They’ll be your harshest critics, but you might get some useful feedback too.

On all of the above, encourage people to submit issues or pull requests on Github to improve the project.

One thing I do note is you’ve not done any real work on the script for 9 months and you’ve not met the goal (user story?) from 2023, in the Issues log, of building a module and publishing to the PowerShell Gallery. I would consider addressing that before sharing further or you’re at risk of looking like you’re sharing a few lines of unmaintained code rather than an ongoing project that might provide some value.

2 Likes

Thanks. I will revise the original post to include the URL. In the meantime, here it is URL for Repository

Is it possible to edit posts on this forum? I don’t see the button.

Excuse me but this just is a few lines of unmaintained code. Does that mean it shouldn’t be shared at all? Or is there an appropriate place for sharing this kind of toy?

No, there’s nothing stopping you sharing the script, but you asked for thoughts on whether you should:

and I gave you my thoughts.

The four suggestions I made are all common ways that people share their scripts and projects.

Re: editing posts, you should see a pencil icon at the bottom of your post. If it’s not there, it should appear when you click the three dots.

Thanks again. Your suggestions are good ones. I’ll follow some of them, over time. I don’t plan, at this time, to turn Expand-Csv froma toy template engine into a real, industrial strength tool. And I would like to avoid wasting people’s time with it, unless they can get something out of it.
I am kind of surprised that thare are so few real template engines in the gallery. The python commnity has several template engines that people can start using, and some of them are pretty well developed.

Thanks to Matt Bloomfield, I began thinking about how I would write a Blog article about Expand-Csv. That led me to consider two questions. Who needs it? What are the alternatives?
That, in turn, led me to recall that I built Expand-Csv because I wanted to build it, not so much because I needed to use it. Once I built it, I began to find uses for it, like a kid with a hammer. That doesn’t mean that there is a big body of people that would be greatly helped by having a template engine coded in powershell.
People who are proficient with Powershell can code up a script in about an hour that does the same thing that I might do with Expand-csv. It goes like this: import the data, transform the data into useable form, transsform the data into the desired form, write the output. Given that alternative, maybe learning how to use my tool isn’t that attractive.
To some extent, what I’ve got is a solution in search of a problem. I may come up with a blog, but it may be about how the reader can build their own DIY template engine, instead of explaining how my DIY engine works. Maybe readers will build a DIY engine that reads JSON or XML.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.