How to search for something in the Code Snippets boards ??? The "Search In Forums" listbox doesn't include tutorials or code snippets. If I want to find something in C code snippes related to "FILE", the only way to do it is to read each and every post in those tutorials. Would be useful to have a quick way to search them.

Nick Evan commented: good idea! +12

Recommended Answers

All 26 Replies

I would also find this a useful feature. It would also allow easier searching for newcomers, seeking an answer. If they (or we) could easily search the code snippet library, it would make answering question much easier.

This was added yesterday but I forgot to comment on it. You can now do a site search and filter the results by forums, blogs, or code snippets.

Do a bunch of searches and tell me which algorithm returns better results overall, and how the results differ:

www.daniweb.com/search/search.php?q=QUERY&what=code
www.daniweb.com/code/search.php?q=QUERY

Don't try to reverse engineer the results by picking a code snippet and trying to search for it and seeing which algorithm returns what you're looking for. Instead, genuinely search for a topic (as most people searching would) and see which algorithm returns more relevant and helpful results.

Dani -- neither of those links work anymore. Have you changed the search engine because I don't see how to do advanced search any more to limit the search to a specific board.

But I did try your suggestion and entered "icon in c++" to get a list of all threads that discussed icons in the c++ board, and it displayed the threads I was looking for. So maybe the advanced search options aren't needed anymore.

Dave's suggestion doesn't seem to work: "strcpy in code snippets" or "code snippets strcpy" only gets threads in C++ and C boards. 20 pages of hits and I didn't read all of them.

The links I posted are broken - you need to copy and paste the URL and replace the word QUERY with your query.

Also, to do an advanced forum search, click the Site Search button without entering anything in the search box.

Don't try to reverse engineer the results by picking a code snippet and trying to search for it and seeing which algorithm returns what you're looking for. Instead, genuinely search for a topic (as most people searching would) and see which algorithm returns more relevant and helpful results.

It's a bit difficult for me to do as suggested because "reverse engineering" is indeed what I am after. I want to find existing code snippets that I know are here, but I can't do that with the search engine. For example:

http://www.daniweb.com/search/search.php?q=narue+cat+code+snippets

Here I was looking for cat clone, but the results are not what I'd hoped for. The current state makes searching for particular code snippets effectively unusable IMO. I have to know pretty much who wrote the snippet and enough of the verbiage the author used in order to find it. I'd get better results with Clusty.

And which of those four returns the best results for you?

Incidentally, it's also good to throw into the mix an overall site search of www.daniweb.com/search/search.php?q=strcpy because the typical visitor who is searching for examples on a particular thing would be looking for the most relevant results regardless of whether they happen to be in the code snippets or tutorials or forum section of DaniWeb.

And which of those four returns the best results for you?

They were listed in order.

Incidentally, it's also good to throw into the mix an overall site search of www.daniweb.com/search/search.php?q=strcpy because the typical visitor who is searching for examples on a particular thing would be looking for the most relevant results regardless of whether they happen to be in the code snippets or tutorials or forum section of DaniWeb.

In my context, I'm thinking not of the OP, but of the forum regular trying to quickly find an answer s/he feels best addresses the problem. (Regulars are people too. ;) )

> In my context, I'm thinking not of the OP, but of the forum regular trying to quickly find an answer s/he feels best addresses the problem.
Right. That's what I meant by not trying to reverse engineer the results.

Why not?

why all that complex search syntax that doesn't work very often when all you have to do is add "code snippets" to the list of categories in the Advances Search box. Seems like such a simple solution to me.

Because suppose "code snippets" was added to the advanced search box. When that selection is picked, I need to know which algorithm to use for the results. Which is why I need you to tell me which of the two search algorithms we have provides better results.

In my case the old algorithm found exactly what I was looking for. The new algorithm flunked pretty badly (I'd give it a grade of F-)

Is there still a remnant of vB's default Advanced Search? Is there a linky anywhere on a page? A backdoor way, somehow?

It IRC dead here now?

>Is there still a remnant of vB's default Advanced Search?
There's http://www.daniweb.com/forums/search.php, but it only searches the forums. Click on 'Site Search' without entering anything in the text box, and it'll show up.

>Is there still a remnant of vB's default Advanced Search?
There's http://www.daniweb.com/forums/search.php, but it only searches the forums. Click on 'Site Search' without entering anything in the text box, and it'll show up.

Danke. I thought I'd tried that once or twice.

Keep in mind that, while it has vBulletin's default search look and feel, it hasn't been using vBulletin's algorithm for a good year now ... Our database just got too big to handle it.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.