Re: Question(s)
On 2023-10-24, o1bigtenor wrote: > Greetings > > (Sorry for a nebulous subject but dunno how to have a short title for > a complex question.) > [...] > Is there a way to verify that a program is going to do what it is > supposed to do even > before all the hardware has been assembled and installed and tested? In short, no. Reality is a mess, and even if you've programmed/perfectly/ to the datasheets (and passed our unit-tests that are also based on those datasheets), a piece of hardware may not actually conform to what's written. Maybe the sheet is wrong, maybe the hardware is faulty, etc. -- |_|O|_| |_|_|O| Github: https://github.com/dpurgert |O|O|O| PGP: DDAB 23FB 19FA 7D85 1CC1 E067 6D65 70E5 4CE7 2860 -- https://mail.python.org/mailman/listinfo/python-list
Re: Question(s)
On 2023-10-24, o1bigtenor wrote: > On Tue, Oct 24, 2023 at 5:28 PM Rob Cliffe wrote: >> >> There is no general way to prove that a program is "correct". Or even >> whether it will terminate or loop endlessly. >> [...] >> When you come to run your program "for real", and you have to >> troubleshoot it (as in real life you probably will🙁), you will have >> eliminated simple bugs in your program, and can concentrate on the more >> likely sources of problems (e.g. misbehaving hardware). >> > Interesting - - - hopefully taken in the same vein as your second > statement - - I sorta sounds like programmers keep running around in > the forest looking for trees. (Grin!) No, you tend to know what parts of the spec are "wrong(tm)" (either in the language you're working in, or the hardware). If it comes to working with customers (as mentioned in one response), you start to learn the questions to get at what they really want (but that's better left to the architect :) ) > > So how does one test software then? You write unit tests (usually scripts or other software that can interact with the main program to twiddle the knobs and such, and ensure it's doing what was specified). Alternatively, you have to program your hardware and test directly on that. -- |_|O|_| |_|_|O| Github: https://github.com/dpurgert |O|O|O| PGP: DDAB 23FB 19FA 7D85 1CC1 E067 6D65 70E5 4CE7 2860 -- https://mail.python.org/mailman/listinfo/python-list
Re: Question(s)
On 2023-10-25, o1bigtenor wrote: > On Wed, Oct 25, 2023 at 7:00 AM Dieter Maurer wrote: >> [...] >> There are several others, >> e.g. "ECLIPSE" can be used for Python development. > > Is 'Eclipse' a Windows oriented IDE? > (Having a hard time finding linux related information on the > website.) Not at all. As I recall, it's entirely written in Java, so basically entirely platform-independent already. -- |_|O|_| |_|_|O| Github: https://github.com/dpurgert |O|O|O| PGP: DDAB 23FB 19FA 7D85 1CC1 E067 6D65 70E5 4CE7 2860 -- https://mail.python.org/mailman/listinfo/python-list
Re: Question(s)
On 2023-10-26, o1bigtenor wrote: > On Wed, Oct 25, 2023 at 10:19 AM Michael Torrie via Python-list > wrote: >> >> On 10/25/23 05:51, o1bigtenor via Python-list wrote: >> > Looks like I have another area to investigate. (grin!) >> > Any suggestions? >> >> Seems to me you're trying to run before you have learned to walk. >> >> Slow down, go to the beginning and just learn python, write some code, >> see if it runs. Go through the tutorial at >> https://docs.python.org/3/tutorial/index.html > > Interesting - - - - ". . . see if it runs." - - - that's the issue! > When the code is accessing sensors there isn't an easy way to > check that the code is working until one has done the all of the > physical construction. If I'm trying to control a pulsation system > using square waves with distinct needs for timing etc I hadn't > seen any way of 'stepping through the code' (phrase you use later). You use a hardware debugger then ... and if you're talking hardware, chances are you're also not talking Python (yes, yes, I know "CircuitPython" is a thing, or was it MicroPython?) > [...] > Even in maker threads - - - say for arduino - - its 'use this cut and > paste method of programming' with no mention of any kind of ide when > it was microPython - - although being a subset of python it Idle may > not work with it. Bearing in mind, of course, that "Arduino" is basically "Programming for dummies" level of stuff usually (i.e. people just getting their feet wet). It's meant to be a relatively "easy" introduction for students / hobbiests / non-programmers into the world of programming for microcontrollers. > [...] > My problem is that I'm needing to move quite quickly from 'hello, world' to > something quite a bit more complex. Most of the instruction stuff I've run > into assumes that one is programming only for the joy of learning to > program where I've got things I want to do and - - - sadly - - - they're > not sorta like the run of the mill stuff. Sounds like you've been reading instructables :) -- |_|O|_| |_|_|O| Github: https://github.com/dpurgert |O|O|O| PGP: DDAB 23FB 19FA 7D85 1CC1 E067 6D65 70E5 4CE7 2860 -- https://mail.python.org/mailman/listinfo/python-list
Re: Checking if email is valid
On 2023-11-02, dn wrote: > On 02/11/2023 19.46, Simon Connah via Python-list wrote: >> [...] >> My goal is to make a simple mailing list platform. I guess I could >> just send email to an address and if it bounces then I can remove it >> from the database. Thing is I'm not sure how close to a real email >> address an email has to be in order to be bounced. If it was >> completely wrong it might just swallowed up. > > Exactly! > > Build a complementary script which inspects the returned/bounced > messages, and removes those addresses. > > Given that the list of addresses is built from people signing-up in the > first place, one has to presume that people know their own addresses and > can type - there's no real defence against 'stupid'*. It's not as if you > are making-up addresses yourself (in many jurisdictions it is illegal > without opt-in). Isn't opt-in usually to the effect of "send a message with the subject SUBSCRIBE to [email protected] " ? Then the trick becomes filtering out the spam; but the "is the email valid" check is somewhat done as a matter of processing that inbound subscribe message. -- |_|O|_| |_|_|O| Github: https://github.com/dpurgert |O|O|O| PGP: DDAB 23FB 19FA 7D85 1CC1 E067 6D65 70E5 4CE7 2860 -- https://mail.python.org/mailman/listinfo/python-list
Re: How/where to store calibration values - written by program A, read by program B
On 2023-12-06, Stefan Ram wrote: > Chris Green writes: >>KEY1: >> a: v1 >> c: v3 >> d: v4 >>KEY2: >> a: v7 >> b: v5 >> d: v6 > > That maps nicely to two directories with three files > (under an application-specific configuration directory). Or an .ini file with two sections (although I don't think you can re-use key-names in a single ini file) -- |_|O|_| |_|_|O| Github: https://github.com/dpurgert |O|O|O| PGP: DDAB 23FB 19FA 7D85 1CC1 E067 6D65 70E5 4CE7 2860 -- https://mail.python.org/mailman/listinfo/python-list
