Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Seperate Code from README.MD #142

Open
indrajithi opened this issue May 30, 2016 · 5 comments
Open

Seperate Code from README.MD #142

indrajithi opened this issue May 30, 2016 · 5 comments

Comments

@indrajithi
Copy link

indrajithi commented May 30, 2016

Instead of putting the code in README it is better to keep the code in separate .c or .cpp file and all the documentation in README. So we can clone the repository and just compile and run the code without any hassle.

@indrajithi indrajithi changed the title Seperate Codes from README.MD Seperate Code from README.MD May 30, 2016
@arunisaac
Copy link

I couldn't agree more...

@KarthikNayak
Copy link
Member

@arunisaac @indrajithi Agreed! The problem being that Github doesn't allow file inclusion in its Markdown. That would have made everything so much easier. Any alternatives? I can only think of Duplication.

@indrajithi
Copy link
Author

@KarthikNayak : You have done an excellent work by putting this work on github with screenshots. What will make it more awesome is when you adapt some style like most repository in Github.
Create a readme with compiling and making instruction. Create a .c or .cpp file with code.
Create a MakeFile for compiling and creating binaries. Most of the codes are compatible with Unix so MakeFile will be very helpful. It will not be much of a task since you have enough contributes.

@KarthikNayak
Copy link
Member

@indrajithi First off, The repo is not mine, it belongs to FSMK, so all credit goes to the team. I'm just one of the maintainers :)

Having a Makefile to compile .c or .cpp files isn't the problem. That should be simple. The idea of the Repository is to have a well documented Lab Manual (Correct me if I'm wrong). So moving code from the .md to their own respective files either means :

  1. Have code repeated in the .md and the .c / .cpp file. The problem with this is that if someone modifies either of the files the other file needs to be updated too.
  2. Have only .c / .cpp files and find a way to include them into the .md files. Which currently is not possible, due to lack of support from Github.

So I'm trying to see if we could come up with a nice scheme to have source code directly accessible while keeping the documentation as it it.

@cyberhck
Copy link
Contributor

cyberhck commented Jun 1, 2016

I'd say, have multiple files, like 5a.md and 5a.c (or) 5a.cpp now we can write explanation on markdown, and maybe can generate documentation if we use correct format while writing comments. Now we can anyway link it to part of a file which is well supported in Github, we can always have a little bit of snippets here and there, which shouldn't be a problem :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants