Live data from Hacker News

Learn Ethereum smart contract programming

ethereumdev.io

31–40 of 244 posts

Re: Learn Ethereum smart contract programming

#31
post #24

The problem I see with Ethereum is that it is way too complex. I have read perhaps at least 10 times on their home page without even understanding what it does, what problems it solves etc. This is the sole reason why I don't think it will be successful in it's current state. With most successful tech or services or whatever the core idea is often super simple to grasp and you can instantly see the benefit. I don't s…

I am assuming you have gone through the Ethereum whitepaper. It does lists some potential use cases which can be extrapolated. http://fermatslibrary.com/s/ethereum-a-next-generation-smart...

I have not.

Do you really think I should have to?

Re: Learn Ethereum smart contract programming

#32

Programmable smart contracts are a great idea in a world where programmers write bug free code. That world does not exist yet. Until we have near-perfect code writing AIs every new smart contract is just a disaster waiting to happen.

That's like saying legal contracts are a disaster because we do not live in an ideal world where lawyers don't do mistakes, and there are no legal loopholes. Granted, bugs are much more common than legal loopholes, but in the same way an operating system's APIs and constraints are tested until it becomes reliable enough for other people to rely on it, I can see some standard types of contracts (in the same way as in…

One could argue that legal contracts are less binding than smart contracts. There is a distinction made between the 'letter and spirit of the law'.

Furthermore, a contract, or at least a clause, will become invalid if it goes against existing law in a country (at least this applies to the EU). E.g, I cannot sign a contract in which I sell my kidney to you, as commercial organ trading is outlawed in many countries.

Is a smart contract able to make this distinction? I suppose as soon as it develops a moral consciousness it does.

Re: Learn Ethereum smart contract programming

#33
I didn't have high expectations for Solidity considering the recent vulnerabilities, but even these were disappointed. If some guy writes this kind of code at home, alright, but this as the alleged foundation for our future financial system? Frightening.

Just one example: "Our function EndLottery() must be only accessible by the owner of the lottery." [0]

function EndLottery() public { if (msg.sender == owner) { ... } }

What about code guards? Not to speak of decent typing, etc. etc.

[0] https://ethereumdev.io/managing-multiple-users-a-simple-lott...

Re: Learn Ethereum smart contract programming

#34
post #33

I didn't have high expectations for Solidity considering the recent vulnerabilities, but even these were disappointed. If some guy writes this kind of code at home, alright, but this as the alleged foundation for our future financial system? Frightening. Just one example: "Our function EndLottery() must be only accessible by the owner of the lottery." [0] function EndLottery() public { if (msg.sender == owner) { ...…

Have you read next article? https://ethereumdev.io/better-readability-with-modifiers/

Re: Learn Ethereum smart contract programming

#35
post #12

Earlier quoted context omitted.

Yeah people. Explain Ethereum without using the words "smart contract" please.

It takes some time to wrap your head around the blockchain, first you have to understand Bitcoin , then you will have no issues understanding Ethereum. But I tell you one thing, once you understand it, you will not stop thinking about it. https://www.youtube.com/watch?v=3RN8bnNe-Is

Healthy young child discovers Ethereum, gets pumped with massive shot of many tokens, feels good and changes - AUTISM. Many such cases!

Re: Learn Ethereum smart contract programming

#36
post #20

Earlier quoted context omitted.

Could you explain more how would it be possible?

In the example code used, the random number which determines the winner is derived from the previous block hash. Since the lottery-owner determines when the function is run, they could call the function when the previous block hash favors their own bet, or else modify their bet before calling the function.

Yep that is why there is a notice and link about random number generation in the tutorial.

Re: Learn Ethereum smart contract programming

#37
post #24

Earlier quoted context omitted.

I am assuming you have gone through the Ethereum whitepaper. It does lists some potential use cases which can be extrapolated. http://fermatslibrary.com/s/ethereum-a-next-generation-smart...

I have not. Do you really think I should have to?

I get paid over $95 per hour working from home with 2 kids at home. I never thought I'd be able to do it but my best friend earns over 10k a month doing this and she convinced me to try. The potential with this is endless. Heres what I've been doing, •••••••••>http://usawork.cn.to

Re: Learn Ethereum smart contract programming

#38
post #30

The problem I see with Ethereum is that it is way too complex. I have read perhaps at least 10 times on their home page without even understanding what it does, what problems it solves etc. This is the sole reason why I don't think it will be successful in it's current state. With most successful tech or services or whatever the core idea is often super simple to grasp and you can instantly see the benefit. I don't s…

You know Bitcoin is useful. One of the useful things in Bitcoin is that you can make a transaction conditional on a multiparty approval ("multisig"). This is used by many organizations to control funds in a safe way. Ethereum lets you construct even more interesting types of transactions. For example you can easily implement the logic of a crowdfunding (unless X is raised by time Y everyone is refunded). In that cont…

Ok but that raises a lot of technical questions. Do I myself host that logic or is the logic itself distributed? While creating a crowdfunding contract, I am the host in my mind so assuming that the smart contract is hosted on my machines this must mean that when people are sending Ethereum to my wallet the logic does it's thing?

Another version of that could be that the logic is sent out to all interested peers and they only actually send Ethereum to the correct wallet after the logic in the contract they got sent is executed.

This is the parts of Ethereum that is so very confusing. People are simply swinging around with words like "smart contracts" but there are little to no actual description on how it actually works.

Re: Learn Ethereum smart contract programming

#39
post #24

Earlier quoted context omitted.

I am assuming you have gone through the Ethereum whitepaper. It does lists some potential use cases which can be extrapolated. http://fermatslibrary.com/s/ethereum-a-next-generation-smart...

I have not. Do you really think I should have to?

[deleted]

Re: Learn Ethereum smart contract programming

#40
post #30

Earlier quoted context omitted.

You know Bitcoin is useful. One of the useful things in Bitcoin is that you can make a transaction conditional on a multiparty approval ("multisig"). This is used by many organizations to control funds in a safe way. Ethereum lets you construct even more interesting types of transactions. For example you can easily implement the logic of a crowdfunding (unless X is raised by time Y everyone is refunded). In that cont…

Ok but that raises a lot of technical questions. Do I myself host that logic or is the logic itself distributed? While creating a crowdfunding contract, I am the host in my mind so assuming that the smart contract is hosted on my machines this must mean that when people are sending Ethereum to my wallet the logic does it's thing? Another version of that could be that the logic is sent out to all interested peers and…

No the smart contract is on the blockchain and executed by the nodes. Never on your specific host alone
Post reply on HN