justasitsounds
> Why a function that takes an Actor instead of each Actor being a type that implements a receive function?
That function is a method with receiver type `Actor` - IE `Actor` implements this HandleMessage function.
Granted it is exactly equivalent to ``` func HandleMessage(a *Actor, from gen.PID, message any) error { ... } ```
But I'm happy sticking with composition over inheritance
If you value periods of deep focus or 'flow' then believe me, having concise, accurate documentation that explains why, how and what you are building pays off - if only to help you separate the planning from execution process in your own workflow. I don't think any moderately complex software can be written without some degree of planning - but maybe your experience differs
Almost 1% of US citizens are in prison. Your police forces routinely brutalise and oppress large parts of your population even though (or perhaps because) you are all armed to the teeth. The majority of your fellow citizens are a couple of paychecks or one health scare away from homelessness, your social security safety nets are in tatters and your collective Labour rights have been eroded away over the last 50 years. Thank goodness you've got your guns or your government might screw you over
Not when the government has tanks, attack helicopters and assorted hardware that IS prohibited for the public to own
> A more modern example was the prohibition of the free movement of the Australian population during covid. Australians were held prisoner by the state and were not permitted to leave.
Not true. You could leave and you could also enter - but would have to stay in mandatory quarantine.
This guy (https://www.youtube.com/watch?v=tMLu9Dtw9yI) makes some good points about how cheap and scalable the technology is for medium-scale energy storage. It uses tried and tested, reliable and simple components for example
Back in 2001 I worked for a 'Medical Communications' company, building marketing websites for various drugs companies. I was young, it was my first coding job and I desperately needed the money
I even ended up building an internal marketing website for use by sales reps pushing an antidepressant. It was an awful PoS, technically, but it had a basic CMS system and I was flown to the US (from the UK) to show the very friendly team at the drug company how to use it. I was fairly blasé about the ethics of it - they paid a lot of money after all. The drug in question was later removed from the market after it was found to increase suicide risk.
14 years later, my mother had maxxed out on the same kind of anti-depressant. She kept relapsing and the doctors kept upping the dose until they couldn't prescribe her any more. She took her own life shortly after.
Not so long ago, I interviewed a candidate for a data engineer position at the 'FinTech' I was lead engineer at. He turned us down because he didn't like the CTOs attitude towards the credit data we were collecting about our customers. Until that point I hadn't really considered the ethics of what we were doing, again. I started looking for another job the same day.
Something like: Pikes law of unfavourable comparison OR HN Golang oxidation rate
What you do in response to such an event is entirely up to you
I especially like that there's an ascii renderer for the sequence diagrams that makes embedding them in Readme's very easy
[0] http://plantuml.com/ [1] http://plantuml.com/activity-diagram-beta [2] https://github.com/RicardoNiepel/C4-PlantUML [3] https://marketplace.visualstudio.com/items?itemName=jebbs.pl... [4] https://hub.docker.com/r/plantuml/plantuml-server/
I'm sorry that this will come across as rude, but I feel like you're repeating something you've heard but didn't quite understand.
You're right, it does come across as both rude and condescending, and you know it, so don't apologise. In my previous post I hinted that the name of the function should "describe what the function does", which is the same as "describe the intention of the function", because if the function doesn't do what it's intended to do, that's a bug.
`is_foolike` to me, implies `test_for_abstract_quality_foo`. `starts_with_foo` implies an assertion a string beginning with a particular prefix If we're representing beverages as strings which are somehow guaranteed to begin with "co2" if the beverage is carbonated, and we've decided that the deserialization should be mixed into your "high-level, in your business domain", the program is so badly written that we're not going to get any truths about good programming from it
I feel like you're intentionally misunderstanding my point. Please don't critique my entirely fictitious codebase as if it represents anything other than an abstract example. The point being that even though, in this (again) entirely fictitious example, the implementation is very simple, the intention of the method is different from it's implementationAt a high-level, in your business domain, you generally write your code to hide the implementation details and to describe the intention of the method EG. `is_carbonated`
if is_carbonated(beverage):
beverage.jiggle(false)
vs if beverage.startswith("co2"):
beverage.jiggle(false)
(edit) for formattingHowever, the author of the code may have started with a much more complex implementation but still feels like `is_foolike()` is better at describing the _intention_ of the method than the eventual implementation.
Replacing the descriptive method name with the actual implementation may mean the author now feels that they have to append a non-functional comment to explain that in order to test for foo-ness one only needs to do a simple string-prefix match.
(edit: 'I')
Personally I am pro-choice, but if you are really pro-life you cannot morally allow for exceptions in the case of rape or incest- unless of course your stated agenda isn't the same as your real agenda
I didn't include post-deployment end-to-end tests in the 5 minute figure, but technically speaking, we do deploy that quickly
AWS announced 'native' Golang support last year - since then there hasn't been a need to use a Python or node 'shim' to bootstrap the golang executable like this. You just upload your compiled binary to S3 and provide the path to AWS lambda