Better HN
topnewbestaskshowjobs
Log inSign up

splintercell

840 karma · joined Dec 21, 2012 (13y ago) · 954 submissions

Submissions

comment 9y ago · link · parent

Elm is so amazing. It isn't as amazing when you just try out it's tutorial, but if you try to build an actual application in it, especially if you are a single programmer working on a project.

In my experience whenever I worked on a JS project on my own, there was an upper limit to how far I could keep writing the code on my own. After that, I had to spend time in doing other things (like writing Integration tests, lots and lots of unit tests, or refactor existing code because I realized that there are many issues unveiled).

But now, with Elm, it's like a whole set of unit tests are being written at the time of writing code which take care of plenty of common errors usually made due to lack of a good type system.

Add to that the usage of Maybe types (which are very beneficial in avoiding some UI antipatterns[1]), and the Reactive Programming pattern, I feel like I am writing a lot less code than what I am used to writing in JS projects.

I highly recommend Elm to anyone who wants to write a personal project, you'd see what benefits I'm talking about.

1. http://blog.jenkster.com/2016/06/how-elm-slays-a-ui-antipatt...

comment 9y ago · link · parent

Lol, I heard it differently, 'In South they are supposed to hate us in theory but not in practice, in north they are suppose to love us in theory but not in practice.'

comment 9y ago · link · parent

Pretty neat looking and interesting site.

comment 9y ago · link · parent

> I know a genetic counsellor who describes 23andMe's carrier screening tests as "the bane of their existence".

Do you really think a product can be built (for a reasonable price) which ensures that your genetic counselor does not get stupid questions from the consumers of the product?

That's like saying <My friend who works in tech support describes cheap computers as "bane of their existence">.

comment 9y ago · link · parent

It depends, if I start a company and offer a share contract where I am the BDFL(Benevolent Dictator For Life) of the company, then any shareholder purchasing the stocks is buying it by agreeing to that term.

Sure the shares will not reach as high of a valuation as they would if shares didn't come with this condition, but there is no claim whatsoever that somehow shareholders somehow gain more power over the company than what they agreed to when purchasing the shares.

comment 9y ago · link · parent

The new 27" 5K iMac is upgradable to 64GB

comment 9y ago · link · parent

I hate Lyft, if Uber is evil then Lyft is just dumb.

I started using Lyft because they allowed me to tip the drivers after a ride. So I preferred Lyft whenever I knew I would be a difficult passenger (like when I have to take my cat to the Vet or my wife is sick and she might have (and did) throw up in the car). The idea was that I would just tip the driver at the end of the ride for the extra trouble caused.

Months later when my ratings were tanked, some driver told me that I had really low rating on Lyft and that I seemed like a nice guy to have the low ratings. It turned out Lyft pooled the tip money together and paid the driver at the end of the week. So now tipping had no meaning other than 'just give your driver some extra money anonymously'.

I attribute this behavior to simple stupidity on the part of Lyft. Since then I just use Uber and pay all my tips in cash everytime I think it would be a problem.

comment 9y ago · link · parent

> Most of Canada's visible minorities come from Asia.

Grandparent comment is talking about how most Canadian immigrants are filtered via k-selection.

On the other hand in America the Black and Hispanic minorities did not arrive here via a k-selection strategy, however Asian immigrants did, and it is reflected everywhere.

comment 9y ago · link · parent

> ... which is perfectly reasonable. What's your point?

It shouldn't be this way. It serves no purpose. You first claim that everybody has access to resource X at a reasonable price (because we don't want to discriminate against poor people), then when resource X starts to run out, they enforce bans instead of charging more to people willing to pay a premium (and getting the resource first) and then using it to expand production and access to everyone.

This story plays out everywhere, whether in Soviet Russia or in California or in NHS.

comment 9y ago · link · parent

Never said that

comment 9y ago · link · parent

Labor shortage does not mean what you think it does. If we use the logic you presented, then we can say "There is no such thing as a shortage of Cabs, try offering $100 for a cab ride and there will be people pulling their personal cars next to you to take you where you want to go". Well Duh.

A shortage of a good means that there if there can be pending buy and sell orders in a market book, then there are a lot of pending buy orders, but just not for the price at which sellers are willing to sell.

What SV is saying that there are a lot of people who would buy a lot of goods, if they can be produced cheaply (and it isn't because they're poor, it's just because the consumers don't value that good that much). If Netflix raised their fees to $90 per month then it means that a lot of people would cancel their subscription (and not all would do because at $90 they will be unable to meet their rent).

comment 9y ago · link · parent

> Your initial claim was that the working class is "staunchly conservative".

Quote me please

comment 9y ago · link · parent

Doesn't change my question a bit.

Remember my question isn't, "Since these NASA scientists say that Climate change isn't real, therefore it isn't real". So don't try to answer THAT question.

comment 9y ago · link · parent

<The group, which includes seven Apollo astronauts and two former directors of NASA’s Johnson Space Center in Houston, are dismayed over the failure of NASA, and specifically the Goddard Institute For Space Studies (GISS), to make an objective assessment of all available scientific data on climate change.>

http://www.businessinsider.com/nasa-scientists-dispute-clima...

http://www.dailymail.co.uk/sciencetech/article-2814701/I-sce...

comment 9y ago · link · parent

> trying to sell candidates "you want to have a beer with"

Yeah and that's nothing but accidental properties of their candidates. It's like how almost all Presidents have good hair(ok after this election I should say 'not bald'). Is being not-bald an essential property of being the President? No, but if the other side keeps putting up candidates who are bald and your guys all have good hair, then you will talk about how your candidate appears more 'trustworthy'.

comment 9y ago · link · parent

> If you consider democrats liberal then perhaps you could help me understand why 88% of african-americans voted for Hillary?

Different priorities. A lot of astronauts and NASA scientists don't believe in anthropogenic nature of climate change. Are they backward, anti-reason, anti-science religious individuals? Perhaps you can help me understand why?

comment 9y ago · link · parent

To explain people in another way, the conservatives tend to be religious and liberals tend to be atheists/secular. This argument of liberals being 'logical and rational' vs conservatives being 'anti-intellectual and anti-science' is the same thing if conservatives said that they are the party of 'God and morality', whereas liberals are the supporters of 'Satan and immorality'.

This is what we get when one side gets to frame the debate. The whole debate on science and reason is framed by the liberals, so they get to decides the rules here. According to these rules, you need to look at 'scientific evidence' of things in order to form your opinions.

My claim has been that people form their opinion first, and then they look at the scientific evidence. Jonathan Haidt has done some work on this in his book righteous mind[1]. In addition to it, the concept of 'Mental Models' is another reason why either side accept 'proofs' or evidence for their opinion.

A simple example is the resurgent 'Flat Earth Theories'. Most of the people would reject any attempts to prove that the Earth is flat. Only a small minority of people who believe that earth is round, spend their time debunking and debating that Earth isn't flat.

To the rest of us, we don't even go around and say "There is some debate whether Earth is round" even though a group of individuals is very heavily advocating for it and writing pages and pages worth of material on it. Would a rational and scientific minded person just reject 'evidence' on it's face value? Apparently we do because that 'evidence' isn't really proper evidence. Saying that there is a conspiracy among the world authorities to claim that Earth is round isn't a proper hypothesis, not because it requires it doesn't sound feasible.

The same thing goes with why the right rejects what left deems as 'scientific evidence and reason'.

1. http://righteousmind.com/

comment 9y ago · link · parent

> And who is deciding what that intent? Right now, the mob, so the parent is right :)

Considering we can decide to abolish the constitution in America (or in any country) any time, does that mean we don't have a constitutional republic in America? Technically we can never say that we have a system X which is not Mob rule because the mob can always abolish it.

Literally speaking, there is no such thing as 'code is law' because in your definition there is no such thing as law, because anything which can be modified by the mob is not law and everything can be modified or abolished by the mob.

comment 9y ago · link · parent

> But, of course, that's not what happened, and there's no hypothetical in play.

Literally what happened (and there is no way of saying it otherwise irrespective of how you approach it). A group of developers forked Ethereum into their own blockchain, so all the investors evened up with currency in both the chains. Then people sold their 'original ethers' and moved to the new ethers.

The current price of original Ethers (known as Ethereum Classic) is 90% less than what it used to be.

> Ethereum sacrificed its principles to stop/censor a contract, and still keeps "unstoppable uncensorable contracts" on the website.

You do understand that Ethereum is not like Apple or some other organization. It's a technology and "IT" does not have a website. You're talking about Ethereum.org which is the website of Ethereum Foundation.

And maybe I shouldn't presume knowledge on other people's (like your) part, but in a decentralized technology like Bitcoin or Ethereum, thousands of miners (or in PoS system stakers) are the real entity here. Miners too merely follow the price. This is why initially when Hard Fork happened, a lot of miners went back to mining Ethereum Classic after momentarily jumping to the forked blockchain. Then when it was clear that the market/investors don't support the idea of letting a theft continue, they jumped back to Ethereum forked chain.

Clearly Ethereum Classic hasn't 'sacrificed' it's principles, they too have a foundation, and you're free to invest and use ETC.

If I can write a piece of code which can be used to steal your emails and bank accounts, then your emails and bank accounts are already 'exposed'. They don't 'become exposed' when I write the tool.

Ethereum blockchain didn't become something different fundamentally when this hard fork was implemented. If you consider hard fork as 'mutating the blockchain' (which I heavily disagree) then it didn't become mutable when the hard fork was implemented, rather it was mutable from the day the it was created.

And funny thing is, by that measure, literally there is no such thing as immutable blockchain. Bitcoin can be mutated in the same way Ethereum was.

comment 9y ago · link · parent

> Yes, the website says "unstoppable uncensorable contracts" and we stopped one.

Let's say that Hard fork never happened, lets say if tomorrow due to a certain smart contract, 90% of the Ether holders sell off, and go join Lisk or some other Smart contract platform, would you say because 90% of the Ethereum supporters sold off their currency, therefore the smart contract has been 'stopped' and that they should remove "unstoppable uncensorable contracts" from their website?

comment 9y ago · link · parent

> The analogy to the legal system is that mob rule supersedes (digital) contract law and property rights.

Imagine if you and I wrote a contract, and in the contract, there is a typo which says that I will pay you $5 gazillion for an iPhone, then that doesn't mean that the courts must enforce it. Clearly, it doesn't follow the 'intent' of the parties.

Now, what if the other side truly signed the contract because they thought that their iPhone was being bought for 5 gazillion dollars, well this is why we don't "JUST" communicate via the contract. We communicate and perform negotiations via other human channels and the legal contract is a formalized expression of our communication.

Same thing goes with smart contracts. I don't intend to use Smart Contracts because the missing 11th commandment said: "Thou shalt obey the Legal/Smart Contracts to the word". I want to use Smart Contracts because they would be an extension of legal contracts taken to the decentralized + technology domain.

Literally, nobody put their money in the DAO because they thought that if a person puts in $1000 in the DAO then he should be able to take out $10 million if he is clever enough.

Lemme put it this way, had the hard fork not happened, but nearly 90% of the Ethereum holders quit Ethereum after that and joined say Lisk or some other smart contract platform, (which meant that the hacker's bounty would have been decimated, would you still say that 'mob rule has superceded the contract law and property rights'?

comment 9y ago · link · parent

I am calling your view of 'code is law' as a distorted view because it isn't that the other side doesn't think that code is law, it's just what do we consider 'the law' to be.

In my world view, if you and I wrote a contract, and in the contract, there is a typo which says that I will pay you $5 gazillion for an iPhone, then that doesn't mean that the courts must enforce it. Clearly, it doesn't follow the 'intent' of the parties.

Now, what if the other side truly signed the contract because they thought that their iPhone was being bought for 5 gazillion dollars, well this is why we don't "JUST" communicate via the contract. We communicate and perform negotiations via other human channels and the legal contract is a formalized expression of our communication.

Same thing goes with smart contracts. I don't intend to use Smart Contracts because the missing 11th commandment said: "Thou shalt obey the Legal/Smart Contracts to the word". I want to use Smart Contracts because they would be an extension of legal contracts taken to the decentralized + technology domain.

Literally, nobody put their money in the DAO because they thought that if a person puts in $1000 in the DAO then he should be able to take out $10 million if he is clever enough. It wasn't a bounty contract. If that was known beforehand, then there is no way it would have accrued $150 million worth of ethers.

> My view is basically the person who found a flaw in TheDAO code deserved to be rewarded for it, even if it was not the intent of TheDAO, because I was sold (perhaps improperly) on the code being the arbiter, not people or politics.

Lemme put it this way, had the hard fork not happened, but nearly 90% of the Ethereum holders quit Ethereum after that, (which meant that the hacker's bounty would have been decimated, would you still say that Ethereum is never going to succeed because they didn't honor the hacker's bounty?

comment 9y ago · link · parent

> What's to prevent a similar situation in the future and why should anyone believe that to hold?

Look, ETC is still there, and currently it's at its all time low. Clearly the market didn't care about the DAO situation.

In other words, if a company makes a decision X which you think is a bad decision, and nearly none of their customers oppose them for it, did they really make a bad decision?

If tomorrow another DAO debacle happens and another such thing happens, I for one expect Ethereum Foundation to take steps to safeguard the integrity of the network by thwarting the theft.

If after Mt Gox theft had bitcoin been forked to undo that theft, then I would have jumped on to the forked chain (again no promises, but in principle I'd have gone to the forked chain).

On the other hand I presume you'd have stayed on the non-forked chain.

In other words, there are two kinds of cryptocurrency investors. You and I belong to two different groups. If you like Ethereum but are worried about 'code is law' violation, then please go join ETC.

comment 9y ago · link · parent

> For me, the biggest blow to ETH is the revelation that "the code is NOT law".

Considering Ethereum Classic has all the features of ETH and it follows whatever your distorted definition of 'code is law' means, the fact that ETC is at it's all time low (compared to its price in ETH)). The question remains if ETH violated 'Code is Law', then how come market doesn't care.

Clearly the biggest blow to ETH is NOT the DAO fork. If ETH is not above bitcoin, then among all the reasons I can list, its decision to hard fork is not one of it (because if that is the case then ETC would have been the market leader).

comment 9y ago · link · parent

I came here to mention 'Deep work' (which I found a very effective way to do and talked about on HN previously [1]) AND another tactic which is giving me good results.

The trick I found to complete things is:

Do not switch ladders of abstractions. When working on a modern web application (with backend, frontend, css, testing etc) if you start with writing backend API calls, then just write all of them first. Starting with the API call for /user', /signup, /login, /compose, /rate, /play. Don't worry about it working. If you do TDD then fine, but if you don't tests before you write the code, then avoid writing tests until you're done writing the basic code for your API. Then you write tests for it and make sure that each endpoint at least works.

Then write E2E testing for it(for the backend). E2E tests are a great way to build your app with it's core functionality full working and validated. In other words, write unit tests which first call /signup, then /login, then /compose then /play (which is I presume one full flow of a user). This will help you figure out issues with your API and it kinda feels like writing a full app.

Once you're done with testing, then write the frontend, just simple HTML, don't worry about CSS. Don't try to grab React + ES6 + Redux boilerplate or things like that. Just go with the simplest thing. Even if after every action user has to refresh to page, so be it. Oh you heard about CycleJS and think that you should be using that instead? Well guess what, you purposefully chose a really terrible technology to build this app, so once you're done making your app in that crappy tech, then you can rewrite it in CycleJs or anything else you want.

This way, even if you abandon your CycleJS rewrite effort halfway, you'd still have a completed project(and trust me, you will never let your app be stuck at static HTML with no CSS). Chances are that you'd abandon it, when you've already written your app in CycleJS but made a new rewrite effort to write it in Vue.JS.

Basically idea is, you think in terms of one layer at a time, and you defer all desires to refactor things until you are done finishing that layer.

1. https://news.ycombinator.com/item?id=13813173

comment 9y ago · link · parent

> Uber is fucked

Uber is definitely not fucked because customers don't wanna use Uber.

comment 9y ago · link · parent

Quoting myself from another comment:

I have been reading 'Mental Models' by Philip Johnson-Laird where the author argues that we apprehend the world by building inner mental replicas of the relations among objects and events that concern us, and then we act according to these models.

This book tries to argue against the idea that we think in terms of logical propositions. Take for instance this example Steven Pinker in this lecture[1] presents a logical problem which stumps a lot of people. However, when people are presented with a 'real world' version of the problem they do a lot better. Phillip Johnson-Laird uses the same example and some other studies to claim that it is because people think in terms of mental models and not in terms of logical/deductive propositions.

Another example:

If J Edgar Hoover was born in Russia, then he would have been a communist.

If J Edgar Hoover was a Communist then he would have been a traitor.

Therefore if J Edgar Hoover was born in Russia then he would have been a traitor.

Clearly the transitivity doesn't follow here, and this is not the only example of apparent transitivity failure, but nearly everyone can point out the logical problem with the transitivity inference in the third statement, but a lot more people would fail it if presented in abstract terms.

This has been a very ameliorating book for me. It explains many things regarding people's beliefs. When people present moral outrage, this must mean that they need to have that mental model in their minds. Take for instance if you started to work in a store, and the manager informs you of the following rule:

> If the receipt is for more than $30 worth of goods, then it must have manager's sign on it.

Most people would have no problem in understanding and following that rule. But if the rule was following:

> If the receipt is for less than $30 worth of goods, then it must have manager's sign on it.

To most people this is confusing and non-sensical. To most of us, we would try to think for a reason behind this rule. Most probably come up with the explanation 'There must be a lot of theft/fraud going on for smaller receipts', or something which explains this anomaly.

This is the same reason why everytime it snows in the middle of April, conservatives are like "Oh god, the Global Warming is killing me", and whenever there is a hot day in winter, it's the liberals who take it as a proof. Because to all people, the data which doesn't fit into their mental model is noise. And all theories which people ascribe to, somehow fit in their broader mental models.

tl:dr; It isn't that there are limitations to reason, rather everyone uses mental models to separate signal from noise. '10 Photographs which prove that ghosts exist' are just noise to us unless the photos come with reasoning which provides 'patches/updates' to our mental model.

1. https://www.youtube.com/watch?v=1PXy3vWZiJo

comment 9y ago · link · parent

Can bot writers make a difference? Well they did.

comment 9y ago · link · parent

I have been reading 'Mental Models' by Philip Johnson-Laird where the author argues that we apprehend the world by building inner mental replicas of the relations among objects and events that concern us, and then we act according to these models.

This book tries to argue against the idea that we think in terms of logical propositions.

Take for instance this example Steven Pinker in this lecture[1] presents a logical problem which stumps a lot of people. However, when people are presented with a 'real world' version of the problem they do a lot better. Phillip Johnson-Laird uses the same example and some other studies to claim that it is because people think in terms of mental models and not in terms of logical/deductive propositions.

Another example:

If J Edgar Hoover was born in Russia, then he would have been a communist.

If J Edgar Hoover was a Communist then he would have been a traitor.

Therefore if J Edgar Hoover was born in Russia then he would have been a traitor.

Clearly the transitivity doesn't follow here, and this is not the only example of apparent transitivity failure, but nearly everyone can point out the logical problem with the transitivity inference in the third statement, but a lot more people would fail it if presented in abstract terms.

This has been a very ameliorating book for me. It explains many things regarding people's beliefs. When people present moral outrage, this must mean that they need to have that mental model in their minds. Take for instance if you started to work in a store, and the manager informs you of the following rule:

> If the receipt is for more than $30 worth of goods, then it must have manager's sign on it.

Most people would have no problem in understanding and following that rule. But if the rule was following:

> If the receipt is for less than $30 worth of goods, then it must have manager's sign on it.

To most people this is confusing and non-sensical. To most of us, we would try to think for a reason behind this rule. Most probably come up with the explanation 'There must be a lot of theft/fraud going on for smaller receipts', or something which explains this anomaly.

This is the same reason why everytime it snows in the middle of April, conservatives are like "Oh god, the Global Warming is killing me", and whenever there is a hot day in winter, it's the liberals who take it as a proof. Because to all people, the data which doesn't fit into their mental model is noise. And all theories which people ascribe to, somehow fit in their broader mental models.

1. https://www.youtube.com/watch?v=1PXy3vWZiJo

comment 9y ago · link · parent

I read A LOT on pocket (they sent me an email that I was one of their top 1% readers, with having read 1.7 million words).

For me it's a great time saver, I see some interesting article during work, but instead of wasting my time on it during work, I save it for later. Granted I get no signal during the subway where Pocket becomes a really useful app, but it results in me being a lot more efficient with reading.`

1
222324
32