Why not code for others? Or create services people like?
If i would live in a country that is not Switzerland i could easily live from one Website i have and the Adsense income on there. The website is simple and needs barely maintaince, but i managed to make something, that already exists in several variations, so simple and that people started to use it.
Sounds simple, but in reality it isn't.
You need a big portfolio and a very good reputation before people actually hire you to do some coding, unless you charge <$5/hour ... The bottom side of the market is full of people from india, china, students making beer money,... The top side of the market is full of big-portfolio, big reputation coders. It's pretty hard to make a living if you live in a country where you need at least $15-$20/hour to make ends meet.
It is true that coding projects do not pay big salaries when it comes to coding in first world markets. One must accept paid coding projects as paid work experience as coding is hard to come by. As you said students making beer money, and programmers living in third-world countires makes up most of the work force on this forum. Still experience is better than no experience, and some people can't afford to go to school. Sometimes valid work experience is all one needs to get the job they want. It may take many years longer, but it may just as well be worth it for many people in the long run.