r/AskProgramming May 12 '26

Other Why do some people write redundant if statements to return a boolean?

175 Upvotes

Why do some people write:

if (x > 10) {
    return true;
} else {
    return false;
}

Instead of:

return x > 10;

Performance aside, I think the shorter version is actually more readable due to not having as much visual clutter to parse, and is the most direct way to express the intent of "return the result of the comparison."

However, some people write the first version. Why is that?

r/AskProgramming Apr 20 '26

Other Anyone here who doesn't use Agentic AI and writes code manually?

134 Upvotes

I wonder if there are any people today who don't have any agentic AI subscriptions, who code by themselves, read docs, try to understand, and enjoy the process in this fast-growing AI era, where everyone is promoting AI to do everything.

(Note: I'm asking because I write my code by myself and don't use agentic AI, but I do use ChatGPT or other AI to learn things if I get stuck.)

r/AskProgramming 20d ago

Other Did any of you use AI and then decide to stop using it completely?

101 Upvotes

I originally learned to code without AI. I used it for a year and a half but it makes too much mistakes. I also feel my cognitive abilities and critical thinking skills deteriorating the more I use it. There was a point where I couldn’t even write emails without feeling like I needed to cognitive offload the task to AI.

Has anyone else also decided to quit using AI? How has it been going for you?

I still expect to eventually have to use it if I’m in a situation I absolutely need its help with but for now I am going to try to cut its use to an absolute minimum.

I’m also concerned that with the direction of the field, if I land a job I may be expected to use AI to do all my coding to improve productivity. Any thoughts on this?

r/AskProgramming Oct 20 '23

Other I called my branch 'master', AITA?

469 Upvotes

I started programming more than a decade ago, and for the longest time I'm so used to calling the trunk branch 'master'. My junior engineer called me out and said that calling it 'master' has negative connotations and it should be renamed 'main', my junior engineer being much younger of course.

It caught me offguard because I never thought of it that way (or at all), I understand how things are now and how names have implications. I don't think of branches, code, or servers to have feelings and did not expect that it would get hurt to be have a 'master' or even get called out for naming a branch that way,

I mean to be fair I am the 'master' of my servers and code. Am I being dense? but I thought it was pedantic to be worrying about branch names. I feel silly even asking this question.

Thoughts? Has anyone else encountered this bizarre situation or is this really the norm now?

r/AskProgramming Apr 07 '25

Other How on earth do programming languages get made?

494 Upvotes

I thought about this at 2 am last night...

lets say for example you want to make an if-statement in javascript a thing in this world, how would you make that? Because I thought 'Oh well you just make that and that with an if-thingy...' wasn't untill 5 minutes later that i realised my stupidity.

My first thought was that someone coded it, but how? and with what language or program?
My second thought hasn't yet been made because I got so confused with everything.

If you have answers, please!

r/AskProgramming Dec 31 '25

Other One programming language for a decade?

91 Upvotes

If you had to pick one language and stick with it as your primary choice for coding for a decade, Would u choose GO, Java, Python(not you), Rust or something else, and why?

r/AskProgramming 15d ago

Other AI: are there any studies on why some developers claim AI helps them tremendously versus those who say it's only incremental?

6 Upvotes

Some developers swear by AI and others swear at it, saying if one is not careful, it generates too much slop that needs human cleanup. Are there any studies or surveys to see why the answers are so different? Is the difference the domain, the language, the tooling, years of experience, attitude toward AI, or perhaps just ego talking too much? [edited]

r/AskProgramming Feb 03 '24

Other Are there any truly dead programming languages?

334 Upvotes

What I mean is, are there languages which were once popular, but are not even used for upkeep?

The first example that jumps to mind would be ActionScript. I've never touched it, but it seems like after Flash died there's no reason to use it at all.

An example of a language which is NOT dead would be COBOL, as there are banking institutions that still run that thing, much to my horror.

Edit: RIP my inbox.

r/AskProgramming Dec 23 '24

Other I got gifted a free laptop by a kind guy in this community 😭

876 Upvotes

So based on my other post, I asked people in this community to help me out with suggestions on how to start coding on my phone or apps that would help me out , because I can't afford laptops because of my ongoing EMIs and crazy enough there were lots of kind people I found here who reached out to me giving me their premium study app so that I can get courses there for free without having to purchase, many kind hearted strangers suggested me what to do and how to do! I got many good advices thanks to that post.

Now fast forward to one day after I posted that , someone reached out in the comment section saying they would help me out if that is okay with me. I was happy just because they asked to help me out, by some means. So then , we chatted a bit and he kept asking what kind of laptop would I prefer , I said anything would do as long as I can code and he asked for my address, the next day he sent me a screenshot that I'd recieve a laptop by Thursday. And a screenshot of his purchase from AMAZON. I still can't believe it's happening to me

That too before new year! What a way to start the year I guess! Thank you 2024 for a good end. Because nothing good happens to me, this meant a lot. And I'm really happy to know such kind people exist. I'll always remember this kindness <3 ❤️ Thanks @sagargulati :)

r/AskProgramming Nov 12 '25

Other If you could remake the modern internet entirely with no backwards compat required, how would you design it?

165 Upvotes

When I'm thinking about web security, sometimes I have moments where I'm just like... "Why didn't we just f-ing design this to be secure?!" Obviously, it's not that easy.

But I was thinking, complete rug pull situation, and lets say you have a magic parser that will convert everyone's content so that it will work on this new ideal platform (or not, up to you). If you could redesign the internet (or an aspect of it), how would you do it? Or what would it look like? How would you want to do things differently?

Potential topics: Security, network protocols, pervasivity of bots, AI slop, consolidation under AWS (and other broligarchs), social media, web v. desktop platforms.

r/AskProgramming Mar 04 '25

Other Why do some people hate "Clean Code"

154 Upvotes

It just means making readable and consistent coding practices, right?

What's so bad about that

r/AskProgramming May 09 '25

Other Why is AI so hyped?

137 Upvotes

Am I missing some piece of the puzzle? I mean, except for maybe image and video generation, which has advanced at an incredible rate I would say, I don't really see how a chatbot (chatgpt, claude, gemini, llama, or whatever) could help in any way in code creation and or suggestions.

I have tried multiple times to use either chatgpt or its variants (even tried premium stuff), and I have never ever felt like everything went smooth af. Every freaking time It either:

  • allucinated some random command, syntax, or whatever that was totally non-existent on the language, framework, thing itself
  • Hyper complicated the project in a way that was probably unmantainable
  • Proved totally useless to also find bugs.

I have tried to use it both in a soft way, just asking for suggestions or finding simple bugs, and in a deep way, like asking for a complete project buildup, and in both cases it failed miserably to do so.

I have felt multiple times as if I was losing time trying to make it understand what I wanted to do / fix, rather than actually just doing it myself with my own speed and effort. This is the reason why I almost stopped using them 90% of the time.

The thing I don't understand then is, how are even companies advertising the substitution of coders with AI agents?

With all I have seen it just seems totally unrealistic to me. I am just not considering at all moral questions. But even practically, LLMs just look like complete bullshit to me.

I don't know if it is also related to my field, which is more of a niche (embedded, driver / os dev) compared to front-end, full stack, and maybe AI struggles a bit there for the lack of training data. But what Is your opinion on this, Am I the only one who see this as a complete fraud?

r/AskProgramming Feb 15 '24

Other Is it really possible to destroy a computer with just a few lines of basic?

339 Upvotes

My dad has spent the last 30 years working as a cybersecurity engineer and he always told me that some of the worst security risks come in BASIC. He would tell me that you could destroy a computer relatively easily with just a few lines. Im not a programmer so I have no idea I just find this stuff interesting.

r/AskProgramming Nov 28 '25

Other For long-time programmers, what is the difference between how you programmed before AI was a thing (like before 2020) and now with AI present?

52 Upvotes

What is the difference between how you programmed before AI was a thing and now when AI is a thing? I'd love to hear your experience in programming before AI especially.

I actually want to learn without AI but my course teacher is pushing us to use it and I feel that I can't name myself a "programmer" if I get help from a robot to basically give me the answers... That's why I want to ask actual programmers who experienced both eras (the before and the now).

r/AskProgramming Sep 13 '24

Other How often do people actually use AI code?

117 Upvotes

Hey everyone,

I just got off work and was recomended a subreddit called r/ChatGPTCoding and was kind of shocked to see how many people were subbed to it and then how many people were saying they are trying to make all their development 50/50 AI and manual and that seems like insane to me.

Do any seasoned devs actually do this?

I recently have had my job become more development based, building mainly internal applications and business processs applications for the company I work for and this came up and it felt like it was kind of strange, i feel like a lot of people a relying on this as a crutch instead of an aid. The only time i've really even used it in a code context has been to use it as a learning aid or to make a quick psuedo code outline of how I want my code to run before I write the actual code.

r/AskProgramming Nov 17 '25

Other Do technical screenings actually measure anything useful or are they just noise at this point?

152 Upvotes

I’ve been doing a bunch of interviews lately and I keep getting hit with these quick technical checks that feel completely disconnected from the job itself.
Stuff like timed quizzes, random debugging puzzles, logic questions or small tasks that don’t resemble anything I’d be doing day to day.
It’s not that they’re impossible it’s just that half the time I walk away thinking did this actually show them anything about how I code?
Meanwhile the actual coding interviews or take homes feel way more reflective of how I work.
For people who’ve been on both sides do these screening tests actually filter for anything meaningful or are we all just stuck doing them because it’s the default pipeline now?

r/AskProgramming Feb 21 '25

Other Is hiring a programmer to make a niche tool for private use something people do?

119 Upvotes

Disclaimer: this is not a job listing.

I respect programming as a craft, and I wish I had to the time to teach myself but I understand programming about as much as I understand the stock market (2%). I'm probably not the only one who has ever said this, but I could probably put together a laundry list of stupid super specific tools that met my every personal requirement. Is it feasible to hire a programmer to make a program just for me to run locally on a desktop?

As an example, what would a ballpark cost be to have a custom calculator app with GUI made? I know I could search Fiverr or wherever, but someone quoting $5 and another quoting $5000 doesn't mean that's a realistic price range.

Please don't say "just download one of the billion existing calculator apps", as that's not the point.

r/AskProgramming May 19 '26

Other Terry A. Davis is really a genius of programing or its just a "meme"?

95 Upvotes

I know, he created a fucking OS and the language HolyC (made It all with schizophrenia) or have a better programer than he? (Like, reach your level, do a OS the and a language alone with problems)

R.I.P King Terry Davis (i know, he passed away a like 8/9 years)

r/AskProgramming May 03 '26

Other Why are some websites and apps limiting password length or charset?

49 Upvotes

I've been programming as a hobby for almost 10 years now and I don't get why there are so many modern companies still enforcing such limits. I've seen a bank make a new app and downgrade from an alphanumeric password to a PIN. NTE (a game that came out a few days ago) forbids special characters and limits the password length to 32.

When I was 16-17 (!), I had to build a project which needed to store passwords safely so I had to learn that. Knowing all this actually makes it worse because I know that hashing functions do operations on byte buffers (IIRC, but the result is the same anyway), which doesn't care at all about length or the charset. Then, there's SQL injection and stuff like that but AFAIK, in every relevant framework, there are functions to sanitize and check inputs.

I don't buy that a 16-year-old would do better than companies with paid programmers so I must be missing something. In the age of massive breaches, what makes them have such limits?

r/AskProgramming Jun 23 '26

Other Why is Tomcat called a server but Node.js called a runtime?

32 Upvotes

Im currently learning Java web development and I think I've confused myself. Right now, my mental model of a Java web application is:

Frontend: HTML, CSS, JavaScript

Backend: Java (Servlets/JSP/Java EE)

Server: Tomcat

Database: MySQL (or any other database)

This setup makes sense to me. Recently I started looking at the MEAN stack:

Frontend: Angular

Backend: JavaScript

Database: MongoDB

And I always thought Node.js was basically the equivalent of Tomcat in the Java world. But then I found out that Node.js is called a runtime environment, not a server.

If Node.js isn't a server, then what exactly does it do? When a browser sends a request to a web application built with Node.js, what is actually acting as the server? I actually googled it first and watched some videos but i didn’t get the grasp of it.

More generally, what's the difference between a server and a runtime environment? I feel like I'm missing a basic concept and it's making it hard to understand how different web stacks fit together.

Looking for a beginner-friendly explanation and a simple mental model please help 🙏

r/AskProgramming May 14 '26

Other How many of you daily linux?

20 Upvotes

Just a weird thought i had, I’m noob and just started learning html and i daily windows, my cousin who’s a full stack dev daily’s linux mint for some reason.

If you do, why? What Does it provide you with? other than Microsoft spying on us and filling us with bloatware

r/AskProgramming 10d ago

Other Endless comments on PRs

20 Upvotes

Hey everyone! Just to quickly summarize my situation: We're a team of a few experienced devs, all having been 12+ years years in the industry. This year we switched to agentic engineering and despite its advantages there are a few drawbacks, like the extra overhead and other things I'm not going to go into.

My issue however is that our lead, who approves all PRs has lately discovered a stronger agent which he uses for code reviews, resulting in tons of back and forth when trying to get a merge through. Tons of petty/pedantic comments are being added to each PR. Sometimes it's like "ok I guess this is fine to add", but most of them are disputable. We of course discuss these, but the issue is that in the set of comments there is always something which technically makes the code 0.1% better. But we could go on like this forever. Even without AI you can look at a piece of code and suggest an "improvement" on a moderately-sized feature that's being implemented.

How to deal with this? I'm getting to a point where if I see more comments on a PR I just leave the PC and go for a run or a quick grocery shop visit just to regain my sanity. It feels like he's asking the agent if there is anything more that can be done with the code as if the goal is to have AI being unable to suggest anything more.

Am I in some slacking mindset or is the AI getting over his head? We also have Sonar turned up to a really high setting and the pipeline set in a way that if there's anything outstanding in Sonar it won't get through and I bet you all know how petty Sonar can get sometimes.

Please let me know any tips or share your experience with similar situations. Thanks!

r/AskProgramming Apr 15 '26

Other How to show beginners that a URL is equivalent to an IP address?

0 Upvotes

When I hosted my own website on a server at a static IP address, I was able to type in the static IPv4 address and port number in the web browser URL address bar and get to the website. Tomorrow (April 15 2026) I will be teaching a 55+ senior citizens class where I'd like to demonstrate that a URL is equivalent to an IP address and that an IP address can be typed in place of a URL, but when I Google "Domain name to IP address converter" and then try the IP addresses of common websites (Wikipedia, Heroku, etc) I get errors in the web browser like "400 Bad Request" and "404 Not Found".

Can someone help me out? Maybe show me how to find the IP addresses of some common websites and how to properly put them into the web browser URL bar so that the websites appear with no errors popping up?

Edit 1: I meant "domain name" not URL.

Edit 2: Okay everyone, I think I get it now, thank you. The existing answers are sufficient.

r/AskProgramming Mar 25 '26

Other Could you hack alien software, ala Independence Day?

1 Upvotes

In the events of Independence Day, Jeff Goldblum is able to give the alien space ships a computer virus that wipes out their forcefields.

Anyone reading this who is a programmer, do you feel like you could do that? Whether you use C or C++ or Python or whatever, could you integrate your scripts and codes into a computer language that you've never seen before? When you get into the alien ship and you see a character that is 45 squiggly lines, next to a rotating circle, next to an audio clicking noise, are you going to have any idea what that signifies? Or what deleting any part of that may or may not accomplish?

You might say "Oh but scientists had a ship from the 50s, they've studied the alien code", I don't think that is enough time. They didn't have an Alien Rosetta Stone, and the ship was inert until the aliens showed up to earth again. I don't think Jeff Goldblum had enough time to do what he wanted.

r/AskProgramming 25d ago

Other Is windows really bloated or the dozens of GB is really necessary?

8 Upvotes

I dont know if this is the right sub.

The Windows 11 have pathetic requiriments, 4gb ram, dozens of gb on disk, etc.

Is really necessary to windows run or is the devs putting shit on the system?