Welcome Guest.   Make a donation to an author on the site October 31, 2014, 11:55:43 PM  *

Please login or register.
Or did you miss your validation email?


Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.


You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 
View the new Member Awards and Badges page.
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: [1]   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: In search of ... opinions on code snippet libraries  (Read 4712 times)
barney
Charter Member
***
Posts: 1,245


see users location on a map View Profile Read user's biography. Give some DonationCredits to this forum member
« on: June 12, 2012, 11:32:33 PM »

Folk,

I've been using gbCodeLib for a while now, but I cannot help but wonder if there might not be something else.  It works well enough, but it's not portable.  So I'm wondering what, if anything, the rest of you prefer - and why, of course  tellme.  Portability would be important, but not necessarily a killer.  Yeah, I could find any number via search, but I really don't want to go through eleventy-seven programs when I can find more appropriate - and effective -  Wink opinions here  tongue.  

Edit:  nice to have pre-populated stuff, but mostly for mine own devises  tongue.
Logged

Make a good day ... barn
justice
Supporting Member
**
Posts: 1,889



Solve issues simply.

View Profile WWW Give some DonationCredits to this forum member
« Reply #1 on: June 13, 2012, 05:16:59 AM »

I prefer version controlled libraries to code snippets, I haven't used any for years, should I?
Logged

barney
Charter Member
***
Posts: 1,245


see users location on a map View Profile Read user's biography. Give some DonationCredits to this forum member
« Reply #2 on: June 13, 2012, 11:52:05 AM »

I prefer version controlled libraries to code snippets, I haven't used any for years, should I?
I suspect that's as much a matter of taste as of circumstance.  If you're in a fixed [spatial] position, or can rely upon always having network access, a VCS could work, especially if you're part of a team.  However, if you're solo, hopping around, frequently lack Internet access, then something on a stick would be a bit more tenable.
Logged

Make a good day ... barn
robinsiebler
Charter Member
***
Posts: 83



see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #3 on: June 13, 2012, 12:41:57 PM »

CherryTree - Here is a review
Logged

Happiness is laced with shards of pain
justice
Supporting Member
**
Posts: 1,889



Solve issues simply.

View Profile WWW Give some DonationCredits to this forum member
« Reply #4 on: June 14, 2012, 03:20:03 AM »

I suspect that's as much a matter of taste as of circumstance.  If you're in a fixed [spatial] position, or can rely upon always having network access, a VCS could work, especially if you're part of a team.  However, if you're solo, hopping around, frequently lack Internet access, then something on a stick would be a bit more tenable.
That's why there is distributed version control. Does not require network access, would fit fine on a stick.
Logged

wraith808
Supporting Member
**
Posts: 6,447



"In my dreams, I always do it right."

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #5 on: June 14, 2012, 05:14:03 PM »

^ I think perhaps I misunderstood your original answer.  Or something was lost in translation.  Did you mean a library of methods and such that would be referenced?
Logged

barney
Charter Member
***
Posts: 1,245


see users location on a map View Profile Read user's biography. Give some DonationCredits to this forum member
« Reply #6 on: June 14, 2012, 07:14:09 PM »

What I seek is more a hint file than library - prolly shouldn't have used that term  smiley.

I've long maintained a list of code snippets - not libraries or plug-ins - that I can cut and paste into what I might be doing at the moment.  Or, perhaps, I need a reminder of the syntax for a particular command, complete with all the possible qualifiers.  Basic laziness, for the most part, but once in a while exact syntax matters.

For instance, there is a script that is useful for debugging JavaScript errors.  With gbCodeLib, I just find that particular error handler, copy the script, paste it as needed.  It's generic, so no need to edit.

Other JS might need to have certain values edited, but it's easier to edit appropriate values than to try to remember the exact syntax.  For instance, there is a JS script for handling a calendar by month.  It's 109 lines.  I won't remember 109 lines  embarassed.

Right now, for portability, this is all in a text file, but traversing that file is inefficient and time-consuming at best.  Putting it into CintaNotes is only marginally better.  So I'm looking for a tool, preferably portable, that is designed for the purpose of storing, cataloging, tagging, and searching these code snippets.

(I did look at CherryTree, but my eyes don't deal well with text on a black background.  It's a viable alternative, but difficult [for me] to use, so I'm hoping for something better.)
Logged

Make a good day ... barn
robinsiebler
Charter Member
***
Posts: 83



see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #7 on: June 14, 2012, 08:16:59 PM »

Cherrytree comes with several different color schemes and you can create/import others. Here is the scheme I am using (the red on black you see is my WindowBlinds theme, not the program).
« Last Edit: June 14, 2012, 08:45:41 PM by robinsiebler » Logged

Happiness is laced with shards of pain
barney
Charter Member
***
Posts: 1,245


see users location on a map View Profile Read user's biography. Give some DonationCredits to this forum member
« Reply #8 on: June 14, 2012, 09:00:19 PM »

Cherrytree comes with several different color schemes ...

Yeah, I saw that.  But it wouldn't let me change the color scheme while using code highlighting.  Maybe more there than I've seen, I've only spent ~half an hour with it so far.  Still testing.
Logged

Make a good day ... barn
wraith808
Supporting Member
**
Posts: 6,447



"In my dreams, I always do it right."

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #9 on: June 14, 2012, 10:05:28 PM »

What I seek is more a hint file than library - prolly shouldn't have used that term  smiley.

I've long maintained a list of code snippets - not libraries or plug-ins - that I can cut and paste into what I might be doing at the moment.  Or, perhaps, I need a reminder of the syntax for a particular command, complete with all the possible qualifiers.  Basic laziness, for the most part, but once in a while exact syntax matters.

For instance, there is a script that is useful for debugging JavaScript errors.  With gbCodeLib, I just find that particular error handler, copy the script, paste it as needed.  It's generic, so no need to edit.

Other JS might need to have certain values edited, but it's easier to edit appropriate values than to try to remember the exact syntax.  For instance, there is a JS script for handling a calendar by month.  It's 109 lines.  I won't remember 109 lines  embarassed.

Right now, for portability, this is all in a text file, but traversing that file is inefficient and time-consuming at best.  Putting it into CintaNotes is only marginally better.  So I'm looking for a tool, preferably portable, that is designed for the purpose of storing, cataloging, tagging, and searching these code snippets.

(I did look at CherryTree, but my eyes don't deal well with text on a black background.  It's a viable alternative, but difficult [for me] to use, so I'm hoping for something better.)

Ah... sounds cool.  Like templates sort of.  Yeah... I use snipplr for that and hook into http://www.snipitpro.com/ on windows and http://www.snippetsapp.com/ on mac.  Not free, but they work well...
Logged

mwb1100
Supporting Member
**
Posts: 1,331


View Profile Give some DonationCredits to this forum member
« Reply #10 on: June 30, 2012, 02:24:26 AM »

For those looking for a snippet library manager, it might be worth looking at QSnipps since it will be offered for free on BDJ sometime in the near future:

  - http://www.bitsdujour.com/software/qsnipps

It supports Windows, Mac and Linux and can pull snippets from a snipplr account.  It can't can't push new snippets to snipplr as far as I can tell, but I'm not sure if that's a limitation of the snipplr API or not (can other snippet managers do it?).

If anyone is familiar with the program, I'd appreciate comments on how it might compare with others.
Logged
barney
Charter Member
***
Posts: 1,245


see users location on a map View Profile Read user's biography. Give some DonationCredits to this forum member
« Reply #11 on: June 30, 2012, 09:47:07 AM »

Tried Qsnipps a while back.  At that time, I was underwhelmed  thumb down.  The help was an FAQ (a series of Fantasy Asked Questions) online, and even that was incorrect  thumb down thumb down thumb down

I know how difficult it can be to create documentation, much less keep it up to date, but there are numerous tools available at [semi-]reasonable costs to accomplish that task.  There are also folk for hire who put a program through its paces and document it accordingly, many of whom charge much less than their work is worth.

The cross-platform aspect was nice  Thmbsup, albeit a bit buggy, or so it seemed to me at the time.  However, to be fair, I didn't spend a great deal of time dealing with that aspect.  Their five (5) limit was a bit too restrictive - five (5) categories containing five (5) snippets each in the free/demo version - to really examine the inbuilt search capability  undecided.

Information on adding/editing a syntax highlighter was sparse to the point of nudity - little or no coverage at all  ohmy - although that may be a failing on my part, since I've never created nor customized highlighting code.  I'm unfamiliar with whatever conventions might exist.

One (1) of the features touted was the ability to create a shell/DOS command:
~~~~~ start paste ~~~~~
Run Shell/DOS commands
Do you use the Console/DOS prompt often? Save your commands as ShellApps and run them directly from QSnipps.
~~~~~  end paste  ~~~~~
However, I could not find a way to perform that particular feat of legerdemain  Sad.

The drag and drop aspect worked nicely  smiley,

I'll look at it again when it comes up on BDJ but, as mentioned, my first experience was underwhelming.

So far, Gary Beene's product has been the most useful, but there is considerable difference 'twixt the portable and stationary products.
Logged

Make a good day ... barn
mitzevo
Supporting Member
**
Posts: 460



Control is power

see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #12 on: June 30, 2012, 10:14:21 AM »

If you just need a simple way to store text/code/snippets, try AceText. I wrote a review a few years ago. It's fine for my purposes of storing code snippets, templates, etc. and has a bunch of other handy features. Another big benefit of it is that it is a Clipboard extender also.. Oops, are you using Windows or another? It's a Windows app  Wink

You can assign each clip/text/snippet a tag, and use the AceType  feature (hotkey -- Win+Q) to paste any tagged item into the currently focused window, that's just some basic usage. You prob want to check out before and after snippets too if you need to wrap certain things  Wink

Oh, one last thing, it's commercial/paid software, but hey, if you end up liking it and seeing it's great potential as a powerful snippet library, it's a good investment. Also has portable install option if you wish to put it on a portable drive.  Kiss
« Last Edit: June 30, 2012, 01:21:15 PM by mitzevo » Logged

The clock is running. Make the most of today. Time waits for no man. Yesterday is history. Tomorrow is a mystery. Today is a gift. That's why it is called the present.
mwb1100
Supporting Member
**
Posts: 1,331


View Profile Give some DonationCredits to this forum member
« Reply #13 on: June 30, 2012, 03:18:11 PM »

Tried Qsnipps a while back.  At that time, I was underwhelmed  thumb down.

Yes.  I've played around with it a bit now, and it doesn't seem to be quite finished.  There's no doubt that the documentation leaves a lot to be desired.  However, the author is responsive to bug reports and suggestions - at least discussing them via email.  It remains to be seen if those discussions turn into action.

I think the application shows some promise.  Since I have to do some work in the Linux world, I like the multi-platform story.  I hope the rough edges can be worked off sooner rather than later or never.

One (1) of the features touted was the ability to create a shell/DOS command:
~~~~~ start paste ~~~~~
Run Shell/DOS commands
Do you use the Console/DOS prompt often? Save your commands as ShellApps and run them directly from QSnipps.
~~~~~  end paste  ~~~~~

However, I could not find a way to perform that particular feat of legerdemain  Sad.

As best that I can tell, when you've selected a "ShellApp" script in the main window, a ">" button shows up on the bar above the display of the snippet contents.  Pressing that button will execute the script. the feature seems a bit incomplete:

  - I'd expect that double-clicking on the entry in the snippet list would execute the script, but it doesn't seem to
  - the output from console programs simply goes to a bitbucket somewhere
  - errors (like a bad program name) go unreported

I'm sure there are more. To make this feature usable would require quite a bit of work on the details, I think. Or at the very least clear documentation on how it works so people have a hope of understanding what can and cannot be done.  All that said, this isn't a feature I'm interested in at the moment, so I'm not too worried about it.

I've tried Snip-It Pro in the past, and it was a nicely featured program, but a program like this needs to be light on it's feet, and Snip-It Pro seemed a bit too heavyweight (I think it's a .Net program and that may be part of the story there). My recollection was that Snip-It Pro also hd some issues with multi-monitor setups.  Maintenance/development of Snip-It Pro has stopped or at least slowed to a crawl.

In the meantime, I live with a random collection of files. That has the benefit of being free, portable, and cross platform (more or less - line ending problems sometimes piss me off, but it's actually less of a problem than I would have guessed).
Logged
mwb1100
Supporting Member
**
Posts: 1,331


View Profile Give some DonationCredits to this forum member
« Reply #14 on: June 30, 2012, 03:26:25 PM »

So far, Gary Beene's product has been the most useful

I assume you mean http://www.garybeene.com/sw/gbsnippets.htm

I'll have to look at that sometime - the description makes it sound like it's intended for the PowerBASIC IDE, but maybe it'll work well via the clipboard with other programs, too?

I'll tell you what though... I'm most fascinated by the encyclopedic information on Pepsi he has on his website.
Logged
rgdot
Supporting Member
**
Posts: 1,653


View Profile WWW Give some DonationCredits to this forum member
« Reply #15 on: June 30, 2012, 03:32:25 PM »

I'll tell you what though... I'm most fascinated by the encyclopedic information on Pepsi he has on his website.

Logged
barney
Charter Member
***
Posts: 1,245


see users location on a map View Profile Read user's biography. Give some DonationCredits to this forum member
« Reply #16 on: June 30, 2012, 05:27:04 PM »

I'll tell you what though... I'm most fascinated by the encyclopedic information on Pepsi he has on his website.

Hm-m-m ... last time I remember having a Pepsi was with a bag of Planter's Peanuts at the corner - and only - store during a summer when my parents had farmed my sister and me out to my paternal grandparents' farm.  Pour in some peanuts, then upend the bottle to catch the fizz and the peanuts at the same time  tongue.

Mr. Beene's gbCodeLib has a few bells & whistles missing, but I've been using it for several years w/o trouble.  Mostly with PHP/CSS/JS/SQL, but there've been a few forays into more typed languages, e.g., VB or Delphi.  I just can't get comfortable with his portable version, gbFlashLib, for some reason.  I use it, but it seems cramped, somehow.  He also has gbXML - Language File Generator, But I've never had occasion to make use of that one, so I really am not able to comment on it except to say that it looks good  tongue.

Addendum:  gbCodeLib comes with libraries for ASP, C++, Cobol, C#, Delphi, DOS, Excel, HTML, Java, Outlook, PERL, ..., and there may be more available on his Website.  Some of those libraries are simple placeholders, some have minimal tutorial listings, some are fairly complex.  Since I'm relatively weak with JS, that particular library has helped me immensely the times I've needed JS.
« Last Edit: June 30, 2012, 05:33:25 PM by barney » Logged

Make a good day ... barn
caveatrob
Supporting Member
**
Posts: 10

View Profile Give some DonationCredits to this forum member
« Reply #17 on: July 04, 2012, 08:20:34 PM »

Good topic - I've also been underwhelmed by snippet managers. I use UltraEdit, and their snippet management is language sensitive, but I've talked them into making it so you can choose snippets from other languages while in a file. EditPlus does the same thing, except you can literally drag snippets into the snippet sidebar.

I've got two other hacked-together solutions; one is an AutoHotkey context menu that I hotkey to Win-Z that pops up a menu with some basic code snippets (open database/close database/insert header). I also have a small program that grabs the clipboard when I highlight over something to make a snippet, and saves it to a text file named for the language/basic function. So I can then use Everything or something like DTSearch or PowerGrep to search across those files and put the code in.

I *also* write tiny AHK guis to generate standard css/page templates for the ASP and PHP code I write. I click on what libraries to include, choose the style (1 or 2 column) and it opens a text file, fills in the spots that I've tagged, and then copies the output to the clipboard.

I have not yet found an easy, usable single solution to this, but I'm getting closer on my own FrankenCode.
Logged
barney
Charter Member
***
Posts: 1,245


see users location on a map View Profile Read user's biography. Give some DonationCredits to this forum member
« Reply #18 on: July 04, 2012, 08:47:54 PM »

Yeah.  I've been told that the manly way is to just remember the code, then type it in.  "Real programmers don't paste code," or words to that effect  tongue.  My current environment for such is Komodo Edit - I'd get the IDE version, but it's way too focused on teams, and I'm a team of one (1) - which has a decent snippet manager, but it's unique to Komodo, which is not portable.  (Tried UltraEdit some time back - don't recall why I didn't care for it  undecided.)  gbCodeLib works admirably, but I just cannot seem to get comfortable with the portable version.  I cannot help but believe that there's something better, but if so, it's well concealed  Sad Angry cheesy.
Logged

Make a good day ... barn
Pages: [1]   Go Up
  Reply  |  New Topic  |  Print  
 
Jump to:  
   Forum Home   Thread Marks Chat! Downloads Search Login Register  

DonationCoder.com | About Us
DonationCoder.com Forum | Powered by SMF
[ Page time: 0.05s | Server load: 0.16 ]