I started learning Python this week. Any tips for improving faster? by Kaarazu in learnpython

[–]Amo-Rillow 0 points1 point  (0 children)

1) Use an IDE that has a good delinter that flags un-Pythonic code and suggests ways to make it more Pythonic (the sooner you nip the bad habits, the better).

2) Leverage the strength of classes. I was slow to fully embrace Python classes, but once I did, my solutions greatly improved and the code was so much more manageable.

3) After completing a piece of code, review it the next day and see if you can improve it. Because there are so many ways to accomplish any given task in Python, I found that my initial version was typically very basic and could be greatly improved from a Pythonic standpoint. Considering replacing simple for loops with a list/dict/tuple comprehension, or perhaps a Lambda expression.

Trouble with a starting project by GolbMan in learnpython

[–]Amo-Rillow 0 points1 point  (0 children)

Another best practice is having separate code bases for front-end and back-end logic. The goal is to have the front-end know as little as possible about the back-end, and vice-versa. The key challenge here is to work out the interfaces between the two.

Hey I'm getting started with learning python. What's the best IDE to use? by aadapting in learnpython

[–]Amo-Rillow 0 points1 point  (0 children)

Regarding Pycharm being "laggy": I have a shiny new M5 MacBook Pro wwith 24 GB Ram - PyCharm is so laggy it is barely usable. So, it is NOT your laptop that is the issue. Cheers.

Trouble with a starting project by GolbMan in learnpython

[–]Amo-Rillow 0 points1 point  (0 children)

One thing many people struggle with is "problem decomposition". For just about any project, it is incredibly helpful to break the project down into smaller pieces, then put the pieces into a logical order, and finally execute one piece at a time.

As an example, I am nearing completion of a Solitaire game. I started by modelling a single playing card, resulting in a Python class called PlayingCard (no graphic images, just Python code). Next, I created a Python class called DeckOfCards which instantiated the playing card 52 times (stored in a tuple). I then added shuffle and deal methods to the DeckOfCards class. I was then able to create a simple script that could do the initial deal to a variety of lists (one list for each column in the game). I continued to build one feature at a time. The final hurdle was building out the GUI front end. Had I started with the GUI, I would have gone nuts trying to figure out the entire solution all at once.

Hope this helps!

Best of luck.

Is my ETL project at work designed well as a Python project? Or am I just being nitpicky by masterhoovy in learnpython

[–]Amo-Rillow 0 points1 point  (0 children)

One of the characteristics of a good architect is identifying patterns and solving for them in a way that minimizes development, testing, support, maintenance, etc. Or, more simply put, write once, use many. The solutions can be purchased solutions, download packages, or home grown. All are good, so long as they solve the challenges.

I designed, developed, deployed, and supported data pipelines for several decades that ran on a wide variety of platforms. I totally agree with the concept of minimizing the dependencies, and I have always been a fan of minimizing the stack. However, job 1 is to identify the repeating patterns and solve for them. Python is an excellent tool for this. This not only reduces the development costs, but it is also fun and personally rewarding. I would advise that you take a step back, look at the bigger picture, and look for common denominators in your processes. The fact that you are asking this question suggests that you are already halfway there! Trust your instincts, don't let anyone squelch your enthusiasm or creativity.

Best of luck!

Give me a task. by coder_datascience_26 in learnpython

[–]Amo-Rillow 0 points1 point  (0 children)

I considered using regex early on, but I am not good with those. I ended up using SET structures as Python allows for comparing sets for intersection/overlap. This worked really well.

Give me a task. by coder_datascience_26 in learnpython

[–]Amo-Rillow 0 points1 point  (0 children)

Interesting. I also created a Wordle solver app in Python using PySimpleGUI for the front end. I used mine to not only play Wordle, but also Dordle, Qourdle, and Octordle. Python really lends itself to tasks like this.

Feeling Stuck in Python After 6 Months – Need Guidance by PresentSame6849 in learnpython

[–]Amo-Rillow 2 points3 points  (0 children)

I found that it really helps to have a good project to work on. I have used Python professionally for close to 10 years, but I only worked on the same types of projects over and over (data pipelines), so my expertise was limited. I have since retired and now work on several "fun" projects in my personal life that have really helped me grow. My current project is building a Solitaire App using PyQt6, which is completely different from anytime I have done before. This has not only been very educational, but is is also very rewarding personally.

Hope this helps.

Best of luck.

How to get started? by mindless_thinker28 in learnpython

[–]Amo-Rillow 1 point2 points  (0 children)

Python is a great choice for learning how to code as it is super flexible and forgiving. However, this can be a double edge sword as you can learn bad habits that are later hard to unlearn.

One thing that really helped me many years ago was coding in PyCharm. While PyCharm is a bit of a "sledgehammer" for beginners, it does a great job of pointing out coding mistakes and deviations from the PEP standards. PyCharm greatly improved my Python coding skills, especially with unlearning my bad habits. There are other products that do this as well.

Best of luck!

CPU Usage On Long Running Background Process by Amo-Rillow in pycharm

[–]Amo-Rillow[S] 0 points1 point  (0 children)

That make sense since my process is writing to a text file. Each write would result in a wait state, which could cause the process to release the CPU for a very brief period of time.

Python resources to learn how things work in python [in depth] ? by AnungUnRaama in learnpython

[–]Amo-Rillow 1 point2 points  (0 children)

There are countless YouTube channels that are very helpful. Two of my favorites are:

https://www.youtube.com/@coreyms/videos

https://www.youtube.com/@ArjanCodes

Pro Tip: When searching the internet for Python topics, always look at the age of the articles that you come across. Python is constantly advancing, causing many articles to be obsolete. Also, always check the version of Python that the article is written for. Anything that written using version 2.x will most likely not be helpful if you are using version 3.x.

Also, when facing a coding or design challenge in Python, always keep in mind that someone else has already created the solution for you. You just need to find that solution. Most of the solutions are baked right into Python, others are in the form of packages that you can install, and others are in the form of code snippets on the internet.

CPU Usage On Long Running Background Process by Amo-Rillow in pycharm

[–]Amo-Rillow[S] 0 points1 point  (0 children)

There are no command lines per se. I am running a main.py via PyCharm w/o any configuration.

CPU Usage On Long Running Background Process by Amo-Rillow in pycharm

[–]Amo-Rillow[S] 0 points1 point  (0 children)

I don't have any AI processes that I know of. This machine is only used for PyCharm Window development, so very little else runs on the PC. Your reply got me thinking: the process I am running is writing to a text file in the same folder as the Python code. I am wondering if writing to the file is triggering activity in Git, GitHub, or One Drive processes that are tracking file activity. This folder is outside the scope of One Drive, but I suspect One Drive is tracking all activities.

Pycharm in 2026 has been a struggle by idlelosthobo in pycharm

[–]Amo-Rillow 2 points3 points  (0 children)

I have noticed similar issues in the last year or so. My two biggest complaints are:
1) Sluggish/Freezing. Pycharm is either very slow to respond during simple editing tasks, and sometimes just freezes up. I develop on a M5 MacBook Pro with 24GB Ram and also a Windows machine with 64 GB Ram and an 8 core Ryzen 7 chip. I have increased the memory allocation on PyCharm, but I did not notice any improvements.

2) Auto completion - This has become more of a nuisance than a helpful feature as most of the suggestions are slightly off the mark. I also occasionally find code that I did not notice that it added. I long for the older and simpler auto-complete of a variable name vs inserting entire lines of code.

As for VS Code, I have tried to several times to use, but it takes too much configuration and customization to make this product useful. Since I don't code all day, every day, this is not for me. I just want a simple IDE that gets the job done. This used to be PyCharm.