On Tue, Feb 11, 2020, 8:26 PM <immortal.discover...@gmail.com> wrote:

> Do not, call it shit. It's leading up to something big. BIG shit.
>

Right. Well post your code when it's finished or you have a question. It's
not very helpful if you post code without comments explaining what it is
supposed to do. If it's more than a few lines, then post a link to it. You
don't need to use a developer platform like GitHub unless you have more
than one person updating the code.

In my programming classes I take off 50% of the grade if the students don't
write a set of requirements. What is the purpose of your program? What is
the input and what is the output? What does the user see and do?

You should write the whole user's manual first, before writing one line of
code. Undocumented code is worthless because the next person to work on
your code is going to throw it away and start over. Maintenance makes up
80% of the life cycle cost of software.

Here is an example of properly documented code.

// Swap x and y without a temporary variable.
// All operations are reversible, so it
// is suitable for a quantum computer.
x ^= y; y^= x; x^= y;

Depending on your audience, you can add a comment that x^= y means
exclusive or x with y. For maintenance purposes, you can assume they know
the language but not what your code is supposed to do.

But the main purpose of posting code is to communicate ideas to people. For
example:

// A program that passes somebody's
// alleged test for consciousness
printf("I think I am\n");

For longer programs, just describe what it does and what you changed, with
a link to the code. For example:

Here is versions 1.2.0.87b of my recursively self improving AGI. This
hopefully fixes a bug in the module that detects when it is about to launch
an unfriendly singularity. Just to be safe, be sure to run it in a virtual
sandbox on a machine not connected to the internet. (Link to source code).

Be sure when you update your source code to update your documentation too.


------------------------------------------
Artificial General Intelligence List: AGI
Permalink: 
https://agi.topicbox.com/groups/agi/T11f5dc3052b454b3-M9cca584ec994d89866d1b5fd
Delivery options: https://agi.topicbox.com/groups/agi/subscription

Reply via email to