1,688 karma · joined January 10, 2017
// Alexander Dmitri is property of Gala Corp.
(function (self) {
console.time("lifetime");
try {
while self.alive {
self.wakeUp();
self.doStuff();
self.sleep();
}
}
catch (fatalError) {
console.error(`Whoops! ${fatalError}`);
}
finally {
self = null;
console.timeEnd("lifetime");
}
}(self));If bad code is getting merged, that's tech debt / time someone else is going to have to spend anyway, plus the time needed to identify the issue and triage down the line. I would think it's better investment to use that time up front and help the jumior level up too.
I think nitrogen run off from soil has had quite an impact on changing water habitats as well, eutrophication and fish getting beat out by algae for limited oxygen resources.
Most lazy people I know will stick to manual action rather than take the time to script it out, mostly due to that initial overhead or having to potentially iterate on the logic due to future unknowns.
// absolve previously implemented anti-pattern by recursive reversion of the abstraction inversion
... ok, yeah that was an awkward time in my life now that I remembering it, this is exactly why I stopped listening to Enya while writing code.
Just please don't take the other valuables and ... oh yeah, please don't mess with any of my family members and maybe please let's try to keep it at no more than one hundred people trying at the same time b/c otherwise things might get out of hand.
And speaking of invisible cities, I came across this really neat project a little while ago:
https://github.com/mewo2/deserts/raw/master/novel.pdf
If I remember correctly (don't have the time atm to dig into it again) the project had first trained one net to generate images, then had another one trained on invisible cities to create the descriptions for the images. The above pdf is the output.
The "Popularity Rank on GitHub" is probably more accurately measuring popularity in the popular sense of the word. That's especially true because the GitHub archive used for the data only offers info on public repositories and even then I'm curious to know how it reports for multi-lingual repos (does LOC win out, do repos get associated with multiple languages?).
Personally 90% of my commits over the past year have been to private repos for work. My public commits are in languages I look forward to using and learning outside my 9 to 5 because they interest and they offer a nice change up (ie PureScript and Rust lately).
I'm super stoked to see FORTRAN is riding solidly at 60% for both metrics, regardless of what those metrics truly measure. ~40 public commits in the last 24 hours! Check it out:
https://github.com/search?o=desc&p=4&q=fortran&s=updated&typ...
Off Topic PostThought:
Seeing JavaScript at that top corner and the amazing
surge over the past couple years of Rust has got me
thinking that when it comes to the art of programming
languages, Brendan Eich is a (if not the) seminal
artist of this time period.
Learning JavaScript is when what Dostoevsky,
Kierkegaard, Sartre and Camus were all trying to
communicate really hit home for me. Meanwhile a recent
foray into Rust is reminding me of the first time I
read books like Tolstoy's Anna Karenina, Borge's
Labyrinths and Steinbeck's East of Eden.
To me it's pretty amazing that the same person has
played pivotal roles in two languages that are both a
joy to write and reason with and for completely
different reasons.For context, that's a direct quote from John Ehrlichman who "was counsel and Assistant to the President for Domestic Affairs" under Nixon when Nixon declared the war on drugs. Everything kind of snow-balled from there.
According to the chronology provided by PBS [1], perhaps the first groundwork was put in place by LBJ founding the "Bureau of Narcotics and Dangerous Drugs" in 1968 (campaign year that Nixon won), the timing of which correlates with Nixon's successful campaigning on a "theme to restore 'law and order'"[2].
[0] https://en.m.wikiquote.org/wiki/John_Ehrlichman
[1] https://www.pbs.org/wgbh/pages/frontline/shows/drugs/cron/
[2] https://en.wikipedia.org/wiki/1968_United_States_presidentia...
If Penny is a class, then maybe you're asking what happens when you combine two arrays (or Python lists) of Penny objects? You get one array (list) containing all the Penny objects.
Perhaps you're getting at something like what if you have two "wallet" dictionaries you want to merge?
Let's say each wallet dict has a list of Penny objects, Dime objects, $5 notes, etc. If you are merging the wallets, maybe you don't want to overwrite the first wallet's Penny list with the second wallet's Penny list and instead you want to combine them.
This is where a dictionary comprehension can come in handy. Just iterate on the second wallet's items and add each item's value to the first wallet's corresponding value at the same key to create a new wallet object (or update one of your two existing wallets by setting the wallet equal to the comprehesion). You would have to add additional logic if you had any nested dictionaries in your wallet dictionary or another type that doesn't combine with the + operator, such as sets.
The other case is something like when your wallet gets sent off to the thief api. To make this more Pythonic, let's say you have a cached idea of your wallet's contents before your wallet itself is sent over the api. Once your actual wallet comes back and you pull it out to pay for something and realize it's empty, you merge the wallet you're holding with the cached idea of the wallet in your head, effectively updating the wallet to empty. If the key values are still on your returned wallet's dict, just now they're a bunch of empty lists as values, this will work fine:
cached_wallet.update(my_wallet)
However, if the key value sets are removed entirely from the wallet returned by the thief api, you'd probably be better off doing: cached_wallet = my_wallet
This is because in Python the first example would have no affect on your cached idea of the wallet because an empty dict passed to the update method will not modify the dict you're attempting to update. So actually the second approach is much more robust here, unless of course it's problematic for some other part of your system to have a keyless wallet floating around (although I'd suggest fixing those other parts of your system by having defaults in place).You could also use a dictionary comprehension in this case, making use of the get method with defaults while iterating on the emptied wallet you're holding like this maybe:
cached_wallet.update({
k: my_wallet.get(k, type(v)()) for k, v in cached_wallet.items()
})
If the thief put a new key value pair in your wallet, you wouldn't get it in the above comprehension, so you might want to do this in some cases: cached_wallet.update(
**{ k: my_wallet.get(k, type(v)()) for k, v in cached_wallet.items() },
**my_wallet,
)
Although that may be called out as more expensive/redundant than necessary, you may want to combine the .keys() from both dictionaries, cast them as a set to dedupe then iterate through the actual wallet on those and fuck all, you're tossing the dirty tissue he stuffed into your wallet in the garbage anyway ... but then actually you decide to keep it, there may be DNA evidence here ... you have no idea how you're going to actually parse and apply this evidence and it's kinda disgusting and, ugh, get a hold of yourself, toss that out and go wash your hands and then focus on making sure the credit cards that are missing are canceled and hope to God that updating your card number on your Fubo TV streaming account doesn't invalidate your legacy subscription that lets you watch the Barcelona game each weekend for $10/mo because there's no way in hell you're going to start paying them $40/mo, that's bullshit.It doesn't necessarily have to be a pop up popup per say, but extra validation around dangerous actions is user friendly.
And of course there can always be an override for the extra validation in case it potentially screws up some people's workflows, but I'd make a user explicitly set the override, like the 'NoHostAuthenticationForLocalhost' option in ssh for example.
"In general it's usually a Sith that speaks in absolutes."