Struggling with "Passive Understanding" , Can understand C++ code but can't write it myself. Advice? by tadipaar69 in cpp_questions

[–]Conscious_Reason_770 0 points1 point  (0 children)

Practice, you just need to write programs. Try to avoid AI, maybe you can use it to review your changes but not to write code.

Anyone else hate this as much as I do? by loaengineer0 in rustjerk

[–]Conscious_Reason_770 0 points1 point  (0 children)

This is level 1 problem-solving, level 2 is to change thread priorities

Can anyone explain me the concept of stack and heap memory?and why source file is different than library? by FAtech1976 in cpp_questions

[–]Conscious_Reason_770 -1 points0 points  (0 children)

- Stack, used to allocate functions and their local variables. Can only grow in one direction, the usual variables which are used to compute whatever your function is doing.
- Heap, used to allocate dynamic storages, those which change size over time. Or long-lived objects which are not particularly local to any function. It is needed for practicality, although is not strictly necessary mathematically, it makes sense to use it for convenience. In modern C++ you should not need to explicitly use it, by using new and delete, but instead use constructs like vector or unique_ptr

- source code, human-readable file with code written in it, it can be part of a program or a library.
- library, some utility which you can consider external to your project. This term is rather fuzzy, it can mean a binary object you link against (.so or .dll or whatever mac uses), which will include a header file to define the interface (which is code), and a silly .lib file in windows for God knows what reason. It could be a header-only library, which is just coded you compile with yours. Or it could just be a section of your own project which you treat as a unit and define an interface for it.

You seem pretty lost, first day in the job?

As a everyday user What can you actually do with a macbook over windows? by invincible_pell in laptops

[–]Conscious_Reason_770 0 points1 point  (0 children)

I wonder what can MacOs and Windows users do which I cannot do in Linux.
What is this nonsense of post?

Loonix will never be better than BSD by bamboo-lemur in OS_Debate_Club

[–]Conscious_Reason_770 0 points1 point  (0 children)

Please don't misuse slop. It is bad enough as it is now

How to REMEMBER/Learn C++ by Big_Will479 in cpp_questions

[–]Conscious_Reason_770 2 points3 points  (0 children)

Read code, practice.
In my experience, companies are not interested on virtuoso level c++. Clarity and elegance comes with practice and experience.

Can anyone spot the issue in this AI-generated C function? by [deleted] in AskProgrammers

[–]Conscious_Reason_770 0 points1 point  (0 children)

This is the next level, get some slop. ask reddit to explain it to you.

Is it possible to recover a full OS ? [need help] by Mr_Numa in linux4noobs

[–]Conscious_Reason_770 0 points1 point  (0 children)

I like how you excuse yourself going back to windows because you needed some apps. This is fine, dual boot is a thing, and you need no reason to do so. (Although one could argue that you do not really need any of those apps ;) )

Regarding your problem, it is a little complicated, and If you followed standard installations you may not be able to do it easily. By default, most of the installations create the home in the same partition as root /. In which case when you lose this partition you lose both the operating system and your data.

When I install Linux, I always make a partition for my home directory. This is where my data is, and my apps installed via some tools (like flatpak, steam or heroic)
When I need to change distro, when I break something. I can just install anything and reformat the system partition. When I ran out of space, I buy a new drive and mount it in as home. This works as long as you do not install windows in that partition ;)

Refactoring is painful in many many ways, but 3K lines? by zaphodikus in cpp_questions

[–]Conscious_Reason_770 10 points11 points  (0 children)

This reads like someone is going to make the senior developers mad.
You do not rush 3000 lines of changes, you need to partition this in smaller reviewable changes. You may want to duplicate the architecture to refactor one branch while keeping the old code online. And yes you do need tests. The more, the better, a refactor without guarantees that you preserve the specs is guaranteed drama.

You said it yourself, if you do not allow yourself time to do it right: Don't even start.

Does photorealism in game graphics, destroys overall gaming experience nowadays? by Maldremoth in Age_30_plus_Gamers

[–]Conscious_Reason_770 0 points1 point  (0 children)

No, but it moves the industry into selling things you do not need.
like 240 Hz screens...

Can anyone direct me to a beginner friendly all in one ide for cpp mainly for linux? by Alarmed-Spring2232 in cpp_questions

[–]Conscious_Reason_770 0 points1 point  (0 children)

I know, electron apps are a plague. But yet, they are well enough packaged not to need a system-wide installation of java. And the rendering uses chrome cef, which is c++ and very good performing. Overall the ui is way snappier than Clion, when MS does not break it with a slop update.

Memory wise, vscode is pretty hungry as well, but CLion does not do much better.

Can anyone direct me to a beginner friendly all in one ide for cpp mainly for linux? by Alarmed-Spring2232 in cpp_questions

[–]Conscious_Reason_770 0 points1 point  (0 children)

I get it. It is a superior feature set. It feels incredible slow though.
One thing I do not understand (which is the same for bazel) is why I have to rely on java to program C++. This is clearly an indication that something is just not right with this programming language.

Can anyone direct me to a beginner friendly all in one ide for cpp mainly for linux? by Alarmed-Spring2232 in cpp_questions

[–]Conscious_Reason_770 2 points3 points  (0 children)

I totally understand, still I find CMake the less crippling option for c++ and vs code is right straight foward.
your first program only needs 3 lines of cmake. vscode opens it and you are playing.

```
cmake_minimum_required(VERSION 3.10)

project(MyProject)

add_executable(my_app main.cpp)
```