We would like to build a community for Small Basic programmers of any age who like to code. Everyone from total beginner to guru is welcome. Click here to register and share your programming journey!


Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
One more option to help people.
#1
(translated by DeepL translator)

I know that a very big barrier to learning programming is the language people use to write program code.
If English is not a person's native language, then the person has to create an algorithm in their native language and then rewrite it in English into program code.

But, it is possible to create a utility that makes it possible to assign any sequence of characters of a person's native language to another sequence of English characters, as the #gefine directive does.

Writing a program in your native language is a pleasure that is much greater than creating code using obscure symbols.  Smile

What do you think about that ?
Reply
#2
Yes I agree, but most programming is done with English based syntax.

With Small Basic, we can regionalise the interface and the intelisense help, below is Spanish example.

   

The one thing we cannot do it change the keywords themselves.  It is possible to use non English characters in variable names, but would probably not recommend for compatibility reasons.
Reply
#3
(translated by DeepL translator)

Dear LitDev, I'm not talking about replacing the syntax language. Let the programming language be the way it is right now.
Let's take the solution you wrote for the "Write a TextWindow login program" assignment as an example.

You wrote your code using commands made up of sets of English characters.
For each set of these characters, I can define any set of other characters from any other language.
The utility can automatically perform character substitutions using a table that anyone can create for themselves.

As a result, your source code will be converted to a new text file.
This file is easily understood by people who do not speak English, but know the language in which the character replacement table was filled in.
These people will be able to make changes to the text. And then, the same utility will be able to convert the file back to standard program code with English characters and commands using the same replacement table.

In this way, we can make it easier for anyone in any country in the world to understand the code.
It will be a good and useful thing to do.  Wink
Reply
#4
Hi,

Interesting, so if I understand correctly the user would create a table of word pairs in both languages that can be auto swapped during the translation?

The list for German could be:

TextWindow:TextFenster
Hello:Hallo
World:Welt

Which would translate between:

TextWindow.WriteLine("Hello World") and TextFenster.WriteLine("Hallo Welt")

Is this the idea, with the word list created by the user?

Challenges would be to create the word list and how to manage typos or small variations in the words.
Reply
#5
(translated by Google translator)

We want to replace character sets so that people who don't speak English can understand the logic of the program code.
Therefore, the utility will need to have a table that contains the Small Basic keywords, namespaces, and function names of its library.
In addition, the utility settings will allow you to connect additional tables created to replace character sets of additional libraries.
Finally, at the beginning of the source code file, we can create a comment area where the utility will see the characters to replace English names of variables  that are important in this code. (like a directive #define)

I think that compiling the final English code of the program will reveal any syntax errors that may occur during the substitution of character sets.
But, the utility will provide enormous additional programming opportunities to people who are not professional programmers and do not speak English.
After all, these people do not work with large program codes.
Reply
#6
Hi,

I understand we want to make it easier for non English users (especially children, since adults can usually handle translation as you do).  I am trying to be clear about the exact idea and how it could work with the current Small Basic without compatibility issues, for example not making any changes to the compiler.

So, in my first reply I showed how the IDEs and intellisence (including language characters) can be made international.  This leaves just the keywords, commands and function names.

From your last post, I think you are describing a lookup conversion for these keywords and commands (since everything else is already available).  This would be possible, but several practical challenges are there.  For example:

  1. For children, it has to be really easy to use (no options or #define setup).
  2. It cannot be implemented in standard Small Basic IDE, that leaves SB-Prime.  SB-Prime is not aimed at the first time child user, do any children even use it?
  3. How would the intellisense work with alternative language keywords?
  4. Recently I have been actively looking at the Small Basic community and I haven't encountered a single question or interaction on any platform from a young programmer, so at the moment I am unsure if there really is a community of young programmers that would use it?

The main reason to start this forum was to see if there is a community of young Small Basic programmers wanting help that wasn't being catered for elsewhere.  So far the answer appears to be no.  Also, since my website has been back up, there have been only 2 downloads of SB-Prime and I suspect they are not children.  At the moment it appears there is little interest apart from maybe 5 or 6 nostalgic enthusiastic adults (like me and you).
Reply
#7
(translated by Google translator)

I wish you good health.
The point is that I propose to create the utility as a separate independent program.
The Character Set Replacement table will be filled in by people old enough.

If a person needs to understand already existing source code, then they will open it using a separate utility program that will create a new text file.
This new text file will contain the source code logic. But, this logic will be written in symbols of a person's native language.
Such files are easy for children to learn.
Such files can be easily created by an adult who does not work as a programmer.

When such a file is created, then a person, using a utility program, will replace the character sets with English characters and save a new file for the compiler.
To create a utility program, you do not need to make changes to either the Small Basic IDE or SB-Prime.
And this utility program can help a person when he uses any other programming language.

I even became interested in creating such a utility program using Small Basic and the LitDev extension.   Smile
Reply
#8
Hi,

OK, perhaps a Small Basic program is the solution.  Here is a simple start (no extensions needed), perhaps this is what you mean; import TDKW589.000.

   
Reply
#9
(translated by Google translator)

Thank you very much for supporting my interest in the idea of creating a converter program.
I ask you to give me time so that I can create my sample program.

Thank you.  Smile
[-] The following 1 user Likes AbsoluteBeginner's post:
  • litdev
Reply
#10
(translated by Google translator)

Hello.
In this post I will describe my reasoning.

I think the converter program doesn't need to display the text in the window.
For example, I want to convert the English source code of your solution for the "Write a TextWindow login program" task into text that contains the necessary words in my native language.
I have a universal converter program.
When I run this program, the first thing I do is connect the character sets replacement tables that I currently need.
Then, I specify the English source code file.
The program loads it, automatically replaces the required character sets and opens a dialog box for saving the converted text in a new file.

That's all.
Next, I can use this file as I need.
I can open it in my favorite text editor, which may have the custom syntax highlighting I need.
I can study the logic of the source code myself, or I can explain that logic to other people using text in my native language.

I think that's good.  Smile
[-] The following 1 user Likes AbsoluteBeginner's post:
  • litdev
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)