p71-23 / Leetcode

Leetcode practice
0 stars 0 forks source link

Compiling and testing instruction #1

Closed guoquan closed 1 year ago

guoquan commented 1 year ago

Wow, you are doing a good job here! Keep going!

To help you audience understand how to use the code in the repo, it would be better to provide a clear instruction. For example, how could one use the code here. That would involve step-by-step instruction to prepare the environment, compile the code into executable (where you may need some other files as an entry point), test run, and collect the results.

This may not be done in a few hours, or days, or weeks... Mess things up is unfavorable in development... I mean, don't let it stop your original exercise. To achieve this, make good use of git. You may need a different git branch where you can work on the instruction and additional requirements, and keep going on with the original exercise on the main branch. When there are significant progress, on the other branch, you can merge them into the main branch. You may consult the following links for good git branching models: https://docs.github.com/en/get-started/quickstart/github-flow https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow https://nvie.com/posts/a-successful-git-branching-model/ But remember, you are the king to make the choice, because this is your repository.

Happy hacking!

guoquan commented 1 year ago

Cool! @p71-23 You are using branch now! But have to remind you that the goal of this issue is to provide usage instruction. Looking forward to any progress here.

guoquan commented 1 year ago

I saw your new commits in #4, and I like the nice introduction about the source of the problem sets and how you organize things. One minor suggestion is, to use a relative link instead of the full HTTP link. That makes life with GitHub easier. You may check out the docs for GH flavored markdown: https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax. Primarily how it converts links: https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/autolinked-references-and-urls.

Anyway, this is minor. However, what I am concerned about the most, is that, programming is not meant for Leetcode only. Your code can be compiled anywhere, executed anywhere, and evaluated anywhere. That means, when I ask for compiling instructions, try to make the most minor limitations and assumptions. @p71-23 Can you provide information on how one can run your solution locally on a desktop or laptop to see what happens?

Feel free to discuss this here or offline.

p71-23 commented 1 year ago

I would like to express my sincere gratitude for your guidance^^!!

I appreciate your advice on learning how to use GIT,which is instrumental in enhancing my learning experience,so I have made efforts to learn how to work on my repository with other "hypothetical" team members.

However,I must admit that I have encountered some challenges in compile instructions you provided.I mainly focused on the methods of how to work out algorithm topic.I have a good understanding of the configuration process for Python and Java projects is complex,so they need more instructions.Currently,I rely on the LeetCode platform for my coding environment,and I am unsure about how to document the process of setting up a local development environment.

Should I provide more information about translaters such as Codeblocks or dexc++?Or would it be more appropriate to break down the algorithms into more detailed explanations and highlighting minor limitations?

I apologize if my previous message was unclear, and I can use Chinese in our future communications if that would facilitate better understanding.

guoquan commented 1 year ago

You've already been learning new tools, working with the new workflow, tackling all the stress, and, what all those deserve, you've been making progress! That is how this exercise is designed to be. So, don't worry about anything you don't know for now. Try to figure it out, and you achieve something more in this exercise.

Looking at the case now, you can't provide the instruction, and, very likely, you don't know how to do it yourself. You are out of ideas on how to setup a local environment for compiling and testing your code. This is usually done by the IDE or OJ platform, where a lot of details are hidden from programmers. However, as a CS student, I strongly encourage you to grasp the basic concepts and understand what happens beyond your mouse click.

The very tool that translates your code into an executable program is a compiler (and NOT an IDE like VS, Codeblocks, or DEV-C++). IDEs are usually shipped with compiler(s) and some other tools and will be using them to create the executables programs. You can find out just the compiler (may depend on the OS of choice) and provide instructions on how people can install it, how they will use it to compile your code, and how they will execute your program. Each step should be just a few lines of commands. IDEs are making it too complicated.

Now you have all the above done, you should know how to provide instruction for others, just because you understand how to do it yourself.

guoquan commented 1 year ago

I can use Chinese in our future communications if that would facilitate better understanding.

Language is a choice of your own as far as your audience can understand. I choose writing English here because difficulty in communication is part of the exercise by design. Thus, please try to bring more communication, don't hesitate to ask anything, and don't wait for an answer.

guoquan commented 1 year ago

关于交流和语言,我担心上面的内容看不明白,再说明一下。

使用什么语言是你的选择,正如你使用中文创建了readme和文件夹,我也并没有提出什么要求。那么只要能达到你的交流目的即可。 我之所以用英文给你写issue和comment,是因为这是挑战的一部分:交流本身是一件困难而不确定的事。别人可能使用你不熟悉的语言,甚至是别人(我)不熟悉的语言。 解决交流问题,就需要更多更成体系的交流。提供交流的背景,询问可能误解的细节,组织不同的内容,适当的求助,只要合理合法而且这个练习(游戏)没有禁止的,均是可以。

guoquan commented 1 year ago

The issue is mostly resolved in #6 and #7, and what remains are consistent improvements (and yes please keep improving it and don't stop here). We can close this issue for now.