Genann – Simple neural network library in ANSI C - <AUTHOR> https://github.com/codeplea/genann <comment><USER2> This looks like a clearly written, compact, and easy-to-use neural network library. It could be useful for pedagogy, but the README should also mention (unless I missed it) for naive readers that it is pretty much completely inappropriate for production since it uses no vector instructions nor GPU computation. It will be _slow_ compared to any more sophisticated neural network library for anything but the most trivial applications.

For a similar equivalent in Swift see my project: [https://github.com/davecom/SwiftSimpleNeuralNetwork](https://github.com/davecom/SwiftSimpleNeuralNetwork)

<comment><USER3> > _it is pretty much completely inappropriate for production since it uses no > vector instructions nor GPU computation_

Many platforms do not have GPUs or special instructions, for example, at the edge.

<comment><USER2> Sure, but we don't typically do sophisticated machine learning on them. The vast majority of modern CPUs have vector instructions. Even a Raspberry Pi's ARM has NEON.

<comment><USER4> Excuse me if this sounds stupid but, vector instructions are assembly. I know we can use inline assembly or compile and link assembly alongside C but isn't it the compiler that is in charge of using vector instructions ?

IIRC GCC has -mmx, -sse(2|3|4) options to enable this kind of instructions.

<comment><USER2> Sure, if the compiler can find optimizations by inserting vector instructions, it will. But, typically you'll want to specifically format your code using matrices/a library like BLAS to maximize performance and use as many vector instructions as possible.

</comment></comment></comment></comment></comment><comment><USER5> Honourable mention for FANN - Fast Artificial NN, also in C, has a nice set of features and was a pleasure to use.

[https://github.com/libfann/fann](https://github.com/libfann/fann)

</comment><comment><USER6> This is from 2016. Interesting that the authors most recent post is a tool for finding when your projects are being mentioned on HN or Reddit :)

</comment><comment><USER7> Wow! I had to implement a small 3 layer network in C for a class, and it was interesting. It was a ton of work though, but I learnt a lot.

Will go through the source code for the kicks. Thanks!

</comment><comment><USER8> Beautiful, properly documented code.

<comment><USER9> With some assertions missing to assure there are no actions upon null pointers (e. g. return by failed init functions).

</comment></comment><comment><USER10> If the most interesting thing you can say about your project is which language you used, you might not have aimed high enough.</comment>


101 – A JavaScript utility library - <AUTHOR> https://github.com/tjmehta/101/

<comment><USER2> This is a nice start towards something that might be useful. A few thoughts about stating that "101 will be maintained to minimize overlap with vanilla JS." though:

1\. Lo-Dash and Underscore overlap with ES5 for a few reasons. First, it allows them to support environments where ES5 functions aren't available. Those are becoming less common but still exist. But the other big reason they overlap is that Underscore and Lo-Dash both outperform native functional methods by a significant amount. Unintuitive but true, see my comparison from a few weeks ago [0]

2\. It's worth thinking about who this library is for. The support for common JS and highly modular nature of the library make it seem like it is focused on Node first. But the value in a smaller library becomes much more clear in the browser where page weight matters.

These aren't meant as criticisms, it's good to see new ideas. But it's worth thinking about what niche you're filling when you develop a library like this.

[0]: [http://benmccormick.org/2014/11/12/underscore-vs- lodash/](http://benmccormick.org/2014/11/12/underscore-vs-lodash/)

<comment><AUTHOR> Love your well thought out feedback. 1) IMO ES5 is highly available now and when it isn't you can use shims. 2) Will definitely add other module systems on request. Currently works in the browser with browserify.

<comment><USER3> Isomorphic JS is only going to get bigger. Writing browser-friendly modules in CommonJS is an admirable strategy, especially since you're trying to avoid requiring your own custom build system.

I use Webpack (similar to Browserify, but I understand Webpack's more powerful), and I can't imagine starting a new JS project without it.

<comment><USER4> The proliferation of the term "isomorphic javascript" really has to stop.

<comment><USER5> But, the ISOs! Biodigital jazz, man!

[https://www.youtube.com/watch?v=XEuLWKBSRqw](https://www.youtube.com/watch?v=XEuLWKBSRqw).

</comment></comment></comment></comment></comment><comment><USER6> Can we just stop with these kind of kitchen sink libraries?

I think substack said it best ([https://github.com/substack/browserify- handbook#module-philo...](https://github.com/substack/browserify- handbook#module-philosophy)):

People used to think that exporting a bunch of handy utility-style things would be the main way that programmers would consume code because that is the primary way of exporting and importing code on most other platforms and indeed still persists even on npm.

However, this kitchen-sink mentality toward including a bunch of thematically- related but separable functionality into a single package appears to be an artifact for the difficulty of publishing and discovery in a pre-github, pre- npm era.

There are two other big problems with modules that try to export a bunch of functionality all in one place under the auspices of convenience: demarcation turf wars and finding which modules do what.

Packages that are grab-bags of features waste a ton of time policing boundaries about which new features belong and don't belong. There is no clear natural boundary of the problem domain in this kind of package about what the scope is, it's all somebody's smug opinion.

Node, npm, and browserify are not that. They are avowedly ala-carte, participatory, and would rather celebrate disagreement and the dizzying proliferation of new ideas and approaches than try to clamp down in the name of conformity, standards, or "best practices".

Nobody who needs to do gaussian blur ever thinks "hmm I guess I'll start checking generic mathematics, statistics, image processing, and utility libraries to see which one has gaussian blur in it. Was it stats2 or image- pack-utils or maths-extra or maybe underscore has that one?" No. None of this. Stop it. They npm search gaussian and they immediately see ndarray-gaussian- filter and it does exactly what they want and then they continue on with their actual problem instead of getting lost in the weeds of somebody's neglected grand utility fiefdom.

<comment><AUTHOR> I totally agree with this philosophy. It sounds especially great on paper. However, while in practice, adherence to the module pattern can become quite annoying for very small modules. Small modules usage throughout a project can change very quickly, because of this one may find themselves repeatedly adding a removing utility modules at a multiple times a day. Small breaks to npm install or remove small modules throughout your day can lead to a lot of wasted time (since it breaks your programming focus). Also, remembering which small module you used can be difficult (bc there may be many). I think there are pro's and con's to each strategy.. IMO I think the micro libraries are an exception to the rule, where grouping them together can be beneficial to developers.

<comment><USER7> Indeed, 101 is broken up into an almost ridiculous number of tiny pieces -- the implementation of the and function is about as big as the necessary require statement. I think or() and and() (for instance) could be in the same file.

<comment><AUTHOR> Disagree, is it very likely that `and` and `or` will always be used when either is required?

<comment><USER7> Um, yes.

Is it worth fine-graining libraries to the point where you're doubling the code required for almost every call?

</comment></comment></comment></comment></comment><comment> andrey-p I'm curious, what's the rationale behind

        var and = require("101/and"),
            apply = require("101/apply");

versus something like

        var o = require("101");

        o.apply(/*...*/);
        o.and(/*...*/);

I can see the first one works well if you're planning to use a couple of those functions at a time. If you end up using 4-5 of them in the same module it could get a bit much.

<comment><USER8> If you use something like Browserify only the code you require is added to the bundle it generates.

<comment> andrey-p That makes perfect sense, thanks!

</comment></comment></comment><comment><USER9> It's a great project to teach yourself something but I don't really see why people might want to use this over lodash/underscore?

For example, `exists` function can not really help with undeclared variables. At the end of day you have to use `typeof something !== 'undefined'`. I don't really understand what this library is trying to solve

</comment><comment><USER10> How would I use a "functional version of ||", or a "functional of &&"? I am not familiar with functional programing but maybe a short example of .or and .and would enlighten me a bit?

<comment><USER11> I'm guessing because .and is a function it can be used to pass into any higher order function.

        var x = [true, false, true, false];
        x.reduce(and, true); // == false
        x.reduce(or, false); // == true

<comment><USER10> that makes sense actually. Thanks!

</comment></comment></comment><comment><USER12> > 101 will be maintained to minimize overlap with vanilla JS.

I'm confused, the majority of this library seems to be wrapper functions for built-in vanilla js operations.

<comment><AUTHOR> Was waiting for someone to say this. Checkout the examples - duplication is for functional usage only. Util methods are written to work well with JS internals like Array methods (eg. map). I should probably make this point more clear in the docs... Thanks!

</comment></comment><comment><USER13> var and = require('101/and');

and(true, false); // false

and(true, true); // true

I'm not convinced that there's a real need for that. Anyone else have a good use for something like that? Looks like it doesn't even take more than two arguments

<comment><USER14> I'm not convinced either. But for what it's worth, the tests for and() and or() essentially treat them as some() and all() using reduce()

[https://github.com/tjmehta/101/blob/master/test/test- and.js](https://github.com/tjmehta/101/blob/master/test/test-and.js)

</comment></comment><comment><USER15> Just a note: the NPM manifest declares the entry point as "index.js", but this file does not exist.

<comment><AUTHOR> Hey, thanks. Yah I kind've knew about this, and never got back to it. What do you think I should put in index.js?

I was thinking `throw new Error('You're doing it wrong');` :-P

<comment><USER16> In that case, it makes more sense to publish each submodule as an individual NPM module.

<comment><USER17> Further, it's worth putting the components on npm individually _and_ retaining 101, but making it depend on those modules (so it's really just a wrapper). This is what lodash should do imo. Lodash has the separate bits on npm, but lodash itself does not depend on them, which is a little weird.

<comment><AUTHOR> I like this idea - just would be really annoying to maintain each module as a versioned dependency...

</comment></comment></comment></comment></comment><comment><USER18> FYI to the OP: in README.md, the example usage of apply() is the example from and().

<comment><AUTHOR> Thanks fixed.

</comment></comment><comment><USER19> I really don't understand why anyone would want to use this.

</comment><comment><USER20> Add new String(...) and new Boolean(...) to the is-(boolean|object|string) test cases for surprising fun, OP, then check out Object.prototype.toString.call(...).

</comment><comment><USER21> how is this different from underscore/lo-dash other than the ability to include only the functions you want?

<comment><USER22> If you take a look on Github, the project explains that it intends to trim itself over time to reduce overlap with native JS functionality.

</comment></comment><comment><USER23> Does this work in the browser?

<comment><USER24> Yes, with Browserify.

</comment></comment><comment><USER25> Do I care about some bytes?

<comment><USER26> If you're writing mobile apps in developing countries, then yes absolutely.</comment></comment>


I feel like the more videos I watch, the dumber I become - tek-cyb-org Reading vs Watching (in the age of Youtube). Thoughts? <comment><AUTHOR> All mass media will inevitably produce things that are garbage. Video has been the dominant form of media since it became widespread in the 50s.

Marshal McLuhan was the first to clue in to the effects of media types, with his famous quote "The medium is the message". He wrote extensively about media. A book that you are likely to identify strongly with is "Amusing Ourselves to Death". It basically argues that we are becoming a trivial culture because of our dependence on visual media.

It can easily seem like you get dumber the more videos you watch, but I suspect that's because it's far more common to have Facebook autoplay some retarded video of a fluffy animal your 'friend' shared than it is for someone to write out a thoughtful essay or email to you.

</comment><comment><USER2> I disagree. I watch some highly informative videos, it depends on the subject matter. What videos are you watching? I watch a lot of tech talks (mostly listen to them while working) and I get value out of them. I live such a busy lifestyle and work on a computer where I can't read books, but I can bring up a Youtube video in a small section of my screen or listen to something.

</comment><comment><USER3> Education is only a progressive discovery of our ignorance - Will Durant</comment>


Intel AMT vulnerability: Silent Bob is Silent [pdf] - <AUTHOR> https://www.embedi.com/files/white-papers/Silent-Bob-is-Silent.pdf <comment><USER2> Is there even a point in discussing this?

Intel and AMD will continue to not provide options without backdoors, intentional or otherwise.

Everyone will continue to buy their product because the alternatives do not have competitive performance.

</comment><comment><USER3> Wow. All you have to do is give it an empty response, and it accepts it as valid and lets you in.

How did this get missed in QC? The first thing I try doing while I'm working on my little game is seeing if null or empty inputs allow things that should not happen to happen with each command/function I add into the system. I write the code, see if it compiles, and if it does I immediately test the function in-game with any potentially invalid string/argument I can think to give it. Isn't input testing/validation step #1 in QC for code?

<comment><USER4> While I'm sure you are right that _you_ would totally never do something like that, it's likewise a truism that virtually all security goofs like this are commited by programmers who think they'd totally never do something like that. To wit: I don't believe you.

What almost certainly happened here is that, as someone else in this thread mentions, someone came by to fix an automated warning about the use of strcmp(a, b) and replaced it with strncmp(a, b, strlen(a)) instead of strncmp(a, b, strlen(b)). Easily 90% of code reviewers wouldn't catch that mistake (especially if it came along with a truckload of other such fixes), and as it's a maintenance change no new tests would have been written for it.

The only way to catch this would have been to already have written and deployed a test that expressly tested an empty string password. That's surely a good test to have, but come on, be honest: you've probably written a bunch of "password" style checkers in your career. Did you deploy a test and integrate it into CI for every one of them?

<comment><USER5> It was trickier that that even. It wasn't an empty password. It was an empty digest auth response, something like this is the normal path, inside the browsers code...not your own code.

HA1=MD5(username:realm:password)

HA2=MD5(method:digestURI)

response=MD5(HA1:nonce:HA2)

So you have to hijack the header value the browser sends...not just send an empty password.

</comment></comment></comment><comment><USER6> So if you setup AMT in the BIOS and run Linux you are exploitable? Can somebody confirm that this also affacts AMT < 6.0 i.e. Core2 system like Dell Optiplex 755,780?

<comment><USER7> AMT runs below the OS on a coprocessor inside the intel chip that has a privilege level greater than hypervisor to your machine and monitors the mobo ethernet independently of the OS. It can re-image and control your machine no matter what OS is running. Yes you're vulnerable running Linux.

<comment><USER8> Is this vulnerability just an authentication bypass the AMT web server, or the root cause was that AMT itself vulnerable?

</comment></comment></comment><comment><USER9> I have witnessed more than one (internal, not security critical) bug caused by a junior coder who's noticed a compiler nag about not using the length- checking version of string functions.

</comment><comment><USER10> Has anyone developed a scanning program yet? To scan your local network for vulnerable machines. It would be very handy to know which systems I need to boot into Bios and disable AMT.

<comment><USER11> Use nmap to check for the open ports.

623, 664, 1699[2-5]

<comment><USER10> Thanks.

</comment></comment></comment><comment><USER12> So if I point another computer on the network to the given ports on a browser, I should see this damn interface? Would be a nice way to indicate whether it is on or not, maybe?

<comment><USER13> I think AMT needs to be provisioned on target computer to be exploitable.

<comment><USER14> But to find out if it is, I need to go into the BIOS, right? Isn't it easier just to try going to a port?

<comment><USER12> I keep reading that if you "disable AMT" in the BIOS (on my Lenovo, anyway) it just resets the settings. A complete WTF but that's what I've been reading.

</comment></comment></comment></comment><comment><USER15> Will blocking ports 16992-16993 at router block this attack vector?</comment>


An exposed password let a hacker access internal Comodo files - <AUTHOR> https://techcrunch.com/2019/07/27/comodo-password-access-data/ <comment><USER2> This is a HUUUGE issue.

Comodo/Sektigo is the CA behind Internet2,the internet that lots of research happens on.

This is bad news.</comment>


Study Suggests Hand Washing Cleanses The Mind - <AUTHOR> http://www.npr.org/templates/story/story.php?storyId=126611413 <comment><USER2> I heard the study author on NPR's Talk of the Nation - Science Friday podcast and skipped it within 5 minutes. The researcher sounded like he already had a religious/mystical predisposition and wanted to confirm his own biases.

He said something to the effect of: "We know from religion that washing purifies the soul .. and I wanted to see if it's true".

NEXT.

<comment><AUTHOR> Interesting. His quotes (as reported in this and other articles) make it seem like he's just referencing the existing ideas in popular culture about the metaphor of hand-washing.

Regardless of his personal beliefs though, I'd assume that the study had standard double-blind procedures and only reported the result because it's statistically significant (especially considering that it's being published in _Science_ ).

<comment><USER3> Their control sample seems to have done something else entirely (like evaluated bottle designs or something). The correct control would have been something involving water but without the psychosocial overtones of hand washing - for example asking people to pull marbles out of a bowl of water.

The reality is that "water play" is very soothing. Put an angry toddler in front of a sink full of warm sudsy water, and I don't think they are happy because they are channeling Lady Macbeth.

</comment></comment></comment><comment><USER4> Very interesting. But I'm not convinced this has anything to do with washing specifically. I suspect it might just be that performing an ordinary, rote activity interrupts the normal process of the decision making activity and the feeling of completion carries over back into the other activity. I wonder if tasks such as tying one's shoes, packing a box and sealing it, etc. would have a similar effect.

Ultimately the study doesn't provide enough data to fully support the hypothesis (that cleansing, washing away provides some mental, decision making benefit), though the fact that there's any effect at all warrants a lot of further study.</comment>


The new science of cute - <AUTHOR> https://www.theguardian.com/world/2016/jul/19/kumamon-the-new-science-of-cute <comment><USER2> Japan is an hierarchical society in which the pressures flowing from the top can build to unbearable levels near the bottom. The outlook for many is quite bleak, with an unthinkably small possibility of escape from one's allotted role. Many live in conditions that may be best described as human storage. Cute things offer an escape into a fantasy world devoid of life's powerlessness in a manner compatible with consumerism. The aggressive and masculine traits valued near the top are sometimes too confrontational for most, resulting in a proliferation of cute, comforting and non-aggressive symbols throughout society. Even police boxes have cute mascots to soften the intimidation of their presence.

</comment><comment><USER3> I vaguely remember reading somewhere how domestication brings about cuteness in animals. When animals are breed to be less aggressive they look more like babies. We are not even sure if humans are naturally selecting the traits (as baby like features seem less aggressive) or that just inherently happens when aggression is removed (ie lower testosterone would cause less maturity).

I believe the study on domesticating foxes showed this. As they removed aggressive foxes from the gene pool the left overs were unbelievable "cute" with soft fur, round eyes, etc. Seriously a domesticated fox is a pretty animal.

Of course I believe there is an exception to this of the house hold cat. Supposedly cats are technically not domesticated (I'll find link on this shortly but yes this mainly a joke as domestication is likely a multi-faceted continuum).

<comment><USER4> Domestication brings about neoteny. Adult domesticated animals maintain appearance and behaviors that wild animals only have when they are young.

Young mammals are very cute to us, possibly because we are mammals too and inherit our cute-sense from a common mammal ancestor.

[https://en.wikipedia.org/wiki/Neoteny#In_domestic_animals](https://en.wikipedia.org/wiki/Neoteny#In_domestic_animals)

<comment><USER5> There is even an old theory that modern day humans are neotenous products of a proto-ape-man. A list usually follows of those characteristics that humans share with infant modern apes: less hair, larger head to body ratio, shorter arms, less muzzle, etc. Then 'futurists' grab hold of that and imagine current human babies as our adult future; is that how the bug-eyed hairless 'gray alien'[1] arises, or the 2001 "star child"?

[1] [https://en.wikipedia.org/wiki/Grey_alien](https://en.wikipedia.org/wiki/Grey_alien)

<comment><USER6> I have to wonder if this is partially responsible for the "Asians are smarter than everyone else" stereotype, given that Asians have more neotenous features than other races on average.

</comment></comment></comment></comment><comment><USER7> > _In a study at the University of Michigan in 2012, visual information expert > Sookyung Cho asked subjects "to design a cute rectangle by adjusting the > size, proportion, roundness, rotation, and color of the figure". What she > found supported the idea that "smallness, roundness, tiltedness, and > lightness of color can serve as determinants of perceived cuteness in > artifact design". It mattered, she found, whether the person designing the > rectangle was in the USA or South Korea. Cuteness is nothing if not > culturally specific, and that itself has become a rich focus of inquiry._

> [...]

> _Teddy bears exist because the night is dark and long and at some point your > parents have to go to bed and leave you. There is real comfort in cuteness._

> _"Filling in an emotional need is exactly where kawaii plays a significant > role," writes Christine R Yano, a professor of anthropology at the > University of Hawaii at Manoa and the author of Pink Globalization: Hello > Kitty's trek across the Pacific. "Even in America, journalist Nicholas > Kristof has written of an 'empathy gap' in today's society," states Yano. > "He points to the place of objects that may be considered promoters of > 'happiness', 'solace', 'comfort'. When a society needs to heal, it seeks > comfort in the familiar. And often the familiar may reside in 'cute'. > Witness the use of teddy bears as sources of comfort for firefighters in the > wake of NYC's 9-11. So I see kawaii things as holding the potential as > empathy generators."_

I wonder how these two points tie in to the modern obsession with cats. They seem to fill a real need people have, but speaking as someone who is unaffected by cat-cuteness (which is weird because I generally am very susceptable to cute things) and who is treated as a freak of nature by many, I think there's also a certain aspect of trying to conform to societal expectations.

PS: The Guardian aritcle is a reprint (republish? reshare?) of an article at Mosaic[0], which features a lot more pictures.

[0] [http://mosaicscience.com/story/cuteness-japan- kawaii](http://mosaicscience.com/story/cuteness-japan-kawaii)

<comment><USER8> Cats are furry, murderous assholes

[http://theoatmeal.com/comics/cats_actually_kill](http://theoatmeal.com/comics/cats_actually_kill)

[http://www.kittycams.uga.edu/index.html](http://www.kittycams.uga.edu/index.html)

<comment><USER9> That's what makes them cute, though.

<comment><USER10> Eh? IMO it's their appearance and style that makes them cute, not their violent tendencies! I never hear two cats scrapping in an alleyway and think 'how cute!'.

<comment><USER11> On the contrary, many of cats' predator characteristics make them cute -- for example, their large, forward-facing eyes, the way they pounce on and bat at things (the little ass wiggle they do just before striking is particularly adorable), their little fangs (giving a character cat fangs is an anime way of conveying "mischievous cuteness"), etc.

They are also fairly intelligent. Intelligence can be cute, and the cuteness of intelligence is _enduring_. Rabbits are cute to look at, but make for boring pets; cats and dogs can fascinate and charm us for years and quickly become considered friends and the near-equals of humans. And don't tell me that a cat who's figured out how to operate doorknobs or lightswitches isn't adorable.

A lot of this has to do with the fact that we are also predators and these characteristics remind us of ourselves (in particular, our young).

<comment><USER10> > "their large, forward-facing eyes"

Appearance.

> "the way they pounce on and bat at things"

Style.

> "their little fangs"

IMO, fangs aren't exactly a cute feature. Cats aren't cute all the time. This isn't a cute image of a cat IMO, for example...

[http://baddogneedsrottenhome.com/images/emails/55c8ce1c28a9b...](http://baddogneedsrottenhome.com/images/emails/55c8ce1c28a9b.jpg)

> "They are also fairly intelligent. Intelligence can be cute, and the > cuteness of intelligence is enduring. Rabbits are cute to look at, but make > for boring pets; cats and dogs can fascinate and charm us for years and > quickly become considered friends and the near-equals of humans. And don't > tell me that a cat who's figured out how to operate doorknobs or > lightswitches isn't adorable."

Again, style.

It's possible to see a cat's playfulness and intelligence as separate from its roots as a predator. I don't think we actively have 'killer' in mind when we see a cat look cute or do something cute.

<comment><USER6> Cats' playing is straight-up hunting practice. If you pay attention to a kitty playing with something, you can tell that they're practicing how to stalk, hunt, kill, and eviscerate their prey.

And it's _adorable_. I used to tell my parents' kitty "You're such a cute widdwe pwedator, yes you are!". Sometimes while she was playing, other times after watching her hunt and kill a lizard in the backyard. There wasn't much difference between her behavior between those times.

<comment><USER10> The point I'm making is that the cuteness is not determined by their desire to kill, it's their appearance and style that makes them cute.

If being a predator was a deciding factor in making them cute, then other predators would automatically be cute too. Perhaps you think all animals are cute, but I don't think of sharks, snakes, crocodiles, etc... as cute.

In other words, IMO it's not what they do that makes an animal cute, it's the way that they do it (and/or their appearance).

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER12> "He is almost regarded as a living entity, a kind of fun ursine household god (it is perhaps significant that the very first licensed Kumamon product was a Buddhist shrine emblazoned with his face)."

Things like this fascinate me about Japan. How is this understood? Is it a "South Park" style sacrilegious parody, or do Japanese Buddhists actually find this totally acceptable?

<comment><USER13> I am by no means an expert, but after living here for a while I have had to adjust my conception of what sacrelegious means. I think my understanding of it (after growing up in the US and primarily being exposed to christian and jewish customs) was 'pious sincerity' or 'seriousness'. In Japan, religious practice is not as _serious_ as I was used to, even if many people are very serious about observing.

There's not as much value placed in physical artifacts. Historic buildings get razed (pour one out for the Hotel Okura), earthquakes destroy cities… people move on. The culture needs to be respected and honored but new artifacts will always arise which honor that line of culture. You respect your ancestors by however you show respect.. bowing, keeeling, building a shrine out of discarded PS2's or whatever. If it is heartfelt, then how you do it mostly reflects on you.

So associating a mascot (which is a totally accepted cultural tool) with a religious artifact isn't considered bad because there is no negative association with it. People love kumamon! Anyway, that's my view on it. I am sure I have a lot to learn still.

As an aside: Even the police like to get in on the cute. Note the mascot at the bottom of the tokyo police website. Pepo-kun is all over Tokyo to make the police more approachable. He's named after the sound that police cars make: "peee-poh-peee-poh"

[http://www.keishicho.metro.tokyo.jp/multilingual/english/ind...](http://www.keishicho.metro.tokyo.jp/multilingual/english/index.html)

<comment><USER14> To add to your comment on the transience of historical buildings, the Ise Jingu shrine gets torn down and rebuilt every 20 years, and this has been happening for 1300 years!

[http://www.smithsonianmag.com/smart-news/this-japanese- shrin...](http://www.smithsonianmag.com/smart-news/this-japanese-shrine-has- been-torn-down-and-rebuilt-every-20-years-for-the-past-millennium-575558/)

Also, according to Freakonomics, Japanese houses are "disposable", commonly torn down and rebuilt. [http://freakonomics.com/podcast/why-are-japanese- homes-dispo...](http://freakonomics.com/podcast/why-are-japanese-homes- disposable-a-new-freakonomics-radio-podcast-3/)

</comment></comment></comment><comment><USER15> Cuteness is a look of a healthy (lack of abnormalities) child, and youth in general.

Beauty is youth + health (average face = lack of deformities) for all species - good genes, just reached reproductive age (with all necessary markers).

Sexual attractiveness is a bit more complicated - species specific markers of youth, health, good genes (parasite resistance, foraging, etc) and social status.

Nothing to see here. Humans aren't descendants of gods, they are still mere animals.

<comment><USER16> Sexual dimorphism is also important for sexual attractiveness.

</comment></comment><comment><USER17> I wrote about this a few years ago, with the goal to answer the question of "what is cute, really?" [http://uxmag.com/articles/beyond- emotion](http://uxmag.com/articles/beyond-emotion)

</comment><comment><USER18> I wonder if zenbo flopped [https://zenbo.asus.com](https://zenbo.asus.com)

<comment><USER19> Why do manufacturers need to put big goofy eyes on robots? I am perfectly fine with an astro-mech style robot that is obviously a robot.

<comment><USER7> Well you're not wrong for liking it, but you also are (presumably) a techie of some form, be that programming, electronics or whatever. That implies a pretty strong aesthetic bias that does not represent the average person.

</comment></comment></comment><comment><USER20> Isn't this another symptom of infantilization of culture? Similarly to how the most successful movies are about wizards and magical rings.

<comment><USER21> infantilization of culture?

Why are wizards and fantasy not allowed for adults?

<comment><USER22> "All propaganda has to be popular and has to accommodate itself to the comprehension of the least intelligent of those whom it seeks to reach."

Replace propaganda with marketing, PR, journalism...</comment></comment></comment>


A Better Way to Learn Programming? Notes on the Odin Project - <AUTHOR> http://everydayutilitarian.com/essays/notes-on-the-odin-project/ <comment><AUTHOR> A detailed guide on how to pace yourself while learning how to write software code from open source material. TLDR: A learning path for the autodidact</comment>


"The Feeling Of Power" by Isaac Asimov - <AUTHOR> http://downlode.org/Etext/power.html <comment><AUTHOR> When people argue whether it's necessary, useful or desirable for programmers to know anything about assembly language and the internals of CPUs, I always think of this story.

<comment><USER2> Nice coincidence as I've just started going through the book "Elements of Computer Systems: Building a Modern Computer from First Principles" by Nisan and Schocken.

<comment><USER3> I did that last year. It was absolutely awesome fun. I already knew 90% of how it works, but hadn't connected the dots myself before.

</comment></comment></comment><comment><USER4> This, and "The Machine Stops" by E M Forster (<http://www.plexus.org/forster/index.html>) are my two favorite science fiction shorts.

Both very relevant, and slightly humorous where we surpassed the technology in the stories. A computer weighs more than two humans! And _still_ has crippled computing power. Makes me smile every time.

*Edit: Asimov probably imagined our missiles looking like this: <http://www.yellow-llama.com/wp-content/uploads/harddrive.jpg> . That dish washer being the hard drive (is actually a hard drive). And minus the humans inside.

<comment><USER5> Upvoted for "The Machine Stops". What vision from 1908! I notice that it's copyright EMF 1947. Any idea what that means? There's something about 'dying in France' that made me think of the Great War.

<comment><USER6> And to think, this is by the same author who wrote _A Passage to India_ , which is in the entirely different genre. It's amazing that someone who wasn't even a science fiction writer could have such skill at seeing the future.

</comment></comment></comment><comment><USER7> That's a very moving and worthwhile read, not just because of the practical matter discussed, but also because of the shadow side of any 'advance' in technology.

<comment><USER8> I agree -- it's easy to forget the tradeoffs technology & specialization gives us. The fact that we spent years learning to read, write, do math, etc. means that most of us don't know much about farming and wilderness survival compared to our ancestors. They'd probably be shocked at our lack of knowledge in these "basic life skills".

<comment><USER9> But we didn't loose the very concept of being able to do such a thing. We can't do it ourself, but we know where to start, how to learn it, etc.

<comment><USER10> A vast majority of modern people would die a helpless death relived of their modern inconveniences. You don't get time to "learn" how to farm when you don't have any food.

And farming is only 1 or 2 generations removed. Give it a few more turns, and one can easily see the world in the story becoming a reality.

<comment><USER7> I've lived on a farm for a couple of years (in Ontario), and it is simply amazing how much hard work goes in to making a piece of land productive, even with modern tools.

In aerodynamics as applied to jet aircraft they have something called the coffin corner, a speed so close to the limits of the flight envelope in all directions that a small change in velocity will make you either stall or break up.

It's possible that there is such a thing as 'societies coffin corner', a speed of development so great that if it gets exceeded by a little or drops for a short time that we'll literally crash.

<comment><USER11> That sounds like a plot for a Crichton novel. I like it.

<comment><USER12> Vernor Vinge's stories have addressed a very similar idea. "A Deepness in the Sky" has significant interludes on this topic, though it's not the main focus of the work.

</comment></comment></comment></comment></comment></comment></comment><comment><USER13> I'm put in mind of when I worked at a bank, hearing stories of people who's job was to plug numbers into a spreadsheet or program, and copy the result to some other place, etc. If the result was orders of magnitude off, they wouldn't catch the error and wonder what was wrong, but just continue on to the next step, oblivious.

So the situation described in the story is already here, in some respects.

</comment><comment><USER14> Reading old SF without a nostalgia factor is weird. There are all sorts of things just off with the unspoken assumptions of the author, and the extrapolations built on those make the whole story seem skewed. This one looks like it was meant to work as a literal story as well as an allegorical one. Now that it's too dated for that, the allegorical part gets bogged down in the detailed explanations of arithmetic by hand and is a bit vague on exactly what the people who don't bother are missing.

</comment><comment><USER15> Hey, I just thought of this story a few weeks ago! Great read. [http://scifiwarp.com/questions/21/searching-for-title-of- sho...](http://scifiwarp.com/questions/21/searching-for-title-of-short- story/23#23)

</comment><comment><USER16> (c) The Estate of Isaac Asimov...

[Edit] Seriously, I used to buy 2nd-hand short story books to get to stories like this (which I've read), but if it has a wider readership this way, but people buy novels, maybe that's copyright's intent?

<comment><USER17> Not sure what you're trying to say at the end, but copyright's intent was to inspire Asimov to write stories in the first place. Copyright is supposed to give artists/creators the peace of mind to know that once they _create_ someone won't just copy their work and turn a profit on their hard work. (i.e. If Asimov wrote this story, just to have someone copy the book and start selling it on street corners, making money on practically zero effort of their own)

I don't see how protecting Asmiov's work _after_ his death is in any way supposed to inspire him to create more works (he's already dead). And I _highly_ doubt that Asimov cared whether or not his works would be under copyright once he was dead and buried. The only real reason for works to be protected past death is to the benefit of corporations _not_ to the benefit of the general public or the artists/creators themselves.

<comment><USER18> There are reasons to oppose copyright but I don't think this is one of them.

Consider that "Last Lecture" professor, Randy Pausch. He spent some of his last days working on a book. Should the surviving family be denied proceeds? Should his author's advance have been much smaller?

That is; if you believe money is an important incentive for creators, you can't overly penalize people who expect to die before all the returns are in.

You're still free to believe that all copyright is bad, or given too long a term, of course.

<comment><USER17> That's an edge-case. On the flip-side, if I create something on the day that I'm born, how long until it's out of copyright? Is that figure even a morally right length of time to keep something copyrighted?

Let's not even delve into the 'reverse-copyright extensions' that happen when they apply copyright extensions to works in the past that have already fallen into the public domain... How is pulling something that was created 50+ years ago (with the author dead and gone) back into copyright supposed to 'inspire the arts' in any way, shape or form.

</comment></comment></comment></comment><comment><USER19> I never read that short until now, thank you for posting it!</comment>


Yelp University Dataset - <AUTHOR> http://engineeringblog.yelp.com/2011/09/calling-all-data-miners.html

<comment><USER2> Why not make it available to everybody?

There's a lot of data mining talent in academia, but there's also a lot of us in the "real world" who follow what they do closely and add our own special twists because we've been doing data analysis for decades rather than teaching about it for decades.

Why keep the data under wraps? I can't see the data being all that valuable to Yelp's competitors, unless somebody wants to make a niche out of have stale data about university towns.

<comment><USER3> It might not be valuable to competitors, but I wonder if this data set would be useful for someone trying to write fake reviews that get past their filtering mechanisms.

</comment></comment><comment><USER4> is this the same dataset:

<http://socialcomputing.asu.edu/datasets/Yelp>

<comment><USER5> I think the dataset you mentioned only contains the yelp social graph ie it doesn't have the reviews and stuff.

</comment></comment><comment><USER6> > _you'll need to be associated with an academic institution to qualify for > access_</comment>


Tulsa Race Riot of 1921 - <AUTHOR> https://www.britannica.com/event/Tulsa-race-riot-of-1921 <comment><USER2> Those interested should also read up on the Wilmington Insurrection: [https://en.wikipedia.org/wiki/Wilmington_insurrection_of_189...](https://en.wikipedia.org/wiki/Wilmington_insurrection_of_1898)

It's the only successful coup to take place on American soil. Wilmington, then a majority-black city, was starting to see black elected officials and prosperous black merchants. The white people wouldn't stand for that, and so planned a coup. A coup that was successful: ~60 deaths; prominent black people and integration-minded whites were ridden out of town on a rail. State and national politicians just let it happened, and over time white people covered it up. It was only leading up to the 100th anniversary that it was even properly acknowledged.

Fresh Air did an excellent interview with the author of a new book on it: [https://www.npr.org/2020/01/13/795892582/wilmington-s-lie- au...](https://www.npr.org/2020/01/13/795892582/wilmington-s-lie-author- traces-the-rise-of-white-supremacy-in-a-southern-city)

I have it on order and am looking forward to reading it.

<comment><USER2> And I should add that both these incidents were part of The Nadir: [https://en.wikipedia.org/wiki/Nadir_of_American_race_relatio...](https://en.wikipedia.org/wiki/Nadir_of_American_race_relations)

For decades in the late 1800s and early 1900s, this sort of ethnic cleansing was common across the US, and it was part of the Nadir's broader pattern of rising white supremacy. Having never heard a peep about this in school, I was skeptical. But Loewen's "Sundown Towns" convinced me with its mix of document- driven, narrative, and data-driven history: [https://www.amazon.com/Sundown- Towns-Hidden-Dimension-Americ...](https://www.amazon.com/Sundown-Towns-Hidden- Dimension-American/dp/0743294483)

It's been a valuable reminder to me lately that progress in civil rights is less robust than it seems, and can go into retreat for decades if we let it.

<comment><USER3> I too learned almost nothing of this history in public school. Only because I took an elective course on the civil rights movement as an undergrad did I ever learn about Tulsa, lynching postcards, Emmett Till, the Birmingham bombings, and countless other acts of horror that were part of the normal fabric of American life.

It was a profound and radicalizing experience. Even moreso when you think how few outside of the affected communities ever have that opportunity and indeed are often intentionally driven away from or are indoctrinated against ever experiencing the same.

<comment><USER2> Totally agreed. And I think it's no accident that white-run schools don't end up teaching the history of white violence. Between the organized propaganda campaigns of groups like the Daughters of the Confederacy [1], the desire everywhere for history to instill pride and obedience in children, and the natural tendency not to want to think about thinks that are personally unpleasant, I'm not shocked that I had to find out about this stuff entirely by accident and on my own. Pure POSIWID, of course. [2]

[1] For example, the Confederate Catechism: [https://www.detroitnews.com/story/news/nation/2017/05/29/con...](https://www.detroitnews.com/story/news/nation/2017/05/29/confederate- catechism/102300030/)

[2] [https://en.wikipedia.org/wiki/The_purpose_of_a_system_is_wha...](https://en.wikipedia.org/wiki/The_purpose_of_a_system_is_what_it_does)

</comment></comment></comment></comment><comment><USER4> At one point in US history from 1863-1930, the lynching of black men was a regular occurrence throughout the Midwest and South.

Another fun fact is that most slaveholding families recovered their wealth less than one generation later through their connections and the white terrorism that let them reclaim their power.

I'd recommend checking out the museum dedicated to these lynching victims in Birmingham, Alabama, the Legacy Museum and National Memorial to Peace and Justice.

Sources: [https://www.economist.com/united-states/2019/04/04/the- sons-...](https://www.economist.com/united-states/2019/04/04/the-sons-of- slaveholders-quickly-recovered-their-fathers-wealth)

[https://museumandmemorial.eji.org/memorial](https://museumandmemorial.eji.org/memorial)

[https://www.smithsonianmag.com/smart-news/map-shows-over- a-c...](https://www.smithsonianmag.com/smart-news/map-shows-over-a-century-of- documented-lynchings-in-united-states-180961877/)

</comment><comment><USER5> It feels like there is never enough time to get the kind of history lessons out there that are needed, and the time we do have is spent so inefficiently.

I'm not a student of these incidents, but its important just to get a sense of the scale in number of incidents of these race riots. Just two years previously, a particularly bad year in 1919 saw over two dozen(in part known as 'The Red Summer') recorded riots.

And they were everywhere. Just google '<major city> race riot', and you'll probably hit at least one, even for what are now liberal and metropolitan cities.

Then bear in mind, like Tulsa, many of these pogroms and lynchings were the victim of a cover up. The 'law' enforcing whites were often participants. Documents conveniently disappeared, survivors were terrified into silence, and witnessing whites told investigating officials that they just saw nothing that day. Any hard number you find out there is probably conservative because we just don't know.

Not everyone was sending around post cards of the dead and destroyed like in Tulsa, although many certainly did. If you're curious, there is an entire Wikipedia article on "Lynching Postcards". The imagery is disturbing, so you can find it yourself.

Even outside of understanding race relations, this and labor rights suppression (another incredibly undertaught topic) show how 'recent' and fragile the Rule of Law is in this country.

</comment><comment><USER6> This is the one depicted in the new "Watchmen" series on HBO btw. A great watch for fans of the original comic or film.

Probably not interesting to history or civil rights buffs though.

<comment><USER7> I have to thank Watchmen series for educating me in something I knew nothing about before.

</comment></comment><comment><USER8> Even the bombing from planes was not made up. I suggest one of the last episodes of Stuff You Should Know podcast on it - they did a lot of legwork researching the event.</comment>


Apple updates MacBook Air (Thunderbolt, faster CPU, backlit keyboard) - <AUTHOR> http://store.apple.com/us/browse/home/shop_mac/family/macbook_air?

<comment><AUTHOR> Does anybody know if they advertised with the "Instant on. Even after a month off." on the previous models as well? Or did they upgrade the flash storage type so that this is now possible?</comment>


Startup Ideas We'd Like to Fund (2008) - <AUTHOR> http://old.ycombinator.com/ideas.html <comment><USER2> #13 Online learning is an interesting one for YC. It looks like they couldn't find anyone doing it well enough, so they started their own startup school - [https://www.startupschool.org/](https://www.startupschool.org/)

#22 A web-based Excel/database hybrid - Should have invested in Google.

#25 A Craigslist competitor seem obvious, but no one can take the crown from them. Not even Facebook! I'm not sure it can be done, but I'm interested to see if it can be.

<comment><USER3> Best one I saw on 22 in posts here:

[https://fieldbook.com/](https://fieldbook.com/)

I've never tried the product. Just liked the concept and marketed benefits.</comment></comment>


How our users exploited concurrency and how we fixed it - <AUTHOR> http://eviltrout.com/2013/01/10/exploiting-concurrency.html

<comment><USER2> Even better, rearrange your database to store immutable facts instead of mutable state.

In this example, you might have a goal_completion table to which you append a row when the player completes a goal, instead of changing an existing row. The table could have suitable unique constraints to make sure that each player can only complete a goal once.

This way, it is much harder for your data to accidentally be modified in a way that it becomes wrong.

This also gives you a way to store facts about the completion for free, such as a timestamp for each goal completion. And having data like timestamps is really useful for auditing, debugging and testing.

<comment><USER3> I've heard you sometimes shouldn't actually delete data from a database and should use an "IsDeleted" flag instead, particularly with customer orders and such.

What are the proper circumstances to use immutable facts? Anytime you need an undo or audit features?

<comment><USER4> The isDeleted flag is good because it gives the appearance that the data is gone, without removing the context of the data itself.

Immutable facts are great if you want to:

1) Avoid a large amount of updates/race conditions on your tables. Immutable facts, being immutable, can be done using purely inserts.

2) Want to keep a trail or context to the data you're storing. This has a benefit of keeping a log that you can later use to trace issues, behaviours or generate statistics. If you're keeping a state in a database column, without external logs you aren't able to check when or why that state changes. Immutable facts keep track of this for you, but require quite a bit more overhead.

<comment><USER5> I've always hated "isDeleted" flags because it adds something that you have to remember to every query you write.

I would almost prefer some way to "ghost" a row where without a specific switch the DBMS will never return it from a query.

<comment><USER6> With a view and a set of rules, you can do such things in Postgres, without your application noticing:

<http://www.postgresql.org/docs/9.2/static/rules-update.html>

</comment></comment></comment></comment></comment><comment><USER7> I believe this won't work on PostgreSQL, which will always say one row has been updated, even if the new value is the same as the old value.

There are numerous ways around that, from less fancy to really fancy.

      1. use SELECT FOR UPDATE, which will lock the row (I'd say that's the normal way)

      session1> BEGIN;
      session1> SELECT * FROM goals WHERE player_id = ? FOR UPDATE
      session2> BEGIN;
      session2> SELECT * FROM goals WHERE player_id = ? FOR UPDATE
      # session2 is now hanging
      session1> UPDATE goals SET completed = true WHERE goal_id = ?
      session1> UPDATE players SET points = points + 1 WHERE player_id = ?
      session1> COMMIT;
      # session2 now proceeds, sees that the goal has been completed, forfeits awarding the reward

      2. use suppress_reduntant_updates_trigger (fun)

      session> CREATE TRIGGER suppress_goal_t BEFORE UPDATE ON goals FOR EACH ROW EXECUTE PROCEDURE suppress_redundant_updates_trigger();
      session> UPDATE goals SET completed = true WHERE goal_id = ?
      UPDATE 1
      session> UPDATE goals SET completed = true WHERE goal_id = ?
      UPDATE 0
      # now you can use the approach mentioned in the article

      3. use true serialisability
      session1> BEGIN;
      session1> SET transaction_isolation TO serializable;
      session1> SELECT * FROM goals WHERE player_id = ?
      session2> BEGIN;
      session2> SET transaction_isolation TO serializable;
      session2> SELECT * FROM goals WHERE player_id = ?
      session1> UPDATE goals SET completed = true WHERE goal_id = ?
      session1> UPDATE players SET points = points + 1 WHERE player_id = ?
      session1> COMMIT;
      session2> UPDATE goals SET completed = true WHERE goal_id = ?
      ERROR:  could not serialize access due to concurrent update
      # session2 now has to rollback the transaction

There's a few more, but I ran out of steam typing ;) Yay, Postgres!

<comment><AUTHOR> _facepalm_

I forgot a very important part of the query:

row_count = Goal.update_all "completed = true", ["player_id = ? AND completed = false", player.id]

If you update where completed = false, the rowcount will only be 1 when the update works.

(I've updated the blog post.)

</comment></comment><comment><USER8> Really not that much of a subtle bug I'm afraid, the pattern of "mutating the condition itself on success" is error-prone in single-threaded code too.

A good example being asynchronous javascript, where you'd do this to prevent issues like the exposed in the article:

        var some_mutable_condition = false;
        var requested = false;

        if (!some_mutable_condition && !requested){
            requested = true; // ensure one request is performed at most
            $.ajax(/*async code that'll set some_mutable_condition to true*/);
        }

<comment><USER9> Underscore.js has a function called once for this exact purpose.

<comment><USER8> Good to know, thank you.

</comment></comment></comment><comment><USER10> I like collecting tales like this one. They are useful for scaring new programmers who think they understand how to safely do multi-thread programming.

</comment><comment><USER11> If I remember correctly, one of the ways around this is to do a no-op update before querying. So you'd update a field in the goal table to it's original value, which would cause the database to lock the table for the duration of the transaction.

Also, if I remember correctly, this is one of the things that can be solved with an MVCC aware engine.

[http://en.wikipedia.org/wiki/Multiversion_concurrency_contro...](http://en.wikipedia.org/wiki/Multiversion_concurrency_control)

With MVCC a transaction should be aborted if another thread modifies the underlying data.

</comment><comment><USER12> No need for a workaround, you have Optimistic Locking (via lock_version field)

It raises an exception in case you try to update stale data.

[http://api.rubyonrails.org/classes/ActiveRecord/Locking/Opti...](http://api.rubyonrails.org/classes/ActiveRecord/Locking/Optimistic.html)

<comment><AUTHOR> Right, but that involves changing your database and adding hidden form fields to your app in order for it to work on a multi process environment (like every production server should be.)

My solution is basically the same amount of lines, requires no such changes.

<comment><USER13> Yes, but optimistic locking with a version is the general and known solution to this problem in all cases and is built into the framework already. Your solution works in just one case, not the general case.

</comment></comment></comment><comment><USER14> Another solution would be to have e.g. a "Completions" table indexed on user and on date. Then the RDBMS wouldn't allow duplicate goal completions for the same user and day. If you wanted to allow up to X completions/day, just add a new column to track that, and limit that column to the range [0, X). I often find that updating rows in response to transactions is a code smell. Each transaction should write one or more rows to one or more tables. Of course, if you have denormalized summary tables, they might have to update, but you only do that when you know you have to.

</comment><comment><USER15> Umm ... and the 'Player.transaction' doesnt seem to be one then if it allows two transactions to overlap?

<comment><AUTHOR> There's a difference between a transaction that locks for writes and one that locks for reads. By default the reading is not locked in this (common) case.

<comment><USER16> That's a terrible default! Ignoring read-write races is a surefire way to... well, create bugs like the one in the post.

<comment><USER11> The common case is going to be many readers with a few or even a single writer. In that scenario, a read locked database would destroy any chance of operating at scale.

<comment><USER17> Many DBMS have a SELECT FOR UPDATE statement just for those cases you want to lock everybody out while just reading.

</comment></comment></comment></comment></comment><comment><USER18> "I was worried that I'd have to resort to semaphores or some kind of other exotic programming construct."

I'm not saying a semaphore would have been appropriate here but- For real? A semaphore is exotic? It is an one of the oldest original synchronization methods. Semaphore were developed by Dijkstra in 1965. The author's C-S program failed him.

<comment><AUTHOR> Everyone's got to start somewhere!

In the sentence before I explicitly said I was a newbie to this stuff at the time. Obviously it's not exotic to a more experienced developer :)

<comment><USER18> My point was that a semaphore is freshmen or sophomore level undergrad stuff, something I would expect every professional developer to understand. Here someone who considers themselves a developer, which I assume means a professional software developer, considers it an exotic construct. Things like this shakes my faith in the computer science educational system.

<comment><AUTHOR> I think you're being a bit dramatic about little part of one sentence.

There are many application developers out there using Rails, PHP or Django who can go years without invoking locks or semaphores due to the strengths of the APIs and frameworks they use.

As they learn and grow as developers, they will be introduced to new problems and solutions. A semaphore can be exotic, not because they've never heard of it before, but because they've not used them very much outside of that one assignment they did in CS 5 years ago.

How about instead of criticizing people's eductions, we encourage them to be mindful about what they don't know, and to learn whatever they can when they get a chance?

<comment><USER18> "How about instead of criticizing people's eductions, we encourage them to be mindful about what they don't know, and to learn whatever they can when they get a chance?" I'm all for people learning things they were not taught in school and I commend you for that.

But as the field grows there will be more and more material that was traditionally taught, but is now dropped. For example, I could imagine a misguided department dropping a once required OS/Systems class to allow students to choose that as an elective, or maybe a node.js or Ruby elective instead. I think those kind of program changes are serious and need discussion-

</comment></comment></comment></comment></comment><comment><USER19> Use Optimistic Locking:

[http://railscasts.com/episodes/59-optimistic-locking- revised...](http://railscasts.com/episodes/59-optimistic-locking- revised?view=asciicast)

</comment><comment><USER20> Best to discover the joys of concurrency while writing a game than a bank. =) Welcome! Our playground is a lot of fun!

</comment><comment><USER21> Basically, the correct way is to use transactions. Use a transactional database because it supports MVCC.

<comment><AUTHOR> In the example code I gave, by default in Rails with Postgres (which supports MVCC) you'll still get the error. So it's not as simple as using a transactional database: you either use a trick like this one, an row-based version column, or you need to change your isolation levels which has other performance issues.

<comment><USER22> You could wrap the transaction in a lock based on the player ID which you could do with Redis or Memcached with near-zero impact on performance.

A good reference: <http://www.nateware.com/an-atomic-rant.html>

<comment><AUTHOR> That introduces external dependencies though. Also, since the update has to occur anyway, I'd bet that my solution is faster than also making a call to another database for a lock.</comment></comment></comment></comment>


Amazon issues "Choking Hazard" warning for Testable JavaScript - <AUTHOR> http://www.amazon.com/Testable-JavaScript-Mark-Ethan-Trostler/dp/1449323391#cpsiaMainDiv

<comment><USER2> Sometimes the universe just seems to fall together correctly, doesn't it?

</comment><comment><USER3> > readers will see concrete examples of how their JavaScript can get into > trouble, followed by tips and honest advice how to extricate their code from > those pitfalls

In other words, how to perform the Heimlich Maneuver on their JavaScript code. :)</comment>


Hell Freezes Over As MySpace Fully Surrenders To Facebook - <AUTHOR> http://techcrunch.com/2010/11/18/hell-freezes-over-as-myspace-fully-surrenders-to-facebook/

<comment><USER2> Hell is usually frozen over. In fact, it's -7 there right now.

[http://www.yr.no/place/Norway/Nord- Tr%C3%B8ndelag/Stj%C3%B8r...](http://www.yr.no/place/Norway/Nord- Tr%C3%B8ndelag/Stj%C3%B8rdal/Hell/)

<comment><USER3> Actually, hell really _is_ frozen over, at least at its core:

[http://en.wikipedia.org/wiki/Inferno_(Dante)#Ninth_Circle_.2...](http://en.wikipedia.org/wiki/Inferno_\(Dante\)#Ninth_Circle_.28Treachery.29)

</comment></comment><comment><USER4> This certainly made me giggle a bit, but I wouldn't define using FBConnect, pulling user data and pushing updates to be fully surrendering.

Fully surrendering would be more like MySpace outsourcing the social networking to FB. In the meantime, dying as they might be, I still think they have a different vibe.

<comment><USER5> > _but I wouldn't define (..snip..) to be fully surrendering._

You would if you were a drama queen of tech blogging who didn't get invited to the press conference.

</comment></comment><comment><USER6> I like what MySpace has done recently. They have made a major change in direction, and this is agreement is simply another acknowledgement of it. "Surrender" implies that MySpace is at war with Facebook, and that is not longer the case - MySpace is now positioning itself as a separate destination that you go to in addition to Facebook, one with a much heavier media focus. I think it's the best thing they could be doing now - playing to their strengths.

<comment><USER7> agreed. they're pivoting, not surrendering.

<comment><USER8> It's a strategic retreat right? lol.

It's a surrender, they're going to another battlefield in an effort to try to save themselves, but have already given up the big money to Facebook. Facebook is the next generation human and social database, myspace is... a music discussion site?

</comment></comment></comment><comment><USER9> I sometimes log into MySpace just to see how bad it still is. Their frontend developers still don't appear to care about user experience or have any design sense. They've smattered the site with ajax, rollovers, effects, etc, and as usual there's ads all over the place. Picture browsing is even more of an eyesore than it was before. As if MySpace wasn't taxing on the CPU enough already.

<comment><USER10> Their frontend developers did that? You sure? I'd say their management/marketing/sales/some idiot with more seniority than anyone else with any common sense did that. The frontend developers were simply the guys that had to code it in.

<comment><USER11> I've always felt the site was just to slow because of the amount of elements and images on a page. While the new design looks okay it really doesn't nothing to address this major problem. For someone on a sub optimal connection or using an older browser I'd imagine myspace would be a horrible experience.

</comment></comment></comment><comment><USER12> MySpace is not what it used to be, but I still don't think its dead. Facebook has eclipsed it as the mainstream social networking site but there are still things MySpace does better.

Notably, you just can't do as much with your profile on Facebook as MySpace, especially for bands. Whether that's a bug or a feature is in the eye of the beholder.

As an example, compare the Snowgoons' FB and MySpace pages:

<http://www.facebook.com/SnowgoonsMusic>

<http://www.myspace.com/Snowgoons>

The 28-year old me likes the FB page better, but a 15-year old me would have _loved_ the MySpace page.

<comment><USER13> Exactly - The whole purpose of myspace is the fact that they have every single band on the planet. Google a bandname and thanks to an agreement between google and myspace the band's myspace page will be one of the top results. It's the fastest way to check out and quickly listen to an artist you might be interested in.

This is a feature that Facebook lacks and i never understood why they didn't include options to offer some kind of media showcase on artist fanpages. A simple music player would make a big difference.

Today soundcloud seems to be the new myspace (just talking about myspace' music features here), a role that could have easily been filled by facebook.

<comment><USER14> As a musician I set up a MySpace page, but disliked the site so much, I shut it down. Soundcloud on the other hand ... that I really like and the API makes it much easier to incorporate into your site, something MySpace never really figured out (maybe now they do)

<comment><USER13> i'm also a musician and some years ago a myspace page was absolutely necessary and even back that it looked like crap. i'm glad that soundcloud came into the market - focussing on its main feature: music. Only minimal social features - i guess they know that this stuff happens elsewhere.

</comment></comment></comment></comment><comment><USER15> Hm..I'm afraid that..I am in fact getting old. I try to fight it, I really do, but I'm afraid it's inevitable.

Did anyone else find the use of that picture a little tasteless?

<comment><USER16> Yes. TechCrunch is not exactly known for tact.

</comment></comment><comment><USER17> What are the odds that anyone would ever go to Myspace looking to see Facebook statuses? Just one more nail in the coffin I guess.

<comment><USER18> OTOH doesn't it make it easier for some of the Myspace holdouts to remain there? Myspace still has a large base in some niches, e.g. musicians, from what I'm told.

I don't use either service, so I really don't know or care beyond that.

</comment></comment><comment><USER19> "MySpace is huge in Japan"

<comment><USER20> "Big in Japan"?

<http://www.youtube.com/watch?v=c98qdFQF7sw>

Warning: 80's overdose possible!

<comment><USER21> Dear sir: <http://www.youtube.com/watch?v=-RwjpG4Xh60>

</comment></comment></comment><comment><USER22> Hang on, let me crank up the article title drama wheel. Ah snap, it's already at 11.

</comment><comment><USER23> <http://www.lhup.edu/~dsimanek/hell.htm>

Relatively speaking, maybe. Or maybe not. Or both!

</comment><comment><USER24> I personally think they should focos on bands, musicians, and teenagers.

Regardless of whether or not its a good move by MySpace, i think its a little low class of FB not to send their CEO. Yes we all know the almighty FB is king and the MySpace is now officially making it known that they are riding 'bitch.' It's almost like they are proving a point.

I personally don't like it.

</comment><comment><USER25> Just shows that the Network effect can be a massive help or a wicked enemy.

</comment><comment><USER26> I can't get over how ugly their logo is. Can't. Sorry.</comment>


DOMAssistant blows out of the water other frameworks - <AUTHOR> http://www.domassistant.com/slickspeed/

<comment><USER2> Tests should not be created by the creators of one of the subjects of the test.</comment>


OpenSSL Security Update - 1.1.0a, 1.0.2i, and 1.0.1u - <AUTHOR> https://blogs.akamai.com/2016/09/openssl-security-update.html <comment><USER2> I guess this is an example of "coordinated disclosure" gone wrong. The releases haven't been published by OpenSSL yet and the Akamai post has been public for around 1-2 hours (but the OpenSSL announcement earlier this week did mention that _" these releases will be made available on 22nd September 2016 at approximately 0800 UTC"_ [0])

[0] [https://mta.openssl.org/pipermail/openssl- announce/2016-Sept...](https://mta.openssl.org/pipermail/openssl- announce/2016-September/000076.html)</comment>


Ask YC: What podcasts do you subscribe to? - <AUTHOR>

Educational, entrepreneur-oriented, hacking / geekery? <comment><USER2> Great one from my alma mater: <http://edcorner.stanford.edu/podcasts.html> . Just take a look at the guests over the years.

<comment><USER3> I second that, Entrepreneurial Thought Leaders is outstanding.

</comment></comment><comment><USER4> I normally listen to these entrepreneurship blogs. I don't download them.

1\. Will Schroter's blog [http://blogbard.com/blodio/blogmainpage?type=blogbard&pl...](http://blogbard.com/blodio/blogmainpage?type=blogbard&playurl=http%3A%2F%2Ffeeds.feedburner.com%2Fwils- big-blog)

2\. Ask the wizard

[http://blogbard.com/blodio/blogmainpage?type=blogbard&pl...](http://blogbard.com/blodio/blogmainpage?type=blogbard&playurl=http%3A%2F%2Ffeeds.feedburner.com%2Faskthewizard)

3\. Ashish's world [http://blogbard.com/blodio/blogmainpage?type=blogbard&pl...](http://blogbard.com/blodio/blogmainpage?type=blogbard&playurl=http%3A%2F%2Fwww.latestinindia.com%2Fwp- rss2.php)

4\. A lot of people lissten to blog.pmarca.com.

Techy/geeky blogs to listen to:

Techdirt, readwriteweb, gigaom, techcrunch (There are links for them on their main page <http://blogbard.com>)

</comment><comment><USER5> <http://freelanceswitch.com/podcasts> Great podcast about freelancing. Enjoy.

</comment><comment><USER6> Fun & Enjoyment:

CBC's The Vinyl Cafe (8/10) The Merlin Show (on extended hiatus) (8/10) PopTech conference (8/10) TED conference (10/10) This American Life (9/10) Tiki Bar TV (video podcast) (8/10)

Tech: Diggnation (8/10) The GigaOm Show (6/10) MacBreak Weekly (obviously only for macheads...) (8/10) net@night (7/10) TWiT (9/10)

Entrepreneurship: DJF Entrepreneurial Thought Leaders Seminar (6/10) Chicago GSB (graduate school of business) (8/10) Venture Voice (on extended hiatus) (9/10) O'Reilly web 2.0 conference (7/10)

</comment><comment><USER7> If you're a nerd/geek/dork (like me) you'll love Radiolab. Simply the best radio show ever.

<comment><USER8> Thanks for bringing attention to this. I just started listening to one of the shows; aside from the interesting content it's also really well produced.

</comment></comment><comment><USER9> _"... What podcasts do you subscribe to? ..."_

I don't so much subscribe as dip into these links every once and a while when I need to vegetate or want to do something away from the keyboard. There are a few others but they are pretty much listed (npr, edcorner ... etc).

ITConversations ~ <http://itc.conversationsnetwork.org/>

ABC Science show ~ <http://www.abc.net.au/rn/scienceshow/>

BBC Science ~ <http://www.bbc.co.uk/radio/podcasts/directory/genre/science/>

TED (vid + mp3) ~ <http://www.ted.com>

</comment><comment><USER10> Freedomain Radio - <http://www.freedomainradio.com/podcasts.html>

If you you really want to get challenged intellectually, this podcast is for you...

</comment><comment><USER11> Pod casts i like: CNET - Buzz out loud - Keeps me up to date with tech news TWiT - This week in Tech (Leo Laporte) Security Now (Also from TWiT) - Excellent Security podcast. very educational BBC Documentry archive - Excellent documentries Learn French By Podcast

</comment><comment><USER12> Harvard Business Review Ideacast. <http://www.hbsp.harvard.edu/b02/en/hbr/hbr_ideacast.jhtml> Surefire way to become a better entrepreneur.

</comment><comment><USER13> <http://venturevoice.com>

There's lots of good stuff on <http://itconversations.com>, too.

</comment><comment><USER14> I recommend www.podiobooks.com if you are interested in hearing some non-geeky stories. I have really enjoyed listening to some of their content over the last few years. adf471587879rzq

</comment><comment><USER15> Just of note: I'm not surprised that nobody here subscribes to TWiT. MIT's online lectures are quite good, but I wouldn't call them a podcast I suppose.

</comment><comment><USER16> Here's a past thread on this topic <http://news.ycombinator.com/item?id=37818>

</comment><comment><USER3> This American Life, NPR Shuffle, The Economist, The Ethicist, the Welch Way...

The Bugle from the Guardian is hysterical.

</comment><comment><USER17> None, though I occasionally download individual recordings when the topic and/or speaker interests me.

</comment><comment><USER18> None

<comment><USER19> Since I don't have a commute or other dead time, sitting around listening to someone talk is maddeningly slow and or distracting compared to being able to glance over a written article.

<comment><USER3> I like to listen while I eat, do errands, do laundry...

</comment></comment></comment><comment><USER20> "Off the hook" and "off the wall" from 2600.org

</comment><comment><USER21> yeah venturevoice rocks

some of the webmaster radio shows are good - Net Income, SEO Rockstars

</comment><comment><USER22> www.radiolab.org (just pure awesome)

www.audible.com (audiobooks for long drives and flights)

</comment><comment><USER23> escapepod.org All work and no play, etc.</comment>


Minimal selection API for IE5+ and all modern browsers (in Coffeescript) - <AUTHOR> https://gist.github.com/1022198

<comment><AUTHOR> This is reworked from my other project, IERange (<https://github.com/timcameronryan/IERange>).

Rather than include a full duplication of DOM Ranges for old IE browsers, this API normalizes the most important capabilities of DOM Ranges and TextRanges (getting/setting anchors, and directionality). This can be included in a JavaScript library without much overhead, and any other essential DOM Range capability (deleteContents(), setStartBefore(), etc.), can be duplicated as needed by working with the DOM itself.</comment>


Ask HN: Mojolicious or Catalyst? - <AUTHOR>

I have been wanting to use Perl for a Web App that I've been wanting to develop. I've brought the frameworks down to Mojolicious or Catalyst. I'd like to use TT2 as the templating, which I know both can do. Or are there any other Perl frameworks that out do both of these? <comment><USER2> Just compare the websites. <http://mojolicio.us> vs <http://catalystframework.org></comment>


Bitcoin now computes more hashes in 6secs than there are grains of sand on Earth - <AUTHOR> https://seebitcoin.com/2016/06/understanding-bitcoin-the-childhood-game-that-rules-the-network/ <comment><USER2> Impressive. Never really got into the bitcoin game and have a lot of questions, like the purpose, who it benefits etc.

<comment><USER3> It doesn't solve relatable problems for most people

but it is pretty awesome if you notice a reason to use it

</comment></comment><comment><USER4> Imagine if they were all running Boinc instead. We might have cured Zika already.

Gridcoin pays cryptocurrency for 'mining' through a proof of work concept using Boinc credit.

But who cares where the carbon emissions from all that mining go? Someone else's atmosphere, no? At least a productive output would offset the needless waste.

A quote: "Researcher Sebastiaan Deetman came to the conclusion that at bitcoin's current level of expansion, it will require 14 gigawatts of electricity to run by the year 2020 — an amount of energy equivalent to that of a small country, like Denmark. At the current time, a single bitcoin transaction requires as much electricity consumption as the daily consumption of approximately 1.6 American households."

via [http://www.breitbart.com/tech/2016/04/03/bitcoin-could- consu...](http://www.breitbart.com/tech/2016/04/03/bitcoin-could-consume-as- much-energy-as-denmark-by-2020/)

</comment><comment><USER5> The amount of energy wasted by miners is atrocious. I wonder how many tons of CO2 have been pumped into the atmosphere thus far as a result?

It just seems like a colossal waste, using all of this computing power to solve pointless math problems.

<comment><USER3> > The amount of energy wasted by miners is atrocious.

that awkward moment when you quantify it next to something else, like incandescent lights

<comment><USER6> But there is actually no limit to what can be pissed away mining imaginary points. There is a reasonable limit, and actual utility, to lights.

<comment><USER3> There is actual utility to what the miners get, and it usually worth more than their cost of electricity.</comment></comment></comment></comment>


Desktop as a service in the cloud. A myth or a reality? - <AUTHOR> http://www.getapp.com/evaluation-center/interview-with-charles-black-ceo-of-nasstar-plc

<comment><USER2> _Distinctive – because we are focusing on delivering quality, innovation and most importantly a solution that is relevant for businesses today._

This sounds incredibly corporate. Like it's just the product of a vast marketing committee. I'm not sure what this service provides that Microsoft Office + Dropbox can do.</comment>


Rust for C++ programmers – part 7: data types - <AUTHOR> http://featherweightmusings.blogspot.co.uk/2014/05/rust-for-c-programmers-part-7-data-types.html?m=1

<comment><USER2> Discussion currently on front page:

[https://news.ycombinator.com/item?id=7791900](https://news.ycombinator.com/item?id=7791900)</comment>


How to Boil the Perfect Egg - <AUTHOR> https://www.nytimes.com/2019/09/23/dining/how-to-hard-boil-eggs.html <comment><AUTHOR> tldr: steam 11 minutes

<comment><USER2> Which apparently yields a boiled egg with not too tough whites that has a relatively easy shell to peel.</comment></comment>


Show HN: jot – the command-line journal that is distributed and encrypted - <AUTHOR> https://github.com/schollz/jot <comment><USER2> Looks quite interesting. Any thoughts of writing a version for Android?

<comment><AUTHOR> I'd like to, though it requires git and I'm not sure if that can be installed on Android.</comment></comment>