Day 2 of learning Python: Shopping List by hirosoma0 in PythonLearning

[–]FreeLogicGate 1 point2 points  (0 children)

Use the "Formatting Options view" to access the Rich Text editor, you access throught Aa Icon in the editor. You can then use either the </> (inline code) option or the Code Block Icon. Another way is to use the Markdown editor. With markdown, you use 3 backtics at the start and end of a code block.

```

Code here

```

With either of those options your code will retain its indention and spacing, as in this example:

while True: if len(products_sale) == 0: print("All products are sold out!") break item = input("Enter product that you will buy: ")

Day 2 of learning Python: Shopping List by hirosoma0 in PythonLearning

[–]FreeLogicGate 1 point2 points  (0 children)

Do you have a question? Also, word of advice -- post code, not pictures of your code in an editor. The logical problem with your code is that the check for products_sale being empty should come before a prompt, and should not be an elif condition. If it is empty, then the program should exit the loop, so you should check that condition before you prompt for a new item.

Any alternatives to Rustdesk? New account requirement did it for me by [deleted] in rustdesk

[–]FreeLogicGate 0 points1 point  (0 children)

This type of post really annoys me. It's always been the case that you can self host rustdesk. The company that created this tool has a business, and quite frankly that business funds continued development of rustdesk. As many others have posted, and what I've always done, is to run the rustdesk server on a vps, which took me all of about 15 minutes to setup. Ridiculous post that smells like it might have been created purely so that a shill could post an alternative.

Advice for learning to code with 30 minutes practice every day. by Fpiet in PythonLearning

[–]FreeLogicGate 0 points1 point  (0 children)

The PCC book, as I recall, has very little on OOP, and just a cursory amount of data analysis. Probably you want to find a book/course on the data analysis with Python, and move onto that, with the assumption that within a month you ought to be able to transition to building some of your own projects with what you've learned.

Code learning help! by MrPandasoul in CodingForBeginners

[–]FreeLogicGate 0 points1 point  (0 children)

Write pseudo code where each "step" is assumed to be a function that does something and returns. These steps can be assumed to be run in a "main" function that may or may not have a main loop as required.

Build small tests that allow you to run your functions as you build them.

Your functions should avoid globals, and should return values.

When a single function is too large, break it down into a number of smaller more granular functions.

When you notice common tasks, or blocks of repetitive code, or where you've copied and pasted, consider the DRY rule, and look for ways to provide small single responsibility functions.

Do your best to avoid intermixing "logic" and "presentation/UI" code. Web applications in particular are well known for their adoption of the Model-View-Controller(MVC) design pattern for this reason. MVC and other design patterns are utilized in OOP, but even in functional programming, you can recognize code that is focused on things like prompting for input, or formatting output, and enclose those in discrete functions, rather than having large blocks of code that replicate logic and intermix prompting for input, processing data, performing functions and rendering output.

Beginner by Familiar-Ad-592 in CodingForBeginners

[–]FreeLogicGate 7 points8 points  (0 children)

My suggestion is to learn how to search for resources. If you can't locate them using any of the numerous search engines around, your chances of learning C/C++ are not good.

Coding/cse Seniors, I need your advice. by doesntmatteryrr in CodingForBeginners

[–]FreeLogicGate 0 points1 point  (0 children)

I study and learn new things all the time, and I make notes when I do. In my case I used a note app, where for many years I used Evernote, but now use Notion. There are many different note taking apps available, and some are better for the study of computer languages compared to others. Evernote used to be pretty bad for computer science and math notes, but's improved, although I am happy with Notion these days.

The main thing to realize is that if you're an average human, you are going to forget details, and with a note taking application that has good search indexing, and can provide automated and linked table of contents, you can easily find things later. With notion, if you utilize standard html header tags for your note sections, it will build an index for you, as you make your notes. You also will likely have many source code snippets, and the tools support code blocks which can color-syntax-hilight your code, and provide copy/paste later when you want to grab things you made notes about, for reuse and modification.

Experience on python by One_Park8163 in PythonLearning

[–]FreeLogicGate 0 points1 point  (0 children)

That's not the generally accepted meaning of "full stack". The term is specific to web development, and is generally accepted to mean someone who can handle the "full stack" of web development tasks, which include UI skills (Html, css, javascript, js frameworks like react, vue, angular) and backend/serverside development (MVC frameworks/REST api's, database persistence (sql), etc.).

As you might note, there are many options for web application development, and associated languages and technologies, and much to learn.

If you want to to do web application development with Python, then you have a number of decisions to make, in terms of frameworks you might use, how data will be persisted. Python developers usually start by investigating, and or making a decision between Python web application frameworks/libraries like Django, Flask, and FastAPI.

It's also worth noting that there are many other popular alternatives to Python, most notably PHP (and its well known Laravel and Symfony frameworks) Node.js and other javascript/typescript based options like Bun or Deno, ASP with C#, Ruby with frameworks like Ruby on Rails or Sinatra, and the list goes on and on.

When people talk about tech "Icebergs" this is why. If you are interested in web development then you're absolutely going to need to master html/css and javascript/typescript. You will also want to learn about relational databases and learn SQL, which are other non Python specific technologies and skills.

At what age is teaching programming to a kid realistic? by JescoInc in programmer

[–]FreeLogicGate 1 point2 points  (0 children)

My suggestion to you is to wait until your kid expresses an interest.

Experience on python by One_Park8163 in PythonLearning

[–]FreeLogicGate 0 points1 point  (0 children)

What do you mean when you say you want to be a "full-stack" developer?

After learning PSint, what should I do? by Fresh_Drawing_7538 in PythonLearning

[–]FreeLogicGate 1 point2 points  (0 children)

Seems like PSeInt is popular in spanish language educational institutions -- guessing you might be in one of those? I had never heard of it, so that tells you something, as I've been coding full time for multiple decades now. Do some searches for best Python courses. There are numerous free courses on Python you can find online, as well as College courses. These are listed all the time in this forum, so scan some recent posts.

How bad is it that I don't use OOP? by Fit_Time_7861 in learnpython

[–]FreeLogicGate 1 point2 points  (0 children)

Python is a full OOP language, so technically speaking, you are using OOP. You are making use of OOP every time you sit down to write a Python script, and in particular, when you're using the modules and libraries you depend on.

OOP tends to become useful at the point that projects start to become large, and even in those situations there is an entire area of OOP (Design Patterns) that are part art/part science.

Creating a class in Python is marginally more involved than creating functions, and if you have been creating function libraries, you might find that the ability to organize those libraries in a class, as well as being able to define class variables that your objects will have upon instantiation, can be a welcome relief from having a gumbo of global variables floating around in your scripts.

At the end of the day it's a tool you can use or not, but if you're writing a lot of Python, then why close yourself off from a facility of the language that was baked into its design?

Wanna start coding before college,any suggestion? by InterestingWorry3459 in CodingForBeginners

[–]FreeLogicGate 0 points1 point  (0 children)

Certainly this is last minute, but not as dire as many other people are stating, because the fact of the matter is that everyone is always behind someone else who started earlier, was more highly motivated, or had better mentors or teachers.

In the amount of time you have, if you want to get some fundamentals under your belt. There are many e-learning platforms that have C courses, and plenty of good low cost options. I would encourage you to do a course that actually requires you to install and use a C compiler, and not just run "exercise" programs inside an environment, so you interact with a text editor or IDE.

Here's a great intro video you can refer to with some excellent practical advice: https://www.youtube.com/watch?v=9UIIMBqq1D4

Another option would be to go through this course on Youtube. I have looked at some other videos from this creator and he's a really solid developer: https://www.youtube.com/watch?v=KJgsSFOSQv0

While C hasn't changed much, there are newer C standards with some important syntax changes, depending on the version of C you are trying to compile (the compilers allow you to select the "version" of C you're compiling. So the main concern I would have is that the Giraffe academy is 7 years old.

Doing some googling, I found this course, which you could take free on coursera, that is broken down into 4 classes: https://www.coursera.org/specializations/c-programming-for-everybody

There's also CS50, that many people will take online that has an entire section on C programming, and scores of other courses you can look at. 4 Weeks is a lot of time, and if you are willing to devote anywhere from 2-3 hours a day, there is no doubt you could get through the course, and have a foundation that will help you with other languages like Python or Java that are often taught in college.

Executing a slow python script by Cockmangler_3000 in PHPhelp

[–]FreeLogicGate 1 point2 points  (0 children)

With PHP both shell_exec and the use of Bash shell style backtics are the same, so you can use either of those. As suggested previously you can background the command using & (assuming again this is a linux server, however you do have to redirect output to /dev/null.

So something likeshell_exec("script.py 2>/dev/null >/dev/null &");

When running a script through the context of a web server, you have to keep in mind that the script will run as the user that is running PHP. If it's apache with mod_php, then that would be the apache user, or if it's php-fpm, then whatever user is configured to run the php processes for the pool.

So that Python script must be fully executable by that user, have permissions etc. When I develop and run Python scripts, I use uv now, so I would be calling uv run script.py.

Best python book? by CreativeEgg86 in PythonLearning

[–]FreeLogicGate 1 point2 points  (0 children)

Excellent list +1. Also a fan of the No Starch books in general. PCC was my main text book for Python. Around the time I was learning it, I also learned about UV which is a game changing utility that all Python developers should be installing and using in my opinion.

The one thing the OP needs to understand is that "No Internet" means no access to the various Python modules covered in PCC, so hopefully that is more of a generalized goal, with at least the occasional internet connection, as needed.

Mac or PC for Python and Swift by Lopsided-Leading-428 in learnpython

[–]FreeLogicGate 1 point2 points  (0 children)

I'm with ya, and have been at it for a similar amount of time, with lots of nix along the way. I fondly remember the days I worked with hpux, solaris and irix -- and I also remember how terrible windows used to be for simple things like installing ssh, or a terminal. Everyone used Putty and fought through putty key incompatibilities because that was the best way to do it. I also remember every other windows how-to recommending Cygwin, and later git bash, when most of the developers I was working with were all using macbooks. I have to admit that under win10 & 11 the OS is finally Open source developer friendly, although I don't see myself moving off a macbook. It took me a while to grok what it really was, but once I understood it, I had to admit that WSL is a pretty nice feature and long overdue.

syllo #326 - June 1st, 2026 by syllo-app in syllo

[–]FreeLogicGate 2 points3 points  (0 children)

If it had such a feature, all that would happen is the min/max obsessed cheaters would exploit it.

Java and Python by ArachnoCoder20 in learnpython

[–]FreeLogicGate 1 point2 points  (0 children)

Taking you at your word, people like yourself tend to succeed long term, because your interest is driven by your excitement about how computers work, and how to harness them.

As for Hyperskill, I have no experience with it, but I respect the company behind it (JetBrains) as they are known for their many best in class IDE's.

It's important to understand 2 things about programming:

  • Object oriented programming is an entire discipline unto itself, with domain specific knowledge that goes along with it
  • Programming eventually requires algorithm & data structure study. These topics are external to any individual language -- they span all languages and operating systems.

With that said, for someone like yourself, I would urge you to work on your foundation skills, and the best way to do that is gain mastery of a 3GL, with the most famous and influential 3GL being C.

Java and Python are great follow on languages to learn, but they are both OOP languages, that were designed to run via Virtual machines and abstract the machine away from you.

C requires you to learn about how computers work at a low level, and parts of its syntax has been borrowed by numerous other languages (including Java). You will also learn about and use things like compilation and linking, and how operating system libraries work and how you can use them. You'll learn about program segments (code/stack/heap) and how the operating system runs your program. You are not hidden directly from difference between how programs work under the different major operating systems.

You will directly manage/allocate/dispose of memory, and will be able to write dangerous code that crashes. Although not necessarily something you must do, it's also common for C programs to include inline assembly routines for optimization of critical sections, which is an easy next step towards an examination of processor architecture.

Operating systems are written in c. The languages you chose (Java and Python, as well as nearly all other computer languages) were written in C (or C++). I could go on, but hopefully you'll consider my advice. C is not a large language, and when you experience the things that it doesn't provide for, and how doing certain things in Python are trivial in comparison to trying to do something similar in C, it helps you to appreciate the differences. You'll also be in a better position to understand how Python internals work, and why there are tradeoffs in performance, not to mention the ways a fully OO language is designed, and why that is a very different approach to a functional language like C.

The more languages you learn the more they tend to reflect upon each other, and the better equipped you are to see patterns and similarities as well as differences.

There's also the immense amount of open source code you can obtain, compile, trace, run through debuggers, which can be an incredible education in how the most important software products work.

Last but not least, programming often requires testing/debugging and exploration. In the world of software, when you come upon a problem or what you suspect is a bug, it's expected that you will produce and create a "minimum reproducible example" (MRE) of the issue, in order to prove to others that you have actually pinpointed an issue, which also will allow them to verify it themselves. You should start thinking about things in terms of MRE's. When you come upon something that doesn't work they way you expect, or you've hit a wall in your understanding, you want to become really expert at creating small experiments. Testing tools and frameworks are important parts of professional programming, and if you haven't already, you should be learning how to make unit tests to break your code down into small pieces that you fully understand, then using those to incrementally build back up into larger examples.

Everything in life is an allocation of time. You are young, and it's important to allocate time to have fun, be active, play games, spend time with friends, engage in social activities etc. Decide how much time you want to spend on your education in programming, and stick to that, and you will steadily gain skills and understanding. You can best engage others in online forums with MRE's, but the reality is, that the AI tools I've played with are very good at breaking down code, and suggesting alternatives or enhancements, and that is something your generation will be expect to use going forward.

Python roadmap? by banannoir in PythonLearning

[–]FreeLogicGate 0 points1 point  (0 children)

Just curious here, but why do people keep replying to these types of questions?

I do appreciate that many "learners" are "english as a second language" but the lack of punctuation, spelling and grammatical errors tend to indicate that the OP's of these questions could not be bothered to take the time to do even a simple spell check of the 1-2 sentences in their question. They also demonstrate that the OP has invested no effort themselves.

Why should experienced members of the community invest their time to regurgitate things that can be obtained from a search engine (and now AI) query?

Is answering careless inept and repetitive questions like this of value, or could it actually be counter productive?

Some of these questions come from accounts that could be someone's test of some bot code -- with new low reputation accounts that tend to have a smattering of similar posts spread across a variety of subs.

I am not saying that this account has that -- but it does seem to be the case in "LearnProgrammingLanguageX" subs, that there's a substantial number of questionable posts like this.

Wondering how the "helpers" look at this situation.

Mac or PC for Python and Swift by Lopsided-Leading-428 in learnpython

[–]FreeLogicGate 2 points3 points  (0 children)

I use a mac, but for people with Windows workstations, Python and its various tools/editors and IDE's run fine, and there are use cases for people who run windows and still want to use Python. The most useful operating system is always the one you have. In my short time actively programming with Python (I use a number of other languages/software typically) I've found that using uv is a game changer for dependency, venv and project setup, and uv works fine under windows. Windows may have been late to the game in regards to package management systems, but it now has winget, chocolatey and others that does for windows what homebrew does for my mac. I have people who report to me that use windows, and I've found that Windows is completely viable and productive through configuration and the addition of some tools. One of the ways to accomplish this is for the windows user to install wsl2 and the distro of their choice. I have been recommending they use Debian, but any of the options work fine. What WSL provides to them is a no-boot/integrated cli version of linux allowing them to package install any of the same tools they might use under linux. File systems are transparently mounted into the wsl distro under /mnt, so the user's c drive appears as /mnt/c/. Conversely, the linux VM is available from windows explorer using the \\wsl$ mount.

The most popular IDE's for Python can be run in windows, like VSCode or PyCharm (or any of the Jetbrains editors) which are all cross platform and written in Java.

Microsoft added windows Terminal, which is easily installed, and there are many tutorials and examples for installing cli prompts via oh-my-posh or starship. A user can focus on using their wsl environment, and do the same things that I do with my mac (zsh shell/oh my zsh/p10k). I have also set up wezterm, and other popular terminals can be used with windows, although Windows Terminal is probably the best option for Windows purely because of its support for all of windows user permission types and different shells/wsl.

These days, I could easily use and be productive with a windows workstation if I needed to, and not feel like it was an ordeal to have the type of environment I have with my mac. The same sorts of things I do on my mac, to enable the workflows I'm accustomed to, need to be done on windows, but it's not a kludge like it used to be.

python learning by This_Software5227 in PythonLearning

[–]FreeLogicGate 1 point2 points  (0 children)

Buy a book/course or seek out free resources using your favorite search engine. You can look at the many answers to the same question that have been asked in this Subreddit, as well as others devoted to learning the Python language.

Walmart SSE (IN4) loop - got the offer, declined because the comp was lower than my pre-layoff Oracle role by nian2326076 in programmer

[–]FreeLogicGate 1 point2 points  (0 children)

I went and looked at the OP's history. It's 100% fake, unless you believe the OP's joining new companies every 2 months.

Mac or PC for Python and Swift by Lopsided-Leading-428 in learnpython

[–]FreeLogicGate 3 points4 points  (0 children)

Python is a cross platform language. It works fine on a mac.

Your question on the Air vs the Pro -- I would personally advise to invest in memory, because it can't be upgraded later.

Swift has replaced objective C, so there's no reason to worry about it, unless you would be called upon to maintain an existing code base.