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

[Concept]: Basics #366

Merged
merged 3 commits into from
Apr 17, 2024
Merged

[Concept]: Basics #366

merged 3 commits into from
Apr 17, 2024

Conversation

glaxxie
Copy link
Contributor

@glaxxie glaxxie commented Apr 9, 2024

  • Basics for PowerShell : short history, introductions
  • Concept exercise : classic lasagna exercise
  • Extra: eternal links for related concepts mentioned

- Basics for PowerShell : short history, introductions
- Concept exercise : classic lasagna exercise
- Extra: eternal links for related concepted mentioned
@glaxxie glaxxie added Work In Progress When assigned to someone... (Work In Progress->Need Code Review->Ready for Master) x:module/concept Work on Concepts x:module/concept-exercise Work on Concept Exercises labels Apr 9, 2024
Copy link
Member

@IsaacG IsaacG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How much English nit picking and wording suggestions do you want?

@@ -0,0 +1,5 @@
{
"blurb": "PowerShell is a task automation and configuration management program from Microsoft, consisting of a command-line shell and the associated scripting language.",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've never heard a shell described this way before

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I lift this one straight from Wikipedia for a quick blurb 😆


### Constants

Constants in PowerShell are read-only variables that can't be **removed** after defined.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This implies they can have their value changed, just not removed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought the read-only mention already addressed that? But yeah I could change the wording here

## Functions

Functions in PowerShell are defined using the `function` keyword.
Each function can have zero or more formal parameters in `()` parenthesis, followed by its own scope start with `{` and end with `}`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Each function can have zero or more formal parameters in `()` parenthesis, followed by its own scope start with `{` and end with `}`.
Each function can have zero or more formal parameters in `()` parenthesis, followed by its own scope start with `{` and end with `}`.


`basics`:

- function definition & `return` keyword
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- function definition & `return` keyword
- function definition and `return` keyword

- single line comments
- updating variable values
- using functions
- variables, variable assignment, & variable naming
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- variables, variable assignment, & variable naming
- variables, variable assignment and variable naming

Use of the Oxford comma should be consistent

Copy link
Member

@BethanyG BethanyG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent work! I've left suggestions/comments mostly on the about.md file, with the same comments applying to where about.md overlaps with the introduction.md files. Most of these are suggestions - so if they don't sound or feel right to you, please feel free to ignore them. Except for the change from Python --> Powershell in the config.json. 😉 That you probably want to make. 😄

@@ -0,0 +1,88 @@
# About

PowerShell is a dynamically implicit typed (also support strongly typed variables) scripting language from Microsoft, mostly focus on task automation and confifuration management.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
PowerShell is a dynamically implicit typed (also support strongly typed variables) scripting language from Microsoft, mostly focus on task automation and confifuration management.
PowerShell is a dynamic and implicitly typed (_but also supporting [strongly typed][strong typed] variables_) scripting language from Microsoft, mostly focused on task automation and configuration management.


PowerShell is a dynamically implicit typed (also support strongly typed variables) scripting language from Microsoft, mostly focus on task automation and confifuration management.

PowerShell supports imperative, functional, object-oriented programming, and even pipeline style.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
PowerShell supports imperative, functional, object-oriented programming, and even pipeline style.
PowerShell supports imperative, functional, object-oriented, and even pipeline style programming.

PowerShell supports imperative, functional, object-oriented programming, and even pipeline style.

PowerShell was built on the .NET platform and first released in 2006.
It has been included by default in all modern Windows OS, and can be installed on Mac and Linux.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
It has been included by default in all modern Windows OS, and can be installed on Mac and Linux.
It has been included by default in all modern Windows OS, and can also be installed on Mac and Linux.


There are two common ways to define a variable in PowerShell.

Varible name in PowerShell must start with `$` and using the assignment operator `=` to bind the variable name to a value.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Varible name in PowerShell must start with `$` and using the assignment operator `=` to bind the variable name to a value.
Variable names in PowerShell must start with a `$`, and use the assignment operator `=` to bind the variable name to a value.

System.Double
```

You can also explicitly specify a variable's type if you want to enforce a specific type.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
You can also explicitly specify a variable's type if you want to enforce a specific type.
You can also specify a variable's type explicitly, if you want to enforce/require the value be of a certain type.

## 1. Define constant expected bake time in minutes

- You need to define a constant variable, and assign it an integer value.
- Constant can be defined through [New-Variable cmdlet][new variable].
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Constant can be defined through [New-Variable cmdlet][new variable].
- Constants can be defined through the [New-Variable cmdlet][new variable].


### Constants

Constants in PowerShell are read-only variables that can't be **removed** after defined.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Constants in PowerShell are read-only variables that can't be **removed** after defined.
Constants in PowerShell are read-only variables that can't be **removed** after definition.

### Constants

Constants in PowerShell are read-only variables that can't be **removed** after defined.
This lead us to the second way to define variables using the cmdlet `New-Variable`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This lead us to the second way to define variables using the cmdlet `New-Variable`.
This leads us to the second way of defining variables: using the cmdlet `New-Variable`.

"python/guidos-gorgeous-lasagna"
],
"icon": "lasagna",
"blurb": "Learn the basics of Python by making lasagna."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"blurb": "Learn the basics of Python by making lasagna."
"blurb": "Learn the basics of Powershell by making lasagna."

Comment on lines 13 to 14
- Know how to add one or more `parameters` to a function definition.
- Know that `parameters` definitions can have type annotations.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't see either of these in the exercise instructions, but maybe in the links?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh yeah, that 2nd part should be moved to the advanced function concept.

glaxxie added 2 commits April 14, 2024 21:20
Changes made multiple files regarding the wording based on feedback
Add "basics" slug to concepts array
Copy link
Member

@ErikSchierboom ErikSchierboom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really nice!

@glaxxie glaxxie removed the Work In Progress When assigned to someone... (Work In Progress->Need Code Review->Ready for Master) label Apr 17, 2024
@glaxxie glaxxie merged commit 631560b into exercism:main Apr 17, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
x:module/concept Work on Concepts x:module/concept-exercise Work on Concept Exercises
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants