A New Code of Character - <AUTHOR> http://farukat.es/journal/2011/12/631-new-code-of-character

<comment><AUTHOR> My inaugural post to HN. Article is by Faruk Ateş of Modernizr with writing help from me and a couple other badasses. Hope y'all enjoy.</comment>


Manufacturing a Renaissance with 3D Printing - <AUTHOR> http://www.judegomila.com/2012/12/manufacturing-renaissance-with-3d.html

<comment><USER2> I see the same breathless optimism here as in the dawn of the WWW in the laste nineties. People with little to no understanding of what 3d printing is or its limitations, making wild extrapolations that don't take much reality (especially the social, legal, and political implications) into account.

The fact is, we do not have any idea where 3d printing will take us. The idea that we'll all have 3d printers in our home is possibly a bit silly.

That said, I also have a huge optimism for the future of 3d printing. But these use cases thrown around by people often just sound silly to me.

<comment><USER3> > The idea that we'll all have 3d printers in our home is possibly a bit > silly.

I have a 3d printer at home, or at least a half-assembled one :) You can get one for yourself at <http://reprappro.com/> . The smaller one is only around $669.

<comment><USER4> I don't think price will be the limiting factor, rather the fact that most people won't think of a realistic use for them. Look at photo printers, they're getting cheaper and cheaper yet sales are declining since they just don't make financial sense for most people. Most people I know (even many professionals) get many or all of their photos printed by third parties.

</comment></comment></comment><comment><USER5> IMO, we are still a ways away from 3D printing being as disruptive as a lot of people think (at least for home use).

From owning a 3D printer and doing prints for friends in my engineering classes, I think people still greatly underestimate how high touch 3D printing is today.

For example, look at the makerbot google group: <https://groups.google.com/forum/?fromgroups#!forum/makerbot>

Even looking at Shapeways (an online 3D printing company with really expensive machines), they still deal with quality control problems for the average model someone uploads.

</comment><comment><USER6> I wonder if LEGO can stave off the doom 3D printing presents since blocks are the easiest the things to replicate.

They do a lot of tie-in based LEGO sets that I believe are protected by copyright. However, their basic blocks lost their patent last year so it's open season for those!

[http://boingboing.net/2011/10/21/expired-patent-of-the- day-l...](http://boingboing.net/2011/10/21/expired-patent-of-the-day- lego.html)

<comment><USER7> Part of the success and 'feel' of LEGO are due to the close tolerances - ~.01mm. This is an order of magnitude (or two) greater than my RepRap Mendelmax on it's best day.

However, it will be a great boon to the LEGO community - as they will now have greater access to non-structural, unlicensed parts such as guns [1] and the ilk.

[1] <http://www.brickarms.com/>

<comment><USER6> True. I read once that only 4 bricks in a million are defective.

Who knows, LEGO's .01mm accuracy might become the mark by which 3D printing measures itself someday.

<comment><USER8> I'd bet that day comes by the end of the decade.

</comment></comment></comment></comment><comment><USER9> > Extreme future 3D printers will print entire planets or create new suns for > new colonies.

I can understand the printing of rockets and jet engines, but can someone give me a hint into understanding the printing of planets and suns?

<comment><USER10> I presume after the economy of scale kicks in, we'll be able to buy our own planets and suns from Walmart for next to nothing. A sun in every home. In all seriousness though, being able to print planets and suns, that is one of the craziest things I have ever heard.

<comment><USER11> It's a silly idea but at the same time not _totally_ unrealistic if you assume that one, it's not something we could necessarily start today, two, it isn't a task that could be completed in any 'worthwhile' timeframe, and three, that the raw material for such a venture existed and could be harvested in some at- least-minimally efficient way.

Once we have some sort of solution to the materials problem, it sure would be fun to throw out a couple of linked, self-replicating devices into space and check up on them in, oh, a thousand years or so. Hell, bury our best AI somewhere in the core and maybe by the time it's discovered we'll have a created the next Big Thing. I wonder how long it will be before machines can 'meditate' (usefully of course, hibernate doesn't count)...

</comment></comment></comment><comment><USER12> Pure hype. It's interesting how a technology that is in fact revolutionizing manufacturing (CNC milling) gets very little attention compared to one that will, by all reasonable accounts, only ever be useful for prototyping or very limited production runs of small objects. A CNC mill in every house would be much more disruptive than a 3D printer. It would give people the ability to make actually useful objects (door knobs, hinges, car engine parts etc.) out of materials (wood, metal etc.) that are far more abundant, strong and cheap than 3D printer substrates.

<comment><USER13> 3D printing techniques are becoming more and more relevant to manufacturing. There's plenty of shapes that you simply cannot make with a CNC mill - RF wave guides, topology optimised brackets etc. Additionally, there's materials which are uneconomical to mill - principally titanium.

The main issues with selective laser sintered titanium as a manufacturing process are speed and surface finish. Speed is increasing, and people are making progress with surface finish. CNC milling (which is an incredibly wasteful process) is just a small development from traditional manufacturing processes. 3D printing is the disruptive technology in the room.

For very high scale components stamping and injection moulding will almost certainly remain the most cost effective manufacturing process. For lower scale stuff (especially weight concious things like aircraft parts) SLS 3D printing will almost certainly start to dominate the market in the next few decades.

<comment><USER14> I have extensive experience with both CNC milling and 3D printing. I feel that 3D printing is disrupting Product Design/Development vs. actual Manufacturing. Anyone with an idea can now make functional prototypes and proofs of concepts with the click of a button. As you wrote, in perhaps 10 years time, we will be able to get the size and surface finish from 3d printing required to make limited production parts that have certain characteristics (weight, shape, containing reentrant angles, etc) not feasible from CNC milling/turning, etc.

</comment></comment></comment><comment><USER15> There are three interesting blog posts in this one. I would suggest the titles

3D Printing @ home

3D Printing @ labs

3D Printing @ Star Trek

( Furthermore I think a symbol for 3D printing should be invented. The @ is slightly too 90s.)

</comment><comment><USER16> call me when 3d printers would be able to print itself from materials found in nature.</comment>


Drinking 1% rather than 2% milk accounts for 4.5 years of less aging in adults - <AUTHOR> https://www.sciencedaily.com/releases/2020/01/200115120634.htm <comment><USER2> past discussion: [https://news.ycombinator.com/item?id=22056173](https://news.ycombinator.com/item?id=22056173)

<comment><USER3> Thanks. We've moved the other comments thither.</comment></comment>


Create Your Own Shell in Python - <AUTHOR> https://hackercollider.com/articles/2016/07/05/create-your-own-shell-in-python-part-1/ <comment><USER2> the pythonic way of doing this is: [https://docs.python.org/3/library/cmd.html](https://docs.python.org/3/library/cmd.html)

<comment><USER3> Reading the sorce code for cmd gave me my first "I am enlightened" moment when first programming in Python.

"You mean I just add a do_functionname method and that gives me a functionname command in the shell? And I can understand the 'refection' code that does this, and it dosen't look like incredibly verbose black-magiv-voodoo? I'm sold"

<comment><USER4> There are some youtube talks about python metaprogramming that you might enjoy later on. Your colleagues a little less.

</comment></comment></comment><comment><USER5> Another fun thing you can do is create a shell that only runs with the '-c' command line flag. If this is set as the default shell for a user, then you can use ssh as a simplistic rpc transport.

</comment><comment><USER6> The funny thing is that I was literally just wondering about how shells are implemented right before getting on HN. Thanks for sharing, this should prove most useful :)

<comment><USER7> If you often wonder about such things, I highly recommend the book "Advanced programming in the UNIX environment" by Stevens/Rago: [https://en.m.wikipedia.org/wiki/Advanced_Programming_in_the_...](https://en.m.wikipedia.org/wiki/Advanced_Programming_in_the_Unix_Environment)

It covers a lot of stuff in an authoritative way. For example, how one should implement a daemon properly (e.g., chdir to root to allow for unmounting the disk the program originally ran from, lots of stuff like that). I'll actually _doubly_ recommend it, because it's so good.

<comment><USER8> Of course, a lot of the daemon boilerplate no longer really applies in the modern systemd world.

<comment><USER9> It didn't in fact apply to a sizeable portion of the pre-systemd world, either. systemd doco gives the quite false impression that this stuff is _new_ , for " _new-style_ daemons". _Not_ using this boilerplate has been the right way to write daemons for many systems over the past quarter century, going back to the release of the IBM System Resource Controller at the beginning of the 1990s.

</comment></comment></comment></comment><comment><USER10> How does one implement logical connectives? (&&, ||)

<comment><USER11> There are many ways that one might; perhaps the simplest might be to just define them as a builtin to your shell that checks the exit code of the left- hand command, and executes or doesn't the right-hand command accordingly.</comment></comment>


Mars was a WET, WARM MISTRESS: Curiosity probes once-moist bottom - <AUTHOR> http://www.theregister.co.uk/2014/12/08/nasa_if_wed_landed_curiosity_earlier_it_would_have_been_underwater/

<comment><AUTHOR> And they say women are under represented in science.... gee I wonder why!</comment>


Greenhouse: Browser plugin that shows politicians' funders - <AUTHOR> http://boingboing.net/2014/06/20/greenhouse-browser-plugin-tha.html

<comment><USER2> Link to the actual project: [http://allaregreen.us/](http://allaregreen.us/)

<comment><AUTHOR> Ah thanks, I got so excited when I read the article (because this is a super neat idea) I completely spaced on linking back to the project.</comment></comment>


Ask HN: How would you build a search engine in 2019? - <AUTHOR> So, I was wondering how to build a competitor to Google. We have Common Crawl and Internet Archive. Distributed systems is pretty well understood. How would one go about buiding a search engine in 2019?
Would you do what duckduckgo did, which is to use some body else's index and ranking or would you just build your index from commoncrawl? How are Ecosia and Startpage.com able to stay profitable without doing either?
Does that mean we can have many niche search engines? Can we crawl CommonCrawl and build an index for less than $10K (what one individual can do out of pocket.) <comment><USER2> I think the why changes the approach...

I think my takeaway from the last 10 years, is that a lot of the info on websites that was by real people has disappeared and you have a lot of spammy blog and heavily commercial approaches. And, most of the real info has gone into facebook groups, quora, reddit comments, slack, twitter, and so on.

The problem is those are all closed-door eco-systems in a lot of ways, and the knowledge is hard to differentiate from the temporal messaging.

I think if I was going to approach this I would build software that users run, or browser add ons that lets user tag and save information in some type of format, and then that contributes to a knowledge search information.

For example, I am a member of several FB groups focused around specific expat groups for where I live. There are great pieces of wisdom and hard to find info in there. I'd love to with a chrome extension say save this and here is a little context (or if it could know that is great from formats).

Then try to figure out how to make that public and searchable.

<comment><USER3> >I think if I was going to approach this I would build software that users run, or browser add ons that lets user tag and save information in some type of format, and then that contributes to a knowledge search information.

Something like delicious or pinboard, I suppose.

I agree. A social bookmarking website would be pretty interesting if done right.

<comment><USER2> Well personal + fed into a centralized system, a human knowledge search engine which I think was some of the magic of the early internet but now is buried in FB groups and the other locations i mentioned.

<comment><USER4> Cue some deep learning over this centralized dataset... we might just see 'profiles' emerge that allow the system to build very ad hoc results depending on who searches what.

E.g. one of the strengths of Google (which I've used for a decade without ever deleting history) is to give me very hands-on blogs and procedures whenever I search for some tech — I don't even have to add "guide" or "tutorial" or "hands-on" or "how to", whenever I use my dev account Google just knows what I'm after — _"this guy MAKES, he don 't care for fluff"_. I've compared searches with friends (non-tech non-nerds), they get the usual wiki / reddit / commercial stuff, with my meaty top 10 stuff often on page 2-3-4 (if even that!) for them.

This is the kind of smarts I don't know how to replicate without ML. This is also where Spotify who has had years to figure it out remains extremely generic (frankly bad at deep cuts, which at a basic level used to be one of their initial strengths).

</comment></comment></comment></comment><comment><USER5> So, if you want to make a competitor to Google, you would need to have your own index, but it would be prohibitively expensive to make one on Google's scale. So, you would need to make a search engine wherein most websites you can simply not index, because they are clearly not what you're looking for. That way, you can "only" index the 1% or so of the internet that is in your niche. Some ideas:

\- indie websites only (no news, no medium, no ecommerce, etc.), for those who want to find individuals who still maintain their own website, and say something interesting on it \- low-size websites only, for people with very low bandwidth; anything above a certain size (e.g. 1Mb) and it doesn't get indexed \- recipes (but there are some niche websites for this already) \- websites with no ads on them (but this may conflict with your business model, if you have one) \- websites focused on a certain geographic area (e.g. websites with information by, for, and about Texas, or Slovakia, or Buenos Aires) \- websites with no javascript on them (for people who want to be able to turn off javascript, but don't have a good way of finding out which websites they can still use to get a particular piece of info)

</comment><comment><USER6> I've been having this idea of crowdsourcing a better Google via a browser extension.

Every time I repeat a search query and end up finding the answer in the same website I visited before I wish I marked that link as the 'definite answer'.

Next time I search for the same information the extension would point me directly to my previously marked link.

Maybe by letting people could subscribe to each other answers I could bootstrap better google. Developers seem a good initial target market. Students too...

</comment><comment><USER7> I like this topic a lot.

Obviously, the easiest is to build on top of existing index. This in turn makes it a purely marketing play (DDG's marketing play is "privacy").

Here is one exploration of the following concept: search engine built on top of high quality sites only (as vetted by HN submission history)

[https://cse.google.com/cse?cx=014479775183020491825:c2lrlzro...](https://cse.google.com/cse?cx=014479775183020491825:c2lrlzrogb5)

Described in full here: [https://news.ycombinator.com/item?id=21209358](https://news.ycombinator.com/item?id=21209358)

</comment><comment><USER8> I would build a discovery system. Search systems imply that you know what you're looking for, it also implies a short query.

Imagine instead you start writing out your ideas in natural form. Documents will appear that are relevant to your ideas, but with the goal of diversifying category. Instead of the top 100 results, you may just get minimal results per category.

As you continue to write the relevant documents get more constraint, but continue to attempt to maximize diversity.

I don't know if this work for everything, but would be interesting.

</comment><comment><USER9> In my mind there are two flavours of queries. The first are those which are "ctrl f" in nature, ie I want to query the entire web to find string x. Which are obviously better suited to indexes. The second are more knowledge based in nature. IE I want to find quality information about a certain topic. These benefit from curation, as anyone who has added "stackoverflow" or "reddit" or "wiki" to a google query will know.

So I would start with a curated and crowdsourced first page results for the top x% of these knowledge based queries. With wikipedia like guidelines and moderation to ensure the quality of the sites mentioned is up to scratch coupled with an inbuilt feedback mechanism from people browsing. I think wikipedia has proven that while difficult, a scheme like this is indeed possible.

I also think you can start very niche and play with the results structure. For example, I like motorcycles and after years of browsing I have discovered the best places for reviews and information. Even just this use case could benefit from a better structure of results page and removal of all the spammy sites. The same goes for other niches like cooking & programming languages.

<comment><USER9> Another interesting one is illustrating "depth" of knowledge in a results page. For example, I type "Sagittarius A*". It would be nice to have the results grouped into depth. From initial general-audience explainer videos on youtube down to arvix results. With current news seperated from general informational content.

This works for a lot of niches. For example motorcycle reviews run from entertaining comparisons down to detailed analysis. Recipies for omelettes run from the basics, through adding interesting ingredients, right through to the art of perfectly preparing a difficult to make french omelette.

</comment></comment><comment><USER10> You can't build something that can compete with Google without some very very deep pockets and lot's of data.

Same problem with niche search engines, unless they have some unique features/properties that Google doesn't have you are plainly better off with Google.

Google has a Monopoly on search, which looking at the market will hold up for the foreseeable future.

So unless you can offer a specific feature(set) for a niche or you just want to build it for the hell of it I wouldn't reccomend anyone to go into search engines.

I would probably go with what duckduckgo does but offer unique features that are usefull for one or more niches.

</comment><comment><USER11> with something like proxycrawl you should be able to build the crawler yourself and start crawling to build a big index. Once you get big enough and you start bringing traffic to the sites, you can then stop using them and create your own user agent and ask sites to whitelist you. It will take some time but can be done

</comment><comment><USER12> Can we leverage torrents somehow to create distributed indices ?

<comment><USER10> Wouldn't blockchain make more sense? (Never thought I would say this but here we are)

Problem with torrents/blockchain in this case are twofold:

\- unless there is enough people using it, it's slow

\- since you are basically crowdsourcing you need to create an enticing incentive which works for everyone involved

<comment><USER13> Torrents + Blockchain + _Rust_ would be even better!

<comment><USER14> Don't forget webassembly</comment></comment></comment></comment>


Deep learning for assisting the process of music composition - <AUTHOR> https://highnoongmt.wordpress.com/2015/08/11/deep-learning-for-assisting-the-process-of-music-composition-part-1/

<comment><USER2> Comments moved to [https://news.ycombinator.com/item?id=10068976](https://news.ycombinator.com/item?id=10068976).</comment>


David Heinemeier Hansson's Rails 3 keynote at RailsConf - <AUTHOR> http://www.youtube.com/watch?v=b0iKYRKtAsA

<comment><USER2> Will trade upvotes for summary :-)

<comment><USER3> Rails 3.0

\- Brand new router with an emphasis on RESTful declarations

\- New Action Mailer API modeled after Action Controller (now without the agonizing pain of sending multipart messages!)

\- New Active Record chainable query language built on top of relational algebra

\- Explicit dependency management with Bundler

<http://guides.rails.info/3_0_release_notes.html>

Rails 3.1

\- Better organisation for public/*

\- Preprocessing CSS and Javascript with .erb templates, helpers for sprites

\- Automatic down migrations

<comment><USER4> The handling of sprites is really cool. Allowing Rails to generate the sprite from a directory and then calling the sprite image with sprite_tag(folder/sprite) makes sprites much less painful. As a designer, I appreciate the attention to that stuff from the core team.

<comment><USER5> He just brought that up as a part of a "wish list." Nothing has been implemented yet.

</comment></comment></comment></comment><comment><USER6> So, one signal per minute?</comment>


Show HN: Find work with creators of podcasts, newsletters, and video content - <AUTHOR> https://workwithcreators.com/ <comment><AUTHOR> Hey everyone, I created this website to consolidate opportunities to work with independent creators. A friend was recently looking for roles as a video producer and found it hard to discover open roles, which are currently mostly found via DMs on the different content platforms or on twitter.

This is an attempt to surface these kind of opportunities. Let me know what you think!</comment>


WorldWide Telescope: a tool for showcasing astronomical data and knowledge - <AUTHOR> http://worldwidetelescope.org/webclient/ <comment><USER2> ESA Sky is way better. [https://sky.esa.int](https://sky.esa.int)

<comment><USER3> This looks similar to the web version of Aladin (whose logo appears on the lower right). I don't know the relation between the two projects.

[https://aladin.u-strasbg.fr/AladinLite/](https://aladin.u-strasbg.fr/AladinLite/)

</comment></comment><comment><USER4> It does not work great for me on mobile at first visit (UI/UX), but it seems like a fantastic astronomy resource. Will have a look from desktop.

<comment><USER5> The site looks usable for me, but WWT is an older site - it came out in 2008 and was linked on HN then - and its look and feel does show that age.</comment></comment>


TypeScript 3.4 - <AUTHOR> https://devblogs.microsoft.com/typescript/announcing-typescript-3-4/ <comment><USER2> Wow. The const assertion is huge. My codebases are littered with things that I, the developer, know are constant but TypeScript does not and it often takes extra work to get type safety because of it. Can't wait to start using it.

<comment><USER3> Now following their examples clearly.

Why not just make that "let x" a "const x" which JS already allows?

<comment><USER4> "const a = {}" disallows reassignment to "a" but still allows you to mutate the object e.g. "a.b = 1". The const context does not allow you to mutate the object.

<comment><USER3> OK, the example with the "hello" literal string they have is quite bad then.

<comment><USER5> `as const` is useful there as well, as TypeScript's type inference only narrows as far as the type and not the literal value. `let z = {text: "hello"}` has the shape `{text: string}`, with `as const` it has the shape `{text: "hello"}`.

<comment><USER3> Yeah, but shouldn't it use: const z = 'hello' and then get the shape {text: 'hello'} automatically?

Why use "let" along with "as const" instead of mere "const x = 'hello'" for that?

<comment><USER5> Because `const` is a js level keyword that has different semantics: it applies only to the reference binding being immutable, not the _value_ as being so. `const a = "hello"` does have the shape `"hello"` as you'd expect, since strings are immutable in js and the `const` keyword makes the binding immutable as well. But objects are mutable, so TS can't be a superset of javascript and change the semantics of that behavior. Hence `as const`.

This is different to the widening of value types within objects, which is a tradeoff made towards unsoundness with the belief that it would otherwise make interoperability with existing js too difficult, for which `as const` now serves as a way to explicitly opt into sounder behavior.

</comment></comment></comment></comment></comment></comment></comment><comment><USER6> I haven't written anything in TypeScript, though I have some friends that love the language; I got annoyed at having to supply bindings for obscure languages.

If you can get past the initial hurdle, is TypeScript worth it for Node.JS stuff?

<comment><USER7> what does bindings for obscure languages mean in this context? does TS count as obscure?

<comment><USER8> I'm guessing it's a typo for "libraries".

<comment><USER6> You guessed correctly.

</comment></comment></comment></comment><comment><USER9> Excited about "Higher order type inference from generic functions". Great for libraries like RxJS, Ramda and axax.

</comment><comment><USER10> The type inference looks good.

Pardon a question here: Will ES6 Code 'just Run' under TypeScript? I think the answer is yes for ES5, but I don't know about ES6. Thanks.

<comment><USER11> Not sure what you mean by running ES6 code under Typescript. It is my understanding that Typescript 'transpiles' to whatever flavor of Javascript you need, and then the code is executed as Javascript.

If your question is whether you can just change the file extension of a working ES6 file to .ts without Typescript complaining then answer is 'yes', you should be able to do that no problem.

Edit: of course there is little sense in doing nothing more than that, but it is a good starting point for decorating existing Javascript with TS features.

<comment><USER12> The biggest pain-point with renaming a ES6 file to *.TS is that TypeScript will flag every library or browser specific object you reference as missing.

That isn't wrong behavior on TS's part, just getting started with TypeScript is very configuration heavy, particularly for targeting browsers.

<comment><USER13> You can use the 'allowJs' flag to have the compiler accept unmodied JavaScript and for untyped modules you can use shorthand ambient module declarations so they use the 'any' type, with one line of code.

</comment></comment></comment></comment><comment><USER14> Oh dear, look at those features. Typescript is becoming the big valley of types and syntax overheads. In order to be productive, as a developer I should learn or know almost all the distinct syntax rules and tons of best practices.

An ideal (or close to it) typed language will have only few type rules and better way to compose them.

I prefer either ReasonML or PureScript

ReasonML is great if you are looking lightweight alternative for compatibility with existing JS libraries. It has relatively far less type syntax than TypeScript.

I find PureScript (which also compiles to JS) to be more succinct and solving the right problems for the developer. Although you need to spend some time writing monadic adapter layer over existing JS library API interface if you want to use them but given the confidence and safety provided by PS compiler, I think it's worth the time.

[https://blog.functorial.com/posts/2017-08-09-Why-You- Should-...](https://blog.functorial.com/posts/2017-08-09-Why-You-Should-Use- PureScript.html)

</comment><comment><USER15> Just waiting until TypeScript's type system becomes so powerful that inference accidentally becomes Turing-complete.

<comment><USER16> Apparently, Typescript type system is already Turing-complete: [https://github.com/Microsoft/TypeScript/issues/14833](https://github.com/Microsoft/TypeScript/issues/14833)

</comment></comment><comment><USER17> There has never been a worse time to be a software developer.

Practically all of the most popular tools encourage anti-patterns, add unnecessary complexity or solve superficial problems instead of focusing on critical problems that exist in today's software projects.

Some examples:

\- TypeScript: Unfortunately, we cannot reduce a language's complexity by adding extra complexity on top. The complexity will keep rearing its ugly head no matter how much we try to hide it. The TypeScript project has had over 20K issues raised and 9K pull requests (that's not even mentioning the DefinitelyTyped repo)... To put it into perspective, the Linux project has only had about 380 PRs on GitHub. But how much value does TypeScript add? All evidence points to the fact that TypeScript does not have any positive effect on bug density. Its value is purely subjective and speculative. If humanity had invested a quarter of that time and energy towards coming up with and documenting proper JavaScript design patterns and architectures, TypeScript would have been completely redundant to begin with.

\- NestJS: Makes heavy use of decorators; these aim to allow developers to handle cross-cutting concerns within their code. Unfortunately, cross-cutting concerns are an anti-pattern because they imply a violation of the principle of separation of concerns between components. It takes a bit of thinking and discipline to come up with components which have clear and distinct concerns/responsibilities, but this is not a problem that can simply be ignored by injecting decorators all over your code.

\- InversifyJS: Dependency injection is a failed concept. It's been proven over and over. Angular 1 provided us with plenty of evidence for why we should avoid dependency injection (e.g. it's impossible to find stuff and you end up with a pseudo-global scope for everything which is as bad as simply using global variables). Again, dependency management is not a solution which can be automated away; it requires developers to make careful design decisions.

\- Code coverage tools like Istanbul and others add very little value to projects. 100% coverage is not a useful goal to have, in fact it's counterproductive. When it comes to test coverage, quality of that coverage is WAY more important than quantity (this cannot be over-emphasized). Did you test all the right inputs? Do the tests focus on the most important code paths (and those which are more complex and therefore more likely to fail)? I'd rather have 10% quality coverage of the right parts of the code than 100% poor quality coverage. Also, you need to take into account that the more unit test coverage you have, the harder it is to make changes to your code.

\- Linting tools such as ESLint/TSLint: These tools can be very nice if used correctly and not treated as a silver bullet for all programming problems. We should never forget that linters can only detect superficial problems. If your code passes all the most strict linting rules, it still says almost nothing about your project's code quality. I'd MUCH rather have code that fails ALL linting rules possible but has good architecture and good separation of concerns between components; at least the linting is easy to fix. Linting does not prevent architectural mistakes AT ALL; it only prevents superficial mistakes which are usually easy to identify anyway (if you have half-decent testing).

I hope that over the next decade, the masses of new developers will develop their critical thinking skills and that they will be able to see value beyond the hype which is always being shoved into their faces by various misguided organizations.

It's particularly difficult for me to see what has happened to software development because 10 years ago, I used to roll my eyes when I read comments like this from older and more experienced developers. New developers are often attracted to complexity like moths to a flame, but eventually we all learn that complexity is a silent killer - It's the ultimate enemy. Complexity is always trying to quietly sneak its way into your code (and I do mean ALWAYS; no matter how good your code is at any given point) and you must identify and stop every single attempt. It takes most developers at least a decade or two of coding to really appreciate this.

For me, starting a TypeScript project is like accepting unnecessary complexity from the beginning of the project. It's a bad start, a slippery slope.

<comment><USER18> > But how much value does TypeScript add? All evidence points to the fact that > TypeScript does not have any positive effect on bug density. Its value is > purely subjective and speculative.

This is objectively false. There is plenty of evidence showing that modern type systems reduce bugs considerably.

In Airbnb, they found out that 38% (!) of bugs could have been prevented by using TypeScript[1].

Another scientific study discovered that TypeScript and Flow could prevent about 15% of bugs in committed code [2]. And these aren't even measuring reduction of bugs in non-committed code!

Stripe is also writing their own type checker for Ruby and engineers have reported an increase in productivity[3].

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

[2]: [https://blog.acolyer.org/2017/09/19/to-type-or-not-to- type-q...](https://blog.acolyer.org/2017/09/19/to-type-or-not-to-type- quantifying-detectable-bugs-in-javascript/)

[3]: [https://sorbet.run/talks/StrangeLoop2018/#/](https://sorbet.run/talks/StrangeLoop2018/#/)

<comment><USER17> >> In Airbnb, they found out that 38% (!) of bugs could have been prevented by using TypeScript[1].

I don't buy these hypotheticals and also I don't believe in this kind of anecdotal evidence.

I think that the real root problem is that they didn't break down the code into logical components and didn't test them correctly - That was the real problem, not JavaScript.

When you look at reports of bug density across large samples of projects, it's clear that TypeScript does not solve any problems. See [https://medium.com/javascript-scene/the-shocking-secret- abou...](https://medium.com/javascript-scene/the-shocking-secret-about-static- types-514d39bf30a3)

<comment><USER18> > I don't buy these hypotheticals and also I don't believe in this kind of > anecdotal evidence.

The only anecdotal evidence I've linked is Stripe's experience with Sorbet. The paper linked is an actual scientific analysis with great study design. I couldn't find the Airbnb slides or talk but an engineer involved claims the study was carefully designed[1].

> When you look at reports of bug density across large samples of projects, > it's clear that TypeScript does not solve any problems. See > [https://medium.com/javascript-scene/the-shocking-secret- > abou...](https://medium.com/javascript-scene/the-shocking-secret-abou..).

Go read the "study" referenced in that article. It's just blog post with a terrible methodology. It's basically

(number of issues with bug label) / (lines of code)

The author doesn't even normalize for LOC (larger codebases tend to have more bugs) or take into account project complexity.

[1]: [https://twitter.com/swyx/status/1094857103863209985](https://twitter.com/swyx/status/1094857103863209985)

EDIT: add disclaimer about airbnb talk

<comment><USER19> I would love to read the Airbnb study. Do you have a reference ?

The other study you referred to sponsored by Microsoft is very vague on the methods used to conduct the experiment. So its not repeatable. You can't say something is scientifically true unless the results are repeatable.</comment></comment></comment></comment></comment>


Nintendo starts going after playthrough videos on YouTube - <AUTHOR> http://www.gamefront.com/nintendo-flexing-copyright-clout-on-youtube-lets-play-channels/

<comment><USER2> _> Based on Nintendo's statement to Game Front (below), it would appear they are not opting to block videos from playing outright, but rather monetize videos over a certain length with their own ads._

How does this work? Does YouTube just starting cutting Nintendo the ad check that the creator would have received, does it give Nintendo the option to run their own ads or something else?

In any case, this seems awfully short-sighted on Nintendo's part. I don't buy many games anymore, but when do I always watch an LP video beforehand. If I can't find a solid video, the chance I'll buy the game goes down dramatically.

</comment><comment><AUTHOR> Is a playthrough video most like...

* A bootleg recording of a movie?

* A recording of your friend performing a copyrighted monologue?

* A video of your friend doing stunts in a skatepark?

</comment><comment><USER3> I guess my issue with this is dependent on how the LP videos are done. I've seen boring LP videos where they just play the game. However, there are things like Game Grumps that I typically watch more for their reactions and commentaries moreso than the actual games they are playing.</comment>


Ask HN: Advice on client negotiation / process? - <AUTHOR>

I am part of a small company (< 10 people) that does bespoke software development.  We're having an internal discussion on how best to work with our clients.
In some cases we have a lot of success with an agile approach, involving the client in the development process, allowing them to change requirements, releasing often, and generally getting strong "buy in".  Typically, these clients are happy with what we do, and understand "where the money went".
But we have problems with other clients - either they want to micromanage technical details, or demand compliance with contracts after we've spent time accommodating their changing requirements in other areas.
So I was tasked with finding possible resources that might help us deal with the more challenging clients.  Unfortunately it's not clear what the problem is.  Are we negotiating poorly?  Or failing to involve them in the process?  Or failing to adapt our process to what they want?
Any advice, or pointers to possible resources, would be appreciated...  I realise the above isn't much to go on, so perhaps a good answer would teach us how to fish - how to go about diagnosing our problems better (rather than giving a simple solution as a fish - please forgive the tortured analogy). <comment><USER2> Fire the difficult clients. That is, finish your current project as best you can and don't take on new work with them.

There are a lot of good clients out there hungry for good work and working relationships--don't spend more time with bad clients than you have to.

<comment><AUTHOR> that's tempting (well, in some ways - there have also been good times, with these people, they're not monsters...), but we're in a fairly small niche. maybe we need to expand. in which case, i guess maybe we're looking for resources on how to shift into other areas of development, get new clients, etc?

<comment><USER2> I would look at characteristics of the clients you like working with and see if you can find other clients like them.

Are they technical? Non technical? Focused on a certain aspect of the niche? What kinds of problems do they have?

Anything that will act as a filter so you take work from clients that have a high chance of being good ones.

As far as expanding to other areas of development, if there are adjacent areas available (for example, using CakePHP if you are already using Symphony, or trying Alfresco if you already do Documentum) it might make sense to investigate and do a trial project in them.

Looking at your profile, it looks like you do interesting stuff. Not sure what industries you target (because it isn't outlined on your site), but you could definitely evaluate industries that have 'hard problems' (and money--don't forget the money).</comment></comment></comment>


Ask HN: Is there a way to filter HN comments? - <AUTHOR>

HN has gotten really popular.  There are many threads with 50 or even 100+ comments on them.  I don't have time to read them all.  Does anyone know of a Chrome plugin or something that will somehow highlight the best comments?  I'm sure there are many good ones that happen to be buried in a less visible spot in the comment tree.  I can imagine some tool that does some natural language processing magic to make a guess about a comment's quality. <comment><USER2> I believe comments are sorted by some sort of algorithm that takes up-votes into account, so theoretically the best comments are already at the top.

There are many alternative HN clients that might do what you want. Here are some:

1\. [http://hn.premii.com](http://hn.premii.com)

2\. [http://hckrnews.com](http://hckrnews.com)

3\. [https://chrome.google.com/webstore/detail/hacker-news- ux/chn...](https://chrome.google.com/webstore/detail/hacker-news- ux/chngbdmhgakoomomnnhfapkpbalpmhid)

4\. [http://cheeaun.github.io/hackerweb](http://cheeaun.github.io/hackerweb)</comment>


How Individual Traders Can Benefit from Teamwork - <AUTHOR> http://traderfeed.blogspot.com.co/2017/10/how-individual-traders-can-benefit-from.html <comment><AUTHOR> I think this is the reason Microsoft can wait a few years before attacking the mobile phone market again. The new mobile phones will support an average desktop user experience. Not saying that Microsoft will execute this well but the Surface was a success.</comment>


Django 1.6 released - <AUTHOR> https://www.djangoproject.com/download/

<comment><USER2> Django is one of my favorite open-source projects. I owe the project a lot.

Years ago, when I was a Microsoft-only shill (yeah, I'll say it), I knew how to build almost anything as long as something from Microsoft was under the covers. I was proud of my abilities, and in spite of the anti-MS crowd, I stood up for my platform and was a good developer.

In 2006, I had a short two-week break from my startup job, and my wife & kids were traveling to their grandparents' house at the same time. I had 336 consecutive hours to spend as I wanted, something I hadn't been able to do in many years. I decided I wanted to work on a little side project, something I could complete within those two weeks.

I made a decision to break out of my comfort zone. I knew a little about Linux, nothing about Apache, zero about Python, and had never worked with Mysql. I came up with an idea for a simple little CRUD application, just a utility site. It was something I knew I could build in maybe two or three days using Microsoft tools.

So, I searched around and found Django. I downloaded v0.9x (it was sometime in the summer, can't recall what it was specifically. I know it was pre-v1.)

And I started from the beginning, purely a newb. It was a position I wasn't accustomed to, so I immediately felt a lack of boundaries and sense of control. But the Django documentation was really good, and I soon gained an understanding of everything I needed to learn -- Python, running Apache, configuring Django, wiring up Mysql. I stayed focused and in one week, I had written my ridiculously simple CRUD app.

But the value I got out of it was how well the project pulled me in to becoming productive on a platform that I'd never used. Not only that, there was the help in the discussion groups from the community. It was a lot of fun, and I could recognize myself becoming a better developer.

The biggest realization came when I compared my Django project to an equivalent built on Microsoft tools. It wasn't a comparison of one-week vs. two-days, but rather one-week _coming from square 1_. All this led me to rethink my thoughts around my Microsoft background. I didn't become a convert per se, but it made me realize there are so many other ways of solving problems and other systems on which to build applications. And, after feeling productive, it made it easier for me to explore other (non-Microsoft) technologies. The feeling of being productive in multiple environments was so empowering.

I'm not sentimental about software, but the Django project is kind of that kid who can do no wrong in my eyes, due to my formative experience with it.

<comment><USER3> I'm quite interested in your experiences with Django, as I'm somewhat in the same boat. I'm a .NET developer, and while I love C#, am a fan of strongly- typed languages, and am quite fond of the .NET framework I have a soft spot for Python and especially Django.

Similarly, I had a few days and decided to go out of my comfort zone. A few days later I had written a blog script and had modified it to work with Google App Engine.

Do you use Python/Django in a professional setting now? If so, how did you find the full-time conversion?

<comment><USER2> You're in the _exact_ same spot I was. C# developer, completely enthralled with strongly-typed languages and OO development.

I definitely use Python professionally (and some Django, but that's not the critical stuff.) It's not the only thing I do, but it's another arrow in my quiver. It's really useful for generating applications that need to do a lot of stuff, but benefit from brevity in code. Django is actually more responsible for me learning Python and how to use it responsibly in a production environment. I knew how to write services in C# and Java that wouldn't be an administrative nightmare or cause pagers to go off at odd hours, so I needed to learn that with Python (turns out, it's not hard.)

As always, your mileage may vary. Nonetheless, lean toward finding a use for it in your operation, if only for experience. It's super practical, and to minimize transitional familiarity, go with IronPython. Works with all the VS IDEs.

<comment><USER3> One of my big reasons for wanting to pick up Python was to get me out of developing on Windows. As much as people love to tout Mono, it's simply not desirable for any .NET shop.

My biggest worry was if I was offered a job at a great company, how I would be able to adapt not to the language, but going from an entirely different platform, one that I hadn't used in anger since uni. Learning a language shouldn't be a problem, but as I've found out, most of my issues aren't in using the language itself, but adjusting to the Unix workflow.

Also, my big worry is being the "Windows guy" at an office. I doubt I'm the first C# developer to be laughed at because I develop on Windows, even if it's by (in my opinion) fairly crappy developers. Deep down, I reckon a lot of devs look down on people that have the audacity to call themselves developers when they don't build on Linux.

So, I guess my next two questions are:

1\. Did you notice a decrease in "professional level" when you moved from C# to Python. I'm a mid-weight developer, probably not too far off from being a senior developer. With very limited Python experience I doubt I'd be able to just jump over to being a mid-level developer, and to be honest I wouldn't want to drop in salary by too much just so I can use a different language.

2\. How easy was it to land a job writing Python if you've not come with "previous professional experience"? I've written a bit of Python, simply to script some things on a Windows server. I've got my own scripts, but nothing in an actual job. I reckon I could pick it up (Python/Django), along with a good dev workflow in Linux, within a few months, but I can see employers being skeptical to hire a C# dev if another Python dev wants the job.

<comment><USER2> Actually, I find a lot of developers who don't care for Windows who very much like C#.

To your questions:

1) Professional level decrease? Not hardly. If anything, I found strong professionalism in Python. "Pythonistas" are huge in principles such as DRY, which isn't about something terribly complex but rather keeping things simple and clean. It's about being organizationally effective and not coding one's self into a corner. The fact that the language seems so easy to work with shouldn't give the impression of it being simplistic.

2) I didn't land a job writing Python, it's just a tool to get things done. From a career standpoint, I don't want to be known as a {language/platform/thing} guy, I simply want to be known as an engineer. Tools, languages, platforms, services, etc. will come and go. As long as I recognize how to use those in combination to get things done efficiently, I'm doing my job.

</comment></comment></comment></comment></comment><comment><USER4> Looks like somebody jumped the gun when they saw the commits and uploads happening; the official release announcement went up only a few minutes ago, and is here:

[https://www.djangoproject.com/weblog/2013/nov/06/django-16-r...](https://www.djangoproject.com/weblog/2013/nov/06/django-16-released/)

The release notes are here:

[https://docs.djangoproject.com/en/1.6/releases/1.6/](https://docs.djangoproject.com/en/1.6/releases/1.6/)

Also: if you downloaded the package in the period between the parent link going up, and now, you might want to grab it again. The first roll of the 1.6 package (which wasn't announced, so we could do final checks first) failed to update our trove classifier, so the package was regenerated, which changed its signature and checksums.

<comment><USER5> Seems like a new release should be done? Isn't that what RC and pre releases are for?

Was the release uploaded to pypi or a download page? If so, that's released IMHO. eg, debian, various news outlets, and others auto scan download pages for new releases.

<comment><USER4> Well, what we do is generate everything, then share it privately and quickly amongst the core team for final review before flipping switches and making things public. One actually important part of this is verifying things like "the package I download from what will become the public release URL has checksums that match what's in the checksum file", so it does have to actually go up on our server for that.

And if we catch a minor packaging error at this point, it's easy enough to fix on the spot without having to do an entire new release.

Except in this case somebody got really eager, saw the release process starting, and posted a link to our downloads page (and I'm not entirely certain if it would have been possible to get the incorrect package from it), rather than waiting for and linking to the release announcement once we'd vetted and made everything public.

<comment><AUTHOR> That "somebody" would be me then. Sorry for any inconvenience this may have caused. I saw "Latest Release: 1.6" on the djangoproject.com home page, checked if it was on PyPI already (it was), did a "pip install Django" and got 1.6. These together to me seemed to be a pretty good sign that 1.6 was released.

Will wait for the official release announcement next time. Sorry again.

<comment><USER4> Next time around we'll probably do more to hide things up until the announcement (though of course we can't hide the commits on github, and the download URLs are predictable, so someone who sees the commits will be able to figure out where the release is going to live).

</comment></comment></comment></comment></comment><comment><USER6> The release notes can be found at [https://docs.djangoproject.com/en/1.6/releases/1.6/](https://docs.djangoproject.com/en/1.6/releases/1.6/)

Personally, I'm happy that Python 3 is now officially supported, though in practice I haven't had an issues with using Django 1.5 with Python 3.

<comment><USER7> How is library support? I didn't have any issues with django 1.5 itself, but many of my favorite libraries weren't ready yet.

<comment><USER8> Django Packages lists 160 apps that work with Python 3. See [https://www.djangopackages.com/python3/](https://www.djangopackages.com/python3/)

From personal experience, most of the critical ones are compatible.

<comment> kot-behemoth Well, apart from Fabric.

<comment><USER9> You may want to check out Invoke ([https://github.com/pyinvoke/invoke);](https://github.com/pyinvoke/invoke\);) it's the successor to Fabric, and it's Python 3 compatible.

<comment><USER10> For what I can see, Invoke is just a revamped version of Fabric's task running components. Fabric 2.0 will "leverage Invoke for task running, leaving Fabric itself much more library oriented".

</comment></comment></comment></comment></comment></comment><comment><USER11> The dedication to Malcolm Tredinnick was a very nice thing for the Django team to do. I didn't know of Malcolm or his passing before reading the release notes, but he seemed like a wonderful person who will be missed by many. Very sad that somebody like that is no longer with us. Reading his tweets I get the sense he was a really cool guy.

Really nice piece about Malcolm from his former boss: [https://plus.google.com/+errazudinishak/posts/6j6iAMhNfnb](https://plus.google.com/+errazudinishak/posts/6j6iAMhNfnb)

Congrats to the Django team on releasing 1.6, I'm looking forward to upgrading soon!

</comment><comment><USER12> One of the reasons I like Django so much is because of the community. This might seem rather meta but the comments in this thread are generally positive. Most Django users I know are well aware of its limitations and don't try to sugarcoat it if Django is not the right tool for the job. But overall I've found the community (and that of Python) pretty receptive.

<comment><USER13> What jobs is Django the right tool for?

</comment></comment><comment><USER14> The persistent connections that now exist within Django should give a quite but great performance boost for the vast majority of Django applications, which are not already running a connection pooler ([http://www.craigkerstiens.com/2013/03/07/Fixing-django-db- co...](http://www.craigkerstiens.com/2013/03/07/Fixing-django-db- connections/)). This alone can be reason enough to upgrade in addition to all the other improvements.

</comment><comment><USER15> For those who works with designers or html people who don't use the command line, how do you collaborate with them with Django?

For me it's a perpetual issue to get them up and running, commit/push with git, etc etc. Is there an easier solution? Basically, I'd like them to get started and be able to tweak the templates and css as effortless as possible.

It's kind of very hard to have people working directly in templates/css and others updating html/css and them diff the changes, integrate them, etc..

<comment><USER16> I don't use django, but one of the easiest ways to get designers and non technical folks working directly on projects is to run virtual machines with vagrant[0] and automate everything as much as possible.

[0] [http://vagrantup.com/](http://vagrantup.com/)

<comment><USER17> As someone with no experience with this, any resources you'd recommend on how to set this up?

<comment><USER18> [http://gettingstartedwithdjango.com/](http://gettingstartedwithdjango.com/)

Doing the first 2 lessons will not only get your a vagrant powered VM up and running, it will also give you a good feel for normal use. And you'll also be learning Django.

</comment></comment></comment></comment><comment><USER19> If you were starting a new project today, would you use development version 1.7 in order to get Django Migrations instead of using South?

<comment><USER20> I would recommend using 1.6 and South for now. 1.7 is at least nine months away, and who knows where the API will go in that time. You're probably better off developing a stable version of your project using 1.6/South, and then refactoring when 1.7 lands.

</comment></comment><comment><USER21> Yay. Major usability wart fixed: "ModelAdmin now preserves filters on the list view after creating, editing or deleting an object."

<comment><USER22> I was always opening an object link in a new tab and then going back and hitting refresh in the main tab with the admin listing. Guess I won't have to do that anymore.

</comment></comment><comment><USER23> 1.7 release will be very interesting. Instead of South there will be migrations support. At DjangoCon EU Andrew Godwin told about his vision of it. i.e. if you have 200 migrations you'll be able to merge them into 1.

Form fields will get extended support like input[type="email"]

Django comments are now deprecated.

Congratulations to everyone using Django!

</comment><comment><USER24> Dumb question: What does it mean that autocommit is now turned on? I no longer have to call mymodel.save()?

[https://docs.djangoproject.com/en/dev/releases/1.6/#improved...](https://docs.djangoproject.com/en/dev/releases/1.6/#improved- transaction-management)

</comment><comment><USER25> It's a small change yet I'm really happy with it.

> BooleanField no longer defaults to False

It caused quite a few headaches. Boolean can't have default.

<comment><USER26> > Boolean can't have default.

I don't see the problem.

<comment><USER27> __Warning: default was False previously so this example is backwards __

Think about this code:

        class Missile(models.Model):
            # we can only attack short countries
            target = models.CharField(max_length=7)
            should_launch = models.BooleanField()

            def launch(self):
                """
                pass launches the missile
                """
                pass

You recently added a new missile: # add new missile in case we have to attack Merica # it won't be launched until we set should_launch to True Missile.objects.create(target="Merica")

Then you have a view:

        /missile/launch_missiles

with the code:

        for missile in Missile.objects.filter(should_launch=True):
            missile.launch()

You'll have the unexpected behavior of launching that missile you just added. With the new behavior your missile wouldn't be launched until you told it to. Basically this update has everything to do with the missile above failing this conditional:

        missile.should_launch is True

Since 'None is not True and None is not False', it is a sensible default for Booleans.

<comment><USER26> Two problems here:

One not only is the example backwards, but given the previous behavior, the correct thing would have occurred. This is a complete nitpick but whatever.

More importantly, this shows a lack of understanding about the framework being used, not an issue with the framework. The example has a programmer basically assuming the default is False when it was True, or more correctly that the default was not True. That is an issue with the programmer (and testing) not with the framework, unless it was undocumented. Django is documented quite well. The programmer here assumed something worked one way that was clearly documented to work the other.

Booleans defaulting to False is not unusual, but not universal either. Django has chosen to go the path of explicitness, which is a fine choice to make, as opposed to defaulting to False which is often considered to be a safe choice. I don't see a problem with not assigning a default, but I also don't see a problem with the default being False.

Defaulting to NULL could cause other problems, at least for the programmer above who didn't read documentation and worked on assumption.

<comment><USER25> Things should make sense without reading documentation (I'm not saying that you don't need to read it) and boolean having a default doesn't make any sense. Argument about it having a default value in other frameworks isn't a real argument either.

</comment></comment></comment></comment></comment><comment><USER21> django-vanilla-views in core for 1.7 please. ;-)

<comment><USER28> Thirded! This is a better implementation for a framework. CBGV as-is would be better as an add-on app.

This is a great example why framework projects could benefit from being a bit more democratic. Most people seem to be pulling their hair out, telling you something is too complicated to effectively use. The response: It's worth it once you learn. The complexity cost is worth it. Trust us. Read the docs (of course), use this 3rd party site (ok...), read the code. (so I can write a non-trivial view!?). If you are still giving that answer years later, you have to be open to the fact that that your users might be on to something.

Often when you hear someone say they're using CBGV on a large project, you can almost sense the pause for applause.

<comment><USER4> I use the class-based generic views in a couple of projects. My personal opinion is that the official documentation still needs work, because people end up in the API reference tree looking for the examples and explanations.

And that is not a happy place to end up when you're just starting out with them, since in there you're seeing the whole inheritance/mixin layout structure, which is what leads to the belief that it's too complicated to use.

Which... no, class-based generics are pretty darned easy. Here are the views for my blog app, for example:

[https://github.com/ubernostrum/blog/blob/master/blog/views.p...](https://github.com/ubernostrum/blog/blob/master/blog/views.py)

It'd be nice to cut down the use of super(), but that's about the only issue I have with it. All of the simpler-CBV implementations I've seen make a few too many assumptions for my personal taste, or otherwise cut down on flexibility in favor of simplifying the inheritance diagram, which I don't agree with as a goal in itself.

<comment><USER29> Worth noting that it's an explicit aim of vanilla views to _exactly_ replicate the functionality of Django's GCBVs.

For the docs: "If you believe you've found some behaviour in Django's generic class-based views that can't also be trivially achieved in django-vanilla- views, then please open a ticket, and we'll treat it as a bug."

You shouldn't be losing any flexibility by using it instead of using Django's existing GCBV implementation.

</comment></comment></comment></comment><comment><USER30> Thanks for another great release! Also big thumbs up for a shorter release cycle than usual.

</comment><comment><USER31> Is it only me or it's not easy to discover what's new / changed / release notes from this page? Is there a secret link I'm missing?

<comment><USER4> The person who posted this apparently saw the version-bump commits and jumped the gun, posting a link to just our download page before we even had the release announcement out.

The announcement and release notes both have the information you want:

[https://www.djangoproject.com/weblog/2013/nov/06/django-16-r...](https://www.djangoproject.com/weblog/2013/nov/06/django-16-released/)

[https://docs.djangoproject.com/en/1.6/releases/1.6/](https://docs.djangoproject.com/en/1.6/releases/1.6/)

</comment></comment><comment><USER32> are there any particular performance improvements over the previous versions ?

I was thinking basically of transaction management, especially the autocommit behavior.

I browsed through the docs and saw that the default python database API requires autocommit to be turned off... but then again django overrides this behavior.

any comments on this ? (or am I completely lost ?)...

<comment><USER33> > Improved transaction management¶

> Django's transaction management was overhauled. Database-level autocommit is > now turned on by default. This makes transaction handling more explicit and > should improve performance. The existing APIs were deprecated, and new APIs > were introduced, as described in the transaction management docs.

> Please review carefully the list of known backwards-incompatibilities to > determine if you need to make changes in your code.

> Persistent database connections¶

> Django now supports reusing the same database connection for several > requests. This avoids the overhead of re-establishing a connection at the > beginning of each request. For backwards compatibility, this feature is > disabled by default. See Persistent connections for details.

<comment><USER34> It's hard to imagine using an ORM for anything high volume that just got around to adding (still very limited) connection pooling. I'd tend to think anyone overly concerned with performance would use SQLAlchemy, if they use any ORM at all.

<comment><USER26> > I'd tend to think anyone overly concerned with performance would use > SQLAlchemy, if they use any ORM at all.

Or they did connection pooling outside the development framework.

<comment><USER35> right tool for the job. Djangoś ORM is great for simple stuff. And it works with the admin interface (which is worth a lot). If You need something complex enough, use raw SQL.

The admin was too much to give up to swap the ORM to SQLAlchemy for me.

</comment></comment></comment></comment></comment><comment><USER36> It's amazing to see how far along Django has come. Anyone remember when Django first came out? Good times :)

<comment><USER22> Yeap, it was early 2006 for me, in the pre- 0.96 days. I came to Django from Zope, that seems so long ago.

</comment></comment><comment><USER37> A lot of small but very nice improvements, yay! [https://docs.djangoproject.com/en/1.6/releases/1.6/#minor- fe...](https://docs.djangoproject.com/en/1.6/releases/1.6/#minor-features)

</comment><comment><USER38> I really need this update! Other than the good stuff already mentioned, The DecimalField finally supports a comma as the separator.

</comment><comment><USER39> [https://dashboard.djangoproject.com/](https://dashboard.djangoproject.com/)

</comment><comment><USER40> No database migrations in 1.6 .Disappointed</comment>


Terminal scrollback written to local disk, including remote ssh sessions. - <AUTHOR> http://www.climagic.org/bugreports/libvte-scrollback-written-to-disk.html

<comment><USER2> This looks to be a serious issue.

The video link that was provided in the explanation does a very good job of illustrating the problem.

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

My heart jumped when he ran _strings_ on the temp file system and the contents of his scrollback from the SSH session were shown.

I guess I had always assumed that stuff wasn't going to be written to any local disk in any way.

</comment><comment><USER3> This sounds like a serious issue if you're using programs such as apg to generate and print random passwords/passphrases to the terminal. Especially if you use them as encryption keys. The keys might well linger around in plaintext on your disk.

</comment><comment><USER4> This is why full disk encryption is useful (as opposed to, say, just encrypting /home). Unexpected data leaks will often remain encrypted.

Edit: added "often"

<comment><USER5> I agree with you but to be precise full disk encryption does not provide any benefit that is not met by encrypting user writeable mounts. Encrypting /usr, /bin, /lib etc does nothing in this situation.

<comment><USER6> Full disk encryption provides some level of protection against backdooring.

<comment><USER5> Under what threat model? (Backdooring is also beyond the scope of the initial doiscussion)

</comment></comment></comment></comment><comment><USER7> If you have an encrypted home directory but not encrypted tmp (though you should!) then you can set the TMP environment variable to ~/tmp (and create a tmp dir in your home dir) and libvte will write to there instead (confirmed with gnome-terminal).

<comment><USER3> Encrypted /tmp and swap partitions (with random keys, generated at each bootup and stored only in memory) seems like a good precaution in any case.

<comment><USER8> Or just encrypt the whole LVM and create partitions on top of that.

<comment><USER3> Right, that's also possible, but I like the new key every boot as it gives forward security. Even if the key for the whole image is cracked (which is easier to bruteforce than a completely random key as it is usually human- memorizable), it will not be possible to access the swapfile/temp contents.

</comment></comment></comment></comment><comment><USER9> So this is why pasting to gnome-terminal takes a year and a day!

<comment><USER10> No, actually it's not. That's a different issue.

<comment><USER9> Link?

</comment></comment></comment><comment><USER11> As a developer of a Vte terminal for elementary OS, this comes as another reminder that Vte is really bad. Firstly, I was really angry with the fact that it couldn't search for "hello" in the same line. For example, it would only find the first instance of "hello" in a line, and then skip to the next one in a different line.

Now this security issue, it's very dangerous and causes many issues.

Thanks a lot for warning me, I probably will stop using Vte, I've just been recommended TermKit and others, time to check those out!

</comment><comment><USER12> While it's nice that someone is raising this genuine security issue, for most people the bigger issue is going to be unencrypted swap.

Unencrypted swap means ANY sensitive data in memory may well end up on disk (including a term buffer that has been carefully kept away from /tmp by the emulator author!).

Surprisingly, many Linux distros, including Ubuntu, do NOT encrypt swap by default. That's probably something that should be higher priority than this specific (Linux platform specific) bug, IMHO.

OS X, for what it's worth, DOES use secure swap by default starting with Snow Leopard ([http://docs.info.apple.com/article.html?path=Mac/10.7/en/mh1...](http://docs.info.apple.com/article.html?path=Mac/10.7/en/mh11852.html)). In prior releases, turning it on is a single checkbox. (There is at least one Google hit saying it was off by default in 10.6, but that's not the case, it was off in 10.5.)

</comment><comment><USER13> FWIW, I've also seen this cause the terminal to freeze for seconds at a time when there's heavy write contention to a slow SSD.

</comment><comment><USER14> If people have permissions that allow them to look at the content of your unlinked files, you're pretty much hosed already.

<comment><USER15> I think the major attack vector for this is lost/stolen laptops and recycled disks.

<comment><USER14> I'd be just at least as worried about data sitting in named files (not to mention swap). If you're worried about lost/stolen laptops, encrypt the disk.

</comment></comment></comment><comment><USER16> It sounds like complaining about "cache" in a browser. Storing scrollback in memory can also store it on disk when swapped.

<comment><USER17> I'd hope that we all know about mlock() by now <http://linux.die.net/man/2/mlock>

</comment></comment><comment><USER18> If the author really wants this on disk, would application-level encryption of the files it is writing to /tmp be overkill?

The standard trick with encrypted swap on Linux is to pull an encryption key out of /dev/urandom on boot and never store it anywhere. I suspect libVTE could do something similar without a lot of code, though it would be a bit strange for a terminal emulator to depend on crypto libraries.

<comment><USER10> Yes, that's what I want to do. My main goal redesigning the buffer was to 1) fix memory fragmentation, 2) make unlimited scrollback possible. I offered to find some time on a weekend to add a caching layer, a compression layer, and an encryption layer. But the author of that report was more interested in getting publicity I guess, so ignored my offer and made it look like I said I won't fix this. Well, NOW it's harder to justify taking time off my personal life to work on this...

</comment></comment><comment><USER19> Is there any particular reason people don't use plain old xterm. I know that it does not provide tabs, but other than that what are the problems that people face when using xterm. I have had utf8 support, zoom and copy paste working on it forever.

<comment><USER20> I ignored xterm because the defaults were ugly. Then I figured out how to use a nice font at a reasonable size and added tmux, and I haven't looked back.

</comment></comment><comment><USER21> So if the data is only present in the free space of the disk, sfill (in the secure-delete package in Ubuntu) should remove this data right?

Might be a good idea to set up a once-a-week cronjob that does this in any case.

</comment><comment><USER22> Another good reason to have /tmp as a tmpfs, I guess.

</comment><comment><USER23> ⌘K in the Terminal.app will clear the scrollback of the current window.

<comment><USER23> In OS X Lion your scrollback is maintained between subsequent launches of the Terminal, especially noticeable between reboots when "Reopen windows when logging back in" is ticked. I mentioned this because a very similar issue, see: [http://superuser.com/questions/315174/how-to-open-a-clean- te...](http://superuser.com/questions/315174/how-to-open-a-clean-terminal-in- mac-os-x-lion).</comment></comment>


Researchers Probe Whether, Why, 'Free Will' Exists - <AUTHOR> http://www.huffingtonpost.com/2010/04/27/researchers-probe-whether_n_552628.html

<comment><USER2> Any attempts to "prove" free-will is circular non-sense. FW is presupposed by the concepts "proof", "knowledge" and (human) "consciousness" and even "researchers". Attempts to prove it are in fact a denial of it. They should save their money and read the works of Ayn Rand.</comment>


Ask HN: Join this Python or that Java shop - <AUTHOR>

I am a college grad and I have two job offers. I asked each to kindly estimate how they perform on the Spolsky 12-points-plan to better code (http://goo.gl/RlRV).
Here the summaries of the replies:
Company #1 - Legacy ERP company that uses Python,Flask, MongoDB and Elasticsearch to produce webshops and other web-CRUD apps that can be sold to the customers.
- Team-size: Two guys.
- Source control?
  yes (Git)
- Make a build in one step?
  yes (Gulp.js as build-tool)
- Make daily builds?
  yes (Gulp.js)
- Have a bug database?
  yes (Countersoft Gemini)
- Fix bugs before writing new code?
  not always
- Have an up-to-date schedule?
  no (we want to be agile)
- Have a spec?
  no (room for improvement)
- Do programmers have quiet work conditions?
  not always (big office, not always)
- Best tools money can buy?
  yes (but "best" is subjective)
- You have testers?
  no (no dedicated testers, each developer tests)
- Do you do hallway usability testing?
  no (room for improvement)
Company #2 - Also, company that exists for 30 years. Builds Health-related Java/J2EE apps.
Continuous Integration is planned with the following tools:
- Eclipse
- Confluence as documentation.
- JIRA als Bug-Tracking and Sprint plan tool. - Stash (Git) as code-repository - Bamboo as CI server - Maven as build tool - Omnis Studio (Tiger Logic), planned change to Java.
- Scrum & agile since two years - Requirement Engineering should be stronger part of the process.
- Selenium should be added soon. - Five devs, one tester, and three "Auszubildende" (that is a German thing for people who don't want to go to college and get a practical training).
I am interested more in Python since I could use these skills to build personal stuff. However, just from the description, the Java shop appears to be "more professional", having plans for Continuous Integration, and having dedicated testers etc. <comment><USER2> This may make the choice easier or harder, but think about this: Do you want to walk into a place with all these processes, or do you want to help create those processes? If you want to have a strong influence on tool choices and workflow, go with the less formalized company. If you just want these to exist and use them, then do the larger shop.

A full set of formal processes is comforting, but it's also restraining - things won't change unless they hit some high level of pain.

From my personal perspective, I would go with the python shop (assuming they show interest in improving their methods). Because then I could run with that freedom and kick ass building those processes over time. I would learn a lot of technical tools but also develop skills in making tough choices and tradeoffs. It can be a good start to a career to show that much initiative. But that's just how I would choose. I happen to see informality as opportunity to accomplish things I care about. But it can also mean chaos and wasted effort.</comment>


Ask HN: How much money do I need to bootstrap my startup? - <AUTHOR> I intend to build an app, and I'm a developer with some business skill. Could you throw some numbers of what you think I'd need to save up in order to bootstrap my startup to the following stages:
1) Product Market Fit
2) Scaling
3) IPO <comment><USER2> There were 160 IPOs in 2017 larger than 50 million. The odds of you being the CEO of one of those companies is extremely low, unfortunately.

Your best bet is to build an app that your users love. If they pay you enough to pay your food and rent, then great! You can take it from there.</comment>


Patents are about to become a bigger problem - <AUTHOR> http://ownlocal.com/newspaper-support-group/patents-are-about-to-become-a-bigger-problem/

<comment><USER3> The author is deeply confused. This part is simply incorrect:

       See, "First to File" doesn't require that you build
       anything at all, that you have an intention to build
       something, or that you're getting a patent on something
       that hasn't, you know, already been invented by someone
       who couldn't afford the patent.

First to file makes no changes to any of that. It all remains exactly the same as it was under first to invent.

All that first to file changes is what happens when two (or more) separate inventors, who meet all of the statutory requirements for patentability (e.g., novelty, utility, non-obviousnous, reduction to practice and enablement), both file for patents.

Under first to invent, you try to figure out when each inventor actually started working on reducing the invention to practice (just having the idea is not enough). You find the earliest time T such that the inventor was working diligently on reduction to practice between T and the time of the patent application. T is that inventors invention date. Lowest date wins.

Under first to file, you look at the date on the application. Lowest date wins.

First to invent is problematic because it comes down to comparing two or more vague dates, and there can be a lot of subjectivity involved, such as deciding whether or not an inventor was working diligently or not toward reduction to practice.

<comment><USER4> As the author, I do appreciate that someone thinks I'm confused, but this sentence is hardly the point of my argument. My point is that large corporations are at an even larger advantage with this system and that it hurts entrepreneurs. What has already been a tilted playing field will become even more so.

The key with "First to Invent" is that someone could demonstrate that they had invented something but not actually patented it previously. For instance, if you came up with a novel software process, didn't patent it, and went about your business, it should theoretically be harder for another company to come along and patent your work. Since our patent system is broken, it hasn't always (maybe usually) worked that way. With "First to File" all you need to do is be first to file. And at a mere $15k to $50k to file, this is an undue burden on startups who are inventing things. As the author, I do appreciate that someone thinks I'm confused, but this sentence is hardly the point of my argument. My point is that large corporations are at an even larger advantage with this system and that it hurts entrepreneurs. What has already been a tilted playing field will become even more so.

The key with "First to Invent" is that someone could demonstrate that they had invented something but not actually patented it previously. For instance, if you came up with a novel software process, didn't patent it, and went about your business, it should theoretically be harder for another company to come along and patent your work. Since our patent system is broken, it hasn't always (maybe usually) worked that way. With "First to File" all you need to do is be first to file. And at a mere $15k to $50k to file, this is an undue burden on startups who are inventing things.

edit: Because some people clearly don't want to understand the point here, there are several steps (lawyers, patent searches, etc.) that cost you money before you can file. This is included in the $15k to $50k I'm talking about.

<comment><USER5> >For instance, if you came up with a novel software process, didn't patent it, and went about your business, it should theoretically be harder for another company to come along and patent your work. Since our patent system is broken, it hasn't always (maybe usually) worked that way. With "First to File" all you need to do is be first to file. And at a mere $15k to $50k to file, this is an undue burden on startups who are inventing things.

Did you publish it? Was it put out into the public space? If so, it's prior art, and evidence that the patent should be invalid. This HAS NOT CHANGED.

If I make a piece of software, put it out for sale, then someone files a patent after my software has been out in the open, the patent is not new and novel. It should be thrown out.

Again, like tzs said, this only applies if two inventors invent something simultaneously. Under First to Invent, each inventor needs to prove that they thought of the invention before the other. Under first to file, the patent is granted to whoever patents it first.

<comment><USER6> The problem also applies if one inventor invents something, then another individual gains access to it before the inventor distributes it publicly, and files a patent on it.

But in the more general case, I find it difficult to believe that the notion of Prior Art is unaffected by the elimination of first-to-invent. Under the new rules, if the PTO considers two patents determined to cover the same invention, they will accept the one filed first and decline the one filed later, even if the first-filed invention was invented at a later date. If a patent lawsuit can reverse this decision by finding prior art, then how can these be reconciled?

Maybe the idea is simply to shift the burden of determining the earliest invention date from the PTO before the patent is filed to the courts after the fact?

<comment><USER5> >The problem also applies if one inventor invents something, then another individual gains access to it before the inventor distributes it publicly, and files a patent on it.

No. This would be fraud(because the "inventor" that filed didn't actually invent the thing) or could be theft of trade secrets(if an NDA is involved). Both of which are covered under US law.

>But in the more general case, I find it difficult to believe that the notion of Prior Art is unaffected by the elimination of first-to-invent. Under the new rules, if the PTO considers two patents determined to cover the same invention, they will accept the one filed first and decline the one filed later, even if the first-filed invention was invented at a later date. If a patent lawsuit can reverse this decision by finding prior art, then how can these be reconciled?

If there is clear prior art before either were filed, then the patent would be nullfiied in either a First to File or First to Invent scenario.

I think that you're confusing prior art and what first to file/invent means.

First to File and First to Invent means that if two people file for an identical patent, the patent is granted based on either the filing date or the invention date. The only time that First to File applies is when two independent inventors file for the same patent in the same timeframe. Ovbiously, one cannot try to patent an idea after the patent has been accepted, even if they did invent first.

Prior art applies to all patents, based on the date of the filing of the patents. If I try to patent something that someone else is selling, like a mousetrap design, then it should get thrown out, no matter when I actually invented it, because it's already in production by someone else.

</comment></comment></comment></comment></comment><comment><USER7> Entities like China that are less than assiduous in respecting patents are going to benefit enormously from the hobbling effect of U.S. patent litigation. I don't think it's a complete counterbalance to the lack of free information flow which generates opportunity for corruption, but we really shouldn't do this to ourselves.

</comment><comment><USER8> I don't see how this isn't a bigger issue or hasn't been brought to light. As I understand it, large corporations (or anyone with the money, really) can simply file patents for future products they predict will come to market and then sue startups and entrepreneurs when they create the actual product.

Someone please tell me I'm misunderstanding this.

<comment><USER9> In theory, a patent is supposed to be specific enough that the patent itself accurately describes the object, to the extent that a reasonably knowledgeable person could actually manufacture the object using only the patent as a blueprint. In other words, you would not be able to write the patent application unless you had actually invented the object in question, because otherwise you wouldn't know how to describe the theoretical object well enough for a person to manufacture it. Therefore you cannot patent imaginary future inventions.

In practice, this rule is effective only to the extent that the Patent Office enforces it.

<comment><USER10> Building on that, I pose a question. Has anyone here ever used a software patent as a reference to help solve a problem?

<comment><USER11> Software, no. Hardware, fairly often.

</comment></comment></comment></comment><comment><USER6> On the plus side, it seems like only a small matter of time before this obviously broken system collapses under its own weight, and we're forced to do something slightly more sane instead.

Once the ensuing tidal wave of patent applications is upon us, the USPTO will have no choice but to drastically lower their (already depressingly low) standards for patent acceptance due to lack of resources available to check them, and the growing portion of corporate profits evaporating to legal costs will put pressure on some actual patent reform.

Personally, I am angered that inventors will lose a recourse to challenge individuals who file patents on their previous inventions, and I in no way condone breaking the system for honest businessmen in order to make a case for fixing it, but at least I can take some solace in the fact that it will be a quick demise, unless I'm missing something.

<comment><USER12> > Once the ensuing tidal wave of patent applications is upon us, the USPTO > will have no choice but to drastically lower their (already depressingly > low) standards for patent acceptance

Or, you know, the backlog could just get bigger.

</comment></comment><comment><USER13> Now if they would combine expiration date with file date we'd be done.

The reasoning is fairly simple, patents expire and the idea becomes public domain, that is why, starting in 2015 as the great patent binge of late 90's starts expiring, through 2025, all of that 'crap' that you see as being patented will become public domain. Unlike copyright there will be no restriction on you using it. (like you can write your own RSA encryption code now without fear of being sued)

Also during that time there has been some progress made on getting better examiners into the office since we're starting to see examiners who actually used computers in high school versus the ones in 1995 who had just heard about them and never actually used one.

So you file as soon as you can, and if its a spurious filing you have exactly 20 years (if we could have them expire on file+20) to make the product work and to ship it with patent protection. Alternatively, we go back to a requirement that the invention must have an exemplar which the PTO can examine with the application. That however was originally eliminated because it was slowing everything down. (although some of the model work is simply stunning, check out the museum some time).

In the mean time I'm gonna watch all my old Star Trek episodes and file patents on all that stuff :-)

</comment><comment><USER14> I think we have generally mixed up "value" and "cost".

Patents are (or should be?) a legal construct providing a temporary monopoly on an invention to incentivize investment into (costly) research. I.e. protect the "cost" of an invention.

Cost, however, is not necessarily directly related to value.

Patents (imho) should not protect "value". If you have a great idea one morning, that might indeed be very valuable. But you would have had that idea regardless of whether its patentable or not, and society as a whole is not better served by granting monopolies on such ideas. Instead the market decides who builds the best product. Other IP protections such as Copyright are still crucial for this obviously.

In the end I think that (case) law usually reflects general trends in society. This is not a society of altruism (anymore) but a society of the mantra "take the money and run". Once or if that changes the law will eventually match that.

One way out of this mess is to document, publicly, every idea - <USER2> insignificant it might be. That way there will be prior art to everything that is obvious.

</comment><comment><USER15> What is the state of patent law, especially regarding software patents, across the world? If patents really are going to be a murder on innovation, then the least broken system should enjoy an advantage, no?

<comment><USER4> Keep in mind that the standard for "First to File" is actually present in much of the rest of the world. Large US corporations have argued that this switch will make our companies more competitive. What's happened is that American companies see a unified global patent system eventually taking hold and they want to use their resource advantage to dominate a future marketplace. They're primarily concerned with establishing market leadership lock in. Innovation as a desired outcome for the advancement of mankind couldn't be further from their thought process.

</comment></comment><comment><USER16> I've often wondered what's the commercial and political mechanism that controls patent legislation and the lifetime of a patent. I mean, we're still at a mere 17 years with patents but Mickey Mouse is at roughly 95 years by now. Why is it worth lobbying for copyright extensions but not patent lifetime extensions?

<comment><USER17> Just a guess, but doing what you describe to patent law would seriously and obviously harm the economy and isn't politically feasible, whereas insane copyright terms just give the assholes at Disney a license to print money, some of which finds its way back to the very corrupt bastards who extended the term in the first place.

Put another way, copyright as it is currently conceived degrades the creative space, but it isn't directly taking food out of people's mouths (it is, but in a less obvious way, and no one gives a shit about artists anyway).

<comment><USER16> I could imagine that myself, too.

It also means _everyone_ knows patents are bullshit and collectively the companies don't want any of it but since we've got it established already and it's really hard to shut down the companies know they need to play ball yet do nothing in favor of patents.

</comment></comment></comment><comment><USER18> > America's most quintessential inventor did without them and thought they > were foolish.

Right, but he also didn't care about selling his inventions to feed his family, having other sources of income. It's easy to give away something you don't need.

<comment><USER7> That might not be true: [http://www.portfolio.com/news-markets/national- news/portfoli...](http://www.portfolio.com/news-markets/national- news/portfolio/2008/02/19/Poor-Give-More-to-Charity/)

</comment></comment><comment><USER19> It's hard to have a lot of hope for the United States.

<comment><USER12> If it makes you feel any better, this article really misunderstands a lot of things.</comment></comment>