Ask HN: What are some examples of good code? - <AUTHOR> I keep reading on HN that I'm order to become a better developer I need to write code everyday, and more importantly read other people's code.
What are some examples of good code that you've seen?
Personally I'm interested in Ruby on Rails and I've recently started going through GitLab-CE[1] but what is your favor code?
[1]: https://gitlab.com/gitlab-org/gitlab-ce <comment><USER2> Writing code is really a modelling problem: you write down code that describes the model that's inside your head. When you're done, you're left with both working code on a hard drive, and a new, better model inside your head, because you understand the problem better.

So, reading someone else's code can be like reading a model of something that has gone through dozens of iterations, where the bottleneck isn't really understanding "the code", but understanding the thing that is modelled, which the people writing the code are intimately familiar with, unlike you[1].

In my opinion, developing this modelling skill, in yourself, is much more important than watching the result of someone else exercising their modelling skill. A lot can be learned from observing someone else's solution, but this will always be secondary to learning how to craft your own.

[1] For example: try reading compiler code. People have been writing compilers for so long that reading and understanding this code isn't about understanding the actual code, but about understanding how a compiler is modelled (scanning, lexing, parsing).

<comment><USER3> I completely agree. I've been thinking of replicating a mid-sized project written by a programmer that I respect so that I think a lot more about the model before comparing the code.

</comment></comment><comment><USER4> Not Ruby but for C code, I like Redis's code:

[https://github.com/antirez/redis/tree/unstable/src](https://github.com/antirez/redis/tree/unstable/src)

I don't personally use the product, but I find the source well written and always share it as an example of nicely done C code.

Here is some nice Erlang code I like -- network packet parsing:

[https://github.com/msantos/pkt/tree/master/src](https://github.com/msantos/pkt/tree/master/src)

Notice how concise this is:

        codec(
           <<4:4, HL:4, ToS:8, Len:16,
           Id:16, 0:1, DF:1, MF:1, %% RFC791 states it's a MUST
           Off:13, TTL:8, P:8, Sum:16,
           SA1:8, SA2:8, SA3:8, SA4:8,
           DA1:8, DA2:8, DA3:8, DA4:8,
           Rest/binary>>
        ) when HL >= 5 -> ...

This is due to the beauty of binary pattern matching. You could kind of do it in C by casting to a struct but notice here it is also calculating header length (HL) as part of the match operation. So it can do a bit more than just casting a binary blob to a struct.

Another thing here is that it is also big endian by default so there is not need for htons(), htonl() and such functions sprinkled throughout the code.

<comment><USER5> Not disputing the code quality of either above project, but over valuing brevity / being concise is a common cause of problems. Specifically, people will often sacrifice readability and robustness for brevity.

At this point in my career I don't really value being concise at all. Which is not to say you shouldn't ever think about "Can I write less code here?" but the goal there should be writing less code to make what you're writing more robust, more stable, more readable and not just shorter.

If there's one thing I could tell every programmer early in their career (including a younger me) it would be; nobody's going to be impressed with how clever you were when they're frustrated trying to understand what the heck is going on. Including you in 6 months.

<comment><USER6> It's amazing that this is still highly debatable in our industry. _Always_ write to make debugging easier. Always. There's so many people that worship cleverness over readability.

<comment><USER7> In all fairness, a stunningly clever insight can make things seem so obvious that you forget how hard it was to have that original insight.

This kind of brevity is extremely helpful when thinking about a problem. You "just" have to grok the mechanics thoroughly. This really helps in designing effective higher level abstractions.

Unequivocally admonishing brevity for ostensible readability kind of ignores the trade offs. I think there are other ways to bootstrap grokkability without having to sacrifice the conceptual clarity of nicely compact code.

<comment><USER8> As someone taking a lot of ML/AI courses ( a subject new to me) , these clever insights are popping up all around me lately, and I agree once you learn it, it's hard to imagine what it was like before.

I'm hitting a lot of 'aha' moments which has really been emotionally satisfying, it's been a long time since I had to push myself I guess.

</comment></comment></comment></comment></comment><comment><USER9> This stuff about "reading code" is basically bullshit and nobody does it. [http://www.gigamonkeys.com/code-reading/](http://www.gigamonkeys.com/code- reading/)

> Seibel: I'm still curious about this split between what people say and what > they actually do. Everyone says, "People should read code" but few people > seem to actually do it. I'd be surprised if I interviewed a novelist and > asked them what the last novel they had read was, and they said, "Oh, I > haven't really read a novel since I was in grad school." Writers actually > read other writers but it doesn't seem that programmers really do, even > though we say we should.

> Abelson: Yeah. You're right. But remember, a lot of times you crud up a > program to make it finally work and do all of the things that you need it to > do, so there's a lot of extraneous stuff around there that isn't the core > idea.

> Seibel: So basically you're saying that in the end, most code isn't worth > reading?

> Abelson: Or it's built from an initial plan or some kind of pseudocode. A > lot of the code in books, they have some very cleaned-up version that > doesn't do all the stuff it needs to make it work.

<comment><USER10> > _This stuff about "reading code" is basically bullshit and nobody does it._

Some guy says in an interview it's bullshit, so it is?

You never read other people's code? Not when the documentation's lacking? Not when the documentation's fine, for a framework say, but you need to see an example of how it's actually used in the context of a real application?

<comment><USER11> The implication that I get from the quote is that people don't read code _for the sake of reading code_.

And that matches my experience: When I read code, it's precisely because the documentation is lacking, or because I want to match up an error message produced by the code with the logic preceding the error message's origin.

<comment><USER12> Or, quite often, you read it because you want to change it - to extend it or to fix a bug.

<comment><USER13> I think the best way to both read code and gain experience is to set a goal of at least weekly or monthly contributions to a couple of open codebases that benefit your life.

</comment></comment></comment></comment></comment><comment><USER14> You'll find some great examples in a variety of languages on The Architecture of Open Source Applications site:

[http://aosabook.org/en/index.html](http://aosabook.org/en/index.html)

<comment><USER15> This book is amazing

</comment></comment><comment><USER16> SQLite/Fossil source tree is a piece of art, practically every single function is well commented, written in clean C, easy to read. DRH has done an astonishing work. I'm impressed by his work. In my company where we do embedded C, the programming style is based on him. [https://github.com/symisc/](https://github.com/symisc/)

</comment><comment><USER17> I took a quick look recently at id software's GitHub repos of their old blockbuster games (Wolfenstein, Doom, Quake) and gotta say it was the first- ever C codebase I encountered that I found eminently readable.. (whether it's "good C", I can't assess though)

<comment><USER18> I agree, the id code is very well organized and readable.

<comment><USER19> Doom original C sources what made me realise how simple and powerful C could be.

</comment></comment></comment><comment><USER20> Just reading the first couple replies to this thread, there seems to be some confusion regarding what code quality IS. Two broad categories:

1\. Micro code quality. Looking at a single file, someone makes statements about code style - spacing, variable naming, etc. - things you would find in a style guide like PEP8.

2\. Code Design. Testable code, the absence of edge cases where unnecessary (for example, turning the root of a tree into an edge case) and broader design questions; and things like correct choice of algorithm.

Code quality kind of encompasses both, but its obvious how you can be bad in one category and still be really good in the other. Really good code is good in both, but if I had to pick, I'd like to be good in category 2 first at the expense of 1. Assuming 2., 1. can be improved easily.

I'd like to say something about concise code as well. Concise code, or code that does a lot in very little lines can be treacherous. This can be fun when your team is all very senior C programmers who actually understand all this code. Then, brevity is good, but when you work in open source, or write software that has to be read by people who are inferior to you, being concise may not be the way to go.

This is almost similar to premature optimization, but not really. People who write really good C code optimize - but not prematurely. They just know that what they're doing is efficient.

</comment><comment><USER21> [https://github.com/pallets/flask](https://github.com/pallets/flask) and [https://github.com/kennethreitz/requests](https://github.com/kennethreitz/requests)

both in python, but beautiful code, well structured and you would not need any docs, just read the code

<comment><USER22> I don't want to take anything away from requests. It's an extremely useful library. However, I do a code walkthrough of various popular libraries with my students and I've never been satisfied with requests internals. The emphasis, I've felt, is more on clean, stable, public API rather than internal consistency and cleanliness. I don't pick it up these days for my classes. Instead, we usually go through the python standard library. Especially the code from Raymond Hettinger.

<comment><USER23> that sounds like a class I would love to take. any suggestions on what in the standard library to check out?

<comment><USER22> We usually do collections. Especially the implementation of the OrderedDict. It's a nice combination of compromises, careful coding and usefulness.

I used to do requests but like I said, moved away. I sometimes do pygments to discuss how different lexers etc. are "plugged" in and also to show how messy the command line parsing code there is.

This batch will probably be a little different since I'm reworking it completely. The syllabus for the first batch is here if you're interested in what we covered [http://thelycaeum.in/blog/2014/06/10/mentoring_course_time_t...](http://thelycaeum.in/blog/2014/06/10/mentoring_course_time_table/)

</comment></comment></comment></comment><comment><USER24> This was also asked a year ago, and I pointed to Zach Tellman, and that comment was upvoted by others. I'll post the same again. Because he always has excellent reasons for the decisions that he makes, I find it interesting to read his code and try to figure out why he made the decisions that he did. This is in Clojure:

[https://github.com/ztellman/manifold/blob/master/src/manifol...](https://github.com/ztellman/manifold/blob/master/src/manifold/stream/async.clj)

Also, it is fascinating to consider how Go routines were implemented as part of Clojure core. Huey Petersen wrote a fantastic analysis of how state machines were used to implement Communicating Sequential Processes:

[http://hueypetersen.com/posts/2013/08/02/the-state- machines-...](http://hueypetersen.com/posts/2013/08/02/the-state-machines-of- core-async/)

You can read along while looking at the source code here:

[https://github.com/clojure/core.async](https://github.com/clojure/core.async)

This is a great implementation of Communicating Sequential Processes, first described by Tony Hoare in 1977:

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

This is the same technique that Javascript/NodeJS uses to implement its async.

</comment><comment><USER25> I've read that Redis ([https://github.com/antirez/redis](https://github.com/antirez/redis)) has well written code, in C.

<comment><USER26> I've also heard that Redis is incredibly well written. However, is it common for production C code to have a single file with 5,300+ lines?

[https://github.com/antirez/redis/blob/4.0/src/cluster.c](https://github.com/antirez/redis/blob/4.0/src/cluster.c)

<comment><USER27> > However, is it common for production C code to have a single file with > 5,300+ lines?

It's definitely not uncommon, but yes, that file is on the long side. However, it is rather clean and well-organized.

It may be due to the poor module system (header files) of C where you end up making files slightly longer than ideal because splitting into two files means also adding some header files and thus adding to the maintenance burden.

When writing C code, I usually strive to put a whole "module" in a single file, so that no "private" interfaces have to be put in header files. Everything that needs to be exposed in order to test a module goes in the public interface.

It's a tradeoff and C being C doesn't help (and C++ wouldn't really help here IMO), but I see nothing wrong with the file you picked. It's a bit long but it looks well done to my C programmer eyes.

</comment></comment></comment><comment><USER28> I like most the python code written by Norvig in [http://norvig.com/python- lisp.html](http://norvig.com/python-lisp.html) and other parts of his site. It's very expressive and simple. Real code will have much more corner cases and logging and error handling crust but still should tend to this simplicity

</comment><comment><USER29> A few weeks ago, I spent some time in reading O'Reilly's Beautiful Code ([http://shop.oreilly.com/product/9780596510046.do](http://shop.oreilly.com/product/9780596510046.do)). The book is essentially a collection of essays from various programmers describing what they think of as beautiful code.

I particularly liked Brian Kernighan's description and implementation of a regex matcher, and Travis Oliphant's discourse about multidimensional iterators in NumPy.

Worth a read.

<comment><USER30> One of the first tech talks I remember was Bryan Cantrill at Google, and I vaguely remembered that he mentioned at the beginning of that talk that he had contributed to a book called _Beautiful Code_ , so I double-checked and it seems to be the same book.

Looking back up the talk, it points to his review of the book here: [http://dtrace.org/blogs/bmc/2007/07/28/on-the-beauty-in- beau...](http://dtrace.org/blogs/bmc/2007/07/28/on-the-beauty-in-beautiful- code/)

> More specifically: read [two specific chapters with very different attitudes > on what makes code beautiful]. It seems unlikely to me that one person will > come away saying that both are beautiful to them. (And I'm not talking new- > agey "beautiful to someone" kind of beautiful — I'm talking the "I want to > write code like that" kind of beautiful.) This is not meant to be a value > judgement on either of these chapters — just the observation that their > definitions of beauty are (in my opinion, anyway) so wildly divergent as to > be nearly mutually exclusive. And that's why the title is perfect: both of > these chapters are beautiful to their authors, and we can come away saying > "Hey, if it's beautiful to you, then great."

</comment></comment><comment><USER31> I don't even like Python (Ruby guy myself) but the various stuff Peter Norvig has done (typically in Python) for demonstrating coding problem solutions. I think you benefit the most if you try doing the problem yourself (like the Advent of Code series), and then compare your solution to his.

What I've often found is that Peter is just great at isolating the minimum required model/data structure. More often than not, when I notice his solution has half the code of mine, it's because I used the wrong model.

</comment><comment><USER32> I really like Unicorn[1]. It's a very well-architected webserver with a nicely structured codebase. Reading the code has taught me about some neat tricks, e.g. self-pipe trick, and a lot about `fork`.

Additionally, I've on occasion consulted the Linux kernel and PostgreSQL repos. Would recommend, although I'm definitely either lying or very ignorant if I said I was familiar with them.

1: [https://github.com/defunkt/unicorn](https://github.com/defunkt/unicorn)

<comment><USER33> PostgeSQL has some very easy to read and well documented source code. Great place to look if you need anything related to db data structures.

</comment></comment><comment><USER34> The implementation of Project Oberon. It is so sensible that it can be hard to notice the magic.

[http://www.projectoberon.com](http://www.projectoberon.com)

<comment><USER35> That is a good read for many reason. Recommended to anyone interested in programming, operating systems and software architecture.

</comment></comment><comment><USER36> You can learn what constitutes good code by reading bad code- it is safe to assume that there is a lot more bad around than good! Some flags:

-God objects (they do everything!) and their opposites, freeloaders

-1000-line methods

-No unit tests

-Not-invented-here syndrome, otherwise known as "let's write our own array class!"

-No separation of concerns (everything mashed together)

-Not concerned with issues such as performance, maintenability and security

After you look at too much bad code (which, by the way, will include your own), you acquire a very instinctual understanding of good practices.

<comment><USER37> I think another way to put many of the items on your list is that the code should read as a description of what it intends to do, rather than how it intends to do it. Breaking code into components and giving those components useful names goes a long way towards achieving this goal.

For me, at least, this helps with the act of writing the code, in addition to the act of reading it. I am not nearly smart enough to keep in mind all of the things that need to be done to write solid code. So I compensate by developing abstractions that let me forget about details, assume they're handled (for the moment) and focus on just a small part of the problem at hand. The act of writing the code in that way tends to lead to a more manageable style.

> -Not concerned with issues such as performance, maintenability and security

This is where engineering sense comes into play. I'd personally rather not pay for things I don't need, particularly if an undue focus on performance, etc. means my cost overruns my budget. Perfect is the enemy of the good, and all that...

<comment><USER36> "This is where engineering sense comes into play. I'd personally rather not pay for things I don't need, particularly if an undue focus on performance, etc. means my cost overruns my budget. Perfect is the enemy of the good, and all that..."

I agree, however, making at least an effort is preferable than not caring.

What I had in mind was the developer of a legacy system at my previous work. He couldn't understand why I was fussing over performance metrics and I told him I couldn't understand how he could not. The reply was that they had enough trouble "making the bloody thing working", so anything else was peripheral.

<comment><USER37> For me, the question would be why you cared about the performance metrics. Sometimes bad performance can be a sign that something is fundamentally broken, and fixing the metrics might be the solution to the stability problem. Sometimes, it's less important and more of a distraction. Usually, it's not to difficult to put together a case that performance issues are impacting stability.

</comment></comment></comment></comment><comment><USER38> I love reading Oleg Kiselyov articles/papers. Just a few lines of Haskell or ML and some amazing concept is unlocked. A great exercise is to port some of his code to a language of your choice.

[http://okmij.org/ftp/](http://okmij.org/ftp/)

</comment><comment><USER39> One of my favorite simple examples of what clean and elegant code can be is Peter Norvig's spellchecker: [http://norvig.com/spell- correct.html](http://norvig.com/spell-correct.html)

It's in Python and a single file but it comes with a wonderful description and shows how a complicated task can be broken down into a few small and powerful functions.

<comment><USER40> But small systems are easier to get nice. Once they are not small it is there where all the hell begins. Alas, it is a big systems where nice code helps most.

<comment><USER39> Definitely true! You also have the luxury of tweaking every line of code for a small system to get it perfect.

It's also the reason for trying to break down larger systems into smaller, elegant components.

</comment></comment></comment><comment><USER41> I don't have an example to give, but i can offer this.

During the prototype phase, anything goes, speed is paramount, you just have to make it sort of work. Don't get hung up practicing pretty looking code during this phase.

You should always practice, but don't get hung up.

Prototype given the green light? Ready to dive into the build phase?

I'll say this, google for "coding style guide"

<comment><USER42> The challenge with style guides as an approach to "nice code" is they often focus on the code equivalent of writing a grammatically correct line of code -- things that can be often caught with a linter.

Where I see things fail a lot more is in the code equivalent of "How do I structure a paragraph" or "How do I organize this paper", which most things under the "style guide" umbrella don't cover.

<comment><USER43> I've always thought of the "how to write grammatically correct code" style guides as being relevant to writing high quality code in the context of a team that may onboard a new person or an internal transfer: they provide some baseline guarantee (insofar as the team honors them, of course) of the structure and formatting of the code. This reduces some amount of friction in a team. The benefits provided are largely context dependent (e.g. they'll benefit teams that expect to have a couple of senior engineers and many juniors on a relatively constant basis more than a team of experienced engineers in general), but I think having a style guide is important for any "large enough" engineering organization.

I've also always insisted on including at least some loose guides to cover the "how do I structure a paragraph" cases. These generally are going to vary on a project by project basis, though, so they're going to be more vague as a rule.

</comment></comment></comment><comment><USER44> I've found the google/leveldb[1] source code to be immensely educational, authored by Jeff Dean and Sanjay Ghemawat. A relatively tiny codebase at that, used virtually everywhere and the basis for facebook/rocksdb[2].

[1]: [https://github.com/google/leveldb](https://github.com/google/leveldb)

[2]: [https://github.com/facebook/rocksdb](https://github.com/facebook/rocksdb)

</comment><comment><USER45> At the top of [https://github.com/darius/code- canon](https://github.com/darius/code-canon) I collected a list of other places people have answered this quesion. (The rest of the page is mostly a list of books with worthwhile code, because I'd already written it and because it's harder to think of code outside of books that I can recommend as easily.)

</comment><comment> keithb- I'm not sure I understand this idea. By "read code" do you mean run the program in your head? As in, "start with main(), follow this loop, go to func()..."? Because if that is the case, then I think it is really debugging not reading. It would be great to debug projects and there are many projects that include unit tests which can help guide engineers along a slow path to greater understanding.

Personally, I like writing code and borrowing ideas from other, better engineers. I also like my code to be clean and without cruft: [https://github.com/keithb-/Valley](https://github.com/keithb-/Valley)

But I don't even know if I could "read" my code. It's a web app; there isn't a main(), there isn't a loop. In order for someone to read it, they would need to mentally "send a request" which means they need to somehow have the concepts or the context in their mind when they sit down with the source code. I just don't know how that is supposed to help an engineer, regardless of age or experience.

</comment><comment><USER46> UNIX v6 source code:

[http://v6.cuzuco.com/v6.pdf](http://v6.cuzuco.com/v6.pdf)

A tiny C-subset JIT:

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

It might even be controversial to suggest these are examples of "good code" today, because the majority of code I've seen lately seems to be overly verbose and complex. In contrast, these are extremely simple and concise for the amount of functionality they contain. I think this style has unfortunately disappeared over the decades of promoting lowest-common-denominator so-stupid- even-an-illiterate-could-read-it coding styles and enterprise OOP design- pattern bloat-ism, but when I think of "good code", I don't think of Enterprise Java; I think of code which, upon being told what it does, makes you think "wow, I never thought it would be so simple."

</comment><comment><USER47> I always liked code written by Jersey team - [https://github.com/jersey/jersey](https://github.com/jersey/jersey). It is clean and legible. Though it is Java (not Ruby as your question mentions) IMHO The concept of "Clean code" is language independent.

</comment><comment><USER33> I always enjoy digging into django-rest-framework [0] when I need to. It is IMHO one of the best idiomatic pieces of python code I have read.

[0] - [https://github.com/tomchristie/django-rest- framework/](https://github.com/tomchristie/django-rest-framework/)

</comment><comment><USER48> Upvoted the op. I'm learning Java so if anyone has some particularly good and idiomatic Java (Java 8 preferably) that'd be awesome.

<comment><USER49> Not Java 8 perse, but I remember getting linked on HN to the source code for the Java collections library: [http://grepcode.com/file/repository.grepcode.com/java/root/j...](http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/7-b147/java/util/HashMap.java#HashMap)

Had a ton of fun jumping around.

<comment><USER48> Thanks!

</comment></comment></comment><comment><USER50> It strongly depends on what are you looking for. 2 examples: \- Git source code is 'almost' perfect. It is a good example. \- Symfony source code. Good example of modern web code. Great collaboration and documentation.

</comment><comment><USER51> This thread from a few years ago is worth a look: [https://news.ycombinator.com/item?id=7602237](https://news.ycombinator.com/item?id=7602237)

</comment><comment><USER52> I'm teaching myself C (pure hobby) and I really liked these codebases:

[https://github.com/antirez/kilo](https://github.com/antirez/kilo)

[https://github.com/meetecho/janus-gateway](https://github.com/meetecho/janus- gateway)

The obvious caveat here is that I have no idea what makes a good C codebase. What I liked in both was I was able to:

compile and run them easily

make tiny changes and observe them easily

read and understand a reasonable portion of them

enjoy the odd comment here and there

</comment><comment><USER53> At the end of the day, good code is code that solves your problem. Trying to define "good code" without considering the problem will not deliver much punch.

If we're talking a small application, such as a new startup, writing efficient and optimized code is hardly a concern. In this case, good code means flexible, easy-to-change code. The code must make it easy to modify existing features and add new ones.

Compare that to, say, Google's search. The feature isn't evolving much anymore, in terms of functionality, but it needs to be as efficient and optimized as possible, considering the bulk of data it needs to read through, and the immense traffic it gets every second. Sure, you still want flexible code, but speed is critical.

If we're talking an open-source project, the most important part could very well be documentation and ease-of-read. when you have dozens to hundreds of people writing new features, making optimizations, and solving bugs (in their free time and without compensation!), quality of communication takes on a new significance.

These are, of course, simplifications, and the accuracy can be debated (as these situations always have an incredible variety of factors), but the point is that "good code" is not something that can be defined in a vacuum: it can only be defined in terms of the situation at hand.

</comment><comment><USER54> I personally love xyncro's codes. Their writers are so obsessed with comments, clarity, and consistency across their repositories.

For example, you can see [https://github.com/xyncro/freya- optics/blob/master/src/Freya...](https://github.com/xyncro/freya- optics/blob/master/src/Freya.Optics.Http/Response.fs#L27) and can immediately see the clarity and the consistency of the writer.

</comment><comment><USER55> If you are into ruby/rails already start reading internels instead of docs whem using rails. Rails has a very nice ans clean code base and they do a lot to keep it that way

<comment><USER56> Without trying to start a flame war, while there is definitely good code in Rails, my personal opinion is that the architecture of Rails is not something you necessarily want to emulate. And this is really the problem when you are new, I think. Many people will love one thing while others will hate it. It's difficult to create an informed opinion.

My advice is actually not so much different than yours. Definitely checkout the Rails internals, but keep a reserved opinion. Then contrast it with other things. From a framework/library perspective look at Sinatra or other web frameworks that that a completely different philosophy. Try to understand the advantages and disadvantages to many approaches.

Again, I want to stress that my intent is not to be critical of Rails (heck it provides the bulk of my paycheck and I'm _very_ grateful it exists!). My intent is really to say not to be so hung up about finding good code, but rather take a long term view of comparing different approaches and thinking through for yourself what you think is good. People who have a different view point than mine, shed light in corners that I won't look. That's always a good thing.

</comment></comment><comment><USER57> Not ruby, but Javascript.

Have a look at underscore js source:

[https://github.com/jashkenas/underscore/blob/master/undersco...](https://github.com/jashkenas/underscore/blob/master/underscore.js)

I really loved it! Especially those _ functions are small, concise and easy to understand as well. Very good codebase. (very good example of functional programming concepts)

<comment><USER58> Thanks!

There's an annotated version available here, which might be a little easier on the eyes: [http://underscorejs.org/docs/underscore.html](http://underscorejs.org/docs/underscore.html)

Underscore's codebase has grown some warts and wrinkles over the years, as optimizations and browser edge cases find their way in ... but the guiding principle is still to keep it as svelte as we can manage.

</comment></comment><comment><USER59> I highly recommend reading this book: [https://www.amazon.com/Refactoring- Ruby-Jay-Fields/dp/032198...](https://www.amazon.com/Refactoring-Ruby-Jay- Fields/dp/0321984137)

Not only does it contain great code snippets but it also covers repeatable techniques that will ease your life as a ROR programmer immensely.

<comment><USER40> And there is a nice companion: [http://www.poodr.com](http://www.poodr.com)

</comment></comment><comment><USER60> Read whatever you find interesting. The point is to familiarize oneself with various ways to implement things. How to know what is good code? Fuck "idiomatic" \- usually the code that is simplest and easiest to understand is the best. Towers of obscure abstraction for it's own sake are usually an indicator of poor engineering and poor taste.

</comment><comment><USER61> I remember reading years ago an article [1] on "Communications of the ACM" that explained why hwpmc's code [2] is an example of beautiful code. The article had a great influence on me; I recommend reading it.

[1] [http://cacm.acm.org/magazines/2008/7/5379-kode-vicious- beaut...](http://cacm.acm.org/magazines/2008/7/5379-kode-vicious-beautiful- code-exists-if-you-know-where-to-look/fulltext)

[2] [http://fxr.watson.org/fxr/source/dev/hwpmc/](http://fxr.watson.org/fxr/source/dev/hwpmc/)

</comment><comment><USER62> If you're working in Rails then I think you can get a lot of benefit from reading/writing some "pure" ruby code. Rails has a lot of its own ways of doing things, so it can be nice to see how to solve problems without using it's help.

For things to read, these books are a little old now but I liked them . [https://www.manning.com/books/the-well-grounded-rubyist- seco...](https://www.manning.com/books/the-well-grounded-rubyist-second- edition)

and [http://eloquentruby.com/](http://eloquentruby.com/)

</comment><comment><USER63> I really like the (JS) code for the Turing Drawings art app.

[https://github.com/maximecb/Turing- Drawings](https://github.com/maximecb/Turing-Drawings)

<comment><USER64> Just had a brief look over this and have to say I am not a fan. The comments are largely redundant, e.g:

        // Get a reference to the canvas
        canvas = document.getElementById("canvas");

        // Set the canvas size
        canvas.width = 512;
        canvas.height = 512;

And then missing when they could be useful (or a more clear data structure should have been used, e.g. an object with colors as keys):

        var colorMap = [
            255,0  ,0  ,    // Initial symbol color
            0  ,0  ,0  ,    // Black
            255,255,255,    // White
            0  ,255,0  ,    // Green
            0  ,0  ,255,    // Blue
            255,255,0  ,
            0  ,255,255,
            255,0  ,255,
        ];

</comment></comment><comment> house9-2 Not exactly reading code but if you are interested in rails and ruby you might want to checkout:

\- Ruby Tapas: [https://www.rubytapas.com/](https://www.rubytapas.com/) \- Destroy all Software: [https://www.destroyallsoftware.com/screencasts/catalog](https://www.destroyallsoftware.com/screencasts/catalog) \- looks like it is a bit more expensive than it used to be, but there is a lot of good stuff in those first 5 seasons.

<comment><USER65> I second this. Gary Bernhardt is well-respected and I've learned so much from him when I first started doing Ruby and Rails. He has some good ideas about software and he's very good with his tools (vim, zsh, git). He doesn't just cover Ruby. There's some Python in there as well and screencasts on how he uses his tools. You can just subscribe one month and download all the episodes. He already knows that members do this. I do, however, support what he does and have kept my membership.

</comment></comment><comment><USER66> For Python, check out the Pyramid web framework: [https://github.com/Pylons/pyramid](https://github.com/Pylons/pyramid)

</comment><comment><USER67> To me, good code not only means smart/savvy logic+architecture, but it also means that it is equally well-documented.

Therefore, for starters,

For scripting language such as Ruby, check out Satish Talim's Ruby tutorials (URL: [http://rubylearning.com/satishtalim/tutorial.html](http://rubylearning.com/satishtalim/tutorial.html))

For compiled language such as Java, check out a recent version of 'Big Java' from your local library.

</comment><comment><USER68> I've spent the last 4 days reading through the parallel ruby gem [1] and contributing some changes.

It's been a good to refresh my memory about concurrency in Ruby, and Michael Grosser is probably the most responsive maintainer I've ever worked with. Really good reviews and suggestions on my PRs.

[1] [https://github.com/grosser/parallel](https://github.com/grosser/parallel)

</comment><comment><USER69> I've been told by several people that they look to Flask as well written, well designed code that everyone can learn from.

</comment><comment><USER70> Jquery source is great, how i learned a lot of javascript. Not a rubyist but I'm sure the RoR source is good too!

</comment><comment><USER71> I found DPDK and FreeBSD's pkg package manager to be very clean and educational.

Reference [http://www.dpdk.org](http://www.dpdk.org) and [https://github.com/freebsd/pkg](https://github.com/freebsd/pkg)

</comment><comment><USER72> Not Ruby--but pretty all of the code I've seen from Charles H. Moore, the "inventor" of Forth. His code tows that fragile line between self- documentation and brevity. It inspires me, giving me firm reminder that computer code can be Art as much as Science.

<comment><USER73> Your comment made me curious. Do you have any examples you could link to that you think are good?

<comment><USER72> Off the cuff, some public examples of his more recent code are contained in ArrayForth, the development environment for the GreenArrays GA144 chip and itself a direct descendant of the original standalone colorForth for PCs: [http://www.greenarraychips.com/](http://www.greenarraychips.com/)

</comment></comment></comment><comment><USER74> NASA's HELAPix, in C:

[http://healpix.jpl.nasa.gov/](http://healpix.jpl.nasa.gov/)

[https://sourceforge.net/projects/healpix/](https://sourceforge.net/projects/healpix/)

</comment><comment><USER75> One of the most important attribute of good code is that it should be easy to extract "How the problem is broken down into smaller problems and how the solutions of the smaller problems are combined to solve the original problem".

</comment><comment><USER76> Great question. I would say just read the source of whatever libraries you like to use, and let your inner sense of "smell" guide you.

Since you mentioned Ruby, start by reading Rails itself. For all the hate people have for it, I believe it really is a solid exemplar of above-average code. Reading through the ActiveRecord source just after Rails 3, and seeing the way it was semantically organized by feature via included modules, was an inspiring moment for me as a coder. It was probably the first time I'd seen code that was simultaneously practical, modular, and readable.

You should never trust people's statements about what techniques are good and bad in a language. It's called "code smell" because you can judge it for yourself without having others dictate a judgment for you. Just like you can decide for yourself whether something smells bad or good.

</comment><comment><USER77> The kickstarter app is open source and has amazing code quality: [https://github.com/kickstarter/ios-oss](https://github.com/kickstarter/ios- oss)

</comment><comment><USER78> Facebook's open source C++11 library: [https://github.com/facebook/folly](https://github.com/facebook/folly)

</comment><comment><USER79> [https://github.com/discourse/discourse](https://github.com/discourse/discourse)

</comment><comment><USER80> [https://github.com/niklasso/minisat](https://github.com/niklasso/minisat)

</comment><comment><USER81> Your post inspired me to inspect element to see the front-end code on HN only to find out the layout is all tables...

</comment><comment><USER82> Donald Knuth, "Literate Programming", tangle/weave ([https://en.wikipedia.org/wiki/Literate_programming](https://en.wikipedia.org/wiki/Literate_programming)).

The same source can produce compilable code, or formatted comments.

<comment><USER83> Literate programming is certainly a very neat idea. I wonder if he would consider IPython / Jupyter notebooks an approximation of it?

</comment></comment><comment><USER84> in terms of rails code [https://github.com/coderwall](https://github.com/coderwall) coderwall is a well used/known blogging site for devs

</comment><comment><USER85> Check out the WASTE text API, its written in C and its very nicely done.

</comment><comment><USER86> Any code that, when looking at it, you know exactly what it does ...

</comment><comment><USER87> For C++, I think Jules Storer's code might be worth a look.

</comment><comment><USER88> [https://github.com/bottlepy/bottle](https://github.com/bottlepy/bottle)

A single file running both in python 2.7 and 3.

</comment><comment><USER89> Just Nothing \-- ^ Haskell

</comment><comment><USER90> Well speaking Java 8, this java to html library is clean, mean and tight: [https://j2html.com](https://j2html.com)

</comment><comment><USER91> Why, my own of course! Peewee[1] is a lightweight ORM, and Huey[2] is a task queue.

[1]: [https://github.com/coleifer/peewee](https://github.com/coleifer/peewee)

[2]: [https://github.com/coleifer/huey](https://github.com/coleifer/huey)

</comment><comment><USER92> I was very impressed with the sorce code to this application: [http://florence.sourceforge.net/english.html](http://florence.sourceforge.net/english.html)

Nothing groundbreaking, just basic OOP code, but it was unique in that I started reading the source code and understood it quickly.

<comment><USER93> Is the source available online anywhere? I can't see anything of the sort on that page.

<comment><USER92> Here it is: [https://sourceforge.net/p/florence/code/ci/master/tree/](https://sourceforge.net/p/florence/code/ci/master/tree/)

</comment></comment></comment><comment><USER94> Sorry, I don't have a link to some beautiful code.

I assume that as a developer you are interested in solving (business?) problems through the act of writing software?

It isn't much different than being a painter I guess. To be able to be a good painter (or to be considered a good painter) you first need to have a good grasp on how to use the brush and how to handle paint (e.g. oil paint), i.e. you need to learn the technique. The more versed you become with the technique the better you will become at painting, or, over time you will become better at painting what you intent to paint, to paint what's in your minds-eye because you don't have to think about the brush and paint anymore.

When it comes to software you first need to have a good grasp on programming. This means you will need to spend time practising the act of programming. Using two languages that are very different from each other might be good. E.g. learn an imperative and functional language. In your case this might e.g. Ruby and Lisp. Your programs will need to interact with other systems so you probably need to learn about operating systems, databases, queues, networking, etc. You probably don't have to be an expert in everything but being a good all-rounder will certainly be beneficial.

Over time you will see that it becomes easier to think in solutions of the bat rather than focusing on how you're going to solve a problem. This is basically what is being referred to as experience.

So, to be a good developer you need to put in the effort and you need to put in the time. There usually aren't any short cuts. I've been doing this professionally for over 20 years and I'm still learning every day.

<comment><USER95> "So you're an architect eh, and you want to study existing architecture to see how it was built, eh, to get better? Well you can't. Sorry, I don't have any buildings or architectural blueprints ready for you. That's not how you learn. You need to study architecture, not look at buildings and how they're built. There's no shortcuts here. I've been an architect for over 20 years and I've never looked at a building."</comment></comment>


How Did People Migrate to the Americas? Bison DNA Helps Chart the Way - <AUTHOR> http://mobile.nytimes.com/2016/08/11/science/how-did-people-migrate-to-the-americas-bison-dna-helps-chart-the-way.html?smprod=nytcore-iphone&smid=nytcore-iphone-share&referer= <comment><USER2> How did people migrate to New Zealand? Sheep DNS helps chart the way ( ͡° ͜ʖ ͡°)

<comment><USER3> LOL</comment></comment>


Rant HN: There's 1-Click Unsubscribe, then there's these assholes. - <AUTHOR> http://www.gartner.com/technology/about/policies/unsubscribe.jsp <comment><USER2> One of my friends thought it would be hilarious to subscribe me to the Trump newsletter. That was 3 or 4 months ago and despite unsubscribing and adding to spam I still occasionally get stuff from them. My friend found it less funny after I gave his email to a particularly predatory Indian marriage planning site.

<comment><USER3> I suggest the nuclear option: [https://goatattack.com/](https://goatattack.com/)

</comment></comment><comment><USER4> How progressive that they at least let you unsubscribe from all of their lists with a "simple" online form.

Intel, by contrast, still takes a more conservative approach. While they allow you to unsubscribe from each individual list online, if you actually want to stop receiving their "important marketing announcements" you need to write them a physical letter.

Here's the helpful closing from one of their emails last week:

 _To unsubscribe from other Intel communications, contact us at this address: Intel Corporation, 2200 Mission College Blvd., M /S RNB4-145, Attn: Unsubscribe/Privacy, Santa Clara, CA 95054._

</comment><comment><USER5> Could it be done better? Sure. But to be fair, the fields aren't all required. If you want to unsubscribe from emails, you only enter your email. It's pretty clear this is a low-tech solution that just sends the unsubscribe request to someone in marketing who then manually scrub their various list (hence the 5 days).

For unsubscribing from print mailings, this is actually not bad. It's much easier to enter my address than it is to go find some ID printed on the label of a recent mailing and enter that in, as some places require you to do.

</comment><comment><USER6> I've been subscribed to a UK based liberal democrat campaign and party news list for two years now. I have

\- responded to several fundraisers and party organizers asking them not to email me anymore

\- clicked the unsubscribe button/link when there is one(about 1/3rd of the time for some reason)

\- reported as spam

\- used various unsubscribe services/aggregators

all to no avail. At this point every time an email gets through I just report as spam and manually add them to my filter.

<comment><USER7> Have you tried creating a wild card filter with anything @theirdomain.com

</comment></comment><comment><USER8> > Please note that we will process your request within five (5) business days. > You may still receive marketing communications during this time.

That's just icing on the cake.

<comment><USER9> That's pretty good in the twisted world of email newsletters. I've seen quotes of 2 weeks to unsubscribe before, as if they already printed and stamped a physical mailer weeks ago...

<comment><USER10> I unsubscribed from the highly annoying BestBuy marketing emails and got a notice I'd be removed in 10 days. I looked into CAN-SPAM, and that's the maximum allowance of time to comply with a removal request. Never going to shop at a BestBuy again.

</comment></comment></comment><comment><USER11> Also: [http://plaintextoffenders.com/post/28972162169/gartnercom- te...](http://plaintextoffenders.com/post/28972162169/gartnercom-technology- researchers)

</comment><comment><USER11> Fun "Rant HN" prefix, would click again.

</comment><comment><USER12> In their defense, it's a one-stop form that can unsubscribe email, print, and phone marketing.

But don't let me mellow your harsh. :)

</comment><comment><USER13> They're using JSP...the nerve. ;)

</comment><comment><USER14> Hilarious. This is where the "report as spam" button comes in.</comment>


Smiley: An app in 24 hours - <AUTHOR> http://37signals.com/svn/posts/2550-smiley-an-app-in-24-hours#extended <comment><USER2> My friends built something similar - NiceReply <http://nicereply.com/>

It was originally custom built in their webhosting company, but now they've created a standalone product out of it. NiceReply has API, so you can integrate it in any CRM you're already using. It's really cool, check it out.

</comment><comment><USER3> minus #extended at the end :)

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

</comment><comment><USER4> I traveled to China this summer, and in the Shanghai airport they use a very similar system to get quick feedback on customers' satisfaction with the customs agents. At each station, there's a little box with 3-4 buttons ranging from :-) to :-| to :-(. (For example: <http://bit.ly/aoSXgP>)

</comment><comment><USER5> Their post is a tribute to the freedom to fail.

If you're willing to structure experiments like this to limit risk but be deep enough to yield genuine benefits, there's a whole lot you can learn. You've got to work in a culture that tolerates failure, obviously, but why work somewhere that doesn't?

Back during a horrifying phase of my life, I worked in the shudder-inducing industry of internet marketing. I wanted to try a new type of lead capture form that was less user hostile. It was extraordinarily simple, but between bureaucracy and a web development group that was sorely overworked, it took 12 weeks for the idea to work its way through the constipation of the organization and into existence.

And it didn't work that well. That earned me a bit of ire.

I gave up on finding something that did work and took another, less depressing job.

<comment><USER6> The post isn't a tribute to the freedom to fail. It's about having an idea, not complicating it, and executing the basics that matter in 24 hours. There's so much you can get done in 24 hours if you don't make it take longer than that.

<comment><USER5> Of course _you_ don't see it that way, you're just doing what you want to do, because you can.

"It's about having an idea, not complicating it, and executing the basics that matter in 24 hours" ... which is the freedom to fail.

Three things bought you the freedom to fail:

You're the President, so you have deep influence on the allocation of resources.

You value minimalism, so you limited the scope of the project to make it manageable. This decreased risk (while maximizing ROI, bravo).

You're open to an outcome that entirely invalidates the tool since you'll learn something either way.

Failure (and success) requires resources, investment and tolerance of risk. You demonstrated all three. That's the value of the freedom to fail and it's solid gold.

You don't see it that way, perhaps, because it's just how you roll at 37signals. Ask a puppy: are you trying to be really, really cute when you're yawning or are you just yawning because you need to? It will insist, as you have, that it's just doing what it needs to do.

The thing to keep in mind is that, sadly, not everyone can access the resources or commit to the investment required to get things done. Even if they do, cultural risk aversion may still paralyze them. I looked at your post and what immediately struck me was "Damn, that's good stuff. Some places are incapable of delivering this kind of thing. Why? Oh. No freedom to fail."

I guess the best luxuries are the ones you don't realize you've got. :)

<comment><USER5> It also occurs to me that committees add complication to things all the time. Being able to process an idea into a product while bypassing a committee is important factor in the investment component.

</comment></comment></comment></comment><comment><USER7> Nice ripoff of the Firefox 4.0 beta feedback:

<http://stefan.arentz.ca/stuff/grabs/1283385827.png>

<comment><USER8> If you really want to dig to the sources of the idea, Microsoft had it back in 2006 for Office 2007 Beta2. [http://blogs.msdn.com/b/jensenh/archive/2006/05/26/607768.as...](http://blogs.msdn.com/b/jensenh/archive/2006/05/26/607768.aspx)

<comment><USER9> Or, you know, GetSatisfaction</comment></comment></comment>


Show HN: Csv2pdf - <AUTHOR> https://github.com/redking00/csv2pdf <comment><USER2> Cool project. If you need help cleaning up those large methods let me know.</comment>


Amazing footage of a Sun flare Puts Earth into perspective - <AUTHOR> http://www.good.is/posts/intermission-nasa-captures-stunning-rain-on-the-sun/

<comment><USER2> somehow this makes me care less about my site not passing W3C validation

</comment><comment><USER3> that was pretty cool when they put the earth up there for scale!

<comment><AUTHOR> It's amazing that these things go on so often and they are so much bigger than the Earth!</comment></comment>


Steve Jobs: "Open Systems Don't Always Win" - <AUTHOR> http://techcrunch.com/2010/10/18/steve-jobs-open-dont-win/ <comment><USER2> Steve is right. Correlate with this post at slashdot about Linux on the desktop [http://linux.slashdot.org/story/10/10/18/1312214/Desktop- Lin...](http://linux.slashdot.org/story/10/10/18/1312214/Desktop-Linux-Is- Dead) The reason cited is exactly what Android is aiming for; fragmentation</comment>


Ask HN: Should I continue with my bootstrapped startup? - <AUTHOR>

I launched BugMuncher (http://bugmuncher.com) a couple of years ago when Google + launched. Some people on HN seemed more interested in G+'s feedback tool than G+ itself, they wanted this tool for their own website. BugMuncher was based on G+'s feedback tool.
I've put a lot of time into BugMuncher, going from MVP to full app, but I'm only making $200 / month. I fear people are impressed when they first see BugMuncher, but no one needs this tool. I dogfood BugMuncher with my own users, even they don't use it much.
I think it could have more use for reporting cross browser issues, but all screenshots are created with webkit, so it's pretty useless for that. I've looked into using VM's to create screenshots for different browsers, the only service that would work is crossbrowsertesting.com, but they're prohibitively expensive. I'd either have to put my prices up a lot, or cut the monthly report limit by 70%
Which brings me to my only competitor, Usersnap - https://usersnap.com. They launched after me, but got VC funding, and use VM's to take screenshots in the same browser/OS as the user. Based on their pricing and report limit, I think they use crossbrowsertesting.com for screenshots, and the last time they posted a show HN, people complained 50 reports is not enough for $19 / month.
I'm now wondering if BugMuncher will ever be my full time job, I've got other things I'd like to work on, and I'm doing well freelancing. I don't feel like I have time for BugMuncher unless it can bring the majority of my income.
- Would you use BugMuncher as it is now (webkit screenshots)?
 - If not, would you use it if I used VMs to take screenshots with the correct browser, if so, would you want higher prices or lower limits?
 - Should I consider funding?
 - Should I stop, and sell BugMuncher or open source it? <comment><USER2> I looked at your site and then went to usersnap. Overall, both ideas are good but usersnap is beating you in terms of landing page/design and most likely sales/marketing efforts. For example, on your landing page, there is no clear way of knowing what bugmuncher is for. Sure, I want to "Fix bugs like a boss!" but how ? Then I realize you have a small text description "BugMuncher is the best way to receive feedback on your website. With BugMuncher annotated screenshots can easily be sent along with feedback reports, making it ideal for internal use, as well as getting feedback and bug reports from your users." Why not make this prominent ? Usersnap smartly says "Screenshot is worth a thousand words" and we know immediately what it is about.

I would not throw in the towel yet. Functionality wise, your demo video is pretty cool. Other than work on your landing page, you definitely need to go out and do sales/marketing. Stop working on the product and turn your sales/marketing hat on. Get help from someone who knows this better than you do if possible.

<comment><AUTHOR> Totally agree that the home page needs to be redesigned. I've just started talking to a designer with a view to replace the current themeforest template with something custom and much better.

      Stop working on the product and turn your sales/marketing hat on.

You're so right, I've already been planning new features to work on, even though I know I should be marketing. I guess I'm using what I'm good at (development) to avoid doing what I'm bad at (marketing)

I've just cleared my trello to do list of everything but 'MARKETING'

</comment></comment><comment><USER3> Have you even identified your target market yet?

It's not a bad idea, I just don't think you've gotten the other part of the startup right yet (sales and marketing).

I don't mind helping you with your idea (to guide you in a sense). I've given advice to a couple others before.

I think if you clearly identified your target market and then attacked them directly, you would find some success. Also, your landing page needs to become more "pretty".

Even though it doesn't look that bad, it kind of has the early 2000s Java web- tool look.

<comment><AUTHOR> Thanks for the feedback, I'm pretty typical as a programmer, little to no marketing skills. I'd really appreciate any advice you can offer.

In terms of target market, I think I'm a step behind that, I'm not even sure what BugMuncher should be used for: bug reporting on live sites, team communication during development, are cross browser issues important?

Should it be a fully featured issue tracker (crowded market) or should it just integrate with existing tools?

I kind of feel like I'm throwing features at the wall to see what sticks :)

In terms of my current user base, it's mostly people using it for bug reports on live sites, but I feel in that use case, cross browser issues are important :s

I agree the website definitely needs redoing, I bought that on themeforest, gonna work with a designer to make something a lot better.

<comment><USER3> Well any advice I give will be open for everyone to see (competitors included) and limited to the 2000 chars provided by HN.

If you'd like to discuss things privately, use [http://boun.cr](http://boun.cr) to hide your email and we can discuss things via email thereafter.

Otherwise, as you've mentioned about your current market, it seems like the market is pushing your tool towards the live-site part of it.

Maybe I should try evaluating your product also. I need to "play" with it to understand how I would interpret its use in the role of a customer.

</comment></comment></comment><comment><USER4> From my experience advising other SaaS product owners, this is unfortunately a tough but common spot to be in. You have a product, a few customers, but not enough and don't know how to grow it.

Of course, like others have said, you could change your landing page and your pricing and a few relatively important things, but in my opinion these are just surface things and you need to first ask yourself a few questions:

\- do you really understand your customers? What keeps them up at night? What do they look for? Do they look for solutions on Internet? Do they buy things? etc.

\- go into full focus on your ideal customer. Describe it precisely. Look into personas.

\- now, how can your product fix one problem for your ideal customer? Make it real, not vague statements everyone can say yes to (fix bugs like a boss, imho, is not the root of the problem)

As far as I understand, you need to shift your mindset from focusing on your product to focusing on your customers. Go interview them, get on the phone with them, look at them using your software, get a feel of why they don't use it or stop using it...

Lately, I've written several blog posts on this topic if you like, you will find it here: saasfoundry.io/blog

<comment><AUTHOR> Thanks for the great advice, I've been considering this a lot. I'm currently working on a whole new landing page that will focus more on the customer and what they gain from BugMuncher.

I'll definitely check out your blog.

</comment></comment><comment><USER5> Don't give up! You have a lot to improve on your website, marketing & UX.

Here's what I think: 1\. I only saw the "Feedback" widget AFTER seing the movie. Either make it bigger or point a big arrow on it. 2\. I'd love if I could adnotate highlights with some text. 3\. Your prices are too close together, so the cheapest one still seems expensive. Try testing with 2x price for Start up and 10x for enterprise.

BTW, I am using [http://www.criticue.com](http://www.criticue.com) to get feedback on my websites, you can use that too.

Good luck with the project!

</comment><comment><USER6> This might seem insignificant, but it's a good example of how you could improve your marketing with little tweaks.

On your pricing page, the 'Personal' plan has one check mark and three red "X"s. Why have the Xs at all? It's not that your personal plan is bad, it's just that the other plans are better. It makes me feel like I shouldn't be clicking "Start Free Trial", because it's right below three symbols of negativity.

</comment><comment><USER7> My name is Florian, I'm one of the co-founders and CEO of [https://usersnap.com](https://usersnap.com) Since we're competitors, I won't add specific advice. However I'd like to encourage you to stay in business as I'm absolutely convinced that the market we're in is big enough and that the idea behind the products we're building is a great idea.

</comment><comment><USER8> The app is not that bad,but don't get your hopes up just yet. You really need to work on your sales and marketing and measure everything from engagement to what each user does within your app. Also my feedback is that the prices are high compared to other competitors that offer more features.

<comment><AUTHOR> Thanks for the reply. I have wondered about my prices, yet I seem to get less signups now BugMuncher starts at $15 than when it only had one plan for $19 :s

Out of interest, how do you think it should be priced, and what do you consider my competitors?

</comment></comment><comment><USER9> I'm one of that poor guys who has to work with IE and I have to detect IE issues, so for me it's very important that when I'm using a tool like bugmuncher that I get what the user sees!

</comment><comment><USER10> Don't throw the towel yet, You can sell the technology behind your site. You can package the whole thing and sell it so that people with big software QA shops can use this on their own sites.

<comment><AUTHOR> I've started down this road a few times, with some fairly high profile companies, but it's never come to anything. Probably because I have zero experience selling enterprise software.

</comment></comment><comment><USER11> I'd focus Bugmunches on a very important piece of that is buried: Send feedback reports directly to GitHub, Trello and others

<comment><USER11> I'd also add many screenshots of what it does. Don't talk about what it does, show it. Check sites like mixpanel and intercom to see how they present stuff.

Also, make the video shorter and more entertaining (check crazyegg video)

<comment><AUTHOR> Thanks for the feedback. Updating the homepage is now top priority, as it seems to be the most common advice here. I'll be sure to make the third party integrations more prominent.

</comment></comment></comment><comment><USER12> it might be something as simple as the name, BugMuncher, which is unappealing IMO. Munching doesn't have a positive connotation, and munching bugs really sounds bad. you might take a weekend to do some rebranding and push through with another round of seo</comment>


Show HN: Weekend project full text search for your files - <AUTHOR> https://bitbucket.org/zaphar/goin

<comment><AUTHOR> Author here,

This was a weekend project in Go that I've since cleaned up a bit and made presentable.

Command line Indexer and Full Text Search for files on your disk. It handles anything plain text and pdf right now which is most of what I care about but support for other mime types can be added.

Comments are very much welcome.</comment>


Strange reason for being turned down. Any other good ones? - <AUTHOR>

This is a pretty weird one, as I've been programming for a while and haven't heard it yet. I have been interviewing w/ a local Bay Area startup that I was introduced to via a friends recommendation. It's a bit of a strange situation as I had just spent the past year working as a co-founder on a startup, and I made it clear that there was a strong chance that I would be applying to a startup incubator over the winter to work on a problem that I find frustrating and would love to see solved, so it might not be a long-term thing. They were understanding, so we met, and after a few good face-to-face meetings we had talked about a reasonable short-term engagement.  At this point I usually ask the other side to think it over a bit and send me an email with an offer to start really coalescing the process, and to open up some space for any questions that might not occur during an interview.
After a few days, I got an email, and while it was very positive on my technical/engineering abilities, ultimately they thought I was "too mature" for the team and might not be a good fit.  I was somewhat disappointed, as I liked these guys and thought they had an idea that I could really dig deep into, but I can understand the need to make sure the team is clicking at close to optimal efficiency as possible.  I just have never had the "too mature" reason used before.  My thoughts at this point are that either:
A) They felt that was an easy way to say they weren't really interested.  Strange, but that's ok.
B) They were not happy with the potential for me to leave after a few months. Very legitimate, but there's always some flexibility and we could have talked some more about it and changed plans.
C) I just was too serious during the interview process, and didn't seem like I could work comfortably with the team. I think this is very possible, but usually when interviewing it seems hard to get too comfortable.  There's a lot of evaluation going on from both sides, and you want to put your best face forward.  For me that usually means trying to look capable and professional.
Anyway, I think they're a great company and will blow up in the next few years, but this just struck me as a strange one, so I thought I would cheer myself up and see if anyone else had any funny or weird stories about interviews. <comment><USER2> I think you're spot on with the "they think you're too uptight" hypothesis. Small teams can be really anal when it comes to culture fit, for better or for worse, and unfortunately when it comes to this people can be really prejudiced and ofter rely on more "superficial" factors such as gender and age. I personally work at a startup with a lot of pretty brilliant people, but that has a pretty bro-ey feel at times. I personally enjoy it (I did pledge a frat in college), but I see the term "culture fit" being thrown around when discussing potential candidates and do have mixed feelings about it. On one hand, it does contribute to a sense of community and high morale, and hiring someone that would ruin that sense of community would be pretty bad, but on the other hand, we do end up turning away a few otherwise qualified candidates.

But long story short, they probably didn't hire you because of some shallow first impression (which doesn't automatically make them jerks since we're all guilty of this), but there was probably nothing you could have done so you shouldn't feel bad about it. It's just the way the world works sometimes.

<comment><USER3> > but on the other hand, we do end up turning away a few otherwise qualified > candidates.

I've had to turn down several otherwise-qualified candidates recently for culture fit reasons. While it would be awesome if all qualified candidates were created equal, their technical qualifications are only one piece of the puzzle.

In reality, the culture fit and the ability to work with the rest of the team is key in a small company. Everybody has to deal with everybody, so if anybody has issues dealing with anybody you can run into some major friction that'll cost you more than you gain.

At the end of the day, the way to look at it isn't "they're qualified but they don't fit the culture", but rather "they're not qualified because they don't fit the culture". It goes a long way toward eliminating the mixed feelings.

</comment></comment><comment><USER4> I have two.

The first is my own experience of being turned down for a part-time engineering role because the company didn't think it was safe or good for me to travel so much. From where i stayed at that time, it would have taken me roughly 90 minutes to get there and another 90 minutes to get back if i got the job. To be fair to them, I honestly felt they were concerned for my well being.

The second is from a previous company I worked for and I was asked to temporarily join a hiring team that were bringing in new recruits (mostly uni grads) to evaluate their technical abilities. There was a really young candidate whom I felt stood out but he had a quirkiness of pulling out a sesame street soft toy from his bag and stroking it every time he faced a "challenging" question. I had absolutely no issues with that but HR apparently felt that was too weird for them.

<comment><AUTHOR> That is definitely an interesting quirk.

The first one seemed pretty decent of them. It would have at least given me a warm feeling about not getting an offer based on concern for my well-being.

</comment></comment><comment><USER5> I was once turned down for a job because I was "Too entrepreneurial", it still makes me laugh thinking about it.

</comment><comment><USER6> If this is in CA, you may want to look into suing them for age discrimination.

<http://ag.ca.gov/civilrights/lawleg.php>

<comment><AUTHOR> Ah. I don't think it was a case of me being too "old" as maybe me being "too uptight" or something along those lines (although I'm still pretty young I guess I've recently slid outside that 20's sweet-spot, and as most of my friends will attest too I'm probably not uptight-enough at times).

It's sort of the reason why I found it to be such a weird response, only because it seems an interview is not necessarily the best place to judge how someone acts personality-wise once they've integrated into a team and become comfortable.

Someone else brought up the age discrimination thing to me, but honestly even if that was the case these are good people and I think as a founder of a company you do need to make the best decision you can for the well-being of the business.</comment></comment>


So Reddit's down. How is this community different? - <AUTHOR>

<comment><USER2> Having only been here for a short time myself, I think the general answer to your question would be: Hacker News is a lot more focused and has a much richer (in terms of experience, knowledge) community with a much lower tolerance for noise/novelty accounts/meme spouting/trolls.

<comment><USER3> I upvoted this because it's completely accurate, but at the same time reminds me of some of the things I don't like about HN. HN has a much higher tolerance for people constantly submitting things from their blogs for self promotion. If a person submits something self promotional on reddit and expects to escape sharp criticism from the community, they better acknowledge that they are being self promotional, and be awfully humble about it. Here, it seems to me that everyone acknowledges that everyone else is out to make a buck and deals with it.

tl;dr - HN has more tolerance for shameless self promotion than reddit as well as fewer trolls.

</comment></comment><comment><USER4> More news about entrepreneurship, startup, selling companies, management..

</comment><comment><USER5> Less trolls.</comment>


The End of the Chinese Miracle Is in Sight. What's Next? - <AUTHOR> https://singularityhub.com/2019/10/06/the-end-of-the-chinese-miracle-is-in-sight-whats-next/ <comment><USER2> It doesn't even bring up the biggest issues that distinguish China's future from its past: 1) the last 20th century was distinguishable from the early and mid 20th century, for China, by NOT having a lot of civil war or invasion. Simply not having a war going on is a great way to do better. But eventually, after a generation or so of peace, while peace is still a good idea it's not new and so doesn't provide easy opportunities for growth. 2) For quite a while, China could emulate technological innovation that it witnessed in other countries (Japan, North America, western Europe). It is now approaching the technological forefront, and it's not as obvious which path to take. Is AI a great idea or will it prove to be a bust that overpromises and underdelivers? Can solar, wind, and hydro power replace fossil fuels sooner, or later? Should internal combustion cars with human drivers be replaced with electric self- driving cars? The answers are not as obvious, because all of the other countries are trying to figure that out also. This makes the advantages of centralized decision-making less clear, and the disadvantages more of a problem.

Not to say that China can't overcome these issues, but this article doesn't even raise them.</comment>


Ask HN: Is there a Python text editor with live updating? - <AUTHOR>

I've been using the Calca app for a week now, and I really like the fact that you can type out your calculations, evaluate them in the text editor itself, go back and change variables and functions and they will be updated automatically. See how it works here: http://calca.io/<p>However, there are things i'd like to do that would be much easier to do in Python. Does anyone know of a Calca-like Python text editor? <comment><USER2> Calca is more like a spreadsheet than a programming language interpreter, so I doubt you'll find what you're looking for. You might be able to put something together that used a more Pythonic syntax for calculations, but that's about the extent of it.

Even if you worked around the issue of the bulk of the file not being valid Python, you'd likely run into user satisfaction problems - kind of an "uncanny valley" of programming editors, where it would interpret just enough to seem like it was working, but because of a restricted syntax (e.g. are you handling loops? functions?) would be far enough off to be an irritant.

</comment><comment><USER3> pySpread is very close to what you are looking for. Leo editor lets you embed python scripts into other documents. IPython isn't all that far away, but a different direction.

[http://leoeditor.com/](http://leoeditor.com/) [http://manns.github.io/pyspread/](http://manns.github.io/pyspread/)</comment>


Scientists: Triceratops May Not Have Existed - <AUTHOR> http://www.cbsnews.com/8301-501465_162-20012471-501465.html

<comment><USER2> I was worried that they had put fossils together incorrectly. We still have a three horned dinosaur even if they turn out to be correct that what we thought was a Triceratops was actually an immature Torosaurus.</comment>


Beware the Big Errors of 'Big Data' - <AUTHOR> http://www.wired.com/opinion/2013/02/big-data-means-big-errors-people/

<comment><USER2> This might sound silly, as Taleb seems to have a cult following of his own, but I really enjoy when Taleb takes down these pseudo-scientific cults a notch. Not because it it is overly harsh, but rather because it will all seem so blindingly obvious in the not so distant future. And they will feel like idiots for overlooking it.</comment>