An Evil Mad Scientist

blogging about the same things over and over expecting different results.

Saturday, April 26, 2008

Concept: PHP-based snippet library

This is a note-to-self on a tool that I think would be useful, but I don’t have time to explore it right now… so I’m just jotting down some thoughts so I can create it in the future. I’m not aware if software like this already exists. Honestly, I didn’t check. If you know of any, let me know.

I find myself reusing plenty of code and regular expression pattens. I use e-TextEditor, a TextMate-like editor for Windows, so I can feasibly enter all my common code snippets using the bundle management — but what about regular expression or even just notes on best-practice?

A solution I’m rolling around in my head is a blog-like tool that allows posting of code with categorization and tagging. The front end could be public or private, depending on the nature of the snippets.

I would find value in this myself because at the time of this writing e-TextEditor doesn’t have a stored regex feature, so I have to rewrite frequently used regex patterns. These can get quite complicated. Another value-add use for this might be a Apache dev server setup with a large vhosts setup for creating subdomains.

A few notes for myself:

  • It should be multi-user from the ground up
  • Types: Notes, Snippets, Patterns. A Note could be comparable to a blog post, where Snippets and Patterns can be nested in a Note so that a complete thought could be formed around multiple Snippets or Patterns.
  • You should be able to “View” or “Use” a snippet. Viewing is syntax-highlighted for supported languages, Using gives you a form by which you can enter the values of the snippet. On submit the snippet is coppied to the clipboard with the user-defined values.
  • The front-end layout should be as compact as possible and allow a “copy to clipboard” button on each snippet from the main overview.

More later… I’ll be open-sourcing this.

posted by Lorin Tackett at 3:41 pm  

Thursday, April 10, 2008

#TODO: Check out MODx CMS

In my never ending search for the best CMS for me and my clients, I’ve been recently raving about SilverStripe. It’s great, but it’s a little heavy-handed, and some features flat out don’t work.

Tonight I tried out MODx CMS. So far, so good. A very similar interface to SilverStripe, with a lot lighter CPU load and smarter caching… and the file manager actually works in MODx — a complaint I have with SilverStripe. Unfortunately I’m not seeing the same MVC style framework in MODx as I would’ve liked, but there is still an extensible framework present to extend functionality.

Some day when I find the time I’ll play with it a little more.

posted by Lorin Tackett at 3:57 pm  

Powered by WordPress