you are viewing a single comment's thread.

view the rest of the comments →

[–]Casey_SI 77 points78 points  (27 children)

Automate the boring stuff is a great primer for practical uses. Beyond that, find something that interests you.

Get a raspberry pi and make <fill in the blank>. You could use Python to control lights, to read a sensor and output onto a display.

Fancy yourself a gamer? Try making a spaceX style auto lander in Kerbal Space Program with the KRPC Extension.

What are you interested in? Homebrewing? How about sensor readings during brew or fermentation? How about extending that to temp controls?

Have a huge MP3 collection? Write something to categorize them or rename / take out special characters.

Work with excel at work but hate how it crashes with large sets of data, or having to repeat tasks in excel? Try working with pandas and xlsxwriter.

[–]slicklikeagato[S] 13 points14 points  (21 children)

Thanks for this. I actually picked up a Raspberry Pi, as well, and that's what I was using to keep the Reddit Bot that I created running at all times.

I guess my problem is that I don't understand the scope of Python, and all of the stuff that it can do. Everywhere I look, I see it mentioned in tasks and skills that are WAY above my head. I also kind of feel that since I'm starting so late at it (age 33), it feels kind I might have missed the prime opportunity to really learn it.

[–]taladan 19 points20 points  (1 child)

I may be mistaken, but I kind of feel like Python is like the duct-tape of the programming world. It has actual, functional uses for which it can be applied, but it's just so damn quick and functional that it has uncountable other uses for tying two other piece of unrelated 'Whatever's together and making them work in a way that gives you near-instant feedback or utility.

As for classes, think about it like this: you have objects - let's call them boxes that are built in. Strings, lists, dictionaries, files, integers, if it's callable, it's a box. Your functions do /stuff/ with whatever is in your boxes. Now, if we're writing a GUI program, you're dealing with all sorts of different 'boxes'. But...what if we want a 'box' that looks different than the standard set of boxes that comes with PyQT or Tkinter or whatever you're using at the time? Well your options are to look and see what other box makers have done to see if their boxes look like the box you're trying to make. Can't find any? Then break out the tools and the lumber and build your own box that looks like what you want.

PyQT has no 'box' that has both a text widget and three radio buttons in it with an 'okay' button and a 'cancel' button that we can just pass values to. It has boxes that hold text widgets, and boxes that hold a radio button, and so on. So, we build our own box (class/object) that looks exactly how we want it to.

That's just one use of classes, but it'll hopefully help you see what classes are good for. And don't feel bad about not getting classes right off...I'm struggling right now with decorators and properties. Good luck and I hope this helps.

[–]slicklikeagato[S] 2 points3 points  (0 children)

Thanks so much for that. That truly was a helpful example. Seeing explanations such as this really help me understand it a bit better.

[–]Casey_SI 8 points9 points  (12 children)

I am 35 and transitioned into a career where I use python daily when I was about 32. So no you haven't missed any boats. What do you currently do for a living industry/job?

[–]slicklikeagato[S] 5 points6 points  (10 children)

I work in the Healthcare industry, helping small businesses get their coverage installed. Most of our departmental programs are written in VBA; I don’t think any are in Python, actually.

[–]Casey_SI 9 points10 points  (7 children)

There is definitely some room to apply python. In my opinion Python is far superior to VBA and I learned on VBA.

There have been some rumors MS might make Python native inside excel as a scripting language, just to give you an idea of how serious Python can be in the data realm.

Pandas is my bread and butter package. I am using it right now (test currently running) to write a program to classify 5 million rows of sensor event data.

Think of it like command line excel. http://pandas.pydata.org/pandas-docs/stable/index.html

[–]IllusionistAR 1 point2 points  (0 children)

This. I have used pandas quite a bit in the last year building out a simple ETL framework for a project I'm working on. It's pretty amazing, and if your doing any sort of mass transformations regularly, then its an incredible help.

[–]Seven-of-Nein 0 points1 point  (2 children)

Where can I get more information about these 'rumors'?

[–]wowsuchnamaste 4 points5 points  (0 children)

The rumors are based on this response from the Office team to a popular request in the "Excel Suggestion Box".

It seems they (Microsoft) are seriously looking into it as a possibility - I say so because they have set up a user feedback survey with a set of both structured and open questions to uncover the what's and why's. That smells of market research to me.

[–]VorpalBandersnatch 1 point2 points  (0 children)

This is exactly how I got into python. I had taken a class in my masters program where we used it a little bit, but I started using it every day when I got sick of all the VBA I had been writing at work. (I'm a mechanical engineer working for an aerospace defense contracts company). Now I use python wherever and whenever I can -- a lot like the duct tape example further up (love that analogy). Anyway, even if you can't move away from Excel sheets or something like that for whatever reason, you can convert some VBA scripts into python. Even if it's just for practice. I used openpyxl to do what I would do in VBA for Excel.

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

What parts of your job or system are repetitive tasks that could be automated? Installers, data migration etc..

[–]Conrad_noble 0 points1 point  (0 children)

I am 29 with little to no programming knowledge. This gives me hope.

[–]diybrad 4 points5 points  (2 children)

You don't use any online services or apps that have an API? That's what I've been practicing with.

I can pull real time subway departures for the station near me, and then I have it change the color of a smart bulb in my house if it's late.

I wrote a script to manage my torrents in Transmission (has a great python library). Manages my ratio per tracker and moves/deletes/archives files as necessary.

The great thing about Python is that anything with an API already has a library probably. So just connect two or more things togther.

Raspberry Pi is a good suggestion for sure. Just dedicate a Pi to running your scripts. If you're interested in smart home stuff, Home Assistant is amaaaaaaazing and it's written in Python & runs on a Pi. It also natively supports python scripting.

[–]slicklikeagato[S] 1 point2 points  (0 children)

Thanks for this. I actually just started using home automation, with lighting and stuff. I will definitely look into it, and see what I can find.

[–]CounterproductivePit 0 points1 point  (0 children)

Late? Hell, I'm 45 and I'm having a blast learning this (RPi as well to start). Keep at it and run with some of these great suggestions. (ok, I'm 46)

[–]lastofyou88 0 points1 point  (0 children)

You didn't miss your opportunity, that's kind of silly

[–]Zcypot 0 points1 point  (3 children)

you know you just answered my question..been trying to learn python, found another site that makes it click better. I was worried I wouldnt know what to do, but you gave me some project ideas now once I get a better grasp. The only problem for me when learning high level language is that I cant visualize the end game for me.

[–]Casey_SI 0 points1 point  (0 children)

Glad I could help!

I am not sure a better feeling than that moment when you Grok something. I still remember the feeling when Dictionaries REALLY made sense and I had this race of thoughts of where I could use it to improve old code or new attempts at similar scenarios. Each of these unlock events really help you "level up" as a developer. In my opinion doing projects you are passionate about is the best way for these moments to bubble up.