Cleared up a few things in the guide

This commit is contained in:
Tony Bark 2025-02-06 14:03:24 -05:00
parent 23e712fda3
commit 8b865abf0c

View file

@ -1,8 +1,8 @@
# NASA-style Programming for C# # NASA-style Programming for C#
I asked the AI to write their [NASA-style](https://en.wikipedia.org/wiki/The_Power_of_10:_Rules_for_Developing_Safety-Critical_Code) [coding instructions](Powerof10PPrompt.txt) in the form of guidelines. I figured I'd use C# since it's both my preferred language and the syntax should be fairly easy to grasp once you understand the basics. I asked the coding AI to write their [system prompt](Powerof10PPrompt.txt) in the form of programming guidelines. They're based on NASA's [Power of 10](https://en.wikipedia.org/wiki/The_Power_of_10:_Rules_for_Developing_Safety-Critical_Code). I figured I'd use C# since it's both my preferred language and the language's syntax should be fairly easy to grasp once you understand the basics.
My only request was to apply .NET 6's [top-level statements](https://learn.microsoft.com/en-us/dotnet/csharp/tutorials/top-level-statements) for brevity. Aside from a few organizational tweaks with the guidelines and fixing the scope example to be wrapped in a class, it all works flawlessly. My only request was to apply .NET 6's [top-level statements](https://learn.microsoft.com/en-us/dotnet/csharp/tutorials/top-level-statements) for brevity. Aside from a few organizational changes, minor tweaks to section 8, and adding the `Program` class to the scope example, it all works flawlessly.
Why NASA? Their coding standards have loads of redundancies, and if AI is going to behave like advanced code generation tools, they need to be as fault-tolerant as possible. While my instructions were modified to account for modern languages, the principles are still the same. Why NASA? Their coding standards have loads of redundancies, and if AI is going to behave like advanced code generation tools, they need to be as fault-tolerant as possible. While my instructions were modified to account for modern languages, the principles are still the same.