It seems the easist way just to talk with lawyers...
And about the programming solutions, I just meant some other people's tutorials or questions and answers in stackowerflow and etc.
Yes, when you are entering into business you need to work with lawyers.
You need to ensure any taxes are paid and that they are reported properly. Government groups get REALLY angry when you don't properly file and pay taxes.
You need to ensure you properly register your business, perhaps as a corporation, perhaps as a "DBA" (Doing Business As) or whatever the pass-through registration is called in your location. This will usually involve a small fee as government likes their cut. Sometimes you must register at a national, state, and local level.
COPPA was mentioned if youth are involved. Cookie policies are required by most of Europe and a few other countries. Privacy policies that allow you to give data to anybody are a good protection and most people don't read them. Terms of service are necessary as you will want to ban spammers without them coming back and suing you. If you accept money then a warranty disclaimer and EULA are appropriate, and you need to provide a means for disputes and refunds.
For things that you referenced from tutorial sites and books it is usually acceptable to use it, although some restrictions may apply. If they made it available on their site and it bears the GPL header, that applies. Usually (but not always) the material are made available for teaching and the posters don't mind its use. Even the articles on this site are covered by a license. Always verify licenses before including sources from tutorials.
There are lots more, your business lawyer can help you build a list. They've probably already got a ready-made list that they can give you.
Business lawyers aren't particularly expensive. They are very different from trial defense lawyers. A good business lawyer around here is $150-$200 per hour, and if you've already read up on your local business requirements they can help you identify any holes in your business side in 1-2 hours.
It may seem like a lot if you are running it as a hobby business, but a few hundred bucks up front is quite valuable insurance to prevent thousands or tens of thousands of dollars in defense if something goes wrong.
A good business lawyer is an inexpensive insurance investment.