I do use classes! That NamedTuple is certainly a class but it's a special kind of class that has properties that would tedious/difficult to program from scratch (immutability, indexability, and iterability). Those properties allow the NamedTuple to be converted into a numpy array effectively (also a class). Generally speaking, and I teach this in my course, I tend to use classes to represent structural elements whose capacity I want to calculate. When it comes to loading, I tend to use functions _unless_ I am in a scenario where it makes more sense to have data and functions combined together to achieve some purpose that would be difficult to do otherwise. An example of this is in my video about load distribution. The class "Singularity" that I created was the KEY to making that whole process work.
@@hazimmerghani6625 Certainly not! The course assumes two things: 1) You have not programmed before 2) Because you are an engineer, your previous technical training has prepared you to learn other technical topics. So, you will "get it" faster than a non-engineer ;)
Ehi Connor, I'm binging your videos and they are awesome, thank you! About this video, why don't you use classes? Aren't they the best option?
I do use classes! That NamedTuple is certainly a class but it's a special kind of class that has properties that would tedious/difficult to program from scratch (immutability, indexability, and iterability). Those properties allow the NamedTuple to be converted into a numpy array effectively (also a class).
Generally speaking, and I teach this in my course, I tend to use classes to represent structural elements whose capacity I want to calculate. When it comes to loading, I tend to use functions _unless_ I am in a scenario where it makes more sense to have data and functions combined together to achieve some purpose that would be difficult to do otherwise. An example of this is in my video about load distribution. The class "Singularity" that I created was the KEY to making that whole process work.
Thanks for this really helps me in my rcd plates
How can i purchase you Python course?
You can go to structuralpython.com; enrollment for January 2024 is now open.
Is it required a base knowledge in python to enter the course? @@structuralpython
@@hazimmerghani6625 Certainly not! The course assumes two things: 1) You have not programmed before 2) Because you are an engineer, your previous technical training has prepared you to learn other technical topics. So, you will "get it" faster than a non-engineer ;)