r/learnpython • • Nov 19 '19

My first application!

In October I started my Python-journey, with a full time job and a 2yo kid the spare time is scarce.
I've been following a Udemy-course and also used some android-apps to just study something every day.
2 weeks ago I made my first real script from scratch, I had a idea of automating / helping with a tedious task at work. I'm a train driver, and every train we start we fill a paper form, check some values from 2 different paper lists and enter some of that data into the control computer.

The script were terminal based and did all the calculations I wanted, checked up the values from those 2 lists (one which is short, so I just made an elseif of it, the other is long so I made a .txt with the values) and gave a summarized result.

Now 2 weeks later I've deployed it on the web with Flask to be able to share with my colleges!
With dropdowns, forms to fill and a button to run the scripts and show the result.

Thanks to inspiration from this subreddit (and others) I made it working! It's plain ugly, but the functionality is there. Guess I'll come back and sort the design with bootstrap or at least some css'ing next time I feel a dip in the studying.

I dno if there's a better way to post a image, but here's one:
Image of the result with explanations

407 Upvotes

72 comments sorted by

View all comments

1

u/[deleted] Nov 21 '19

Honestly this is something that could be achieved with Excel, it's pretty powerful. Have a look at the Excel functions IF & VLOOKUP, and then make it available to your colleagues on google docs.

There's no need to pay for the servers and build a web app here.

1

u/Mag37 Nov 21 '19

It's not for production, it's for studying and motivating myself to learn. It could indeed be done with excel or just a simple JS-page for most of the functions, but I'm learning Python so I wanted to make it all in Python.

There's already a web app built and I won't pay for servers :) It was just a fun and motivating project to get myself trying to produce something.

1

u/[deleted] Nov 21 '19

Fair enough. But programming is also about finding the best technology to achieve something. Here there are some fairly simple computations, and you wanted to share them with your colleagues, so excel on google docs is well suited for that. Anyway, keep at it.

1

u/Mag37 Nov 21 '19

I totally agree with that, the fundamentals of programming is indeed to find the best way to solve a problem.

But the goal here was to use my new knowledge in a programming language I've studied for less an hour a day last 2 months and build something myself, not only from tutorials. I chose this project because it motivated me - if I completed it my regular job with also become easier, but that was just a bonus. To share it with colleges was never the point, never the goal.

And even so, no matter if theres a situation where Method A would solve something more effective than Method B.. If I don't have any knowledge for Method A but know how to solve it with Method B - then B is the best technology for me.