Archive for June, 2006

New Features on the Way

Published in: Development, NewsPosted by Tyler on 06/30/06

Wow. Snipplr made it to number one on yesterday. This brought in a ton of new users and a lot of great suggestions for improving the website. That said, I thought I’d share my current todo list of features/changes I’m working on this weekend. Most of these are suggestions from visitors. So, if you have your own suggestions or additions to the list below, please post in the comments.

New Languages to be Supported

\n\n* C * C# * ASP * VB * Common Lisp * AppleScript * XML and XSLT

Feature Requests I’m Working On

\n\n* Discussion/comments for each snippet. * Extended user profiles. (website, location, job, fav programming languages, etc) * In the user profiles, people can set their spoken language and also set Snipplr to only show them Snippets in that language. * Option to make snippets private. * Make snippets viewable only to certain users you pick. (Not sure if I’ll do this one right away. But I’m considering it.)

So, that list along with my own bug fixes are what I’m working on at the moment and what I hope to accomplish this weekend.

One note regarding the programming languages above. It’s easy for me to add support for additional languages (I just add them to the language dropdown box). The trick is to add syntax highlighting for them. Currently, I’m using the Text_Highlighter class available from the Pear repository. If anyone would like to contribute additional language highlighting classes for it, I’d be very grateful.

Preparing For Spam

Published in: Brainstorming, Design, DevelopmentPosted by Tyler on 06/29/06

It’s no longer a matter of what to do if spammers find your websites, it’s what to do when spammers find your website. It’s going to happen.

Snipplr is just ripe for spammers. Think about it. We allow anyone to create an account – no email validation required. Then, we let people post snippets which automatically appear on the front page along with any text they enter.

So how do we prevent spam from becoming a problem?

The obvious answer, and one that I don’t want to implement is to force users to register with a valid email address. Email addresses are a dime a dozen now. You can create a fake email address just for Snipplr with any number of online services. In fact, looking through the current list of users, I can see that about 40% are using fake email addresses. Forcing them to use a real one accomplishes nothing other than annoying the users and creating another barrier they have to get past before using this website.

The next option is to use a captcha every time someone posts a new snippet. (You know, one of those boxes with curvy letters that you have to decipher to proove you’re human.) This would help stop spam, but it would become tedious for people who post a lot.

Snipplr is closely modeled after That said, I’m leaning towards the method they and other social bookmarking sites use: let the users report spammy snippets. A small “report this” link could be added next to each snippet. If a snippet gets enough spam votes, the system can automatically remove it from the site and place it in a holding queue until it can be manually reviewed by a moderator.

Another similar option is to prevent new users’ snippets from appearing on the front page until they’ve been verified. While tedious for the admins, it’s better than forcing the user to jump through email and captcha hoops.

Any Snipplr users have suggestions? Post them in the comments below.

Happy Accident

Published in: Development, NewsPosted by Tyler on

Well, like I said in an earlier post, the official Snipplr launch was meant to be in the coming weeks, but it got moved up to today. A couple users stubmled upon Snipplr, wrote about it in their blogs, and bam! I wake up this morning to find the official TextMate blog linking to us.

I’m a little freaked out since I wasn’t expecting the traffic to start quite yet. But who am I to complain? I cleaned up a few things on the site, and wrote a very basic bare bones snippet search – so that works for now.

Again, welcome to the site all you TextMate users.

Slogan Needed. Apply Within.

Published in: Brainstorming, DesignPosted by Tyler on 06/26/06

I’ve been trying to come up with a good slogan for Snipplr for the last couple of days. I haven’t really been actively thinking about it – just letting the idea bounce around in the back of my head. A few possibilities that I’ve come up with are

  • Reusable code
  • Programming brains
  • Programmer’s brains
  • Give your brain a rest

I’m not very fond of any of them. I asked the guys at the office what I should do. They suggested

  • Take a snippet, leave a snippet
  • Share and share alike
  • Code and code alike
  • The website that Jon wanted
  • We don’t need no steenkin E’s!
  • Your code sucks. Use mine.

Again, none of them are winners. I’m sure something will come to me while I’m taking a shower. That’s where most of my good ideas appear.

Switching gears, you’ve probably also noticed that Snipplr doesn’t have a logo. In fact, other than the title bar, I don’t even mention the name of the website. This lack of branding was somewhat intentional. I originally built Snipplr as a tool for myself, so I didn’t give any thought to allowing for a logo in the layout. I wanted the design to be functional.

The obvious solution is to drop the nav bar down a bit and stick a logo (or at least the site’s name) in the top left corner. A more avant garde route would be to keep things as is – no branding. It’s a bold move, but it might be a clever way to distinguish Snipplr from other websites. It reminds me of how for the longest time 60 Minutes was the only TV show without a theme song. The point? They were so good they didn’t need a damn song. That simple, ticking stop-watch was enough.

Better Late Than Never

Published in: DevelopmentPosted by Tyler on 06/25/06

I should probably be upfront and admit that I started this blog way too late. I originally had this grand idea to keep a running journal of the entire Snipplr development process. But, seeing how Snipplr is only a few weeks away from launching and this is the first post, that didn’t work out. Better late than never.

The idea for Snipplr came about organically. I wasn’t trying to come up with a great idea or a way to make money, I just realized that I needed a better way to store all the random bits of code I reuse all the time.

In the past I had just kept those code snippets stored in text files on my machine. Invariably, however, they’d get out of date. Plus, it was never easy to find the code I was looking for quickly. The process just didn’t fit into my workflow.

The very first working version of Snipplr was written in six hours late one night in March. The idea for the site solidified for me earlier that day at work, so I knew exactly what I wanted to build as soon as I got home. The website was to be modeled after Instead of cataloging websites, Snipplr would catalog bits and pieces of code.

All of the major features of Snipplr were present in that initial version. Some were a little rough around the edges, but they worked. Over the next week I cleaned up the code a little, got the website into a stable, working state, and began using it.

For nearly two months I left the source alone. I was too busy at work to worry about developing the site further, and it had integrated into my workflow well enough that I saw no reason to rush back to it. I think this time off was a good thing. It gave me the distance I needed to realize that while Snipplr’s feature set was well thought out the implementation wasn’t. The design wasn’t great, the code was sloppier than I’d like, and I used a little too much javascript.

Fast forward to today. During the last week I’ve picked up development again. I’ve completely reworked the site from the ground up. The layout, while similar, was rebuilt with much cleaner CSS. Knowing in advance my layout requirements helped keep the stylesheet more managable. All of the PHP has been rewritten. The biggest addition has been the use of my custom database object class. It completely automates all of my CRUD code – easily cutting development time in half. (Yes, yes. All you Rails people can pipe down. I don’t care about Ruby.)

Initial reactions to Snipplr have been overwhelmingly positive. (Especially now that the TextMate plugin is working.) I’m happy with the code base and have plenty of ideas for improving things in the future. But, for now I’m focused on getting everything polished and ready for the initial public launch. I expect that to happen in the next few weeks. I’m aiming for July 15th.