[1] Something akin to https://www.evernote.com/shard/s9/res/11fab8e3-d623-4b58-a8d.... I'm sure there are libraries out that that will do this for you, but the algorithm in that paper isn't too hard to implement. :)
62 karma · joined November 2, 2010
[1] Something akin to https://www.evernote.com/shard/s9/res/11fab8e3-d623-4b58-a8d.... I'm sure there are libraries out that that will do this for you, but the algorithm in that paper isn't too hard to implement. :)
// In Java, all instances of Object are also a monitor.
// See https://en.wikipedia.org/wiki/Monitor_%28synchronization%29
Foo myMonitor = new Foo()
// To "enter" a monitor, you use 'synchronized'.
synchronized (myMonitor) {
// Inside the monitor, we could do a Thread.sleep.
Thread.sleep(100);
}
This is a very simplistic problem case. However, it is very possible for this to become a bigger problem. Because I can call arbitrary code when "inside" a monitor, it is very possible to call a method that does a sleep incidentally. (e.g. many implementations of IO operations will require some sort of sleep.)As someone who knows very little of Buddhism, what sorts of "reincarnation credentials" is an executive-level reincarnate supposed to have? Is this like claiming to have an MBA but leaving out the University of Phoenix part?
"If Lustig is right, it would mean that sugar is also the likely dietary cause of several other chronic ailments widely considered to be diseases of Western lifestyles — heart disease, hypertension and many common cancers among them."
I can't tell if this is the author of the article extrapolating sugar's toxicity to explain the root of all ills, or whether Lustig makes that assertion. Either way, there doesn't seem to be anything more than postulation on that front. I'm hoping the purported science behind this theory is actually sound and not just fluff so that we get into arguments about sugar based on incorrect assumptions.
Let's consider the assumption that between 36% and 45% of all undergrad students are slackers. Sure, a bunch of students aren't learning because they are slackers, but why there are SO MANY of them? Are there more slackers as a percentage of the population than in the past? Is the internet/cell-phone/facebook era changing the mentality of students to be more focused on the short term easiest/best solution? Or maybe the percent of slackers in the general populace is the same, but a much larger percentage of secondary students go on to undergrad. Well, why are so many more going on in school, especially those that are slackers? Parental/societal pressures might suggest that going to college is just "what you do" after high school. Or maybe peer pressure makes students continue in through school because their peers expect it of them. Perhaps it is sheer inertia that is the driving force; our slackers do whatever is the most expedient at the moment, so when the time comes they'd rather go to a generic college with an undecided major than to go and do something.
Or, (and I like this theory the most), students feel a need, from an economical perspective, to get a degree in order to get a job. And then they go to school, with the singular goal of earning that piece of paper so they can get a job. At this point, "slacker" has been forced into the role by going to school just to be able to get a job afterwards. It's a means to an end, and incidental value is just that. At this point, it isn't just the college's fault, but the general expectations of employers. Why do you require a college degree? Is knowing the theory essential to doing the work or save a substantial amount of training or ramp-up time?
2) I can't tell from the article whether these statistics were actually influential in determining the students' scores on the test. I totally agree that this doesn't translate well between different majors. If the scores were affected by answering this question or the one about study habits or probably a number of others, then I don't really see the point of the study. They started from some sort of "if people take easier* classes, then they aren't as intelligent" baseline and then showed that people take easier* classes...
* "easier," by their definition, has something to do with writing X pages or reading Y pages.
Plus there is the whole time scale thing. The fact that evolution took a really long time to differentiate polar and grizzly bears and in a few lifetimes you would see that split undone is concerning.
Science is creative. We just don't usually think of it because science is that crazy thing with math and they like have this "scientific method" that they always follow. But why are experiments actually being carried out? Maybe someone has a crazy theory that under the right circumstances, a liquid can have 0 viscosity and start defying gravity. Or that there are forms of life that don't even need Phosphorous, one of the "key ingredients" to life.
Since it is open source, Diaspora could probably use the writers of these critique pieces (bad design, security holes, etc.) to actually make a better product.
(Tangentially, why are there so many blog posts about Diaspora's code? Is the code actually unforkable? Or is it just because Diaspora painted itself into a corner promising a secure social network on a relatively quick timeframe and now everyone wants to prove them wrong?)
If you find yourself wanting to pass in Collection<Firetruck> to a method that only accepts Collection<IVehicle>, this usually means that the method isn't correctly typed. The rule of thumb for using 'super' and 'extends' is "Producer extends, Consumer super" or PECS. By applying this, the typing problem should go away, as your method is now accepting Collection<T extends IVehicle> and possibly returning Collection<? super T>, so you can both pass in your Collection<Firetruck> and reassign to a different variable of type Collection<Firetruck>. :)
(I think Josh Bloch wrote up a decent blog post about the PECS principle a couple of years ago. It might be worth reading for more information.)