Showing posts with label code snippets. Show all posts
Showing posts with label code snippets. Show all posts

Monday, August 22, 2011

PHP best practices

I should just look up PHP best practices on a regular basis, shouldn't I? Read this. Now look at #6.

#6 is advocating a manually operated macro system, which is really all that snippets are. Not that it's bad advice! But imagine tracking your snippet usage across projects, and being able to refine their usage across all projects as you (or more accurately your programming system) learned more. I want to go there.

Sunday, August 21, 2011

OMG! CodeMatch!

CodeMatch is apparently a search-based Eclipse plugin that seems to have organized an unknown number of small snippets into parameterized macros described by pattern-like sentences. As you code, you search for those snippets, and the code is built before your eyes.

This rocks. If it retained the pattern-level semantic information it would rock harder - I wonder if those snippets are open source? This is a service - the snippets are online in their own database and seemingly accessible only through their plugin, so it looks like the answer is no.

The "getting started" page [here] is a good textual rundown of how things work. This is an incredibly fascinating development.

Wednesday, June 15, 2011

Code snippet database

This is a Wiki with minimal code snippets for basic tasks in various languages. I like this. I don't like its being a Wiki all that much, though - wouldn't a real database be interesting? That deserves some thought.

(Update 2013-04-18: it's still maintained and weeded, but seems otherwise moribund; nothing but minor changes in the last month.)