PHPAlgorithms – PHP algorithm and data structure library
1–10 of 21 posts
Re: PHPAlgorithms – PHP algorithm and data structure library
#2Re: PHPAlgorithms – PHP algorithm and data structure library
#3Then I might use one of them in the future.
But pulling in thousands of lines of code by someone from the internet is nothing I would ever do. Because I cannot review it all to be sure it is not malicious. Reviewing a single file without dependencies is something I might do.
Re: PHPAlgorithms – PHP algorithm and data structure library
#4I think it would be better to publish the individual structures as standalone files without dependencies. Then I might use one of them in the future. But pulling in thousands of lines of code by someone from the internet is nothing I would ever do. Because I cannot review it all to be sure it is not malicious. Reviewing a single file without dependencies is something I might do.
Re: PHPAlgorithms – PHP algorithm and data structure library
#5I think it would be better to publish the individual structures as standalone files without dependencies. Then I might use one of them in the future. But pulling in thousands of lines of code by someone from the internet is nothing I would ever do. Because I cannot review it all to be sure it is not malicious. Reviewing a single file without dependencies is something I might do.
It makes more sense you keep only the files you need, I do not understand how exactly the author should bundle this OOP using algorithms in 1 source file that will satisfy everyone requirements and at the same time won't contain some code you won't use.
Re: PHPAlgorithms – PHP algorithm and data structure library
#6I think it would be better to publish the individual structures as standalone files without dependencies. Then I might use one of them in the future. But pulling in thousands of lines of code by someone from the internet is nothing I would ever do. Because I cannot review it all to be sure it is not malicious. Reviewing a single file without dependencies is something I might do.
Re: PHPAlgorithms – PHP algorithm and data structure library
#7Earlier quoted context omitted.
It makes more sense you keep only the files you need, I do not understand how exactly the author should bundle this OOP using algorithms in 1 source file that will satisfy everyone requirements and at the same time won't contain some code you won't use.
That is kind of what I am doing myself, still learning some concepts so the code is not very reliable but merely educational. https://github.com/sh4ka/coding-exercises
Re: PHPAlgorithms – PHP algorithm and data structure library
#8Earlier quoted context omitted.
It makes more sense you keep only the files you need, I do not understand how exactly the author should bundle this OOP using algorithms in 1 source file that will satisfy everyone requirements and at the same time won't contain some code you won't use.
That is kind of what I am doing myself, still learning some concepts so the code is not very reliable but merely educational. https://github.com/sh4ka/coding-exercises
- use a good linter and fix all warnings you get from it if possible
- use code formatting so all your code has the same formatting
- you put the isDead function in the Piece class and pass the board object, IMO it makes more sense to put it in the Board class or even better make a Game/Puzzle class , then you can reuse the Board and Piece unchanged when you implement different rules but the board and pieces are the same.
Re: PHPAlgorithms – PHP algorithm and data structure library
#9I think it would be better to publish the individual structures as standalone files without dependencies. Then I might use one of them in the future. But pulling in thousands of lines of code by someone from the internet is nothing I would ever do. Because I cannot review it all to be sure it is not malicious. Reviewing a single file without dependencies is something I might do.
Re: PHPAlgorithms – PHP algorithm and data structure library
#10I think it would be better to publish the individual structures as standalone files without dependencies. Then I might use one of them in the future. But pulling in thousands of lines of code by someone from the internet is nothing I would ever do. Because I cannot review it all to be sure it is not malicious. Reviewing a single file without dependencies is something I might do.
In this case, if the datastructure or algorithm were useful to your project, you could: 1. Not use the algorithm / data structure at all, resulting in worse performance. 2. Hand roll your own version which is more likely to have improper implementation issues than an OSS version, likely resulting in performance or security issues and wasting your time. 3. Use the OSS version which is likely to have bugs / errors / security issues already solved.