I recently created name-on using the DotNetCore command line tools and VS Code. It was surprisingly easy, and I love scaffolding from the command line.
I also recently got my WSL setup working, which involved setting fish as my default shell, and revisiting some of the functions I have made ihe past.
My quick experience with the DNC CLI seemed like the perfect thing to functionalize. I like having a standard structure to my apps:
- class library
- command line
- web app / API
- test project
DNC has the concept of templates and extensions, but what can I say, I wanted to write this with fish. So I did.
I picked the name belvedere by looking up scaffolding in a thesaurus. Apparently its a “raised turret atop a house,” and comes from 1590’s italian.
Belvedere will create all the necessary projects, with the correct intra-project references, a solution, gitignore, and README. It also initializes a git repo and commits the created files.
You can find the code here: https://github.com/clintcparker/fish_functions/blob/master/belvedere.fish
But Y tho?
I needed a unique name generator, so I built one.
I had used the Heroku unique-name generator before, when building bad ideas. I loved how it removed a mental hurdle from getting something out the door; coming up with a name. Personally, I’m horrible at naming things, so this was a necessity. I don’t want to get hung up on picking a good name, and the defaults are equally as bad (ConsoleApplication23, anybody?).
I’d also been wanting to get back to dot net core. The last time I had played around with it, they were still using the
dnx command line tool and
project.json files. So this project seemed small enough, and valuable enough, to actually keep me on task for the duration of v1.
The command line
I was stoked to be able to layout the project structure from the command line. I’m just so much more optimistic about a tool when there’s a CLI behind it. Even if I’ll never script it, the idea that i could is very appealing.
I scaffolded the whole project via the
dotnet new and
dotnet add commands. I was also able to build and test in the same manner. It was a nice break from VS 2017.
I found lists of adjectives and nouns online. And thank to some recent practice with regex crosswords, quickly stripped everything but the words themselves.
I added some tests for uniqueness, which is about 99.985%. I also added protection for never getting the same name twice in a row.
I was able to create a CLI for OS X, which was came in handy when publishing to Azure, and needing names for everything.
For the web app the
dotnet help lists a template called
razor with the description “mvc with razor pages.” I’ve used the Razor syntax since it debuted, and thought, “of course I want razor, not
aspx.” Apparently though, Razor Pages is a new thing. I actually really liked it for build the web app component. I still created a controller for the API, but was happy I stumbled onto this new paradigm.
I really went over the top with the completeness. Azure for hosting. Custom domain through NameCheap. SSL through CloudFlare.
The README has a roadmap, which includes packaging the CLI and improving the site. PRs are welcomed.
While at //build I was inspired to update my extensions to support VS 2017. I meant to do it last year, but got distracted. The process was really simple, and is outlined on the new hotness that is MS Docs. It took me about 10 minutes to get it all configured an tested. But then…I was sidelined by my CI config.
For some reason, my AppVeyor builds were failing. They were clearly pulling the latest from my repo, but for some reason, the nuget restore stopped working. I probably should’ve googled the issue, and I think I did, but I was asking the wrong questions. I finally gave up and manually configured the build via the GUI, and then exported that config to YAML. When I went to do the next extension, I finally realized what the problem was. I used the exact same exported YAML, and got the exact same initial errors with the nuget restore.
Googling “appveyor not using yaml” led me to this help article. I still don’t understand why permissions were an issue to read the
appveyor.yml, when it was clearly reading an updated
csproj file. But I do now have extensions that support VS 2017.
This video absolutely changed my life. My friend and mentor showed it to me in the beginning of 2015. The early experiences of Etsy immediately resonated with me. And the concept of geometric growth being outside of the control of the business was something that I had never before considered, but absolutely made sense.
Don’t pick projects based on what’s cool, pick projects that make sense to the company.
Five years ago, I ambitiously applied internally for a job as Director of Product Development. I agree that my qualifications were not appropriate for such a position. To overcome that, however, I wrote this manifesto, to show how I would handle the problems faced by that team.
When I stumbled across this the other day, I was afforded a chance to see if any of my plans had been adopted. Some have, most haven’t. When I wrote that piece, I was a dev manager. Since then I’ve been a Sr Dev and a Software Architect. I’m now back in the position of manager, and I’m happy to see that my personal views haven’t substantially changed. Of course, my opinions about Scrum, testing, and APIs have evolved, but my management approaches are consistent. Trust, Respect, and Accountability. Those three pillars are the foundation of good leadership.