Superman vs. Muhammad Ali
Interfaces for presenters in MVP are a waste of time!
Sealed (Class) with love
Model–view–presenter
The Principles of OOD
Don't repeat yourself
KISS principle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (c) 2023. Héctor de Isidro - hrules6872 | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env kscript | |
/* | |
* Copyright (c) 2023. Héctor de Isidro - hrules6872 | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (c) 2023. Héctor de Isidro - hrules6872 | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
Pull Requests became popular for two reasons:
- Asynchronous communication. Developers can review and respond at any time, allowing them to continue development without interruption and review PRs when they come to a natural pause in their flow.
- Quality Assurance. Reviewing and testing code before it hits the target branch ensures that the target branch stays clean.
- Authoring
- Keep them small: it's very tempting to rewrite, refactor, boy scout and reformat the code as you develop but in general, it's best not to do it all at once.
- Perform a Self-Review: although it's very tempting to just dump your changes in a PR and let other people find the mistakes, create a draft PR and do a full review yourself. You can also use this “self-review” to point things out to your reviewers.
- Create a meaningful title: keep the title short and meaningful and avoid titles generated from the b
"Pair programming is a conversation. You're always talking. You're always explaining. You're always trying to combine your knowledge." - Sarah Mei
- Pair programming is vital for collaborative teamwork and high quality software.
- What it's not.
- It's not as simple as "two people working at a single computer".
- If your pair programming involves arguing, jockeying for position/influence, or trying to prove something, it's not actually pairing.
- If your pair programming involves one person typing while another person silently watches, it's not actually pairing.
- If your pair programming is on a computer where one of you is the "owner" and one of you is the "guest," it's not actually pairing.
- How to pair?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Changes the readable line length in Obsidian Notes. Tested in Obsidian v0.15.9 | |
See also: https://forum.obsidian.md/t/adjustable-readable-line-length/7564/6 | |
Note: For this the "readable line length" property in settings has to be enabled | |
(as expected). 700px width is the application's default, adjust all numbers below. | |
Pixel (or percentage) as a unit enables a width independent from the number of characters | |
(good when adjusting zoom level / font size). For fixed amount of characters use rem */ | |
:root { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (c) 2022. Héctor de Isidro - hrules6872 | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun Modifier.horizontalFadingEdge( | |
scrollState: ScrollState, | |
length: Dp, | |
edgeColor: Color? = null, | |
) = composed( | |
debugInspectorInfo { | |
name = "length" | |
value = length | |
} | |
) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Composable | |
private fun Calendar( | |
modifier: Modifier = Modifier, | |
date: LocalDate | |
) { | |
val firstDate = with(date) { | |
val firstOfMonth = withDayOfMonth(1) | |
val firstDayOfFirstWeek = firstOfMonth.dayOfWeek.value | |
firstOfMonth.minusDays(firstDayOfFirstWeek.toLong()) | |
} |
NewerOlder