I was going to keep the blog only about coding issues I encounter, but while I have this soapbox, let me get my frustration about AdSense out of my system. My app has a perfectly good code to display banner ads, and for the first few days, it was working fine. But I did not realize that since I signed into AdSense first, I needed to get my website content up to par with their standards, After reviewing it, they decided I needed more content. I have no issues with that, as standards are standards. I don't even need the money from either the app or the website to be honest. I just want to learn how it is done. But now that my AdSense application is denied, I suddenly can't use AdMob either. And I can't even cancel my AdSense application without it being approve first and unlink the system. What a crazy setup this is! Yes it's nice to have both going, but why do they have to tied so intimately? What If I decided that I no longer want to do this blog, because I don't enjoy it? Why can't I ever change my mind an unlink the two sources?
There I got it off my chest.
0 Comments
I was taking the Rob Percival course on learning to do code on android studio. I go to the lesson about coding a tic-tac-toe app, while tiles fall off the top of the screen, and a light bulb went off in my head. Why do a simple turn by turn game like that when I could write a connect four game with AI instead. It is dangerous to get an idea, because for the next two weeks I was hacking away on android studio and learning so many new things.
There were challenges to overcome as went about doing this. I recall the following:
The AI was the hardest challenge of them all. I had to find out how to code a tree structure to store all the possible moves, how to find a good move using the minmax rule with alphabeta pruning, and how to structure the code so that program would wait on the AI to make a move without doing idle work and crashing. That was a lot harder than I was thinking due to everything being multi-threaded. Luckily there is so much code already available from others do all this, but I had to learn to weed out the good from the bad, and learn how to fit it into my code. That was a good two week exercise to go through and I am a better coder at the end of it. The end result is a game that I can play by myself while on a bathroom break. It isn't perfect, but not a bad first app. |
AuthorA beginning coder trying to share lessons learned. ArchivesCategories |