Live data from Hacker News

Learn Ethereum smart contract programming

ethereumdev.io

51–60 of 244 posts

Re: Learn Ethereum smart contract programming

#51
post #47
post #34

Earlier quoted context omitted.

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

You are right, they solved the particular problem I highlighted with Modifiers. But the main question remains: Why don't they utilize the progess we made in decades of research for better programming languages? The argument that Solidity should be useable by the average programmer doesn't hold, in fact, typing makes programming easier since it clarifies data structures that are implicit in languages like JS.

I agree about typing but unfortunately I'm not a core dev. The compiler does a good job at warnings thought...

Re: Learn Ethereum smart contract programming

#52
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?

This is a very interesting retort.

No you don't have to. You just have to trust that the community has provided you with a secure, usable tool.

It is unreasonable to expect you to understand the engineering that goes into this kind of thing, if you are not a computer science educated individual. That is not the point of participation though. Developers don't have an intrinsic right to participate.

The exclusion because of complexity is unfortunate, but necessary. Making something that is decentralised, distributed, trustless, useful, simple (in terms of contract execution) and secure is nearly impossible without technical feat.

But you don't need to understand the mechanics of Ethereum or the EVM. The minimum you need to understand is tha Ethereum is used like fuel to pay for contract execution (GAS).

Solidity is not a hard language to grasp. It has simple inputs and outputs. Why not try playing with solidity code on the testnet compiler if you don't want to read the whitepaper.

https://ethereum.github.io/browser-solidity/

Or do a Udemy course.

:)

Re: Learn Ethereum smart contract programming

#53
Does this not seem like the kind of area where you don't want people writing hacky, proof of concept code?

The idea of people coding up weekend projects on Ethereum, putting them behind flashy websites and encouraging large scale adoption terrifies me, to be honest.

Re: Learn Ethereum smart contract programming

#54
post #41

Earlier quoted context omitted.

The logic exists on the block chain. It is executed on each and every machine that follows the chain. This is how executions are verified, 'everyone' has to agree on the outcome.

Sorry for being so uninformed but what happens if there is an error in the logic? Doesn't that mean that it's not possible to update the smart contract?

Basically yes, and this is reasonable from a security perspective, otherwise every smart contract would basically have a trusted administrator.

But in many cases you do want some ability to upgrade the code, and then you simply program in that ability by creating a repointable proxy with whatever authorization logic you want.

Re: Learn Ethereum smart contract programming

#55
post #44

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 world does not exist yet With a big emphasis on "yet". Serious question: are the "halting problem" and the "yet" in your sentence dependent on each other? I.e., don't we need to first solve the halting problem before we can manage to write 100% bug-free programs?

There is no need to solve halting problem in general case. We can have heuristics that do not accept programs they are not sure about and it is programmer's job to make correctness more obvious.

Re: Learn Ethereum smart contract programming

#56

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.

We put our lives in the hands of code written by humans every day, e.g. cars, planes, trains, etc. Perhaps the permanence of executing solidity contracts will at least motivate some safer, more secure practises, in the same way that the permanence of death does when programming vehicles that carry human lives. It would be cool to see APIs for compiling Solidity contracts from safer languages with more concise type sy…

> We put our lives in the hands of code written by humans every day, e.g. cars, planes, trains, etc.

Except that code is regulated and tested to the degree average eth enthusiast making this point either not aware of, or intentionally omits.

Re: Learn Ethereum smart contract programming

#57
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…

Of course there are a lot of technical questions. To answer this one, the logic is distributed and executed on every full node. It's like one big distributed database where a transaction can also create a stored procedure.

Re: Learn Ethereum smart contract programming

#58

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.

They might still be a good idea, you just have to live with that risk. World is full of risks anyway and you might die tomorrow in a traffic accident. Sometimes risks are worth taking, such as leaving your apartment and risk walking under a car.

Give all your money to me, and I'll return it million fold in a year. I know it's risky, but you can die tomorrow in an accident anyways, so why not.

Before you write a comment with "why not", apply that to eth first.

Re: Learn Ethereum smart contract programming

#59

Does this not seem like the kind of area where you don't want people writing hacky, proof of concept code? The idea of people coding up weekend projects on Ethereum, putting them behind flashy websites and encouraging large scale adoption terrifies me, to be honest.

As the technology evolves you need more and more people fluent. Most people will never write live code involving million of dollars but it might help people understanding the techno and the code behind... This is an introduction and as more and more article will be written the learners will be more skilled and aware of security and good practices

Re: Learn Ethereum smart contract programming

#60

Earlier quoted context omitted.

We put our lives in the hands of code written by humans every day, e.g. cars, planes, trains, etc. Perhaps the permanence of executing solidity contracts will at least motivate some safer, more secure practises, in the same way that the permanence of death does when programming vehicles that carry human lives. It would be cool to see APIs for compiling Solidity contracts from safer languages with more concise type sy…

> We put our lives in the hands of code written by humans every day, e.g. cars, planes, trains, etc. Except that code is regulated and tested to the degree average eth enthusiast making this point either not aware of, or intentionally omits.

That's why you need to get a good education and accessible education on the subject...
Post reply on HN