Defensive programming is about creating reliable software.
Spent many of nights with switches and conditionals ![]()
Defensive programming is about creating reliable software.
Spent many of nights with switches and conditionals ![]()
I know, I’ve read your code
Then I feel bad for you 
There are free tools, at least since I’m Bulgarian I know about a Globally renown company Telerik, that is (was**) a lead in QA.
** “was” because I heard they were aquired by some other big software company. But there are free software still available on https://www.telerik.com/ maybe some could be useful to you.
Can I get a copy of that I think these could also be very useful in Naval Architecture Especially “Real Trimming” if that is what I think it is. I remember last month headbanging due to trimming problem.
And perhaps you shouldn’t, and noone shouldn’t and all software should be open-source. So every user can indeed get what he wants from the software. Develop his own tools to work for him, and release them so others can learn and improve.
ilspy
We don’t discuss those things here ![]()
I don’t discuss it, don’t quote me
it was just ironic that he’s concern is defensive programming but it was him who told me about it ![]()
I think you misunderstood, defensive programming is more like ensuring the thing doesn’t break in certain cases and making sure if it does break that the user knows why. I think he is saying it is annoying to catch all the possible ways to break (which it is,because when things break you get hate mail
)
" Defensive programming is a form of defensive design intended to ensure the continuing function of a piece of software under unforeseen circumstances."
As @TomTom mentions "Defensive programming is about creating reliable software. Reducing bugs to a minimum, due to mechanisms like oop, unit testing,documentation and error awareness " but there is also a part of secure programming which would be against hacking.
A good example of defensive programming could be something like if you have two rectangles and you loft between, but lets say you want the rectangles to have a scale option. Well you know there is a problem when you scale by zero you get nothing. Defensive programming would do something like "if one rectangle scale = 0 then either run an error message explaining why it failed or maybe switch to using something like extrude to point (oop logic) make the zero scaled rectangle a point in that case, if both rectangles are scaled to zero then run an error or maybe make a line (depending on whats less disruptive to the logic of the software).
I did not misunderstand at all. And that’s why I suggested Telerik tools. They scan the software for bugs unwanted infinite loops, missing Error exceptions, etc. Widely used, including by Dassault Systemes, although I don’t know which tools and to what extent. QA is important, especially when working with engineering software.
Also we have to clarify, “hacking” is good, “cracking” is bad.
@ivelin.peychev Thank you so much for the contour advice, it has just made the progress much easier for me, taking my newbie being into account.
I will use CFD and another michell’s integral based small program for some theoretical comparison. Also will apply a model test later on, of course by using a different starting hull form.