Between work and personal projects, I tend to switch between various programming languages frequently, usually a few times per day. The problem with this, is that I can never remember the little things like the name of the array append function, or the map initialization syntax, or how to lowercase a string, or… you get the point.
As I wrote on the homepage:
As developers we often switch between various languages, and sometimes it’s difficult to remember how to do the little things.
How do I lower-case a string?
What’s the list append function called?
How do I iterate over the key/value pairs of a map?
Speaking of which, what’s the map initialization syntax again?
Don’t sweat it, that’s what whatsthecodeforthat.com is here for, with short snippets reminding you how to handle the small things in various languages.
The idea is to compile a wealth of common knowledge in various languages, ranging from string manipulation, to class declaration, to map iteration, and more. By making the project open source at (github.com/KyleBanks/whatsthecodeforthat.com)[https://github.com/KyleBanks/whatsthecodeforthat.com], I’m hoping that other developers will help contribute by adding new content sections and languages.
Eventually, I’ll probably go as far as adding an API to retrieve snippets by section and language, and use that to write a command-line tool as I’d prefer to access the site contents from within vim.
It’s a pretty simple project, in fact it only took a couple hours to throw it together, but I’ve already found it helpful and hope you do too!