Daily Learning Flashcards

1
Q

what is a magic method

A

dunder methods in a class

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

what is __repr__

A

special/magic method that can be used to print the unambiguous sprint representation of a class)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

what is __str__

A

special/magic method that can be used to return the string representation of a class

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

what is state?

A

a system is stateful if it remembers previous interactions with the system and stores them

In information technology and computer science, a system is described as stateful if it is designed to remember preceding events or user interactions;[1] the remembered information is called the state of the system.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

what is a callable object?

A

an object that implements the __call__ method

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

what objects aren’t callable?

A

the instance of a class, unless it implements the __call__ special method

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are the main components of platform-tools

A

Command
Domain
Providers

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is command?

A

Commands are the UI level of platform-helper.
No business logic exists in commands
Each command has an associated domain
CLI arguments for a command are pulled in via click and passed to the domain along with any dependencies

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

what is a domain

A

domains are where the business logic for a given command lives
each Domain is a class

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

what is a provider

A

Common/reusable emements should be implemented in a provider
providers are groups of similar logic that are linked by the resource/tool/think they use rather than the result of what their action is
e.g., I have a METHOD that lists THING from the THING-SERVICE AWS using a boto3 client
This method is not specific to the DOMAIN so it should go into the THING-SERVICE provider

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

List the platform-helper commands

A

ommands:
application (Deprecated) [DEPRECATED] Application metrics.
codebase Codebase commands.
conduit Opens a shell for a given addon_name create a conduit…
config Perform actions on configuration files.
copilot
database Commands to copy data between databases.
environment Commands affecting environments.
generate Generate deployment pipeline configuration files and…
notify Send Slack notifications
pipeline Pipeline commands.
secrets
version Contains subcommands for getting version information about…

How well did you know this?
1
Not at all
2
3
4
5
Perfectly