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

What makes a good PR for WinFile? #88

Open
craigwi opened this issue Apr 12, 2018 · 21 comments
Open

What makes a good PR for WinFile? #88

craigwi opened this issue Apr 12, 2018 · 21 comments

Comments

@craigwi
Copy link
Contributor

craigwi commented Apr 12, 2018

Hi Folks,

First, I want to say thanks! I am amazed and impressed by the number of people who care about this old tool. Thanks to those who have contributed even if I screwed up the attribution on Github (see below).

In this "issue" I wanted to give you my thoughts on what makes a good PR and hear what you think.

Thus far there have been several different kinds of PR:

  1. syntactical changes like ^Z, spelling in comments, formatting, naming
  2. results of automated checking tools such as putting parenthesis around macro arguments and fixing compiler warnings
  3. visual changes such as the new icon and about box
  4. changes for other platforms such as mingw (thanks @mattn)
  5. functional changes (small or large) such as cold start window position issue or support for multiple search patterns

My thoughts: I am quite flexible on #1 and #2 and very much prefer them to submitted as separate PR from the other types. This makes it easier for everyone to review and can focus our reviewing time/energy on the more substantial fixes.

Changes to improve the visuals (#3) are great as long as the spirit of the original look and feel is carried forward (more or less). The updated icons and the Visual Styles change, which in the end makes sense, are good examples here.

I like the idea that this work can be used on lots of platforms, but as discussed in some issues the main line code should not suffer or be limited by them. In some cases we probably need a separate branch. I took the mingw changes because it seemed possible to do without impact on the main code. Win31/NT3.5x should probably be in another branch. I'm not sure about WinXP yet.

Functional changes, #5, are the hardest type of PR for WinFile. They are hard because the code is old and had many, many authors (before us) working on it for many years. They are hard because there are lots of gotchas in the code, hard because some of the code is just too complex, and hard because it doesn't use modern languages or libraries.

To make a good PR which changes the functionality, that fits into the style of the code, and doesn't introduce other problems takes a lot of effort to get right. Take @tig's simple one line change which was PR #46. WinFile uses default coordinates in an odd (old) way and the fix for the real bug found was different than suggested.

Questions:

  • Can we keep PR focused on one type and one issue at a time?
  • I've added a label "fixed differently" and just fix things based on the good ideas you have; would you rather I approach this differently? If so, specifically how?
  • When I make a change based on one of your PR and "fixed differently", how would you like the attribution to work? It appears that I'm not doing it to everyone's satisfaction.
  • Other comments?

Thanks,
Craig.

@T8z5h3
Copy link

T8z5h3 commented Apr 12, 2018

Craig i was going to write something about this today...
i been thinking about what this program was built for and really this was explore.exe before there was a
explore.exe and so from that bases what does this program need to do:
-Manage Folders (create,delete,set permissions)
-Manage Files (move,copy,delete)
-Manage Premissions (add and remove/set and remove owner)
-format disks
-move between drives and folders
and do it well keeping the look and feel of the classic app.

but as users we need to balance the last list of items with are "new expectations"
for example the menu item that does floppy disk formatting that should be a system call and let the o.s. do it.
or compressing a file to me means the .zip wizard should be called.

so logically we may need to branch this thing to be 3.11, 95/98/ME, NT/XP,7/8 (8.1), 10 (the branch for 8 and 8.1 may fit with 10 )

lets have the mind set of what would it take for this program to replace explorer.exe with in the confines of a file and folder navigator,creator,mover and manager.

thanks,
Nathan Saunders

@tig
Copy link

tig commented Apr 12, 2018

While I have opinions on C/C++ coding styles (e.g. I prefer 4 spaces vs. tabs and C&R bracing), I care more about consistency. Craig, what are your preferences?

@ZanderBrown
Copy link

I think we should also try to keep as much of this in C rather than C++

@T8z5h3
Copy link

T8z5h3 commented Apr 12, 2018

@ZanderBrown i completely agree lets try and keep as much original code as it seems logical

@tig
Copy link

tig commented Apr 12, 2018

To be clear, I'm not advocating for (or against) C++. I'm just asking about things like tabs vs. spaces and curly braces. The current source is wildly inconsistent.

@leeter
Copy link

leeter commented Apr 12, 2018

This entire project is already compiling as C++ AFAIK; I think the C vs. C++ issue has already sailed. I suggest we get to modern and safer idioms iteratively.

@matthewjustice
Copy link
Contributor

+1 in favor of 4 spaces rather than tabs. For indentation I prefer Allman style over K&R, but I agree that consistency is the main thing. I'm also partial to C over C++, in keeping with the spirit of the codebase at the time, but I understand the argument for C++ as well.

@ZanderBrown
Copy link

suggest we get to modern and safer idioms iteratively

Which doesn't require porting to C++

I'm not suggesting we avoid C++ or port the existing C++ to C but as @matthewjustice said it's " in keeping with the spirit of the codebase" to use C where possible

@craigwi
Copy link
Contributor Author

craigwi commented Apr 12, 2018

Regarding spaces/tabs, I like 4 spaces and the Allman bracing style. I agree the code is inconsistent. Some I inherited, some I probably am responsible for...

+1 on the "keeping with the spirit of the codebase". That said, we should probably go with one spacing/bracing style. If we can agree on one, I would be fine with one big PR to fix it all one way.

@NazmusLabs
Copy link
Contributor

It would be neat if we can the branch for older versions of Windows WinFike 9.x.

The version number clearly implies it's older than V10.x, but definitely newer than the original v4.0 that was part of NT4

Plus, version 9.x is a nice little ode to Windows 9x which this branch also aims to support.

@EndeavourAccuracy
Copy link

EndeavourAccuracy commented Apr 12, 2018

I'm just asking about things like tabs vs. spaces and curly braces.

I'm not a contributor, but to chime in regarding tabs versus spaces...
While subjective, this document could provide some context.
Among other things, it mentions (and sources) the Microsoft code convention; 4 spaces.

NazmusLabs added a commit to NazmusLabs/winfile that referenced this issue Apr 19, 2018
The issue thread microsoft#88 offers some great points on what makes a good pull request. However, it is buried under a lot of different issues and can be difficult to reach, especially for new contributors who might not know this discussion exists. As such, I felt it necessary to add a direct link to the thread under the "Contributing" section of the readme file.
craigwi pushed a commit that referenced this issue Apr 22, 2018
The issue thread #88 offers some great points on what makes a good pull request. However, it is buried under a lot of different issues and can be difficult to reach, especially for new contributors who might not know this discussion exists. As such, I felt it necessary to add a direct link to the thread under the "Contributing" section of the readme file.
@ZanderBrown
Copy link

39075568-4932fc10-44ee-11e8-8418-1606c7e29f6f

WinFile OS support

@craigwi
Copy link
Contributor Author

craigwi commented Apr 23, 2018

As an example of how difficult changing WinFile can be, see PR #108. I like, support, and want to encourage @matthewjustice's work. I have already taken several PR from him. I will also take the PR referenced once a few more issues are addressed.

@clzls
Copy link
Contributor

clzls commented Apr 29, 2018

But which kind of PR are updates of translations and adding new languages belongs to? Visual changes? or a new one?

@ZanderBrown
Copy link

When @craigwi posted translations hadn't started yet so I'd say they would be category 6

@NazmusLabs
Copy link
Contributor

Yes, I agree. Translations would best fall under a separate, 6th, category.

@craigwi
Copy link
Contributor Author

craigwi commented Jun 30, 2018

Commit 342b113 is another example of change type 5. It took me several hours to research the issue and find a simple solution that fit into the exiting patterns in the code, to add and fix some comments, and fix a latent bug (in LoadDesc).

@robinhood2014
Copy link

Awesome! I just wish we could replace Windows 10's File Explorer with this one. File Explorer is kinda bloated IMO. Sometimes you just need simplicity, and that's what WinFile provides. Also, I'd like to see this one ported to Linux and maybe macOS as well.

@gMagnus87
Copy link

Windows 3.11 was the first version I had on my own PC. So I love these kinds of mini projects. Thank you very much.

I would love that the original behavior of the MDI Child could be recovered, since from W9X these become title bars when they are minimized, which not only does not coincide with the original but also makes it impossible to read the element correctly.

imagen

@ZanderBrown
Copy link

This is an issue for Windows itself, not WinFile

(don't disagree with you, the tiles where better)

@gMagnus87
Copy link

This is an issue for Windows itself, not WinFile

(don't disagree with you, the tiles where better)

Yes I know, maybe it can customize the behavior of the MDI Child instead of using the default by Windows.

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

No branches or pull requests