Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in June and this forum will be retired.

Mark Culp asked this question, verbatim, in his comment...

Since this posting appears to have evolved into a discussion about CodeXchange, I was going to ask "what type of website would work as a mechanism to share code?" but perhaps Bill is right: perhaps this forum is the right mechanism? This may even be more true once the new 'SQLA' rolls out since it supports attachments and therefore it will be a lot easier to share larger samples. I would be interested to hear your thoughts about how you would like to share your code samples and how you feel you should be able to find/use the samples. Is this type of website the right tool or something else? – Mark Culp

asked 06 Nov '10, 09:44

Breck%20Carter's gravatar image

Breck Carter
accept rate: 20%

edited 18 Mar '11, 11:42

Mark%20Culp's gravatar image

Mark Culp

No, I'm not going to award myself the bounty :)

(08 Nov '10, 11:13) Breck Carter

Maybe I am missing something.

Apart from attaching files, are we not already sharing code on this site? When someone posts a question, they post the code that causes the issue, even to the point of how to create the data to reproduce the issue. When people answer with suggestions, those are often in the form of code to try.

If we are talking about samples, those could (and have been) easily be posted as "How would you do xyz" with an immediate answer below. Posting the code verbatim with comments instead of as a file should weed out most of the "nasties." If you use the code and like it you would vote for it just like you do now asserting both the codes worthiness and improving the author's visibility. The author and anyone with high enough reputation would be able to edit the original for version control, as a result of suggestions from the comments.

As far as the licensing I would continue with the stamp "Nothing is guaranteed."

permanent link

answered 08 Nov '10, 02:26

Siger%20Matt's gravatar image

Siger Matt
accept rate: 15%

FYI: CodeXchange samples are not restricted to SQL and also contain complete (zipped) projects, too - that would not fit well as "pasted code". Note: I'm not saying such projects are necessary here - it's just what CodeXchange contains today.

(08 Nov '10, 09:16) Volker Barth
Comment Text Removed
Comment Text Removed
Comment Text Removed

@Siger: No, you are not missing anything. This FAQ entry covers sharing code "Is SQLA a replacement for CodeXchange?" and this FAQ covers the license agreement: "What are the Terms and Conditions for posting on SQLA?"

(08 Nov '10, 10:23) Breck Carter

CodeXchange addressed two needs:

  1. a mechanism for folks to post code that can be easily found and downloaded by other folks, and

  2. a mechanism for folks to cooperate in the creation of code.

Number 2 is a mammoth undertaking, and the need is satisfied by any number of existing websites. It is of zero interest to me, personally, so I will leave that for others to discuss.

Number 1 is what I want, both as writer and especially as reader of Other People's Code. I have not seen SQLA 2.0 so I don't know whether the attachment mechanism is any good, but in theory it is the perfect solution: Folks can post code, explain it, discuss it, revise it and so on.

Aside: This "have not seen SQLA 2.0" part is really starting to [redacted] me off frustrate me, but I will bite my tongue for a while longer :)

CodeXchange was recognized by some (well, by me) as a colossal failure from the day it was introduced. I did not see it before that (another colossal mistake IMO, not showing it to people who might actually use it), but I was shrill in my condemnation as soon as I got my hands on it. As far as I can tell, not one single "Number 2" cooperative project was ever undertaken, while at the same time the monumental bureaucracy it established to support Number 2 made it virtually useless for Number 1 (posting, and especially finding, code).

The folks who picked the software for CodeXchange got it wrong, and the folks who approved the project got it wrong. I'm hoping the same folks have no part in SQLA 2.0.

Go ahead, ask me what I think about "not showing it to people who might actually use it" :)

"But we have to pass the bill so you can find out what is in it, away from the fog of the controversy."

permanent link

answered 06 Nov '10, 10:12

Breck%20Carter's gravatar image

Breck Carter
accept rate: 20%

edited 06 Nov '10, 10:51

That's why I asked ""Can you show us a prototype?" on Mark's poll (cf. Though I hadn't the impression that wish was particularly appreciated...

(07 Nov '10, 20:52) Volker Barth
Comment Text Removed

@Breck: Yes, I agree that my suggestion was primarily meant for that particular feature (and I still would like to see a prototype for that). And I surely agree that your fear of "over-discussion" has its point (though our conclusions/preferences may be different:). - Besides that, at that time, I guess I had expected to get more of SQLA 2.0's look and feel before its final release - and so do you still, obviously...

(08 Nov '10, 11:19) Volker Barth

@Volker: That thread was discussing a particular feature of SQLA 2.0, not the product as a whole... so I took your suggestion of "showing us a prototype" as applying to that feature: How NNTP threads would be merged into SQLA 2.0. My objection was not to prototyping per se, but to the whole paralysis-by-analysis syndrome. I did not want SQLA 2.0 to fall victim to the "we can't do anything because ..." thinking that killed the [redacted] effort.

(08 Nov '10, 11:23) Breck Carter

Drat... I just deleted, edited and replaced my comment reply, and of course it now sorts AFTER Volker's reply-to-the-reply. Bottom line: Volker and I are in complete agreement, notwithstanding my snarly response to Mark Culp's poll about merging NNTP material.

(08 Nov '10, 11:27) Breck Carter
Comment Text Removed

Well, I would like to correct, too:) - The mentioned link should be Lesson learned: Identifying posts by number is errorprone:)

(08 Nov '10, 16:02) Volker Barth

I would like samples (at least user-supplied one's) on this site. That would fit to the "love for real code" that lots of folks here seem to have (where "lots" is measured as a percentage, not absolutely...).

I have looked in CodeXchange just a few times within several years, as the samples were of no particular relevance to me, and as is is a somewhat "hidden" (or at least uncommon) resource.

As we all expect that SQLA 2.0 will get a broader audience (don't we?), samples would be fine here. If there's a need, then one could develop some kind of tagging system or template for such samples but I guess this is something time will tell (and should not be regulated just in the starting phase).

Can't tell if the iAnywhere-supplied samples/drivers and the like from CodeXchange should find their place here, too.

permanent link

answered 07 Nov '10, 21:18

Volker%20Barth's gravatar image

Volker Barth
accept rate: 34%


@Volker: I'm guessing the CodeXchange material won't be copied en masse because of the absolutely ridiculous Terms and Conditions that govern them... unless those same terms also govern SQLA 2.0. In which case, so long, goodbye, thanks for all the fish... the day that happens, marks the last day that I contribute anything.

(08 Nov '10, 10:46) Breck Carter

We use Domino at our site an IBM has installed product wikis where the post code samples.

We have used this one here for our Site

Not only IBM emplyees can create sites but each registered user can start a page and post his work.

Just my 2 cents

permanent link

answered 08 Nov '10, 09:29

Thomas%20Duemesnil's gravatar image

Thomas Dueme...
accept rate: 17%

Comment Text Removed

All contributions are welcome! ...especially if we get to pick the currency for the "2 cents". I pick gold. Right now Kitco is paying US$ 1,390.90 for a 50-dollar face value 1 oz Gold Buffalo which is means your offer is worth 0.02 * 1390.90 / 50 = US$ 0.56!

(08 Nov '10, 10:36) Breck Carter

The problem is that #1 "a mechanism for folks to post code that can be easily found and downloaded by other folks" is not a trivial undertaking either.

Although it looks simple on it's face, there are a number of underlying legal and customer service problems that come in to play. Solving those problems isn't "hard" but it does require a company like Sybase to think about the possible implications.

There are several things that made the checklist for any next generation file sharing site:

  1. Code Licensing. This is the license we require for anyone with code on the site. In order to make this work well, the license has to be open and non-restrictive for the end users. (Fortunately, this is a question for the lawyers, not for the rest of us. But look at the discussions around GPL and other open-source licenses to see some of the inherent issues on this.)

  2. Version control. Samples, like most code, have bugs. We need a method to allow changes to the original samples. Should we version those changes? And who can make changes to a sample once it is posted?

  3. Viruses, trojan horses, and other nasties. Since the web site is owned by Sybase, there is a certain amount of liability Sybase picks up in hosting the code. Therefore, we need a mechanism to determine if the code is clean of any potential problems. (And some kind of notification system if someone else discovers a problem.)

  4. Verification and worthiness. One question we got a lot was "does anyone check a sample" to determine if it is worthy of the site? That went back and forth a lot. One take is "let anyone post, the community will self police". The other was "Sybase has liability and responsibility, so we should do some checking ourselves".

  5. Visibility. Sample writers put up samples not out of the goodness of their hearts, but to gain visibility and to create some marketing buzz around their name. Visibility is good for getting better jobs and better salaries. So how do we maximize the visibility of the author? And how do we recruit new authors? Most samples are crated by the company (Sybase) or by a very small pool of sample writers. How do we expand that field, and get some name recognition for anyone who joins the fray?

This isn't the entire list, just a view to a larger requirements gathering that was done around code samples and other contributions.

A great professor of mine once said "There is one very important thing to remember when designing software: The Wheel is Round." It was his way of saying "stop reinventing the wheel. Someone already has. Goodyear is already way ahead of you." Perhaps that advice will come in handy here too.

permanent link

answered 08 Nov '10, 00:04

Jonathan%20Baker's gravatar image

Jonathan Baker
accept rate: 22%


There is so much wrong with this answer, I don't know where to start. Perhaps with "not reinventing the wheel"... I completely reject that advice. It is most often used to suppress innovation. Example: If Intuit had not reinvented the "personal computer accounting wheel" (which was previously well-invented by Peachtree and others) we would not have Quicken. The bottom line, however, is that Jonathan's points are simply a list of why nothing can be done so why bother.

(08 Nov '10, 10:14) Breck Carter

Perhaps I should have said "the source doesn't matter". I think the bias is more about who said it than what is said. Plus, I won $10 betting you would just lash out at the post, so I drink free tonight.

This isn't saying you can't deliver a better solution. I'm pointing out that a large body of research was done to solve the problem which I'm happy to share with the community. Reinventing the wheel is doing the research all over again and coming to the same conclusions. It's best said this way "those that don't learn history are doomed to repeat it."

(08 Nov '10, 12:29) Jonathan Baker

@Jonathan: Could you just clarify your statements and tell which points must be re-considered and which ones are already cleared (aka being already "invented")? - It's understood that a Sybase-hosted site must conform to Sybase's sense of responsibility but I share Breck's view that the points you mention leave a "Why it is so hard to do right" impression... You bet, I won't lash out:)

(08 Nov '10, 15:14) Volker Barth
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 06 Nov '10, 09:44

question was seen: 8,072 times

last updated: 18 Mar '11, 11:42