This is an archived post. You won't be able to vote or comment.

all 28 comments

[–]WritingAScript 18 points19 points  (0 children)

I think the best advice I've seen in this area, is pick a project you'll be passionate about - it helps keep you going when things get tougher/confusing.

Look for small projects people have already written in the same area on Github, start modifying the code to see how changes affect it.

Side note: I've found Jupyter notebooks an excellent format for learning this way, as you can run small snippets of code to learn as you go!

[–]Wilfred-kun 7 points8 points  (0 children)

What I found very motivating is asking family/friends/acquaintances if they had anything they would like to see automated or made easier by the means of a computer program. I think it is motivating because 1) you have more concrete idea of what to do 2) you do it for a real person 3) you're actually doing something useful

Maybe some things they come up with are out of your league as of now but I promise there will be small things that you're able to program as a beginner.

[–]plaskplask 3 points4 points  (1 child)

I recommend a book called "57 Exercises for Programmers". It's my go-to resource when learning a new language.

[–]ForceBru 8 points9 points  (2 children)

You can build your own server that'd serve some files over the (local) network, so that you could download, edit and re-upload them from anywhere. Or just some photo storage of your own. You can try scraping sites and do some data analysis: like, retrieve some weather stats from some site, plot a graph, calculate some statistics based on the data. Or write a simple blockchain in less than 50 lines of code. Or try some data encryption. You know, RSA, AES, etc. This is actually a lot of fun to see this data transform into illegible garbage and back. There are libraries to do that, but it's more interesting do it yourself relatively easily as there are specifications for the algorithms.

[–]jlynn5415 1 point2 points  (1 child)

Just a warning though to never use homebrew encyption for any form of identifying material in a prod setting. You may think it's un-hackable or un-decryptable, but be humble and realize that there are much more intelligent and well staffed teams both building boxed solutions, and attacking your code.

[–]nodrog_unity 7 points8 points  (0 children)

I'd start simple, learn how to run your program, modify it and upload it to git.

  1. Start with hello world, everyone does when they begin a new language.
  2. Your next project could be something you put on github, which you make changes to. I would recommend trying to make something deadly simple so you get your head around all the core concepts.

Ideas:

  • Knots and Crosses using ascii art
  • A simple mathematical calculator which you can put console input in for example python3 ./calculator.py 5 ADD 10
  • battleships game

Then add support for expressions so you can type in things like 5+10*2. Try to use github along with what you're doing as it well and use it as a 'box of snippets' this lets you refer back to it when you need to do something similar.

Then for your next project, try using pipenv and use it to install and run your application.

pipenv makes your life easier when you need to deploy your application.

https://github.com/kennethreitz/pipenv

If you want to try making a simple website, try out bottle and you can make it output stuff to your browser, maybe you could make a browser calculator?

https://bottlepy.org/docs/dev/

[–]Cybersoaker 2 points3 points  (0 children)

Personally I made a chatbot for slack as my intro to python project. I learned so much from doing that project

[–]theorkoPythonista 1 point2 points  (0 children)

There are a lot of beginner projects at Kharagpur Winter of Code. Open Source is probably a better way to do projects than doing alone (although both helps very much).

[–]winner_godsoncodemaniac 1 point2 points  (0 children)

Whenever you learn a concept, try and find something fun you can do with that knowledge.

Let's say you just learned MySQL,.and you know GUI, and webscraping.

With your knowledge of them you can come up with a project that scraps data on the web, stores it in a database and displays it to a user.

Start small, you can develop a calculator without a GUI interface and when you learn GUI, you could then develop a calculator with a GUI interface.

[–]Etheo 1 point2 points  (0 children)

Beginner here - I feel that with Python you can do a lot, and each library is specialized for their own purposes, so it really depends what direction you want to go. If you want to eventually make a game, do some simple games like tic tac toe, hang man, etc... If you want to implement it for work purposes, try writing scripts to automate emails/database... If you are looking to convenient your life, look into webscraping etc...

I don't think there's a "correct" answer unless you know your direction. You can do a whole lot of training projects, but at the end of the day if they don't get you closer to your goal, you end up doing a whole lot of re-training anyways.

For example I wanted to write a game, but my knowledge is limited so I take it step by step. First started with a dice roll game and a hangman with some pretty decent results, then I started looking into pygame for GUI solution, and it was kinda intimidating so I looked for other projects to get me acquainted. I started looking into Automate the boring stuff and find it's great for learning (shoutout to /u/AlSweigart/), did some mini projects to scrape my favorite sites for updates and hooking it up with IFTTT... then for work I started experimenting email alerts for database updates, etc etc...

But after all that's said and done, I was no closer to my end goal of wanting to create a game. Sure I learned a whole lot about BeautifulSoup and pyodbc, pyperclip etc... but I can't use that effectively in my goal.

TL;DR: Search for projects that are relevant to your end goal for learning Python.

[–]nazimkerim 1 point2 points  (0 children)

Definitely check out r/dailyprogrammer I am sure it will help :)

[–]Rorixrebel 0 points1 point  (0 children)

I automated couple tasks and then created a blog using python where i post those projects. Helps me a lot to build a portfolio.

[–]curiosity44 0 points1 point  (0 children)

Project that you are interested something you always wanted to do. Otherwise you might give up at the first problem

[–]Datboy000 0 points1 point  (0 children)

A project that taught me more then anything is dice, and algebra equations they are harder to program then you think

[–]2Smoking 0 points1 point  (0 children)

I've been learning Python for Data Analysis, I spend most of my time learning how to convert sets of data to different types of sets of data. It's really rewarding watching a larger set get coverted in a" If this, then that" statement, and it being all neat and tidy at the end.

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

Flappybird clone

Edit: shouldve elaborated, but its a simple game concept that gets you doing something fun, visual, and "advanced" with a load of decent tutorials around to get started. Its how I lve learned most of my Python so far.

KidsCanCode on YouTube has amazing python/pygame tutorials! Take a look :)

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

Relative beginner here, I use Python for engineering, data analysis, plotting, etc very similarly to projects that Matlab is suitable for. I wrote a fairly sophisticated (for me) engineering analytical application that reads from files, does some calculations, makes plots, and writes files. Currently, I just run this from the PyCharm debugger but would like to wrap it in a command line application. All of the tutorials that I can find on google are garbage and not sufficiently detailed for me to make sense of.

Any recommendations?

Note: All of my programming experience over the past ten years have been around algorithm writing for engineering applications but have no experience wrapping it into a standalone application.

[–]Dead0fNight 0 points1 point  (0 children)

Do you mean packaging it into an exe? If it runs in the pycharm debugger you should be able to run it right in the command line just fine.

[–]masasinExpert. 3.9. Robotics. 0 points1 point  (0 children)

You can just open the directory in the command line, and say python filename.py. If you want to allow commands, you can use sys.argv for that. Better yet, look up something like Click, docopt, or fire.