5,109 karma · joined Jun 27, 2012 (14y ago) · 1,639 submissions
comment 8y ago · link · parent
class Foo(var thing: Int?) {
fun doSomething() {
if (thing != null) {
thing++
}
}
}
is unsafe as any class user could cons up a Foo t, and call t.doSomething() while racing a modification to t.thing in another thread. There either needs to be a language feature for Foo to live in a restricted threading context or the whole construct is irreparably thread-unsafe. The error is valid because it rejects always-incorrect code.comment 8y ago · link · parent
Agree about the shadowing.
var x_2 = f(x_1) // never use x_1 again for anything
deserves its own syntax and compiler checkscomment 8y ago · link · parent
It's mostly the Nokia parts that I really love, like the transit app, and the fact that it's user-serviceable with minimal tools.
The app ecosystem is actually less of a problem as time goes on; now that Apple and Google ship reasonable browsers in their phones most services I want to use have good mobile web experiences. The real essentials like Pandora / Kindle / WhatsApp are available and still work.
The big pain point for me is Slack's web client, which appears to be gratuitously broken on phones.
comment 8y ago · link · parent
Prepper food isn't really practical unless you've got 100 people to feed and can genuinely use industrial food in industrial quantities.
comment 8y ago · link · parent
f(g())
it's just syntax sugar for var temp = g()
f(temp)
Now at least programmers aren't tempted to do gratuitous function nesting rather than introducing a variable just to avoid cluttering code with an unimportant type name.comment 8y ago · link · parent
comment 8y ago · link · parent
https://fredrikdeboer.com/2017/03/29/why-selection-bias-is-t...
comment 8y ago · link · parent
comment 8y ago · link · parent
The rule is roughly "narrow targeting, cheap impressions, reasonable frequency, pick any one". A shady ad agency (but I repeat myself) will never pick "reasonable frequency" because their advertisers aren't sophisticated enough to ask if their ad is being sent to one person 50 times in a day.
It only takes one buyer to not set the frequency control option to spam you with the same ad over and over -- everyone else is one-and-done.
comment 8y ago · link · parent
Spending 2 years learning how to interview when you could have been spending 1.96 years getting passably good at something and 2 weeks on interviewing is madness, though.
comment 8y ago · link · parent
Seriously, what is it with embedded digital electronics designers and beeping? Nothing else has a gratuitous noisemaker. I swear if the home refrigerator was invented after the cheap piezo buzzer it would emit an ear-piercing bleep every time the door opened, or maybe when the compressor cycled on or off.
Is there some sort of strange subsidy or tax consequence so that adding a beeper has negative net cost?