Did you know, internet friends, that Michelangelo had to construct a special scaffolding system to paint the sistine chapel?? Its true. So my meditation on scaffolding is not with out historical precedence.
One of the things I wanted from my time at RC was to build better coding habits. This included things like consistently posting projects to github, having a good dev environment (ie tricking out my vim conf), but also structuring my projects in a less idiosyncratic way. And that means scaffolding!
This week was hack week at my job, where we hack on personal projects. I was working on a machine learning project – more to come on that in another post. Since my code was going to be in its own repo, and not part of the monolithic code base, I was wondering what sort of code scaffolding I should use. The code in question is python code – fyi…
What do I mean by code scaffolding? These are the files and documents that every software project has. Frameworks like Rails, and Django automatically scaffold projects because they are very opinionated in how things need to work. Node also has some great scaffolding libraries thanks to yeoman. Rust and Haskell also have good project generators – but what about python, just plain ole python??
I posted this question to our corporate internal slack … do we have any corporate python project structural requirements?? Crickets. Although one person did point me to a nifty command line parsing library called click. I was going to say I used this in Rust but really I used the clap library -I just cant think straight because 5 planets are in retrograde and I just got off an airplane.
In any case, after a quick google I found this sample module repository, by Kenneth Reitz. It’s nice. The directory structure is set up well with licenses, readmes, documentation (sphinx), and testing (node). I forked one, and will probably modify this for our internal corporate usage, and also for my own personal usage. Maybe I’ll add some functionality for selenium 🙂
Getting into the habit of setting up my projects in a standard and organized way, helps focus my mind on the task of just writing code and it gives me confidence that the code I share will not be arranged in some bizarro manner. Sometimes bizarro is good, but if you are writing corporate code, or code that has to be reused, best to take your ego out of it and write something clean, functional, and understandable.