The short answer is that it depends on the language and the size of the project. Larger projects need more RAM than smaller ones do. The phrase “for coding” in your second question necessitates some clarification.
What are you talking about when you say “programming”?
Different types of RAM are required for optimal performance in different job roles, such as website and app coding, graphic design, AV work, sound editing, industrial robotics… Each distinct role demands a distinct quantity of RAM for optimum performance.
There are, however, a few languages that don’t require much memory. For example, Java will fail with OutOfMemoryError exceptions if there isn’t enough memory; iOS apps written in Objective-C will quit unexpectedly because of low memory warnings; Python will consume all of your RAM as it works through it.
For example, consider the following computer components for various activities:
Web browsing, despite its minimal usage of your hard drive or CPU, however, makes significant demands on your RAM. Having more RAM allows for faster loading times and less lag when scrolling.
The addition of a new feature in your iOS app might consume all of your desired RAM and CPU memory. Graphics-heavy applications need more memory to handle the larger files they must work with.
However, high-quality sound or video editing does not need as much RAM, relying instead on the hard drive’s speed and stability (but does require a lot of processing power). As a result, we may infer that mobile applications do not always need as much RAM as other programs.
Some languages consume more RAM than others. C#, Java, and Objective-C all require more memory than Python does. While it’s impossible to predict exactly how much RAM you’ll need for a specific job, these charts can help you estimate how much RAM your PC will require:
The first chart shows us how many megabytes per square foot of floor space is required for typical activities like web surfing, app creation, and so on. The second chart reveals that iOS programs run on Android require twice as much memory as Android devices themselves! To put it another way, if you’re attempting to code a large program (such as the entire version of Candy Crush), you’ll need more RAM in your smartphone.
For running apps and web-related code, it’s usually suggested that you have at least 2GB of RAM installed on your computer.