It is difficult for an expert to determine how many comments will suffice a beginner. So he/she always encourages to 'ask question by staring a thread'.but please could I ask that you add plenty of comments, far more than you would think were required.
This is same as I look bewildered to what my wife just said. Mystery.What is completely obvious to you is a complete mystery to others
And how the ten years experienced developer would understand which code of his/her is complicated in other's eye ?Also whatever your code is demonstrating please avoid clever and complicated ways of doing stuff unless that is what the actual example is. It just makes it more difficult for beginners (me) to understand.
and verbose, relevant variable names (says the guy still using Fortran I, J, K for loops)add plenty of comments
Who doesn't? ?(says the guy still using Fortran I, J, K for loops)
(says the guy still using Fortran I, J, K for loops)
I don't do it, I use Pascal I,J,K for loops ?Who doesn't? ?
I always don't understand what I wrote, but if it works I use it anywaySometimes I go back to my code and don't even understand why I wrote it that way ?
I get your point though, but the forum is always ready to help on any questions you have.
?I always don't understand what I wrote, but if it works I use it anyway
Can you give some examples of “difficult to understand examples”?We are all very grateful to all those who post examples and small bits of code but please could I ask that you add plenty of comments, far more than you would think were required.
What is completely obvious to you is a complete mystery to others. Also whatever your code is demonstrating please avoid clever and complicated ways of doing stuff unless that is what the actual example is. It just makes it more difficult for beginners (me) to understand.
I know very well that pascal derives from Fortran, in fact it was just a joke ?Perhaps you think your I, J, K are from Pascal but in reality you are an accidental historian ? :
Speedcoding --> FORTRAN --> Algol --> Pascal
Algol also begat C indirectly: Algol --> CPL --> BCPL --> B --> C
I think BASIC was FORTRAN, but leaning more towards ease of use by humans rather than ease of compilation to IBM 701 machine code
edit: https://www.computergenome.com/blast-from-the-past/basic
Private manager As BleManager
Sub [B]Manager_RssiAvailable[/B](Succsess As Boolean,Rssi As Double)
rp.CheckAndRequest(rp.PERMISSION_ACCESS_FINE_LOCATION)
Private rp As RuntimePermissions
Sub [B]CreateServiceItem[/B] (service As String) As Panel
Dim pnl As B4XView = xui.CreatePanel("")
pnl.Color = 0xFF808080
pnl.SetLayoutAnimated(0, 0, 0, clv.AsView.Width, 30dip)
Dim lbl As B4XView = XUIViewsUtils.CreateLabel
lbl.Text = service
lbl.SetTextAlignment("CENTER", "CENTER")
lbl.Font = xui.CreateDefaultBoldFont(14)
pnl.AddView(lbl, 0, 0, clv.AsView.Width, 30dip)
Return pnl
End Sub
Sub [B]CreateCharacteristicItem[/B](Id As String, Data() As Byte) As Panel
Dim result As String
Dim pnl As B4XView = xui.CreatePanel("")
pnl.SetLayoutAnimated(0, 0, 0, clv.AsView.Width, 40dip)
pnl.Color = Colors.White
Dim lbl As B4XView = XUIViewsUtils.CreateLabel
lbl.Text = Id
pnl.AddView(lbl, 0, 0, clv.AsView.Width, 20dip)
Dim lbl2 As B4XView = XUIViewsUtils.CreateLabel
Try
lbl2.Text = BytesToString(Data, 0, Data.Length, "UTF8")
result = BytesToString(Data, 0, Data.Length, "UTF8")
Log (result)
Catch
Log(LastException)
lbl2.Text = "Error reading data as string"
End Try
lbl2.TextColor = 0xFF909090
lbl2.TextSize = 14
pnl.AddView(lbl2, 0, 20dip, clv.AsView.Width, 20dip)
Return pnl
End Sub
Oh I used the wrong word.Nitwits? ? Or nuisances? ? Or maybe nuances? ?
Oh I used the wrong word.
I meant 'all smaller bits', will correct it.
Granted that I haven't read all the posts on this thread...
Here is a good reason (there are other more important ones) to avoid setting a variable of a class as public, so as not to have to struggle to create a property routine: you cannot add a comment to a variable, instead you can to a property.
Someone has this bad habit and, to save time, create this type of variable; I don't mention names ? I hope he reads and agrees.
It's your fault and the site's fault: it's time you all learned Italian ?I have not understood a single word.
maybe put an example so i can also understand what u mean. ?
Oi gee @Steve-h - - you really picked a difficult starter example. I have a number of postings on BLE having gone down that road too - not as a first or early project - the thing about BLE is its a conceptual leap anyway. BLE is just a complex function seemingly devised by a clever mind somewhere.Recently I have been puzzling over BLE2
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?