Answer the question
In order to leave comments, you need to log in
Where to look for partners for php projects/startups?
There is an idea for many services, and we need people with whom I could implement these ideas, share experiences, and help each other.
However, no one discusses the ideas. The forums discuss the code.
Thinking about it, I realized that ideas are being discussed on Habré. However, they don't often deal with php commerce.
Of course, you can post an announcement in the places of accumulation of php coders, a signature on the forum. Post your engines on github so that you can be found and offered something.
What sites can you recommend?
Answer the question
In order to leave comments, you need to log in
Below are the comments, questions that arose after I ran through the eyes posted on the link in five minutes.
Not about code:
1. Don't use .gitignore. You have README.md~ in your repository
2. You should use markdown in README.md itself
3. What's the commit with the all message?
About the code:
4. As already noted: a big sheet without splitting into functions, which for some reason was stuffed into the main function.
5. The code does not follow PEP8 (set yourself some kind of checker and check the code). In particular, there are a lot of long lines that are very difficult to read, it would be better if they didn’t put the code in main, adding extra 4 spaces to each line, but did without functions at all.
6. There are no comments about the logic of file processing. Perhaps, of course, the logic is simple, but it became lazy for me to delve into, parsing the code.
7. The code below can throw an exception if someone misconfigures the script. Why don't you process this exp, although you catch paramiko exceptions?
Check what you have configured in your script. With so many settings, it is guaranteed that there will be typos, forgotten commas and quotes.
8. Why is the call to getcwd wrapped in str in one case, and not in another? This should be explained with a comment if str is really needed (which I doubt :))
path_local = str(os.getcwd()) + '/logs/' + name_logfiles
path_to_logs_parser = os.getcwd() + '/logs/' + name_parser_logfiles
name_logfiles = file_path.split('/')
name_logfiles = str(name_logfiles[-1:])...
if i - context < 0: j = 0
else: j = i - context
j = i - context if i - context >= 0 else j = 0
# а то и вовсе пишите
j = max(i-context, 0)
logfile = open(path_local, 'r') # open file for read
for line in logfile:
logfile_list_old.append(line)
logfile.close()
with open(path_local, 'r') as f:
logfile_list_old.extend(f)
Ideas are discussed in communities on the topic of the idea itself. It has nothing to do with code.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question