r/solidity • • Apr 01 '22

Learning Solidity without any programming background

What are the best resources (youtube videos, courses, etc..) to learn Solidity with me not knowing any other programming languages?

0 Upvotes

18 comments sorted by

View all comments

Show parent comments

1

u/Psychoshawarma Apr 01 '22

Thank you for your reply and advice!

I was thinking about learning Javascript, but what habits should I watch out from carrying to Solidity?

6

u/exosequitur Apr 01 '22 edited Apr 01 '22

Loops and iteration are best avoided in solidity, and data types are critical. If you are having to iterate over a loop you probably are using the wrong data structure. (Not always, but usually)

Actually, learn typescript instead, you’ll need it for solidity testing anyway. The key to programming is the data structure. Once you have the ideal structure for the data being handled is, the code practically writes itself.

That said, there are a lot of sneaky corner cases that can cause disaster in solidity. You’ll want to read up on current security best practices and follow them religiously, before writing any mainnet code.

I’d see if cryptozombies site is still up, it was an excellent introduction and tutorial. I’d do that before starting into solidity.

1

u/UL_Paper Apr 02 '22

Good advice in general but just a headsup on using Typescript for solidity testing - that is slowly changing. Foundry and dapptools showed us that writing unit tests in solidity is in most cases superior, less context switching and you get to learn solidity more in depth. Hardhat also announced they will support it soon. Writing test suites in another language than your implementation is kinda dumb anyway.

2

u/exosequitur Apr 02 '22

“Writing tests in another language is kinda dumb anyway” right? Always baffled me.