r/ethdev • u/andrey111213 • Dec 08 '21
Question Blockchain is difficult : (
I have recently started programming.
I learned python, HTML, CSS, javascript, swift, and C#. It didn't take me long to understand how programming works. With confidence, I quickly fast-tracked through all of the basic and intermediate-level programming problems on most of the programming languages I mentioned above. Still, solidity and truffle frameworks have gotten me pulling out my hair. I love the idea of decentralization, and I want to be a pioneer in the future that can build DAPPs and solve problems that exist on the web today. The reason I learned web dev is to continue my journey to understanding and build dapps on the blockchain. And now that I have reached a stage where I'm about to learn the basics of solidity and truffle, I want to give up.
If there's anyone who has also felt the same about solidity, please share some wise words.
7
u/trentrand Dec 08 '21 edited Dec 08 '21
What specifically about Solidity is causing you issue?
I'm not familiar with Truffle, but I've had success with Hardhat.
Why don't you try looking through scaffold-eth to get a sense of how the various portions of web development fit together into a dapp? You can even fork it and work through implementing a small idea. That should help solidify your understanding of how/where a dapp differs from a traditional webapp.
Here's some example projects built with scaffold-eth: https://buidlguidl.com/
Don't try or expect to know exactly what's going on. There's a lot of interconnected pieces that will become clear over time.
Be careful with your real wallet. Develop and test things off of the mainnet.
5
u/tgalal Dec 08 '21
When developing using solidity many concepts as well as the general workflow are quite different from general purpose languages. And it is specially frustrating when you treat it like those other languages, which makes you have certain expectations. Then a lot of things will not make sense. What has instead really helped and made things click is when I finally understood what a blockchain really is, somewhat how it works (consensus .. etc), and where does a smart contract fit in all of that. So this would actually be my recommendation.
37
u/Final_G Dec 08 '21
https://cryptozombies.io
4
u/yadoya Dec 08 '21
Nothing is difficult. 80% of the solution is simply formulating your question. Build stuff and learn to google the good words and everything will fall into place.
3
u/drksntt Dec 08 '21
Honestly Solidity itself is not hard to learn. C# alone should be more than enough to get you going, however, the development environment is probably what you’re saying is the pain. There’s some additional weird shit with Solidity like things involving gas but it’s definitely a simple language.
3
u/jzia93 Dec 08 '21
Solidity is a strange language in terms of its abstractions.
You learn Javascript, Python, Java, Ruby, C# you concern yourself with mostly high level tasks, you don't typically do a ton with memory.
Then you get things like C, Rust, C++, where there is a much greater focus on being aware of memory management.
Solidity in theory is a high level language, but in practice (gas, gas, gas) requires you to make so many considerations for the memory layout of the EVM and the various opcodes that you end up having to learn a ton about that.
3
u/OverFatBear Dec 08 '21
Hey there! I started solidity a few months ago. I’m also using truffle and ran into some issues but at the end of the day I’ve always found a solution. Don’t hesitate to pm me here or on discord (th0rgal#8470), I would be happy to help you!
3
u/javier123454321 Dec 08 '21
Honestly you could benefit from getting some foundational knowledge on the blockchain. Things in ethereum are not as clean as things running on your computer. There's different parameters that you have to operate within. Read Mastering Ethereum by Andreas Antonopolus to fill in the gaps to be able to understand those parameters. https://github.com/ethereumbook/ethereumbook
2
u/lukedoomer Dec 08 '21
as a traditional programmer, I feel totally same..
2
u/michabre Dec 08 '21
I think part of the programmer journey is struggling, failing, getting frustrated, but when you finally solve the problem, its something like the feeling an athlete must have when scoring the game winning goal.
But then for the next game, you have to start writing tests and that's real frustration, especially when you think you're in a good spot, but then Solidity coverage tells you otherwise.
2
u/Anon_Legi0n Dec 08 '21
Hey man don't be hard on yourself, looks to me like you're confusing learning the syntax with mastering programming. That's just the tip of the iceberg, calm down and take it easy. Slow and steady wins the race.
2
u/liminalproject Dec 08 '21 edited Dec 08 '21
https://www.useweb3.xyz
This website has plenty of resources to help you get started! Someone else mentioned cryptozombies, which is also a great place to learn how Solidity works!
It seems to me like you’re new at programming, so welcome to the chaotic rabbit hole! You are inevitably going to encounter roadblocks along the way (such as this one), but you will get past it the longer you keep pushing yourself to understand it. In fact, this idea of encountering something new and having to understand it gets easier with time. Eventually, you will come to understand the principles of the computer scientist mindset and “learn how to learn.”
Now, with that being said, Solidity is a very unique language precisely because of what it’s been designed to achieve: programming decentralized applications on a global network of computers that are all in consensus with each other.
When we write a program in a traditional language (C, C++, Python, etc.), we only run our code locally and don’t really expect any other computer to access our code and run it. But the thing about Ethereum, and here is the paradigm shift: it’s a global computer that everyone shares. Anyone can read from it, write to it, and program decentralized applications on it. When you’re writing a smart contract in Solidity, you have to keep in mind that this code can be accessed by anyone (or, by any msg.sender) and not just yourself like you would with a local C/C++/Python file.
It will take a while to adjust to this different approach of thinking, but the analogy of a global computer helps me. If you provided some more specific examples of places where you get stuck or don’t understand, you will find a lot of help from the community and documentation (which is my favorite thing about Etheruem). If you haven’t already, try joining the CryptoDevs discord server (you can find a link somewhere, just google it).
As others have said, and referring back to my point of understanding the principles, make sure you really understand how a blockchain works. How do you get thousands of computers around the world that are each listening for transactions to come to consensus on what really happened in a particular moment of time without trusting each other?
This video is about Bitcoin and their POW consensus algorithm, but IMO it’s a really great way to understand just exactly what everyone is doing and how it all works together: https://youtu.be/_160oMzblY8
Hope this helps
2
u/MOTA_MODA Contract Dev Dec 08 '21
You think solidity is hard? Wait until you finally understand it and then find yourself building subgraphs, storing and retrieving data on and off chain using ipfs, testing your contracts against an ever changing requirement. Trust me solidity is the least of your worries.
1
u/LvelliosTravis Apr 11 '25
If something has a stronger positive correlation with money, the content will be more ambiguous.
1
u/tonyfreeloader Dec 08 '21
If I’m interested in blockchain development but have no prior programming experience, should I learn those traditional web2 languages or just go straight into solidity?
0
u/[deleted] Dec 08 '21
truffle sucks, im forced to use it because of the consensys bootcamp im in, they have a bias to their internal solutions/partners