Android Question Feedback

ashton293

Member
Licensed User
Longtime User
Please do not take this the wrong way - as I am still partial to B4X - and maybe I am getting older.

However, what attracted me to B4X, and its predecessors, initially was the word BASIC.

I had programmed in BASIC in my younger days and I could understand the flow of processes, etc..

Using B4A I had published more than 20 Apps on the Google Play Store - back in those days I understood things much better - it was much closer to the BASIC language.

It was also back in the days when I was still paying fees - and maybe that was why it was in the interest of Anywhere Software to keep things that way.

However, since we have become "OpenSource" we seem to be now using language, and structures, and whatever.....more in the way that other programming languages use.

Now, if I am looking for a simple instruction on how to do something, what I uncover is a multitude of convoluted steps which seem to have no bearing on what I am attempting to do.

I fear I am not alone. Which means the forums become more the domain of regular programmers and less a place for those who are learning.

Then there are some who talk down to contributors and tell them to read the manuals or search the forums. [At the moment that is where I am still at, but in the meantime I thought I needed to voice my concerns].

So, as a suggestion for future tutorials and upgrades of manuals can you please include some "Basic" or "simple" instructions, before showing the more complex applications, it may just allow people to get to producing real programs much earlier.

Thank you.
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
However, since we have become "OpenSource" we seem to be now using language, and structures, and whatever
I don't see any relation between the two.

I do understand that XUI and B4XPages might look more complicated at first glance. The truth is that writing apps with B4XPages is much simpler than with activities. Especially with real projects that need to deal with complex states. And I'm not talking about cross platform challenges which is an area that saw huge improvements in the last couple of years.

Android itself is much more complicated today compared to the early versions. Developers need to deal with many new restrictions and challenges. There were several years where developers could have ignored new requirements by keeping the targetSdkVersion set to a lower value. This is no longer the case and it means that there are new requirements every year.
It is not something that can be hidden from the developer.
 
Upvote 0

aeric

Expert
Licensed User
Longtime User
I am looking for a simple instruction on how to do something, what I uncover is a multitude of convoluted steps which seem to have no bearing on what I am attempting to do.

Do you have any specific new concepts that need more detail explanation ?
 
Upvote 0

Magma

Expert
Licensed User
Longtime User
but....I feel... like using BASIC... and the "true" that this BASIC is updating!

Yes there are many options added but no-one need to know everything... don't forget this Forum... is for giving solutions - exchange ideas - and ways to do things... Yes there are thousands extra things - but do not afraid to explore and try... and if you don't want to explore... we all here to give ideas and select one from decades ways to do things easier for you !
 
Upvote 0

ashton293

Member
Licensed User
Longtime User
Thank you for your responses.

My reference to "OpenSource" was probably a reference to timing as much as anything.

And, Yes, I recognise that people, or organizations, such as Google, have made things more difficult because of their push to keep apps current. To be honest it got me to the stage of not wanting to continually upgrade my earlier apps because as a single developer with other obligations it just got too hard timewise.

But it would be nice if, and if it was ever possible, to keep a similar style of language to what previously existed and with a lesser number of steps.

Yes I know you have upgraded things to accommodate more complex settings.

At one stage, I was developing an app that was clearly ahead of the pack because similar apps didn't start to appear for about 2 years. Yes I had it working, through the workarounds I did, but I didn't ever launch it because of my view of the sensitivity of tracking people.....and the possibility of using it for malicious purposes. As I see it, it was possible to do complex matters if people applied their mind to the challenges.

Essentially, what I am saying is we seem to have made coding more complex.

To give a simple example, of what I mean, and I am taking this from the B4X language manual.... and just looking at one aspect. Stringbuilder is something I have used quite a bit and it hasn't changed as far as I can tell.

Now, the simple approach to describe stringbuilder would be to follow these steps:

1] Create the variable: Private Sb1 As Stringbuilder
2] Initialize stringbuilder: sb1.Initialize
3] Add to the string by : sb1.Append(xxxx)

Then if you want to see it: Log(sb1)


But in the notes we get this:
Dim start As Long
start = DateTime.Now
'Regular string
Dim s As String
For i = 1 To 5000
s = s & i
Next
Log(DateTime.Now - start)
'StringBuilder
start = DateTime.Now
Dim sb As StringBuilder
sb.Initialize
For i = 1 To 5000
sb.Append(i)
Next
Log(DateTime.Now - start)

Yes, that may be how it is often used.... with "For Next" loops, however, "For Next" is a separate function.

I have used stringbuilder to "read" documents and that can require a different structure again depending on what is being read.

Now when I look at the the examples for B4Xtables, or B4X pages, CSV loading, etc... we end up with lots of other functions thrown together when invariably all I want is what is required to do a specific function.

So, let's say I am doing a family tree and we have a gedcom file. Some of the gedcom files can be delivered as a CSV file, but the rest is in a gedcom document which can be converted to a txt file. The Gedcom CSV file may not [ well it doesn't] record the parents, and their parents and their parents, etc. That is in the txt file. So we need to read the txt file to identify the people and update the table to include the respective generations. Then, when that is done we can query the table to find out, ancestry, or descendants, most recent ancestors between 2 people, double cousins, etc, etc, etc....[you can query on lots of things] we can also bring in DNA to test the accuracy of the Family Tree based on DNA, OR find where unknown people, where we have their DNA [from match documents produced by the various consumer DNA companies which are downloadable as CSV's], may sit in your own family tree. Now, at some point that gets fairly complex. But it shouldn't get that complex when you are still on line 1 and having to read multiple sources to try to work out how best, and how simply, to put a parent beside their child or multiple children.

Now, I don't think that project is beyond B4X. It is a matter of breaking down the steps and having a simple, reasoned process, rather than bundles of unnecessary code, obtained by someone trying to demonstrate different types of examples.

Obviously, the more lines that are used at a particular stage the greater the risk the process breaks down - and then the whole system breaks down. It is possible, eventually, that I incorporate disease risks could come into the model as well and how inherited, or otherwise, diseases have flowed through family lines. The imagination goes on and on.

I hope that provides the gist of my feedback.

It could be that you want to write the above program, I don't really care. But that is the concept and unless you have the data it isn't all that helpful to you.
And some family trees have 70,000+ people in them. At the moment, i am working on a test sample of 500 but want to roll it out to a much larger number given many people in my local area are related in some way if they settled here in the last 170 years. So, it would be good if we can simplify that more than what the consumer DNA tools say and record it as xx number of steps.
 
Upvote 0

Magma

Expert
Licensed User
Longtime User
My opinion is that every project can created with B4X and without it...

It is more a way of thinking and not way of programming... So sometimes our thougths must be in boxes (cells, arrays, etc) and sometimes out of cells...

So if the problem here is how to do it... I think you must start from it - asking "Which is the best solution for my problem - what do you think ?" - first ask yourself and then here at forum... So sketch at paper or into your brain (sorry for poor english) + see how will be possible to add those things you need with the easier way for you...

Don't forget GWBASIC or QuickBasic... not having anything more than arrays... arrays exist here with the same logic... but you can more than them...

The way of showing arrays at the end is totally different... also the way saving (db, text file...)

Ofcourse a "Tree" is very simple to created with an SQL database help... (also included in b4x)
 
Upvote 0

MicroDrie

Well-Known Member
Licensed User
Longtime User
Now, I don't think that project is beyond B4X. It is a matter of breaking down the steps and having a simple, reasoned process, rather than bundles of unnecessary code, obtained by someone trying to demonstrate different types of examples.
Personally, I think it's important to start each time by asking yourself and well define what is the Purpose and what are the Means needed for this. B4X is a means and not an purpose. The same goes for the many commands you can perform with B4X, it is a means that must be used to achieve a very specific and only that few specific goal. The charm and also the weakness of a programming language like BASIC is the great freedom a programmer has. That can quickly yield up to a "spaghetti" of unstructured program code.

As soon as you break down the end purpose into all kinds of sub-purposes, you can name the necessary resources and solutions for each sub-purpose. This is a great forum with many techies. Some techies tend to subordinate the documentation underpinning a working solution to the solution itself. You can usually find more underlying information by searching the forum with different keywords. What also sometimes helps is to look in a program code how someone has solved something. But I admit that there are few "one-fit-all" solutions because everyone wants something different. And that brings us back to BASIC, which does not impose any structure.

Gedcom has a structure described in the current version GEDCOM555.zip file. There are 6 different GEDCOM Sample Files of which 2 are a practical example. I recommend that you read the standard and first break it down into different goals and then work out each goal based on the GEDCOM Sample Files in B4X.
 
Upvote 0

udg

Expert
Licensed User
Longtime User
Hi all,
if I understand correctly @ashton293 the whole matter is about having tiny instructions about almost any B4X language feature.
Something between a Code snippet and a Tutorial
It could be a new kind of document:
- syntax
- brief explanation
- notes
- examples of use.

Some will stop at the syntax stage, others will make use of the more or less complex examples.

What will be difficult, as usual, will be keeping it current with advances in the language itself and OSes versions.

@ashton293 : I personally like to "decode" B4X as Best for anything rather than Basic for all
 
Last edited:
Upvote 0

klaus

Expert
Licensed User
Longtime User
To give a simple example, of what I mean, and I am taking this from the B4X language manual...
This has been improved for the next edition.
If you have other examples, please let me know.
 
Upvote 0

ashton293

Member
Licensed User
Longtime User
Yes UDG that is pretty close.


Thank you all for your input.

I will end this discussion here.

It was feedback suggesting a need for straightforward code..... if others feel it isn't required then that's Ok, too.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…