User:Callahanp: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 15: Line 15:
I hope to make regular code contributions to FlightGear. I want to gain the skills to address some FlightGear issues as they come up and participate in the discussions and programming for the various [FlightGear Epics |https://gitlab.com/groups/flightgear/-/epics?sort=created_date&state=opened&first_page_size=100]
I hope to make regular code contributions to FlightGear. I want to gain the skills to address some FlightGear issues as they come up and participate in the discussions and programming for the various [FlightGear Epics |https://gitlab.com/groups/flightgear/-/epics?sort=created_date&state=opened&first_page_size=100]


You are about to read a very personal document.  I make statements there that I have not yet validated by discussing these ideas directly with others and trying to put them into practice.  Go easy on me.  Criticize my ideas, not me.  I think this is ok, as the material is buried in a personal web page on a wiki.
== FlightGear Development: ==
== FlightGear Development: ==


I'm motivated to learn enough C++, Nasal, and whatever else it takes to start regularly contributing to the Flightgear Codebase. 


I'm motivated to learn enough C++, Nasal and whatever else it takes to start regularly contributing to the Flightgear Codebase.   
Someone with practical experience writing, maintaining, and fixing problems in C++ can easily begin contributing to FlightGear's codebase.  They may find a few fine points, such as the internal scripting language and the property tree, but they should be able to navigate with little assistance.  That's not me.  I don't have the practical experience, and my  C++ experience consists mostly of a one-semester class.  Not only that, the class was in the previous centuryMove semantics?  What's That!?


Someone with practical experience writing, maintaining and fixing problems in C++ can easily begin contributing to FlightGear's codebase.  They may find there are a few fine points such as the internal scripting language and the property tree, but they should be able to find their way with a little assistance.  That's not me.  I don't have the practical experience and my c++ experience consists mostly of a one semester class.  Not only that, the class was in the previous century.  Move semantics?  What's That!?
You get the idea:  "Nice goal, Pat.  Good luck with that. You do realize you are 75 years old, don't you?"
You get the idea:  "Nice goal, Pat.  Good luck with that. You do realize you are 75 years old don't you?"
Heedless, I press on.
Heedless, I press on.
It should be obvious to all that this kind of endeavour requires a lot of work, and anyone undertaking it is going to need help at various points.  It's easy to get stuck on specific points, and stuck in ways that you don't know which question to ask first and where to ask it.  You may be able to help.   
 
It should be obvious to all that this kind of endeavour requires a lot of work, and anyone undertaking it is going to need help at various points.  It's easy to get stuck on specific points, and stuck in ways that you don't know which question to ask first, and where to ask it.  You may be able to help.   


== Getting an Giving Help ==
== Getting an Giving Help ==
I want to ask for help in the appropriate forums, having done all I can to explore answers before asking. At the same time I want to help others with any code problems they are struggling with.   
I want to request assistance in the appropriate forums, having exhausted all possible avenues to explore answers before seeking help. At the same time I want to help others with any code problems they are struggling with.  
I like helping other people.  It's the best way toward friendship.  
   
I want you to know that I sometimes help people by listening to them describe a problem, and suggesting a route to finding some small tidbit of information that makes the problem easier to think about. It doesn't always happen, or even often, but when it does the result seems very satisfying to both parties.   
I like helping other people.  It's the best way to make friends.  
There are other times when just having me listen attentively to and explanation of a problem is sufficient for the teller to grasp a solution. I don't have to say a word, but thay already have the answer.  Helpful, no?  This has happened to me on numerous occasions, more so than me making helpful comments.  Perhaps my asking for a description the problem and any naieve questions I ask about it are enough to get things moving.
 
So if stuck on some point and you want my help, just ask me personally, on any forum you encounter me on.  
I want you to know that I sometimes help people by listening to them describe a problem, and suggesting a route to finding some small tidbit of information that makes the problem easier to think about. It doesn't always happen, or even often, but when it does, the result seems very satisfying to both parties.   
You can find me on discord as callahanp, on irc as pac1 (early internet username formed from my initials)
 
There are other times when just having me listen attentively to an explanation of a problem is sufficient for the teller to grasp a solution. I don't have to say a word, but they already have the answer.  Helpful, no?  This has happened to me on numerous occasions, more so than me making helpful comments.  Perhaps my asking for a description of the problem and any naive questions I ask about it are enough to get things moving.
 
If you're stuck on a point and want my help, please don't hesitate to ask me personally on any forum where you encounter me.  
You can find me on Discord as callahanp, on IRC as pac1 (early internet username formed from my initials)


== Teamwork: ==
== Teamwork: ==
I'm a believer in teamwork and would love working closely in real-time with others on specific programming problems. I hope we can create opportunities for that.  I also believe the only learning environment is not a formal course: lecture, reading, homework, quizzes, tests and final grades.  Grownups use study groups, working groups, collaborators, publication, journal reading, conferences and work. And they take formal courses from time to time.
I'm a believer in teamwork and would love working closely in real-time with others on specific programming problems. I hope we can create opportunities for that.  I also believe that the only learning environment is not limited to a formal course, which includes lectures, readings, homework, quizzes, tests, and final grades.  Grown-ups use study groups, working groups, collaborators, publications, conferences, and prior work. And they take formal courses from time to time.


== Pair programming ==
== Pair programming ==
Line 52: Line 60:
== C++ ==
== C++ ==


  First, the application uses C++. As a complex evolving language, C++ has a reputation for complexity. It's not just the language, its the fragmentation of code into small tidbits, widely scattered in individual files covering supposedly just one aspect of what needs to be done. I don't really know if the structure of C++ code as objects is more efficient than a C++ program done using solid structured programming, but I know which is easier think about and to work on.
  First, the application uses C++. As a complex and evolving language, C++ has a reputation for being complex. It's not just the language, its the fragmentation of code into small tidbits, widely scattered in individual files covering supposedly just one aspect of what needs to be done. I don't really know if the structure of C++ code as objects is more efficient than a C++ program done using solid structured programming, but I know which is easier think about and to work on.


== Flight Simulation does a lot of different things ==  
== Flight Simulation does a lot of different things ==  


Second, Flight Simulation involves numerous application domains. Among them are aerodynamics, graphics, geography, geodesy, environment, navigation, networks, audio, video, and human languages. FlightGear addresses all of them and more. Each of these domains has their own view of the world, and many of them are modelled as C++ classes. Full understanding comes from knowing the C++ code, The terminolgy of the domain, and the way the code's authors chose to structure things as objects and methods.   
Second, Flight Simulation involves numerous application domains. Among them are aerodynamics, graphics, geography, geodesy, environment, navigation, networks, audio, video, and human languages. FlightGear addresses all of them and more. Each of these domains has its own view of the world, and many of them are modelled as C++ classes. Full understanding comes from knowing the C++ code, the terminology of the domain, and the way the code's authors chose to structure things as objects and methods.   


== Nasal and the Property Tree ==
== Nasal and the Property Tree ==


Next, in addition to the complexity introduced by C++ and the application domains, there's Nasal. Finally, to tie it all together, loosely, the property tree. a global object, with individual data items of a key-value store actually stored in a tree because they are conceptually related. The property tree introduced compexity because items in it are not "owned", they're simply created at some point, in either C++, XML processing or Nasal and used wherever the data item is "needed". Connecting the dots through all the code based on identifying individual properties is not all that easy.
Next, in addition to the complexity introduced by C++ and the application domains, there's Nasal. Finally, to tie it all together, loosely, the property tree. a global object, with individual data items of a key-value store actually stored in a tree because they are conceptually related. The property tree introduced complexity because items in it are not "owned", they're simply created at some point, in either C++, XML processing, or Nasal, and used wherever the data item is "needed". Connecting the dots through all the code based on identifying individual properties is not all that easy.


== Where should I start? C++, Nasal or XML) ==
== Where should I start? C++, Nasal or XML) ==
Line 68: Line 76:
== FlightGear's DataFlow Diagram ==  
== FlightGear's DataFlow Diagram ==  


There isn't one. Or rather there is one, but it's virtual in the sense that no-one used it as a design, document, rather it is constructable from the observable workings of flightgear itself.`
There isn't one. Or rather, there is one, but it's virtual in the sense that no one used it as a design document; rather, it is constructible as a mental model from the observable workings of flightgear itself.`


Part of understanding any body of code is to be able to identify how data flows through the application. Dataflows are usually represented as arrows of various widths. The arrows are messages flowing between parts of an application. The larger the arrow, the more data items in that data flow.  Knowing what is in each of those flows is important to understanding how the application works.   
Part of understanding any body of code is to be able to identify how data flows through the application. Dataflows are usually represented as arrows of various widths. The arrows are messages flowing between parts of an application. The larger the arrow, the more data items in that data flow.  Knowing what is in each of those flows is important to understanding how the application works.   


In FlightGear's C++ code, there are, of course, classes and objects that represent some dataflows. There's a problem, though. Many of the classes are about processing data into ad-hoc structures within the property tree.  How can we define a data flog for these items. There is one implied by the instantiation and use of these run time These define a While these are dataflows, they are only infrastructure.  The content of these infrastructure data flows are simply allocations of indivual data items that are the sources and sinks of  These items are the content of the actual data flows between subsysems in Flightgear.  
In FlightGear's C++ code, there are, of course, classes and objects that represent some dataflows. There's a problem, though. Many of the classes are about processing data into ad-hoc structures within the property tree.  How can we define a data flow for these ad-hoc structures? (Note: need a way to describe two dataflows.  The one that creates the infrastructure as properties in the tree, and a second one implied by the existence of the property.)


There is no C++ class for an Altimeter or a Heading Indicator. Instead, these are represented by a set of properties and data loaded via XML and other formats. The numerical data, stored in the property tree has a path indicating that the properties underneath a node are for the altimeter or the heading indicator. The actual paths in this case are /instrumentation/altimeter and /instrumentation/heading-indicator. Each node in the tree can have properties as child nodes, as well as child nodes that contain additional properties, such as /instrumentation/heading-indicator/gyro. Usually, only the lear nodes of th e tree  
There is no C++ class for an Altimeter or a Heading Indicator. Instead, these are represented by a set of properties and data loaded via XML and other formats. The numerical data, stored in the property tree has a path indicating that the properties underneath a node are for the altimeter or the heading indicator. The actual paths in this case are /instrumentation/altimeter and /instrumentation/heading-indicator. Each node in the tree can have properties as child nodes, as well as child nodes that contain additional properties, such as /instrumentation/heading-indicator/gyro. Usually, only the lear nodes of th e tree  
982

edits

Navigation menu