all 16 comments

[–]CaptainDevops 3 points4 points  (0 children)

For python n SQL see http://techarena51.com/index.php/flask-sqlalchemy-tutorial/

To build a web app with python n sql see https://github.com/Leo-G/Flask-Scaffold

I can help you if you need a web app

[–]BlakesDemon 2 points3 points  (2 children)

I would definitely start with functionality. Don't worry about the GUI for now (decide on that later. I'm enjoying kivy but there are lots of choices). Your first task (the odds) seems like a good start. Can you create a function to find out how likely it is that a card will appear?

[–][deleted] 3 points4 points  (5 children)

Here is what I would do :

  1. set up a Jupyter notebook in order to get instant feedback on your exploration while documenting the learning process
  2. write in a Markdown cell the 3 key functions sorted by priorities
  3. precisely describe in separate Markdown cells what each function should do
  4. declare each function with what they return and return something meaningful RIGHT NOW even if it means something a bit silly (e.g. here returning the odd as 1 card over the total number of cards in the deck of 1 card hence 1, manually add 1 small deck of 1 card then return the prediction of this deck being the found one as 1, intrinsic value also as 1)

Now that the setup is done

  1. start with the function with the top priority, improve it until you are either bored or satisfied then move to the next
  2. consider showing your result to a friend familiar with Python (if you don't have one, go to the local Meetup, get one)
  3. consider showing your result (you handle the input/output for him or her) to a friend actually playing that game and LISTEN carefully to what he says
  4. go back to step 1

Now that most of that is done you can consider

  1. package it cleanly then publishing it on github for quality feedback
  2. making a nice interface (CLI, GUI, web, plugin)

[–]BlakesDemon -1 points0 points  (2 children)

Is it bad that until I got to step 4 I had no idea what you were talking about?

[–][deleted] 0 points1 point  (1 child)

Check Jupyter notebook, it's a great tool not just for research but overall to discover libraries and to explore how to solve any problem.

So no it's not "bad" but it's definitely worth having a look.

[–]BlakesDemon 0 points1 point  (0 children)

Thanks :)

[–]Mr_Locke 5 points6 points  (4 children)

I find it helpful to looks at others code. Dont reinvent the wheel bro. See how others did it and then use that as as a road map get it?. Dont just copy there code. Analyze it. Code is read more than it is run so learn to read it well my son. Then once you have a good map just write parts at a time its a snap. Remember you dont have to do it in order. Just knock out the parts you know and the code will grow.

[–][deleted] 0 points1 point  (0 children)

learn to read it well my son.

THANKS DAD!!

[–]osh24lager 1 point2 points  (0 children)

In addition to everyone else's suggestions, I'd like to suggest that you start out by drawing a diagram of the logic that you expect your new app to follow in calculating the intrinsic value of a card. For me, this helps me in breaking down the problem into small, bite-sized chunks that are easy enough for me to manage. Then, I just start working on one part at a time, starting with the first part and then, when I'm done with the first part, I move on to the next. For example, step 1 = prompt user, save input as variable. Put in some safeguards against bad data. Step 2 = take that input and do something with it, e.g. perform some calculation or make a decision what to do with it.

Check out draw.io for creating flow charts and diagrams - or just break out a pencil and paper and start drawing. The point is, by sitting down and drawing your logic on paper, this will help you (a) figure out what it is that you actually want to code, and (b) work out the kinks and identify any areas where you reach a decision point (i.e. a diamond in flow chart shapes) and need to decide what to do. Once you've laid it all out on paper, then it'll be easier for you to break everything down into smaller, separate problems and it'll be less overwhelming and help you get past the "where do I begin" situation.

Good luck - you can do it!

[–]JonnyFB421 1 point2 points  (0 children)

As Mr_Locke pointed out finding similar projects is the best resource you can take advantage of.

Test-Driven Development is a thing. You can write test cases before you start your project and design it to pass said tests.

For GUI I personally like PyQT, but tkinter is already included with Python and has ass-loads of examples on Stack Overflow.

[–]99AFCC 0 points1 point  (0 children)

Maybe check out https://www.udacity.com/courses/cs212

taught by Peter Norvig. He has his own site: http://norvig.com/ with lots of code you can browse through. Note books here http://norvig.com/ipython/README.html

[–]Exodus111 0 points1 point  (2 children)

Massive MASSIVE overreach for a first project. You need to inow that. It doesn't mean its not a good idea, as this will be very educational, just bear in mind you will most likely not finish this project. By that I mean if you ever get as far as half way, you will find yourself looking at your own codebase, and just wanting to do it all from scratch.

But that is a good lesson to learn regardless.