- I don't understand why you'd want more than one type of
Handler
perReader
, so why not addHandler
toReader
's constructor with an optional concurrencyint
onReader
? - A
HandlerFunc
function type would be a nice alternative interface for stateless handlers or closures. - Graceful shutdown is confusing and awkward. A (non-blocking) 30 second sleep in
Stop
must be followed by blocking on theExitChan
(which should be astruct{}
)? Why not simply makeStop
block until handlers have exited gracefully? Reader.Configure
is awkward, but makes sense if you want to provide validation forReader
fields. However, it seems strange to make the fields public and provide a setter with no indication which is the proper mechanism to use.- Perhaps a separate
ReaderConfig
type (liketls.Config
) which could be built as a struct literal and passed toReader.Configure
(or a constructor?) would allow for validation and public fields. - Proper
Reader
initialization is non-obvious. I *t
This file contains hidden or 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
#!/bin/bash | |
COUNT=1 | |
FILE=$0 | |
# run this script with bash | |
# i bet you can't predict the outcome | |
function printsleep { | |
echo COUNT=$(( COUNT++ )) | |
echo printsleep >> $FILE |
This file contains hidden or 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
#!/bin/sh | |
### | |
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer) | |
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos | |
### | |
# Alot of these configs have been taken from the various places | |
# on the web, most from here | |
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx |
This file contains hidden or 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
/************************************************************************************************* | |
UTF-8 validation test | |
UTF-8 is used for encoding text, which means, mapping the bytes in a file to meaningful characters. | |
ASCII is the classic, once ubiquitous encoding in the western world. It uses a single byte per | |
character, and uses only the lower 7 bits of that byte. It can only represent the characters on a | |
US keyboard (as well as tab and carriage return etc). Other encodings exist which also use a single | |
byte per character, but use all 8 bits, like ISO-8859-1, or use multible bytes per character, like | |
UCS-32 which always uses 4 bytes per character. These encodings can represent many more characters, | |
such as accented ones. |
This file contains hidden or 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
1. Monolithic applications and architectures can vary in their monolithness. This is an under-specified description. | |
2. Microservice applications and architectures can vary in their microness. This is an under-specified description. | |
3. Microservices and monolithic architectures have both benefits and disadvantages. | |
4. Organizations will exploit those benefits while working around any weaknesses. | |
5. Success of the business is a large influence on the exploitation of benefits and implementation and costs of workarounds. | |
6. All benefits and work arounds are context-sensitive. Meaning that they are both technically and socially constructed by the organization that navigates them. | |
7. Path dependency is a thing. History matters and manifests in these architectural decisions and evolution in an organization. | |
8. Patterns exist to inform practice, not dictate it. Zealous adherence to an architectural pattern brings peril when it is to the exclusion of cultural context in actual practice. | |
9. Architectural patterns w |
Rich Hickey • 3 years ago
Sorry, I have to disagree with the entire premise here.
A wide variety of experiences might lead to well-roundedness, but not to greatness, nor even goodness. By constantly switching from one thing to another you are always reaching above your comfort zone, yes, but doing so by resetting your skill and knowledge level to zero.
Mastery comes from a combination of at least several of the following: