Repository navigation
Conversation
…the database' example Santa's Swifty Helper
|
Hello 👋 Thanks for your PR. This repo does not currently have dedicated maintainers. Our cross-track maintainers team will attempt to review and merge your PR, but it will likely take longer for your PR to be reviewed. If you enjoy contributing to Exercism and have a track-record of doing so successfully, you might like to become an Exercism maintainer for this track. Please feel free to ask any questions, or chat to us about anything to do with this PR or the reviewing process on the Exercism forum. (cc @exercism/cross-track-maintainers) |
|
This is an unmaintained repository. Cross-track maintainers - feel free to merge. |
|
Hello. Thanks for opening a PR on Exercism 🙂 We ask that all changes to Exercism are discussed on our Community Forum before being opened on GitHub. To enforce this, we automatically close all PRs that are submitted. That doesn't mean your PR is rejected but that we want the initial discussion about it to happen on our forum where a wide range of key contributors across the Exercism ecosystem can weigh in. You can use this link to copy this into a new topic on the forum. If we decide the PR is appropriate, we'll reopen it and continue with it, so please don't delete your local branch. If you're interested in learning more about this auto-responder, please read this blog post. Note: If this PR has been pre-approved, please link back to this PR on the forum thread and a maintainer or staff member will reopen it. |
Hi! While working on the Windowing System exercise, I noticed a couple of inaccuracies in the examples provided in instructions for resize(to:) and move(to:).
I belive that the current version mixes up variable names and produces contradictory logic based on the exercise’s default screen size (800×600).
Detailed Breakdown
Current Text:
“E.g. if the window’s position is at x = 400, y = 300 and a resize to height = 400, width = 300 is requested, then the window would be resized to height = 300, width = 300 as the screen is not large enough in the y direction to fully accommodate the request.”
The Problem: Given the screen bounds (800×600) and position (x:400,y:300):
Max available width: 800−400=400
Max available height: 600−300=300
If the request is height=400 and width=300, the requested width (300) is already well within the max allowed width (400), so it wouldn’t be clipped by boundary constraints. To demonstrate clipping on the height/Y-axis while keeping width valid, the requested width should be 400.
Suggested Correction:
“E.g. if the window’s position is at x = 400, y = 300 and a resize to width = 400, height = 400 is requested, then the window would be resized to width = 400, height = 300 as the screen is not large enough in the y direction to fully accommodate the request.”
2. In move(to:) (Task 5)
Current Text:
“E.g. if the window’s size is at x = 250, y = 100 and a move to x = 600, y = 200 is requested, then the window would be moved to x = 550, y = 200 as the screen is not large enough in the x direction to fully accommodate the request.”
The Problem: The text uses x and y to describe size. Dimensions should be represented by width and height. Here, 250 represents the window’s width used to calculate the max allowed X position (800−250=550).
Suggested Correction:
“E.g. if the window’s size is width = 250, height = 100 and a move to x = 600, y = 200 is requested, then the window would be moved to x = 550, y = 200 as the screen is not large enough in the x direction to fully accommodate the request.”