Cardano Smart Contract Education Sucks! It Just Sucks! Give Us Some Help For God's Sake!

Thank you @7.4d4

Much thanks, I will work through the playlist and read the book

Wow, that’s a lot of work. The great thing about knowing so little is that I have no sense of how much there is to learn. So I just start out and do what is put in front of me. I think that’s the pioneer spirit.

Me too, I want to rewrite this code generator in Haskell for the Cardano community. It’s kind of like Blockly. I would never have been able to write it if it weren’t for this course that covers how to write RESTful-API database application and UI in pure vanilla JavaScript with absolutely no libraries. After going through that I felt ready for anything in the JavaScript world. Maybe someday I will be able to make a video playlist like that for Plutus. The target audience will be noobs like me. It would start with setting up the development environment and installing everything on the computer. This is where I am having trouble now. Then how to spin up a testnet. Then using the various CLIs to work with the testnet. Then making a RESTful-API/database server with a CLI in Haskell that can interact with the testnet and handle the middleware. Then a JavaScript browser UI to interact with the Haskell database/middleware and use that UI to compose, deploy, and interact with Plutus and Marlowe smart contracts. I am calling out what I think are all the pieces so that I know what to study. Kind of like a syllabus.

2 Likes

Hello my guy,

I went over your code and you say that is plain vanilla javascript but in reality you have many dependencies like “node” “require” “stream” and many others that I saw in the code. That is not a problem but it is very erratic to not even use a package manager like NPM or Yarn. I also did not see any architecture nor a common system design methodology in the way your system is built, making it completely unmanageable, unscalable and untestable. Anybody scaffolding a nextjs application could have done what you did there within a week.

The reason why I make these points out is because programming is more like sailing, the fact that you can move a boat up and down does not implies that you know how to sail sailor :sailboat:. Programming is a complex subject that needs time to develop within ourselves. We have all been there, when we are starting something new and things get very complicated.

Give it another try with the Plutus Program, nobody said it was going to be easy. Its Haskell Programming for christ sake, this is used for financial tech which is pretty much like rocket science in the industry lol

Now, I would suggest taking another more simpler route. I see you like javascript so why don’t you use the already available javascript libraries for this? You can use the Cardano API in the browser and built plutus contracts using Js wrappers.

Here are some of these links

Happy coding, Cheers :beers:

3 Likes

Thank you @Wolfy for those amazing links! These will be of enormous help moving forward.

Of course you can’t make JavaScript run outside of the browser without using a library like NodeJS, but every single dependency is native to NodeJS itself. There are no other dependencies. This is for security and auditing. Can you imagine the audit nightmare when you start using random packages? I could make an exception for the cardanocli-js library when it comes time to use the generated accounting application to interact with Cardano blockchain or I could just pull out the relevant pieces and put this into the data dictionary in order to keep the audit simple.

This code generator script is run against this data dictionary which builds an application consisting of a JavaScript UI like this for Adds, this for Edits, and this for Searching, and it also generates a JavaScript RESTful-API backend server like this. It does this for every table in the system including the table that specifies how the system itself is built. So the generated application is used to change entries in the data dictionary which specify how the application itself is built. So if you need to change the way the system is written generally then make changes to the code generator script and then use this script to run the generator to rebuild the entire system with all the new changes. And if you need to deviate from the way the system is written generally (say special functionality for a particular table or particular blockchain) then use the application itself to make changes to a particular entry in the data dictionary for just that table or blockchain. So the human programmer only makes changes to two files and then regenerates the application for any upgrades, refactoring, or bug fixes. The code generator script ensures that any changes ripple through the entire system without the human programmer doing anything else. That is why it is manageable, scalable, and testable.

I am not much of a programmer but I learned how to do this kind of thing from this guy. I paid some small amount for his course but I couldn’t have even begun to make my application generator without having worked through is course first. The course is about how to make a RESTful-API database application using only JS with no libraries except for NodeJS of course. It is not about making a code generator. But he showed me all the pieces.

I would like to find a similar course for Haskell. The title would be Building a Free and Open Source RESTful-API and super-simple json database application using Haskell with no external libraries. If I can find that then I should be able to rewrite the code generator and accounting application in Haskell for the Cardano community.

Yes, I couldn’t agree more. At the very bottom of the README.md for this project are the credits which acknowledge the nature of this unfolding.

1 Like

Hello John,

I see that you’re very interested in programming and software engineering. You have already projects to show outside of the scope, and my friend, that is the best place to start specially when you’ve been learning on your own using YouTube. I’ve been in your position before many years ago, I know how tough and strange can things feel sometimes so now I’m going to share some of my knowledge that wish somebody told me sooner.

“You can’t make JavaScript run outside of the browser without using a library like NodeJS”
You do need Node to run JavaScript outside of the browser but is it strictly necessary to create Plutus contracts outside of the browser? Remember that a person needs to give you authorization to its wallet and this typically consist on using the Cardano API, which is all in the browser.

A few words on your project. I see that you have described your application before and pointed out links to go over these resources and although you did it with the best intentions, it is not possible to follow without having to spent a crazy amount of time reading the README file to start understanding what is going on. A well designed system is using an already stablished conceptual pattern that allows other people understand your code at glance. Some of these patters are Prototypes, Factory Methods, Singletons, Adapters, Bridges and many more. By using these already tested patterns you will make the application understandable by nature and very easy to test if you implement a test driven development approach that consists on automated testing using software like MochaJS.

You mentioned an audit but has anybody audit that code? I’m sure it could take them years due the spaghetti pattern. This can have disastrous implications. Do you remember Boeing 737 Max planes crashing all the time? “Spaghetti code” was the reason of it, where hundreds of lives perished very sadly.

System Design Patterns by Refactoring Guru

Test Driven Development

Microservices Architecture By Google

Domain Driven Design | Pluralsight Course (100% recommended)

RESTful APIs.
I see that what you want to achieve is to create an RESTful API using JavaScript? You have many options to spin such a common service like that, in less that 5 minutes. You could simply run an express.js backend service and built your routes for CRUD and list operations. Or you could create an entire application (front and back) using NextJs; Damn, you can even purchase a NextJS template for $20 on themeforest.com with everything included and modify your routes.

NextJS
ExpressJS
NPM package manager

Remember, Don’t reinvent the wheel. Try to think if somebody already have a solution like the one you need or if its similar in any way to guide yourself during the development process.

Javascript Agnostic Components
If you’re truly interested in agnostic components (Non system dependent software) take a look at Web Components, which I personally love. Take a look at getting started scaffolding a project (Application automated generator) and also take a look at an awesome library called LitElement. These JavaScript components work on any browser, any framework (React, Vue, Angular, HTML template etc), they are blazing fast native components and its backed by Google.

Open WC | Web Components

Lit.dev | LitElement JS Library

Haunted | Hooks for Web Components

From all this, we have so many subjects that I’m leaving outside of the scope like infrastructure, security, reliability and scalability of the system, which each play a tremendous and important role in the availability of your system.

Best,

Wolfy

4 Likes

Thank you @Wolfy for explaining all this to me.
The links you provided will be helpful.
Thank you also for sharing all those libraries with me.

What I am asking for is a playlist for Noobs like me. It would start with setting up the development environment and installing everything on the computer (Linux, Mac, WSL) This is where I was having the most trouble. Then how to spin up a testnet and also how to connect to the Cardano testnet using Cardano CLI tools. Then using the various Cardano CLIs to work with the testnet to do things like send transactions, query the cardano blockchain, and compose and deploy simple smart contracts. Then making a very simple RESTful-API/database server with a CLI all written in Haskell using no external libraries except for the minimum necessary Cardano libraries needed to interact with the testnet. Then how to build a JavaScript browser UI using no libraries of any kind to interact with the Haskell database and use that UI to compose, deploy, and interact with Plutus and Marlowe smart contracts. I know that nobody is going to do this for me and that there are some people that will think me foolish for even wanting this video playlist. So my journey must be to make this playlist myself. I am calling out what I think are all the pieces so that I know what to study. This paragraph is kind of like a syllabus. I know that this is not what you want me to study and that this is not what you think I should be asking for. So please forgive me. This is what I am asking for. This is what I want help with. This is what I intend to do.

Funny you should mention that. I actually made a video to help pilots avoid stall and spin accidents. I also made one to help with PGP encryption. These experiences give me hope that I might someday be able to make the playlist described above.

Thank you Wolfy for your kind response.
I am eager to go over the material you sent and to consider further the thoughts you have shared with me.

1 Like

@johnshearing Thanks for letting the community know this issue. You are right that education is for the uneducated. You are also right that Plutus Pioneer program is incomplete for a full stack decentralized application developer. I realized the incompleteness and the lack of structureed learning in the Cardano ecosystem. It is a huge problem. Projects have problem finding skilled Cardano talent. Seeing this problem, I created a cohort learning program and career launchpad for full-stack Cardano DApp developer. But it can conditionally take only 40 people every 4 months and it’s not free to me. I think the Cardano community needs to create a free version of my program so that anyone can do it. The first cohort has started so I can’t do anything for you at this time. However, if you are still interested, I can give you a free scholarship in the next cohort starting in mid-fall.

4 Likes

Hi folks,

What an amazing conversation among life-long learners! I salute everyone here in that regard!

New to Cardano, I had a kind of similar experience as a Community Advisor (CA). That’s the role that does an initial assessment of incoming proposals in the Catalyst Challenge funds.
Very interesting the comment, “What I am asking for is a playlist for Noobs like me” from @johnshearing above. We are working on just that with our funded project Cardano Learning Needs Assessment (Community).
It won’t be all the tutorials, rather, it’s the list of things the cover should/will/do cover i.e. it’s curriculum.
On Discord we are Modigdev. My mail is michael@modigdev.com. We’ll be reaching out three times in our virtual online needs assessment program per this proposal, I’ll come back to this thread.
Hint: we also want to decentralize credentialing in education, to free minds.

3 Likes

Thank you @DAPP360_MIKE,

Yes please, I can’t imagine anything I would like more than to participate in your Cardano training program.

There may be a problem however. I hope this can be addressed. I understand the training is at no cost to me but that there is the expectation that I would receive job placement from dapp360.io. I cannot make that commitment. I am not looking for work but rather I am interested in developing and producing my own free and opensource projects and contributing these to the Cardano community. I support my family by working as an automation electrician in the factory environment. This gives me enough money and free time to study Cardano systems. My hope is that I can apply what I am learning about Cardano systems to some previous free and opensource work I have done in the blockchain space. The point is that I need to be free to follow the ideas that come to me without the distraction of needing to produce things that other people value.

I am in the Marlowe Pioneer program now and find the video instruction from Lars to be very interesting and understandable. And the support from IOG on the discord is amazing. I have failed to complete the Plutus Pioneers program 3 times because I couldn’t setup my development environment and I failed to find the help I needed. I think this time is going to be different. My hope is to complete the Marlow program and at the same time give the Plutus Pioneer material another try. I still hope to succeed at both and then go on to produce something useful for the Cardano community.

That said there is a problem with the Pioneers programs that your program seems to solve. The problem is that the Plutus Pioneers program seems to start in the middle of the development stack so I find myself trying to learn the basics while trying also to learn about Plutus. I understand why this was necessary. IOG was jumpstarting development by focusing on developers that already understood the basics of their development stack. I think they made the right decision but now the initiated, the uneducated, and people of average intelligence want an opportunity to participate too. It looks like your program addresses that need. It looks like you are starting from the bottom of the IOG development stack to make a foundation and then build on that to produce developers for the Cardano community.

Thank you for providing this to service to the community.

3 Likes

@johnshearing Let’s have a conversation at some point. Add me to your calendar for a Zoom interview in August. The current cohort ends in September. If your intentions are true and trustworthy (I’m not implying that they aren’t) as you have expressed, we can work something out that is an exception to our rules. I have to discuss it with my team. Our company is here to change the world for good, not just about making a profit. I firmly believe in Open Source contributions. If you are going to contribute Open Source code to Cardano, and we can help you - we have a deal. So, let’s aim for the next cohort. We will make it happen. Then, Vasil PAB would be a little bit more mature for training developers.

3 Likes

Yes, Thank you @EpiqEpoch! That’s what we need to get started. We need to know what we need to know before coming to Cardano development so that we can be prepared for success. Someone who wants to mint NFTs would have one curriculum where as someone who wants to create identity solutions may have another. In my case, I want to build a free and opensource code generator that builds custom accounting systems with properties that make it ideal for use on the Cardano blockchain. Honestly I don’t even know what that means so I’m stumbling around while holding that vision in my mind. One thing is certain, I need to know Plutus and Marlowe in order to build this system.

So what does a competent Plutus developer need to know in order to really create?
I don’t know but so far I think we have the following:

  1. Set up a development environment for Mac, Linux, WSL.
  2. How to use all the currently relevant CLIs for Cardano to do things like spin up a local testnet, become a node on a testnet, query a testnet, compose and deploy various types of transactions on a testnet.
    The cardano-cli is depricated but there is no notice of what we are supposed to use instead.
    There must be a notice somewhere but hunting around for that info reduces the amount of time we have to be productive and probably causes people to give up.
  3. All the tools that IOG uses in the Plutus development stack.
    GHCI, Cabel, Nix, Stack?, TMUX, Other stuff I don’t know about yet…
  4. Haskell as it most relates to Plutus development. Haskell is a big subject.
    Rather than running around and learning things we don’t need we should have guidance.
    I stumbled onto this playlist just today.
    And this playlist too.
    These playlist come with a promise that we are learning Haskell that applies to Plutus.
    Thank you to Michele - Blockchain Dev, the creator of that content.
1 Like

Thank you @DAPP360_MIKE,
Yes, that is my intention.
I am so excited about this possibility.
Thank you for considering me for a space in your course.

3 Likes

I am grateful for all the support and help given to me here by the Cardano community.
Thank you for hearing my complaints and for finding real solutions to my problems in understanding and learning how to work with Cardano tools. I believe that help is coming in the form of guidance and prerequisite learning materials that we can study prior to taking on the Plutus Pioneers course.

IOG and community support on the discord and on the Cardano stackoverflow has been amazing.
Thank you for helping me set up my development environment and for helping me get started with the course materials.

Finally, want to apologize to my IOG teachers for being rude.
I was not ready to receive your instruction - that was my only problem.
You deserve only respect for being the first to teach something the world has never seen before.

2 Likes

Vouch. Reinventing the wheel as an octagon doesn’t help you or anyone else! Ever.

Hi @DinoDude ,
I don’t understand the reference “as an octagon” so I hope this comment applies:
If you truly wish to understand something then build it from scratch. Yes, Reinvent the Wheel.
In this course we built a useful RESTful-API database application and browser interface from scratch (plain javascript with no libraries). The understanding and freedom to create that I got from that course cannot be acquired by building something that uses other people’s libraries. It is productive to build using libraries but in my opinion that does not lead to profound understanding. Think about how any subject is taught - we usually start at the foundational level. Somebody has to write the libraries and many will need to understand what’s in them.

Educators in the community are gathering foundational course materials for Cardano developers, and one program is already in place for people who want to start learning Cardano development at the foundational level.

I am finding that the Marlowe Pioneers program is a great opportunity for novice developers to start building an understanding of smart contract development. The Marlowe Playground is not only a great development tool, but a great teaching tool as well.

I just learned from a Q&A in Marlowe Pioneers Program about some foundational CLIs used with Marlowe. I am looking now for videos that show how to use the marlowe-cli, the cardano-wallet cli, and cardano-addresses cli. As a way to increase foundational understanding. At some time in the future I would love to understand what’s in them and how they work. Maybe the best way to learn that will be to attempt to write some of that code from scratch using the open source code as example and see what it morphs into. Maybe something useful will result or maybe not but the understanding will be a joy to have.

There is excellent support for new Cardano developers at the cardano stackexchange and at the IOG Technical Community Discord.

I should mention again that the title of this post is unfair to our IOG educators and only represents my immaturity. They are creating learning materials for code the world has never seen before. The community and my teachers have been kind and supportive despite my attitude and have done so much to help this inexperienced developer participate.

It’s just a developer joke I use often, based on geometry if that wasn’t obvious. If it’s really bad I say something like “we reinvented this wheel as a tetrahedron” … the reason reinventing the wheel is a developer adage is because we all do it eventually even though we know we probably shouldn’t.

Anyway the point is I could write thousands of lines of of code to create a library for a restful API from scratch or like @Wolfy suggests I could just axios or some other existing solution that is tried and true. Further if I did write my own reinvention of the existing wheel from scratch it likely would have bugs and not be as good as the thing that millions of other developers use, rely on, and fix. The only person who is going to fix the thing you made and exclusively use is you!

Thus the important skills when deciding which existing wheel to use is:

  • finding the existing wheel (how to google or github)
  • does it meet your needs (this does what I want!)
  • your understanding of how to use it in your project (I got this … API)
  • if it is actively developed and popular (other people are adding features and fixing bugs for me, woot!)
  • licensing and legal concerns (I want to be proprietary but they are GPL … or vice versa)

For example the list of wheels I use in my project is endless and exhaustive to even attempt listing. My contribution is using various programming languages to customize combining all the ingredients to make the whole enchilada for my particular recipe. Users don’t give a damn how clever you are or whether you made everything from scratch so long as that enchilada tastes good!

2 Likes

I can’t stress out enough that last few lines. User don’t give a fudge about how or what has been written in the software as long as it works for them.

From my own experience I have worked in legacy systems that are ugly in any way you look at it, and at the same time is making 10 million dollars a year in revenue; an ugly baby that makes millions of dollars worths 10 million more than a project just finished in the best and latest technology. That said, it’s always better to go with a better solution where tested software will be worth a lot. Like @DinoDude said, some libraries have been tested and fixed by thousands of developers and this is something that no mortal will be able to achieve on its own.

I want to also share our system Bakrypt.io that we built for the Cardano ecosystem. Its a RESTful API using oAuth2 authentication for consuming a Cardano Node. We are currently delivering services for automated minting of collections of tokens up to 300 assets per request, with features royalties included.

It’s absolutely simple to use and we also just launched our minting launchpad that can be used to mint Cardano native tokens from our website or even from any phone! The launchpad is written in web components so its framework agnostic, that give you the availability to integrate into your or any system without much work.

I’m sure you are going to like it! Check it out! @DinoDude @johnshearing @DAPP360_MIKE @faretheewell

Bakrypt.io | Mainnet

Bakrypt.io | Testnet

Bakrypt API Reference and Docs

Bakrypt Launchpad

Bakrypt Swagger Tool

Bakrypt Staking Pool

2 Likes

Congratulations on your accomplishment @Wolfy, and thank you for sharing. Is this an open source project? This could be a great educational resource for the Cardano community.

1 Like

Thank you! It’s not an open source. We are a family owned business for profit although we are going to open source the launchpad and other web components like a Cardano Dapp Conector for websites.

We are testing the grounds first, make sure we aren’t leaking sensitive information and after that we will publish it on github

The API is specifically made for people like yourself that wants to build dApps without the whole overhead of setting up the infrastructure required to run a Node plus you have a fully tested environment in both mainnet and testnet.

Stay in the loop!

1 Like

Thank you for your insightful post @DinoDude.

Yes, building from scratch on Cardano is only to gain a profound understanding of how all the pieces fit together. This approach would be for people interested in building libraries, performing audits, or looking for new ways to build that might offer advantages over what exists already.

Yes, Below is what most of us need to know - How to use existing libraries and tools in order to build great software for the Cardano community.

To make your generalities specific for developers new to Cardano I have the following recommendations.

One of my biggest barriers to entry into the world of Cardano smart contracts was just setting up my development environment. Linux is used for development so Windows users will need to setup Windows Subsystem For Linux or WSL. Here are two videos(this one and this one) that will help setup WSL and your development environment (Haskell, Cabal, Nix, VS Code) for Marlowe and Plutus development. If you just want to start learning Marlowe with no special setup then go to this link and have fun in the Marlowe Playground

I should mention again that the title of this post is unfair to our IOG educators and only represents my immaturity. They are creating learning materials for code the world has never seen before. The community and my teachers have been kind and supportive despite my attitude and have done so much to help this inexperienced developer participate.

1 Like

i am unable to do my hello world in cardano :rofl: , like testnet node cant even run on windows !
im trying to find reasons why i would choose cardano over anything else at this point tbh…