Discussion about a community project for Utility Subroutines

LucaMs

Expert
Licensed User
Longtime User
For the moment, I agree with Erel (probably he can also add filters without difficulty).

I believe that if we stop lying to ourselves, we would like to:

open the IDE and SAY to it:
create an app that does this;
publish the app;
collects a lot of money;
order a yacht on the web, of course with the best quality/price ratio. do not worry about the price, collects more money (version 2.0).

Give me just a little time to think and I will prepare this little project.
I will publish for free, of course ... perhaps without advertising :rolleyes:


More seriously, a useful thing would be a group of project models, with basic activities, classes, modules and global variables already set.
 
Last edited:

corwin42

Expert
Licensed User
Longtime User
I totally agree with Erel on this subject. It might be a great idea to have a repository of useful code snippets. The problem is that you need one to maintain it.

With the Wiki we have a place for such a repository but nobody uses it.

I too think that the forum search is the best solution for such a repository.
 

thedesolatesoul

Expert
Licensed User
Longtime User
open the IDE and SAY to it:
create an app that does this;
publish the app;
collects a lot of money;
order a yacht on the web, of course with the best quality/price ratio. do not worry about the price, collects more money (version 2.0).
Programmers are trained to think like that. It is our job to make things easier/faster for users. Otherwise why would Erel create B4A when we could do the same job in Java? We are lazy by profession,we like to automate things, we do not like to do the same thing twice :)

The problem I see with forum search is sometimes you end up with an unncecessary piece of code that may have been fixed in an update. For e.g. search for Oauth
First result, is obsolete.
Second result, uses HttpUtils (also not recommended)
...and then a couple of more thread results with no conclusions (which imho should be culled).
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
The problem I see with forum search is sometimes you end up with an unncecessary piece of code that may have been fixed in an update. For e.g. search for Oauth
First result, is obsolete.
Second result, uses HttpUtils (also not recommended)
...and then a couple of more thread results with no conclusions (which imho should be culled).
The second result is probably the most relevant thread in the forum about OAuth. This is a reasonable result.
 

stevel05

Expert
Licensed User
Longtime User
To give an example of not finding code in the Forum (and I'll put it in a new post if needed). I can remember probably about a year ago that a solution was given to fill a 2d array in a subroutine, so how do I find that post? Search for 2d array? It's not on the list. OK I think that it was probably Erel that posted the solution it, so search Erel 2d Array No Luck. I did eventually find it, but I think I searched arrays and just looked through every page. And I've done this a few times in the last few months.

The subroutine is called Create2DArray, and even searching that does not find it. I don't think the Forum search as it stands is useful for searching for code snippets, unless they are posted specifically with Titles, and a proper formatted description that the forum indexes, which means these nuggets of code will have to be posted in the forum twice.
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
This is indeed a good example.

I did find the post with this search:
http://www.b4x.com/search?query=fill+2d+array

Now if you know that it was posted as a question then you can filter it and it will appear on the first page result (9th result):
http://www.b4x.com/android/forum/pages/results/?query=fill+2d+array&page=1&prefix=4

If you just search for fill array (filtering non-questions results) then it will be the first result:
http://www.b4x.com/android/forum/pages/results/?query=fill+array&page=1&prefix=4

Overall the result in this case can be improved but if you try to use the filters then you can still find it quite quickly.
 

stevel05

Expert
Licensed User
Longtime User
The problem was that I couldn't remember the keywords that were in the title i.e. 'Fill' without that it is harder to find. And yes I agree that introduction of filtering has made it easier. Without the word 'Fill' using the question filter the result is halfway down page 2.

This is a good discussion as it shows the approach to use the existing forum tools more effectively.

Does XenForo support the use of Tags in the body of the post? So that the writer could quickly provide a category or similar that could be indexed?
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Does XenForo support the use of Tags in the body of the post? So that the writer could quickly provide a category or similar that could be indexed?
There is no tags feature in the forum. Though if we like we can create a simple "tags" convention. End the post with:
Tags: <list of keywords>

The search engine can then parse these tags and boost the post based on these tags (like is done with the title).
 

LucaMs

Expert
Licensed User
Longtime User
I am going to write something while I'm thinking about it, then it will not be a clear-cut proposal (also, my English ...!).

While I consider the "Search" very usefull if it is used with the proper criteria, it acts on posts, which can contain only text (questions / answers), code that can contains errors (posted as a request for correction) or zip files (also may have been published with errors).

Snippets "approved" by Anywhere SW or by the community (ranked?) are something else; they should have their own space (or at least a "sign of recognition" for the search engine)
 

stevel05

Expert
Licensed User
Longtime User
If we wanted to post utility subs, that are not a direct response to a question, what would be the most suitable forum?
 

HotShoe

Well-Known Member
Licensed User
Longtime User
The simplest way it to create a code module and then compile it into a library. This way you will be able to reference the same library from other projects.

Erel,

Is there any way to limit the search to the current forum? That way it would only show results from the forum you were in at the time.

--- Jem
 

DonManfred

Expert
Licensed User
Longtime User
Or maybe a possibility to setup which forums are searched...

So i would only mark a few forums which i want to be searched.
 

klaus

Expert
Licensed User
Longtime User
My two cents.
I partially agree with Erel in post #18.
I think that a specific forum in this forum could be useful, but for sure not any external site.
Even though, the search function is a very efficient and necessary tool but not that easy if you don't know the relevant keywords.
Sometimes to answer a question in the forum I remember that the subject, or something similar, has been answered somewhere and I have some trouble to find it.
I even have sometimes difficulties to find my own posts I know I had answered somewhere.
For a newcomer it might be difficult to find answers relative to his question or problem without knowing what could be done and what keywords to use.
And unfortunately there are also some users who ask before searching or trying.
I am also aware that a specific forum might become 'overcrowded' and make the research difficult, but could be easier if the search function would be limited to this subforum.
In conclusion, a specific forum similar to the 'Subscribe to library updates' forum could be useful, but the 'helpers' must have the reflex to post their snippets in this snippet forum or at least a link a to it with a precise subject title.
 

stevel05

Expert
Licensed User
Longtime User
To keep this moving forward I'l just summarize the discussion so far:

The feeling seems to be:

  1. Keep the postings within the existing forums

  2. Add a line to relevant general forum posts with the format: Tags: <list of keywords>

    Responders would have to remember to do this.
    @Erel would it help if the tags were comma separated?

  3. Create new forum for posting of Utility subroutines that people are happy to share, which could also contain copies of solutions found in older posts if Tags cannot be added for whatever reason. This would separate the posts from the rest of the forum and make it easy to discuss / comment on each post if necessary. If @Erel is happy with this.
This can't be too complicated or it just won't work. For the posts in the Forum, I would suggest the posts should contain:

SubName: As code is not indexed, it may make it easier to find.

Target: B4a/B4j

Description:

Code (in code tags)

Tags: <list of keywords>

If it's a re-post from an old thread, the post could also contain:

Original Poster: @stevel05 The original poster would then be notified of it's inclusion.

A link to the thread for context.

Would it be appropriate for anyone interested to post in a thread with a solution that does not contain Tags and ask the OP to add them?

It certainly wouldn't be necessary to tag all posts, but if you write a sub for someone as a solution that you feel may be of general interest, then the post could be tagged.
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Note that code is indexed by the search engine (files are not indexed).

It doesn't matter whether there are commas or not in the tags.

You are welcome to make the first post with the usage instructions ;)
I think that you can focus on B4A only for now (the target can be removed). Later we can create a similar category for B4J.

http://www.b4x.com/android/forum/forums/code-snippets.59/
 
Top