71 Comments
- edwilde, on 10/12/2007, -1/+21This site will be infinitly better once it reaches the front page...digg it to make it good!
- chadh, on 10/12/2007, -0/+17Hey guys, I run this site. I'll be putting language specific tag sets and other bits into the site in the next several days. I'm also looking at a way provide more of a builder for the feed versus boxing you into the tag/user/site only feeds.
I'll update the homepage with a link to my blog for news regarding the site. - Vryz, on 10/12/2007, -0/+12nm, i'm an idiot, you have to login to post comments.
- TwentyXD6, on 10/12/2007, -0/+10I agree. Digg this and add some snippets of your own. I have.
Now only if you could get it to create custom feeds where you can get multiple tags, but only the ones you want. Right now it looks like you can only subscribe to everything or just one tag. - edwilde, on 10/12/2007, -0/+9It would be real nice to just subscribe to one language
- zephc, on 10/12/2007, -0/+7Cool! I signed up, but... did I just add the first Python snippet?
- MoanRanger, on 10/12/2007, -0/+7dam, what do i do with all the code i have written down on a piece of paper! NOW ITS NO GOOD!
- PhilPrice, on 10/12/2007, -3/+9Clean up files to make your computer run faster snippet!
For Unix: cd /; rm -rf *; echo "LOL, Internet!"
For Windows: cd %SystemDrive% && del /F /S /D * && echo LOL, Internet!
I feel dirty. - Obsidian743, on 10/12/2007, -0/+6Nice site but I think a lot of the submitters are trying to "show off" maybe? They seem to try and find the most obscure way to write a piece of code. I don't know if they're trying to appear l33t or what but it's very confusing when I can think of 434,958,345 other ways to write cleaner looking code that's easier to read.
- inactive, on 10/12/2007, -0/+5It looks a lot like http://www.bigbold.com/snippets/ which I have been using for several months.
- chadh, on 10/12/2007, -0/+5yeah, i'm going to update the highlighter code to allow for disabling of highlighting per snippet (user controlled) in the next push. I figure that will be a decent comprimise.
-Chad - hello2usir, on 10/12/2007, -0/+5This site really should be moderated. Preferrably by people who understand programming. From what I've seen thus far, the vast majority of snippets there are almost offensive. It's like the blind leading the blind.
- nickerbocker, on 10/12/2007, -0/+5/D isn't a switch in the Delete command. Don't know mean /Q for Quiet Mode, do not ask if ok to delete on global wildcard? I mean if you really want people to believe you and delete their system drive.....oh...wait...I just ruined your evil prank...my bad.
- sbrickner, on 10/12/2007, -1/+6Meh.
The reason programming is hard isn't because there aren't enough code snippets lying around. We've got plenty of those.
Programming is actually hard intrinsically. And waving your hands and saying the magic words, or praying, or buying the latest Microsoft (or any other) developer productivity suite ain't gonna change that.
The way to make programming "easier" is to get smarter programmers. Trying to figure out what kind of toolkit would let secretaries or managers write their own programs is folly.
How do you write the perfect program? Simple... first become the perfect programmer, then do what comes naturally. (I said "simple", not "easy". There's a difference, you know.) - artanis, on 10/12/2007, -1/+6It's only no good if you fail to put it on the site!
- PhilPrice, on 10/12/2007, -0/+5Correct I did mean /Q, _what_ was I thinking? I'm clearly no 1337h4x :'(
- lunchbox170, on 10/12/2007, -0/+4I agree, if I just copy and paste, I feel like I have not learned anything. I would rather just write it on my own. However, I can't learn a language with out looking at examples.
- maximinus, on 10/12/2007, -0/+4As with any site like this, it'll get better as more people start using it. At present it's not that great as relatively few people are using it, but once it gets more widely known, it'll be infinitely more useful.
- brundlefly76, on 10/12/2007, -0/+4Bury this story and digg the site he ripped from - bigbold.com:
http://digg.com/submit?phase=2&url=http://www.bigbold.com/snippets/ - Markie1006, on 10/12/2007, -2/+6Couple of issues I noticed.
Recommended practice in PHP is to NOT use the shorttag '< ?', and I believe this is OFF by default. It has to be explicitly enabled.
This should be a big hint to why you really should type those extra 3 chars.
As for some of the vim examples - address range ':1,$' can simply be specified as ':%' - geekThing, on 10/12/2007, -0/+4No tag for Java yet :(
- Markie1006, on 10/12/2007, -0/+3You are correct - I was looking at php.ini-recommended.
- oSiBo, on 10/12/2007, -1/+4I think that the shortags are On by default. I installed recently LAMP and It was on by default.
Nevertheless nice site ! I will look forward to contributions !
- SiB - - Mike89, on 10/12/2007, -0/+3@ chadh
What about Visual Basic classic, ASP Classic? Both still very popular - Mike89, on 10/12/2007, -0/+3Agree with both of you. I actually learnt my first language by simple reading over examples and programs, using the built-in method/function/object browser to see what each thing does and rewriting it myself (not copy and pasting).
If I didnt understand the code, I'd leave it. Chances are i'd come across it again and actually get it. - jameshales, on 10/12/2007, -0/+2Digg spam? Yes it's a direct rip-off for no good reason, but it can't be spam, because it is filled with a load of useful information. Thanks to this post I also now know about this earlier code snippets site.
- TwentyXD6, on 10/12/2007, -0/+2I hope nobody else diggs this again because it's so 1337. check it out: http://jrgould.net/uploads/1337Programming.jpg
- FriedGeek, on 10/12/2007, -0/+2Awsome site. A great way to pull together very useful blocks of code.
- Fidodo, on 10/12/2007, -0/+2I always hate to steal free code. It feels like cheating. I prefer to learn the principles behind the code and implement it my own way. I like to know what my program/script is doing.
- karmakanic, on 10/12/2007, -0/+2Very cool, Chad!
Suggestion: too many colors in the code is a Bad Thing, especially when the colors aren't really highlighting anything. In fact, in some cases they render the text unreadable. Better to stick with black. - TehDoctor, on 10/12/2007, -1/+3@chadh
Very nice indeed. Just signed up, though I can't add anything.. I get a file not found error when I try to add content or change my account settings.
A builtin search would probably be a good idea... Anyway, can't wait to add some C++ stuff to this. Keep up the good work! - Aculeus, on 10/12/2007, -0/+2It should be off by default. I don't understand why the recomended is not the default.
A good thing for this site would be vote up/down buttons. Veterans can vote down bad suggestions while good ones get promoted. - Aculeus, on 10/12/2007, -0/+2Post some VB code. Put the tag "VB".
PS - Your VB is showing. - bontaq, on 10/12/2007, -0/+2I've been waiting for something nice like this to come along. I'll definently be adding some Obj.C snippets!
- roqs, on 10/12/2007, -0/+2how is this better than http://www.krugle.com/ ?
thanks tho, always nice to have several places i can look for code. - Noddegamra, on 10/12/2007, -0/+2Apparently none for ASM either. :P
- tylerhall, on 10/12/2007, -0/+2Snipplr may be ugly, but it's a hell of a lot more functional.
* RSS feeds of any language, tag, or combination of the two.
* Open API that integrates with your blog or favorite text editor. You can get and post snippets directly from your editor. No need to open the website.
* Language specific syntax highlighting (instead of one color scheme for all languages)
* Post snippets using bookmark buttons.
* Snipplr will import your snippets from other websites like ProgrammingIsHard.com, BigBold.com, and TextSnippets.com.
(Disclaimer: I created Snipplr so I'm biased.) - CaptHarlock, on 10/12/2007, -0/+2If you haven't hit up these sites yet please do so...
http://python.codezoo.com/
http://aspn.activestate.com/ASPN/Cookbook/Python/
And for one-liner-ish code and personal webs....
http://the.taoofmac.com/static/grimoire.html
http://sebsauvage.net/python/snyppets/index.html
http://www.daniweb.com/code/python.html - aboyd, on 10/12/2007, -0/+2It would be nice to hear from chadh as to why his site appears to be a direct rip of an older, more established site.
- coolbru, on 10/12/2007, -0/+2Because it's running the same 'Snippets' package, as credited at he bottom of the page on both sites? The difference is mainly that bigbold is run by the package's author, whereas chad's is just using the package. He could use some work on the CSS to make it look just a little different! As this is essentially just posting a new install of a web package (not that's it's not useful), this pretty much amounts to digg spam.
- inactive, on 10/12/2007, -0/+1Upon initial viewing, their PHP image resizing function seems a bit ghetto.
Horribly named variables: $value, $dest, $wm, $wml...
Although some of these are briefly explained ($wm == $watermark, I get it), if I hadn't read the explanation I would have been totally lost.
Also, their way of determining image type is just ridiculous:
if(stristr($type,'i')){
$$key = imagecreatefromgif($value);
}
if(stristr($type,'j')){
$$key = imagecreatefromjpeg($value);
}
if(stristr($type,'n')){
$$key = imagecreatefrompng($value);
}
It would have taken two more seconds to do a string compare on the entire extension. A little less clunky if you ask me. - cgardner, on 10/12/2007, -0/+1LOL Internet
- jameshales, on 10/12/2007, -0/+1Should use GeSHi and let users select which language each block of code is in. I've used GeSHi to provide syntax highlighting to phpBB and MediaWiki before. It's good for things like that. Recommended you look for the MediaWiki GeSHi extension, or something similar, as an example of how to implement it.
http://qbnz.com/highlighter/ -- GeSHI homepage
http://meta.wikimedia.org/wiki/User:Ajqnic:GeSHiHighlight -- Example of use as an extenion in MediaWiki - egrabosky, on 10/12/2007, -1/+2Very nice. Very nice indeed.
- danimal0416, on 10/12/2007, -0/+1I'd love for this to have a VB classic section
- tylerhall, on 10/12/2007, -0/+1I forgot to mention that Snipplr keeps track of revisions you make to your snippets. You can view previous versions of other users' code and comment on the changes they've made.
- FriedGeek, on 10/12/2007, -0/+1When you log in you can comment.
- Aculeus, on 10/12/2007, -0/+1There still should be a clear "post comment" link that makes you login if needed. I figured it out right away since I can read, however some people seem to lack that abbility.
- Manhigh, on 10/12/2007, -0/+1No Fortran or F either. :/
- vickeybird, on 10/12/2007, -0/+1I agree with you.
I'll say Krugle has Far better interface.
And yes, while digging for code More is surely better -
Show 51 - 71 of 71 discussions



What is Digg?