Playing with the CPU pipeline - <AUTHOR> http://lolengine.net/blog/2011/9/17/playing-with-the-cpu-pipeline

<comment><USER2> Some people have asked about how these optimizations fare with different compilers. Do the "optimizations" hurt as one changes compilers? Do they help? Do any of them manage to vectorize?

Here's some data:

[http://lolengine.net/attachment/blog/2011/9/17/playing- with-...](http://lolengine.net/attachment/blog/2011/9/17/playing-with-the-cpu- pipeline/poly.cpp)

      Intel(R) Xeon(R) CPU E5-1620 0 @ 3.60GHz stepping 07
      uname -a: Linux 3.5.0-41-generic #64-Ubuntu SMP
      clang++ -v: clang version 3.2
      icpc -v: icpc version 14.0.1
      g++ -v: gcc version 4.7.2:

Compiled with "-std=c++11" plus the options mentioned in the names. At a glance, all versions produced the same results to reasonable precision (no gross errors). "-ffast-math" only worked with g++, and did not offer substantial improvement, so I've omitted it from the tests.

             g++_O3      icpc_O3    clang++_O3
       sin:  18.193 ns   7.0174 ns  14.6862 ns
       sin1: 22.5272 ns  8.0225 ns  9.6777 ns
       sin2: 14.9128 ns  4.7247 ns  7.1016 ns
       sin3: 18.943 ns   5.1121 ns  6.169 ns
       sin4: 13.9225 ns  4.8979 ns  5.6666 ns
       sin5: 14.2042 ns  5.0435 ns  6.3257 ns
       sin6: 12.2543 ns  4.2955 ns  5.2681 ns
       sin7: 11.6969 ns  5.0538 ns  5.5793 ns

So yes, these optimizations can still have a positive effect, but generally less than that of using a better compiler. In this case, that means if you care about performance use Intel, or if not possible, use CLang.

But what about vectorization? Perhaps the compiler can do a better job if you let it make full use of modern SIMD:

             g++_O3_mavx  icpc_O3_mavx  clang++_O3_mavx
       sin:  18.1148 ns   3.7879 ns     14.1987 ns
       sin1: 22.3675 ns   6.4376 ns     9.2589 ns
       sin2: 14.5665 ns   3.2823 ns     6.2089 ns
       sin3: 18.3841 ns   3.6652 ns     5.2409 ns
       sin4: 13.0917 ns   3.0374 ns     4.9839 ns
       sin5: 13.1144 ns   3.598 ns      5.177 ns
       sin6: 11.7605 ns   2.8766 ns     4.2239 ns
       sin7: 11.4222 ns   3.3261 ns     4.612 ns

Yes, it looks like Intel gains quite a bit from vectorizing the result with 256-bit AVX (4-wide for doubles). If you care about autovectorization, use Intel.

This performance here generally matched my expectations. I have no affiliation with Intel other than having a free academic license, but find that in general their compiler offers better performance than GCC or CLang. In this case, Intel's best (sin6 with AVX) is 4x faster than GCC's best. I'd usually expect something more like a 20%-40% improvement, but vectorization is one of Intel's strong suits.

For those who wish to explore the reasons for the difference in performance, here are the results of 'objdump -C -d' for the functions in question:

g++_O3: [http://pastebin.com/VstqvcHJ](http://pastebin.com/VstqvcHJ)

icpc_O3: [http://pastebin.com/3LjtXAhS](http://pastebin.com/3LjtXAhS)

clang++_O3: [http://pastebin.com/aSyCyULh](http://pastebin.com/aSyCyULh)

g++_O3_mavx: [http://pastebin.com/81vYueEp](http://pastebin.com/81vYueEp)

icpc_O3_mavx: [http://pastebin.com/XRdCuusV](http://pastebin.com/XRdCuusV)

clang++_O3_mavx: [http://pastebin.com/KJqUpUBE](http://pastebin.com/KJqUpUBE)

Personally, I'd be very interested to see what an experienced x64 SIMD programmer could do to improve these further. My usual estimate is a further 2x, but I don't know how well that applies to this case. I'd also welcome analysis of the code produced by the compilers.

<comment><USER3> Your GCC and Clang are outdated and results are VERY UNFAIR in many aspects.

Intel compiler violates IEEE 754 by reassociating multiplication and addition. It you want to compare icc with other compilers, you should use -Ofast option with other compilers.

Also, if you compile this code with Clang 3.3, you will get the same assembly as with ICC. And with GCC 4.8 you will get even more optimal assembly. Check [http://gcc.godbolt.org/](http://gcc.godbolt.org/) to see the result with different compilers (permalink to code: [http://bit.ly/1euyjXZ](http://bit.ly/1euyjXZ))

<comment><USER2> I appreciate your comment. The machine I ran this on has some strange issues that require us to keep around older versions of GCC and Clang, but I was able to install recent ICC. I hadn't known about the online compiler. That said, perhaps you could provide some numbers to back up what you are saying? I'd love to see what you think they should be.

Seeing as the article is about providing rough faster estimations using series expansions, I'm OK with Intel's choice of optimizations. For GCC, does "-Ofast" do anything that "-O3 -ffast-math" doesn't? Because I tried that and it did not help. CLang threw up error messages when I tried, and since it wasn't my code I didn't bother deciphering.

[Does godbolt.org give you any way to download the executable, or do you have to cut and paste the output and assemble that? I can't find a download feature, but it would seem very useful and I don't immediately see any security reasons that they wouldn't offer it.]

<comment><USER2> OK, I just tried on the same machine with GCC 4.8.0. Same results: ICC clobbers GCC.

nate@fastpfor:~/lolengine$ g++-4.8.0 -std=c++11 poly.cpp -Ofast -march=corei7-avx -o g++-4.8.0_Ofast_march=corei7-avx

nate@fastpfor:~/lolengine$ g++-4.8.0_Ofast_march\=corei7-avx

      sin: 18.373 ns
      sin1: 17.0716 ns
      sin2: 11.0505 ns
      sin3: 18.3832 ns
      sin4: 13.244 ns
      sin5: 12.8103 ns
      sin6: 12.0091 ns
      sin7: 11.4129 ns

Entirely possible I'm doing something wrong. Maybe ICPC is inlining things into main() and not using the assembly I put on pastebin? But in any case, I think the ball is in your court.

 _And with GCC 4.8 you will get even more optimal assembly._

Please prove it. Is it optimal because you tested it and it ran faster, or because you believe it should be? I used to have faith in GCC, but having looked at a fair amount of generated SIMD x64 assembly, I now believe that ICC generates better code in most cases.

<comment><USER3> The math is very simple: register spill is the same, GCC generates 7 vaddsd and 9 vmulsd. ICC generates 7 vaddsd and 15 vmulsd. addsd latency is 3, mulsd latency is 5. There are multiple add-multiply units on intel CPUs, but this code loads them all, so ICC should be 30% slower with this assembly.

> Maybe ICPC is inlining things

Check this. Looks like it generates vectorized code. I don't have Intel compiler, so all I can do here is to read assembly.

> having looked at a fair amount of generated SIMD x64 assembly

There are no SIMD in _any of your asm files_. All these sin1-sin7 functions accept only one double and return only one result. They work with 128-bit operands, but only the first 64-bit part contain values for operations.

<comment><USER2> _The math is very simple: register spill is the same, GCC generates 7 vaddsd and 9 vmulsd. ICC generates 7 vaddsd and 15 vmulsd. addsd latency is 3, mulsd latency is 5._

I strongly disagree that it's simple: figuring out the actual performance on a real processor without running the code is far from simple. In particular, the ordering of the instructions can be crucial. Yes, it can be done, but it takes a lot more than counting instructions. Intel's IACA is the most useful tool I've found for this (free), but otherwise I just spend a lot of time with Agner Fog's execution port info.

 _There are no SIMD in any of your asm files._

You are absolutely correct. I put the objdump into pastebin, but did not actually look at this code. I just presumed it was vectorized from seeing the large jump in performance with '-mavx'.

Looking closer, it looks like Intel is using a dispatch function, and has a separate vectorized version that it uses when it can. I need to go to sleep, but I'll post the whole objdump so you can inspect: [http://pastebin.com/B3EBi0Lq](http://pastebin.com/B3EBi0Lq)

And if you send me email (my address is in profile) I'll send you a binary to play with. Or if you tell me where to upload, I can do so.

</comment></comment></comment></comment></comment></comment><comment><USER4> I'm really skeptical whether the author's "optimizations" are actually doing what the author thinks they do. Read-after-write hazards do not always result in a stall. Modern CPU pipelines have backward propagation that can resolve RAW hazards without stalling the pipeline. More likely it's the fact that x86 processors are superscalar and have multiple ALUs and FPUs. Therefore, they can dispatch multiple floating point instructions at once, as long as there is no data dependence.

<comment><USER5> Yes, the author ironically doesn't actually understand what's happening in the pipeline for the processor they're writing about.

It is a superscalar processor using reservation stations and tomasulo's algorithm, a RAW hazard doesn't stall the pipeline. But instructions which would be affected by RAW hazards will slow down execution if those instructions are on the critical path. So paying close attention to instruction-level dependencies _will_ produce better results in both since you can increase the ILP possible in the instruction sequence. This helps a lot especially on code which might run on in-order pipelines (a lot of mobile and embedded chips still use in-order pipelines) too.

<comment><USER6> That's just nit-picking the nomenclature. The author is simplifying things greatly but he's essentially correct - the naive version with less operations ends up slower because there is a long chain of dependencies.

With out-of-order execution this isn't really a _stall_ , because non- dependent instructions can still execute/retire with renamed registers alongside it, but it still effectively delays progress of the dependent chain the same way an in-order pipeline would operate. You might say: its progress is stalled.

<comment><USER7> No. A read-after-write hazard has not stalled a cpu in the last 10 years. So the article will mislead all the beginner architects out there. A clear explanation of dependencies would be much more appropriate.

<comment><USER8> Intel released Atom not 6 years ago, and is still selling Bonnell-derived CPUs to this day...

Cortex-A7 and A53 are in-order as well, and are/will be quite common among low-end Chinese smartphones and tablets.

</comment></comment></comment></comment></comment><comment><USER9> The CPU he was using is spec'd for a base frequency of 2.7GHz but for microbenchmarks like these, will more likely be at the full turbo frequency of 3.4GHz, That's a 0.294ns instruction cycle, and the fastest result of his optimisation is 15.617ns/call, which is almost exactly 53 cycles/call. That's right in the middle of the timings for the FSINCOS instruction, which on this CPU model ([http://www.agner.org/optimize/instruction_tables.pdf](http://www.agner.org/optimize/instruction_tables.pdf) ) runs in 20-110 cycles -- calculating _both_ sin and cos, to 80 bits of precision. From my experience these FPU instructions will take more cycles for edge cases since they'll do more iterations to guarantee a specific precision, but for the majority of the input range will be closer to the lower end. So I don't think the author really optimised anything here.

<comment><USER10> The author optimized a Taylor series expansion that is way more generic than just a sin/cos function, and they explained why, at the atomic level of data dependency in the pipeline, their optimization worked.

<comment><USER9> He did, and then _benchmarked it against sin()_ , so it looked like that was the goal rather than a general polynomial evaluation function, and I'm saying there are faster (and shorter) ways to do that quickly.

</comment></comment></comment><comment><USER3> He forgot about 3 things:

1) FMA. The most important optimization that GCC can do automatically on Haswell with ffast-math. With FMA and AVX one can calculate 4 (!) doubles simultaneously only for 10 instructions!

2) Register spill. His final version uses 5 xmm registers, while sin3 uses only 3. Sine function is just a primitive, used in more complex calculations. If the final result can't fit in 16 XMMs, each load/store will bite him. More spill -- more blood.

3) Unordered memory access. His final version accesses polynomial coeffs in random order. In some cases compiler may reorder static vars, but not in his benchmark. In synthetic tests all 8 coefficients stay in L1 cache, but in real HPC applications such situation is extremely rare.

<comment><USER11> FMA? Have you seen the date of the post? He would have been writing for PowerPC and IA-64 users, all six of them, if he had based his post on FMA.

<comment><USER3> If somebody writes a + x _(b + x_ (c + ...)) one should expect this code to be future-proof and work with any compiler. But if code is mixed with inline assembly, the result will be doubtful, at least.

No need to be a prophet. First CPU with AVX appeared 3 years ago. Haswell was announced 6 months ago. There are no AVX-512 solutions for home users yet, but one can write AVX512-opimized code without any special knowledge.

</comment></comment></comment><comment><USER12> Site went down; cached here. [http://webcache.googleusercontent.com/search?q=cache:http://...](http://webcache.googleusercontent.com/search?q=cache:http://lolengine.net/blog/2011/9/17/playing- with-the-cpu-pipeline&safe=off&strip=1)

</comment><comment><USER10> Related work demonstrating that ultra-tight mapping loops benefit from multiple inputs per loop iteration: [https://github.com/knappador/pipe- packing-demo](https://github.com/knappador/pipe-packing-demo)

<comment><USER2> Nice article, I submitted it here: [https://news.ycombinator.com/item?id=7176576](https://news.ycombinator.com/item?id=7176576)

I also added a comment on this thread that might interest you: [https://news.ycombinator.com/item?id=7176553](https://news.ycombinator.com/item?id=7176553)

</comment></comment><comment><USER13> This basically shows that if you don't need to shave off that last nanosecond, sin1 is the fastest variant for a modern optimising compiler.

</comment><comment><USER14> Old ball game, the fad is to calculate sin(x) using 10,000 machines!

</comment><comment><USER15> It would be interesting to see what Intel's compiler would do to his mini benchmarks.</comment>


Evernote Clearly - <AUTHOR> http://www.evernote.com/about/download/clearly.php

<comment><USER2> Tried it on Hacker News and IGN.

Hacker News looks better without it. IGN becomes an empty page that shows one banner and nothing else.

They do say that it's meant to work on a page with only a single block of text, though, but based on the short video I was led to believe that it was supposed to get rid of the clutter and sidebars.</comment>


Like a prion, Alzheimer's protein seeds itself in the brain  - <AUTHOR> http://www.sciencenews.org/view/generic/id/341619/title/Like_a_prion%2C_Alzheimers_protein_seeds_itself_in_the_brain

<comment><USER2> Incidentally, if you're wondering why this kind of stuff only seems to happen in the brain, in broad terms the answer is this: almost every other cell type in your body has the luxury of committing suicide (technical term: apoptosis) and being replaced by other cells of the same type which are growing and proliferating. For example, if a virus infects one of your intestinal epithelial cells, that cell can trigger it's self-destruct signal pathway (or a cytotoxic T-cell can trigger it externally) and initiate programmed cell death, thereby containing the infection (note that apoptosis functions to effectively demolish the entire contents of the cell, not just tear it apart and release whatever is inside).

In contrast neurons generally do not proliferate much after you're born (there's some debate about this, but even so a particular neutron is valuable because of the connections it has made, which are irreplaceable), so having each neutron kill itself when something goes bad would shortly leave you without a functioning nervous system. So neurons have to resort to more "creative" measures to clean up problems without destroying their entire cell bodies (e.g. autophagy, in which the cell cordons off a part of itself and then digests it). Naturally, these mechanisms are not as effective as demolishing the entire cell, so some problems can arise that neurons can't handle. But they are programmed not to kill themselves under almost any circumstances, so they continue limping along with only partial functionality or none at all.

<comment><USER3> Does any flagging take place in the brain at all? I have tried to keep up to date on Alzheimer's without knowing much about the human body. One thing I've thought about given the debate over whether Aβ is _the_ culprit, one of many culprits, or just a visible sign of Alzheimer's got me thinking about it as a flagging mechanism. If a synapse is dead or in some way misbehaving it might be good to flag it as "corrupted", might that be what Aβ is doing at all? I mean system-wise it makes sense, but I know way too little about the human body or the brain.

<comment><USER2> There are lots of "damage-sensing" mechanisms at all scales within the body. These are how your skin knows to grow after an injury, how your immune system detects which cells are infected and need to be killed, and how your cells know which parts of themselves to digest via autophagy, among other things. At the single-protein level, there's ubiquination, which marks protein molecules for destruction, either because they are misfolded, damaged, or no longer needed. But this doesn't work when those misfolded proteins clump together into plaques. Then you need something like autophagy. But even that has limits, and a cell that lives for decades tends to reach those limits.

As for Aβ possibly being the body's way of flagging problem areas, that seems unlikely, because such a function probably would not involve drastically changing its 3-D structure (i.e. going from "correctly folded" state to "misfolded" state), and certainly would not involve forming plaques. These and many other observed features are better explained as features of the pathology and not just a kind of damage signal reporting on the existence of a problem.

</comment></comment></comment><comment><USER4> I am definitely no medical expert - Are we sure Alzheimer's is not a causal result of consuming prions (BSE or CJD)?

<comment><USER2> I believe that Alzheimer's has different clinical presentation than either BSE and CJD, and that the misfolded protein being blamed for Alsheimer's is a different protein than those blamed for the other two diseases.

<comment><USER5> Additionally we know that there are some prion diseases that are not consumption-related. Fatal familial insomnia for example.....</comment></comment></comment>


Show HN: Impostor Roster – Suffering from Impostor Syndrome? You're not alone - <AUTHOR> http://www.impostorroster.com/ <comment><USER3> It always reassures me that even Albert Einstein appeared to suffer from impostor syndrome.

"the exaggerated esteem in which my lifework is held makes me very ill at ease. I feel compelled to think of myself as an involuntary swindler."

Source of the quote is here, about three quarters of the way down: [https://www.newyorker.com/magazine/2005/02/28/time- bandits-2](https://www.newyorker.com/magazine/2005/02/28/time-bandits-2)

<comment><USER4> Did he actually suffer from imposter syndrome, or was he being humorously humble?

<comment><USER5> Yeah I think it's the latter.

<comment><USER6> Don't be so sure. Einstein, in spite of all his achievements, was human. He made mistakes and misunderstood some things. Overall he understood physics more deeply that any of his time, but from his point of view maybe it came so naturally that he never felt he had totally "earned" his recognition. That said, he was known for humility, but that doesn't mean it was disingenuous.

Isn't that the point of "impostor syndrome"? No matter where you stand, your measurement of your ability is subjective to whatever standards you personally hold, which may be different from an objective assessment? And maybe there is no true objectivity? Maybe it's all... relative?

<comment><USER7> Einstein already made his most significant contributions by age 26 and spent the rest of his life arguing against quantum theory, the dominant school of the 20th century. Most modern physicists regard the latter portion of his life a waste in way of contributions.

<comment><USER8> That's a little misleading — the latter period started around age 40. E.g. Bose-Einstein statistics was from 1918, which would be age 39 if 1905 was 26. The EPR paper was many years later still. Also, you can't leave general relativity out of his most significant work.

</comment></comment></comment></comment></comment></comment><comment><USER9> Just looking at the software entries and when I see "still can't X effectively" I'm left thinking, "And neither can anyone else".

One of the most interesting things I've discovered as I've gotten older is that I sometimes have a great success and then I think, "Awesome! _This_ is the way to do it!" Then I try to duplicate that success and... it doesn't work. Now I'm left wondering whether my previous success was _because of_ my actions or _in spite of my actions_ (or not related at all).

So frequently we read from people who are really good at promoting themselves and they say " _This_ is the new super sauce!" They really _are_ convinced themselves, but that's mostly overconfidence. It's worse when the thing they discover makes tons of sense, but doesn't really work the way you might imagine it would.

It's an exciting time to be a programmer because there is still so much to discover. It's also a stressful time because everyone sucks badly at this stuff. Those who think they've got it figured out usually (in my experience) have either very low expectations or very poor observations skills ;-)

<comment><USER10> Sometimes I wonder if the current state of software/programming will, in the future, be seen similarly to cuneiform or hieroglyphics, in the sense of it being an archaic, overly complicated form of expression needlessly reserved to specialists. Coding might be something everybody is required to know in the future, like reading or writing are now. What I envision happening is that whatever become the popular languages will sacrifice similarity (in the sense that even across functional/imperative/OOP/etc families, languages are in general low-level/explicit enough that coding in them is similar) in favor of a highly opinionated programming style designed to make it easier to program in.

For example, imagine a language and IDE designed in tandem to compliment each other. You could incorporate all kinds of visual models into the design of the code, and actually make it easy/automatic to include things like the standard library, which you could make very large. The language could require such a high amount of structure that once you learned it to a reasonable extent, there would only rarely be a need to look up how to do something completely new. If kids learned how to use things analogous to e.g. python/matplotlib instead of excel, or jupyter notebooks for science reports / presentations, just imagine how much more productive we could be as a society.

I'm happy knowing that even if we suck now, we can perhaps live to see a future where we don't suck. I just hope it's soon

<comment><USER11> You're describing Mathematica. It's lovely stuff but a bit of a closed system. And expensive too.

</comment></comment></comment><comment><USER12> Impostor Impostor Syndrome: pretending to have impostor syndrome as a self- serving justification.

<comment><USER13> Yes, the site title is misleading (imposterous one might say ...). Fun idea nonetheless.

</comment></comment><comment><USER14> Does the definition of imposter syndrome include the awareness that one should feel better about one's accomplishments? It seems ironic to self-diagnose imposter syndrome because that is internalizing your accomplishments - <USER2> is the precise antithesis of the Wikipedia definition:

> individuals who are marked by an inability to internalize their > accomplishments [and a persistent fear of being exposed as a "fraud".]

I've made a lot of progress since I realized that I potentially do not have imposter syndrome and instead have self-esteem problems.

<comment><USER15> Impostor syndrome is mostly marked by the feeling of being a fraud which can run in parallel to feelings of "I know I'm smart, but I feel so dumb compared to everyone else."

It's a constant self-doubt in spite of knowledge of what one is capable of; self doubt that one should be in a particular position, because while one knows what they're capable of, they think they should be capable of more when comparing oneself to one's peers.

One doesn't need accomplishments to feel like an impostor and a lack of notable accomplishments doesn't mean that one shouldn't be in a particular position.

</comment></comment><comment><USER16> "Someone in the _Strawberry_ field for 10 months still can't _forever_."

I love this. Thank you whoever sent that in

<comment><USER17> I... don't get it. :(

e: Oh, a beatles reference. Ok.

<comment><AUTHOR> I believe it's a Beatles reference. Strawberry Fields forever

</comment></comment></comment><comment><USER18> Hm... "Someone in the Computer Science field for 2 months still can't solve the halting problem."

<comment><AUTHOR> Some of the most ambitious among us suffer from this syndrome XD

We added a twitter account now [https://twitter.com/impostor_roster](https://twitter.com/impostor_roster) so feel free to comment on posts there!

</comment></comment><comment><USER19> This is a serious issue and I'm really glad someone's making an attempt to make people realise it's not uncommon. I am slightly ashamed to admit however that I completely lost it at "Someone in the Roller Coaster field for 13 months still can't get off mr bones wild ride.".

Context: [https://imgur.com/gallery/Wxzbl](https://imgur.com/gallery/Wxzbl)

<comment><AUTHOR> haha yep, as the creator of this site I'm now trying to figure out the best way to keep the fun stuff while also keeping the site helpful.

for about 20 minutes at the beginning of the HN traffic there was a beautiful moment of 100% real posts and supportive comments here. and then...

<comment><USER19> Cool, good job all the same! When I looked it was still a healthy mix of fun and serious :-)

</comment></comment></comment><comment><USER20> This is really refreshingly candid, and frankly uplifting. Thank you for your efforts.

So much better than the "failure resume" that was a thing a few years ago, which often looked like a thinly veiled brag.

<comment><AUTHOR> Thanks, I'm glad you appreacite it. Warms my heart :)

</comment></comment><comment><USER21> "Someone in the Devops field for 60 months still can't explain what devops is."

Can _anyone_ explain what devops is? It's always struck me as being a meaningless buzzword.

<comment><USER22> Portmanteau of developer + operations, where infrastructure and application life cycle are coded using engineering best practices in a way that is repeatable and debuggable. Someone in devops will know tools such as Chef, Puppet, Virtualization, Containerization, Load Balancers, Network and Application Firewalls, IAM. Basically all the stuff that supports running an application. Application and System level cross cutting concerns.

Dont pretend you couldn't give the same answer, imposter.

</comment></comment><comment><AUTHOR> Here's a little blog post I wrote about it on the eve of deploying: [http://vcavallo.github.io/blog/2017/03/01/launching-the- impo...](http://vcavallo.github.io/blog/2017/03/01/launching-the-impostor- roster/)

Thanks for checking it out! Please add something!

Edit: If anyone is interested in keeping up with any changes and developments to this site (a redesign is coming soon) you can sign up for the newsletter at [http://exnil.io](http://exnil.io) where I will be announcing that and other fun stuff)

</comment><comment><USER23> I absolutely adore this. Watch out for the trolls though — they're coming.

<comment><USER17> Looks like the trolls have arrived:

> Someone in the Presidency Of The United States Of America field for 12 > months still can't tell you what the emoluments clause is .

I mean, the troll is not wrong, but it definitely takes away some of the charm that this website (briefly) had.

<comment><AUTHOR> Manual moderation is _fun_...

I'm leaving anything but explicitly elicit stuff for now.

</comment></comment></comment><comment><USER24> "Someone in the White Girl field for 240 months still can't even."

Love it.

</comment><comment><USER25> You should allow hyphens and dashes in the inability field. There are words that I would like to hyphenate but which I can't.

<comment><AUTHOR> This was a quick and dirty way to prevent abuse. will reinstate when I'm not panicking :)

<comment><USER26> I feel this warrants an entry.

<comment><AUTHOR> I'll add it

[http://www.impostorroster.com/post/sanitize-fields- thoughtfu...](http://www.impostorroster.com/post/sanitize-fields-thoughtfully- without-clobbering-all-punctuation)

</comment></comment></comment></comment><comment><USER18> Too bad the site just reduced to jokes and spam after it was posted on HN.

</comment><comment><USER27> You should make a " you are not alone" voting button instead of comments

<comment><AUTHOR> I'm thinking of doing both. Definitely needs a voting feature.

</comment></comment><comment><USER28> You need to allow special characters in the inability field.

My field was "Python" and my entry was "I still can't remember the argument order for json.dump()", but it gave the error "Inability Only letters, numbers and spaces allowed for inability field".

<comment><USER29> Here's how I remember: dumps() takes no file-like argument, thus for dump() and dumps() to be consistent, the object to dump() must come first.

<comment><USER30> That argument would make as much sense if you replaced first by last.

<comment><USER29> Optional arguments are almost always trailing arguments:

        dumps(obj)
        dump(obj, fp)

Might be implemented (in a Pythonic way) by the same function:

        fn(obj, fp=None):
            ...

Another way to think about it is that you're dumping from obj to fp. The thing I always get backwards is C's memcpy(dst, src, len) which I've always thought has its first two arguments in the wrong order.

</comment></comment></comment></comment><comment><USER31> Where is the Dunning-Kruger registry? Cause I know _exactly_ what that should look like.

</comment><comment><USER32> This site was frighteningly reassuring. Thank you.

I hope this becomes the new FML/TFLN

<comment><AUTHOR> That's the idea! :)

The argument order for ln one really made me happy today..

</comment></comment><comment><USER33> I only feel an imposter when people ask me how much I want to be paid.

</comment><comment><USER22> I have this nagging feeling that my imposter syndrome is forced, fake, that I _really_ am an imposter, other syndrome suffers have it, I don't.

<comment><AUTHOR> Add it! "Someone in the Impostor field for X months still can't accept that other people feel the same way"

XD

</comment></comment><comment><USER34> Thanks for making this!

<comment><AUTHOR> Thanks for checking it out!!

</comment></comment><comment><USER30> Perhaps you can add a comments section below every post (?)

<comment><AUTHOR> Definitely on the shortlist now!

there's this for now if it helps: [https://twitter.com/impostor_roster](https://twitter.com/impostor_roster)

</comment></comment><comment><USER35> This is good work. Keep it up.

<comment><AUTHOR> Thanks for the encouragement. Will do. And feel free to add comments on the github repo if you have ideas

</comment></comment><comment><USER36> i still can't.. get past the google captcha to post my reply

<comment><AUTHOR> Hm... is it just because their captcha is hard, or does it seem broken? if it seems broken submit a github issue or contact at the twitter link on the site

<comment><USER36> gonna guess just hard, but after the first 2 or 3 screens i just said fsck it. does it intentionally try to cut tiny bits of the edge off each 'correct' frame to get good training data?

i did try the audio too though and had no idea what it was saying.

</comment></comment></comment><comment><USER37> When did we stop calling it "the peter principle" ?

<comment><USER38> We didn't. The Peter Principle refers to a completely different phenomenon-- "Rise to the level of your own incompetence."

<comment><USER37> What do people who rise above their own incompetence feel if not imposter syndrome?

<comment><USER39> Impostor syndrome means the person feels incompetent despite not being. If one is actually incompetent, then feeling like so is just having an accurate perception :)

Plus, I'd say many don't even realize they're incompetent.

</comment></comment></comment></comment><comment><USER40> I find that a lot of people who say they suffer from _imposter syndrome_ are really just humble-bragging.

They 100% know that they are good, but it's socially better to show false modesty.

<comment><USER22> Uncouth and Unware

<comment><USER40> Exactly!

</comment></comment></comment><comment><USER41> I suspect that "impostor syndrome" is just what many people feel when the comforting illusion of the Dunning-Kruger effect starts to fall apart.

<comment><USER39> Actually, the tests made by Dunning and Kruger that led to the coining of that "effect" also showed that competent people tended to rank themselves below their actual level - exactly as described by the Impostor Syndrome.</comment></comment>


Trading Crypto – The Guide Your Kid Sent You - <AUTHOR> https://medium.com/@tygertec/trading-crypto-the-guide-your-kid-sent-you-fee15509d77d <comment><AUTHOR> Less pretty version, sans Medium paywall: [https://www.tygertec.com/crypto- trading-guide/](https://www.tygertec.com/crypto-trading-guide/)</comment>


Rubik's Slide [2010 Toy Fair video] -- how would you fix its usability problem? - <AUTHOR> http://www.youtube.com/watch?v=5JixBhJH4CY

<comment><AUTHOR> You need to press a button to see the goal state. It's very annoying.

Another demo video here: <http://www.youtube.com/watch?v=5dAUdUNf8-c></comment>


On which occasions do you realize computers aren't as smart as they could be? - <AUTHOR> On which occasions do you realize computers aren't smart, because they had all info around, but failed to assist? <comment><AUTHOR> Are you aware of such an occasion where a computer could have helped you out - but it didn't? Which occasion was it?

</comment><comment><USER2> Every time I've had to debug a null reference exception in a .NET application. Thankfully, that will be changing.

<comment><AUTHOR> I'm feeling with you; Null Pointer Exceptions in Java are annoying too.</comment></comment>


Show HN: An open source IRC client for your web browser - <AUTHOR> https://github.com/cjstewart88/nirc

<comment><USER2> How does this compare to subway?

<https://github.com/thedjpetersen/subway>

<comment><USER3> Seems like both of them require as server. Something I think means the title is misleading about. It's certainly ambiguous. I was excited to see a browser based, all client side IRC client. Oh well.

<comment><USER4> I'm not sure I see how you can connect to an irc server directly from the browser without some sort of proxy. You can't do TCP from js.

<comment><USER5> both chrome and firefox have tcp sockets apis, they are only usable in specific contexts, but you can write a web based irc client (there are a few around)

<comment><USER4> I stand corrected. Though as far as I can tell, it works only for apps in the chrome case[0] , and privileged web apps in firefox case[1].

[0] <http://developer.chrome.com/apps/socket.html> [1] <https://wiki.mozilla.org/WebAPI/Security/TCPSocket>

</comment></comment></comment></comment></comment><comment><USER6> Sounds a lot like Alice: <https://github.com/leedo/alice>

</comment><comment><USER7> Maybe you should do something about the demo.This may be a solution. <http://opensource.jit.su/>

</comment><comment><USER8> Demo install? Or at least a screenshot?

<comment><AUTHOR> here you go: <http://imgur.com/a/nyjs7>

<comment><USER8> Thanks.

</comment></comment></comment><comment><USER9> Any reason you have node-irc in the lib instead of npm installing it as a dep?

<comment><AUTHOR> We started customizing it and felt like it would be easier to just house the module within the app itself. None of the customizations would have made good contributions to the module for others.</comment></comment>


ColorFinder: Find the most prominent color in an image - <AUTHOR> http://pieroxy.net/blog/pages/color-finder/index.html <comment><USER2> Related application: [http://hackaday.com/2016/05/20/using-an-fpga-to- generate-amb...](http://hackaday.com/2016/05/20/using-an-fpga-to-generate- ambient-color-from-video/)

"The concern was that simply averaging the pixel color values would deliver a color, but would not necessarily deliver the same color that a human eye would perceive. He goes into detail about the difference between RGB and HSL color spaces, and arrives at an equation that gives an importance rating to each pixel taking into account its saturation and thus how much the human eye perceives it. As a result, he can derive his final overall color by looking at these important pixels rather than the too-dark or too-saturated pixels whose color the user's eye will not register."

</comment><comment><USER3> Similar project: [https://github.com/lokesh/color- thief](https://github.com/lokesh/color-thief)</comment>


Queen – A Framework To Run Scripts On Many Remote Browsers Using Node.js - <AUTHOR> http://queenjs.com/index.html

<comment><USER2> A couple years ago, I used Node.js to build a tool that would run tests in iframes. It's similar to the OP's tool Thrill, but mine was a lot simpler. <http://thrilljs.com>

The problem we (the YUI project) ran into was test failures that would occur only within iframes. We found lots of iframe-only quirks that were useful to know about, but were also distracting since we wanted to make sure using YUI in a typical browser context works first. (I've talked to jQuery's TestSwarm maintainer and they've had similar problems with iframes.)

The tool we use, Yeti, was since rewritten to not require an iframe. <http://yeti.cx>

I continue to work on Yeti, and there's a lot of interesting things we have done (using multiple browser instances to speed up testing, launching browsers automatically, CI integration) and hope to do (code coverage, performance measurements). Help wanted!

It's neat to see this kind of thing become more popular, and I hope these projects can make testing easier for everyone.

<comment><USER3> What were the sorts of issues you faced with iframes? One major issue I found so far was alerts blocking the ui thread, which was easy enough to fix by disabling them. The other major issue was around CORS, which is resolved by proxying requests.

</comment></comment><comment><USER4> Very similar conceptually to a tool (Attester) that our team has released a couple of months ago. <https://github.com/ariatemplates/attester/>

We use it as a distributed way to perform tests in our main project (Aria Templates: <https://github.com/ariatemplates/ariatemplates>). The tool is able to use PhantomJS (configurable number of instances) and "normal" browsers which can connect in the same manner (by opening a URL). We use PhantomJS on Travis for continuous integration builds before merging pull requests, and real browsers before each release (every 3 weeks).

We support only our own tests so far (eating the own food), but we may add support for other types as well.

Behind the scenes, the tool first gathers a set of classpaths of the tests to run (recursively); then it dispatches them to active browsers (e.g. when you have a couple of people connected via IE8, each of them will receive a subset of tests to run and effectively the test suite finishes earlier).

You can also run the test suite entirely in the command line (PhantomJS), and if you have multicore processor, you may increase the number of PhantomJS instances to parallelize the suite.

Looking forward for comments and forks!

<comment><USER3> Cool, you might be interested in Testacular also, a similar project to yours. The main differentiator for Thrill/Queen will be that Queen acts as a central server which anyone in the network can execute tests on. So if you have many developers, they don't each have to setup their own browser pool.

</comment></comment><comment><USER5> The project is interesting, but I can't help but be disappointed the logo isn't Freddie Mercury.

</comment><comment><USER6> I did something similar using Now.js that allowed me to write the actual unit tests on the server, but run them in browser-based clients whenever they loaded. Made testing really easy on a multitude of browsers and OSes.

</comment><comment><USER3> Hi everyone, Ozan here. I wrote queen and thrill, I just found out about this thread, looks like Hirvesh beat me to it :). Going to lunch right now, but I'll be able to answer questions after I'm back.

</comment><comment><USER7> that's pretty cool. amazon could resell your free browser cycles.

<comment><USER8> I've been saying for a while that I'm surprised no-one has written a BitCoin miner in JS and started pushing it out to connecting browsers. Given how much time a pop-under advert can sit no someone's machine before they notice it could be relatively lucrative. You'd not get a lot of processing per client per block of time even with the best current JS JIT compilers (especially as GPU mining is where it is at now), but if you have enough machines with your pop-under sat hiding from the user it might make enough to be worth the hassle of porting the code in the first place.

<comment><USER9> Embedable miners have been done before.

[https://bitcointalk.org/index.php?topic=9042.msg130817#msg13...](https://bitcointalk.org/index.php?topic=9042.msg130817#msg130817)

</comment></comment></comment><comment><USER10> The possibilities are interesting, what will you use it for?

<comment><USER11> testing! That was my first thought and at the bottom of a page is a link to <http://thrilljs.com> which utilizes queen. Super cool, will definitely be looking into queen/thrill further.</comment></comment>


Show HN: Talktech.io – a search engine for tech talks - <AUTHOR> https://talktech.io <comment><USER2> Can you share some details about what you are indexing and how you are indexing?

I searched for some keywords that yield no results:

\- numpy

\- scipy

\- cppunit

No results for any of these even though many talks exist for these on YouTube.

<comment><AUTHOR> Okay, we've added these topics. We actually manually search for a list of topics and then add them to algolia. The topics you mentioned should be indexed now.

It's just a quick side project we did inside the company, if you're interested how it came to be, we actually did a short writeup here [https://medium.com/@magicsandbox/an-impromptu-side- project-4...](https://medium.com/@magicsandbox/an-impromptu-side- project-4ac83617e94e)

</comment></comment><comment><USER3> I'd like this if I could sort after I search... also browsing categories.</comment>


Why i joined Startup Weekend as a personal cause - <AUTHOR> http://dinizz.com/post/54406281037/why-i-joined-startup-weekend-as-a-personal-cause

<comment><USER2> Your vision has inspired a lot of people, like me, to organize and disseminate the Startup Weekend's spirit, and thus inspiring even more entrepreneurs that live at the cities where SW has taken place.

Thanks for your dedication with this cause, unfortunately people who don't share the same values won't understand what's like to work a lot for free, to provide the best event possible.

</comment><comment><USER3> Basicamente, Aumento de Network, Engajamento e Conhecimento.</comment>


Kurt Vonnegut, the Art of Fiction No. 64 (1977) - <AUTHOR> http://www.theparisreview.org/interviews/3605/the-art-of-fiction-no-64-kurt-vonnegut <comment><USER2> I have a long standing love of Vonnegut books. I cried when he died. There are some I am putting off reading since then, just so I don't reach a point where I have no more Vonnegut to read.

I would love to see his grave just to find out if he did get the epitaph he suggested in Slaughterhouse 5:

" _Everything was beautiful and nothing hurt._ "

</comment><comment><USER3> _" Since publishers aren't putting money into first novels anymore, and since the magazines have died, and since television isn't buying from young freelancers anymore, and since the foundations give grants only to old poops like me, young writers are going to have to support themselves as shameless hacks."_

</comment><comment><USER4> Like others here, there is something magical about Vonnegut. I think jmduke summarized it very welll.

> it's the conflict between his relentless hope for the universe and the > brutal cynicism he developed during his time spent in it.

As for the war being a formidable cause for this worldview, I guess so. I was very close to my grandfather, a grizzly WWII veteran, for largely how it impacted him this way (I still walk around repeating the eerie phrase he would repeat during war stories: "They taught us to kill, but never how to turn it off," and how he resented it all). Vonnegut and much later Joseph Heller, I could never put down. My grandfather passed years prior, but I could find his vicious cynicism despair and unwavering humor in their writings I assume time in the army helped solidify.

I was abroad when Vonnegut died. I was studying in the Middle East, and the library at the universiy had a table with a bunch of Vonnegut books one day. I was so happy and I commented to friends how wonderful it was. Then they told me he died last night. I screamed loudly in the library, scaring many people. I went outside and smoked a cigarette, and was in funk the next few days. Like someone else commenting, I slowly stopped reading so I do not run out of his work.

In tribute, speaking of shameless hacks, I would watch Comedy Central re-runs of Dangerfield's Back to School just to see Vonnegut's cameo and here the comedian scream: "D [on a paper you wrote, Kurt, for my English class], SCREW YOU VONNEGUT!"

The idea of someone so influential taking himself so lightly has always been an influence for my "I will make inappropriate comical comments at everything, consequences be damned approach" I cannot even help it anymore.

</comment><comment><USER5> Good read! If you have some time, definitely check out 'Sirens of Titan'. I re-read it last month and it's still great.

</comment><comment><USER6> I have a deep love for Vonnegut's work, and consume it like day-old pizza: while I still haven't read a couple of his novels ( _Timequake_ and _Galapagos_ are the last two, I believe), he's one of the few authors whose writing I cannot stay away from for too long.

Now that I am (relatively) older and the immediate luster of _Slaughterhouse Five_ has worn off in the opinion of my peers, I think I have a better idea of what I love about him so much beyond his wit and style and candor -- it's the conflict between his relentless hope for the universe and the brutal cynicism he developed during his time spent in it. (I'm fortunate enough to have never been in a war, but I can imagine that witnessing the horrors of Dresden pretty much eradicates any aggregate good-will you might have towards the ultimate fate of humanity.)

My favorite portion of his writing is in an essay that's referred to as _Vonnegut 's Blues for America_ (apparently adapted from a graduation speech he gave to Eastern Washington University in 2004, three years before his passing). The entire thing is [here]([http://www.rense.com/general69/vonnegutsblues.htm](http://www.rense.com/general69/vonnegutsblues.htm)) -- and mired with the political venom that laces most of his later stuff, but the part I love:

 _No matter how corrupt, greedy, and heartless our government, our corporations, our media, and our religious and charitable institutions may become, the music will still be wonderful.

If I should ever die, God forbid, let this be my epitaph:

THE ONLY PROOF HE NEEDED FOR THE EXISTENCE OF GOD WAS MUSIC

...

It makes practically everybody fonder of life than he or she would be without it. Even military bands, although I am a pacifist, always cheer me up. And I really like Strauss and Mozart and all that, but the priceless gift that African Americans gave the whole world when they were still in slavery was a gift so great that it is now almost the only reason many foreigners still like us at least a little bit. That specific remedy for the worldwide epidemic of depression is a gift called the blues. All pop music today  jazz, swing, be- bop, Elvis Presley, the Beatles, the Stones, rock-and-roll, hip-hop, and on and on  is derived from the blues.

A gift to the world? One of the best rhythm-and-blues combos I ever heard was three guys and a girl from Finland playing in a club in Krakow, Poland.

The wonderful writer Albert Murray, who is a jazz historian and a friend of mine among other things, told me that during the era of slavery in this country -- an atrocity from which we can never fully recover -- the suicide rate per capita among slave owners was much higher than the suicide rate among slaves.

Murray says he thinks this was because slaves had a way of dealing with depression, which their white owners did not: They could shoo away Old Man Suicide by playing and singing the Blues. He says something else which also sounds right to me. He says the blues can't drive depression clear out of a house, but can drive it into the corners of any room where it's being played. So please remember that._</comment>


Show HN: Zapata – An Automated RSpec Test Writer - <AUTHOR> http://www.github.com/Nedomas/zapata

<comment><AUTHOR> This tool saves developers from doing monkey jobs. It tries to write a passing RSpec spec off the bat. It does fancy analysis to predict the values it could feed to the API of a class.

It all started with a belief that writing unit tests is a much more deterministic process than writing app code. And it still holds true.

Running it would LOCK the class API in tests as it is. So all we would have to do is writing code, locking it, writing more code, locking it too and so on.

I am very thankful that it got featured in the Ruby Weekly today and would bake a cake for the anyone who made it happen. Thanks</comment>


In first TV interview as pres, Trump is endlessly obsessed with his popularity - <AUTHOR> https://www.washingtonpost.com/news/post-politics/wp/2017/01/26/in-his-first-major-tv-interview-as-president-trump-is-endlessly-obsessed-about-his-popularity/?hpid=hp_hp-top-table-main_pp-trumptv-330am%3Ahomepage%2Fstory#comments <comment><USER2> You ever met that person at a party and you think that person is really cool look at all the cool stuff they've done and then 1/2 hour later your like "Oh Jeez will this person ever shut up and go away?"</comment>


Dolphin Progress Report for June and July - <AUTHOR> https://nl.dolphin-emu.org/blog/2019/08/04/dolphin-progress-report-june-and-july-2019/ <comment><USER2> That ci infrastructure of theirs always seems super cool. Not sure if this is common when working on graphics related projects but must be extremely helpful to get a picture diff of the output.

I belive this is the result for the commit that fixed the simspon game (for some reason they never provide the link in the post): [https://fifoci.dolphin- emu.org/version/58e12395c242a839ce561...](https://fifoci.dolphin- emu.org/version/58e12395c242a839ce561395014e631b9e945685/)

<comment><USER3> relevant render comparison: [https://fifoci.dolphin- emu.org/compare/4891635-4889700/](https://fifoci.dolphin- emu.org/compare/4891635-4889700/)

</comment></comment><comment><USER4> Could the link be updated from the Netherlands version of the page to English?

[https://dolphin-emu.org/blog/2019/08/04/dolphin-progress- rep...](https://dolphin-emu.org/blog/2019/08/04/dolphin-progress-report-june- and-july-2019/)

The blog is still in English, but the rest of the site isn't (which I clicked onto afterwards).

</comment><comment><USER5> I think these progress reports are fantastic and super smart. It gives a strong impression of a healthy project with a lot of momentum, and helps us all appreciate how difficult and how much work goes into it. It also serves as a kind of constant marketing for the project, hopefully picking up new contributors along the way.

Kudos to the team! If only other major OSS projects operated similarly!

</comment><comment><USER6> Since it's not immediately obvious...

 _" Dolphin is an emulator for two recent Nintendo video game consoles: the GameCube and the Wii"_

<comment><USER7> The name comes from the fact that "Dolphin" was the code name for the GameCube, hence the part numbers starting with "DOL".

</comment></comment><comment><USER8> the list sorting problem is great miniature of the "users using the software in ways you didn't expect" thing.

<comment><USER9> I'm just surprised that anyone reported this. Oftentimes, users will find workarounds of their own when the software changes. In this case I expect that at least some users rather than reporting how alphabetical sorting affected them, would prefix the cheats with ascending numbers or letters.

So if the user had a list that consisted of

\- Infinite Health

\- Infinite Car Health

\- Timers Frozen

\- Infinite Ammo

\- ...

The user might rename them to

\- 000 Infinite health

\- 001 Infinite Car Health

\- 002 Timers Frozen

\- 003 Infinite Ammo

\- ...

or

\- AAA Infinite Health

\- AAB Infinite Car Health

\- AAC Timers Frozen

\- AAD Infinite Ammo

\- ...

And if the user was anticipating adding more cheats or reordering the cheats, they might number the sequence with gaps in the numbering between each of the entries and at each end.

For example if they had an initial set of 23 cheats they might put a gap of floor(1000/((23 - 1) + 2)) = 41 entries between each entry, numbering them as

\- 041 Infinite Health

\- 083 Infinite Car Health

\- 125 Timers Frozen

\- 167 Infinite Ammo

\- ...

Allowing them to insert or rearrange quite a few entries before having to renumber any of the others.

\- 041 Infinite Health

\- 062 Timers Frozen

\- 083 Infinite Car Health

\- 167 Infinite Ammo

\- ...

Though perhaps more likely you would see them name their cheats something like the following

\- A_Infinite Health

\- B_Infinite Car Health

\- C_Timers Frozen

\- D_Infinite Ammo

\- ...

And to rearrange it as above they would change it to

\- A_Infinite Health

\- A_Timers Frozen

\- B_Infinite Car Health

\- D_Infinite Ammo

\- ...

And a few edits later the list would look like

\- AAAAA_BEST FAVORITE NEW EDIT 2

\- AAAA_BEST FAVORITE NEW

\- AAA_Best favorite

\- AA_Cool cheat

\- ...

Or they might be the kind of person that loves to cobble together some crazy solution wherein they store the names and cheat codes in an Excel file, and use Excel to manage the cheats, and renumber them by entering 000, 001, 002 into the first column of the sheet and select those three cells and then drag the handle in the bottom right of the select downward to continue the series of numbers. Then they export it to CSV and open the CSV in Notepad, do some find-replace operations and then copy-paste the result into their INI file.

Or they could be the kind of person that is familiar with some scripting language, for example Python, so while this user won't touch the code of Dolphin, the user could still write a little script that would renumber the cheats in their INI file for them after they've reordered or added entries.

Thankfully, someone reported the issue though, and so these kinds of workarounds will not happen in this case.

And the kind of person that is most helped by the reverting of the behavior is perhaps the type of person that would otherwise stay indefinitely on the last version of Dolphin that had the entries appearing in the order they appeared in the INI file, and who would then miss out on all of the other improvements coming after that.

<comment><USER10> > I'm just surprised that anyone reported this. Oftentimes, users will find > workarounds of their own when the software changes. In this case I expect > that at least some users rather than reporting how alphabetical sorting > affected them, would prefix the cheats with ascending numbers or letters.

They likely would have if the software had _always_ ordered cheats alphabetically. But when you have a working system, and an update ruins it, people get annoyed (and I don't blame them).</comment></comment></comment>


Graphics 'indistinguishable from reality' in 10 years - <AUTHOR> http://www.gamespot.com/news/graphics-indistinguishable-from-reality-in-10-years-star-wars-dev-6390719 <comment><USER2> First heard that one in, what, 1990? It was "in 5 years" then, it was "in 5 years" in 1998, and it was "in 5 years" in 2005. Good to see that the marketing departments are getting more realistic ;)</comment>


To rewrite the code or not? - <AUTHOR>

So I got an offer to join a cool new startup today. The founders have been developing the site in PHP using a framework the founder cooked up himself (not a full-fledged MVC job like Symphony or Rails, though).
I took a look at the codebase today, and (at least to me) it seems incredibly messy.
Am I too accustomed to working in a Rails-like environment or should I seriously suggest that we rewrite all the code in Symphony or Rails?
I think I could do the whole thing myself in a couple days, so it wouldn't be a HUGE deal.
Your opinions much appreciated. Thanks. <comment><USER2> I've learned a lot over the 2.5 years since starting Loopt and I feel that same way about much of my old code. I've found that rewrites can be a huge waste of time unless some key criteria are met:

1) The code is broken. If it's broken, a rewrite is preferable to an involved patch. What constitutes "involved" depends on time constraints and personal taste.

2) I'm about to build on top of the old code. If I'm going to extend or build on top of something I know is crap, I'll rewrite it (time permitting). Fixing it later will be substantially harder the more it's used, so it's best to fix it now.

I've also become more restrictive in what I consider bad code. Bad architecture and interface design are killer. It's nearly impossible to write something good on top of a crappy framework.

For example, if a method body sucks, but the parameters and return type are fine, I'll leave it be. The implementation can be rewritten later if needed.

However, if when writing some new code I find myself using a bunch of switch statements when the strategy pattern is more appropriate, I'll fix it immediately. It's infinitely easier to fix such things when you're adding the third concrete strategy than the sixth.

Also, on a completely unrelated note, if you can implement everything they've done "in a couple days," you'd better be getting founder equity. Furthermore, if the code really is bad and they won't acknowledge it, I'd high tail it out of there. You'll be fighting a constant battle because new code won't be any better.

</comment><comment><USER3> Instead of a rewrite, how about working constructively to improve the existing code base, including the home cooked framework?

As with all startups, it's more important to release something - anything - (well ok, not _anything_!) than to produce perfect code.

</comment><comment><USER4> Likely not:

<http://www.joelonsoftware.com/articles/fog0000000069.html>

</comment><comment><USER5> They're not going to look on the idea favorably, and you risk pissing this guy off by telling him his code sucks.

I have basically sworn off PHP-using companies, because this is nearly _always_ what you find. It works, but it's a horrid mess that they expect you to develop with rapidly, when all you want to do is take it outside and burn it.

</comment><comment><USER6> "I think I could do the whole thing myself in a couple days, so it wouldn't be a HUGE deal." If you really think so, do it without telling it to them on some weekend or when you have time and show it to them.

</comment><comment><USER7> <scratching head>A rewrite in two days? Hmmm, either its not much of a product in terms of complexity or you are gravely underestimating the effort. I would guess the latter.

You must be prudent in this situation; any sort of rewrite/refactoring will not show visual progress with the product, so while things may be getting better on your end everyone else thinks that the development is stagnating.

 _Always_ be weary of actions where the end user won't see results. Refactor on the fly as best you can. _Nobody_ will care (except for you) when you emerge from your cave a few months later and proclaim "The code is nice and clean; now we can proceed!"

</comment><comment><USER8> If you feel like rewriting in Rails, make sure you consider the deployment factor.

In my experience, the only way to have a Rails app that is responsive and reliable without spending most of your time on deployment as opposed to on development, is having someone like EngineYard host it. But that costs 100s of dollars per month, which might be ok in your case, I don't know.

Maybe you want to go with Symphony instead.

I'm not so much against big rewrites, you just have to figure it out yourself if you think it makes sense.

<comment><USER9> I've been playing around with Symfony lately and I am very impressed with it. At first, the endless amount of directories seems to not make sense, but once you start to use it you'll see they make perfect sense.

Very easy to deploy as well given that it's written in PHP.

<comment><USER10> Why don't you try Code Igniter out? I fell in love with PHP again cuz of it. Plus it's pretty lightweight and snappy compared to Symfony. Not to mention they are pretty much similar in structure.

</comment></comment></comment><comment><USER11> _should I seriously suggest that we rewrite all the code_

Great idea. And ask them about their severence benefits when you do this.

 _cool new startup ... I think I could do the whole thing myself in a couple days_

How cool could it be if their technology is so simple?

<comment><USER12> How long do you think it would take to re-write the early version of most startup sites? Most of them aren't doing things that are inherently difficult, but rather new/unique/interesting/right-place-right-time. Twitter?

</comment></comment><comment><USER13> beware the great rewrite.

</comment><comment><USER14> So let's see, the question is whether or not you should spend two days doing _something_ to the code that will make your ownership of it easier to manage?

Sounds like a no-brainer. Go for it. Of course, you'd better be sure you can really pull it off in a couple of days. Programmers are notorious for under- estimating these things. But in general, if you're going to be doing something for 2 months or more and you can do something up front that saves you ten percent or so -- do the math. Don't get into "always rewrite" or "never rewrite"

If you can recreate what they're doing that quickly, you're not that far along the development path anyway. There's a whole different answer if they've spent 3 months plugging away at it and already have paying customers. But it doesn't sound like you are there.</comment>


Ask HN: What source code is worth studying? - <AUTHOR> I realized recently that it's been a long time since I looked at anyone else's code outside of the context of debugging or working on it for hire.  In your opinion, what are some examples of particularly well-designed or implemented software projects worth looking at to broaden one's own horizons as a programmer? <comment><USER2> I'm going to get downvoted for picking a non-open source option but...

The NT kernel is the most beautiful piece of code I've seen. Dave Cutler and team wrote some very, very elegant code that anyone (even if you're not a kernel hacker) can understand. If I need 'code inspiration', I spend some time looking through their code.

Now, the NT kernel itself doesn't have source out there but for folks who are students, you should be able to get your hands on the Windows Researh Kernel ([http://www.microsoft.com/resources/sharedsource/windowsacade...](http://www.microsoft.com/resources/sharedsource/windowsacademic/researchkernelkit.mspx)). This has all the good stuff (and is much easier to build too)

<comment><USER3> I spent several years writing drivers for NT and I don't know which part of the NT kernel you were looking at. The parts I saw were an utter mess lacking any sort of elegance whatsoever. If there were two ways to implement something, one simple and the other one contrived, you can bet your MCSD certificate NT will be using the latter.

The overall impression was that it was hacked together in the worst sense of the word. Like there were several teams developing it that did not communicate with each other. Pieces of the kernel are forced together rather than fit snugly by design. I cannot stress enough how mind-boggingly repulsive it was to work with it. And that's not even touching NDIS, the networking module, which can be used for scaring some serious shit out of young programmers.

If you put BSD or Linux code side by side with NT, look me in the eye and tell me that NT kernel is "the most beautiful piece of code you've seen", you will need to see a head doctor.

<comment><USER4> I'm not sure you can actually see the kernel outside the base OS team at Microsoft, or under a unique license. it is not included in MSDN or the DDK.

Having worked on that team and having seen it for myself, it is truly elegant, concise, and very well written. I myself never touched it, and that is for the best. I probably wrote some of the crappy drivers for which you hold so much contempt.

<comment><USER2> You can get the Windows Research Kernel through the MSDNAA (which most major universities should be hooked up to). The WRK has all the good stuff

<comment><USER4> Agreed, but slamming Dave Cutler's work on the NT kernel, as huhtenberg did, sounds more like trolling than anything else to me. (Regardless of your opinion of Microsoft.)

</comment></comment></comment></comment></comment><comment><USER5> Your compiler's source code. That should shake your confidence in the world.

<comment><USER6> for an easier time, your favorite language interpreter's source code ... interpreters are easier to comprehend than compilers, since you can 'follow along' with the flow of execution in the main interpreter loop just like you're executing a program ... e.g., creating stack frames, allocating heap memory, assigning variables, etc.

<comment><USER7> Squeak Smalltalk. For Java, if you can get hold of it, the old Acme Webserver. That was very clean code.

<comment><USER8> Squeak is pretty sweet. I was looking at the Kernel category and the Parser classes. Pretty clean stuff.

</comment></comment></comment></comment><comment><USER9> One project I found fascinating reading a while back when I was working on graphics, is AGG. It's a vector graphics toolkit, a bit like Cairo, Quartz 2D or Java 2D. It uses a particular style of C++ - a mixture of template programming together with regular polymorphism - to build up a collection of rendering components. The components are almost Unix-like - you plug them together to build your customized rendering pipeline, and the C++ compiler's template logic takes care of making everything hardwired (or dynamic, if you choose to use the polymorphic components):

      http://www.antigrain.com/

The end result is a toolkit which is at a lower level than Quartz 2D et al, but could easily be used to build such an API. It can also be adapted for embedded, or high precision uses.

<comment><USER10> [http://www.haiku- os.org/documents/dev/painter_and_how_agg_wo...](http://www.haiku- os.org/documents/dev/painter_and_how_agg_works)

<http://bit.ly/131cxL> (.doc file)

those help. if you can figure out the source code without the documentation at the agg site + those files, more power to you. but basically you are nuts.

<comment><USER9> Thanks for the links, I've never seen those before. I read the agg code without the docs, but it would have been difficult without the example programs. The docs definitely help when looking at some of the algorithms though. I remember spending a good day or two staring at the anti-aliasing code, together with the freetype rasterizer (on which it was based), trying to figure out what the hell was going on. Then in just clicked.

</comment></comment></comment><comment><USER11> "Code reading requires its own set of skills, and the ability to determine which technique to use when is crucial. In this indispensable book, Diomidis Spinellis uses more than 600 real-world examples to show you how to identify good (and bad) code: how to read it, what to look for, and how to use this knowledge to improve your own code."

<http://www.spinellis.gr/codereading/>

<comment><USER12> This is a good read and uses lots of examples from one of the BSDs (NetBSD as I rememeber).

</comment></comment><comment><USER13> Quake source code: www.idsoftware.com/business/techdownloads/

From a graphics and game engine perspective, it was very informative to go through pieces of of the source - I was mainly interested in the client/server and collision detection areas of the code.

<comment><USER14> Check out this recent analysis of parts of the source: <http://www.fabiensanglard.net/quakeSource/>

</comment></comment><comment><USER15> This is half answer/half tangent, but I like <http://www.google.com/codesearch> a lot for browsing and reading code. A fun thing to do is to look at how others implement something you want to implement, or use some library you want to use. You end up finding a lot of different ways of doing the same thing, and if you find something that you want to explore more, it's easy to browse around.

</comment><comment><USER16> I learned a lot from Qt:

<http://qt.nokia.com/>

And it's not just their code, everything they do is exemplary. It's one extremely well run software project.

See for example their documentation:

<http://doc.trolltech.com/>

<http://doc.trolltech.com/qq/qq13-apis.html>

</comment><comment><USER17> Plan 9's source (<http://plan9.bell-labs.com/sources/plan9/sys/src/>)

The Lua VM's source (<http://www.lua.org/source/5.1/>)

</comment><comment><USER18> For systems programming, I've learned a lot from reading the source for open solaris: <http://src.opensolaris.org/source/>

And the LLVM compiler is far more understandable than gcc sources: <http://llvm.org/viewvc/llvm-project/llvm/>

<comment><USER19> I agree with this, and along the same thought, OpenBSD (or any BSDs really, but OpenBSD tends to favor simpler implementations) source is very clear and concise.

<comment><USER20> Minix, not being as 'real world' as the BSD's or Linux, is even more readable, if you're just interested in a quick glance at how an OS works.

<comment><USER21> From Minix' site: _MINIX 1 and 2 were intended as teaching tools; MINIX 3 adds the new goal of being usable as a serious system on resource-limited and embedded computers and for applications requiring high reliability._

Is Minix 3 still readable, or do you recommend Minix 2?

<comment><USER20> Good question. My experience was with Minix 2: I needed a floppy driver to weld on to eCos, and Minix's was by far the easiest to deal with. I haven't looked at Minix 3.

</comment></comment></comment></comment></comment><comment><USER22> SQLite's source listing is great. I learned a lot about good C practices and documentation reading it.

<comment><USER5> You will enjoy "C Interfaces and Implementations", along with the full, literate source-code for LCC.

This is also good, Standard Function Library:

<http://legacy.imatix.com/html/sfl/>

<comment><USER17> Where can one find the full literate source code for LCC? I haven't been able to find it anwyhere, and god knows I searched.

<comment><USER23> I'm guessing here: <http://www.cs.princeton.edu/software/lcc/>

<comment><USER17> There's no literate source linked to on that page. Just plain, normal, barely- commented C.

<comment><USER24> "There's no literate source linked to on that page. Just plain, normal, barely-commented C."

The book by David Hanson is the literate program.

<comment><USER17> Ok, so the literate source, in a form that I can actually play with, isn't acutally available. It doesn't even seem to be maintained in literate form in SVN.

That's what I was trying to determine.

</comment></comment></comment></comment></comment></comment></comment><comment><USER25> Qmail: <http://cr.yp.to/qmail.html>

It feels well organized almost throughout, and it's a joy to experience the clarity of thought that went into it. In fact, most of djb's code has a similar feeling to it.

Arthur Whitney's code: <http://www.nsl.com/papers/origins.htm>

Being able to read this (and not merely decode it, but read it, in a manner similar to how you would read a book) will broaden your horizons like nothing else I've seen.

<comment><USER26> More of crazy Whitney code available at <http://aplusdev.org>

</comment></comment><comment><USER24> One way to find code worth reading is to select inspiring developers and look at their code. Most of the developers in "Coders At Work" for example, have Open Source code we can look at learn from.

The best code I've seen: -

Common Lisp - "Paradigms of Artificial Intelligence Programming" by Peter Norvig and "On Lisp" by Paul Graham

C - "C Interfaces and Implementations" and "LCC- a compiler for ANSI C" both by David Hanson. I also found the code for the Player/Stage robotic sim framework surprisingly readable.

I liked the Scala Actors library code as well.

If any HNers know any great codebases in Haskell or Erlang, please post here.

<comment><USER27> For haskell I would recommend Xmonad. The code is short, lots of interesting functionality including a well written plug-in system.

<http://xmonad.org/>

<comment><USER28> Xmonad is nice code indeed. For an introduction to a piece of it, check out Simon Peyton Jones's talk at OSCON 2007 - he uses Xmonad code as an introduction to Haskell, which gives you a taste of how the program is constructed.

</comment></comment></comment><comment><USER29> I highly recommend the Stanford GraphBase, written by Donald Knuth. It's C code written by Knuth using the literate programming tool CWEB. If you don't know about CWEB, it's not hard to learn how to use, and probably is already installed on your system if you have TeX. The Stanford GraphBase is available for free download on Knuth's web-site, and also comes bound in a nice paperback book, that was reprinted in 2009. Knuth also makes available many other programs written using CWEB on his web-site, but I would start with the GraphBase.

</comment><comment><USER30> I haven't perused it myself, but every time I see this question posed, someone always mentions Lua: <http://www.lua.org/ftp/>

Similar previous discussions:

<http://news.ycombinator.com/item?id=225577>

[http://www.reddit.com/r/programming/comments/26dyh/ask_reddi...](http://www.reddit.com/r/programming/comments/26dyh/ask_reddit_whats_the_most_beautiful_piece_of)

<comment><AUTHOR> Thanks for these links - I figured the topic must have come up before, but couldn't Google my way to the right HN thread. Hopefully there will be a search box on this site one day.

<comment><USER30> Just use <http://searchyc.com/> :)

</comment></comment></comment><comment><USER31> For Java, all of Apache's stuff is good - particularly Jakarta. <http://jakarta.apache.org/> This covers a wide range of topics and is designed to have a public API. <http://code.google.com/p/google-collections/> and <http://code.google.com/p/guava-libraries/> and <http://code.google.com/p/google-guice/> are interesting in that they come out of Google, beyond their own individual merits.

</comment><comment><USER32> Django's code is well written, and very well documented.

<comment><USER33> I think you tend to learn more studying badly written badly documented code. Certainly there's a lot of knowledge to be gained being able to decipher spaghetti code with no documentation. I guess it depends on your aims though.

</comment></comment><comment><USER34> The FreeType 2 font rasterizer is beautiful code. Geometric computation meets performance optimization meets just-well-written-and-commented C.

[http://git.savannah.gnu.org/cgit/freetype/freetype2.git/tree...](http://git.savannah.gnu.org/cgit/freetype/freetype2.git/tree/src/raster/ftraster.c)

</comment><comment><USER35> If you're an iPhone developer, Joe Hewitt's three20 is the best open-source codebase I know of: <http://github.com/joehewitt/three20>

<comment><USER36> Three20 is really useful. It's also quite powerful. But I wouldn't recommend it to someone trying to learn/study idiomatic Cocoa.

Joe tends to do things his own way, which works out fine, but does tend to depart from most people's Cocoa/Touch code.

</comment></comment><comment><USER37> Ward's Wiki (The Portland Pattern Repository) has a short list of "Programs to Read" at <http://c2.com/cgi/wiki?ProgramsToRead>.

</comment><comment><USER38> DVD John's DeDRMS written in C#. It was beautiful, but I can't seem to find the source code right now. If anyone can please share.

\--EDIT---

Found it: [http://web.archive.org/web/20050315135351/http://nanocrew.ne...](http://web.archive.org/web/20050315135351/http://nanocrew.net/software/DeDRMS/DeDRMS-0.1/DeDRMS.cs)

</comment><comment><USER39> If you're interested in literate programming: TeX

</comment><comment><USER40> Diomidis Spinellis has written two books (Code Reading and Code Quality) on this subject that take you through annotated examples of industrial strength systems code (mostly from BSD IIRC): <http://www.spinellis.gr/codereading/>

</comment><comment><USER41> Any recommendations for php? I wrote a php/mysql web application for SaaS customers. I am looking at ways to improve performance/cache/error handling or simply write a better code.

<comment><USER42> There's a lot of excellent PHP code in the Horde Project's repository: <http://cvs.horde.org/>

<comment><USER43> There is no such thing as excellent PHP code.

</comment></comment></comment><comment><USER44> The Lions book. [http://www.amazon.com/Lions-Commentary-Unix- John/dp/15739801...](http://www.amazon.com/Lions-Commentary-Unix- John/dp/1573980137)

</comment><comment><USER45> Any recommendations for Ruby/Rails projects?

<comment><USER46> I'm a big fan of ThoughtBot's stuff (<http://www.thoughtbot.com/projects>). Mostly I use Shoulda and FactoryGirl, but I've been consistently impressed with their ideas and code quality.

For idiomatic Ruby and Rails stuff I have probably learned more from Rick Olson's stuff (<http://github.com/technoweenie/>) than any other single source. Sometimes I think he tends to be too clever for his own good, but the code is good to read for that reason even if simpler things are better in production.

</comment></comment><comment><USER47> I highly recommend both Paul Graham's source code for Arc (<http://ycombinator.com/arc/arc3.tar>), as well as the source code for Quake and Quake II (<http://www.idsoftware.com/business/techdownloads/>).

</comment><comment><USER48> Anyone willing to recommend a Java project worth studying?

<comment><USER49> <http://nakedobjects.org/> <http://code.google.com/p/piccolo2d/>

</comment></comment><comment><USER50> One way I've found to start reading code (something that I do not find easy at all) is to read code you use. Lately, I've been reading pyparsing and the Python markdown module. As an added bonus, I also discovered features in those libraries that I never knew existed.

</comment><comment><USER51> I learned about sockets and networking by looking at the source for wget.

That's also where I saw calloc.c - A portable implementation of calloc. I distinctly remember it being one of the cleverest hacks I've seen.

</comment><comment><USER52> I've heard this book was good [http://www.amazon.com/Beautiful-Code-Leading- Programmers-Pra...](http://www.amazon.com/Beautiful-Code-Leading-Programmers- Practice/dp/0596510047/ref=sr_1_1?ie=UTF8&s=books&qid=1255463914&sr=8-1). It asks 30 different developers for pieces of beautiful code. I read an excerpt or two back when it was released and put it on my to read list. Unfortunately haven't gotten to it yet, but still plan too.

</comment><comment><USER53> Any recommendations for good C# code? Much of the web is open source oriented so I don't hear too much about great C# code.

<comment><USER54> There are some code examples on Eric Lippert's blog that are made of good C# code.

</comment></comment><comment><USER55> I don't know if this is good advice today, but back in the day I learned a lot both from STL and the Boost libraries, specifically Spirit, which I still think is an amazing feat: <http://spirit.sourceforge.net/>

</comment><comment><USER56> i will say unless you plan to make small changes, you wont get much out of studying the source code. fixing small bugs in an open source project will expose you to lot of portions of source code and also give you some rep in case you want to become a contributor later

</comment><comment><USER57> The Linux kernel: <http://miller.cs.wm.edu/>

<comment><USER58> Equally or more valuable than trying and sit down to read the kernel source is to follow the patches and discussions thereof on the linux-kernel mailing list: <http://lkml.org/>

I've found that doing so a) improves my knowledge of what's going on under the hood tremendously, and b) has taught me a fair bit about how to do code reviews and make difficult design decisions. Studying the kernel itself line- by-line would take ages, but reading a few threads a week depending on what piques my interest is totally manageable.

<comment><USER57> I don't treat is a novel, but a reference. I'll often wonder how certain things are implemented, and I'll poke around for the data structures and algorithms until I gain some understanding of how it works.

</comment></comment></comment><comment><USER59> <http://httpd.apache.org> and <http://jboss.org> and <http://lxr.linux.no>

</comment><comment><USER60> R internals - <http://cran.r-project.org/doc/manuals/R-lang.html>

</comment><comment><USER61> Could anyone recommend something for Python? If something is out there for ruby, there's got to be at least one thing for python.

<comment><USER10> How about Ned Batchelder's implementation of Frank Liang's hyphenation algorithm:

<http://nedbatchelder.com/code/modules/hyphenate.html>

or AI:

<http://aima.cs.berkeley.edu/python/readme.html>

</comment></comment><comment><USER62> I hear good things about the webkit source code

</comment><comment><USER63> TeXmacs

<http://www.texmacs.org/tmweb/download/sources.en.html>

</comment><comment><USER64> Any recommendations for good objective-C code?

</comment><comment><USER11> Flex: FlexLib (mostly by Doug McCune)

<http://code.google.com/p/flexlib/>

</comment><comment><USER65> Anyone can point to a good javascript code?

<comment><USER66> I find the sources of ExtJS nice to read. They have an OOP approach.

<comment><USER67> I'd really like to see some functional-style JS code.

[ background : I've used OOP a lot, and thought it was the ultimate, until I discovered lisp... ]

</comment></comment></comment><comment><USER45> Any good event-driven JavaScript (jQuery/Prototype is also fine) projects out there?

<comment><USER68> Event driven JS tends to go spaghetti really quickly unless you're using a good events framework. The yui3 and sproutcore frameworks are pretty close to opposite ends of the spectrum in terms of philosophy, but both have very well defined processes for dealing with events. The two frameworks you mention are fine for adding "ajax" to a more or less working server based app but they aren't so hot for building a complete app. FWIW, MochiKit's Signal framework is also nice (though the codebase is now fallow) and Dojo's system has a sort of nifty aop feel, but dojo is kind of hairy in that there are a lot more chefs in the kitchen there.

</comment></comment><comment><USER69> I've been led to understand that the OpenBSD source code is of amazing quality.

</comment><comment><USER70> LAPACK

<http://www.netlib.org/lapack/>

</comment><comment><USER71> That of a metacircular evaluator such as the one described in SICP.

</comment><comment><USER72> openssh</comment>


A Productivity Hack for Teams - <AUTHOR> http://blog.transloc.com/?p=70

<comment><USER2> Sounds like the exact sort of place I wouldn't want to work at. Sounds way too much like kindergarden to me.

I'm a programmer. I need quiet. Give me an office or let me work at home. If I need to collaborate, I can go to a meeting room or use my phone.

<comment><USER3> Some people are both programmers _and_ social beings. They need to be able to chat, joke, exchange ideas (that may not have anything to do with the work at hand), talk about the f __*ing weather on order to facilitate collaborating as a team. Collaborating as human beings involves way more than just making a phone call or having a meeting when there is something "important" to discuss.

(Funny enough, socializing kids is one of the most important functions of kindergarten...).

<comment><USER4> I know it was a side thought, but as the son of a kindergarten teacher, you are absolutely right.

</comment></comment></comment><comment><AUTHOR> Anyone know of other teams who have implemented something similar?

<comment><USER5> I've seen people implement the opposite with success: <http://martinfowler.com/bliki/TeamRoom.html>

It all comes down to company's culture.

</comment></comment><comment><USER6> local man discovers value in simply "shutting the hell up"</comment>


Ask HN: Will the winner take all in the software world? - <AUTHOR> In a world of venture backed startups and tech giants. Apart from niche ideas, how can smaller companies find their advantage? <comment><USER2> It will probably be more like a cartel. gives the illusion of choice but not really.

<comment><AUTHOR> Yep absolutely, when I see how Facebook is relentless about getting into everything they can get themselves into ( which they have the right to do ) in a plan that almost looks like world domination, I wonder how small startups can survive if these companies try to take them out.

</comment></comment><comment><USER3> customer service

<comment><AUTHOR> meaning that smaller companies care more, is that what you mean?

<comment><USER3> Yes</comment></comment></comment>


Syscall Call-From Verification [OpenBSD] - <AUTHOR> https://twitter.com/openbsd/status/1199802015670579202 <comment><AUTHOR> This new proposed mitigation builds upon other work, such as libc/ld.so random re-linking at boot, and opportunistic enforcement of syscalls from only un- writable pages by default.

[https://www.openbsd.org/innovations.html](https://www.openbsd.org/innovations.html)</comment>


YC Arbitration List - <AUTHOR> http://www.ycarbitrationlist.com/ <comment><USER2> This UX is super confusing - so an X means that it has bad terms or doesn't have that clause? A green check means it does have that clause so it's a bad company? But the check is green...I would think it should be YES and NO, with YES in red, meaning that it _does_ have a class action/arbitration clause that is harmful to consumers.</comment>


Elixir in Production: Venu - <AUTHOR> https://serokell.io/blog/elixir-in-production-venu <comment><USER2> I'm glad to see more stories coming out about Phoenix and Liveview.</comment>


Ask HN: Why does this search not work? - <AUTHOR>

This search: [0] http://www.hnsearch.com/search#request/all&q=title%3Ashit&sortby=create_ts+desc
does not find this item: [1] http://news.ycombinator.com/item?id=4084603
It's over two days old, so surely it's been indexed by now.  It has an unusual word in the title, and I'm specifically searching for that word in the title.
Why does it not turn up in the search results?
This has wider implications for all web and mobile apps: Trust.  If you provide demonstrably wrong, poor or misleading results, your customers won't trust you, and they'll be reluctant to give you money. <comment><USER2> HNsearch is about ~8 days behind in updating their index at the moment. Not sure why. (I have a little widget which keeps an eye on mentions of my name and the Patio11 bat signal, for giggles. Due to the way HNsearch works, this also picks up all my own comments. The most recent one indexed is about eight days old.)

 _If you provide demonstrably wrong, poor or misleading results, your customers won't trust you, and they'll be reluctant to give you money._

This goes in the file of Things Engineers Wish Were Accurate Descriptions of Measurable Features Of Reality In Spite Of Overwhelming Evidence To The Contrary.

<comment><AUTHOR> So do you think that poor, misleading, or wrong results do not in fact lead to a lack of trust? Or do you think that a lack of trust does not prevent people from giving you money?

I know that people act irrationally, so I'm interested in seeing where the chain of logic gets broken. Certainly in my day job we find that people really, really don't give money to people who fail to give accurate and timely results, so I'd be very interested in hearing your take on this, especially given your background and experience.

Thanks.

<comment><USER2> People are often demonstrably incapable of deciding whether results are poor, misleading, or wrong. For example, they routinely delegate that decisionmaking to trusted advisors who they have picked in a not-strictly-speaking-rational manner (e.g. most middle class people abominably overpay for investment advice from people who give them screamingly bad advice. This is the nearly universal finding of decades of research. Evidence for "If you're paying 2% to a broker to buy a mutual fund with 2% fees you are making a bad decision" is substantially more certain than "Cigarettes: not that great for you!" and yet people make that decision every day. They will make it, in controlled laboratory settings, for things as frivolous as $250 of airline miles.)

A specific example of this with regards to information search problems: not only are people incapable of telling whether a SERP is a good SERP or not, you can create _objectively bad SERPS_ and then sell them as good by, e.g., mimicking either a) the design, b) the branding, or c) the design and branding of, e.g., a Google SERP. There exist studies of what happens when you e.g. dress up Yahoo results in Google CSS (people will prefer them over Google results in Yahoo CSS or, for that matter, Google results in Google CSS).

With specific relevance to the giving of money, I have access to anecdotes from the SEO world that occasionally curl my toes. A fairly common trick is a review site with the review stars awarded by "sort by affiliate commission, descending", which obviously bears no relationship to quality results. It doesn't just work, it works _astoundingly well_. And not only does it work astoundingly well, it works astoundingly well on people who one would presume are fairly savvy about quite-involved purchases where the dollar amounts involved will, frankly, swamp the total lifetime value of all paid-for HN searches. (e.g. Obscuring particulars a little bit, would you expect that anyone would make a decision for a seven-figure software deployment at a $FINANCIAL_INSTITUTION on the basis of a starred review site with a name spiritually similar to www.best-bank-software.biz? _cough_ Demonstrable evidence of success.)

</comment></comment></comment><comment><USER3> The HNSearch crawler was behind due to an IP change related to our move to an AWS VPC. Everything should be up-to-date now: [http://www.hnsearch.com/search#request/all&q=ask+hn%3A+w...](http://www.hnsearch.com/search#request/all&q=ask+hn%3A+why+does+this+search+not+work&start=0)

</comment><comment><USER4> The people behind HNSearch are upgrading their servers I was told.

</comment><comment><AUTHOR> [0] [http://www.hnsearch.com/search#request/all&q=title%3Ashi...](http://www.hnsearch.com/search#request/all&q=title%3Ashit&sortby=create_ts+desc)

[1] <http://news.ycombinator.com/item?id=4084603></comment>


The Banality of 'Don't Be Evil' - <AUTHOR> http://www.nytimes.com/2013/06/02/opinion/sunday/the-banality-of-googles-dont-be-evil.html <comment><USER2> Note: The article is from 2013.

<comment><AUTHOR> And it is still amazing...</comment></comment>


Ask HN: What are the reasons why you will not apply to YC in 2019? - <AUTHOR> What are the reasons why you will not apply to YC in 2019? <comment><USER2> I have no social skills, no network, no ideas worth throwing money at, I despise startup culture, and I'm too much of an idiot to successfully fool anyone into thinking otherwise.

</comment><comment><USER3> I don't want to spend the 7 to 10 years it takes to succeed with the kind of startup that YC invests in. I'll proceed with a side project instead and sell out if it develops significant potential for such growth.

</comment><comment><USER4> Won't be applying after they set up shop in China. For both political/moral and "tech" reasons.

</comment><comment><USER5> When was the last time YC was relevant?</comment>


OpenBazaar is Open for Business - <AUTHOR> https://blog.openbazaar.org/openbazaar-is-open-for-business/ <comment><USER3> Congrats on the launch!

Looking forward to seeing how this social experiment/project plays out.

</comment><comment><USER4> Can anybody summarize the benefits? Too lazy to install the software myself.

As I understand, there is an escrow. Is it trustless/multi-sig based? What about privacy/encryption? Can anybody be an escrow agent?

<comment><USER5> It's like a darknet market (Silk Road, AlphaBay, etc) that can't be taken down by law enforcement. Or it's like a clearnet market (Ebay) that doesn't take a cut and works with bitcoin.

It looks like it uses multisig as a form of escrow [1], but the third party isn't in any way affiliated with openbazaar, just whoever the vendor and customer can agree to trust. It looks like users have to find a third party on their own, out-of-band [2]. I can see this working for small vendors, but I don't see how it would work with large vendors without the emergence of 1–3 large escrow services, which would diminish some of the benefits of decentralization.

This kind of multisig-based escrow will never be able to compete with Ebay. On Ebay, customers don't realize that they're paying Ebay to be a moderator because it's included in the price tag. On OpenBazaar they will be forced to pay attention to the escrow fee. I also fear that it will be impossible for escrow services to develop the necessary level of trust without being forced on vendors by the marketplace and still compete with the customer-favoring escrow that Ebay has.

It competes much better with darknet marketplaces, since it eliminates the possibility of sudden cash-outs or FBI raids on the scales that other markets have seen. They should accept that that's where they'll be successful and integrate some kind of anonymizing layer, probably tor, maybe i2p.

[1] [https://blog.openbazaar.org/what-is- openbazaar/](https://blog.openbazaar.org/what-is-openbazaar/)

[2] [https://openbazaar.zendesk.com/hc/en- us/articles/207548366](https://openbazaar.zendesk.com/hc/en- us/articles/207548366)

<comment><USER6> This is wrong, anyone using openbazaar for darknet reasons will be instantly caught because openbazaar does not support TOR or annonymity in any form.

The goal of the developers is simply a marketplace client, which seems misguided.

<comment><USER5> I'm sure you can use the tor http proxy like you can with nearly everything else.

<comment><USER7> Replying here because the stupid max comment depth was reached on your deeper comment. You said:

> I guess they might use [UDP] for DHT control messages

And IIRC that's exactly what they use UDP for.

The subreddit had a lot of good info last I checked (a few months).

[https://www.reddit.com/r/openbazaar](https://www.reddit.com/r/openbazaar)

<comment><USER8> > Replying here because the stupid max comment depth was reached on your > deeper comment

Note that there is _no_ "max comment depth" on HN, and I don't know where this thought keeps coming from. There are a few reasons the "reply" link may not be shown:

\- The comment was posted too recently, and you need to wait for the cooldown to expire. This _is_ proportional to comment depth. It's said this is a flamewar prevention mechanism.

\- The comment is too old.

<comment><USER7> Ah, ok. A quick google didn't show me why there was no reply link so I just assumed it was a depth thing. Thanks for the info.

</comment></comment></comment></comment></comment></comment></comment><comment><USER9> Cached mirror:

[https://archive.is/yOB5L](https://archive.is/yOB5L)

<comment><USER10> Thanks, the original link timed out for me.

</comment></comment><comment><USER11> Looks interesting. Is it essential to their goals that it be a separate app? I wonder why it's not just a website.

<comment><USER12> But then it wouldn't be decentralized

</comment></comment><comment><USER13> Extremely impressive UI. Great work team!

</comment><comment><USER14> how does openbazaar make money? How will the investors recover money and make profit?

<comment><USER15> I couldn't find this answer either. It's difficult to trust someone with large hosting / development / etc costs but no business model. It's not a charity. How do they "keep the lights on" with no fees?

<comment><USER16> Why would they have large hosting costs? They don't do anything except have a website where you can download the OpenBazaar software individual stores are self hosted.

</comment></comment></comment><comment><USER17> Looks interesting. Are my only options to use root password or compile it myself?

</comment><comment><USER18> Panama papers -- <anger> OpenBazaar -- cool!

<comment><USER19> AFAIK decentralised Bitcoin transactions are already illegal in the US if none of the parties to the transaction have a money transmitter license - <USER2> me if I'm wrong.

<comment><USER20> You're COMPLETELY wrong... like extremely wrong. Bitcoin transactions between peers have always been legal.

Conversion of USD - Bitcoin over something like $5000/year needs a MSL</comment></comment></comment>