Zum Inhalt der Seite gehen

art4 hat dies geteilt


Well, this hits hard on my first day at OpenSSL: If OpenSSL were a GUI
Dieser Beitrag wurde bearbeitet. (4 Tage her)

teilten dies erneut

Als Antwort auf daniel:// stenberg://

@bagder @dascandy Helpful feedback! I will need to ask around internally. Do you happen to have a link to some background on this?
Als Antwort auf Jon Ericson

@dascandy this is a long and old story, I blogged about the API a few years ago: daniel.haxx.se/blog/2021/10/25…

Friendica Developers hat dies geteilt


Hello !Friendica Developers,

I'm testing my Friendica test instance on my server. I noticed some flaws and bugs and reported them on Github. While looking at the code I think there is some minor and major refactoring needed. Where is a good place to meet some maintainers like @Hypolite Petovan to talk about the roadmap? Is this group the best place?

Dieser Beitrag wurde bearbeitet. (2 Monate her)
Als Antwort auf art4 Friendica Developers hat dies geteilt

@art4 @Hypolite Petovan @Friendica Developers concerning refactoring, I guess it is the best to first tell here about what you would like to change.
Als Antwort auf Michael Vogel Friendica Developers hat dies geteilt

@Michael Vogel

Some first thoughts are:

  • fix composer autoloading warnings
  • improve composer autoloading in dev getcomposer.org/doc/articles/a…
  • introduce static code analysis with PHPStan (min. level 2)
  • improve unit tests and mocking (they should run without database or other dependencies)
  • replace (if possible) assertEquals() with assertSame() in tests

This will show us the places that need urgent refactoring. It will improve the parameter and return types and might fix many PHP notices/warnings/errors.

@Hypolite Petovan @Friendica Developers

Als Antwort auf art4 Friendica Developers hat dies geteilt

@art4 @Friendica Developers @Hypolite Petovan this sounds like a reasonable plan. Since you introduced yourself, I possibly should do this as well. I'm no professional PHP developer. I'm working with a different language at work which isn't object oriented. So on the one side I'm a professional - and a rookie on the other side. I still struggle with some concepts in my friendica.
Als Antwort auf Michael Vogel Friendica Developers hat dies geteilt

@Michael Vogel @art4 Please don't shortchange yourself, during recent years you've done leaps and bounds under @Philipp Holzer and my supervision while we introduced new programming paradigms and refactoring concepts to you.
Als Antwort auf art4 Friendica Developers hat dies geteilt

@art4 @Michael Vogel This list looks similar to the one I made for myself half a dozen years ago, and feels extremely ambitious to me. My advice would be to pace yourself, you're dealing with an extensive codebase with a lot of legacy features.

For example, the local Composer binary cannot be upgraded to version 2 because of our reliance on fxp/composer-asset-plugin that enables us to manage frontend dependencies from Composer as well. No version of this plugin exists for Composer 2 and the author has been redirecting people towards one of his more recent projects that inverts the hierarchy by making Composer dependencies available from npm (if I understood correctly).

Similarly, over the past 5 years, I've done some static code analysis and fixed hundreds of warnings using PHP Scrutinizer but I had to stop because of the false positives (see github.com/friendica/friendica…). Similarly, PHPStan will not be happy with many of the remaining legacy files (mainly in the mod/ folder).

Database-less tests would be great, I wouldn't have any idea where to start. @Philipp Holzer did a great job creating the current test framework but any improvement is welcome.

Als Antwort auf Hypolite Petovan Friendica Developers hat dies geteilt

Problem is that the support for Composer 1 will end next year. So we need to do something there. I'm completely lost here.

Concerning the mod files: I think that it should be possible to transform the remaining 7 files without too much problems. Except from photos.php most other are relatively small.

Als Antwort auf Michael Vogel Friendica Developers hat dies geteilt

@Michael Vogel @Philipp Holzer @art4 And item.php?

I'm with you for the replacement of the Composer plugin. I don't want to go back to bundling the frontend libraries with the code, but I have little to no experience with npm or webpack as a replacement.

Als Antwort auf Hypolite Petovan Friendica Developers hat dies geteilt

I refactored item.php several version ago to a level that now the functions are cleaned up. It shouldn't be a problem anymore.
Als Antwort auf Michael Vogel Friendica Developers hat dies geteilt

We should tackle one task after another. The composer v1 is one problem (with a PR for review) we have to solve now. The bower dependency, the possible usage of npm, and the refactoring of the mod folder are another problems.
Als Antwort auf Hypolite Petovan Friendica Developers hat dies geteilt

This list looks similar to the one I made for myself half a dozen years ago, and feels extremely ambitious to me. My advice would be to pace yourself, you're dealing with an extensive codebase with a lot of legacy features.

Don't worry, I'm doing this for many years now and I love it. The trick is to establish processes to reach an minimum code stability. New code must reach this minimum standard and old code can be improved step by step. PHPStan makes this easy with little gamification to reach the "levels" starting with 0.

or example, the local Composer binary cannot be upgraded to version 2 because of our reliance on fxp/composer-asset-plugin that enables us to manage frontend dependencies from Composer as well. No version of this plugin exists for Composer 2 and the author has been redirecting people towards one of his more recent projects that inverts the hierarchy by making Composer dependencies available from npm (if I understood correctly).

No problem, I already created a PR for this problem: github.com/friendica/friendica…

Similarly, over the past 5 years, I've done some static code analysis and fixed hundreds of warnings using PHP Scrutinizer but I had to stop because of the false positives (see github.com/friendica/friendica…). Similarly, PHPStan will not be happy with many of the remaining legacy files (mainly in the mod/ folder).

I already started the refactoring with PHPStan level 0, see github.com/friendica/friendica…

About the folder "mod" and "mods" I'm sure we will find a way to move them into the "src", "view" and other folders.

Database-less tests would be great, I wouldn't have any idea where to start. @Philipp Holzer did a great job creating the current test framework but any improvement is welcome.

The given tests are a great start for me improve and to familiarize myself with the code. I already have some improvements for the tests in mind.

Als Antwort auf art4 Friendica Developers hat dies geteilt

@art4 Thank you so much for the work you've already done!

Small precision: the "mods" folder is independent and doesn't have included PHP code in it. It includes suggested configuration files and a bookmarklet example.

@art4

art4 hat dies geteilt


You can solve sudokus in python packaging.

Not not python code, python packages:
```

[project]name = "sudoku"
version = "1.0.0"
dependencies = [
"sudoku_3_1 == 2",
"sudoku_5_7 == 6",
"sudoku_0_7 == 5"
...
]
```
and the installed packages are the solution.

github.com/konstin/sudoku-in-p…

Dieser Beitrag wurde bearbeitet. (2 Monate her)

teilten dies erneut