Christopher Alexander – Patterns in Architecture (1996) [video] - <AUTHOR> https://www.youtube.com/watch?v=98LdFA-_zfA <comment><USER2> His book, "The Nature of Order" is also worth reading, even if it goes practically mystical. There is a theme in thinkers like Alexander, Hofstadter, and less known but tangentially related for his "constructal law," Bejan, where there a kind of aesthetic abstraction yields useful heuristics for more concrete problems. I'm sure there are many others, but these other two were on the brain recently. (Availability bias, surely)

Hofstadter gives you an intuition about complexity and formal hardness of problems. Alexander provides intuition about a kind of quality of reasoning, where from Bejan there is a sense of quality of relational change.

Reading Christopher Alexander is weirdly meditative and good for a technologists soul. I'm always happy to see him rediscovered.

</comment><comment><USER3> I discovered Christopher Alexander by accident.

When I was a student, my free time was spent in dusty corners of university libraries digging up old, forgotten books. I found many gems this way (including the venerable TAOCP. I only realized how famous it is after reading the Wikipedia page).

Although he seems to be most famous for the "Pattern Language" book, my introduction to his work was during my visit to the university's architecture library, from a slim volume entitled "Notes on the synthesis of form". It really highlights the magnitude of the task facing the modern architect/designer/developer. The first half of the book details how for most of history, design has not been a conscious process but rather an emergent property arising through a selection process (basically evolution). The alternative, discussed in the second half of the book, is for a human to sit down and think through the requirements and design almost de novo - this is extremely challenging due to the number of interacting variables.

Reading this book gave me a much better appreciation and respect for evolved techniques (eg. traditional methods of building, farming, etc; even social norms and traditions), and gave me valuable thoughts on when an evolutionary approach would work better vs a design approach (similar to Linux's explicit evolution vs OpenBSD's considered design).

<comment><USER4> Stewart Brand's _How Buildings Learn: What Happens After They're Built_ is another good book about designing for evolution. The book was also adapted into a 1997 BBC TV series (available Stewart Brand's YouTube channel).

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

</comment></comment><comment><USER5> Gotta plug my favorite book of all time here: "A Pattern Language", by this speaker, Christopher Alexander et al.

Tons of small, progressive, human-centered hand-drawn architecture patterns in a hard-bound brick of bible-thin pages.

The book inspired code patterns that you hear about all the time in engineering, and is a lovely way to think about better cities and homes.

<comment><USER6> I would actually recommend his "The Timeless Way of Building" [1] instead. :) This is the book that explains the philosophy and thinking behind all those patterns, and where I personally found the vast majority of his insight.

[1] [https://www.amazon.com/Timeless-Way-Building-Christopher- Ale...](https://www.amazon.com/Timeless-Way-Building-Christopher- Alexander/dp/0195024028/)

<comment><USER7> YES! Fantastic book and such enjoyable reading. And I love the built-in lifehack it suggests for reading just certain passages and type styles if you are in a hurry, then diving deeper on the sections you need to. I have both books and would find it hard to choose just one. A Pattern Language is more famous but this one is a really good complement to it.

</comment></comment></comment><comment><USER8> He was the planner for the village I live in [0]. Did a great job in the early 80's laying out the patterns to encourage the village to become a community, the concept of clusters of houses is a great way to build units of cohesiveness.

[0] [http://www.patternlanguage.com/archive/moshav- shorashim.html](http://www.patternlanguage.com/archive/moshav-shorashim.html)

</comment><comment><USER9> Since we are on the Christopher Alexander love fest, I would like to share a book I purchased a couple years ago by him. It's not a well known as his other stuff, but equally rich.

[https://www.amazon.com/Battle-Life-Beauty-Earth-World- System...](https://www.amazon.com/Battle-Life-Beauty-Earth-World- Systems/dp/0199898073)

</comment><comment><USER10> He actually has an interesting series called _The Nature of Order_ :

Book 1: The Phenomenon of Life (2002)

Book 2: The Process of Creating Life (2002)

Book 3: A Vision of a Living World (2005)

Book 4: The Luminous Ground (2004)

<comment><USER11> I consider these the most important books published this century.

<comment><USER12> I agree.

</comment></comment></comment><comment><USER13> I can't for the life of me remember which of his books it was in but I remember him writing about having guests around and cooking with them, then eating. This was so different to my life where my Mum spent the time in the kitchen on her own, it just sounded far more convivial, a different way of living that I yearned for.

Does anyone remember which book and chapter it was in?

GTFA gives me this link on kitchens by Christoper Alexander:

[https://www.thekitchn.com/christopher- ale-164084](https://www.thekitchn.com/christopher-ale-164084)

Although this isn't what I was after

</comment><comment><USER13> I came for the software architure ideas, and stayed for how people relate to each other, and building are woven into people's lives.

</comment><comment><USER14> "At the core […] is the idea that people should design for themselves their own houses, streets and communities. This idea […] comes simply from the observation that most of the wonderful places of the world were not made by architects but by the people."

— Christopher Alexander et al., A Pattern Language

So true, and it applies to software development as well.

</comment><comment><USER12> I wrote a book based on a bunch of his stuff that is a pattern language for a new post-capitalism financial system.(And yes it is blockchainy)

Amazon: [https://amzn.to/2u5HBHY](https://amzn.to/2u5HBHY) Free here: [https://skilesare.github.io/immortality/](https://skilesare.github.io/immortality/) Shortcut to the pattern language: [https://skilesare.github.io/immortality/the_pattern_language...](https://skilesare.github.io/immortality/the_pattern_language/)

I'd also highly recommend Thriving Systems Theory and Metaphor-Driven Modeling by Leslie J. Waguespack that is based on his ideas in Nature of Order.

[https://amzn.to/2ujrTZ0](https://amzn.to/2ujrTZ0)</comment>


Winners of the 7th Underhanded C Contest - vezzy-fnord http://www.underhanded-c.org/

<comment><AUTHOR> I'm kinda annoyed that the judge completely misread my entry. I had it so that data was leaked out of a function that could not possibly leak data, via a malloc side-channel attack (ala HeartBleed).

Instead it got judged as being a 'simple buffer overflow'.

Grrr.

<comment><USER2> I'd call that a win. Even the judge was fooled.

<comment><AUTHOR> I'll post up my complete entry in case anyone's interested to look through it:

[http://www.codersnotes.com/files/piupiu.zip](http://www.codersnotes.com/files/piupiu.zip)

See surveil.txt for notes first.

Someone below asked what makes this different from the Obfuscated C contest. In this contest, the idea is to make code that looks very clean and innocent. Entries that hide their behavior in weird ugly macros or just general C complexity are not really in the spirit of the contest. I tried to make my entry very clean so that there is obviously no malicious code anywhere in it.

</comment></comment></comment><comment><USER3> SPOILERS. If you want to see if you can spot the tricks, do not look at this page; it only contains solutions, it doesn't contain the programs themselves!

</comment><comment><USER4> >The PiuPiu oversharing site allows users to create PiuPiu accounts and post 140-character messages.

Hah- "Piu-Piu" is the Brazilian-Portuguese name for the Looney Tunes character Tweety:

[https://pt.wikipedia.org/wiki/Piu-piu](https://pt.wikipedia.org/wiki/Piu-piu)

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

<comment><USER5> Yes, and "piu" is the Portuguese onomatopoeia for "tweet".

<comment><USER6> And in Spanish it is "pio" for tweet. Very close to the portuguese one.

<comment><USER7> Interesting. I think "pio" is the onomatopoeia for tweet in Japanese too. It's the noise cash registers at Tokyo's Inageya supermarkets make when you use their points card.

<comment><USER8> And in French "piou piou" can be used colloquially to mean "bird"... Many languages seem to agree on this.

<comment><USER9> In Hungarian, "pee-pee-pee-pee" is used to at farms to call chicken. :) And sometimes, young woman are called "pee-pee"-s, in a playful way.

</comment></comment></comment></comment></comment></comment><comment><USER10> They did it backwards this year. A run-of-the-mill evil program that unexpectedly does something heroic.

<comment><USER11> Is that really backwards? The contest is "underhanded", not evil. Underhandedness can be used for good or evil, and it is good that this year's contest reminds entrant of that.

<comment><USER12> Sure, but it's explicitly defined as the Evil part.

</comment></comment></comment><comment><USER13> Is it possible to view all the entries with no explanation? I want to try to spot the problems.

<comment><USER3> Yeah, that really spoiled the fun for me. I wanted to read through and see if I could spot the tricks myself, but it keeps giving the answers before even showing the code that the trick is in!

</comment></comment><comment><USER14> I'm glad to see that there are more women's names this year - including the winner. A sign of better representation in tech in the future?

<comment><USER15> Or just more interested in our field of digital sorcery. Either way, I agree it's good to see more women in these things. Having different types of people makes things more interesting. And often more surprising. :)

</comment></comment><comment><USER16> Incredible mix of evil and genius, congrats to the winners. I'm still astounded at how many obscure ways there are in C to fool a code reviewer.

Definitely makes me feel less safe considering the amount of C code there is in tools we depend on.

</comment><comment><USER17> haha, the winning entry is pure genius! It was so difficult to follow, and the code that produces the bug is only viewable if you examined the macro expanded source code - and the macro used _all_ look like functions, so a casual code reviewer probably won't recall them being macros in the first place.

<comment><USER11> > and the macro used _all_ look like functions

AUDIT properly looks like a macro, which makes it even more likely a reviewer wouldn't notice __isleap is one as well.

</comment></comment><comment><USER18> I'm not a C programmer so I'm wondering, don't the common C editors highlight macros and functions differently?

<comment><USER19> I have personally never come across this. Moreover, "common" C editors are vanilla vim and emacs, which don't actually know what's a macro and what's a function without customization (ctags &c).

Good idea, though. I'd like it.

<comment><USER20> With emacs, this actually an ideological choice.

<comment><USER21> How so?

<comment><USER20> For that kind of code analysis one wants more detailed information about the source file, like an AST, but Stallman has forbidden that level of detail to be exportable from gcc, and more recently squashed efforts at deeper emacs/clang integrations, both on ideological grounds.

<comment><USER21> Interesting.

How can deeper integration between any language and tools then be compatible with rms's and/or GNU's and/or the FSF's ideology?

(Maybe the answer is, "Use Lisp since the syntax is the AST." I'm okay with that. :)

</comment></comment></comment></comment></comment></comment><comment><USER22> How is this different from the Obfuscated C contest? [http://www.ioccc.org/](http://www.ioccc.org/)

<comment><USER23> In this contest, you are to intentionally insert a difficult-to-detect bug into otherwise legible code. In the obfuscated C contest, you are writing obfuscated code.

[https://en.wikipedia.org/wiki/Obfuscation_%28software%29](https://en.wikipedia.org/wiki/Obfuscation_%28software%29)

</comment></comment><comment><USER24> Why is it underhanded to let a user know that his government is censoring/surveiling his posts? This should be the freedom-c contest.

<comment><USER25> It's underhanded in that the function should look like it's doing one thing but also do another hidden task as well.

</comment></comment><comment><USER26> Why someone would use this language for a real project is beyond me.

<comment><USER27> A real project like writing a Kernel or implementing a programming language?

<comment><USER26> Yes, real projects like that. Or projects like OpenSSL.</comment></comment></comment>


How to contribute to Docker in 5 easy steps - <AUTHOR> https://blog.docker.com/2015/04/start-contributing-to-docker-in-5-easy-steps/

<comment><AUTHOR> Author of the post here. Would love to hear people's thoughts on this approach and your own methods of diving into open-source projects!</comment>


Where Hate Groups Are Concentrated in the U.S. (2018) - <AUTHOR> https://www.citylab.com/equity/2018/03/where-hate-groups-are-concentrated-in-the-us/555689/ <comment><USER2> I wonder if in the age of the internet and ease of access to these groups from anywhere if we're seeing some of these stats shift and change. I wonder how much you need a physical local hate group to adopt their ideology anymore compared to the past.</comment>


The 17 equations that changed the course of history - <AUTHOR> http://www.businessinsider.com/17-equations-that-changed-the-world-2014-3 <comment><USER2> I'm not sure how good this list is, the book probably has more detail. For example, the second law of thermodynamics was probably included because it most concisely describes entropy, but an understanding of thermodynamics wasn't too important for e.g. the industrial revolution.

Indeed, thermodynamics is probably less important that statistical mechanics, especially Boltzmann's entropy formula (which directly leads to e.g. the third law). The formula, which is also carved on his grave, relates the macroscopic and microscopic. This is vital for modern science. Indeed, Boltzmann's work also provided Max Planck with the beginnings of quantum mechanics. If we could preserve only one formula, it would hopefully be "S=k*ln(W)".

</comment><comment><USER3> I like that it lists newton as the sole inventor of calculus but then uses leibniz's notation.

That said - can any (maybe mech only?) engineers explain their field's preference for Newton's notation?

<comment><USER4> Usually dot notation is used for time derivatives, while Leibniz's prime and d/dx operator notation is used for most other things.

<comment><USER3> Ah so it's mostly due to engineering being interested in specifically the change in values over real world time, rather than conceptual time, or just not time at all?

(Excuse my phrasing. English is totally my first language I'm just bad at it :D )</comment></comment></comment>


Build Your Own React - <AUTHOR> https://pomb.us/build-your-own-react/ <comment><USER3> Very, very nice.

His presentation library is available as well!

[https://codesurfer.pomb.us/](https://codesurfer.pomb.us/)

[https://github.com/pomber/code-surfer/blob/code- surfer-v2/re...](https://github.com/pomber/code-surfer/blob/code- surfer-v2/readme.md)

<comment><USER4> Please don't perpetuate this type of animated presentation style. Why?

1) Vertical layout is easier to scroll

2) Vertical layout puts the code blocks in-line to know where they belong in the text

3) Author's presentation style has animations that slow down user's ability to scan quickly

4) Scroll position determines the code block's visibility (!!! WTF)

5) Either have the entire page white or black. The contrast changes between reading the document and then reading the code tires the user

6) Scroll wheel feels highjacked because the left pane is static

I could go on and on. I strongly discourage people from using this type of documentation. Your users, will get tired of the novelty and when push comes to shove, they will want something like this:

[https://golang.org/pkg/](https://golang.org/pkg/)

<comment><USER5> I think static documentation (your link) is a different use case than an interactive tutorial (not documentation). I didn't find the presentation horrible, but it's likely just looking nice and perfect on my computer hooked up to big monitors, and not on a phone or something....

<comment><USER4> I think everyone is saying that but presentation or documentation is essentially presenting sequential information to the user, whether it is a word document, a slide deck or a scrolling html page.

Also, there is nothing interactive about it - I can't change code on the left side, nor can I do anything with the right side. It is just scrolling, I guess you can call that "interaction".

<comment><USER6> You're dismissing scrolling as if it doesn't do anything but when I scroll I can see the code at a point in time as opposed to a point in space.

<comment><USER4> That's precisely the problem - if both sides were moving together, in time it would be a slide deck, in space it would be a scrolling document. Here, we have the left and right side, changing in time and space, respectively, and burdening the user with cognitive dissonance.

<comment><USER7> _if both sides were moving together, in time it would be a slide deck, in space it would be a scrolling document_

There is a fundamental difference between reference material, where only the final version is relevant, and tutorial material, where the evolution is also important. You keep making similar comments in this discussion where you compare this tutorial/exposition format to typical reference documentation, but they're solving different problems and reasonable assumptions in one case don't necessarily hold in the other.

In particular, presenting this sort of tutorial/exposition material as you suggest could make the document much longer, but worse, the reader would have to keep looking at _almost_ the same code snippet and figuring out what changed at each step instead of having it demonstrated by the animation effect. _That_ is a significant mental overhead, and it's a recurring pain point when teaching programming subjects that can be remedied by using something that actively shows the progression. I've used similar techniques where some example code evolves with simple animations in both presentations and private documentation, and it generally seems to be effective at communicating the intended ideas and well received by the target audience.

<comment><USER8> Exactly. This presentation style made it much easier for me to see what was being added to the code. I don't like having to continually scan different blocks of code to see what changed, and try to make sense of how the changes fit in the bigger picture.

<comment><USER7> _I don 't like having to continually scan different blocks of code to see what changed, and try to make sense of how the changes fit in the bigger picture._

Indeed.

Visual diff tools were invented for a reason, and using a side-by-side layout with some sort of colour coding and some attempt to align equivalent code is now close to universal. No-one would suggest doing code reviews by printing out the last two versions of a source file and comparing them on paper any more.

In presenting tutorial material like this, IME the two most effective formats have been either something like that side-by-side diff, often with some extra annotations like chunky labelled arrows to highlight the specific areas or changes of interest, or something like the style here, with the changes at each step being highlighted and/or animated so it's easy to follow along. Both of these work for code but also other illustrations.

</comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER9> Presentation is amazing here.

That said, I recently wrote a webcomponent based router and I was surprised at how easy it was to get to a very usable point at such a minimal amount of code. All too often I get in the loop of just `npm i`'ing whatever it is I need, even if the functionality I really need is just a tiny subset of whatever huge library I'm importing.

Rodrigo's right that something like this helps you understand React and how to contribute to the codebase, but I think it goes further than that - it lets you understand that the library isn't magic. It gives you the confidence you need to think that maybe you don't need that full 560kb library.

<comment> rajeev-k > _webcomponent based router_

Routers can be (and should be, IMO) written to be independent of UI component libraries such as React and webcomponents. See an example here: [https://github.com/Rajeev-K/mvc-router](https://github.com/Rajeev-K/mvc- router) You can use it with React---and in some ways it works better than react-router.

<comment><USER10> Yeah I'm not a fan at all of react-router because it's too dependent on React. For redirecting, for example, they recommend you render a <Redirect> component. Which is just bananas to me.

<comment><USER11> It's not really bananas when you actually start to think of everything 'as components', and consider that 'render' can neatly, declaratively describe behaviour, not just the DOM.

<comment><USER10> That _is_ how I think about components, but it's still bananas. Render does not neatly describe this behavior because it necessitates setting unnecessary state. That's gross.

Usually when I need to trigger a redirect, I'm in some business-level function. So to redirect this way, I would need to set some state in my store, re-render, then hit the conditional, which would redirect, probably unset that state, and then probably trigger some additional business logic.

When really all I want to do is in the business function, directly trigger the redirect and maybe some other logic without any indirection. redux-react- router exists, but it's API is still obtuse compared to something like redux- first-router.

<comment><USER11> Then you can use `useHistory` (or `withRouter` if you're not hooks-ready).

I somewhat agree that the <Redirect /> component is not actually that useful, it's only useful in very simple cases like "based on one route plus conditional redirect to another", e.g.:

        <Route path="/">
          {usersPreviousShoppingGender === "women" ? (
            <Redirect to="/women" />
          ) : (
            ...
          )}
          ...
        </Route>
        <Route path="/women">

</comment></comment></comment></comment></comment></comment><comment><USER12> Forget building my own React, I want to build how you did the presentation! It's a great concept!

<comment><USER13> I agree, though, it's a shame there's no fallback for when there's no javascript.

</comment></comment><comment><USER14> Along a similar vein, Sophie Alpert did a talk[1] at React Conf this year on building your own React custom renderer by using implementing the interfaces that React exposes. Sophie explains how you could use React as a declarative API for pretty much any platform if you wanted, similar to how react-native works.

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

<comment><USER15> Which is actually a little funny, because that's essentially turning React into a domain specific language for UI rendering. The Racket people are probably facepalming that we had to go via JavaScript and Babel to get to a UI DSL.

<comment><USER16> If Racket had a declarative UI DSL, I'd be using that, but they don't.

</comment></comment></comment><comment><USER17> I think that inverting the order, putting the text on the left and code on the right would work much better.

For me, it felt quite unnatural to go against the normal reading direction. I believe that because we read left-to-right, and the additional content is usually on the right, it would be easier for the eyes to search for the examples on the right rather than backward. It felt very distracting.

Great content though!

</comment><comment><USER18> I really like the UI of this blog. On mobile it's a bit annoying to have the top half of the screen be filled by a black block of code, but on desktop it look definitely awesome.

</comment><comment><USER19> The presentation is stellar! I love the animated code changes on the side <3

<comment><USER19> The effect is here: [https://github.com/pomber/gatsby- waves](https://github.com/pomber/gatsby-waves)

</comment></comment><comment><USER20> Very nice. This guy is going places.

Hey Rodrigo so how performant do you think this didactic example would be compared to React? Maybe 80% there?

<comment><AUTHOR> Much less than 80%. Half of React code is optimizations, and not only speed, for a medium sized app I guess React uses less than 20% of the memory that Didact uses.

</comment></comment><comment><USER21> This is great. I did the same for Express.js last year. If anyone interested in it, here is the link: [https://github.com/antsmartian/lets-build- express](https://github.com/antsmartian/lets-build-express)

</comment><comment> aaron-santos What a great tutorial!

I wanted a React-like TUI lib for a Clojure project and ended up writing facsimile by looking at the React source. Reading the React source to try to understand how React works is very challenging. This would have made the perfect guide. Thank you.

</comment><comment><USER22> Wasn't there a very similar article recently? Wouldn't mind if this is a new tutorial trend. Regardless the presentation of this article is great! I hope this also catches on, it has maximum scanning efficiency.

<comment><USER23> What's the trend here?

</comment></comment><comment><USER24> I find that these kinds of tutorials are great at all stages of my experience.

As a beginner, it's helpful to watch someone's thought process as they build something from scratch. I remember not even knowing where to start.

As a more experienced developer, I tend to know how things work independently, but am always interested to see how you might go about stitching them together at a high level.

Here, I liked the concurrent-mode and fiber patterns broken down into their simplest implementation to get the point across.

</comment><comment><USER25> I think concurrent mode and fibers are kludgy hacks that arise from the problem that only the main thread has access to the DOM. As far as I know and I may be ignorant but few, if any, other frameworks are scheduling DOM updates as aggressively as React is, and are simpler to understand as a result.

Hopefully the standards folks can come up with a decent DOM API for WebAssembly.

</comment><comment><USER26> This is a great way to understand code. Why write comments, when you can make presentations? Are there similar tools like this?

</comment><comment><USER27> Reminds me of the book "Build Your Own AngularJS" from a couple of years ago. - [https://teropa.info/build-your-own-angular/](https://teropa.info/build- your-own-angular/)

Old now, but still worth reading IMHO as you learn a lot.

</comment><comment><USER28> Is this the same concepts behind Vue as well? As someone that hasn't yet dabbled in the 'new' frameworks I love how this bridges the gap of understanding. Thank You!

</comment><comment><USER29> This is great.

Implementing core libraries/frameworks you use day-to-day, from scratch / for fun, is one of the best and most practical ways to level up as a dev.

</comment><comment><USER30> WOAH amazing presentation, this is how code should be explained.

Quick validation: would you pay for good bits of code explained well by the author?

<comment><USER31> I have once already: [https://www.amazon.com/Beautiful-Code-Leading- Programmers-Pr...](https://www.amazon.com/Beautiful-Code-Leading-Programmers- Practice/dp/0596510047)

I liked it, but I'm not going to be paying for this sort of thing often. I think a lot would hinge on having content that was high quality, and being able to persuade me that it would be high quality before I paid for it might be challenging.

<comment><USER30> Thank you very much, challenge accepted

</comment></comment></comment><comment><USER32> What's interesting is the React team had to implement their own DOM manipulation abstraction, with efficient change management and not interrupting the main JS thread. Their implementation strikes me as a possible general purpose implementation that could eventually replace the way DOM works.

</comment><comment><USER33> Excellent content. I did find that the code previews in the side bar occasionally changed before or after I expected. I understand the intent with having them adjacent rather than inline ... but I'd probably prefer inline. It would be nice to make this an option of the presentation format.

<comment><AUTHOR> Is it because you read closer to the top or bottom of the viewport?

I want to add a print mode that would have each code step inline.

<comment><USER33> I tend to flip back and forth from hacker news articles (e.g. check slack, check build progress). I try to position the page while scrolling so I can find my place back in the text. That alternates from "align top of content section to top of scroll pane" and "align bottom of section content to bottom of scroll pane" depending on the length of the section. I also do it unconsciously as I read, like a habit, to prepare the page in case I need to jump away.

Of the two, I probably favour aligning to the top. But since I alternate I would probably have changed to inline.

</comment></comment></comment><comment><USER34> I've been building apps with something similar but using D3.js (d3-select specifically) for data binding.

[https://github.com/ScottORLY/miri](https://github.com/ScottORLY/miri)

</comment><comment><USER35> Nice tutorial, but kind of unusable on a mobile device.

</comment><comment><USER36> I really hate the layout and the annoying, distracting, animated garbage on the left side of the page.

Maybe it isn't rendering properly in my browser, but I would greatly prefer a simple, wide, vertical layout.

<comment><USER4> I agree, it is simply astounding that the entire thread is filled with praising the presentation style which only gets in the way of the user. Anytime there is a need to add effects, animations, snazzy things - <USER2> ruthlessly as to why is it needed. Then after justifying it, ask again.

This is what good documentation looks like: [https://golang.org/pkg/](https://golang.org/pkg/)

And this: [https://www.mpfr.org/mpfr- current/mpfr.html](https://www.mpfr.org/mpfr-current/mpfr.html)

<comment><USER37> But this isn't documentation.

This is a tutorial, in which progression and transitioning between steps is a fundamental part of the content. Representing that transition via animations is not inappropriate.

<comment><USER38> It looks cool, but it is inappropriate because it wastes time since the transitions take time.

<comment><USER7> Do they take more time than repeating the same 10 or 20 lines of code with slight changes every couple of paragraphs, and having the reader try to figure out what changed since the last 4 times they read almost the same code?

</comment></comment></comment></comment></comment><comment><USER39> estás loco boludo amazing job

</comment><comment><USER40> Very nice!

</comment><comment><USER41> your* ?

<comment><USER42> Next article: "Build yore own grammar checker" :-)

<comment><USER43> "Billed your own gram a chequer"

</comment></comment></comment><comment><USER44> Oh boy there comes a yet another batch of react like "frameworks" no one needs.</comment>


1940 Census - Opening April 2, 2012 at 9:00 a.m. Eastern - <AUTHOR> http://1940census.archives.gov/

<comment><USER2> Anyone know how to download them in bulk?</comment>


How I got my username on nearly every site - <AUTHOR> https://shkspr.mobi/blog/2019/07/how-i-got-my-username-on-nearly-every-site/ <comment><USER2> Considering the relatively short response times the original owners were given in some cases, and you do not gain anything from having all those usernames I think what you did was kind of a dick move.

And because of that you'll use it to acquire even more usernames.

You opened a dispute to take someone's chat/telegram name... Not cool. What if the person was active but just didn't want to reply to you? Why would they, you don't own the rights to that username. What if they were away for personal or health reasons temporarily?

You're not a brand. You're not a product. You're someone who has those letters in your name, just like I'm sure a lot of other people.

What gives you the right to claim those usernames more than anyone else? In some cases it seems what gives you the right is just the fact that you bothered support, or opened disputes, to give you a name on another service then used that fact to get more of them.

<comment><AUTHOR> I agree with you. But I didn't make the Telegram policy - they did.

If you want to keep your username, the lesson here is to read the T&Cs and comply with them.

And, as I say several times in the blog post, I don't have the right to those combination of letters.

<comment><USER3> So you're suggesting that everybody should read the miles long terms for each website they subscribe to, otherwise they do not have a right to keep their username.

And I'm not sure that abusing an unethical system waives you from the morality of your actions.

The only lesson you're giving here is about you. But hey, any publicity is good publicity right? You're enforcing your 'brand' after all. \s

<comment><USER4> > So you're suggesting that everybody should read the miles long terms for > each website they subscribe to

Absolutely. You should never agree to something you haven't read.

<comment><USER3> Oh so I guess the fact that there are whole organizations[1] devoted to reading the absurdly enormous TOS means nothing, and studies[2] that suggest a major percentage isn't reading them are false.

I will not believe you if you state that you read the TOS for every site you register on, every program you install.

[1] [https://tosdr.org/](https://tosdr.org/)

[2] [https://papers.ssrn.com/sol3/papers.cfm?abstract_id=2757465](https://papers.ssrn.com/sol3/papers.cfm?abstract_id=2757465)

</comment></comment></comment></comment></comment><comment><USER5> Wow. You know it is inconsiderate of you to do that, but you are still sharing details on how you did it as if it's an achievement. Most people want the same username on all websites, but really, one month's of inactivity is a very short period of time to kidnap someone's username. There are companies that give six months (or more) of maternity/paternity leave alone.

<comment><AUTHOR> I agree. I was shocked that some sites only gave 48 hours notice.

What are you going to do to protect your accounts now you have that knowledge?

<comment><USER6> Terence, I love how you are throwing it back on others to protect their social media account names from being snatched by people like you.

[Edit] Corrected typo in Terence's name.

<comment><AUTHOR> When I started out doing this, I thought it would be a lot harder to grab the names. And I thought it would take several months. Frankly, a month isn't long enough and 48 hours is downright shocking.

<comment><USER7> ...Then why do you continue doing it?

<comment><USER8> Because he doesn't want it to happen to him?

<comment><USER5> So if you don't want to get robbed, you rob everyone else in anticipation?

</comment></comment></comment></comment></comment></comment></comment><comment><USER9> > When YouTube first started giving out names, they used Google+.

When YouTube first started giving out names, Google+ didn't exist.

Then there was the merger of Google accounts with YouTube, then there was the merger of Google+ profiles and posts with YouTube profiles and comments to inflate G+'s stats and force people to use it. Despite all that churn, I don't think old YouTube usernames from 2006 ever stopped working.

<comment><AUTHOR> Ah, that may be my confusion. I obviously got the ability to add a name at around the same time as G+ did its weird merger.

I'll correct the post. Thanks!

<comment><USER9> Mm, I think perhaps usernames died with Google Accounts and then they added a new feature to choose a short URL for Google+ or something.

<comment><USER10> nope! i have a youtube account that i never migrated. still shows my original username everywhere.

<comment><USER9> I don't mean that usernames were removed, just that you couldn't create new ones for a time (also, I don't know if the new system is technically a username or not). Just to clarify.

</comment></comment></comment></comment></comment><comment><USER11> i'm sure the former owners of 'edent' are _ecstatic_ about your hobby.

I imagine, somewhere, a family with a dead relative, 'Emily Dent' in my head- cannon, is trying to login to _their_ edent to download the family album to no avail.

<comment><AUTHOR> They should have been born to someone with a more unique name...

But, more seriously, I've only claimed inactive accounts. If There was activity on them - or any content - I'd be less inclined to proceed.

<comment><USER12> There usually isn't activity on dead people's accounts that are memorialized. I'd be incredibly heartbroken if someone took my deceased younger brother's accounts because he's "inactive".

<comment><AUTHOR> I'm sorry for your loss.

I know Facebook and Twitter have memorialised account options which prevent them being taken over. I wonder how many other sites are so considerate.

Here in the UK, it is common for phone numbers to be recycled. Which is distressing when you start receiving text messages from a dead relative.

<comment><USER12> Another anecdote: a friend recently had a stroke and was unable to use his phone or computer for many months. I'm sure his grieving, caregiving family members were not thinking about the ToS specifics of his social media accounts to make sure he didn't lose his memories and identity online.

I think it'd be helpful to have a better definition of "inactive." If the user hasn't posted _anything ever_ , and they don't respond, then sure, that's hard to defend. I think that's fair. But if the user has posted content/code/whatever, it's unfair at best and ethically reprehensible at worst, especially in cases where there isn't a memorialized option, to take over their account just because they don't respond to an email within the window of the ToS. There are lots of things that are technically allowed by law or policy that don't make one that takes advantage of them any less of a subjectively terrible person.

If you had approached this from a perspective of "look what can happen to your account" as a security research experiment, that would have been received better than "look at all the people, including those deceased/incapacitated people whose loved ones may be heartbroken, that lost their accounts to me so that I can have a vanity username."

<comment><AUTHOR> Perhaps I should have made myself more clear in the blog post.

NPM - the account had no activity on it. No code, no linked accounts, and no avatar.

SoundCloud - completely dormant account. They'd posted no content. They had no public activity.

Telegram - user didn't appear responsive. I hold my hands up on this one, it might have been someone using the account.

Those were the only three accounts I could claim. I was not able to claim any accounts which were in use, or had content on them.

And, like you, I think these services should have a better way of protecting accounts.

</comment></comment></comment></comment></comment></comment><comment><USER13> Someone please take over this dormant account: [https://www.npmjs.com/~edent](https://www.npmjs.com/~edent)

<comment><USER14> His account has a published package available that was pushed about 3 months ago - hardly dormant, and based in their disputes process [0] it seems unlikely anyway:

> To dispute a user name [...] After 4 weeks, if the owner has not responded, > support will address your request. The ultimate outcome is at their > discretion and judgement.

And this statement on squatting confirms that it would be 'extremely unlikely':

> We are extremely unlikely to transfer control of a user name, as it is > totally valid to be an npm user and never publish any packages: for > instance, you might be part of an organization or need read-only access to > private packages. If a user has not logged into their account in a long > time, we may consider transferring a name if it is requested by a new user.

0\. [https://www.npmjs.com/policies/disputes](https://www.npmjs.com/policies/disputes)

<comment><USER13> There was no activity on the package for 3 months when I wrote this! By his logic, that would qualify for someone else to take over the account if they like the username.

</comment></comment></comment><comment><USER15> Real name policies bother me a lot. They're just about the laziest and most personally-intrusive way to get the worst kind of legibility into your user base.

I don't often wish for legislative resolutions to social ills, but if anything needed a law, it's this. Maybe California or the EU will take up the torch. Ideally both, I don't want companies evading these kinds of things by bifurcating their userbases.

</comment><comment><USER16> I use a different name on every site. Far too much pervasive tracking as-is, I don't need to help the stalkers, headhunters, employers, etc.

I recommend you do the same.

<comment><AUTHOR> Which is great, until the Tepix on Twittergram starts posting violent messages - and then you get conflated with them.

Having a unified identity is a risk - but having a unique identity is not risk-free.

<comment><USER16> I find that hard to believe. However just in case that's why in my profile i mention this very fact.

Looking at your .tel page i can tell that you don't have any issues with being tracked all over the internet.

<comment><AUTHOR> Yes, I tend to post stuff that I'm happy with under my real name.

For other stuff, I take your approach and use diverse aliases.

</comment></comment></comment></comment><comment><USER17> We have long associated usernames with identities, and assigned trust and obligations to those.

One of the first places this was recognized is email addresses. Reassign the email address username, and the new person might receive sensitive email intended for another person, and also impersonate them for some purposes, accidentally or intentionally.

(Additionally, today, with all the creepy mass intimate profiling that's going on, both parties linked to the same address could have their profiles tainted in ways undesirable to them.)

A service transferring usernames to another party, simply because that party would like to have that particular username (not because of some separate transfer of some functional role), seems questionable security. I'm surprised the first example from the article, NPM (who should be security-paranoid right now), would permit something like that, as a matter of policy, even if it wasn't obviously a direct threat in this instance. And then the next example -- Telegram -- is also a concern.

</comment><comment><USER18> I was on the same way - but stopped because of privacy concerns. Especially if the name is sufficiently different from others, it is becoming fairly simple to research people.

</comment><comment><USER19> I stopped doing this recently because it makes password breaches devastating and online tracking easier. Now the only stable screen name I use is for my professional persona. Everything else I sign up with whatever random screen name is in my head at the time. Some of them I toss in the password manager, effectively making it also a username manager. Others, like HN, I don't store the username or password at all. Once the session dies for whatever reason I just make a new account. It's very freeing!

<comment><USER20> While I understand the privacy/tracking problems, why would password breach be a problem, if you are already using a password manager which would supposedly make it easy for you to use different passwords on different sites?

<comment><USER21> Not op but I think he means that he would get flooded with login attempt/password reset attempt emails from other sites when a username is leaked. Even though his password is likely safe, he would still have to log into each one of these services and update the password to be sure.

</comment></comment></comment><comment><USER22> While I don't necessarily agree with this author's motivation, I do wish that there were easier ways to claim names from Twitter/etc.

For example, someone camped on the twitter name for progscrape.com (twitter.com/progscrape) and then got it suspended. Twitter won't release a name like that unless you've specifically got a registered trademark. That's pretty expensive for a side-project.

There _should_ be a balance in releasing names in a global namespace, but it should err in the side of not taking names away from legitimate users.

A one-year waiting period is probably a decent balance.

</comment><comment><USER23> This post reminds me of a podcast episode of "Reply all". In episode "#130 The Snapchat Thief", less ethical ways of obtaining certain usernames become clear.

</comment><comment><USER24> Are you really active on all those websites? Otherwise someone is going to take some of your dormant accounts next year.

<comment><AUTHOR> I try to be, yes. And now I know what their policy on inactive accounts is, I will comply with them.

This was sparked off by Tumblr emailing me asking if I was happy to relinquish an old, abandoned account.

</comment></comment><comment><USER25> > Usernames are hard. Perhaps, in an ideal world, we'd all use Indie Auth and > use our domain names as our usernames. I'd be twitter.com/shkspr.mobi, for > example.

Can we use our domain name as our username on twitter? Is dot a restricted character?

<comment><AUTHOR> Twitter only allows a-z, 0-9, and _

So no domain-names-as-usernames there.

<comment><USER26> You can use the first half of your domain name. I saw that on a business card once, the guy wrote his email and then highlighted and labeled the parts of it for Twitter and Mastodon.

</comment></comment></comment><comment><USER27> I have a username I've been wanting to get for years on Twitter, the last tweet the account holder sent out was in 2014 and they've only posted like 20 tweets, so highly unlikely to be an active user.

Yet twitter never seems to release the inactive account, despite claiming they may permanently remove inactive accounts. I've reached out to the owner several times; no response. I've considered resorting to blackhat solutions and taking matters into my own hands.

<comment><USER28> Because a username on twitter is so important that it even worth to break the law. Your values are really interesting.

<comment><USER27> Or rather, an inactive twitter name is so unimportant no one will notice if I break a law.</comment></comment></comment>


Apply HN: NextAppointment – automated scheduling of preventive healthcare - aman-thakral "There is no greater imperative in…healthcare than switching from a treatment-oriented society to a prevention-oriented society. Right now we've got it backwards. We wait for years and years, doing nothing…until people get sick. Then we spend billions of dollars on costly treaments, often when it is already too late to make meaningful improvements to their quality of life or lifespan."
– Richard Carmona, 17th Surgeon General of the United States
NextAppointment will integrate patient and doctor calendars to automatically book timely appointments based on established medical guidelines and mutual availability.  We help you find time to make your health a priority.  No more phone calls, or searching for appointments online.
Initially, we will be targeting new and expecting parents to promote preventive checkups throughout their children's lives.  We believe the current mindset of seeing a doctor only when you feel sick is difficult to change; a life event such as the birth of a child may be a sufficient catalyst to initiate and perpetuate this change in behavior, now and in future generations.
The idea was very well received based on cold calls made to 50 primary care and pediatric clinics in Toronto, with some generating referrals to other clinics on the first call. <comment><AUTHOR> > Initially, we will be targeting new and expecting parents to promote > preventive checkups throughout their children's lives.

This strikes me as a particularly good first userbase. In my experience working at Counsyl, new parents are eager to do everything available to ensure their child is healthy. It's a great way to enter the healthcare market since there's lots of money and openness to new ideas.

What do you need to do to succeed? Do you need to build a network of doctors? Will that require a large sales staff (typical of healthcare related companies)? How are you going to use technology better than competitors?

Does zocdoc do something similar? I feel like I've gotten emails reminding me to make an appointment before.

I imagine many people are just going to ignore their appointment reminders. How will you incentivize them to follow through? Does your service actually schedule the appointment on their behalf, and the user just needs to be somewhere at a particular time? If so, do you know that people will actually be receptive to that or will they feel like it's an invasion into their personal time?

How will you make money?

<comment> aman-thakral > This strikes me as a particularly good first userbase. In my experience > working at Counsyl, new parents are eager to do everything available to > ensure their child is healthy. It's a great way to enter the healthcare > market since there's lots of money and openness to new ideas.

Great data point, thanks for that :)

> What do you need to do to succeed? Do you need to build a network of > doctors? Will that require a large sales staff (typical of healthcare > related companies)?

We need to be able to book timely and convenient appointments for patients with their doctors, but we won't need a network of doctors or a large sales staff. While integration with physician calendars would be ideal, we can get around this by "doing things that don't scale" ;). If we only have access to patient calendars and their doctor's contact info, we can still ensure appointments are made by calling their doctors ourselves. This opens more doors to us, and solves a serious chicken and egg problem: a patient whose doctor isn't online would see little use for our app, and we've spoken with clinics who still use paper calendars! Added benefit: patients are also identifying doctors of interest for our sales team, which we believe is better than the shotgun approach of trying to convert random clinics.

> How are you going to use technology better than competitors? Does zocdoc do > something similar?

Our competitors (ex. ZocDoc) require patients to request the appointment, for preventive care or otherwise. Patients aren't doing that now (unless sick!), and we don't think they'll start doing it out of the blue.

>Does your service actually schedule the appointment on their behalf, and the user just needs to be somewhere at a particular time? If so, do you know that people will actually be receptive to that or will they feel like it's an invasion into their personal time?

Yes, we actually schedule the appointment. We believe that patients are more likely to follow through with their appointments if the time is convenient, the reason is justified, and there is zero booking related friction. We don't think people will see this as an invasion of their personal time; if they signed up for this and we explain it clearly, it shouldn't come as a surprise when we suggest a check-up. Since the number of preventive care appointments have a maximum cadence of about 1 per month (in the case of expecting parents), the user will not be overwhelmed with notifications, and we'll make it easy to cancel appointments at the click of a button.

> How will you make money?

We have a couple thoughts we are exploring. One is a transaction model based on attended appointments, or a SaaS model with a subscription fee.

Aside: per [https://www.healthcare.gov/coverage/preventive-care- benefits...](https://www.healthcare.gov/coverage/preventive-care-benefits/), "Most health plans must cover a set of preventive services at no cost...", so patients will incur little to no financial burden for attending these appointments.</comment></comment>


Microsoft sues Motorola Mobility, claims patent abuse - <AUTHOR> http://news.cnet.com/8301-13506_3-57382524-17/microsoft-sues-motorola-mobility-claims-patent-abuse/

<comment><USER2> Are the Motorola patents in the Microsoft case "FRAND" or "standard essential"?

The story seems to use the two interchangeably, but there's a difference. In one case Motorola has promised to do something (however fuzzy that promise is) in the other the patent regime gives them the right to block the standard just as they could any other use of the patented idea and they've not necessarily entered into a previous agreement to do otherwise.</comment>


Free Software Still Isn't Understood - <AUTHOR> http://mysql-ha.com/2008/10/23/free-software-still-isnt-understood/

<comment><AUTHOR> _If the economy truly bottoms, I'll still have something to do, because what I do isn't driven by the chase of wealth._

People like this really do make the difference with open source software. It is always impressive to me to see people working their day job completely outside the field and contributing as a passion. Loved the theater analogy.

</comment><comment><USER2> The GP he quoted was a bit of a troll, but the economy will hurt OSS more than we realize

[http://blogs.computerworld.com/who_writes_linux_corporate_am...](http://blogs.computerworld.com/who_writes_linux_corporate_america)

</comment><comment><USER3> Statistically. Isn't. A whole sentence.</comment>


Competitive Intelligence for Bootstrapping Startups - <AUTHOR> https://www.skmurphy.com/blog/2019/09/04/competitive-intelligence-for-early-stage-startups/ <comment><AUTHOR> Overview: We see teams make two basic mistakes

1\. An overly broad definition of their "circle of competence." When they narrow their focus to capabilities they can execute with distinction; they chase fewer opportunities that they are unlikely to win. In addition, their thinking shifts away from "everyone is a competitor," and they are able to partner with a broader set of players.

2\. Looking at things as zero sum instead of win-win, not only with customers but also partners and even potential competitors. The key to success, especially in early markets, is co-creating value and taking a smaller share of a larger pie.</comment>


Proprietary open source - <AUTHOR>

Would you work for free on an open source project, open in the sense that source code is available and anybody can submit pull requests, but with a propietary license where the code owner retains all the rights to copy, redistribute, sell, etc...? If not, would you do it if you were paid  for your contributions? <comment><USER2> I would - simply because it's damn near difficult to find a "new" open source project to work on, I don't want to walk in to one that's already been running for 3 years or whatever.

Timing is everything.</comment>


Removing Quora, Pintererst, Instagram and other login-walls with uBlockOrigin - <AUTHOR> Open uBlock Origin settings. (i.imgur.com/O8FfkqA.png)
Go to 'My Filters'.
Enable the filter lists 'uBlock Annoyances' and 'Fanboy's Annoyance' - (i.imgur.com/POboA3n.png).
Lists taken from https://github.com/gorhill and https://www.fanboy.co.nz <comment><USER2> It's actually under "Filter lists", not "My Filters" on my install.

<comment><AUTHOR> Oh sorry. Looks like I messed it up. I had copied the exact filters from the 'Filter lists' tab and moved to 'My filters'.

I took specific filters, since I didnt need them all. Thanks for correcting it!

<comment><USER2> No problem. I appreciate you posting this. It fixes a real sore point of mine.

</comment></comment></comment><comment><USER3> Thanks!

</comment><comment><USER4> Amazing. Thank you. Quora's login-wall is unbearable.

</comment><comment><USER5> if I had this year's ago I would have never made an acct there!</comment>


The Fall and Rise of Dart, Google's 'JavaScript Killer' - <AUTHOR> https://insights.dice.com/2019/03/27/fall-rise-dart-google-javascript-killer/ <comment><USER2> fake news... if there was a rise to dart, it went about as high as a pita bread. If there was anything google should obliterate, it should be dart</comment>


The Newbie's Guide to Learning Clojure - <AUTHOR> http://www.elangocheran.com/blog/2012/03/the-newbies-guide-learning-clojure/ <comment><USER2> Well, the site won't load for me, but so long as we're on the topic of clojure newbie stuff, I just put together a simple project on github to demonstrate lazy-evaluation for those new to clojure by visualizing elementary cellular automata. I tried to annotate the source quite heavily to make it clear what's going on.

It can be found here: <https://github.com/andrewvc/clj-automata>

</comment><comment><USER3> Sorry for the site loading so slow. I submitted this a week ago and thought it got ignored into Hacker News oblivion. Back then, I added a cache plugin, but I guess that's not enough.

I woke up this morning surprised to see it's on the front page a.t.m. I'm going to troublehshoot right now.

I also have the dirt-cheap lowest VPS option on Rackspace -- is that the problem? If anybody has immediate ideas on how to make my server not be so slow, pass them along (and thanks for reading!)

<comment><USER4> If you want performance on a low end VPS you could use a static website generator like Jekyll, Hyde, nanoc etc ...

<comment><USER3> ... aaand we're back, with more RAM. Thanks, great suggestions, will try them out!

</comment></comment></comment><comment><USER5> [http://webcache.googleusercontent.com/search?hl=en&gl=US...](http://webcache.googleusercontent.com/search?hl=en&gl=US&nomo=1&biw=800&bih=442&q=cache:f9cX8Bnzy6UJ:http://www.elangocheran.com/blog/2012/03/the- newbies-guide-learning-clojure/+the-newbies-guide-learning-clojure)

I was having trouble getting reception, here is the Google cache if others are in a similar situation.

<comment><USER6> same here, why dont people just use github or other usefull hosting for their blogs :-/

<comment><USER7> I think the site load time is an allegory for how long it takes for the JVM to start up.

There are some good links in this blog. If you are a Clojure newbie, definitely check out the text-only cache of this blog.

I also want to note that "Clojure newbie" has many meanings, depending on which direction you approach Clojure from. Depending on whether you come from Java, LISP, Python or nothing, you will start with different tracks. I would recommend that Java programmers actually start with protocols and reify, typically billed as advanced subjects, then the concurrency primitives, before getting into macros and advanced LISP stuff.

<comment><USER8> What do you suggest for a 'nothing' category?

By 'nothing' I mean that I'm a sysadmin, knows a smattering of PERL, a little BASH, a lot of this and that over the years.

<comment><USER3> In my life, I've learned and used the following languages, in this order: Logo, Basic, Pascal, C++, Java, Python, Ruby, Clojure. Each time that I learned the next language, I thought it was a great improvement on the previous, and I wondered what I had been spending my life doing with the previous language.

My experience is that with Clojure is a testament to pretty much everything in "Beating the Averages" (<http://www.paulgraham.com/avg.html>) It's hard to know for sure, but I have a feeling that I will end up using Clojure far much longer than the rest of those languages, combined.

If you are contemplating learning a language for one-off commands and sysadmin scripts, then I kind of prefer Ruby over Python and Perl for expressiveness and readability. Most Rubyists are of the Rails persuasion, but I still have never learned Rails.

</comment></comment></comment></comment></comment><comment><USER9> I would also add that a newbie should check out clojure-koans (<https://github.com/functional-koans/clojure-koans#readme>) and try to solve some of the Project Euler problems (<http://projecteuler.net/problems>). Both of these have been great resources for me to get the basics of the language.</comment>


Zappos' CEO Tony Hsieh Said To Have Bought 100 Teslas - <AUTHOR> http://www.businessinsider.com/zappos-founder-tony-hsieh-just-bought-100-teslas-2013-3

<comment><USER2> Well, apparently you _do_ need a spare battery or two :-)</comment>


An open letter to Spotify employees - <AUTHOR> https://www.facebook.com/innerviews/posts/10157642816788594 <comment><USER2> Well that was pointless and intelligence-insulting. The author clearly attended the Nassim Taleb school of invective.

</comment><comment><USER3> _subtly promotes Innerviews_</comment>


Repository Structure and Python - <AUTHOR> http://kennethreitz.com/repository-structure-and-python.html <comment><USER2> That's pretty much what I do, but I disagree about putting the tests in their own top-level directory. Instead, each package foo in my projects has a sub- package foo.test that contains tests for all the code in the parent package:

        foo/
         +- test/
         |   +- __init__.py
         |   +- test_bar.py
         |   +- test-qux.py
         +- __init__.py
         +- bar.py
         +- qux.py

This means that test-code is automatically part of the package, so you can easily run your tests in production (assuming they don't depend on services or modules only installed on your development machines) to check things during a rollout. Also, because the tests and the code are part of the same top-level Python project, you don't have to mess around with setting Python's import path to get the tests running; one "export PYTHONPATH=$PWD" in your terminal will get code and tests working in one go.

<comment><USER3>
      > so you can easily run your tests in production

I would be wary about running unit tests on my production box. More specifically unit tests that muck with the database. Sure you might have it setup to point to a test database, but is it really worth it to run the tests there on the off-change that the config gets screwed up and your unittests mess up your production data?

      > Also, because the tests and the code are part of
      > the same top-level Python project, you don't have
      > to mess around with setting Python's import path
      > to get the tests running

Within the source directory, there is no need to set $PYTHONPATH. You can just run:

      python setup.py test

You just have to point setup.py at your test packages. Note that this is only for the default unittest tests. I don't have experience with pytest or nose.

<comment><USER4> > More specifically unit tests that muck with the database.

If you're doing a cross-process call then IMO they're no longer unit tests and have become integration tests. Unit tests test small pieces of code for validity and should run fast. You can't do that if you're hitting the database.

<comment><USER3> Then how do you 'unit test' the validity of something that is supposed to make changes to the database? How is this any different than 'unit test'ing something that is supposed to write to a file?

<comment><USER5> For database testing you'd mock[1] the connection in some way. I've done it before by swapping in an SQLite database with some sample data.

[1] <http://en.wikipedia.org/wiki/Mock_object>

<comment><USER3> How is swapping in a SQLite database any different than separating development / testing / production databases? At work we use a test database that is schema-only. All tests populate the data during setup, and rollback on tear down.

The fear of running unit tests in production is that someone screwed up the testing configuration and your database writes are no longer happening on a mocked SQLite connection, but hitting the live database. Oops!

<comment><USER5> _> How is swapping in a SQLite database any different than separating development / testing / production databases? At work we use a test database that is schema-only. All tests populate the data during setup, and rollback on tear down._

It's better for me because it works when I'm on an airplane, that's all. If you do all of your development where the test database is accessible, then there's little to no benefit.

 _> The fear of running unit tests in production is that someone screwed up the testing configuration and your database writes are no longer happening on a mocked SQLite connection, but hitting the live database. Oops!_

I Agree. Unit tests should never be run in or near production systems. The whole purpose of the tests is predicated on the assumption that your code is broken. Do you really want to bring broken code near customer data?

</comment></comment></comment></comment></comment></comment></comment><comment><USER6> One of the things that I've seen bother people is that the source code ends up in a directory named PROJNAME/PROJNAME. Once you understand how the module system works in Python, it makes sense that things are this way, but it can be kind of a redundancy shock.

<comment><AUTHOR> It's important to realize that the outermost dir is not generally the dir containing the package. In other words, the outermost dir is usually the dir that contains the project files, which also includes the package dir itself.

So for instance you might have some necessary build utilities, such as setup.py, a README, perhaps some tests, as well as a dir containing the actual package. Thought of like this, there's no actual redundancy, but it definitely is confusing until you make that connection.

Here's a simple example:

      project/
        README
        setup.py
        test_project.py
        project/
           __init__.py
           project.py

Here project/project/ is the actual package, everything above that dir is simply ancillary to the actual package itself.

<comment><USER7> For Django I like to do

        django-useful-app/
          setup.py
          ...
          useful_app/
            __init.py
            ..

</comment></comment></comment><comment><USER8> Overall these advice make sense, but the relative import

       from .context import sample

is better avoided. Why not this?

       from tests.context import sample

</comment><comment><USER9> Is there a standard set of tools that are being advocated here, in addition to the repository structure?

I've been mostly working with Rails lately, and I'd like to continue using tests, mocks/stubs, and sensible build rules, but I'm not sure what the preferred Python tools are. What's the best test::unit equivalent? What's the best way to mock an object? Do people really use Makefiles rather than something else (like SCons)? Is there some way to use virtualenvwrapper without bash (e.g., M-x eshell)?

<comment><USER10> I use Make because it's fast, simple, always available, and bash has autocompletion for it, so I can type "make t<TAB>" to run my tests, for instance (or "make <TAB>" so see what commands I have available). I use make in my python projects for things like running tests, coverage, building the documentation (sphinx) and removing .pyc files.

For deployment I use fabric, but I have Make targets for the most used commands (again, it's nice to have completion). For example, these are two targets to deploy to my server and to my test machine:

        server-deploy:
                fab -f deployment/fabfile.py prod deploy

        test-deploy:
                fab -f deployment/fabfile.py test deploy

I use either pytest or nosetests to run my tests, mainly to have better and colored output.

I don't think you can use virtualenv(wrapper) without bash, but you can use use it with M-x ansi-term. But I got tired of trying to config emacs to run Python the way I wanted and now I edit my code an emacs and run the code in IPython in the terminal. Ipython's autoreload [0] is a huge help.

[0] [http://ipython.org/ipython- doc/dev/config/extensions/autorel...](http://ipython.org/ipython- doc/dev/config/extensions/autoreload.html)

<comment><USER11> Why do you remove .pyc files?

<comment><USER12> When doing a large refactoring or removing modules all-together, leftover _.pyc or_.pyo files can cause some very hard-to-identify import errors.

</comment></comment></comment></comment><comment><USER13> I find it very hard to figure out the context of this article. First, what kind of repositories? After a while, I settled on "source code repositories". Now, given that a lot of importance is given to readmes, maybe we're talking about Github repositories? Surely, the repositories at my company don't have readmes, because they don't have something like a Github. When you join a team, the rest of the team is the readme.

And so on, and so forth. Please, guys, if you write a blog post, add some context!

<comment><USER14> > _what kind of repositories_

There's only one "kind" of repository generally referred to in programming topics.

> _Surely, the repositories at my company don't have readmes_

Good lord, why not?! Mine do!

> _When you join a team, the rest of the team is the readme._

What nonsense. That is a horrible, inefficient use of resources. Stop it now, you're wasting time and, hence, money. There is no reason to keep walking new developers through the same steps and answering the same questions over and over again. Write a README! And a HACKING!

<comment><USER15> There is a common OO pattern called a Repository (you might know it as a DAO).

</comment></comment></comment><comment><USER16> Is there any evidence to the below the fold mantra working on GitHub as well? IMHO, looking at a bunch of folders doesn't tell me anything, so at the very least you have to scroll down and read the README if you have any interest in a project .

In fact, if people were to standardize their repo's folder structure to match a template, that would tell me even less about the project. Seems counterproductive to me.

<comment><USER11> It's not meant to tell you anything about the project. It's meant to stay out of your way and give you instant access to the areas you're interested in: code, docs, tests/example code etc.

</comment></comment><comment><USER17> I agree regarding the Django tip. Does anyone know why manage.py was moved outside of the main project directory?

<comment><USER18> It wasn't, the generated package is now wrapped in a directory. Before, it wasn't.

</comment></comment><comment><USER19> I agree regarding the license. It is much easier to know to always check LICENSE, rather than scanning the bottom of the README, the source, or the root directory (for a file with another name, like MIT-LICENSE).

</comment><comment><USER20> What's she talking about with Django 1.4? Does it duplicate the directories for some reason?

</comment><comment><USER21> some pretty decent suggestions.

another option is buildout(<http://buildout.org>) for more complex systems. it really makes it easy to go from clone repo, to running/testing/debugging/hacking</comment>


Ask HN: What was the most embarrassing thing you did early in your career? - <AUTHOR> I'm talking 0-3 years in! <comment><USER2> Java dev at a trucking company. Their IT shop grew organically and stuff wasn't exactly well-engineered at any level. We used Websphere on the AS/400 (system i now). When I arrived I found such fun practices as source control being a shared network directory and 63.5k JSPs (because >64k JSPs bombed).

Anyway, they had no real test environment but relied on a byzantine set of flags, logins, etc. to "test" in production. Being new and not used to the ropes, I nonetheless thought I knew what I was doing.

I was making a change to a Bill of Lading input page. I filled up a load with nonsense stuff like 50 barrels of beer and 10 containers of cats. Hit the button, eyeballed the change, said "yep, done".

Boss comes around the next day asking who had made a shipment request for beer and cats. I guess a truck had actually rolled around to the dist center to pick up this load; I guess the system lacked the "what" and just listed the quantities.

Whoops.

I was infamous for the beer and cats shipment for my entire time there, everyone conveniently forgetting the insanity of their staging environment setup.

TL;DR : Created a real shipment for 50 barrels of beer and 10 containers of cats

<comment><AUTHOR> How many cats are in a container of cats?

<comment><USER2> I would guess it depends if they're left whole and in-tact or not.

/s</comment></comment></comment>


Show HN: Python exercises, all from someone self-taught - happy-go-lucky https://github.com/srigalibe/pynotes/tree/master/Exercises-2 <comment> s-c-h I recommend listing the exercices in the README file either by difficulty level or by subject (math, algorithm, io, ...)

<comment> happy-go-lucky Thank you for your suggestion. I will do that.

</comment></comment><comment> happy-go-lucky This is the second set. The repo also has the first set and solutions to both. These are creations out of my own answers at Stack Overflow and Code Review Stack Exchange. Feedback is welcome.</comment>


Mark Russinovich - <AUTHOR> http://en.wikipedia.org/wiki/Mark_Russinovich <comment><USER2> What is the significance of this?</comment>


Lamb chop weight enforcers want warrantless access to Australians' metadata - <AUTHOR> http://www.theguardian.com/world/2016/jan/19/lamb-chop-weight-enforcers-want-warrantless-access-to-australians-metadata <comment><USER2> Laws get introduced "to catch terrorists and pedophiles" and then used to track lamb chop fraud.

I couldn't be more surprised.

</comment><comment><USER3> Let this be a warning to citizens of all other countries where politicians are trying to convince you they need to store your metadata to catch terrorists and paedophiles.

</comment><comment><USER4> I feel this is a clear demonstration of why warrantless access should not exist at all, one you have it, more and more administrative parts want it and then you have completely unrelated institution having too much power for what they do. The potential for misuse here is quite huge.

</comment><comment><USER5> It's pretty fucked up really. Just about anyone can gain access to our metadata. The freaking _Greyhounds Council of Australia_ can gain access for goodness sake!

<comment><USER5> And oh look!

Harness Racing New South Wales wants metadata without a warrant as well.

They can go and kiss my arse.

</comment></comment><comment><USER6> Slightly rephrased and instant Onion:

Australia takes pedophilia and terrorism as seriously as properly measured lamb chops.

</comment><comment><USER7> By all means, let's give these agencies backdoor encryption keys, too. Then we'll be much safer.

</comment><comment><USER8> It's crazy because even people who see "agencies" as these supposedly responsible entities, how do we know they have rigorous procedures to make sure some random temp doesn't have access to the data?

</comment><comment><USER9> it's strange that these agencies are lamenting their loss of access to "telecommunications data" that they needed so badly... can't they get a warrant?</comment>


The Sad Saga of Silicon Graphics (1997) - <AUTHOR> http://www.businessweek.com/1997/31/b35381.htm

<comment><USER2> A really awesome example of why tech columnists are terrible prognosticators of tech future.

Look out SGI, or you'll share the same fate as Apple! Hah! They wish...

<comment><USER3> Well, cut them some slack - the article is from about 9 months after the merger with NeXT, when Steve Jobs was still just interim CEO, and more than a year before the release of the original iMac.

</comment></comment><comment><USER4> Ed Catmull, Pixar gives a great synopsis of SGI's place in history during this talk.

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

</comment><comment><USER5> It's a small tragedy what happened to the Unix workstations of the 90's... The result of so many blunders is that we are stuck with matrioshka-style computers that can run PC-DOS.

It, at least, they could natively run Apple II, Atari or Beeb software, it would make me happier. The IBM PC was, by far, the dullest computer of its age and, weren't its descendants the only computers effectively available these days, it would also be the dullest. It's just that we have no options today.

</comment><comment><USER6> _SGI is even swallowing its pride and working on a workstation that will use Intel chips and Windows NT_

That was the final nail in the coffin really. Everyone who'd kept the SGI faith up 'til then was told, we're orphaning all your MIPS and IRIX investment to date, tough luck. And Sun's Creator3D cards were "good enough". Buy became bye SGI.

I still have a T-shirt from their '96 developer conference, who'da thunk the free souvenirs would outlast the company...

</comment><comment><USER7> This article is from 1997, but the comparison to Apple is amusing:

 _SGI's sexy image prompted a Wall Street analyst to label it the new Apple. Sadly for SGI, that may prove all too true. Now, like Apple Computer Inc., the Mountain View (Calif.) company is a stark anomaly in booming Silicon Valley._

<comment><USER8> Yes, it is very interesting to look back at the ashes <-> roses transformations since 1997 (mostly roses -> ashes).

      </comment></comment><comment>--

Ashes -> roses

* Apple

      </comment><comment>--

Roses -> Ashes

* SUN

* Java (debatable, but the article waxes poetic about Sun Microsystems "which stole SGI's panache and profits by turning its own interactive-TV efforts into the popular Net software Java" except Java never became very popular on the Net, more on the server side and embedded).

* Netscape

* HotWired and Virtual Vineyards (who?)

<comment><USER9> I don't think Java's status is really that debateable. It's a huge success, albeit not in the browser where it was originally targetted. Java changed the way IT departments look at software engineering, and to date its only significant competitor is a language designed expressly to compete against it by cloning its best features.

Hackers don't like it, and Sun never found a way to get much revenue from it. But Java as a product and a platform can only be described as an unqualified success.

<comment><USER10> I've never really understood _why_ Java took off in the enterprise the way it did. Was it just the automatic garbage collection and no pointers was a killer feature over C++?

<comment><USER9> For a certain class of developers: yes, it is. The IT world needs to be able to build big projects with big teams of mediocre talent. They can't handle the pointer bugs of C++, not the runtime-only bugs of dynamic languages. Java was a breath of fresh air in this world.

</comment></comment></comment></comment><comment><USER11> The title should include the date of the article. I do remember the Silicon Graphics debacle and how arrogant some SG employees were before the blow-up of the company.</comment>


Ask HN: Can this be viewed as 'stealing'? - <AUTHOR>

I am building a webpage that will rely on user generated content, and I am banking on its success to make me a couple of hundred dollars so that I don't have to work part time, when I get back to college this fall.
To initially get the site going, I plan on using posts from various twitter users' tweets (which show up in keywords that I search for). Say, for example I search for #high and use the relevant tweets, would it be a copyright violation of any sort?
Also, this is based on some topic that is similar to some random highly followed twitter user's account (but he doesn't have a website associated with it) / and there is room for users to generate similar content. Would it be technically incorrect to register that domain, and create a website for similar content ? Should I ask that guy to partner w/ me ? (The domain is free, so i am assuming that there is no plans on his part to make such a website).
I feel that this might be viewed as unethical, but it all seems legal ?
This idea is inspired by the guy that created thathigh.com, so if you are that guy, I'd love to hear your thoughts too. <comment><USER2> Please read <http://twitter.com/tos> and <http://twitter.com/apirules>

<comment><USER3> <http://twitter.com/tos>

> _You retain your rights to any Content you submit, post or display on or > through the Services. By submitting, posting or displaying Content on or > through the Services, you grant us a worldwide, non-exclusive, royalty-free > license (with the right to sublicense) to use, copy, reproduce, process, > adapt, modify, publish, transmit, display and distribute such Content in any > and all media or distribution methods (now known or later developed)._

So if you're using their API in the correct way you're indemnified as a "partner" of Twitter.

In most cases a tweet will not be considered to be a work for the purposes of copyright, IANA[IP]L and this will vary by jurisdiction and content of the tweet. Compare it to quoting someone, you don't [ordinarily] need my permission to quote me; especially true if it can be considered to be reporting of current events.

As for morality; you'd need to be more specific, probably if you're not sure then it's going to be immoral to some extent.

You do mention:

> _some topic that is similar to some random highly followed twitter user's > account (but he doesn't have a website associated with it) / and there is > room for users to generate similar content. Would it be technically > incorrect to register that domain, and create a website for similar content_

which sounds like you might be considering a trademark infringement of an unregistered mark or possibly "passing off" to some extent - ie masquerading your registered domain as if the content came from a particular Twitter user.</comment></comment>


PostgreSQL Conference Europe 2013 - <AUTHOR> http://2013.pgconf.eu/

<comment><AUTHOR> I'm looking forward to go to this conf.

I did the PGDay before Fosdem 2013 and I was amazed by the quality of the one day conf: speakers, location, organization and refreshment

I will it advice to anybody interested in PostgreSQL: heavy user, sys-admin, developers</comment>


Make Phoenix sucks - <AUTHOR> Welcome phoenix_ujs - the missing part for shitty developers to start using Phoenix framework<p>https://github.com/jalkoby/phoenix_ujs <comment><USER2> Uhm... What?

<comment><AUTHOR> not much. just a tool which makes a lot easier to do staff in phoenix like in rails</comment></comment>


Analysing the impact of companies by using the power of collective intelligence - <AUTHOR> https://www.linkedin.com/pulse/analyzing-impact-companies-power-collective-bertrand-gacon/ <comment><AUTHOR> www.impaakt.com is a collaborative platform that uses collective intelligence to produce impact analysis and impact ratings on each SDG of the world's largest companies.</comment>


First Look at Kepler SETI Candidate Signals - <AUTHOR> http://seti.berkeley.edu/kepler-seti-candidate-signals

<comment><USER2> Oh, wow! This article got me really excited. Those signals look really promising!

Now, if only 'normal' people would understand the importance of this research... jeez, the possibility of something being out there just puts our tiny little problems in perspective.

</comment><comment><USER3> >The signals below are undoubtedly examples of terrestrial radio frequency interference (RFI).

I'm confused.

Are these just terrestrial signals or is there an extraterrestrial component?

<comment><USER4> These are terrestrial signals, yet they prove algorithms searching through dataset are ready to spot extraterrestrial signal of similar characteristics.

<comment><USER2> Meh, thank you for pointing this out. The article was confusing. Dream: broken.</comment></comment></comment>