Electronics > Microcontrollers

Is ST Cube IDE a piece of buggy crap?

<< < (202/216) > >>

Karel:

--- Quote from: peter-h on October 30, 2023, 09:32:20 pm ---Re "cut out to be a dev" well obviously not, because a real dev

- comments nothing
- documents nothing
- uses esoteric pointer code which nobody else understands
- has no stake in the company staying in business (always on LinkedIn looking for his next job)
- could not care less if a product sells well for 10 years (never mind 25 like some of mine!) and has to be maintained after that time
- documents nothing

:)

--- End quote ---

It's not always the fault of the programmer. Often the company puts tight deadlines and doesn't want to spend
time & money for testing and documenting.
"Release quick, if people complain, we can fix it later with an update."

p.s.: I do use pointer arithmetic a lot, simply because I like it and because it's usually the most efficient way.

NorthGuy:

--- Quote from: Karel on October 31, 2023, 09:01:00 am ---It's not always the fault of the programmer. Often the company puts tight deadlines and doesn't want to spend
time & money for testing and documenting.

--- End quote ---

People used to have integrity and would refuse to do crap if asked to.


--- Quote from: Karel on October 31, 2023, 09:01:00 am ---"Release quick, if people complain, we can fix it later with an update."

--- End quote ---

But then new update will have two new bugs for every bug fixed.

I had to upgrade my Mac to Monterey OS because Apple has changed their "notarization" rules. This covers about 5 years of updates. It has become very slow and acquired new bugs.


peter-h:

--- Quote ---that code is literally a HAL library. It's not generated for you to modify
--- End quote ---

We will have to agree to disagree.

This is not the age of the Z80 when you had to read a few pages, and to get a working system you copied a Nascom 1 circuit - basically a CPU+EPROM+RAM and some latches for I/O.

This is the age of a 300 page DS and a 2000 page RM. Lots of people use Cube MX to generate code fragments (they are fragments really because MX is great for knocking up quick demos and then you have to do lots of real work to get a finished product) to save time and save many hours of googling to see how others did something e.g. drive the SPI controller.

Lots of times one picks up a function and uses the "body" of it. Yesterday I picked up the "HAL" function for the random # gen and put a mutex at the start and end of it (because it is called both by TLS and other user code) and a macro which contains a return() will obviously blow it up, because the mutex will never get released. I would not be randomly calling just hal_lock, obviously.

Everybody posting here is an expert (except me; I am learning from a low base and 40 years of asm) but this is a great way to get bitten in the bum.


jgrossman:

--- Quote from: peter-h on October 31, 2023, 02:22:00 pm ---
--- Quote ---that code is literally a HAL library. It's not generated for you to modify
--- End quote ---

We will have to agree to disagree.

--- End quote ---

I guess to be more specific, what I meant was:

It's intended use is to be generated and used wholesale. They are not trying to provide a template, and so are free to do literally whatever. If you want to use it that way, you just have to be mindful of what it is you are taking. I think we agree that it is kindof poor form to hide a return behind a macro that, to me, is named is if to imply "wait until ready", not "if not ready, bail". Trailing on that:


--- Quote from: DavidAlfa on October 31, 2023, 08:29:37 am ---I still see no problem here.
Whats's the problem of inserting a return in a macro? Why would it be a bad coding practice?

--- End quote ---

Nothing at all, as long is it isn't slightly misleading like __HAL_LOCK, where my first impression would be a wait until not-busy. __HAL_LOCK_OR_RETURN(), no problem there, clear as day what happens. Should you pay attention and understand what it is that means? Absolutely, but there can be friction in doing so where it is not obvious what something does.

DavidAlfa:
Well, yeah, I do most of the time, specially "__HAL_” stuff, before taking anything for granted I find its declaration and check what it does.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod