
Ethereum programming for web developers - aaron_p
https://happyfuncorp.com/whitepapers/webthereum
======
increment_i
I've been dabbling recently, and as I've said before I'm quite put off by the
limitations of Ethereum. As it stands now, it's main use case appears to be
the development of new cryptocoins, perhaps voting applications..? And yet,
every now and then you come across a nugget of true insight when working with
the Ethereum protocol, for instance the gas payments to nodes to run code
effectively should stop DDoS attacks since it would require vast sums of money
to disrupt the network. It remains to be seen how valid this idea is in
practice, but you could look at ideas like that and say, "Yeah, that seems
like a step forward."

Anyways, if Ethereum really will become Web 3.0, then comparatively speaking
I'd say we're not even in the 56k modem era yet.

~~~
hnmullany
Once there is a proper infrastructure for trusted Oracles, there will be lots
of interesting applications: small group crowd funding, payment distribution
from trusts,execution of wills.

~~~
WJW
While I would love for this to be a thing, most cryptocurrency enthusiasts
seem to distrust anything and everyone. How would one develop an oracle
trusted enough that it would be accurate while not being vulnerable to sudden
betrayals? There are for example plenty of stories from Eve Online (closest
example of a lawless/trustless universe) where a very trusted middleman
suddenly changed behavior when the benefits became great enough.

Especially when a cryptocoin includes strong anonymity, betrayal has very low
downside since no retribution would be possible. However even if such
anonymity is not present, it may not be possible to get retribution if the
entity on the other side is (for example) the mafia.

~~~
koolba
Do you have a link for the Eve Online example?

~~~
wrinkl3
[http://www.ign.com/articles/2009/07/09/eve-online-bank-
scand...](http://www.ign.com/articles/2009/07/09/eve-online-bank-scandal)

This is a classic example in which a user ran an in-game bank for some time,
before making away with all of his clients assets.

------
ainiriand
Shameless self promotion. Today I rolled out my first tutorial to get you
started on smart contract development.

>
> [https://news.ycombinator.com/item?id=16176714](https://news.ycombinator.com/item?id=16176714)

~~~
ghostbrainalpha
Very cool!

Sorry for the basic question, but is it legal to do a lottery application like
this with Crypto Coins because they aren't real money?

~~~
asciimo
That's a great question, as are many others around taxing cryptocurrency
transactions. A quick googling indicates that, in the US, gambling with
anything of value constitutes gambling.
[https://www.law.cornell.edu/uscode/text/31/5362](https://www.law.cornell.edu/uscode/text/31/5362)

------
tabeth
Can someone describe a few applications of blockchains in real world
applications that _cannot_ be implemented without a blockchain? I'm really
struggling to come up with even a single case. I thought some sort of secure
voting mechanism would be a good candidate, but that too could be done with an
immutable database.

EDIT: Besides crytocurrencies, I mean.

~~~
carver
The most natural follow-up to currencies on a blockchain are assets, like a
ticket to a concert, shares in a company, or a deed to a car.

Once more assets are represented this way, many kinds of applications would be
valuable. One simple and powerful example is escrow.

Enabling one-shot, instant escrow with strangers on the Internet has real-
world benefits. For example, the current safest way to exchange Burning Man
tickets is to meet someone in person, inspect the tickets and cash, and trade
them by hand. If they were a blockchain asset, they could be traded nearly
instantly and safely across the world. With a stable dollar asset, the
official escrow service could even make it more difficult to sell above face
value.

~~~
TheLegace
I like your idea about using blockchains to represent assets. I have been
thinking about something along those lines. But a whole set of interesting
problem arises. That being the legal issues surrounding transferring ownership
of assets globally. Not to mention issues of fraud and recourse when an
agreement falls apart. I'd be curious to to have a chat with you about it.
Send me an email.

~~~
altern8tif
I've got a team exploring the idea of executing a smart contract that
transfers assets (be it crypto-asset or real world assets) upon a specific
real-world trigger event (via oracles).

But you're right, the legal issues are a dime and a dozen. It'll take some
time for the law to catch up (eg. digital wills). The technology is ready for
this, we just need to right confluence of factors to make this a reality.

~~~
TheLegace
I think it is interesting if the technology did it, but I'd want to know what
incentives people would have to use it, since it would just make things more
complicated.

Maybe it lowers the cost of transferring assets, and there is the flexibility
transferring to anyone on the planet. Maybe the use case is having funds in an
escrow until both parties can verify that the transaction is cleared. I think
there are trust companies that already do this. Maybe if people are motivated
to deal with the legal(or private entities would exist to fill the need to
simplify it) themselves it could work itself out.

It could be that through this method less lawyers are involved. If the
transfer of assets can be standardized or at least abstracted away for
all/most countries in one system I could see why people could be interested in
it.

Also if your looking to sell an asset, or looking to buy an asset that you
expect to increase in value, it might be interesting to have a global market
to purchase/sell these assets with price signals for less risky or higher
return assets.

------
Rotor
Thanks for sharing, also the Solidity Smart Contract are not bad for getting
started: [https://solidity.readthedocs.io/en/develop/introduction-
to-s...](https://solidity.readthedocs.io/en/develop/introduction-to-smart-
contracts.html)

Also for anyone starting Ethereum or Blockchain development, I'd recommend
learning and understanding The DAO Attack of 2016:
[https://www.coindesk.com/understanding-dao-hack-
journalists/](https://www.coindesk.com/understanding-dao-hack-journalists/)

------
langitbiru
I remember 2015 or 2016, everyone was hyped about Deep Learning. Everyone was
talking about DeepDream, Tensorflow, etc.

I guess 2018 will be the year of blockchain and cryptocurrency.

~~~
Bartweiss
Amara's Law still holds, though - technology is overestimated in the short run
and underestimated in the long run.

I don't think Tensorflow et al have been busts, or have even fallen short of
what experts expected from them. They were just never consistent with the
slavering hype they got from university press offices, tech journalists, and
startup hucksters.

I'm less convinced that blockchains will have a major long-run impact, but I
expect solving the double-spend problem will prove useful one way or another.

------
patrickmay
There's also an LLL (Low-level Lisp-like Language) introduction here:
[https://media.consensys.net/an-introduction-to-lll-for-
ether...](https://media.consensys.net/an-introduction-to-lll-for-ethereum-
smart-contract-development-e26e38ea6c23) with links to examples.

~~~
fallat
Yep, I think LLL is much better than Solidity: [http://ecc-
comp.blogspot.com/2017/12/comparing-solidity-to-l...](http://ecc-
comp.blogspot.com/2017/12/comparing-solidity-to-lll-and-why-i-use.html)

------
j_s
Seeing this on the front page of HN, my first impression is "wow, people are
really desperate for information on this!" Can anyone with experience point to
a better starting point?

~~~
langitbiru
I have finished Solidity tutorial on CryptoZombies.io. It was fun but it did
not teach how to setup or to deploy Ethereum project on the Ethereum network.

Right now, I am enrolled in [https://www.udemy.com/ethereum-and-solidity-the-
complete-dev...](https://www.udemy.com/ethereum-and-solidity-the-complete-
developers-guide)

It looks good but I haven't finished it yet.

~~~
reificator
I like Stephen Grider's classes, but I also use them to measure when the hype
for a given technology has reached its peak.

------
kang
If you are a web developer and looking into making useful products(not just to
raise money) you should first look into public-key infrastructure
applications. Once you have made your first PKI application you might find
ethereum redundant and irrelevant even.

------
MrBingley
> Solidity reads a bit like Javascript. It has a lot of quirks and pitfalls,
> though, especially when it comes to moving money around.

But isn't that, like, the whole point of the language? It was literally
written _for_ moving money around. Cripes.

> Be very careful if writing real money-transfer code; do your security
> homework, get others to review your code, and seriously consider an official
> security audit or even formal verification.

Amen.

~~~
derefr
Ethereum's "quirks and pitfalls" are a result of people coming into it
thinking that their mental execution model of most normal programming
languages will suffice, when the execution model of the Ethereum VM is quite
different (precisely because it is "written _for_ moving money around", but
also because its computations are only run by the will of random miners, who
like to get paid.)

Once you understand the Ethereum _abstract machine_ (i.e. the thing described
in the [http://yellowpaper.io](http://yellowpaper.io)), the "quirks and
pitfalls" of the programming languages built on it (Solidity, LLL, Serpent,
Mutan) become more like obvious design constraints.

~~~
Karrot_Kream
Agreed. I'm not a JS fan by far, but I don't see anything wrong with Solidity
(nor am I a huge fan). The Solidity pitfalls are just the pitfalls offered by
the EVM. I agree that tooling should improve to highlight potential failures,
but to treat Solidity like JS is a mistake.

------
victorin
The link should point to the (I guess) original source:

[https://happyfuncorp.com/whitepapers/webthereum](https://happyfuncorp.com/whitepapers/webthereum)

Way more readable, links to github etc.,

~~~
Cyberdog
Thank you. I wanted a downloadable version without having to sign up to Scribd
or whatever it was called. This isn't a PDF or e-book, but I can easily turn
it into one.

~~~
combray
The repo
[https://github.com/HappyFunCorp/Webthereum](https://github.com/HappyFunCorp/Webthereum)
has the original RTF if you just want to pull that down.

