Confessions of an Apple Store Employee - <AUTHOR> http://www.popularmechanics.com/print-this/confessions-of-an-apple-store-employee?page=all <comment><USER3> > _"We usually have to tell them that if they unlock their iPhone, it won't > work. That it's going to be like a $700 paperweight, and that the antenna > will fry itself on T-Mobile. Of course, that's not true, but that's what we > tell them."_

I didn't know Apple stores have an Evil Genius bar.

<comment><USER4> Reminds of when Cablevision was first rolling out broadband internet and the tech who came to set it up insisted that attempting to connect the modem to more than one computers would "knock out cable TV for everyone on your block."

<comment><USER5> To which my reply would be: "and why would I care?"

</comment></comment></comment><comment><USER6> >eventually get to the Genius Bar

that answers the question that puzzled me a bit about that name. In itself it isn't a bad marketing targeted for customers, yet it happens to be also successful marketing targeted at the employees. That's really genius, pun intended, as usually help/support desk is very unpopular, churning job leading nowhere and here they turned the tables and made other jobs leading to it instead.

<comment><USER5> I bet the average first-year help desk employee at an investment bank is making a lot more money than the senior "Geniuses" at Apple Stores. Retail is retail.

<comment><USER6> first-year help desk employee at an investment bank is at the bottom of the bank's barrel, nobody at the bank would want their job.

<comment><USER7> I think that was his point, "genius".

</comment></comment></comment></comment><comment><USER8> The thing I found most interesting about this article was actually an omission. The hiring process at Apple retail is the most insane thing I've ever experienced. First fill out the application in store. Then follow up with the manager of the store for weeks on end. Then have a quick interview in store. Then go to a group interview with 50 other people. Then go to a panel interview with 3 others. This process took 6 months start to finish and I didn't even get the job. The reason why people want to be a "genius" in store is they already went thru hell and back just to get in the store.

<comment><USER9> Psychologists say the harder it is to gain entry to a group (club, frat, union, guild, company) the more irrationally positive folks feel about it once they're a member. Human nature -- if they went through all that trouble to get in, it must be worth it.

<comment><USER10> I like Eliezer's take on that regarding science and cults - <USER2> knowledge is given away so freely it must be worthless, at least with cultish bullshit you have to work hard before they tell you about each bit, so it feels really substantial and valuable.

<http://lesswrong.com/lw/p0/to_spread_science_keep_it_secret/>

</comment></comment></comment><comment><USER11> The Public Computers section is really interesting. Homeless people that come in to do webcasts? Kinda cool.

People changing keyboard settings to Russian? Pfft, everyone knows the real evil genius is in setting it to Arabic -- not only is it illegible, but the screens are flipped

<comment><USER12> Or Hebrew.

<comment><USER13> If you have ever studied both of them, even briefly, you know Arabic is much less legible than Hebrew. It takes a lot of work even to figure out what the letters are in Arabic (they all look like parts of a doctor's signature).

</comment></comment></comment><comment><USER14> The thing I found by far the most interesting is about the sales process / incentives.

On the one hand, Apple is not encouraging dysfunctional competition within the team:

> We aren't paid on commission, but you fear for your job if you're not > selling enough.

And yet on the other, they are:

> We have a posted list of our metrics, and you can see everybody else's. It > shows you how much money each person is pulling in for the company. If you > aren't doing very well, you start getting manager meetings, and they sit you > down and try to figure out why you aren't selling more.

The best explanation of this I've seen is in the work of W. Edwards Deming. His Red Bead experiment demonstrates that in any system, there will be variation that is due to the system itself, and not due to the individual efforts of the staff themselves. Because of this, league tables and metrics randomly and arbitrarily punish people for performance variation that is out of their control.

<http://www.redbead.com/what/>

Deming even listed "evaluation by performance" as one of the seven deadly diseases afflicting the western economy.

[http://en.wikipedia.org/wiki/W._Edwards_Deming#Seven_Deadly_...](http://en.wikipedia.org/wiki/W._Edwards_Deming#Seven_Deadly_Diseases)

On that basis, I find it strangely contradictory that a company with such ongoing quality efforts as Apple has produced a sales process absent of the disease of sales commission, yet still suffering the disease of Evaluation by Performance.

It's possible, however, that Apple is being more sophisticated than the post author realises. If they have statistical control charts, for example, there may well be no contradiction here at all (they would only be reviewing exceptional outliers). But with Apple's tight-lipped nature, I don't know if the evidence to decide that is out there yet.

</comment><comment><USER15> I was always under the understanding that working retail is a pretty unglamorous job.

<comment><USER16> You mean you've actually managed to escape working in retail at some point in your life? How did you pull that off?

<comment><USER17> eh, it's not that hard. For some of us, it's actually easier. I've never had a difficult time finding technical positions, but retail jobs? As a young person, I tried and was rejected. Front-line tech support is appropriate in the same career stage as a retail job. The minimum skills required are not that different[1], however, as far as I can tell, if you are willing to learn, tech support offers a better upward path than retail, so it does make long- term sense to choose level 1 tech support over retail.

[1] The minimum level for both jobs, as far as I can tell, consists primarily of explaining simple things and dealing with angry people. If you want to climb the ladder in tech support, obviously, you need to go somewhat beyond that, but you won't get fired if you can do those two things.

</comment></comment></comment><comment><USER18> You need a verifiable SSN to get an iPhone?!?

Attn drug dealers, you can get BlackBerries and Droids from Boost or Cricket without giving any personal information.

<comment><USER19> Not for the iPhone itself, but for the account with AT&T or Verizon.

<comment><USER20> They don't really need the SSN. If they press for it, tell them you're on a visa and you haven't been assigned one. Verizon entered 123-45-678 for mine and it let them create the account :P

<comment><USER21> Be prepared to put up a $400 security deposit if you have no credit/ssn

<comment><USER20> I got that with AT&T, not Verizon though.

<comment><USER22> That is... odd. I'm pretty sure that was an exception, not the rule. You must have caught the customer service rep on a good day :)

</comment></comment></comment></comment></comment></comment><comment><USER23> this all is largely positive - not really a confession, more bragging...

be curious how other customers have fared in the store, for me it has rarely been great [http://www.mikolayczyk.com/2010/02/quotes-from-apple- store.h...](http://www.mikolayczyk.com/2010/02/quotes-from-apple-store.html)

certainly rings true that they get power hungry and very arrogant as a result

<comment><USER24> The Apple store in Philly just opened recently and they've been wonderful so far. Ex.: A few weeks ago I spilled water on my iPhone, rendering it unusable in important respects. I went to the genius bar (unscheduled), told the genius guy I spilled water on it. He was a bit surprised, said that no one ever admits to doing that, and gave me a new phone, for free.

<comment><USER25> iPhones and iPods have LCI (liquid contact indicators) built into them. It's a little white spot that turns red if exposed to moisture. Often, the LCI can be triggered for all sorts of reasons (not just dropping your phone in a puddle either, think a few drops of rain etc.)

<http://support.apple.com/kb/HT3425> (applies to macs and keyboards but the same point remains)

People tend to get very hostile when there's some problem with their iPhone and get denied service due to the LCI being triggered, even if that isn't the root cause of the current problem. Hence the genius guy's surprise and over- generous response.

(Disclaimer: former Apple employee)</comment></comment></comment>


The Scent of Bad Psychology - <AUTHOR> https://putanumonit.com/2018/09/07/the-scent-of-bad-psychology/ <comment><USER2> It's been said before but needs to be said again: this is happening everywhere in the biomedical and related fields. The neurosciences, oncology... the list goes on and on. Anyone take a look at AI research lately? How much tweaking is going on there? How much is your big data finding due to the idiosyncracies of your particular dataset?

Psychology, as has historically always been the case--meta-analysis itself bloomed largely from the field--is the one turning inward and looking at itself. And it's getting crap from people who love to use it as their favorite punching bag.

The irony of this article is that it's psychologists looking at other psychologists, doing the math etc.

The truth is closer to the second hypothesis by the author: bullshit is incentivized everywhere in academics. Reality is less interesting, harder, more incremental. Everyone wants the next genius savior to point to because it's a simpler story than reality. Sexy means more pubs, more grant money.

<comment><USER3> I've recently been at a master students' thesis defense where a method was discussed that is supposed to speed up algorithms by deciding whether to run them on GPU or CPU. The method is to look at the program code with deep learning algorithms.

Fair enough. There's apparently a set of benchmarks that other papers used and were reused here to compare against. Yet the student was unable to answer my question as to how bias in this dataset was treated or even what percentage of the algorithms was faster on GPU to begin with, they only showed how much better their deep learning fit the data. As in, if 99% is faster on GPU I could as well just provide that as a static answer and be better than any machine learning.

I frankly find it tragic that this kind of stuff is not ironed out in academia. This was was in a very highly ranked university.

</comment></comment><comment><USER4> The key takeaways for me from the 80000 hours test ([https://80000hours.org/psychology-replication- quiz/](https://80000hours.org/psychology-replication-quiz/)):

> Papers that report boring or common-sense results seem to be true very > often. Cognitive psychology (e.g. memory and perception) mostly held up.

> ...it turns out for most people "if the claim of the paper doesn't make > intuitive sense, the paper is wrong" is a good shortcut that works about 70% > of the time.

Generally, the closer to the "metal" (e.g., memory, perception, learning) and the more pedestrian the psychological finding is, the likelier it is to hold good.

I might be giving in to a bit of hindsight bias here, but I have come across this in the psychology of learning myself. It has been a bit underwhelming I must admit. "Good sleep, retrieval practice, elaboration, paying attention, meaningfulness and organization, and spaced repetition result in better learning; massed-practice is not very useful for long-term retention". Well, no kidding!

</comment><comment><USER5> Taleb's grandma seems pretty down to earth.

<comment><USER6> Taleb himself is pretty awesome.

</comment></comment><comment><USER7> Is priming really bullshit? I watch batters go through all sorts of little rituals to get their heads in the game.

If you wash 5 times a day before prayers, yeah, washing your hands is going to put you in a mindset.

Or maybe I just don't understand what priming is.

<comment><USER8> There was a recent finding (not yet replicated!) that performing rituals of _any_ kind aids in building/retaining self-control/willpower.

This is kind of _like_ priming, but—if it holds true—this result would actually take away a lot of the explanatory power of most priming studies. A simpler explanation than a bunch of specific "doing X makes you think about Y which makes you do Z" priming relations, is "doing {any number of things} releases striatal dopamine, that increases executive functioning, which allows you to do {any number of things}."

</comment></comment><comment><USER9> Is there a list of websites that discuss the latest research? Open to all fields...

<comment><USER10> Nature and Science are excellent starting points.

</comment></comment><comment><USER11> > Imagine yourself washing your hands. Do you feel any impact whatsoever on > your desire to rationalize decisions? Now imagine explaining this study to > Nassim Taleb's grandma.

What's the joke with invoking Nassim here? That he is some kind of anti- pretentious truth-teller whose grandma is even further on that spectrum?

<comment><USER12> The image at the top of that section is a tweet of him describing his "grandma test".

</comment></comment><comment><USER10> The author offers rules of thumb for evaluating research, but is a business school grad (MBA? BBA?) and "a data science amateur, from the Latin _amare_ – to love." Am I misunderstanding something? On what do they base these instincts and intuitions for evaluating research papers? If they wrote a blog post on rules of thumb for evaluating code, would you take it seriously?

The "scent" here may be something on my shoe ...

<comment><USER13> [https://osf.io/8pc9x/](https://osf.io/8pc9x/)

As per the large amount of links in the article, the author seems to have passed the test themselves, then talked about what heuristics they used to get their result (that matched the studies linked). Did you read the article?

One can argue with their heuristics, of course, but dismissing them because they're open about their background is a classic middlebrow dismissal. This isn't presented as rigorous science.

<comment><USER10> > Did you read the article?

> classic middlebrow

That is classic unwelcome behavior on HN. Maybe you can keep your judgements of other commenters and hot take reactions to yourself and stick to the subject.

I didn't criticize them for being open about their background, but because they lack expertise to offer expert opinions. Again, if they wrote an article on rules of thumb for evaluating code or on reading radiology images for cancer - things they appear equally expert in - it wouldn't be taken seriously here.

> As per the large amount of links in the article, the author seems to have > passed the test themselves

Huh? Lots of links pass some test? Reading a bunch of links make you an expert? I guess the Internet really is full of experts.

<comment><AUTHOR> > _That is classic unwelcome behavior on HN._

I'd say middlebrow dismissal is even more classic: [https://news.ycombinator.com/item?id=4693920](https://news.ycombinator.com/item?id=4693920)

> _I didn 't criticize them for being open about their background, but because > they lack expertise to offer expert opinions._

You didn't criticize the author's opinions or any specific signs of insufficient expertise however. Just their credentials.

Credentials != expertise (one can be an expert by self-studying, in fact in CS many are).

<comment><USER10> What would be productive is discussing the expertise of the author, or if you don't think that's of interest, not discussing it at all. I notice you posted the original article; I'm not criticizing you for posting it but perhaps this is getting personal?

Insulting commenters with derogatory names is unwelcome and lowers the quality of discussion; I don't care if you have a link to it. Tangentially, it is a good example of how even the smallest behavior by a leader, such as pg, set a norm for many followers: people are digging up his posts 6 years later like they are scripture - wisdom, law and conduct to study. pg is just a person, not a prophet; YC and HN are wonderful, but his every act is not wisdom or law. (No insult to pg; the same could be said of Linus Torvalds, Steve Jobs, and everyone else who ever worked in SV or lived on Earth, including me.)

> Credentials != expertise (one can be an expert by self-studying, in fact in > CS many are)

Credentials are a strong, widely used sign of expertise. The CS experts who lack educational credentials are practitioners, professionals in the field; they have other credentials. The author is neither educated in the field nor is a professional or practitioner in it. Everyone else weighs those things heavily. Do you hire or take the advice of people with neither education nor experience in the domain?

The article in particular requires expertise: It's a series of rules of thumb, things that are gained only through extensive experience doing the task described. And it requires doing it with success - not all experience is good experience - and apply good analysis to that experience. Rules of thumb for physics research from someone who washed out are not the same as those from Stephen Hawking; how about rules of thumb from someone who never has studied nor practiced physics, but read some links? Again, if they wrote 'rules of thumb for evaluating code' on the same basis, it would be ridiculous.

In general, everyone knows that the Internet is full of people spewing nonsense they know nothing about, but even smart people often seem to fail to apply that to particular instances, especially when other psychological drives apply - such as when what is said moves or inflames them. The downvotes and criticisms (this is an observation, not a complaint) seem to be because my comment disrupts that drive (in this case, the inflammatory narrative about social sciences). That's ok and what I expected. My prediction is that if I wrote the same about a different topic, then the response would be different: If what I wrote agreed with the crowd (e.g., if the author said psychological research was high quality and I questioned their expertise), then I'd expect many to agree with me, but for the same bad reason. Inflammatory stuff is, disappointingly, still hard to talk about rationally.

<comment><AUTHOR> > _I notice you posted the original article; I 'm not criticizing you for > posting it but perhaps this is getting personal?_

No, but the above is an attempt of second-guessing my psychology (and also irrelevant).

Now, you follow with a long list of opinions of the importance of credentials. What I don't see is any opinion on why the particular arguments are not enough. Can you enlighten us? You could point to someone with credentials which refutes them for example.

If you just want to raise a general principle (totally unrelated to the quality or not of the arguments in TFA) then it seems that you suggest that we should only discuss articles written by people with credentials on a topic.

If so, why should we accept this suggestion of yours then?

Where are your credentials on epistemology (seeing that this is an epistemological issue)?

<comment><USER10> > a long list of opinions of the importance of credentials

Those haven't been addressed. I think calling them "opinions" is a big stretch; it's a reliable statement of fact that humanity very often relies on the credentials of the speaker, including their training and experience, for evaluating information they communicate.

> What I don't see is any opinion on why the particular arguments are not > enough.

It's up to the person making the claims to establish them. We can't spend our time refuting everything anyone says. In fact, making claims in order to force others to refute them is a well-known propaganda technique for creating dysfunction, in part because refuting takes far more time than just making claims. (This article is not propaganda, in case anyone thinks I'm implying that.)

The arguments made by the author are expert judgments; there's little to address by other means.

> it seems that you suggest that we should only discuss articles written by > people with credentials on a topic

Personally, I want to spend my time on the best knowledge I can find. Life is short. Identifying quality information depends frequently on credentials; I think that's uncontroversial.

You keep taking things to an extreme - "only" \- and to be clear, those are your words and not mine. Somewhere else I also made that explicit. EDIT: Here it is, copied from another subthread to keep everything in one place:

 _Of course, let 's not make this binary, one or the other [merits or credentials]. Everyone uses both to varying degrees, and other signals too (if the post used bad English, for example, many would doubt the author's credibility)._

 _In this case, I lean more heavily on expertise because the content is a product of expertise - rules of thumb. If they wrote 'I can create cold fusion in a teacup', I'd lean heavily on the merits - can they do it or not?_</comment></comment></comment></comment></comment></comment></comment>


Facebook Causes 'Psychotic Episodes and Delusions', Study Claims - <AUTHOR> http://nocamels.com/2013/05/facebook-causes-psychotic-episodes-and-delusions-study-claims/

<comment><USER2> If you follow the link to read the rest of the article, you'll see it takes you to The Daily Mail. We don't ever believe The Daily Mail, do we boys and girls?

<comment><USER3> I see their (mostly fake) stories nonstop, so apparently no one ever stops biting.

<comment><USER2> Well, sure. P.T. Barnum was correct, after all. But we can at least try to spread some inoculation around, can't we?

</comment></comment></comment><comment><USER4> What nonsense.

Relationships gone sour can cause mental illnesses to come to the forefront, regardless of venue. Facebook likely isn't causing psychosis any more than telephones and divorce have for decades.</comment>


My Lessons in Life - Azim Premji  - <AUTHOR> http://cl.ly/2eNA

<comment><USER2> So, this would be a brief summary of what he said:

1)Focus on your strengths 2)What you get from working your ass off is worthwhile,nothing else. 3)You cant be successful always 4)Humility is important 5)Strive for excellence 6)Never give up 7)Dont sacrifice values

What is interesting that you could come up with a set of opposing points for most of his "lessons", and sound plausible:

1)A true hacker has works on multiple languages,platform- Be a "Rockstar" Generalist 2)Laziness,Impatience,Hubris are the hallmark of a hacker. Note Laziness comes first :) 3)You cant be successful always- Nobody denied that! 4)If you get rich, you shouldnt be ashamed of it. 5)Strive for excellence-no debating that. 6)Fail fast, Fail often . 7)Startup and values- Zynga? Facebook? I remember reading a thread of ethics in startups on HN, and one person questioning somebody how he managed to get a good nigh's sleep, after what he had done.

</comment><comment><USER3> I have been hearing lot about working on one's strengths. It is also mentioned in the 4 Hour Workweek and it does make sense. But let's say I am good at design, does it mean I shouldn't learn programming (something I am doing right now)?

Even if one is not planning to master something that he isn't good at, does it make sense to invest or waste time on it? Our brains are effectively good at certain things and rather mediocre in other things but it does learn things and thus changes if persistent effort is made.

Over to someone who wants to chip in with some better explanation.

Thanks to OP for sharing the article though.

</comment><comment><USER4> Premji treats his employees like wage slaves <http://en.wikipedia.org/wiki/Vivek_Paul> And he refuses to share ownership of Wipro and owns 85% of it.

</comment><comment><USER5> <http://en.wikipedia.org/wiki/Azim_Premji>

</comment><comment><USER6> Does someone know the source?

<comment><USER7> [http://www.milligazette.com/Archives/2004/01-15Sep04-Print-E...](http://www.milligazette.com/Archives/2004/01-15Sep04-Print- Edition/011509200453.htm)</comment></comment>


Web Frameworks (An Ah-ha Moment) - <AUTHOR>

Just had an ah-ha moment building a user interface for a new SaaS product written in Perl. Catalyst is cool, Mojolicious is awesome, but Dancer is sweet.
Anyway ... why am I creating redundant views, forms, etc for basic crud operations ... AH-HA, so that why developers prefer CakePHP, Ruby-on-Rails and the like (non-Perl) frameworks.
Convention of Configuration, now get the F$#% outta my way framework. <comment><USER2> You're right, people choose those frameworks because they're easy, but which frameworks gets more criticism? Mojolicious or any PHP framework? Configuring isn't totally a bad thing, yes it's long and sometimes difficult but in the long run, stuff will usually just work. Unlike Ruby on Rails where there are problems with routing and templating, or in PHP where there isn't a clear module system which makes it hard sometimes for complex web applications.

</comment><comment><USER3> frameworks? I don't need no stinkin' frameworks!</comment>


Tell HN: Startup Weekend Project (asw3) - <AUTHOR>

We made this for atlanta startup weekend 3 as a fun project. Tell us what you think: http://fakewhale.com/<p>And the project is cash-flow positive after selling some automatically generated t-shirts. <comment><USER2> Looks like a good use of technology for the satire of a service and community that takes itself far too seriously :)

</comment><comment><USER3> For the link-lazy: <http://fakewhale.com></comment>


Still Debating With Plato--Is Mathematics Discovered or Invented? - <AUTHOR> http://www.sciencenews.org/view/generic/id/31392/title/Still_debating_with_Plato <comment><USER2> False Dichotomy.

<comment><USER3> This frustrates me. I want to respond to you, but you blipped out a two word response that could mean so many things. In what way is it a false dichotomy. Unless you are saying someone invented it and then now humans are discovering it. Or what? I mean I just don't even know where to begin given the lack of original explanation on your part.

<comment><USER2> Sorry. I just think it could also be neither.

To me, it doesn't seem to makes sense to say mathematics is out there, waiting to be discovered, because of godel's incompleteness. What would the structure of the mathematics that is waiting to be discovered be? For any of mathematical system, there is a true statement in that system that cannot be proven. If mathematics is out there waiting to be discovered, I don't understand how Godel's incompleteness would stand when applied.

I also don't think mathematics is some cultural artifact people invented.</comment></comment></comment>


Growing Neural Cellular Automata: A Differentiable Model of Morphogenesis - <AUTHOR> https://distill.pub/2020/growing-ca/?/ <comment><USER2> Also check out the "Moveable Feast Machine", Robust-first Computing, and this Distributed City Generation example:

[https://news.ycombinator.com/item?id=21858577](https://news.ycombinator.com/item?id=21858577)

DonHopkins on Oct 26, 2017 | parent | favorite | on: Cryptography with Cellular Automata (1985) [pdf]

A "Moveable Feast Machine" is a "Robust First" asynchronous distributed fault tolerant cellular-automata-like computer architecture. It's similar to a Cellular Automata, but it different in several important ways, for the sake of "Robust First Computing". These differences give some insight into what CA really are, and what their limitations are.

Cellular Automata are synchronous and deterministic, and can only modify the current cell: all cells are evaluated at once (so the evaluation order doesn't matter), so it's necessary to double buffer the "before" and "after" cells, and the rule can only change the value of the current (center) cell. Moveable Feast Machines are like asynchronous non-deterministic cellular automata with large windows that can modify adjacent cells.

Here's a great example with an amazing demo and explanation, and some stuff I posted about it earlier:

[https://news.ycombinator.com/item?id=14236973](https://news.ycombinator.com/item?id=14236973)

Robust-first Computing: Distributed City Generation:

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

<comment><USER3> David Ackley's[1] real-life hardware implementation of Robust-First Computing is at a new YouTube channel called the T2 Tile Project[2]. He jumpstarted the new channel after retiring from University of New Mexico. He releases new updates every Tuesday like clockwork. This is all he thinks, talks, dreams about and _builds_. It's amazing.

[1] [https://www.cs.unm.edu/~ackley/](https://www.cs.unm.edu/~ackley/)

[2] [https://www.youtube.com/channel/UC1M91QuLZfCzHjBMEKvIc-A](https://www.youtube.com/channel/UC1M91QuLZfCzHjBMEKvIc-A)

<comment><USER4> Ackley is literally thinking hundreds of years ahead of the hardware we have. It's a shame that his ideas will probably never make much of a dent in the current computing ecosystem

</comment></comment></comment><comment><USER5> One day Von Neumann architecture will be superseded by something more similar to cellular automata. Von Neumann architecture makes sense from a logical perspective which is not concerned with physical space or scaling efficiency. Chips designed as distributed meshes similar to neurons in the brain will eventually take us much further.

<comment><USER6> From what I understand, what we call Von Neumann architecture was actually his 'first draft' prototype, and what you describe is what he would have built next - if he hadn't died of brain cancer.

<comment><USER2> I posted about this and typed in some stuff from his book earlier:

[https://news.ycombinator.com/item?id=21858465](https://news.ycombinator.com/item?id=21858465)

John von Neuman's 29 state cellular automata machine is (ironically) a classical decidedly "non von Neumann architecture".

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

He wrote the book on "Theory of Self-Reproducing Automata":

[https://archive.org/details/theoryofselfrepr00vonn_0](https://archive.org/details/theoryofselfrepr00vonn_0)

He designed a 29 state cellular automata architecture to implement a universal constructor that could reproduce itself (which he worked out on paper, amazingly):

[https://en.wikipedia.org/wiki/Von_Neumann_universal_construc...](https://en.wikipedia.org/wiki/Von_Neumann_universal_constructor)

He actually philosophized about three different kinds of universal constructors at different levels of reality:

First, the purely deterministic and relatively harmless mathematical kind referenced above, an idealized abstract 29 state cellular automata, which could reproduce itself with a Universal Constructor, but was quite brittle, synchronous, and intolerant of errors. These have been digitally implemented in the real world on modern computing machinery, and they make great virtual pets, kind of like digital tribbles, but not as cute and fuzzy.

[https://github.com/SimHacker/CAM6/blob/master/javascript/CAM...](https://github.com/SimHacker/CAM6/blob/master/javascript/CAM6.js#L4569)

Second, the physical mechanical and potentially dangerous kind, which is robust and error tolerant enough to work in the real world (given enough resources), and is now a popular theme in sci-fi: the self reproducing robot swarms called "Von Neumann Probes" on the astronomical scale, or "Gray Goo" on the nanotech scale.

[https://en.wikipedia.org/wiki/Self- replicating_spacecraft#Vo...](https://en.wikipedia.org/wiki/Self- replicating_spacecraft#Von_Neumann_probes)

[https://grey-goo.fandom.com/wiki/Von_Neumann_probe](https://grey- goo.fandom.com/wiki/Von_Neumann_probe)

>The von Neumann probe, nicknamed the Goo, was a self-replicating nanomass capable of traversing through keyholes, which are wormholes in space. The probe was named after Hungarian-American scientist John von Neumann, who popularized the idea of self-replicating machines.

Third, the probabilistic quantum mechanical kind, which could mutate and model evolutionary processes, and rip holes in the space-time continuum, which he unfortunately (or fortunately, the the sake of humanity) didn't have time to fully explore before his tragic death.

p. 99 of "Theory of Self-Reproducing Automata":

>Von Neumann had been interested in the applications of probability theory throughout his career; his work on the foundations of quantum mechanics and his theory of games are examples. When he became interested in automata, it was natural for him to apply probability theory here also. The Third Lecture of Part I of the present work is devoted to this subject. His "Probabilistic Logics and the Synthesis of Reliable Organisms from Unreliable Components" is the first work on probabilistic automata, that is, automata in which the transitions between states are probabilistic rather than deterministic. Whenever he discussed self-reproduction, he mentioned mutations, which are random changes of elements (cf. p. 86 above and Sec. 22.214.171.124 below). In Section 188.8.131.52 above and Section 1.8 below he posed the problems of modeling evolutionary processes in the framework of automata theory, of quantizing natural selection, and of explaining how highly efficient, complex, powerful automata can evolve from inefficient, simple, weak automata. A complete solution to these problems would give us a probabilistic model of self- reproduction and evolution. [9]

[9] For some related work, see J. H. Holland, "Outline for a Logical Theory of Adaptive Systems", and "Concerning Efficient Adaptive Systems".

[https://www.deepdyve.com/lp/association-for-computing- machin...](https://www.deepdyve.com/lp/association-for-computing- machinery/outline-for-a-logical-theory-of-adaptive-systems-efsWyqMa1l)

[https://deepblue.lib.umich.edu/bitstream/handle/2027.42/5578...](https://deepblue.lib.umich.edu/bitstream/handle/2027.42/5578/bac4296.0001.001.pdf?sequence=5)

[https://www.worldscientific.com/worldscibooks/10.1142/10841](https://www.worldscientific.com/worldscibooks/10.1142/10841)

<comment><USER6> Thank you very much for this. I originally learned about the Von Neumann / CA connection here on HN, but never really found a lot of sources for it. I've been deeply wanting to learn more. You've posted a lot of awesome sources above - is there anything else you'd care to add, for someone who wants to know as much as possible about what Von Neumann was up to?

<comment><USER7> Von Neumann was a friend and colleague of Claude Shannon, the founder of information theory (mathematical theory of communication). Back then, it was a really small world of scientists working in this field. Von Neumann, Turing, and Shannon spent a lot of time complimenting each other's work. Shannon eventually discovered that information encoding/decoding is optimally done as a collection of bits (the name was later coined by John Archibald Wheeler "it from bit"). At some point Shannon recommended to Turing that his machine could be whittled down to only two states. Von Neumann was inspired by Turing's work, which led him to create the Von Neumann architecture. Von Neumann was brilliant but he relied heavily on Shannon and Turing, and vice versa. And to answer your question... Shannon wrote a paper on that very subject out of deep admiration of his friend Von Neumann. [https://projecteuclid.org/download/pdf_1/euclid.bams/1183522...](https://projecteuclid.org/download/pdf_1/euclid.bams/1183522376)

<comment><USER6> Very cool. Thank you.

</comment></comment></comment></comment></comment></comment><comment><AUTHOR> One of the authors here.

Feel free to ask any questions!

We encourage you to play with the attached Colab with which you can train models from scratch in <30min.

<comment><USER8> Very cool. I've only just skimmed the article (and quickly), but I was wondering if instead of generating pictures one could apply this to generating a CA (or parameters for a CA) that does certain types of computations? This would allow us to evolve or find CAs that could perform certain types of multi-stage computations in a highly parallel fashion and could be readily implemented in FPGAs (for example).

Oh, sounds like I just found a fun project to work on.

<comment><AUTHOR> We have a lot of future applications and directions in mind, including the feasibility of applying this to distributed computing and consensus. In particular, the idea of training a model generating CA parameters instead of having a CA fit a specific pattern is of great interest to us and the synthetic biological field. Feel free to get in touch.

</comment></comment></comment><comment><USER7> Spectacular. I think most people might be lost on the significance of what has been done here. I suspect that it's because the framing the solution focuses on is based on morphogenesis. That is, in fact, not what is going on here. A more suitable metaphor would be the functional basis of a visual hallucination. The very same mechanics of the demonstrated result are described in Oliver Sack's book on the subject. Learned patterns are procedurally generated through probabilistic inference of adjacent feature vectors. Dreams work in a similar way. To prove that this is what is going on, I suggest training the CA on multiple frames of an animation of the lizard walking.

The research is really promising but the conclusion that the authors come to is that this system can be used to generate self-organizing agents that evolve and replicate. There is no possibility of this result based on the approach. However, they've actually created something much better than the intended result... a real-time auto-complete for visual scenes.

<comment><USER9> Other works of the authors on deep dreaming reflect better what you describe here.

The astonishing results with regard to morphogeneses cannot be emphesized enough: A complex structure is robustly encoded in a single function and can be reproduced from a single grid cell.

</comment></comment><comment><USER10> Great work, very much related to our previous work on CA morphogenesis and replication:

[https://ieeexplore.ieee.org/abstract/document/8004527](https://ieeexplore.ieee.org/abstract/document/8004527)

[https://link.springer.com/chapter/10.1007/978-3-319-45823-6_...](https://link.springer.com/chapter/10.1007/978-3-319-45823-6_2)

[https://www.mitpressjournals.org/doi/abs/10.1162/ARTL_a_0019...](https://www.mitpressjournals.org/doi/abs/10.1162/ARTL_a_00191)

[https://www.mitpressjournals.org/doi/abs/10.1162/978-0-262-3...](https://www.mitpressjournals.org/doi/abs/10.1162/978-0-262-33027-5-ch010)

[https://ieeexplore.ieee.org/abstract/document/7008733](https://ieeexplore.ieee.org/abstract/document/7008733)

</comment><comment><USER11> I played with "regenerating" models by filling the field with multiple overlapping copies and repeatedly changing the angle, with rather weak results.

As the shapes are disintegrated and rebuilt, patterns can form: the eye forms brown and white thick straight "sausages", the yellow striped fish forms similar but smaller strips, the butterfly and the pretzel exhibit crawling shapes with partial features and empty space, the christmas tree can develop stripes on a green background instead of balls, the lizard reforms very effectively recovering empty space, the ladybug reforms partially (heads in a sea of wing material), the explosion produces an uniform patch of the interior section as growth extinguishes the border.

</comment><comment><USER12> This kind of reminds me of this comment (moveable feast engine): [https://news.ycombinator.com/item?id=17877155](https://news.ycombinator.com/item?id=17877155)

<comment><USER2> David Ackley's talks are amazing and mind expanding.

Public Lecture: Artificial Life for Bigger & Safer Computing

Talk presented October 8, 2014 as part of the John von Neumann Public Lecture series at the Center for Complexity and Collective Computation (C4) in Madison, Wisconsin. Video recorded by Alan Ruby of the Wisconsin Insitute for Discovery.

[https://www.youtube.com/watch?v=NqSnoJ- VGH4](https://www.youtube.com/watch?v=NqSnoJ-VGH4)

He stakes out a bold iconoclastic position that the ridiculously successful deterministic approach to computing is a dead end that will not scale, but he's not just like Clifford Stoll predicting that nobody's going to ever shop over the internet (bless his heart for owning up to that ;), because he's taking a much longer term view, and his beliefs don't contradict von Neumann, but actually reflect what von Neumann predicted.

John von Neumann actually predicted that his own approach was going to fall down.

The future "...logic of automata will differ from the present system of formal logic in two relevant respects:

1\. The actual length ... of the chains of operations will have to be considered.

2\. The operations of logic ... will all have to be treated by procedures which allow exceptions (malfunctions) with low but non-zero probabilities."

"...natural organisms are constructed to make errors as ... harmless as possible. Artificial automata are designed to make errors as ... disastrous as possible ... We are ... much more 'scared' by the occurrence of an isolated error and by the malfunction ... behind it. Our behavior is clearly that of overcaution, generated by ignorance."

-John von Neumann, 1948

</comment></comment><comment><USER13> I think I broke the Matrix: [https://i.ibb.co/8zGRcNd/Screenshot-20200211-230621-Firefox-...](https://i.ibb.co/8zGRcNd/Screenshot-20200211-230621-Firefox- Beta.jpg)

I erased the lezard but the tail and it grew back very weirdly. How robust is this method?

</comment><comment><USER14> _The models described in this article run on the powerful GPU of a modern computer or a smartphone. Yet, let's speculate about what a "more physical" implementation of such a system could look like. We can imagine it as a grid of tiny independent computers, simulating individual cells. Each of those computers would require approximately 10Kb of ROM to store the "cell genome": neural network weights and the control code, and about 256 bytes of RAM for the cell state and intermediate activations. The cells must be able to communicate their 16-value state vectors to neighbors. Each cell would also require an RGB-diode to display the color of the pixel it represents. A single cell update would require about 10k multiply-add operations and does not have to be synchronised across the grid. We propose that cells might wait for random time intervals between updates. The system described above is uniform and decentralised. Yet, our method provides a way to program it to reach the predefined global state, and recover this state in case of multi-element failures and restarts. We therefore conjecture this kind of modeling may be used for designing reliable, self-organising agents. On the more theoretical machine learning front, we show an instance of a decentralized model able to accomplish remarkably complex tasks. We believe this direction to be opposite to the more traditional global modeling used in the majority of contemporary work in the deep learning field, and we hope this work to be an inspiration to explore more decentralized learning modeling._

I've been hoping that someone would build the above computer for over 20 years. I used to just get laughed at, or people would mock me for not knowing what I'm talking about (even though I have a computer engineering degree). That transitioned to at least speculating on what I was saying, and will soon transition to being old hat. Oh well.

But I look at computers today with a billion transistors, running at the same 3 GHz as they did 20 years ago, and it breaks my heart. I imagine what might have been, if we had arrays of hundreds/thousands of z80 or x86 or 68000 or DEC Alpha or MIPS chips to do whatever we wanted with. Imagine the emergent behavior that might have happened. Instead we're locked into this proprietary/narrow way of working with shaders and specialized neural computers doing SIMD and I just find it all so uninspiring. But I'm hopeful that some of the recent work with getting these older processors running on FPGAs will bear fruit.

[https://news.ycombinator.com/item?id=17833829](https://news.ycombinator.com/item?id=17833829)

[https://news.ycombinator.com/item?id=19329083](https://news.ycombinator.com/item?id=19329083)

[https://news.ycombinator.com/item?id=10089807](https://news.ycombinator.com/item?id=10089807)

[https://news.ycombinator.com/item?id=3267428](https://news.ycombinator.com/item?id=3267428)

[https://news.ycombinator.com/item?id=19885901](https://news.ycombinator.com/item?id=19885901)

[https://www.google.com/search?q=processor+on+FPGA+site:news....](https://www.google.com/search?q=processor+on+FPGA+site:news.ycombinator.com)

</comment><comment><USER15> Game changing!

<comment><USER16> Why?

<comment><USER9> This is the foundation for 'programming' morphogenesis of multi-cellular synthetic life in the far future. Of course you first have to get the programming of monocelluar life to work.

Also, the reverse might be possible, i.e., decompiling genetic code from phenotype and so on.

<comment><USER17> Foundation for programming the morphogenesis. Yes.

morphogenesis - concept is fundamentally flawed. It's not thoroughly put in theories. Computing has touring test. Does concepts like morphogenesis has any tests? Nope. So building something on top of half baked concepts will not scale/sustain/be a foundation.

If we really had understood morphogenesis in the past and the it is 100% put in theories, we would be having a virtual world mimicking biological world by now.

<comment><USER9> Yes, morphological models can be tested. You can hypothesize to reactions to alterations of an organism structurally and chemically (morphogenes). Diffusion-reaction models are available for certain kind of morphogenetic behavior. See also [https://www.brandeis.edu/now/2014/march/turingpnas.html](https://www.brandeis.edu/now/2014/march/turingpnas.html)</comment></comment></comment></comment></comment>


Go Challenge 3: write a photo-mosaic generating web application - <AUTHOR> http://golang-challenge.com/go-challenge3/

<comment><USER2> This challenge seems a bit over the top. The task is to write a fully functional service for creating a photo mosaic service that accesses third party apis for sourcing the photos. Constraints are that you are not allowed to use any libs from outside the include standard library (though you are expected to write tests using some tool the challenge author is apparently trying to push)... The whole things has to be deployed and publicly accessible.

Seems like quite a bit of work for the chance of winning a bunch of ebooks.

<comment><USER3> > Create a fully functional web app

> Do not use anything but standard library

Is this a high school homework or a realistic real world challenge? No thanks.

I'd say it's not just a bit over top, but ridiculously over the top. Maybe it's just me.

<comment><USER4> No, the Go standard library really does have everything you need to do all this. The only thing that makes me go "Really?" is the actual process of generating the photo mosaic, but that's just because despite appearances that's actually a substantial challenge no matter what library support you have (barring one custom designed for this use case). Technically, yes, the Go library has what you _need_ to do that, but you'll be writing an awful lot of image processing code on your own to get even "good" results.

[http://golang.org/pkg/image/](http://golang.org/pkg/image/)

I also find it amusing that you are "banned" from "ghosting" (putting a faint copy of the image below the mosaic), as that would actually require additional code to implement, and, again, even more so to do _well_...

Everything else is definitely present out-of-the-box. This is a absurdly large task for a "challenge", IMHO, but it's all perfectly doable out-of-the-box.

<comment><USER5> Granted I haven't written my own mosaic generator, but it seems little more than iteration and averages.

<comment><USER4> If you make the pictures really small relative to the mosiac, to the point that pictures are very nearly just pixels, yes, that works.

However, the next time you see a professionally-done photomosaic, take a moment and really look at it. Especially look at the sharp lines of contrast in the original image. If the mosaic draws from a large source of images, you'll find that you can follow the line through the source images themselves, not just between images. For instance, if you've got a sharp horizontal beige/blue line, you will find that the algorithm will pick up an image of a sunny desert day or something where the line for the horizon is approximately correct.

To do a quality job requires at least edge detection and some fuzzy matching of the primary edges of images, which also means you need to break the image down into more than just averages, you need to be counting the colors of segments of the images.

Nothing impossible about this, of course, it's just that it's an awful lot of work for a challenge like this, considering the stakes.

<comment><USER5> I am probably missing something, but I would think that treating each sub- image as its own grid would be more than enough for a decent mosaic generator. It seems to me you would get your edge detection for free this way. I just don't think it would be hard, but, again, I haven't done it myself so I'm sure there are surprises within.

</comment></comment></comment></comment></comment></comment><comment><USER6> This seems more like creating an entire service from start-to-finish rather than an exercise on learning a language. I appreciate the authors are likely trying to do this because the exercise touches on so many different areas, but personally I'd be put off by this, when learning it's always more enticing to go for bite-size challenges, so you can see progress easier and create milestones/goals.

</comment><comment><USER7> How long do you think this would take for someone already familiar with the language and web app development?

<comment><USER8> Maybe a week, give or take a couple days, depending on how familiar you are with facebook API.

</comment></comment><comment><USER9> The challenge seems really boring to me.

</comment><comment><USER5> Two of the three examples seem to use ghosting. I wonder how much those sites make?

</comment><comment><USER10> ahh.. was hoping it'd be a stitching/mosaicing app</comment>


Bloomberg just bought CityLab and put half its reporters out of a job - <AUTHOR> https://www.motherjones.com/media/2019/12/bloomberg-just-bought-citylab-and-put-half-its-reporters-out-of-a-job/ <comment><USER2> "But the site started to show signs of struggle earlier this year when the Atlantic laid off CityLab's dedicated business staff. "The writing's been on the wall for a long time," one of the staffers said about CityLab's future with the Atlantic. Another staffer said that during the meeting Atlantic management had announcing its sale to Bloomberg Media, the management made it clear "that the company is really focusing on the Atlantic and that they just feel that they can't focus and invest in CityLab to make it robust.""

That's in the second to last paragraph in the article, which really makes this feel unfairly biased. If those jobs were doomed anyway, it's plausible that Bloomberg's saving several jobs that would be lost, instead of causing the loss of jobs as this title implies.

<comment><USER3> I think one issue I had as an occasional reader is that they were too invested in one perspective only.

Surely we need to study and be curious for things which can improve city life. There is a lot of good in that.

The one peeve I had is that "city-first PoV" made them a bit myopic and only wanted to see things though the lens of city life to the neglect of alternatives.

<comment><USER4> That's the topic they focus on though, and they do it well. It's CityLab, not CountryLife.

<comment><USER3> I agree with that and don't have a problem with that but their attitude is "we're right and they're wrong and we'll make them". CountryLife I would say wouldn't be as ideological about how people should live their lives.

<comment><USER4> You've got some rose-colored glasses on if you don't think people out in the country are ideological about how people should live their lives.

</comment></comment></comment></comment></comment><comment><USER5> Wait, so let me get this straight: _nine people_ lost their jobs over this and it's front page HN? Are we gonna have a nuclear war the next time a startup closes up shop?

Is there something special about The Nine that separates them from the hundreds of thousands of scientists and doctors and engineers and burger flippers who get laid off everyday?

Y'know, like, other than having journalist friends?

<comment><USER6> It's not about the nine people. It's about the perceived guileless neutering of a media outlet by a far more powerful entity with financial attachments to a financially formidable presidential candidate.

Of course, it's too early to know if the perceived outcome is the intended or actual outcome. Whatever the outcome, this is still an event remarkable far beyond the bounds of those nine journalist's social circles, regardless of where the actual cause falls on the continuum between incompetence and malice.

<comment><USER3> But they were let go before the deal happened, so if anyone is the baddie it's CityLab/The Atlanic itself!

<comment><USER7> Well, the remaining folks could have gone anywhere, but now that they're employees of Bloomberg Media, they're expressly forbidden for writing anything _critical_ of any Democratic candidate for President.

</comment></comment></comment></comment><comment><USER8> > "I don't want the reporters I'm paying to write a bad story about me," he > said on Radio Iowa. "I don't want them to be independent."

Did I read that right? "Don't want them to be independent"

What's the point of journalism then?

<comment><USER9> We don't _have_ journalism in the Unite States any more. We have a product to generate clicks and eyeballs so that ads can be sold.

<comment><USER10> Couldn't agree more. Journalism hasn't been independent ever since advertisers became the primary the customer and readers became the product being sold.

<comment><USER11> When has it been otherwise? I don't have numbers, but I suspect print subscriptions typically only cover delivery and printing costs, with maybe a little surplus beyond that. Advertising has always been what paid the bills for print publications.

<comment> barry-cotter This has _always_ been the predominant business model for periodicals. The other, much smaller alternative is paying a lot of money for access to what amounts to research, and it barely exists outside the financial markets.

</comment></comment></comment></comment></comment><comment><USER12> Journalism is a loss leader for people who have or want power.

It has seldom been anything else and with the current direct of things that is unlikely to change in the near future.

<comment><USER13> Who else has the money and drive to pay a bunch of artists—writers in this case—and publish their work.

If anyone did set out to be fair and unbiased the work would immediately be co-opted by someone's agenda, someone who either has or wants power, or more of it.

</comment></comment><comment><USER14> Might not have been the right financial model or the right content for Bloomberg, but the work CityLab does is essential to fix these large problems. Maybe city sourced funding model would work...

<comment><USER15> One of the recent HN postings from CityLab was authored by Brooks Rainwater, who works for the National League of Cities in their Center for City Solutions. [https://www.nlc.org/program-initiative/center-for-city- solut...](https://www.nlc.org/program-initiative/center-for-city-solutions)

NLC appears to have a "city sourced funding model". They have a web site [https://www.nlc.org/about-nlc](https://www.nlc.org/about-nlc) and a blog [https://citiesspeak.org/](https://citiesspeak.org/)

</comment></comment><comment><USER16> That article is so clearly biased, why is this front page? The author clearly is trying to grind their axe, instead of reporting news in a matter of fact way. First of, the headline claims Bloomberg the company laid off half the staff, while in the following sentence saying that it's actually the Atlantic who's doing the firing. But that's not done before putting a picture of Bloomberg the candidate, first, to make sure the headline and the picture are what strikes people's imagination.

Rather disgusting.

</comment><comment><USER17> That's too bad. CityLab has great content.

</comment><comment><USER18> Bloomberg has its own content management systems, and has data resources and such that CL doesn't have. CL was already losing money -- no harm in right- sizing it.

</comment><comment><USER19> It's a shame but I'm sure they are reducing staff with a duplicate function at Bloomberg.

This will continue to happen to publications that cant find a way to finance their operations. Employing a team to publish a publication is expensive so I dought subscriptions alone will be enough to support a team. I think it will have to be a combination of advertising, subscriptions and something else which we still have to define.

<comment><USER20> I guess the question is how does a larger publication like Bloomberg make money whereas a more specialized one like CityLab struggle?

Maybe the smaller publications can mimic their business model?

<comment><USER21> Bloomberg News likely does not make money (I.e. a profit).

The terminals do and very likely subsidize the news.

If the News side makes money, it's likely because they get to share all the administrative costs with the terminal side.

<comment><USER20> What's a terminal in this context?

<comment><USER8> Probably referring to the Bloomberg Terminal [0] as in the hardware/software product that offers real-time economic data and enables a large portion of the market's electronic trading.

[0] [https://en.m.wikipedia.org/wiki/Bloomberg_Terminal](https://en.m.wikipedia.org/wiki/Bloomberg_Terminal)

</comment></comment></comment></comment></comment><comment><USER22> _" But the site started to show signs of struggle earlier this year when the Atlantic laid off CityLab's dedicated business staff. "The writing's been on the wall for a long time," one of the staffers said about CityLab's future with the Atlantic."_

So CityLab was going to get axed, but in the end half of them get to keep their jobs, yet the article's slant is Bloomberg is a bad guy because of it.

</comment><comment><USER23> I'm shocked so much great content is put out by such a great team. Hopefully Bloomberg can invest more into the business.

</comment><comment><USER24> Bloomberg Media uses feel-good opinion pieces to accumulate trust and interest. Then, it uses this to drive a very specific agenda from the top brass. The company has used this strategy for years. Sheeple continue to upvote these pieces and serve special interests, though. The acquisition of CityLab is intended to capture more social capital and drive more political agenda when Mike Bloomberg makes his phone call. Firing half a company is essentially killing the mission and culture that was CityLab and confirms the acquisition strategy.

My advice to those who were fired is to organize and continue what you created elsewhere.

Note that Bloomberg has shills and PR working among us on Hacker News. They also have sentiment bots searching for comments such as mine and organize down votes. Hacker News Admins are not equipped to handle modern day communication control by powerful interests like Bloomberg.

</comment><comment><USER25> _Breaks pool stick over knee, throws one half on floor of newsroom_</comment>


An excellent Jekyll theme - <AUTHOR> https://github.com/Jack614/jalpc_jekyll_theme <comment><USER2> Nice, thank you. gonna take this for a spin tomorrow.</comment>


How to name things in programming - <AUTHOR> http://www.slideshare.net/mobile/pirhilton/how-to-name-things-the-hardest-problem-in-programming <comment><USER2> An important rule is missing here: variables should be named with their scope in mind. So if a variable is longer lived and has larger scope its name should be that much more descriptive because when you're looking at it the only thing that will tie the value of the variable to the context within which it can be used is its name.

So 'i' is fine for a loop control variable with a scope of five lines but totally inadequate for something expressing a larger and longer lived concept.

Ditto for function names and parameters to functions, if the function and the parameters are named properly understanding the function is trivial.

So if you write a chunk of code that exports one or more functions _that_ is where your effort should go, that's the public interface. The reduced scope of the rest of the code should make any naming issues much more limited.

This is also why it is good to assign _one_ person on a team to defining the interfaces between the code. That way you get consistency in naming which is a great thing to have in a codebase.

Anecdote time:

I once worked for a game programming company. One of the programmers there would name all his functions and variables for fruit and vegetables. It was his way of ensuring job security. Guess who got saddled with untangling the salad when he left the company.

cucumber(cherry, strawberry, orange);

Good luck with that...

<comment><USER3> Correspondingly, some objects don't need names at all.

        sorted(pairs, key=lambda p: p[1])

Though in that case you might prefer using the operator module.

        sorted(pairs, key=operator.itemgetter(1))

The aspect of Ruby that frustrates me the most is over-use of anonymous blocks when a good name would help me enormously.

<comment><USER4> > The aspect of Ruby that frustrates me the most is over-use of anonymous > blocks when a good name would help me enormously.

Ruby gives you enough tools to write code clearly with good names if you want to. I think your complaint might be more about the particular style of Ruby a certain programmer wrote than the language itself.

<comment><USER3> Correct, though I find that a language is more about the community and culture than the syntax itself.

</comment></comment></comment></comment><comment><USER5> Slide 41: _" If you don't know what a thing should be called, you cannot know what it is. If you don't know what it is, you cannot sit down and write the code."_

A few years ago, I programmed in Max/MSP (max4live, technically) for a while and one thing I found super-refreshing is the ease at which you could prototype and experiment your way to a solution just by not having to figure out what something should be called until you were good and ready. Ever since that time, I found that naming things is a big hindrance to evolving code from an experiment to a solution. Names get in the way until you're sure what the code is supposed to do (at which point, the above quote is true and you should be able to give it a descriptive name).

<comment><USER6> I agree, though there is a difference between being able to explain something and naming it. I've been known to forget the word "door", but I could quite happily explain how it worked.

<comment><USER7> Might be an outlier, IMO.

And I guess this is exactly why author wants programmers to learn from the masters of spoken langauges-- ability to use the right word(s) to explain the concept/abstraction/property/behaviour/type.

If one is unsure about how something works, then more often than not one would end up naming the thing wrong. By far and large, the most frustrating thing I've come across during code-reviews is generic names assigned to vars like 'buffer', 'arrays', 'queues' and so on... and SQL table names that have no relevance to the data being stored in them. It is a constant struggle to read and reason with such constructs. So if you know how something works, you are oblidged to name it approp.

Douglas Crockford in his 'JS: The Better Parts' talk at JSConf 2014 spoke about three responsibilities a developer must have:

1\. Make life of people using the software better and to not frustrate them, humiliate them, hurt them, confuse them.

2\. Make life of people maintaining/developing the software better . To not check-in cruft, bloat, and errors. Write the best code, and to not make anything worse.

3\. Make life of people managing the business/development easier.

<comment><USER8> What does "Make life of" mean? As a native English speaker, I don't understand it; I presume it means "Make life better for", though the closest we have in English is probably "Make light of", which means something completely different (and is slightly funny in this context).

<comment><USER9> He means "Make _the_ life of people..." in each case. The phrasing without "the" sounds to me like Powerpoint-Speak... leaving out minor words in order to fit more bullets onto a slide. Those minor words are usually grammatically necessary, but in the context of a slide presentation the presenter's verbal part of the presentation clarifies ambiguities in the visual part.

<comment><USER8> Ah, thank you, you must be right. "Make life better for people..." would in each case have been grammatical and slightly more comprehensible to me!

</comment></comment></comment></comment></comment></comment><comment><USER10> The author states:

"Most of the things programmers say about comments in code are excuses for not writing any comments at all"

This is true. Here is my excuse:

1\. Follow all rules for writing good comments 2\. Comment is now short, crisp and concise 3\. Apply "Extract Function" refactoring, use comment as function name 4\. Your comment is a compiled entity now 5\. Write testcases for the function that explicitly explain corner cases and weird behavior 5\. You have no comments in the code any more

This rule can be applied almost all the time, although it can be quite hard to use when global variables or wide scopes are used (e.g. 1000 line for-loops in C). Comments are either obvious or they're lying. Why would you write something that the compiler will ignore eventually?

<comment><USER11> > Why would you write something that the compiler will ignore eventually?

Because your real target for your code is not the compiler, it's your co- workers, who will have to go back and read and modify your code. Plus, they may not be able to contact you with questions about your code.

A single well written comment can save your co-workers from having to read a hundred lines of test code (and correspondingly, test code boilerplate). Why not give them that kindness?

> Comments are either obvious or they're lying.

This argument only applies to poor comments, which were not maintained alongside the code. If you just remember that the audience your code was written for is not the compiler, it makes more sense.

<comment><USER12> >>Because your real target for your code is not the compiler, it's your co- workers, who will have to go back and read and modify your code.

Your co-workers _and_ your future self. :)

<comment><USER13> in rare cases: your customer

</comment></comment></comment></comment><comment><USER14> I first realized how hard is naming when I programmed in Forth. Amusingly, Forth is sort of a point-free type of language - everything happens on the stacks and there's no such thing as local variables, so a good chunk of the 'naming problem' goes away - but trying to squeeze a functionality in one or two lines can be difficult. The reason for this constrain is that I programmed mainly with a "block editor", a limited kind of editor that only 16 lines of 64 characters at a time. This wasn't an artificial constrain because I was working on a fully self-hosted hobby system, which had no file support (the [floppy] disk space was presented as a series of 1K blocks = 2 sectors = 80x16 bytes) and "block editors" are the easiest thing to implement in this case.

Despite the point-free nature of Forth, there's still the problem of naming functions ("words" in Forth lingo) and global variables. Programming in Forth is an interesting exercise because you quickly see the relationship between how you factor your code and how you name your "words". You discover by yourself many of the rules in the slides. But I find this is really the case when one uses the 64x16 block editor I mentioned. Using standard files and editors removes a lot of the constrains, but they also allow more sloppy coding (which may be a good thing if you have something better to do; e.g. you just need to write a throwaway script to get the job done).

In my experience you can spend a lot of time (re)factoring and (re)naming things. Sometimes it's valuable because e.g. it helps you understanding the problem, and sometimes you are just bikeshedding yourself.

</comment><comment><USER15> When structuring code, elegance and efficiency always take top priority.

However, when naming, my philosophy is always clarity over elegance.

for example (in python):

         def reverseListAndAddOneToEachElement(input_list):

Ugly, but clear. I don't even need to write out the full definition you already know exactly what it does.

<comment><USER16> I like the logic of this, but it goes against all books that i've read to keep it short. Why do we need to keep it short?

<comment><USER17> In this case it's a symptom of poor cohesion and separation of concerns. If you find you're having to give very long names for things, it's worth looking for a way to decompose it into separate things that each do one simple thing. Then more than likely writing the code that composes the separate objects with the right operations will be the perfect substitute for the long name, and it will also be easier to maintain, since you won't have to update both the variable name and the logic that uses it; rewriting the actual expression or logic where it is used will take care of both tasks in one. This is what I usually take from the principle of letting the code itself be your documentation, where reasonable.

<comment><USER15> Who says reverseListAndAddOneToEachElement isn't defined via the composition of smaller "separate things that each do one simple thing?" The naming convention still stands as it is not a "symptom of poor cohesion and separation of concerns."

</comment></comment></comment></comment><comment><USER18> This seems like its trying to force advice for one domain to another when its not appropriate.

I disagree strongly with one or two of the rules. But an even bigger problem is that some (or even most) of the advice either has little value or doesn't really apply to programming. In english, shorter is better, but I'd much rather a longer class name that I can understand than one that's abbreviated to the point where I am forced to look up what its doing. A good rule of thumb that I try to follow is that for the most part, your code should be self explanatory (comments should cover the rest). We have these rules in programming for how to write variable names, and they're better than the ones in that slide. Another rule, that trumps any other is consistency. If you're working on a project that uses the passive voice (which I think works better for some cases) then use that. The nature of programming is different than natural language writing, and so it makes more sense that these rules that are trying to be transferred over are ill equipped to do so.

I mentioned that some of the things just don't make sense As an example, this was one of the slides, "when writing a novel a writer should create living people; people not characters. A character is a caricature." What does this mean? Its ironic that the slide preaches being short and to the point, and yet is bloated with abstract fluff.

<comment><USER19> This. Some of the advice only works out of context, for example:

> What's an _appointment_list_? A _calendar_

No. Chances are that "appointment" is already a thing in your domain language -- the language you'd use to talk to your customers and stakeholders -- and so _appointment_list_ is a much clearer name than _calendar_ , as long as we make the reasonable assumption that it names a collection of appointments.

<comment><USER20> None of the examples of just using a single word seemed like improvements to me. appointment_list to calendar was by far the worst—calendar can mean a lot of things, and a list of appointments was not even the first thing that comes to mind for me—but in all of the cases the single word meant something significantly different than the thing it was replacing.

</comment></comment></comment><comment><USER21> I agree with everything except abbreviations, but to be honest, I think my worst habit it just trying to use words with the same number of characters for different variables so they align well with monospace font.

e.g.

        int num = 42;
        int acc = 0;

instead of;

        int n = 42;
        int acc = 0;

and it gets worse when things get complicated;

        vector<int> dist;  // stands for distances
        vector<int> excs;  // stands for excesses

Does anyone else have this problem?

<comment><USER22>
        int n   = 42;
        int acc = 0;

Fixed

Edit: Install [http://wbond.net/sublime_packages/alignment](http://wbond.net/sublime_packages/alignment) and add this key binding `{ "keys": ["ctrl+shift+a"], "command": "alignment" }`.

<comment><USER2> That's actually right against the style guideline of many projects which tell you explicitly not to do this but to simply put the = sign and value right after the variable name and be done with it. Lining them up serves no purpose and does not in fact make the code easier to read.

<comment><USER22> To be honest it actually makes code cleaner and therefore easier to read. It's like design have you heard about grid? this is the same thing. Your eyes have to flow the lines. If not everything seems a mess.

<comment><USER23> > To be honest it actually makes code cleaner and therefore easier to read.

It does not logically follow from the code being "cleaner" that it is easier to read. Having to scan across a field of whitespace to get to the number makes it harder to read and easier to make mistakes. Having the indentation of the number be unrelated to the length of the variable name adds another aspect that makes it harder to read and easier to make mistakes.

It's also harder to edit, which makes you do fewer edits that make the code materially better.

<comment><USER24> It depends on context. For example, here is a function from a project I'm working on:

        parseModifier : String -> Outcome Modifier
        parseModifier s = case s of
          "shift"   -> Ok Shift
          "ctrl"    -> Ok Ctrl
          "alt"     -> Ok Alt
          "meta"    -> Ok Meta
          "command" -> Ok Meta
          "windows" -> Ok Meta
          x         -> Err <| "Unknown modifier: " ++ x

I find it easier to read as is rather than if I dropped the alignment:

        parseModifier : String -> Outcome Modifier
        parseModifier s = case s of
          "shift" -> Ok Shift
          "ctrl" -> Ok Ctrl
          "alt" -> Ok Alt
          "meta" -> Ok Meta
          "command" -> Ok Meta
          "windows" -> Ok Meta
          x -> Err <| "Unknown modifier: " ++ x

As developers we spend more time reading code than editing it. Optimizing for readability seems like a better goal than optimizing for edit speed. Besides, most editors have functionality to align code. When I am looking over a file, the second example looks like a jumble of words to me, while the aligned version seems easier to parse (ha).

<comment><USER25> I agree that unaligned switches/pattern matches are bad (and in fact, there is an utility for OCaml which will nicely indent your pattern matches).

</comment></comment></comment></comment></comment></comment></comment><comment><USER26> Nice article. I loved the hieroglyph page; I think that functional programming failed for years as an engineering discipline because of the culture of that style of code.

My early days of OOP, I started keeping a thesaurus on my bookshelf at work. Probably went overboard on naming for a while, but reigned it in. (Every writer shudders at their first efforts. Hoo boy).

We would also hold short discussions about names for things (I don't see this in the article's list of tools: Involve other people in the names you are choosing. After all, they'll be using the code, too).

<comment><USER27> "I loved the hieroglyph page; I think that functional programming failed for years as an engineering discipline because of the culture of that style of code."

I don't quite follow your observation, but if you are suggesting that this function would be better with verbose, Englishy naming, I think you are mistaken. Quite the opposite, the parametrically is better illustrated with hieroglyphs.

Regarding failing "for years as an engineering discipline", are you suggesting that imperative programming was "successful" because of the reliance on using naming to communicate intent in the midst of rampant state mutation and unbridled complexity?

</comment></comment><comment><USER28> One Clojure style guide actually _recommends_ [0] certain single-letter names for input parameters: x and y for numbers, n for an integer, s for a string, f (and g and h) for functions. These are used in the clojure.core namespace, and their use elsewhere is thus (presumably) justified by a general common understanding of their meanings.

[0] [https://github.com/bbatsov/clojure-style- guide#naming](https://github.com/bbatsov/clojure-style-guide#naming)

<comment><USER29> Functional programming languages use single-letter parameter names as a tool to help condense functions and allow easy parsing. This is largely due to their desire to emulate mathematical formulae.

Interestingly, functional programming leads to a different naming custom that this presentation didn't really cover. To write "functionally" you want to have pure single-purpose functions and the name is supposed to describe _exactly_ what the function does. If you can't write a short enough function name then your function is probably too long and should be broken up into functions that _can_ be given concise names.

Another interesting functional programming naming custom is that a function that transforms data (fully FP) should describe the final result rather than the action of changing it. So if you transform a string to json, the function should be simply called `json` rather than `string-to-json` or `json-parser`. This is because when reading the code you can clearly see that the string is now json (it can almost look like a type). Of course, if that function does _anything else_ , then naming it `json` is wrong but the function is also breaking away from being pure and single-purpose.

<comment><USER30> Actual mathematical functions have some of the most useless, non-descriptive or vaguely metaphorical names going, so I'm not sure promoting an isomorophism with FP is a good thing. Examples: "bessel", "spherical_harmonic", "delta", "zeta"... Math is hard, and the terseness of mathematical notational conventions is one of the things that makes it so. Names that carry meaning with them are an aid to the naive user, and that is a good thing.

Secondly, naming a function "json" requires the user read the code or the comments to figure out what it does, and blocks the user of the name for anything else that returns json. Suppose rather than a string you have a list that you need translated to json... what do you name the function?

There are three levels of documenting code: naming, comments, and the code itself. Function names should be chosen such that other developers can reasonably guess at a glance what the function does, because the two most comon use-cases for names are:

1) reading someone else's code, where digging in to find out what "json" does is orders of magnitude more work than reading "json_from_string"

and

2) figuring out how to do something in a given codebase, where skimming over a list of function names and picking out one or two that look likely for deeper investigation is orders of magnitude faster than reading the docs or the code for every function to find out which obscurely-named function does the job you want.

Longer, more fully descriptive names aid the user in the excecution of these use cases.

<comment><USER31> > Secondly, naming a function "json" requires the user read the code or the > comments to figure out what it does, and blocks the user of the name for > anything else that returns json. Suppose rather than a string you have a > list that you need translated to json... what do you name the function?

`json` --polymorphic languages make naming easy!

</comment></comment></comment></comment><comment><USER32> Thanks for the thorough write-up Peter! This pack of slides addresses "naming things" to depth that it could have been a little book...

I miss a few things though.

1\. Short functions can use abbrevs; because I can keep track of them.

2\. "text_correction_by_editor" might convey a lot more info then "edit"; especially in code where "edit" (and derivative) are heavily overloaded. For instance I can imagine "text_correction_by_user" also exists, or "text_reload_by_editor".

3\. Then the Java'isms. E.g. AbstractWhateverSomethingManager. This is more part of the language, paradigm (OO w/ big love for design patterns) and type of money used to pay for development (enterprise money). Its verbose, deterministic and very "correct". Once you are used to the jargon you quickly know what they do, as they explicitly encode one of more patterns in their name.

<comment><USER33> Java class names are like Haskell function types. In fact, there are libraries that can autogenerate implementations for database logic by the name of the interface and methods alone, much like you can guess what the function does just by the types it operates on.

<comment><USER32> > Java class names are like Haskell function types.

They are conventions (like Haskell types) but they lack the laws.

</comment></comment></comment><comment><USER34> This is a timely article because I was just talking to a friend of mine that works at Google and is about to start an internal project that will be written in Go.

I told him I'm not sure I'd ever fit into the Go community because the Go community seems to like variable names that are extremely short. For example:

      func (h Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

I've even been "gently corrected" in #go-nuts on Freenode when I've shared code and I used "res" instead of "w" and "req" instead of "r" \-- they told me my longer variable names wasted space and made it harder to read.

Perhaps my brain works different, but I find variable names that are actual words much easier to read.

<comment><USER35> The thing about the arguments to an http.HandlerFunc is that everyone uses w and r for the argument names because everyone else does. Additionally, if you're writing a http.HandlerFunc, you're likely repeatedly exposed to a bunch of other http.HandlerFuncs in standard library code and gorilla/mux, all of which use w and r.

Because of this, anyone who's been wrangling HandlerFuncs for more than a few days tends to converge on w and r. At this point it's no more a problem than using short variables like d for distance or r for radius in math formulas.

As an aside, I have a file open right now with a struct member called "TentativeSpacesPerIndent int"; I'm not worried — yet — about how ungainly long it is because I'm still trying to figure out what indices I need to keep track of, and the last thing I want to do is confuse myself into using one type of index when I need another, or perhaps I need to track of something else entirely. On the other hand, I have

      func NewScanner(bs []byte) Scanner

and all the thought I put into the name of the argument is "if a single byte should be a 'b', what should a slice of bytes be? 'bs'." That seems to be sufficient length for a five-line function.

</comment></comment><comment><USER36> Link to the video [https://skillsmatter.com/skillscasts/5747-how-to-name- things...](https://skillsmatter.com/skillscasts/5747-how-to-name-things-the- solution-to-the-hardest-problem-in-programming)

</comment><comment><USER37> I was always too ashamed to admit I use a thesaurus heavily while writing code. Glad I'm not alone.

</comment><comment><USER38> I'm sure there is useful content in there, but holy crap is it ever obscured by most awful presentation.. Neither the slides nor the transcript are by any measure readable!

<comment><USER24> Really? I found the slides very readable.

</comment></comment><comment><USER39> What did he mean by "never use passive when you can use the active (respect grammatical rules for identifiers)", on the slide 15?

<comment><USER40> passive:

He was told by a doctor to take a pill

active:

The doctor told him to take a pill

<comment><USER39> He provides examples `class PlanEvents`, `class EventPlanner`, `class Scheduler`. To me, they all seem to be active. Any thoughts?

<comment><USER41> I also found the examples confusing. What I got is they are all nouns (respect the grammar rule of having nouns for class names) but `PlanEvents` reads like data that is going to be processed (passive) whereas `EventPlanner` and `Scheduler` are concepts that process data (active). They have a verb: "plan" and "schedule".

<comment><USER39> Thanks for clarification. I think I disagree with the author here. In my experiences, it's sometimes awkward to use '-er,' '-or' suffixes to turn name into concepts that process data (active) e.g. JobUpserter, ...

</comment></comment></comment></comment></comment><comment><USER42> I clicked through the first twenty or so slides, but really I find myself disagreeing completely with him. When you write don't use cliches but the meaning of AbstractConfigProxyFactory is clear and convey more information than anything else.

<comment><USER43> An AbstractConfigProxyFactory is a base class or interface for creating factory classes that return configuration objects(possibly lazily - through a proxy object - in order to avoid unnecessary disk IO or network traffic).

Two cases where you might want different factory classes(and hence need a common interface or base) are a factory for 'production' code and a factory that only generates mock objects for unit tests.

Having spent 5 minutes trying to understand what this class might do, I disagree with your claim that the name is clear.

</comment></comment><comment><USER44> > It sounds like writing prose is as hard as writing code. Who knew?

Donald Knuth for one. He published Literate Programming in 1984. [http://www- cs-faculty.stanford.edu/~uno/lp.html](http://www-cs- faculty.stanford.edu/~uno/lp.html)

</comment><comment><USER45> I think you tend to develop naming habits after the environment you work with. C programmers follow Unix conventions, Java programmers create AbstractObjectFactoryFactory classes, and so on. It just feels natural.

</comment><comment><USER46> My MacBook (with Chrome) does not like this site -- within 5 minutes of opening it and clicking through slides, it got very loud and hot and the battery went down by ~8%.

<comment><USER47> For a long time I just used Chrome - because why not? It's an awesome browser, especially when you are a web developer. But I was always annoyed about the fan on my MacBook Air mid 2011 spinning all the time - but I didn't connect the dots. At some point though it must have dawned on me and I tried an experiment where I switched 100% to Safari. Now my fan NEVER spins and I get up to two hours more battery life out of my MacBook Air. (yes I know it's a really bad browser on almost all counts - but they do know how to code in an energy efficient way)

</comment></comment><comment><USER48> Is the George Orwell who i am thinking?

<comment><USER49> I don't know who you're thinking of, but this George Orwell is the author of 1984, Animal Farm, Homage to Catalonia, etc.

</comment></comment><comment><USER50> Nice write-up. But there's not a single slide about usability and how it affects naming.

If your library exposes 'getCurrentRuntimeContext' which is going to be used in every other line of user's code, name it 'ctx'.

It's ambiguous, but it saves the user 3 seconds per 2 lines of code.

As for the readability, when the reader encounteres 'ctx' for the third time (at line 6 of the source file) they will already know what it is supposed to mean by heart.

<comment><USER51> I'm not so sure that is good advice, and I come from C programming so we love to do that.

With autocompletion in most code editors saving the user typing time is not a valid argument anymore, and I would rather prefer comprehensible if slightly more verbose code than accronyms everywhere.

What is obviously ctx -> getCurrentRuntimeContext for you is completely foreign to the next guy. And sometimes you don't spend a large amount of time in a specific part of a code base, such as when debugging and then figuring out what ctx means is a real PITA.

<comment><USER52> You are assuming that every one can recall 25+ letter names - dyslectics have problems with this sort of short term memory.

<comment><USER53> That is a very weak argument. Is there anything that suggests letter count is a barrier to dyslexics, and not, say, word count or number of obscure abbreviations?

<comment><USER52> Yes short term memory tests are one of the primary diagnostic tests for dyslexia. Ie how many consecutive numbers/letters you can recall.

Long Names like SomeRealyLongNameFunctionThing and SomeRealySimialrLongFunctionNameThing are both hard to work with and confusing to me.</comment></comment></comment></comment></comment>