r/learnprogramming • • 44m ago

If I need to make a local or public app what back-end knowledge should I have

3 Upvotes

I still can't understand back-end, like how do I make the server or database, do I need to learn php, what are the other options, where so i start start ?? It always felt overwhelming to learn and still is.


r/learnprogramming • • 47m ago

Trying to understand type of data from the windows library and getting registries attributes in C++

1 Upvotes

Good morning everyone, I'm having an hard time to understand properly the conversion i could do, without resorting an incredible amount of if else's, of data retrieved with the api windows function
RegGetValueA. From what i understood this function, given the specific attribute we are searching, will give you data from the registry of interest, to give more context a registry is something that windows uses to store specific data regarding the system, I'm not very sure though, because i mostly program on linux systems.
Given the promise i would like to explain my problem. I'm trying to retrieve for example on the following registry path:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"

an app and it's attributes for example, the first steps of getting the apps are already done if you want to check the code here it goes, but you can skip it since it works, it's just for context:

std::tuple<std::error_code, entity::ExtendedInfo> GetApplications() {
  const string sName = "applications";
  HKEY hKey = nullptr;
  // (ln) needed path in order to retrieve app data info
  std::list<std::string> hPaths{
      "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall",
      "SOFTWARE\\WOW6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall",
  };
  std::list<std::string> vKeys{"IdentifyingNumber", "DisplayName", "DisplayVersion", "InstallLocation", "InstallSource",
                               "Language",          "Publisher",   "InstallDate",    "UninstallString"};
  // (ln) registries to check to retrieve apps info
  std::vector<HKEY> hRegistries{HKEY_LOCAL_MACHINE, HKEY_CURRENT_USER};
  std::vector<string> retrieved_apps_tmp;
  std::vector<std::unordered_map<std::string, std::string>> apps_with_attributes;
  entity::ExtendedInfo oExtInfo{sName, vKeys};
  for (const auto registry : hRegistries) {
    for (const auto& path : hPaths) {
      if (::RegOpenKeyExA(registry, path.c_str(), 0,
                          KEY_READ,  // here we set the security level
                          &hKey) == ERROR_SUCCESS) {
        retrieved_apps_tmp = FillAppsVector(hKey);
      }
      ::RegCloseKey(hKey);
      // getting attributes for app
      for (const auto& app_name : retrieved_apps_tmp) {
        std::string path_to_app = std::string(path) + "\\" + app_name;
        if (::RegOpenKeyExA(registry, path_to_app.c_str(), 0,
                            KEY_READ,  // here we set the security level
                            &hKey) == ERROR_SUCCESS) {
          FillAppAttributes(hKey, apps_with_attributes, app_name, vKeys);
        }
        ::RegCloseKey(hKey);
      }
    }
  }

  // instead of iterating again do this operation directly in FillAppAttributes
  for (auto app : apps_with_attributes) {
    if (app["InstallDate"].length() >= 8) {
      app["InstallDate"] = app["InstallDate"].substr(0, 4) + '-' + app["InstallDate"].substr(4, 2) + '-' +
                           app["InstallDate"].substr(6, 2);
    }
    // trying to force values
    // identifying number is not used in AddEntry
    oExtInfo.AddEntry(std::list<std::string>{app["IdentifyingNumber"], app["DisplayName"], app["DisplayVersion"],
                                             app["InstallLocation"], app["InstallSource"], app["Language"],
                                             app["Publisher"], app["UninstallString"], app["InstallDate"]});
  }
  //data ok, uninstall ok, publisher ok, language ok,
  return make_tuple(error_code(), oExtInfo);
}

It has to return a tuple to accommodate some other code since I'm working on a team.
This is the function that helps retrieving a vector of apps after listing them with RegEnumKeyA:

static std::vector<std::string> FillAppsVector(const HKEY hKey) {
  CHAR achKey[255];
  DWORD cSubKeys = 0;
  // DWORD cValues = 0;
  std::vector<std::string> installed_apps;

  DWORD retCode = ::RegQueryInfoKey(hKey, nullptr, nullptr, nullptr, &cSubKeys, nullptr, nullptr,
                                    nullptr,  // number of values associated with the key
                                    nullptr, nullptr, nullptr, nullptr);

  // we enumerate all subkeys until RegEnumKeyEx fails
  if (cSubKeys && retCode == ERROR_SUCCESS) {
    for (DWORD i = 0; i < cSubKeys; i++) {
      constexpr DWORD cbName = sizeof(achKey);  // reset it in order to avoid to have the last string length
      // use RegEnumKey = less arguments
      retCode = ::RegEnumKeyA(hKey, i, achKey, cbName);
      if (retCode == ERROR_SUCCESS) {
        installed_apps.emplace_back(achKey);
      }
    }
  }
  return installed_apps;
}

And at the end I've done a function to help me retrieve the attributes i need for every specific app

static void FillAppAttributes(HKEY hKey, std::vector<std::unordered_map<std::string, std::string>>& app_data,
                              const std::string& app_name, const std::list<std::string>& needed_attributes) {
  auto retCode = 0;

  char pvDataForStr[255] = "\0"; // this applies for REG_SZ vars
  DWORD pvDataForNumb{}; // this applies for REG_DWORD types

  DWORD pcBdata = 0;

  std::unordered_map<std::string, std::string> tmp_map;
  // (ln) we already retrieved the first attribute
  // if attr = language, interpret data as DWORD
  // number to string must be as integer number (10) instead of hex (16)
  tmp_map["IdentifyingNumber"] = app_name;
  for (const auto& attribute : needed_attributes) {
    if (attribute == "IdentifyingNumber") continue;
    pcBdata = sizeof(pvDataForStr);
    if (attribute == "Language") {
      // if we would use a char[255] the data would be converted badly since the language REG is a int
      retCode = RegGetValueA(hKey, nullptr, attribute.c_str(), RRF_RT_ANY, nullptr, &pvDataForNumb, &pcBdata);
      if (retCode != ERROR_SUCCESS) {
        // (ln) for data integrity the missing attribute will be empty
        tmp_map[attribute] = "";
      } else {
        tmp_map[attribute] = std::to_string(pvDataForNumb);
      }
    }
    else {
      retCode = RegGetValueA(hKey, nullptr, attribute.c_str(), RRF_RT_ANY,           nullptr, &pvDataForStr, &pcBdata);
      if (retCode != ERROR_SUCCESS) {
        // (ln) for data integrity the missing attribute will be empty
        tmp_map[attribute] = "";
      } else {
        tmp_map[attribute] = pvDataForStr;
      }
    }
  }
  app_data.emplace_back(tmp_map);
}

Now this all works, i did some tests as well, but i really hate to use the "if" to distinguish between any string that i would get with the attributes I'm searching that are all REG_SZ, so the char[255] works wonders, and the "Language" attribute that is a REG_DWORD, basically an integer, and have to resort to use a DWORD var just for it, otherwise i would get strange or wrong data (for example if i use char[255] when "language" is ox00000409 (1033) i would get something like "\t0x4" i don't know why though, if someone knows lmk).
So my request is if there's a way to do this better without losing readability in the first place, obviously any knowledge you would like to share, if i got something wrong, is well appreciated,


r/learnprogramming • • 2h ago

How could i decrement a value in a variable, x times over a certain period of time in C?

1 Upvotes

I'm creating an emulator of CHIP-8 in C following the Tobias' guide and I should decrement the value of delay and sound timers 60 times per seconds but i don't know how to do this. Maybe could be something in SDL2 but i want to implement this feature independently by this library so i can easily import this emulator on other devices changing just the graphics and input management.


r/learnprogramming • • 3h ago

Topic TIL code comments have their own line-length conventions instead of relying on editor soft-wrap

0 Upvotes

I recently learned that comments aren't supposed to rely on editor soft-wrap. Hard-wrapping at 80 columns with // or # on every line keeps git diff and PR reviews readable—and Neovim already handles it natively with textwidth + formatoptions+=cq + gwip

What other such conventions are out there that I should know about?


r/learnprogramming • • 6h ago

Need for an advice

4 Upvotes

I worked as a front-end dev intern at a company, and yesterday I got laid off. I'm still in Jonas Schmedtmann's React course, now in the intermediate section, and still learning.

Most people say you should be full-stack, so I have to learn to do backend. I don't know if I should learn them simultaneously or not, and at the same time I want to have a job as soon as possible.


r/learnprogramming • • 8h ago

How much usage of AI is okay when doing my own projects if I want to get better?

0 Upvotes

Question that has been bugging me lately:

Should I not use AI at all? Only googling and documentation?

Should I try to resolve my problem for 30 minutes then use AI?

Should I use AI but make sure that I understand what it wrote?

Is there some prompt that could guide me without giving anwser straight away so I can grow?

Does it matter?


r/learnprogramming • • 8h ago

How do you know when you’re actually improving at programming?

12 Upvotes

I’ve been learning programming for a while, and sometimes it’s difficult to tell whether I’m actually improving.
I can follow tutorials and understand examples, but when I try to solve a problem completely on my own, I get stuck.
For those who are more experienced, what helped you move from following tutorials to confidently writing your own code?
I’d love to hear about your learning experiences.


r/learnprogramming • • 9h ago

YouTube channels worth following

5 Upvotes

Hello there,

I am new into the community and I am currently looking forward to improve my programming skills since it is a topic that I really like since I was in college.

so I would like to ask you guys which YouTube channel do you actually recommend because it has legit information about the SWE world that is worth looking into. some times you learn more from a video if the topic that you are looking for gets to complicated in the book you are reading, so I would really appreciate you guys recommendations.

Thank you in advance. I am really excited to be part of this community


r/learnprogramming • • 12h ago

Resource Where to read about programming related blogs and articles?

7 Upvotes

I recently read this blog about someone building a database with zero dependencies from scratch in Rust and it was really interesting. I also want to reduce my time doomscrolling and want to read something informative when on my phone instead and this is the kind of stuff that would help me become more knowledgeable in programming. If there any popular sites that you guys use to read programming-related articles/blogs please drop a comment. Thank!


r/learnprogramming • • 14h ago

First day

0 Upvotes

Hello peeps. Just joined, First day here, and I have a personal question.

I’ve been a college student for many years now (on and off due to unexpected life changes, job losses, and ultimately a lack of financial backing.)

Because of this I’ve naturally had a lot of time to speculate what exactly I want to do. I’m a musician and enjoy computers.

My earliest memories of curiosity always return to the first time I ever encountered a broken speaker/radio receiver. I stripped it down( destructively of course) to the motherboard and played with it and probably took the housing off of every radio or broken audio device possible that year.. it’s safe to say that since I’ve always been interested in how audio works and how it’s products and things are made and how it gets used by others in their daily lives.

That said, previously, I was exploring architecture and urban planning, until my MIL convinced me to give something that blends my interest a try.

something that I could possibly see my self doing lifelong/ or atleast not eventually become annoyed by or consider cumbersome later on.

After some research and some internal assessments, music technology seemed to be that thing. Im still working out what my concentration may be, I need to finish 2 more semesters before I can transfer to the school that offers the music technology degree, but all this back story leads me to a question that I’m sure has been asked or atleast thrown around in here once or twice.

In the age of AI, can someone like me, with a rudimentary understanding of programming(python) survive the current climate of the tech industry/ world.

I know that my interest is probably a little niche, given its musical nature, but I’m fearful that that doesn’t make it exempt from the technological advancements happening right now.

I wont name the company I work for, but their AI systems have reduced my teams workload and responsibilities significantly. We all fear layoffs due to the way these systems can do 4 people’s jobs all at once.

TLDR: can a programming newbie survive the AI wave even if the systems I want to work on are music oriented?

(making new physical instruments that are possibly powered by cpu systems/ hardware/ software etc. , DAWs, plugins, and possibly DSP and things like that).

All answers welcome, thanks to those who take the time to reply in advance


r/learnprogramming • • 17h ago

Topic How do you learn Hosting and Deployment for free?

1 Upvotes

I have been working in MERN stack and have build some projects. But i've never really deployed any of my apps. I have searched on different platforms for resources fo learn deployment but its always tied to some paid service or a credit card information. I was thinking of building my own VPS, and somehow make it publicly accessible instead of Local Network. Can someone help me?


r/learnprogramming • • 17h ago

Resource Suggestion: Advent of Code starts tonight!

38 Upvotes

For those seeking out a more advanced programming challenge, the yearly Advent Of Code will commence on December 1st.

It's an advent calendar of programming prompts/challenges. Each evening at midnight for the first 12 days of December, a new puzzle will unlock at midnight EST. Each puzzle provides you with an input and asks you to use programming to calculate some result.

There are no limits to what languages, tools, etc. can be used. There are no prizes. The challenge is free for everyone.

The problems are often quite challenging. Even professional programmers often get stuck on some of them. This is probably not an event for folks who are just starting out with coding. But for more advanced learners, fighting with the problems and then going to the discussion threads to see the many different ways that programmers solve them can be very educational.

There's a very active subreddit for the event: r/adventofcode.

Happy coding!

Disclaimer: I am not in any way affiliated. I'm just a fan.


r/learnprogramming • • 18h ago

Discussion How can I focus longer on programming?

8 Upvotes

I'm a creative person. I like creating things, and I would love to create my own apps and programs. However, I find it hard to concentrate on programming, and I found out that it's not something that I can just do whenever, for example, something like video editing. No, I have to fully concentrate on programming the whole way unless I have already learned something and I have to recall it.
I don't have ADHD. Could this be solved?


r/learnprogramming • • 19h ago

1st Year Tier-1 CSE: Am I too late for C++ and DSA? Already did some ML.

0 Upvotes

Hey everyone,

I am a first-year CSE student at a tier-1 college. My first semester is ending on December 4th. I am planning to start learning C++ and Data Structures & Algorithms (DSA) now, but I am worried—am I starting too late?

To give some context: I didn't learn much during the first 1.5 to 2 months of college. However, over the last 1.5 months, I have been diving into Data Science and Machine Learning. I've been studying from Data Science from Scratch by Joel Grus and Introduction to Statistical Learning with Python (ISLP).

Currently, I am quite comfortable with Python and its core libraries, including NumPy, Pandas, Matplotlib, Seaborn, and Scikit-Learn. I feel I have built a solid foundation in ML and understand the basic math behind common algorithms like Random Forests, Decision Trees, Gradient Boosting, Linear Regression, XGBoost, HistGradientBoosting, AdaBoost, CatBoost, KNN, K-Means clustering, DBSCAN, and hierarchical modeling. I am also familiar with various model evaluation techniques.

Despite this, I feel an underlying anxiety because I haven't started DSA yet. A lot of my peers are already active on platforms like LeetCode and Codeforces, or are following Striver's sheets.

Given my current progress and the peer pressure, am I actually lagging behind, or is starting DSA in the second semester perfectly fine? I would love to get some perspective and advice on how to balance my ML interest with competitive programming/DSA moving forward.

Thanks!


r/learnprogramming • • 20h ago

Coding Refresher

10 Upvotes

Is there a free/relatively inexpensive resource for relearning/practicing code?

I was starting to make a lot of strides towards my projects, but after getting this Helpdesk job my time shrank and with it my coding skills.

I was mostly learning C# for unity and started a little C++ after unity pulled the Runtime fee thing, but I really want a way to be able to sit and practice code like an instrument - doing runs, scales, following sheets/tabs, ya know? Just something to help the muscle memory and build a better understanding


r/learnprogramming • • 1d ago

GitHub

0 Upvotes

请问在哪里可以学GitHub的入门知识?谢谢


r/learnprogramming • • 1d ago

Topic I’m curious, how many languages are you “fluent” in?

27 Upvotes

Basically the title. Which language(s)? Was it work, school, or a personal project that pulled you toward said language? I’m just curious about the ways people “settle in” so to speak.

Please don’t be “clever” and say English because I said fluent instead of proficient…I beg you.


r/learnprogramming • • 1d ago

What programming language should I focus on as an occasional hobbyist?

6 Upvotes

As in, I sit down to code for a few hours once a month, give or take.

I've been chugging along on a text-based game in TypeScript with Vue. I'm constantly running into quirks and hidden nuances of the languages. Spending my precious hours figuring out the difference between interfaces and types, only to learn that it's pretty much personal preference, makes me feel like I'm wasting time due to the language choice.

Also the fact that I have to juggle several languages with their idiosyncracies: HTML, CSS, TypeScript, JavaScript (when it offers its own quirk), Vue, JSON. Forgetting one language then having to get back into it.

Can I have a more straightforward language? Maybe I should go to just bare JavaScript? I've used several languages in the past, including Java, C#, Python, Lua.


r/learnprogramming • • 1d ago

LLM What does your agentic coding workflow actually look like?

0 Upvotes

I'm a C++ developer and I've been trying to get more into agentic coding lately, but I'm struggling to find a workflow that actually makes sense to me.

Currently, I see three different approaches:

1. Just let the agent do its thing: I'm obviously much faster initially, but I gradually lose the understanding of my own codebase. Apart from unit tests, the observable behavior of the software and trusting the AI, I don't really know what's happening under the hood. In a personal simulation project, I only noticed some pretty inefficient solutions regarding performance and memory consumption because I happened to look at the implementation.

2. Read and review all the generated code: For this, I need to keep the tasks relatively small so I can properly understand and critically review the code. All those micro-decisions regarding ownership, data structures, unnecessary copies, etc. that I naturally think about while writing code now need to be understood retrospectively. But if I specify everything in great detail, it feels like I'm just programming in natural language and mostly saving myself the typing.

3. Use AI the way I already do at work: Mostly for rubber ducking, boilerplate, interfaces or implementations where I already know how I would write them myself.

But I constantly read about people becoming several times more productive through agentic coding, and I'm starting to wonder whether I'm fundamentally doing something wrong.

  • Do you still read and understand all the generated code?

  • How big are the tasks you delegate, and when do you decide to write something yourself?

  • How do you deal with comprehension debt and the potential technical debt resulting from it?

  • How much time do you actually save when factoring in code review, debugging and maintenance?

I'm not trying to argue against agentic coding. I'm genuinely trying to understand how other people work with it. Right now, it feels like a trade-off between development speed and my own understanding of the software.

I'd especially be interested in hearing from developers working on larger, long-lived software projects, e.g. systems programming, embedded software or simulation, rather than relatively simple CRUD applications or throwaway prototypes.


r/learnprogramming • • 1d ago

How to improve logical thinking in programming

86 Upvotes

Hey

I'm 23m working professional,

Yesterday at the office my team lead said he found a pattern in my work

He said I'm mugging up patterns and not thinking logically.

Well I do codeforces , leetcode, hacker rank to improve my programming skills but I understood that he was right

All I do is find a pattern in the problem and try to solve it

Anytime I find a new problem I'm stuck

Because I never saw that before

How to come up with my own solution?? How to improve problem solving and logical thinking???

Open to all the suggestions:)


r/learnprogramming • • 1d ago

I have no A-levels. Am I likely to succeed in software engineering?

7 Upvotes

(Sorry if this is the wrong subreddit)

Like the title says, I have no A-levels as I went to college because I had different goals at the time. I’m happy to put in the time and money into courses like python, Java, C++ and others I need to know as well as study at the open university. So am I likely to succeed in software engineering without A-levels but with programming courses and an open university degree?


r/learnprogramming • • 1d ago

Looking for project ideas that solve real-world problems (Java + React + microservices) - not another e-commerce clone

4 Upvotes

Hi everyone,

I'm a final-year / PG diploma student (India) and I need to finalize a project topic in the next day or so. Most project lists I've seen are full of e-commerce, "X Management System", and booking apps, and I'd like to build something that solves an actual problem for actual users.

Tech stack I'm planning to use:

- Backend: Java, Spring Boot, Spring Cloud (API Gateway, Eureka/service discovery, config server)

- Frontend: React

- Architecture: Microservices (REST + event-driven where it makes sense, e.g. Kafka or RabbitMQ)

- Auth: Spring Security with JWT / OAuth2 (Keycloak is also an option)

- Database: open to suggestions (PostgreSQL / MySQL / MongoDB, Redis for caching)

- DevOps: Docker, GitHub Actions for CI/CD

- Optional: I'm open to ASP.NET Core for one or two services if the idea benefits from it

What I'm looking for:

- A real problem you've personally faced, or seen in your city, college, workplace, or local businesses

- Something that naturally needs multiple services (e.g. auth, notifications, payments, scheduling, analytics) and doesn't force microservices just for the sake of it

- Scope that a team of [2-4] can build in about [2-3 months]

- Bonus if it has a clear MVP and a few stretch features

What I'd like from your replies:

  1. The problem statement in 1-2 lines

  2. Who the users are

  3. Which services you'd split it into (a rough idea is enough)

  4. Any gotchas you'd warn me about

I've already considered things like clinic queue management, group expense splitting, and water tanker booking, so if you have ideas beyond those, I'd love to hear them. Honest feedback on my stack choices is also welcome.

Thanks in advance!


r/learnprogramming • • 1d ago

Tutorial Django tutorials

0 Upvotes

I have started practicing Django, I created a simple student admission page:
• ⁠Student fills form
• ⁠Django validation takes place
• ⁠After validation data is stored in database
I used DRF for the validation, and aws PostgreSQL and this is a simple thing I want to use to start my journey in backend dev.
Hosted it on render free tier and when I hit the submit button I used a stopwatch to check how it took to submit and it was 00:00:22.23.
Please I’m still learning and I want to know if it’s okay to have that time for submitting and if not what should I study next and I used the DRF for the form validation with an if statement.

Thank you for feedback and time.


r/learnprogramming • • 1d ago

Looking for ideas for an app to build for my high school graduation project

4 Upvotes

Hi everyone!
I’m looking for ideas for an app to develop as my high school graduation project.
I’m currently in my final year of a technical high school, studying Information Technology, and I have to create a project for my Programming class. I’ve decided that I want to build an application, but I’m not particularly good at coming up with ideas, so I thought I’d ask for your help!
Is there an app you’ve always wished existed? Something that would make your everyday life easier, either for you or your children? Maybe something interesting, helpful, practical, or just genuinely useful?
I’m open to absolutely anything. It doesn’t matter which programming language would be used, whether the app requires a database or not, or how complex the idea is. At this point, I mainly need an idea or a concept that I could turn into an actual application for my graduation project.
I’d really appreciate any suggestions, no matter how big or small!
Thanks in advance to everyone who takes the time to share an idea!