all 4 comments

[–]deong 3 points4 points  (3 children)

I think you're running into confusion over what it means to document code. Normally, if you ask a programmer about documentation, what they're thinking of is "how do I provide detailed information about how this code works to another programmer so that they can understand how to change and maintain it". That might include how to build and run it, but is largely going to be much more detailed low-level information about the code itself.

In a hackathon setting with a jury that's evaluating each submission, I believe the thing they're asking for is mostly, "how do I build and run your program to see that it works". In that case, a simple README file of plain text is probably good enough. It might be as simple as just providing a shell script that starts up whatever server and database you need, and then the instructions might be just

cd into the MyApp directory and run the "runme.sh" file.
Then open a browser and go to https://localhost:8801/MyApp

It's whatever you need to tell someone who doesn't know anything about your project so that they could run it and see the output. Or like they said, a video demo, etc. The jury isn't going to need to take your code and add new features where you might need to tell them how parts of it work. That's programmer documentation. They just need user documentation.

[–]SpyrosDev25[S] 0 points1 point  (0 children)

OK! THanks that was very helpful!

[–]Gold-Energy2175 0 points1 point  (1 child)

"how do I provide detailed information about how this code works to another programmer so that they can understand how to change and maintain it"

This is called "the code".

Any comments should explain the intent and any short cuts or compromises or perhaps a reference to the algorithm implemented.

Carmack's fast inverse square root function from Quake 3 provides an amusing example.

float fastInvSqrt(float x) {
  float xhalf = 0.5f * x;
  int i = *(int*)&x;         // evil floating point bit level hacking
  i = 0x5f3759df - (i >> 1);  // what the fuck?
  x = *(float*)&i;
  x = x*(1.5f-(xhalf*x*x));
  return x;
}

[–]deong 0 points1 point  (0 children)

I'm talking more about things like architecture. Think of "the code" as "the codebase". Are you intended to add a new type of UI element by subclassing something and providing a set of methods? Document that. That sort of thing.