r/AskProgramming • • Sep 22 '21

My professor recommends us making a GitHub account as soon as possible. Why should I?

58 Upvotes

It's an honest question. His reasoning was like ""in a couple of years, when you graduate and look for a job, you'll be able to show them that you used github for the past couple of years"" and I get that. But right now I'm making programs that are too simple and that are introductory. Like create an array, print only the odd numbers from an array, write Hello world in a .txt file. Scan a .txt and count the occurences of a given word, etc.


r/AskProgramming • • Jun 29 '21

[C++] I've been coding for 17 years, and I bombed a coding interview today. I need help reviewing a game engine's code.

58 Upvotes

I'm a largely self-taught game developer, but today I totally bombed an interview where the interviewers grilled me on a C++ program I submitted. This has shaken my confidence greatly, and I think I need help reviewing the code of a game engine that I'm developing for fun. It's almost like I'm reading my own code with new eyes now.

https://github.com/Ratstail91/zelda-framework

Like, even the main function, I think I read somewhere that wrapping everything in a try/catch block is a bad thing, yet my main function looks like this:

#include "application.hpp"

#include "SDL2/SDL.h"

#include <iostream>
#include <stdexcept>

int main(int argc, char* argv[]) {
	std::cout << "Beginning " << argv[0] << std::endl;
	try {
		Application app;

		app.Init(argc, argv);
		app.Proc();
		app.Quit();
	}
	catch(std::exception& e) {
		std::cerr << "Fatal Error: " << e.what() << std::endl;
		return 1;
	}
	std::cout << "Clean exit from " << argv[0] << std::endl;
	return 0;
}

Is this the right approach? I simply don't know anymore. There are little things like const string& arguments that I saw in a video recently that I didn't even think about, but makes perfect sense now that someone pointed it out to me.

Hell, I'm building the zelda framework on top of SDL2, is it even technically worth the effort, since it's tied so closely to SDL2's functionality? SDL2 is supposed to be able to support multiple windows as well, yet my engine doesn't.

I've got imgui implemented and working in one of the scenes, but haven't even done anything with it - yet I was also planning on adding lua scripting?

Why isn't the camera a node? Why are transforms separate from nodes? Why am I passing pointers to everything?

There are little inefficiencies that are scattered throughout the whole codebase that I can suddenly see, like branching or the wrong STL container used.

It needs a full code review, but I don't really think I know what I'm doing anymore.


r/AskProgramming • • Mar 10 '21

Why do I see all these beautiful app designs online, but in the app store, no app designed so beautiful.

58 Upvotes

r/AskProgramming • • Feb 28 '21

do you find yourself reading official documentation, googling, or trying to figure it out yourself?

58 Upvotes

When you encounter a problem or have a question what is your normal pattern for solving it? I've found the official documentation of a language is very helpful, but it can also be immense to read.


r/AskProgramming • • Dec 13 '20

Other Rubber duck debugging?

58 Upvotes

Stumbled upon an article that read when coders get stuck they tend to fall back on a rubber duck to debug. Is this actually true? How many people here actually practice this method?


r/AskProgramming • • Apr 30 '20

Can anyone please tell me what on Earth is RESTful?

58 Upvotes

I hear this thing a lot, but I have no ideia what it is a about. And what is the difference between an API and a RESTful API?

thank you!


r/AskProgramming • • 6d ago

Lets say that theoretically professor asks to write a program in ANY programming language. What is the best way to make him regret giving the opportunity to write it in ANY programming language? Asking for a friend

57 Upvotes

Give ideas that would make even devil cry


r/AskProgramming • • Oct 12 '23

Is it common among programmers?

57 Upvotes

Brain fog, mental fatigue and feeling drained after work. Is it common among IT people as well (compared to corporate) or are these rather individual cases?


r/AskProgramming • • Sep 16 '23

Do you guys ever just sit back and look at your code and go "damn"

57 Upvotes

I don't mean to come off as narcissistic but like to a non-programmer it's just a massive jumble of random text and words. And numbers. I feel like I know some sort of esoteric wisdom or something


r/AskProgramming • • Sep 10 '23

Other Are programming language designers the best programmers in that programming language?

57 Upvotes

As an example, can Bjarne Stroustrup be considered the best C++ programmer, considering that he is the person who created the language in the first place? If you showed him a rather large C++ package which has some serious bugs given enough time and interest he should be able to easily figure out what is wrong with the code, right? I mean, in theory, if you design a programming language it should be impossible for you to have bugs in your code in that language since you would know how to do everything correctly anyways since you made the rules, right?


r/AskProgramming • • May 07 '23

This might be a dumb question but all my friends are saying I should put this on my resume?

57 Upvotes

Recently I was coding and I made a small contribution / bug fix to one of Netflix’s large and open source projects on GitHub.

It wasn’t anything huge but it was a decent fix, and honestly I was so happy that they added it.

All my friends are saying I should put it on my resume. Is that something I should do since it was approved?

I plan on contributing to other open source projects on GitHub too, so maybe it’d be weird to add all of them?

What should I do lol???


r/AskProgramming • • Nov 08 '22

Is “x' = f(x)” a programming paradigm?

57 Upvotes

Hi, I'm the author of GateBoy (a gate-level simulation of the original Game Boy hardware) and Metron (a C++ to Verilog translation tool). One big issue I had to work around for both projects is the inability of C++ (or really, any current procedural programming language) to express atomic state change in a way that is both performant and unambiguous. For example, consider the following trivial function:

 void swap_and_increment(int& a, int& b) {
    int old_a = a;
    a = b + 1;
    b = old_a + 1;
  } 

Because the first assignment to 'a' destroys the old value of 'a', we have to store it in 'old_a' in order for the swap to work. In contrast, we could write it like this:

 void swap_and_increment(int& a, int& b) {
    a' = b + 1;
    b' = a + 1;
  } 

where a' means "the new value of a", but this syntax has no equivalent in real C++. This may seem like an insignificant problem at first, but when you scale up to something the size of a Game Boy simulation which has thousands of variables that need to change simultaneously it becomes a serious design problem.

GateBoy solves this problem by instrumenting every variable in debug builds to catch "old/new" bugs - variables get marked as "old" or "new" during execution and reading a "new" value when you expect an "old" value is a runtime error. Metron takes a different tactic and does some symbolic code analysis at translation time to do essentially the same thing - it can ensure that for every possible path through the code, all reads of "old" values are actually reading old values and vice versa for "new" values.

If we generalize the problem a bit, we can say that the difficulty comes in trying to model a system where the entire state of the system represented as X needs to be transformed in to a new state X' via a pure function F without constantly making copies of old state (kills performance), requiring the author to keep track of which parts of the state are old or new at any given point (causes bugs), or relying on hardware support like transactional memory (not widely available). To put it more concisely, a program in the form "x' = f(x)" has no good representation in the software programming languages we use today.

I recently had the opportunity to discuss this issue with a bunch of grizzled old software and hardware veterans, and the approximate consensus seems to be:

  1. "x' = f(x)" as a model for global atomic state change makes sense to both software and hardware developers, with some viewing it as "just another name for a state machine" (mostly software devs) and some as "so obvious that it doesn't need to be stated" (mostly hardware devs).

  2. There really isn't any software-oriented language out there that allows for global atomic state change to be both performant (the compiler understands the distinction between "old" and "new" and can reorder code to avoid excessive copies or temporaries) and unambiguous (the distinction between an "old" value and a "new" value has some explicit representation in the language syntax).

So, what do we call this model? Allowing the compiler to reorder statements to preserve "oldness" and "newness" during execution seems to diverge from the "a program is a sequence of operations" model of procedural programming, and the fact that we _do_ want to modify X in place instead of constantly creating new (potentially very large) state objects makes it a poor fit for functional programming.

So, my question to the Reddit audience - Does it makes sense to call "x' = f(x)" a programming paradigm? It's certainly not a new one, but it also doesn't fit well with the paradigms we've given names to. What should we do with it?


r/AskProgramming • • Feb 04 '22

Trying to save an endangered language. I'm looking for advice on solutions for preserving and sharing our language and hiring a developer.

57 Upvotes

Our indigenous language is down to about 12 first-language speakers today and we are running out of time to gather as many words as we can from them. We have many learners gathering words by hand in notebooks but we need to a solution that is digital and centralized. Somewhere they can add their words, or add scanned pages and others can copy into a database the words they have. Even a way to add voice recordings to those words as well. I imagine a cloud based solution with a web interface. Learners would have password access to add data, but only a few (our best speakers) could approve additions or changes. I know nothing about hiring someone to do this kind of work. Where would I go to hire? What kind of developer am I looking for? What would I be asking for? Any advice would be very appreciated.


r/AskProgramming • • Oct 30 '21

Why do entry level jobs demand 3-4 years of experience ?

57 Upvotes

About to graduate next year with a CS Degree and almost all entry level jobs on every possible platform i could find (like linkedin , angellist , indeed etc) demand 3-4 years of experience while paying the shittiest of salaries they possibly could . Any advice on where to look for a mern stack developer job that doesn't demands experience from a fresher rather focuses on projects and skills to hire people ?


r/AskProgramming • • Feb 28 '21

Careers as a programmer, what are some of your frustrations when writing your resume?

57 Upvotes

r/AskProgramming • • Apr 13 '20

Careers How big of a deal is ageism? I'm 7 years late for college.I'm 25 and I should go to college now, am I too late for tech? Should I look into something else? Will any companies even want me since I started so late?

57 Upvotes

I always hear about ageism and how it creates huge problems if you are not young enough.

How comapnies only want fresh minds and are always looking for youngest possible workers if they are only starting.

So is it too late for me realsticlly to start now?


r/AskProgramming • • Feb 26 '20

How many of you meditate? Have you found it helpful (or even harmful?) for programming?

57 Upvotes

I'm starting to look into meditation to help reduce stress and anxiety in my life, and I've started to wonder what sort of impact this may have on my programming productivity.

Thoughts? Has it helped any of you specifically with regards to programming?


r/AskProgramming • • Aug 08 '19

Where do StackOverflow wizards come from?

57 Upvotes

I ask very highly specific and difficult questions on StackOverflow that I can't find the solution to anywhere online. But some random person gives me the code like it's nothing. Who are these programming wizards? Where do they acquire their knowledge from when it's not even available online?


r/AskProgramming • • Sep 19 '26

I’m 23, I have a CS degree and a backend job but I genuinely feel like I don’t know how to be an engineer without AI

56 Upvotes

I’m 23 years old. I graduated in Computer Science and I’ve been working as a backend engineer for around 8 months. This is my first real software engineering job.

My university education was very theoretical (as every CS major). I learned programming, algorithms, networking, databases and the usual cs subjects but I graduated without really knowing how a real software project works end to end. I had never built, tested, deployed and operated a real application by myself. I didn’t really know how frontend / backend, databases, cloud, CI/CD, logs and all those pieces actually connected in a production system.

Then somehow I got hired.

Today I work mainly with Python, FastAPI, JavaScript, SQL and Azure. I work on production software used by actual customers. My job is not just coding. I get tickets from product or operations talk to people to understand what they need you knwo the usual stuff, investigate existing behavior, modify APIs and backend logic, sometimes touch frontend code, deal with databases open PRs and then respond to reviews and communicate when something is ready.

From the outside it sounds like I’m already doing real engineering.

The problem is that AI is involved in probably 90% of the technical process (or even maybe 100% sometimes).

I can understand requirements pretty well. I can follow existing code when somebody explains the context. I can read a function and understand a lot of what is happening. I’ve definitely learned more in these 8 months than I knew when I started, but if tomorrow somebody gives me a normal ticket and says “do this without AI”, I honestly think I would be lost almost immediately.

Sometimes I dont even know what the first step should be. I don’t know which repository or file I should inspect first. I don’t naturally know how to trace what happens from a button in the browser to an API, then another service, then a database and back. When something breaks, I often don’t know what hypothesis I should test first.

So I ask ai, try Claude or ChatGPT to explain it to me, and even make AI proyects with the codevase info and my knowledge to explain to me like a child haha.

AI helps me locate the codeand understand the architecture, decide where the change belongs, write the implementation, debug it, create tests and review the solution. A lot of the time I learn what happened after the solution already exists.

I’m not pretending that I contribute nothing. I understand the business context, clarify requirements, communicate with people, make some decisions, review things and I’m responsible for what gets delivered.

But I know there is a massive difference between participating in the process and actually being able to engineer the solution independently.

That difference scares me a lot.

Especially because I work around engineers with years of experience. I hear seniors explain systems, identify problems or suggest solutions almost instantly and I genuinely think, “There is no fucking way my brain is ever going to know all of this.”

They seem to have this huge internal map of software. They know where to look, what matters, what probably broke, what tradeoffs exist and what questions to ask.

I don’t have that map yet, not even close.

Sometimes I look at them and feel like they are a completely different species of engineer and that no amount of studying is going to get me there.

at the same time I really want to learn, and probably too much.

I constantly convince myself that I’m going to completely fix my technical level. I’ll study every day. I’ll finally master JavaScript. Then SQL. Then Docker. Then Linux. Then system design. Then cloud. Then testing.

I buy books. I start courses. I create roadmaps. I ask ChatGPT what the perfect learning path is. I find another resource that seems better. Then I realize I’m missing another prerequisite, so I add that too.

For a few days I can become obsessed with learning.

Then the structure disappears, I don’t know what I should study next, I feel overwhelmed by how much I don’t know and eventually the whole thing dies.

A few weeks later I start another perfect plan.

I have done this with technical courses, books, personal projects and honestly other areas of my life too.

That’s probably one of the hardest things for me to explain. I don’t feel like somebody who doesn’t care or doesn’t want to put in the work. I would genuinely dedicate hours every day to becoming a better engineer if I knew those hours were actually taking me somewhere.

My problem is that I don’t trust my own way of learning anymore.

I don’t know if I need a teacher, a mentor, a structured curriculum, small projects, another job with better mentorship or simply years of patiently doing this.

My current job is also extremely flexible. Nobody is constantly watching me. I’m expected to deliver my work and I generally do. That gives me an unusual amount of time and freedom that I could use to seriously close this gap while still getting real production experience.

I feel like I have an incredible opportunity in front of me and at the same time I’m terrified of wasting it by continuing to let AI do all the thinking while I accumulate “years of experience” that I don’t actually deserve technically.

I’m not asking how to become senior quickly.

I know that takes years.

I just want to become a real autonomous junior engineer.

I want to get a backend ticket and know how to investigate it. I want to understand enough of the system to decide where to look. I want to form my own hypothesis when something breaks. I want to implement something, test it, debug it and explain why it works.

I still want to use AI. I just don’t want AI to be the thing holding my entire engineering process together.

If you were a senior engineer and a 23 year old junior told you all of this completely honestly, what would you tell him to do for the next year?

And if you ever felt like the senior engineers around you knew an impossible amount of information, when did that feeling start changing?


r/AskProgramming • • May 15 '24

Does it seem like people in general just don't understand what websockets do?

56 Upvotes

Just doesn't seem like we are using it the right way.

The best websocket architecture in AWS training was:

Create a a transaction, create a socket for it and wait for a response.

A new socket for every transaction. Some even describe a polling technique. For a web socket.

The entire point of websockets is to not have to poll. Where you might have had to poll in the past, repeatedly ask if some information was available (are we there yet?), that's the EXACT thing websockets are meant to avoid.

They are also not meant to be a "separate web socket for each request" where you could end up with thousands.

It was meant to be a 2 way connection, where you can expect to be told of an update and were expected to listen.

Polling in any form defeats the purpose of a WebSocket.

Creating multiple WebSocket connections between a client and server misses the point and becomes severely resource intensive.

WebSockets were meant to do this:

Instead of frequently polling for a response, create a two way connection where (as a client) you can expect and listen for a response.

I just haven't seen it be used as such, and all current uses pretty much invalidate any use of it.


r/AskProgramming • • Mar 28 '24

Other How many of you actually don't know how to touch type

56 Upvotes

I Swear i have tried to learn this super power so many times but i just can't and most of the time i don't have time. Though i feel like i have to learn this to be more efficient.


r/AskProgramming • • Feb 15 '22

Why is Uncle Bob so hated in programming community?

56 Upvotes

I've seen a lot of hate around the subreddits and I don't quite understand the cause. I learned and built myself when I started programming with his book Clean Code and I respect him as such although I don't know any other of his more than The Clean Coder.


r/AskProgramming • • May 24 '21

Education Where can I learn to be a developer, not just a programmer?

56 Upvotes

I learned pretty much all my knowledge about software and web development in college where we learned plenty about programming, but basically nothing about the other aspects of development. While this hasn't really impacted my professional life too much yet, I feel like I'm getting close to hitting a wall and would rather address this sooner rather than later. What I mean by this is specifically is where it comes to setting up projects, servers, containers, databases, or just about anything that isn't strictly writing code.

I've done web development in Java (Spring) and C# for about three years or so and like to think I know what I'm doing when it comes to writing code for my work. But I could not tell you the first thing about creating and setting up one of those projects from nothing. Doing that sort of thing just wasn't taught to us at my college, haven't had to it at work (yet), and the resources I do find online assume that I already have a lot more knowledge on computer science than I actually do.

Are there resources out there for people like me who want to learn these things but lack basically all foundational knowledge relating to it? Thanks for any help anyone can provide.


r/AskProgramming • • Feb 22 '21

Language Are there any signs in the gaming industry of c++ being replaced as the most used language by anything else, anytime soon? (Not referring to phone games)

56 Upvotes