News:

PROTON pic BASIC Compilers for PIC, PIC24, dsPIC33

Main Menu

Thanks Les

Started by RGV250, Sep 23, 2025, 02:24 PM

Previous topic - Next topic

RGV250

Hi,
I am currently trying to convert an Arduino program to Positron, every time I do this I always end up wondering why people like this cryptic load of rubbish. It appears to be written by people trying to say look how clever I am, I can write code that nobody else can understand.
Compared to positron it seems like it is still in the dark ages. I always think I have done something wrong when I end up with code half the size of the original and easily understandable, I think I have missed something. Loads of bit shifting, "and"ing, "or"ing for no apparent reason.

Also there are never any relevant comments in the examples.

Bob

Frizie

Thanks Les, I agree!

I read in Elektor that someone wanted to measure a temperature with a DS1820 and an Arduino.
He placed a Dallas library, and his Arduino's memory was already half full...

For a DS1820!  ::)  ;D  :'(
Ohm sweet Ohm | www.picbasic.nl

Stephen Moss

Quote from: RGV250 on Sep 23, 2025, 02:24 PMI am currently trying to convert an Arduino program to Positron, every time I do this I always end up wondering why people like this cryptic load of rubbish. It appears to be written by people trying to say look how clever I am, I can write code that nobody else can understand.
That is because...
  • Arduinos are hobbyist amateur hour pieces of junk, that are hobbled by the idiots who designed them so that if you actually read the Microcontrollers datasheet and know how to program them you cannot necessarily use the device to its full capacity without first hacking their files to allow it.
    Files which are then annoyingly overwritten back to the original rubbish every time you update the IDE so you have to keep replacing them with your amended versions.
  • Because they are designed for and aimed at use by hobbyists I don't think that most people using them know anything about Microcontrollers or programming and are generally too lazy to learn, instead just copying and pasting horribly written bloated code they found from an internet search that was written by someone who is almost as equally clueless about programming and produced code that works more by luck than understanding and good programming, hence you struggle to follow their code because it is so poorly written.

Quote from: RGV250 on Sep 23, 2025, 02:24 PMAlso there are never any relevant comments in the examples.
When I had to update some Arduino code at work which was clearly written by someone who had not previously written a line of code in their life, the first thing I did was to go through it adding lots of comments to help me understand what the code was doing. Then I basically much re-wrote everything except for the I/O pin and Variable setup because it was so poorly written. 

See_Mos

I had the same problems a few years ago when I did the PS2 keyboard to PIC and PS2 keyboard emulator.

In the end I gave up trying to understand and convert the Arduino code that was around at the time.

trastikata

Quote from: Stephen Moss on Sep 24, 2025, 08:26 AMThen I basically much re-wrote everything except for the I/O pin and Variable setup because it was so poorly written. 

This is basically what I am using them for ... register definitions, I give them that much, they do much better work than me, I don't have the patience writing register definitions, I usually use the hex code only if I can't find them already defined somewhere  :) .