TypeScript support in Electron - <AUTHOR> https://electron.atom.io/blog/2017/06/01/typescript <comment><USER2> Flowtype is seeming more and more like the Mercurial to Typescript's git.

(That is, in terms of inertia, it seems like the community has decided on a winner)

<comment><USER3> And for good reasons.

flow started as "the better one of the two in theory" with better ideas, more strictness, way more expresiveness in its type system. But typescript took all these ideas, listened to the community and bridged the gap in features really fast, together with more stability, thus making flow pretty much obsolete.

typescript is way more stable. I can take a nightly or RC version of typescript and I know it's going to work better than flow which I tried several times and always let me down. If you don't trust a type system, it's hard to justify using it at all, apart from the documentation it provides to other devs.

These projects are complex, and I think only the typescript team invested enough to make it truly work.

<comment><USER4> > _If you don 't trust a type system, it's hard to justify using it at all, > apart from the documentation it provides to other devs._

100% agree, although I have to wonder, why don't you see that Typescript is NOT a type system you can depend on.

Fact of the matter is that Typescript has serious soundness issues and will always have. Those problems haven't disappeared.

What this translates to in practice is that Typescript annotations are little more than documentation. And it simply doesn't compare with any sane static language where the first line of defense is the compiler.

<comment><USER5> What is the practical benefit of soundness? I offer that soundness is a disease that makes programming languages far more complex than they have any right to be.

A static type system exists to prevent _some_ classes of bugs and enable code completion.

However whenever "soundness" becomes a design goal, it enevitably usurps everything else (because it is an objective binary goal) and leads to languages that cease to value other things like simplicity or directness.

A type system can never catch _all_ bugs and reliable programs ultimately depend on a human being understanding and verifying the code. The most important goal - if you value reliable programs - is that the code is intelligible to people.

<comment><USER4> Reading from the comments here, I believe that people don't realize how bad the unsoundness is in Typescript:

        class Dog { name: String }
        class Engine { name: String }

        function start(ref: Engine) {
          if (!(ref instanceof Engine))
            throw Error("oops")
        }

        // Typescript does not complain
        start(new Dog())

This sample is due to Typescript doing "structural typing". According to its rules, if Engine and Dog both have the "name" property, then they must have the same behaviour as well. This is also inconsistent with the behaviour of classes in Javascript (e.g. see the behaviour of `instanceof`).

The biggest problem is that generics are what they call "bivariant", which is lingo for "completely fucked up". Here's a classic gotcha that caught people by surprise with Java's array since forever:

        class Animal { isAnimal: Boolean = true }
        class Dog extends Animal { isDog: Boolean = true}
        class Cat extends Animal { isCat: Boolean = true }

        const dogs: Dog[] = [ new Dog() ]
        const animals: Animal[] = dogs
        animals.push(new Cat)

        for (const dog of dogs) console.log(dog.isDog)
        //=> true
        //=> undefined

Well, it's unfair to pick on this, since they give a similar example in their own documentation, right? But this extends to inheritance as well, because input parameters in functions are not contravariant in Typescript:

        abstract class FlatMap<A> {
          abstract flatMap<B>(f: (a:A) => FlatMap<B>): FlatMap<B>
        }

        class Box<A> extends FlatMap<A> {
          flatMap<B>(f: (a: A) => Box<B>): Box<B> {
            throw new Error("Not implemented!")
          }
        }

It should be obvious to everybody why this is wrong:

        class AnotherBox<A> extends FlatMap<A> { ... }

        const box: FlatMap<number> = new Box<number>()
        box.flatMap(x => new AnotherBox<number>())

In case you're wondering, that interface is the beginning of the Monad pattern and the problem here is that monads are incompatible with each other. So in order to compose instances together, you do rely on the compiler to protect you. Think Promises being combined with Arrays, both of which are monadic types. Not going to work, is it?

In less expressive static language lacking higher kinded types, which you need to express such interfaces, there's a current trick that people do to work around it: [https://www.cl.cam.ac.uk/~jdy22/papers/lightweight-higher- ki...](https://www.cl.cam.ac.uk/~jdy22/papers/lightweight-higher-kinded- polymorphism.pdf) ; This has been used in Elm and it's being used in Kotlin as well, see for example: [https://github.com/FineCinnamon/Katz](https://github.com/FineCinnamon/Katz)

But Typescript is on a whole new level of wrong, because you can't trust the compiler for correctness, so you can't trust it for protection, at all. You see, this is not pie in the sky academics, but actual code that can happen in your app, mistakes that the compiler should have prevented you from making. In the above case Typescript really is just documentation and just like documentation in many cases, it can be _wrong_ documentation. To make this even more frustrating, Microsoft's other language, C#, does not have the problems that I enumerated.

And I know what people say - oh, this is still useful. Well, guess what, writing JSDoc + having Google Closure to validate is actually more useful, while not being non-standard ;-)

<comment><USER6> You're treating this specific case as a fundamental issue, when it's a specific and superficial one that can be reasonably addressed in a future TS release:

See for example:

\- Nominal types proposal [https://github.com/Microsoft/TypeScript/issues/202](https://github.com/Microsoft/TypeScript/issues/202)

\- Co/contravariance annotations proposal [https://github.com/Microsoft/TypeScript/issues/10717](https://github.com/Microsoft/TypeScript/issues/10717)

<comment><USER4> These choices are fundamental to the language as it was designed. There's nothing more fundamental than how variance works.

Want to bet that in 2 years from now we are still going to talk about the same language with the same issues, and that those two proposals are going to be rejected?

<comment><USER6> I'm not sure I understand why you think that. TypeScript explicitly prefers real world usability to theoretical soundness, so if the community is vocal about the need for these features, I don't see why TS would turn them down.

<comment><USER4> > _real world usability to theoretical soundness_

The soundness we are talking about in this case isn't theoretical at all and in fact such an argument is anti-intellectual. This is anti-intellectualism.

As for the "community", we are talking about one where the majority has never worked in sane static languages.

<comment><USER6> You are misunderstanding what I said.

Either one of the 2 issues I linked would fix the specific problems you outlined. You don't need a globally sound type system, H-M inference, or anything like that to fix those specific problems; local inference and opt-in nominal typing would work just as well.

Having used TS daily for a few years, I can vouch that your cases are pathological, and don't come up in practice often, if at all.

</comment></comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER7> Best thing I done in my spare time 5 years ago was converting the entire JavaScript code base in Bing to TypeScript, that improved agility 10000x

</comment><comment><USER8> Resources for getting started with Electron+TypeScript are still not great, contrary to the tone of this article. I'm working on getting electron-compile up and running, and I currently have compilation but no type-checking. I don't expect it will be too hard to figure out, but it's not a five-minute task where you just start with a repo or follow a tutorial. There are various quick-start repos but they appear old. Someone let me know if I'm looking in the wrong place. This article and the accompanying video talk exclusively about the experience of editing code, not compiling it.

<comment><USER9> It looks like there's a walkthrough video here, where they successfully get TypeScript working with Electron: [https://youtu.be/PJRag0rYQt8?t=455](https://youtu.be/PJRag0rYQt8?t=455)

</comment></comment><comment><USER10> Next up: BuckleScript/ReasonML support :)

<comment><USER11> It would be cool to see a lot of the Electron app crowd taking up ReasonML. I like BuckleScript, but I think Reason might be easier to teach to JS devs. I'd love to replace my react frontend with ReasonML.

<comment><USER12> I think what OP means is Reason compiled via JS.

<comment><USER10> Yeah. BS bindings for OCaml-to-JS interop. Then using the Reason tools, as they provide a really nice workflow.

</comment></comment></comment></comment><comment><USER13> Anyone know what editor and theme they used in the screenshots? It looks like VS Code.

<comment><USER14> It's definitely VS Code and it's quite mind-blowing thinking that they're the guys behind Atom, and the blog's domain is electron.atom.io.

<comment><USER15> Atom doesn't have built-in support for TypeScript annotations. I've gotten the impression that VSCode is somewhat more popular with the TypeScript crowd.

<comment><USER16> Since MS develops TypeScript they have a big advantage in making TypeScript a first class citizen in VSCode. I see many developers who would prefer a different IDE normally, but decide on VSCode because it seems to be ahead of everyone else on TypeScript currently.

<comment><USER17> Not sure that applies like that. Typescript support is based on the Typescript language server, which uses their open source language server protocol, which is open for other editors to use (and indeed adopted by a bunch of them). So in theory other IDEs could support TS with the same level of VSC as long as they adopted the protocol, without the need for discussion TS functionality.

</comment></comment></comment></comment></comment><comment><USER18> This is exactly what I've been looking for! The only available type definitions for Electron I could find (up until now) were outdated. I'll be making good use of this. Thanks.

</comment><comment><USER19> My only wish for TS (which I use on the daily and love) is for some way to export type annotations at runtime. Like I'd love to inspect a class property and see if it is annotated as "this is a date" (in particular for deserializing JSON, which is a constant bugaboo for me). Right now, I just generate two parallel schema definitions, one that typescript uses to provide compile-time type safety, and another that's just a pojo to access at runtime to get more data.

<comment><USER20> Maybe something like this?

[https://github.com/YousefED/typescript-json- schema](https://github.com/YousefED/typescript-json-schema)

</comment></comment><comment><USER21> With nodemon and live-reload, why is this an issue? I've been able to do TypeScript apps in Electron for months. Both adding TypeScript and Electron to my build process were afternoon projects. No, I'm not running TypeScript natively. But where else do we ever run TypeScript natively? Retranspiling on file changes works pretty well.

<comment><USER22> Did you read the article? It's running typescript without a transpiler in electron (although I think there is a community project for that). It is about electron shipping their own officially maintained type definitions in the`electron` npm package for typescript users.

</comment></comment><comment><USER23> does typescript know if a parameter is undefined (misspelled) or does it only find errors like 1+'1' ?

<comment><USER24> It is a full static checking system, so it will find obvious errors like mistyping something, but it also infers alot of information from the context.

I made a small simple demo here: [https://www.typescriptlang.org/play/index.html#src=const%20e...](https://www.typescriptlang.org/play/index.html#src=const%20example1%20%3D%20%22Hello%22%3B%0D%0Aexample1.length%3B%0D%0A%0D%0Aconst%20example2%20%3D%20Math.random\(\)%20%3E%200.5%20%3F%20null%20%3A%20%22Hello%22%3B%0D%0A%0D%0A%2F%2F%20Error%20-%3E%20Object%20is%20possibly%20'null'.%0D%0Aexample2.length%3B%0D%0A%0D%0Aif%20\(example2%20!%3D%3D%20null\)%20%7B%0D%0A%20%20%20%20example2.length%3B%0D%0A%7D%0D%0A%0D%0Aconst%20example3%20%3D%201%3B%0D%0A%0D%0A%2F%2F%20Have%20fun%0D%0Aconst%20example4%20%3D%20Math.random\(\)%20%3E%200.5%20%3F%20example2%20%3A%20example3%3B)

Note: Click Options and enable all the settings. Typescript works best in strict mode, but it seems options arn't including in sharing via url.

<comment><USER23> It seems it can only find properties if they are defined as foo = {bar: 1}; and not foo={};foo.bar=1;

</comment></comment></comment><comment><USER25> From the video "Use --save-exact because […] we don't follow Semver"

</comment><comment><USER26> Why should I be cursed with the weight of your type system when I chose a language without types?

If I wanted a typed language, _I would use a typed language_. JS has a lot of benefits. Being able to use JS to make native-ish apps has it's place. Being able to use typed JS to make native-ish apps probably means you should be using a different language.

<comment><USER27> > _If I wanted a typed language, I would use a typed language._

If you're doing server-side development, then you have a million languages to choose from. If you're developing within the context of a browser engine, then the choice was made for you over 20 years ago.

If you like that choice, then great. If you don't, then you transpile. Either way, it's silly to act as if there's a contradiction here.

<comment><USER26> But this isn't web development, this is a native-ish app. One certainly doesn't need to us JS to make a native-ish app.</comment></comment></comment>


Testimony on U.S. Nutrition Guidelines Reflects a Complex Debate - <AUTHOR> http://www.nytimes.com/2015/10/08/us/testimony-on-us-nutrition-guidelines-reflects-a-complex-debate.html?_r=0 <comment><USER2> Not complex at all, just political. Of course, nutrition guidance isn't really a proper function of govt (what does food have to do with force?) In any case, the problem the govt has now is that crow doesn't taste very good, i.e. the whole "low fat" mantra from the 70's was mistake and bad advice.</comment>


Automatic SSL with Let's Encrypt and Nginx - <AUTHOR> https://dev.to/adamkdean/automatic-ssl-with-let-s-encrypt-nginx-4nfk <comment><USER2> Come on TLS is old by now. That article even writes ssl/tls in the first paragraph!

Do your part and call it by its name</comment>


Equity Free Funding Stash - <AUTHOR> https://16metrics.com/tools/equity-free-funding-stash <comment><AUTHOR> Equity free funding stash ([https://16metrics.com/tools/equity-free-funding- stash](https://16metrics.com/tools/equity-free-funding-stash)) is a curated list of equity free funding options available around the world to help you build your startup. It currently has over 30 different programs ranging from government grants to corporate accelerator programs. I made this list while hunting such options for my own startup. I was thinking of sharing it with others and felt that a map interface would be the best to present this information. The list is also available on Github ([https://github.com/intdotai/equity-free-funding- stash](https://github.com/intdotai/equity-free-funding-stash)).</comment>


Consumption of hot spicy foods and mortality - <AUTHOR> http://www.bmj.com/content/351/bmj.h3942

<comment><USER2> TLDR:

If you eat spicy food you are less likely to get cancer, heart disease, and respiratory disease.

If you eat spicy food, over a period time (7 years in the study) you are less likely to die compared to someone who eats spicy food less than once a week by the following amounts:

1-2 times a week: 90% as likely

3-5 times a week: 86% as likely

6-7 times a week: 86% as likely

Not drinking alcohol helps.</comment>


I write thrillers. My research showed me how easily terrorists can strike us - <AUTHOR> https://www.washingtonpost.com/posteverything/wp/2017/04/05/i-write-thrillers-my-research-showed-me-how-easily-terrorists-can-strike-us/?hpid=hp_no-name_opinion-card-a%3Ahomepage%2Fstory <comment><USER2> So I used to be a very active graffiti writer back in the late 90's. My primary targets were local trains in general and subway trains in particular.

(yeah I know that's bad but that's not the point)

Speaking from first hand experience, there's always a flaw in your security system: cameras that no one watches, broken sensors that no one fixes, alarms that no one reacts to, master keys that are easy to find and duplicate, padlocks that are easy to break and replace with our owns, sensors that are easy to circumvent, employees that are easy to bribe, witnesses that won't do a thing, a network too large and old, holes in the fence that are never repaired, trains that are never checked before going into trafic, etc.

My friends and I could spend hours in a yard, often bringing ladders, doing our stuff without anyone batting a lash. And the next day. And the next one. It was only paint, and we were only a bunch of apolitical "kids" having fun, though, so no biggie.

Basically, we can't be 100% safe. Patrolling the city centres, checking bags at the mall, x-rays and dogs at the airport… none of it makes anything safe, really. What makes us safe (and we are) is the terrorists' limited resources and lack of imagination.</comment>


Unearthing a masterpiece: a rare Minoan sealstone (2017) - <AUTHOR> https://magazine.uc.edu/editors_picks/recent_features/unearthingamasterpiece.html <comment><USER2> > _"Some of the details on this are only a half-millimeter big," said Davis. > "They're incomprehensibly small."_

pretty impressive given they didn't have magnifying glasses in 1500 BCE. i guess the artisan had excellent vision.

<comment><USER3> > _i guess the artisan had excellent vision._

Not being in front of a computer or mobile screen all day helped!

<comment><USER4> Back in the mid-20th-century, they used to blame nearsightedness on reading in bed.

<comment><USER5> Nearsightedness would actually help quite a bit with fine work like this. Before presbyopia took hold with me, I could easily focus on my own nose, while things started getting pretty blurry about three feet/one metre out. (These days, I have about a 10cm clear vision range uncorrected at an utterly useless distance, just at the limits of an arm's reach.)

</comment></comment></comment></comment><comment><USER6> It's only 3.6cm in height, the detail is incredible.

</comment><comment><USER7> Wow. Nothing ever before or for a thousand years after with that level of aesthetic beauty -- realism and style.

<comment><USER4> > Nothing ever before or for a thousand years after

There's quite a history in premodern-to-modern times of something being attributed as "first appearing" in the classical period, and then everyone being surprised to discover a much, much earlier example.

Heck, an instance of this which was falsifiable _all along_ was the idea that Archimedes invented the Archimedes screw. Why else would it be named after him? Well, he visited Egypt and wrote about the water screws he saw in use there. They'd been there, as far as he knew, forever.

We know a good amount of what was going on in the classical period because there was only a moderate amount of disruption between then and now. But the fact of something's existence is entirely unrelated to whether we've noticed it. The odds are overwhelming that there was a lot of material comparable to this ring before and after 1500 BC. We just don't know about it.

<comment><USER8> > The odds are overwhelming that there was a lot of material comparable to > this ring before and after 1500 BC.

"A lot" is a fairly vague quantifier, but I'd wager you're wrong regardless of how you define it.

We've now collectively spent about a century excavating all of the most interesting sites that we can find, and still this artifact is unique enough that the archeologist in charge of this excavation is quoted as saying:

> This seal should be included in all forthcoming art history texts, and will > change the way that prehistoric art is viewed.

Are there other artifacts like this one from the same time period? Almost certainly. But apparently they're rare enough that we're finding them at the rate of about one per century.

</comment></comment></comment><comment><USER9> We just need two more to get into Atlantis

<comment><USER10> For those who didn't know, its widely believed by scholars that Minoan civilization is the source of the story of Atlantis as recorded by Plato.

The Minoans' trading hub on Thera (present day Santorini) largely disappeared into the Aegean after a massive volcanic eruption in the 1600s BCE.

Bettany Hughes has the full story [https://www.youtube.com/watch?v=7VJqnTlbCS0](https://www.youtube.com/watch?v=7VJqnTlbCS0)

<comment><USER9> I was making an apparently super obscure reference to the LucasArts game "Indiana Jones and the fate of Atlantis"</comment></comment></comment>


Discussion on porting node's JSDOM to the Browser - <AUTHOR> https://github.com/tmpvar/jsdom/issues/245

<comment><USER2> Yet another sockpuppet account from Marak (<https://twitter.com/maraksquires/status/81591561602863104>)</comment>


Show HN: Statement of Work (SOW) template – seeking feedback - <AUTHOR> A technology client wants me to create a Statement Of Work (SOW) and I've researched many dozens of options.
Here's the best I've found so far -- what advice do you all have to improve it?
https://github.com/joelparkerhenderson/statement_of_work
Note: I'm working on related contracting agreements now, including a Master Services Agreement (MSA), Non-Disclosure Agreement (NDA), and Functional Specifications template. Advice much appreciated. <comment><USER2> After your work is done for this client, I recommend looking at MIT open ToS I am working on a way to have a document repository on github Wouldove to collaborate and build an open source legalzoom + juro

</comment><comment><AUTHOR> Link: [https://github.com/joelparkerhenderson/statement_of_work](https://github.com/joelparkerhenderson/statement_of_work)</comment>


You Don't Know Jack About Software Maintenance - <AUTHOR> http://cacm.acm.org/magazines/2009/11/48444-you-dont-know-jack-about-software-maintenance/fulltext <comment><USER2> The article mentions updating a warehousing software by updating individual copies and making these interoperate with the older copies, so the system can be progressively updated. It also talks about machines that would run without ever being stopped or rebooted. Yet there is no mention of Erlang or updating an application while it's running, which I find rather surprising.

<comment><USER3> Erlang is a flash in the pan compared to how old these technologies are. IBM's S/360 goes back to the early 60s, then came the S/390, and finally z/OS; the hardware of the S-series could be hotplugged, the entire machine updated in hardware and software _while_ it's running. Since the 1960s!

Like the articles says, us whippersnappers, 00s, cloud-this and distributed that types know jack about this stuff. Kneel and kiss the ring! ;-)

</comment></comment><comment><USER4> Very little software development is "green field" development, most of it is maintenance of some form or other. Quite a lot of "maintenance" programming is development of new features, rather than merely fixing bugs. However, very few software projects are designed with these facts in mind.</comment>


China Blocks Virtually All Of Google's Web Services - <AUTHOR> http://techcrunch.com/2012/11/09/china-blocks-virtually-all-of-googles-web-services-as-18th-party-congress-gets-underway/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+Techcrunch+%28TechCrunch%29 <comment><USER2> Another discussion: <http://news.ycombinator.com/item?id=4764376></comment>


Facebook unveils Groups for Schools - <AUTHOR> http://newsroom.fb.com/Announcements/Introducing-Groups-for-Schools-144.aspx?

<comment><USER2> It's completely off topic, but the .aspx extension on the URL is much more interesting than the announcement itself.

</comment><comment><USER3> We've been using this at Waterloo for a couple of months now. It's a nice new feature, but one issue is that we already have some huge groups (textbook/housing/class-of groups) from before that cannot be moved into Groups at Waterloo.

<comment><USER4> Similar here at University of Washington. I am an administrator for the (now unofficial) Class of 2015 group and when they announced this on our campus a few weeks back people were denigrating it for that, among other things.

</comment></comment><comment><USER5> Facebook has gone full circle.

<comment><USER6> I know, they should call these school groups "networks".

</comment></comment><comment><USER7> I'm an undergrad at Emory and we've had this for the past two months.

</comment><comment><USER8> Aw, this is not newsworthy. This isn't even innovative.

<comment><USER9> Care to explain why you feel that way? It's a major feature from the dominant social network that could have consequences in the academic space. Personally, I'm curious what effect this could have on Blackboard if they continue to (re-)expand into .edu territory.

<comment><USER10> These Groups at school was the original purpose of facebook!</comment></comment></comment>


Cost Per Calorie from a Vending Machine - <AUTHOR> http://austingwalters.com/cost-per-calorie-from-a-vending-machine/

<comment><USER2> That's awesome. I came upon the exact same calculation in college and started eating Pop-Tarts a lot from the vending machine. Even to this day, I comparison shop taking $/calorie into account (recently decided to buy one brand of dried noodles over another because of this).

<comment><USER3> I used to do this too. Now I'm fat. Not fat fat, but sporting a noticeable beer gut. It's all I can do to try to get rid of it. $/calorie is probably the silliest consideration I've ever taken seriously. It's not like we live in North Korea.

If you really need to eat cheaply, buy beans and lentils in bulk bags, and carrots, potatoes, cabbage, onions and peppers and learn how to cook them.

</comment></comment><comment><USER4> Doesn't this just point to the energy density of sugar? It's an interesting calculation, though.</comment>


Putting An End To The Biggest Lie On The Internet - <AUTHOR> http://techcrunch.com/2012/08/13/putting-an-end-to-the-biggest-lie-on-the-internet/

<comment><USER2> TL;DR - another post about tos-dr.info.

6 days ago, 602 points: <http://news.ycombinator.com/item?id=4350907>

1 day ago, 129 points: <http://news.ycombinator.com/item?id=4373610></comment>


Getting people to switch podcast clients is hard - <AUTHOR>

Our team built a podcast client that has a lot of interesting features to simplify discovery and listening to podcasts. Having a tough time finding the right channels to get it to people. Anyone have any suggestions?<p>itunes.apple.com/us/app/raur/id643855633?mt=8 <comment><USER2> Partner with a popular show?</comment>


Aliens Amongst Us - <AUTHOR> http://wellanyway.nfshost.com/blog.php?display=iread!17

<comment><USER2> unclosed title tag/string makes it unreadable</comment>


Computer Science 222: A Discussion - <AUTHOR> http://mybiasedcoin.blogspot.com/2009/05/computer-science-222-discussion.html

<comment><USER2> Point #3 is really important for anyone considering or starting grad school.</comment>


Two protesters shot dead in Kenosha - <AUTHOR> https://www.theguardian.com/us-news/2020/aug/26/jacob-blake-shooting-gun-battle-in-kenosha-on-third-night-of-unrest <comment><USER2> I really hate how that article uses the word "victim". Murderous rioting attackers are not victims, even if they lose the fight and die, and they are nothing like what "protesters" would suggest.

It's also implied that Jacob Blake was an innocent person. He had already attacked the police, refused to cooperate, and appeared to be reaching into his car for his gun. Of course he got shot. He has a long and very violent criminal history too. It includes: resisting arrest, causing injury to police officer, carry a firearm while intoxicated, disorderly conduct, criminal trespass to dwelling, domestic abuse, 3rd degree sexual assault...

The bad reporting is encouraging violence and getting people killed. People think an innocent man was just killed in cold blood by the cops, for racism or no reason, but that just isn't the case.

<comment><USER3> dude, american citizens don't get the death penalty without a trial. It's that simple. Even if they're murderous rioting attackers, or don't cooperate with police. Arbitrary killing, that is, killing without an open, fair trial, will cause greater problems than it solves.

<comment><USER2> American citizens have the right to self defense. Deadly force is authorized.

Worst case, there are a couple states that require the victim (the real one) to attempt to retreat from the attacker if that is possible. Even in those states, the Kenosha riot victim would have had the right to shoot with intent to kill. Cops also don't have to retreat, and they too have the right to self defense.</comment></comment></comment>


Using crowdsourcing and Django to dig through the expenses of the UK Parliament - <AUTHOR> http://simonwillison.net/2009/talks/europython-crowdsourcing/

<comment><USER2> See also: <http://news.ycombinator.com/item?id=671197>

Much comment there already.</comment>


A week without Google Search - <AUTHOR> http://www.jgc.org/blog/2009/06/week-without-google-search-bing-there.html

<comment><USER2> Search engine preference depends, at least to a degree, on personal taste and this guy is entitled to his opinions, but this seems a bit contrived. He complains twice about a horizontal scroll bar when he's using what looks like a very small window. Come on.

The complaint about wasted space is a little puzzling too because in the screenshots it looks like both Google and Bing have about the same amount of "wasted space". The difference is Bing has it on the left and Google has it on the right.

The only gripe that seems legitimate is the image search and it's a bit of a stretch to call the Bing results "irrelevant". The Google image results for a "chi-square table" are clearly better, but some of the images on Bing are similar or identical.

I'm very much interested in comparisons between Google and Bing. This might be the toughest competition Google has faced so far and it's a great opportunity for us to see where search engines can improve. This article, however, is a lousy comparison. There's almost nothing of substance here.

I suspect it's a link bait article designed to plug the book that's prominently displayed on the right side of the page. That's fine, of course, but it's still a lame post.

<comment><USER3> I've been using Bing as my browser default since it came out. By and large, it's on a par with Google for most queries. I do find myself going back and forth from Google search for programming questions because of the Google groups search and blog search. The Python and Django Google groups are very active, and quite helpful. I also have found a number of links to content on programming questions via Bing that I wouldn't have found using Google alone. So, I find myself using both search engines quite a bit.

I've been planning some recent travel and the airfare search on Bing was excellent. Up until recently, Kayak was my primary airfare comparison site, but Bing's tools won big for me. They felt a faster and more responsive. You can also get airfare trend graphs and get "buy now prices increasing" or "buy later, prices decreasing" recommendations. Bing is now my primary airfare search tool.

Either way, it's great that Google is getting a little pressure to compete in search. It's been the defacto monopoly for several years, and that's bound to cause some stagnation. I think the competition is going to make search better all the way around, and it's that reason that I'm going to keep Bing as my browser default.

</comment></comment><comment><USER4> I've also switched my browsers search bar over to Bing. Overall, I prefer it to Google. Random notes:

\- Searching for Cocoa class names doesn't give me the API reference as the first result. This is the one thing that's been annoying me.

\- The image search has a nifty infinite scroll thing going on. This makes scanning through results quite a bit faster.

\- I like the picture, to the extent that I tend to visit the Bing homepage just after midnight, even if I don't need to search. It's not utilitarian, but it gives Bing a flavour Google is often lacking.

<comment><USER5> I agree. I often go to Bing atleast once a day to see what pic have they put up. They have great taste specially when constrained to a limited size.

<comment><USER6> Seriously? The picture is one of the main reasons I don't like it. I find the google logo changes to usually be really interesting and clever, whilst the selection of random clip-art at bing to be a bit crass, and distracting.

<comment><USER7> You can just turn it off with <http://www.bing.com/?rb=0> and on with <http://www.bing.com/?rb=1>

</comment></comment></comment></comment><comment><USER8> Anyone care to try Duck Duck Go for a week and then send me some similar feedback? We're very open to ideas.

<comment><USER9> I'll give it a shot. First impression: Don't use "/" as your search box shortcut. Interferes with Firefox's quickfind shortcut.

<comment><USER8> Thanks. The '/' binding is copying Google, which they use in their various apps like Gmail.

<comment><USER9> Ah. That does make some sense, then (I haven't used Google's shortcuts much).

</comment></comment></comment></comment><comment><USER10> Apart from the trolling tone, the sole commenter suggests switching to the US version which is supposed to be better. How would one go about that, then? I didn't understand the hype about bing when first announced until I looked at screenshots - for some reason the extra features seem to be US-only.

<comment><USER11> Click on your country in the top right of the page; it will take you to a new page where you can select your market.

</comment></comment><comment><USER12> Google has grown less effective in many areas over the past few years. I especially hate that it no longer includes all the words in the query, which was originally one of the reasons for switching to Google. Yahoo and Bing are a little stupider in that regard, which means they let the user be a little smarter. No doubt, Google is king of the common query, but it should watch its base. If people need to go to another search engine to find something hard they might not come back for the easy stuff.

</comment><comment><USER13> Try search.yahoo.com I find it quite good. In some nichees Yahoo is far better than Google (won't mention them because I am a tinfoil hat privacy freak, sorry). Also it seems to index XML (eg when used with XSLT) much more likely than Google.

<comment><USER14> In terms of supporting someone else, I think Yahoo is better than Microsoft, who I still don't trust all that much.

</comment></comment><comment><USER15> Good article...seems to come down to visual preference for the author.

But...

To use BING because its not something else (Because It's Not Google) makes my anti-anti self kick in and makes me not want to use it for the simple fact I'm not 12 years old anymore. MS needs to grow up and just release good groundbreaking innovative products like they've done for the development world.</comment>


You should let it crash - <AUTHOR> http://variadic.me/posts/2012-10-30-you-should-let-it-crash.html

<comment><USER2> I agree in principle, but the reality is different and so the principle can be hard to follow.

In languages without checked exceptions (like C#) you may end up in situation where you're collating and processing a large collection of items from a remote source. You've received bad data so ideally you'd just like to log that and not make the application go down.

But the exception may get thrown by any one of thousands of methods in your own application or a library. So checking the source to see what's thrown and adding specific handlers might not be possible or achievable. Checking the documentation might be an option but in general it's too time consuming or just non-existant.

So to cope I catch a generic Exception, log the bad data, and carry on.

So yet again what we have is a principle we should aim for but depending on circumstance you can feel free to ignore.</comment>


Upwork is Changing Again and What We Can Do About It - <AUTHOR> https://medium.com/@LevelWorkingField/do-you-like-new-pricing-or-higher-fees-upwork-is-changing-again-and-what-we-can-do-about-it-6c755e245fb7 <comment><USER2> A lot of people are mentioning "let's build a clone that is better and will do us greater justice", but ask yourself, with 14 million entrenched users, how is building an upwork clone any different to "let's build a twitter/facebook clone"?

The merger did precisely what they wanted it to do:

 _Give a single player a dominant market-share. This single player will then engage in price-flooring practices until they 've snatched up the largest market-share. They will then enforce their gradual fee and upselling strategies._

This is no different to any other market where a monopoly exists. Internet companies like to claim they aren't monopolies by saying "just visit another site for their services" but entrenchment of the market is exactly what makes them monopolies.

If a large-enough competitor came along (with big funding backing it), you'd soon see Upwork change tack and go back to price-flooring.

<comment><USER3> I don't think you can compare the situation with twitter or facebook. Those are actually good at what they are doing. But upwork is such a crap (in my experience as a client, for freelancers it must be horrors) that a lot of people would jump ship as soon as there would be an alternative. But sadly all alternatives like guru or freelancer.com are as bad or even more (missing words to describe those clusterfucks) as upwork. Elance was at least a bit usable. Toptal might be an alternative but their boarding process looks a bit esoteric and is aiming at another targetgroups anyway.

<comment><AUTHOR> "But upwork is such a crap (in my experience as a client, for freelancers it must be horrors)... sadly all alternatives like guru or freelancer.com are as bad or even more" \--- That's true!

</comment></comment></comment><comment><USER4> There is not necessarily a need for 100% community effort.

What is needed a simple, decent service, with reasonable rates ( from 1% to 3% from a transaction ) and keeps up with the requests. Such a service could be run by a max 5 person company and I believe everyone could profit.

I worked with Upwork and I liked the concept, but the implementation was a bit to complicated. With this changes, I really hope new such services will come up and fill this decency "void". The strategy of Upwork eludes me, since their strenght lies in the participants and alienating them is the last thing you want to do.

<comment><USER5> But once you have 14 million users, what prevents the 5 guys from going: "Hey, you know what? If we just bumped up rates to 6%, we'd make a lot more money and we won't lose too many people. We're providing a great service and a lot of the customers are happy to pay that amount."

<comment><USER6> Make it a co-op. Build restrictions into the corporate bylaws such that classes of members can check and balance acts like this. Implement profit- sharing, so not only would that 1% increase in fees help fund development, but it would also be returned in part to platform members. Of course it may be necessary to increase fees once you've got an actual idea of what your expenses will look like, and profit-sharing may necessitate a larger increase, but then _everyone_ has incentive for the platform to succeed.

<comment><AUTHOR> Some smart people really think alike. +1 on that!

</comment></comment></comment></comment><comment><USER7> An aside.

Anyone who is interested in marketplaces, whether their implementation, management, or value, should read "The Middle Man Economy" by Marina Krakovsky: [http://marinakrakovsky.com/books/](http://marinakrakovsky.com/books/)

This book was very helpful to me in understanding concretely how marketplaces and middlemen can actually have real tangible benefits (though, working for a marketplace startup now, and having worked for a real estate brokerage in the past, I have more than a passing familiarity with the value propositions of several types of middlemen).

Alternatively, here's a podcast with the author: [http://www.econtalk.org/archives/2016/03/marina_krakovsk.htm...](http://www.econtalk.org/archives/2016/03/marina_krakovsk.html)

<comment><AUTHOR> Could you share the name of your marketplace startup? Is it purpose driven?

Thanks for sharing those links

</comment></comment><comment><USER8> Why is a central authority controlling the market again ? What we need is interfaces for the customer and workers that can be matched together by a broker. It's probably quite hard to find the right interface but it would then benefit everyone.

Here is a simpler example for a Uber-like implementation:

* Taxis would be advertising their current position and whenever they they are free or not with their phone.

* Potential customers would advertise their current location and where they want to go with their phone.

* Broker services would match taxis with customers

Obviously it's more complicated than that, there could be a reputation service associated to an account for example and your own algorithm running on your phone that chooses the combination of trust and pricing that you want.

<comment><AUTHOR> Could you explain more? Platforms like Upwork serve as interface or broker between customers and workers. Are you referring to something different?

<comment><USER8> Upwork is a monolith. It's a broker but also holds the developer and customer data. Competing brokers cannot enter the market without having to ask developers and customers to duplicate their data.

If the developer had it's own service (like his personal website) that hold the list of services that he provides, his availability and general price. Then brokers could connect to this and match it with customer requests. Same on the other side, a customer should be able to submit his project proposal and let the various brokers pick it up and match the appropriate developers.

</comment></comment></comment><comment><USER7> Network effects make this effort a bit quixotic, just like diaspora and ello, with respect to consumer faxing networks. But hopefully they'll give it a go, and maybe surprise this cynic.

<comment><AUTHOR> With community support and the right people to create and maintain it, it's definitely possible.

</comment></comment><comment><USER9> Lets hope this is a race to the bottom for freelancing websites, rather than freelancers! Its also reminiscent of the opposition to Uber by London cab drivers: [https://www.theguardian.com/technology/2015/sep/05/london- bl...](https://www.theguardian.com/technology/2015/sep/05/london-black-cab- drivers-app-uber-taxi)

<comment><AUTHOR> Thanks for sharing the article. I do hope it turns into a race to the bottom for freelancing websites and a race toward overall improvement and fairness.

</comment></comment><comment><USER10> Back when it was called elance, I was getting annoyed that it would bill clients automatically but then leave the money sit in my elance account - there was no way to automatically send income to a bank account. So I wrote a bot that logged in on my behalf every day and initiated a bank transfer if there was any money available.

I don't believe this violated the ToS at the time, and Elance never said there was anything wrong with it. But once I posted it to the forums, my account was suspended within a day for a couple of silly things like having a reference to my personal website in one of my example images.

I quit putting much faith in the company after that.

<comment><AUTHOR> They seem to be getting some profit by keeping YOUR money on their accounts.

<comment><USER7> It's called "float"\--all kinds of companies use it. More here: [http://www.fool.com/personal- finance/insurance/2006/12/05/in...](http://www.fool.com/personal- finance/insurance/2006/12/05/insurance-industry-basics-float.aspx)

<comment><AUTHOR> Thanks. I learned another cool jargon. Whatever "floats" their boat, I guess!

</comment></comment></comment></comment><comment><USER11> 20% fee for work done for mostly one time clients?!

That's just baloney.

<comment><AUTHOR> It's a huge, big crap of a baloney. :)

</comment></comment><comment><USER7> Maybe something like a REI or Vanguard model would work, where the company providing the service is a cooperative owned by the members?

<comment><USER12> This is such a good idea that I'm surprised I haven't seen this model yet.

<comment><AUTHOR> Maybe because it's easier to launch something that is motivated by profit (for a few people) than anything else?

</comment></comment></comment><comment><AUTHOR> The Medium article above has gathered almost 4,000 views today and yesterday. We got amazing support. Getting close to 6,000 views. We should keep on sharing this with everyone out there!

</comment><comment><AUTHOR> Thanks to all those who made their comments here. I look forward to more comments in the coming hours and days! Let's keep this fire burning, so more people would see this!

</comment><comment><USER13> The alternative already exists, why isn't it being used?

<comment><AUTHOR> Can you tell which alternatives? They are either similar or inferior to Upwork, or are still new and relatively unknown (and therefore there are not much jobs in their platform). It's a huge dilemma.

<comment><USER13> Here is the newest one:

      http://bitkick.org/

My partner and I just kicked this off. We've got 6mo of runway and must acquire 100k freelancers in that time. Its chicken & egg, of course, we've decided to start on the talent side.

We are also looking for freelancers to participate in market research interviews to help guide our build out.

</comment></comment></comment><comment><USER14> The new pricing structure halves my Upwork fee for most of the jobs I do. I had no time to comment on the complaints page though.

<comment><USER11> The comments page proactively mentions adherence to community guidelines would be required while posting.

</comment></comment><comment><AUTHOR> This article is close to 6,000 total views. More support!

</comment><comment><USER5> One word: Non-profit.

Okay, it is a hyphenated word.

<comment><USER15> It does strike me some kind of worker owned co-operative would suit this type of organisation.

<comment><AUTHOR> That's possible too. I think a few companies (in other industries) have taken this path.</comment></comment></comment>


World renowned heart surgeon speaks out on true cause of heart disease - <AUTHOR> http://m.disclose.tv/news/World_Renowned_Heart_Surgeon_Speaks_Out_On_What_Really_Causes_Heart_Disease/113103#DTV

<comment><USER2> Dwight Lundell had his license to practice medicine in revoked in 2008-- his fifth disciplinary action in five years by the Arizona Medical Board. This does not prove his ideas are wrong, but it did earn him a lengthy profile on Quackwatch:

[http://www.quackwatch.org/11Ind/lundell.html](http://www.quackwatch.org/11Ind/lundell.html)</comment>


The state of JavaScript modules - <AUTHOR> https://medium.com/webpack/the-state-of-javascript-modules-4636d1774358 <comment><USER2> Is this an actual problem? Correct me if I'm wrong but I'm willing to bet 99% of all npm packages never get downloaded. Shitty modules can live there with their 0 downloads in the last day as far as I'm concerned.

Regarding this bit: _" Remember Google's Polymer? Angular 1? Express? Perhaps the creators of these kinds of tester projects which get abandoned if they don't pan out should be more transparent about their intentions."_

Angular 1 and Express did not pan out? Not only do I remember them, I maintain half a dozen enterprise applications that use them. Is he actually mentioning Express as an example of a failed module that should not have been published?</comment>


Ask HN: How do you price things? - <AUTHOR> <comment><USER2> The best approach will depend upon your goals, market, and the nature of your product. There is no "one size fits all" in pricing.

If you want some ideas, check the site in my profile.

</comment><comment><USER3> It depends on your product, the market you are in etc. There is no silver bullet. A very generic answer would be: prices are relative. Start by finding things on the market that are similar to your solution. Analyse their value proposition and price. Compare their solution with what you offer.

</comment><comment><USER4> I'd go check out the content that the folks at profitwell put out. They do a ton of analysis on how to price products.</comment>


Show HN: Curated News from Hacker News, Designer News, Product Hunt and 9 More - <AUTHOR> http://jakemor.com/technews/ <comment><USER2> I find the idea quite interesting, so interesting that I implemented my own version already over a year ago.

While I also started with aggregating only the top sites and so on, I found it quite "unpleaseant" that it lists all of the news-items in that way. I tried to make another ranking of the news and also tried to get more factors into the formula.

At the end there was a custom crawler, a special API using Solr and a custom Frontend [1] in two versions [2] which aggregates everything together.

I have also open-sourced the frontend [3][4]. If you have fun, have a look into that, but unfortunately the source-code diverged from the frontend Reader [1] a bit, because I started refactoring the db-schema and had not time to update my repositories yet. The second frontend [2] just happend because I was curious about the abilities of Foundation from Zurb. Works really well, btw. Also from your smartphone.

I plugged all of that into a machine learning algorithm too and let everything classify - online and in realtime. And renamed it to babbleaway, because the name "Newscombinator" was a bit too... well... fill in a word of your choice. The HN Community was not so pleased :)

In case there are questions, feel free to ask.

Merry Christmas. Tom

[1] [http://reader.newscombinator.com/#/](http://reader.newscombinator.com/#/) [2] [http://live.newscombinator.com](http://live.newscombinator.com) [3] [https://github.com/tomw1808/newscombinator](https://github.com/tomw1808/newscombinator) [4] [https://github.com/tomw1808/newscombinator- live](https://github.com/tomw1808/newscombinator-live)

<comment><AUTHOR> Thanks so much for all the info Tom! I'll look into everything shortly. Let me know if you want access to the sql db at any point, everything is being saved ;)

</comment></comment><comment><AUTHOR> It's not done yet but super useful as is! I'm thinking of adding a music section powered by hypem.

I would love to hear your thoughts! Do you like seeing posts from multiple websites in one feed?</comment>


Ask HN: Managing a larger group - <AUTHOR> I have some experience as technical lead for small teams (5-8), but I find myself in a position where my small team might have the opportunity to grow significantly.  There are lots of resources that discuss the transition from software engineer to manager.  What do people suggest to learn to succeed at the next rung up the management ladder? <comment><USER2> If you end up with a team of 20 people, there's no way you can manage them all yourself. I think the most important skills are to be able to:

1\. Hire technical leads and managers to manage groups of people (or promote from within your team, if you have people who can and want to do this).

2\. Delegate full responsibility to them for their teams' outcomes - don't try to micromanage their teams.

As a manager of managers, don't expect to be able to spend a lot of time doing hands-on technical work. And just because you're a good developer or technical lead doesn't mean that you'll be a good manager, or will like managing. After years of being a manager, I went back to being a developer.</comment>


WordPress claims Apple cut off updates to its free app because it wants 30% - <AUTHOR> https://www.theverge.com/2020/8/21/21396316/apple-wordpress-in-app-purchase-tax-update-store <comment><USER2> [https://www.theverge.com/2020/8/22/21397424/apple- wordpress-...](https://www.theverge.com/2020/8/22/21397424/apple-wordpress- apology-iap-free-ios-app)

Thankfully, they've reversed the attack... I hope Apple loses to Epic, they go way too far and this is just another example regardless of back-tracking.</comment>


A Perfect Storm at Uber - <AUTHOR> http://www.newyorker.com/business/currency/a-perfect-storm-at-uber <comment><USER2> > During an annual review a few years ago, I asked my employer about the > process for reporting juvenile and sexist behavior in the office. My manager > responded by suggesting that we meet specifically to discuss the issue and > determine new policies. The well-intentioned suggestion reminded me that, in > tech, women and underrepresented minorities are themselves often asked to > assume the mantle for diversity efforts—work for which they are rarely > compensated.

Give me a break. That's just startup culture. There's too much to get done; if you see work that needs to be done, you can't bleat the problem out into the ether and expect someone else to do it for you. You have to be willing to get your hands dirty and do it yourself.

<comment><USER3> Um, I think there's a difference between "hey we keep running out of coffee... we need a better coffee system" and "I think we have an abusive work environment."</comment></comment>


Why "free" is the millstone round Google's neck - <AUTHOR> http://www.technovia.co.uk/2010/10/why-free-is-the-millstone-round-googles-neck.html

<comment><USER2> I'm surprised he wrote blog post to respond to one person's comment on a different site.

I think it is a fair price point, given what you get out of the box. The other devices don't include the specs and keyboard that Logitech is.

You can make the argument that you don't need this beefy a system for Internet TV, but don't insult consumers' intelligence by saying that no one will buy this box/keyboard from Logitech because Google offers free services online.

I think consumers are smart enough to realize that while software is easily made free, hardware costs money.</comment>


Ask HN: How fingerprints can be used as evidence? - <AUTHOR> How fingerprints can be used as evidence when apple claims its touchid is only 1:50000 accurate? <comment><USER2> 1:50000 is not the probability that two fingerprints are identical, it's the probability that whatever features Apple's TouchID extracts from a fingerprint are identical.

Also, we accept way more noisy data as evidence, too. For example, blood group data may be used to push a case "beyond reasonable doubt"

<comment><AUTHOR> Ok. So I wonder what's the probability when police is doing fingerprint test. Is it way more?</comment></comment>


We built Shoply to kick eBays ass - does it? - <AUTHOR> http://shoply.com

<comment><USER2> I would add some type of Categories, the current trends bar is cool but If I want something particular it should be easier to look at all things for that particular area like electronics or clothing

</comment><comment><USER3> What? <http://cuongvnmshop.shoply.com/product/rau-qua-cu/></comment>


Pothole crushing invention is game-changer: What it teaches us - <AUTHOR> https://www.freep.com/story/money/business/columnists/josh-linkner/2018/04/07/josh-linkner-creative-business-solutions/493144002/ <comment><USER2> It sometimes feels as if I've entered into a strange simulacrum of reality when I end up on websites like that. It has the logo of a known (albeit pretty trashy) newspaper business at the top, but it is being entirely staffed by aliens.

These aliens don't know how tumors are extracted... because you don't cut perfect rounds out of the patient's body and fill it with bio-compatible spackle. Neither do the aliens think it odd to describe a concept in the same terms as actually physically instantiated concepts, what we would normally call "inventions." Finally, the aliens draw a nonsensical relationship between this non-existent invention and _my business_ and the lessons that I can learn from it.

I understand conceptually how we have ended up in this world, but every once in a while I am again surprised.

<comment><USER3> "The large truck uses artificial intelligence, Internet-enabled sensors, machine learning and advanced robotics".

It certainly is describing a very "tick all the buzzword checkboxes" machine. "The sensors are Internet-enabled? Such modern! (/doge)"

</comment></comment><comment><USER4> Video of (I think) the machine referred to: [https://www.youtube.com/watch?v=hi3OvXrboGs](https://www.youtube.com/watch?v=hi3OvXrboGs)

<comment><USER5> It's not clear to me that there's anything more than a video yet.

If you accept their invitation to visit their website, you will find a lot more very detailed CGI of ambitious civil engineering projects:

[http://www.dahirinsaat.com/en/2015-12-09-18-23-52/videos.htm...](http://www.dahirinsaat.com/en/2015-12-09-18-23-52/videos.html)

I could be wrong, but i suspect this company is some sort of extended flight of fancy for someone who is either good at CGI, or wealthy enough to afford a lot of it.

<comment><USER6> > I could be wrong, but i suspect this company is some sort of extended flight > of fancy for someone who is either good at CGI, or wealthy enough to afford > a lot of it.

Seems like it. Their YouTube is a treasure trove of unfundable and impractical bad ideas. It's an interesting blend of ekistics, vacuum tubes and conveyor belts and more conveyor belts. Their restaurant concept is hilarious.

The truck is basically a 3-axis CNC mill. It's a bad idea because:

\- road surfaces are complex and are not always flat

\- stuff underneath road surfaces are complex

\- a truck carrying all those slabs of granite all the time is going to cause more potholes

\- hardness differential between road asphalt and granite plugs is going to cause more damage down the road

All their other ideas are similarly easily refutable.

</comment></comment></comment><comment><USER7> >> The large truck uses artificial intelligence, Internet-enabled sensors, machine learning and advanced robotics

Oh to be playing buzzword bingo during this boardroom presentation!

It's unclear how "real" this solution is, but this type of invention can be very profitable. When I was a kid we had a family friend who built animal control fences along major highways in Western Canada. That means lots of rocky ground and traditional fence post pounders shatter a lot of posts; he said bids accounted for 10-15% waste where the post would hit a pumpkin-sized rock and get pounded into firewood. His innovation applied constant hydraulic pressure and vibrated the post instead of pounding it. Rocks would be pushed to the side and bubble up above ground, leading to breakage of < 1%.

Another example is daylighting services that excavate in complex areas, like around electric and gas pipelines. Rather than the super dangerous and disruptive act of digging it up with heavy equipment they use high-power water to dislodge the material and vacuum up the slurry. They can go into a busy city center, work around all sorts of infrastructure and barely disrupt regular activities.

I'm not sure how much ML, internet-enabled _anything_ or blockchain is required but these solutions are no less cool as far as I'm concerned.

<comment><AUTHOR> You're calling the Detroit Free Press trashy? You realize that this 'trashy' paper has won six Pulitzer prizes?

You may not realize that the author of this article is a well known serial entrepreneur (ePrize) who also started Detroit Venture Partners with billionaire Dan Gilbert and Magic Johnson.

Also eighteen years ago (though he barely knew me) got me my first meeting with a VC. He won't remember it because he does stuff like that all the time.

<comment><USER2> Actually I was referring to USA Today as trashy, and they've won even more awards: [http://static.usatoday.com/about/awards/](http://static.usatoday.com/about/awards/)

I appreciate the information you have provided and I'm sure he's a wonderful person. It's not the author I'm talking about, it's the entire system that encourages entrepreneurs to write articles like this for SEO and to participate in the attention economy.

</comment></comment></comment><comment><USER8> Rather than trying to bespoke solve things. Reduce the problem into a common interface.

<comment><USER9> Sounds like you're writing a design pattern!</comment></comment>


What Every Computer Science Major Should Know - <AUTHOR> http://matt.might.net/articles/what-cs-majors-should-know/ <comment><USER2> I would bump up compilers to their own level.

Implementing intepreters is cool. But the key value of studying compilers is that it provides you with the tools to build robust, extensible input processing (and, to a slightly lesser extent, data processing and output) code. If programmers are confident with using regular expressions and context- free grammars as appropriate, even if it's just coding up recursive descent parsers, I think they can produce much better input processing in their software.

And a large quantity of software needs to parse input, and possibly turn it in to different output, at some point in its execution.

</comment><comment><USER3> This reads to me much less like "What every CS major should know" than "Wouldn't it be nice if all CS majors knew...." What I mean by that is I'm not sure it's possible to learn all of that stuff in 4 years at any school anywhere, but it's all useful in certain very broad contexts.

Of course, I may lack perspective, having been a math major (or due to some other deficiency in my background), but I consider myself pretty comfortable with about half the list and somewhat familiar with about half the remainder. How much of it did I learn as an undergrad, though? Not very damn much, and I don't think I would have even been exposed to it all even if I had done CS instead of math.

<comment><USER4> Of course book-learning and in-class learning needs to be supplemented with a large amount of self-directed learning. As a professor I'm sure Matt is perfectly well acquainted with the limitations of a 4-year degree program.

</comment></comment><comment><AUTHOR> Keywords that I believe would be worth mentioning:

\- Lambda Calculus \- Reflective and Meta-programming \- Meta-object Protocol \- Closures \- Continuations \- Monads \- Arrows \- First-class Everything \- Stack and Register-based Programming \- XML \- Linear Algebra \- Fractal and Wavelet Image Compression \- Regular Expressions \- Clojure \- LaTeX

NB. The concepts to which the above keywords refer, may or may not have been covered by the article. The keywords themselves are however absent.

Additional reading suggestions:

\- Jon Bentley's Programming Pearls \- Tom Mitchell's Machine Learning \- Douglas Hofstadter's Gödel, Escher, Bach \- Brian Kernighan and Rob Pike's Unix Programming Environment

<comment><USER5> Great suggestions.

I was about to add GEB, but realized it doesn't quite fit under any category.

I could add a "general" reading list, but do you think it fits in a category?

<comment><USER6> I recommend The Incompleteness Phenomenon over GEB[1]. It thoroughly presents Gödel's Completeness and Incompleteness theories at a level appropriate to the collegiate Math or Computer Science student.

[1] [http://www.amazon.com/Incompleteness-Phenomenon-Martin- Golds...](http://www.amazon.com/Incompleteness-Phenomenon-Martin- Goldstern/dp/1568810938)

<comment><AUTHOR> The discussion of Gödel's theorems is not the only thing that makes GEB an interesting read.

What's more, GEB presents Aristotelianism vs. Platonism in the context of _computation_.

_That_ is a question CS majors should at least be aware of.

The question of whether computations can _ever_ be brought to have consciousness.

Then again, given my limited knowledge, I am far from being an authority on the topic and look forward to gaining more insight by hearing other opinions.

<comment><USER6> Undoubtedly. However, from a standpoint of teaching a class to Math and Computer Science students you can and should present the backing theories in full detail. Student benefit greatly from having a common write up on the proofs. The philosophical discussion can be saved for the classroom (with supporting supplementary readings).

</comment></comment></comment></comment></comment><comment><USER7> You mention version control in passing, but it probably deserves more emphasis. CS majors who aren't _comfortable_ using version control are likely to be at a disadvantage.

OCaml may work as an alternative to SML.

You could also mention Information Retrieval, alongside Machine Learning.

Compilers/parsing/interpreters/etc. could really be its own top level item.

Learning to use profilers / performance optimization. _The Practice of Programming_ covers this (and many other things!) quite well.

All in all, a great list. Probably also useful to suggest starting points for people (like myself) who are self-taught.

<comment><USER5> To be clear: I consider understanding version control essential. I'll emphasize it.

I agree that OCaml and SML are roughly interchangeable for educational purposes. I picked SML because it's slightly "cleaner."

As a compilers prof, I agree that compilers should be its own item, but politically, that's a tough sell. Teaching compilers needs to be sold in the service of another end for most faculties.

<comment><USER7> Cleaner, yes. I picked OCaml because it seemed easier to find information about, and more widely ported.

Also, I think most people fail to appreciate how useful compiler techniques are outside of "compilers". Even just knowing a little about lexing and parsing goes a long way.

For Prolog, I'd also recommend _The Art of Prolog_ by Sterling & Shapiro and/or Clocksin's _Clause & Effect_.

</comment></comment></comment><comment><USER8> I think probabilistic learning (or machine learning) should have its own section. Recommder systems, sentiment analysis, and graphical models do not really fall into the traditional understanding of AI. It is more stats than CS and logic.

<comment><USER5> I agree. I'll split it out into its own section.

<comment><USER9> Mitchell's ML book is showing its age a bit now. You may want to consider adding Bishop's _Pattern Recognition and Machine Learning_: <http://research.microsoft.com/en-us/um/people/cmbishop/prml/>

</comment></comment></comment><comment><USER10> many cs majors are underexposed to operational and system concerns

so i'd add Jim Gray's 'Why Do Computers Stop and What can be done about it' <http://www.hpl.hp.com/techreports/tandem/TR-85.7.pdf>

Also, 'Reflections on Trusting Trust' is a good one to add under security. I'd also recommend 'What's your threat model?' <http://iang.org/ssl/wytm.html>

</comment><comment><USER11> The only thing that I had in my undergrad education that I miss in this list is experience with an assembly language. It probably fits in best in the discussion on Architecture: programming in an assembly language, at the very least, makes programmers appreciate high-level languages and makes them think about the underlying hardware.

<comment><USER5> Great point!

I'll make that an explicit point under architecture and PL.

</comment></comment><comment><AUTHOR> Data Structures and Algorithms

\</comment><comment></comment><comment></comment><comment></comment><comment></comment><comment>

\+ Disjoint Sets and Union-Find

\+ In-Memory Sorting:

      - O(n * log n) (e.g. Quicksort)

      - O(n) (e.g. Bucket Sort)

\+ External Sorting (e.g. Polyphase Sort)

\+ B-Trees

\+ AVL Trees

\+ Graph/Tree Search/Traversal:

      - Depth-First

      - Breath-First

Reading:

<http://en.wikipedia.org/wiki/Introduction_to_Algorithms>

Discrete Mathematics

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

\+ Equivalence Relations

\+ Recurrence Relations

Formal Logic

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

\+ Propositional

\+ First-order

\+ Second-order

\+ Common Fallacies

Also

\----

\+ EWDs: Dijkstra's Systematic Manuscripts:

      - http://www.cs.utexas.edu/users/EWD/

</comment><comment><USER12> Missing: "How to install, use and administer Windows."

It is awfully sad how many of self-called "hackers" are unable to reconfigure an IP address on worlds most-popular desktop OS.

I have trouble trusting such "engineers" with ability to design great software when they couldn't even educate themselves on both major world perspectives on OS design.

<comment><USER13> For the sake of discussion, here's a counter argument to that. Windows is the most common desktop OS, as you note.

That means it is the one most likely to be officially supported everywhere you go. You get to your new job, you'll find a Windows box on your desk, set up by IT, configured the way they like it--and the way they want it to stay.

If you run OS X or Linux at home, and only use Windows on boxes provided and administered by someone else, why learn how to administer Windows boxes? None of us have time to become experts in every technology we encounter as users. Not knowing how to reconfigure an IP address on Windows seems no worse than not knowing how to change a spark plug on a rental car.

</comment></comment><comment><USER14> Do you think that malware deserves its own section? Or might it be simply a related field? I have yet to hear of a computer security course that does (real) forensics or encourages creativity to better understand the criminal mind.

</comment><comment><USER15> * Software engineering (version control) \- Is that the best lesson we have to offer?

You mention probability in the beginning, but make no mention of machine learning.

<comment><USER5> Machine learning gets a nod under AI.

</comment></comment><comment><USER16> Sadly, every computer science major should know that going into patent law is one of the better bets.

</comment><comment><USER17> The OWASP Top 10 Security Vulnerabilities.</comment>


Ask HN: SICP says "Program == Language Evaluator" What does this  mean? - <AUTHOR>

Chapter 4, 2nd page (in my edition)
"Metalinguistic abstraction -- establishing new languages -- plays an important role in all branches of engineering design. It is particularly important to computer programming, because in programming not only can we formulate new languages but we can also implement these languages by constructing evaluators. An evaluator (or interpreter) for a programming language is a procedure that, when applied to an expression of the language, performs the actions required to evaluate that expression.
It is no exaggeration to regard this as the most fundamental idea in programming:
The evaluator, which determines the meaning of expressions in a programming language, is just another program.
To appreciate this point is to change our images of ourselves as programmers. We come to see ourselves as designers of languages, rather than only users of languages designed by others.
In fact, we can regard almost any program as the evaluator for some language."
I didn't understand that last sentence at all. The authors give some examples(a constraint propagation framework etc) from earlier chapters, which they say are languages with their own primitives etc.
But the claim seems to be more generic (emphasis mine) "we can regard almost any program as the evaluator for some language"
I am having some trouble wrapping my head around that. What "language" would a typical web app be viewed as? What are its semantics?
Let us say I have an inventory tracking web app program which deals with, say users, warehouses, orders etc. How is this "viewable as a language"? How do I go about writing an evaluator for this "language"?
Where does a program stop being "viewable as a language" If I write a small program (say to calculate Fibonacci numbers, can that be "viewed as a language"?
I am missing something very profound here. If anyone has any insights, I would be very grateful.
Help? <comment><USER2> The user of the web app has a model and a desired result in mind and somehow needs to communicate this intention to the system. Viewed this way, it is clear that there must be a language in which this communication happens. Of course, we call this the interface. A user interface can be thought of as very high-level, very domain-specific language.

</comment><comment><USER3> The input data would be considered to be 'in' the language.

Think of the evaluator as a classic unix 'filter', the language it implements describes how the input should be formatted.

Just like when you write 'english', you expect the processor of your 'output' to be able to evaluate the english language so that it can produce meaningful output from your input.

I think it is as simple as that. But if it isn't I'm sure it won't be long before I'm corrected ;)

edited slightly for clarity (added the 'to be in' in the first sentence)

<comment><USER4> "The input data would be considered the language"

really? I would have thought that the question is one of equivalence between a program (not the input) and a language (evaluator)

so i read the quoted SICP fragment to mean

input --> program --> output

and somehow an equivalent

input --> (equivalent to program) language evaluator --> output

with the "language" (that is evaluated by the evaluator) and "program" being (somehow) "points of view". This seems to posit an equivalence between a program and a language evaluator.

Not really disputing your(jacquesm's) formulation, just providing an alternative. I don't completely understand the quoted paragraph either.

I find it a little hard to think of a randomly chosen program (say the HN webapp) as a language. The inputs would be submissions, upvotes (clicks), downvotes (clicks)etc. The output would be the display page and scores etc. How is this a language processor?

Seems to be one of those "zen koan" elements of SICP, which needs a flash of insight to understand. :-)

edited for clarity,

(1) responding to jacquesm's response "input -->(equivalent to program)language evaluator" substituted for "input --> language"

(2) expanded HN web app example in terms of explicit inputs and outputs

<comment><USER3> the program implements the language, but is not usually written in the language that it implements.

<comment><USER4> "The program implements the language, but is not usually written in the language that it implements."

I agree. Edited my formulation to make it more clear.

<comment><USER3> I think the problem is that the abstraction from 'program processes data' to 'program implements language' is a pretty tricky one to get your head around.

When you're using stuff like lex+yacc though you quickly realize that almost every processing that you do on structured data of some sort is actually equivalent to implementing a language.

</comment></comment></comment></comment></comment><comment><USER5> Hello,

I don't really have as deep an understanding of this subject as I'd like, so my explanation might seem rough, but here's my two cents.

You can say a language is a set of rules. Syntactic rules describe what proper sentences in that language look like, while semantic rules describe actions associated with syntactic constructs. The most basic of languages have simple semantic rules. For each language, you can have a program, which accepts as it's input a sentence, checks if it respects the syntactic rules of that language, and then performs the actions dictated by the semantic rules. This bit is clear, I think. Starting from the other direction, if you have a program, you can invent a language, which describes what the program does (semantic) and what are proper inputs (syntactic).

Some examples are in order.

* Suppose you have a program that finds out the maximum element in a sequence of comma separated numbers. What would the language associated with this program be? Well, it's syntactic rules are simple : a proper input sentence of this program's language is a list of comma separated numbers. The semantic action associated with such a sentence would be to find the maximum of the sentence.

* For your Fibonacci example. Even a simple function/program such as this defines it's own language. What would the syntactic rules be? A proper sentence for the Fibonacci function would be a single number (let's call it n). The semantic rule associated is calculating the nth number in the series.

* Of course, no list of examples would be complete without the poster children on language - program equivalence : regular expressions and compilers. Regular expressions are written in a small language that describes a program which, when given a certain input, says weather the input matches or doesn't. The syntactic and semantic rules are more complex than in our previous examples, but are well known. As for compilers, if we bend our minds and language a little bit, we can say that GCC is a program which receives a sentence written in the C programming language (so GCC's syntactic rules are C's syntactic rules), and produces an equivalent program in machine language (so GCC's semantic rules are to produce a machine language translation of a C program).

Anyway, I hope these few examples help.

<comment><USER6> I don't think this is really what is meant in SICP. It's not that the function takes in inputs, it's that the program itself is a language evaluator. Consider the following program:

        (define (add-squares x y)
          (+ (* x x) (* y y)))

This is a program which evaluates a squares-adding language in which we have a limited number of expressions. Such as:

        (add-squares 2 4)
        (add-squares (add-squares 4 3) 5)

etc.

</comment></comment><comment><USER6> I believe SICP's definition of a language involves these: means of simple data, means of combination and means of abstraction. Numbers, strings, data structures/objects are the simple data as you would find in any program. Functions and variables are means of abstraction. And what those functions and variables define also create new abstractions and means of combination. This is where our own language comes in. In this way, all your programs define languages, and to run them is to perform evaluation of these languages. So the program is the evaluator of a language we've defined in trying to describe our problem domain. I'd give examples but SICP gives ample.

</comment><comment><USER7> 1\. Turing machine: there is no difference between data and instructions. Meaning: any data can be interpreted as instructions (e.g. 1 + 1, GET /, [ 1, 2, 3], ...)

2\. Writing is turning ideas into meaningless symbols, reading is turning meaningless symbols into ideas.

3\. The alphabet consists of meaningless symbols and meaningless sounds.

Conclusion: any sensory cues can be interpreted, given meaning, and be converted into action; also by computers.

</comment><comment><USER8> Consider your example of a web app: if you implement the app following the REST principles, then the app simply evaluates a language of HTTP methods (verbs) and URIs (nouns). "GET /users" "POST /orders"...

Edit: And your program printing the Fibonacci numbers has a single verb whose semantics is to calculate and output.</comment>