Python Forum
Variable being erased inside of if statement
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Variable being erased inside of if statement
#9
Also, if you have not yet learnt about automated testing, then do. One writes code to exercise different parts of the application code to check it does the right thing - unit testing is an example of this. If done well, this kind of testing can give you safety when changing code as, since they're executable, you can execute them frequently and failures tell you that something is broken.

I first learnt about automated testing in the context of test-driven development. It's a process in which you write these sorts of tests _before_ writing the application code. There's a lot of literature on the subject, but at the least working this way helps you focus on the "what" you want the software to do, rather than the "how" and helps produce code that is easy to test in this automated fashion (as writing tests after the code has been written can be quite difficult for various reasons).
Skaperen likes this post
Reply


Messages In This Thread
RE: Variable being erased inside of if statement - by ndc85430 - Jun-15-2024, 07:00 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Variable definitions inside loop / could be better? gugarciap 2 598 Jan-09-2024, 11:11 PM
Last Post: deanhystad
  How to create a variable only for use inside the scope of a while loop? Radical 10 2,466 Nov-07-2023, 09:49 AM
Last Post: buran
  Cursor Variable inside Another Cursor . CX_ORacle paulo79 1 1,649 Apr-09-2022, 10:24 AM
Last Post: ibreeden
  An IF statement with a List variable dedesssse 3 8,964 Jul-08-2021, 05:58 PM
Last Post: perfringo
  define a variable using an if statement Margaridalopes 2 2,296 Oct-24-2020, 05:47 PM
Last Post: jefsummers
  Correct syntax for a variable inside a quotes: MP4Box command JonnyDriller 2 2,893 Feb-02-2020, 01:22 AM
Last Post: JonnyDriller
  How to store the value from variable into list & run a statement then put in variable searching1 1 2,570 May-29-2019, 06:36 AM
Last Post: heiner55
  Get variable from class inside another class hcne 3 2,966 Mar-30-2019, 03:02 PM
Last Post: ichabod801
  SELECT statement query question using a variable DT2000 2 3,175 Feb-23-2019, 07:35 AM
Last Post: DT2000
  Invalid syntax in two variable if statement? 00712411 1 2,373 Oct-10-2018, 12:36 AM
Last Post: stullis

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020