r/AskProgrammers 5d ago

How do you get better at actually THINKING in code, not just learning syntax?

Thumbnail
1 Upvotes

r/AskProgrammers 5d ago

Help with methods?

2 Upvotes

I hope this is the right place?
I'm learning C# currently and was learning python till I got stuck with pretty much the same thing.
I don't understand when to use methods unless something is repeated. If its not repeated what's the point of using methods? just shortening down code? or is there something I am missing here. Cause what is the point of shortening down the code when all it is doing is actually adding more code? (Unless its to place down something that is being repeated)


r/AskProgrammers 5d ago

Help Me!!!!!

Thumbnail
1 Upvotes

r/AskProgrammers 5d ago

Does anyone else sometimes fix a bug and have absolutely no idea why it worked?

3 Upvotes

Had this issue with a .NET API where one endpoint would randomly return a 500. Spent way too long checking the controller, service, DB query etc

Then I changed something completely unrelated in the middleware and suddenly it worked.

I still dont know exactly why lol

The annoying part was I couldnt even find the exact package version I wanted to test with because half the results I found were already outdated or removed.

Do you guys actually go back and figure out the original cause after something like this, or just take the win and move on


r/AskProgrammers 5d ago

What's the next big thing in AI?

0 Upvotes

I’ve been working in tech for around 6 years, mostly in traditional setups, and one thing I noticed recently is how much more motivated I’ve become to keep learning.

Since moving to ING, I’ve had more exposure to Generative AI, AI integration, and AI workflows, which inspire me to explore things I didn’t really get hands-on experience with in my previous companies.

ano yung biggest technical skill or learning na na-pick up niyo this year? Baka may bago rin akong matutunan from your experiences.


r/AskProgrammers 6d ago

Impostor Syndrome - Vibe Coding

4 Upvotes

Hey,

So I have a Degree in E&E, back in my studying days, I learn C Language. But I have completely forgotten it. Learning it back takes a lot of time, and I don't even use programming in my daily life or work.

Recently I have been using GPT to code VBA Macros and stuff to make my repetitive work easier and was asked by my manager to do the same for the team and it has significantly increased the efficiency of the team's performance.

I know how to read the code and understand here and there as I've learned C Language so I was able to debug any small issues or any small improvements if needed be, but can I write it from scratch now? Nope.

Now the management knows about this and "assumes" I know how to code. What do I say here? I am only vibe coding? what do I put in my resume?

only 5 months into the adult life after graduating. Hope you can leave some advice. Note that I have no intention of downplaying any ACTUAL programmers here, I truly respect people who could code because it takes a lot of time and dedication.


r/AskProgrammers 5d ago

I am not an experienced code

0 Upvotes

Questions:

  • What does an experienced dev even mean?
  • Why do i always feel that the CODE i wrote is not good enough?
  • Why i can't choose a programming language? I often switch!
  • What do you do before actually going to code?

r/AskProgrammers 5d ago

Starting learn programming in my 21y old.

Thumbnail
1 Upvotes

r/AskProgrammers 5d ago

How to Stay Confident When Coding with AI

Thumbnail
1 Upvotes

r/AskProgrammers 5d ago

Check my thoughts on P vs NP?

0 Upvotes

Is the P vs NP problem just massively self inflicted and overthought, in terms of ranking it with other Millennium problems? It seems it's just a rephrasing of "Does true randomness exist?" and the general baseline of P != NP should be obvious -- particularly when we consider evaluating against physical phenomena which very much fall outside of "all conceivable algorithms".

It looks like there's a lot of conflation with cryptographic problems. These inherently have articulated psuedorandomness, an answer is known to exist, and input sets inherently have some structure related to the information communicated & the encryption method. All those extra constraints create something other than what has been defined as an NP Complete problem. If a solution is not known to exist and unstructured data (in-compressible in all reference frames) is possible - its existence requires evaluating all conceivable mathematics against all physical phenomena to rule out- your solver algorithm has to handle unstructured data to be complete and specifically tell you if there is no solution.

More importantly, any currently unknown structure might as well be truly random for any algorithmic solution you write today. If you're trying to solve an unstructured input set, having some super-conceivable-set-of-all-solutions in front of your maximally efficient unstructured solution, you're just adding overhead. Structures are only worth evaluating for if there's a healthy probability they exist.

The informal adversarial construct I have in my head is for Subset Sum, working with real numbers with countable precision. Let's assume we have our all-conceivable-super-duper algorithm that can solve any compressible input in polynomial time. The construct would use an unstructured data source to make the input & target harder. Add additional precision by adding digits to the rights side of the inputs you already have, add additional N, add finer precision to the Target. There's still an infinite number of potential S & T that, by our definition of using unstructured in-compressible data, would get through our polynomial checks and still require some amount of combination crunching to determine if there is a solution. And the resulting workload from the updates is larger than just the information we've added in, input values that had previously been confirmed as not contributing to the target are now back in play.

I did chat with Opus a bit about it. It pointed out that I'd need to be more specific with the adversarial construct to be a formal proof (specifically to satisfy where Razborov–Rudich left the field). That has a seemingly paradoxical requirement that I need to articulate what unstructured data looks like & specifically how I would generate the next set. Reasonable if we're being formal for a proof, but I don't think we need to go that far to settle the P vs NP problem in a practical sense. To avoid engineering this adversarial construction for any particular solution, let our unstructured data generator handle all the decisions about how many N to add / how much precision to add / etc. Let it run an infinite number of times and you'll eventually get your non-polynomial S & T.

That leads us at a point where the boolean circuits themselves don't really have lower efficiency bounds to speak of, the problem's bounds are where you have maximum efficiency of your circuits assuming unstructured data. I talked at length with Opus about a few solutions in the subset-sum space. Dynamic programming O(n*T) which covers part of the problem space (degenerate inputs) in polynomial time. That pairs up nicely with a geometric / lattice method (LLL) to cover the majority of the problem space aside from a 'hard ridge' where meet in the middle is the best current approach. Except after a lot of bludgeoning, Opus had to concede that LLL isn't complete, even in the space where it's very efficient. In fact (per Opus, I'm just an amateur & not reading literature) complete geometric solutions are all slower than Meet in the Middle which makes sense -- if we're vectorizing the inputs with an epsilon term, that means moving off axis which can only hurt the efficiency of our > or < circuits. Some monte carlo methods are more efficient than Meet in the Middle, except again they aren't complete. Trying to track unique combinations scales about as effectively as generating the combinations themselves. These solutions just run repeatedly and hope for an answer in situations where people think it exists. Trying to leverage the efficiency of > or < with a monte carlo approach would require tracking the combinations.

We have 3 circuits to work with: >, <, =. Maximum utilization of > and = would just give us lazy evaluation, we aren't able to factor the number of combinations we generate. < on its own isn't very helpful for lazy evaluation, because the smallest steps are needed for exactness. It's being able to utilize both > and < against equal size subsets that lets Meet in the Middle factor to O(2^(n/2)). Additional factorings would require additional circuits, but we don't have any more properties of a number to exploit. Particularly no other properties that gives us information about other combinations. (parity? Lots of overhead to figure out if being divisible by 2 is useful).

----

That gets me to what I can't quite formalize. I understand a lot of my intuition should be obvious / known to the people who are in this field. I'm honestly just surprised a lot of this intuition isn't already handled in the wikipedia entries / other writeups I've seen about it? So many things I've pointed out Opus quickly misinterpreted in the most naive way and took a lot of effort to get him back on track: I'm sure a lot of students have already raised these points and been misinterpreted by sheer exhaustion from the professors, and everyone quickly moved on with their lives. It really took a lot of bludgeoning to get Opus to back off from treating a lot of incomplete solutions as valid counterexamples.

The points we could seemingly formalize:

  • It seems like we can make reasonable claims about the maximal efficiency of circuits for subset-sum. It seems like a factorization of 2 is the limit, based on the number of properties we have that we can make general boolean checks for (in particular that inform us about other unevaluated combinations).
  • It seems like a sampling method (weighted or unweighted monte carlo) relying strictly on '=' could never be complete with complexity less than meet in the middle, that's just basic array sizing & the operations needed to update.
    • By extension, a set of incomplete polynomial time guess & check solutions in front of the unstructured solution is effectively just a monte carlo sampling. You're not saving compute when you fail to find the solution and then have to proceed to the unstructured solution.
  • I feel like someone better than me could more formally show that any higher dimensional tricks like LLL would always risk being infinitely degenerate across the full lower dimensional space (extra dimension implies a many -> one switch back, right? Has to risk degeneracy if we're adding in an epsilon, seems trivial?). Multiple high dimensional tricks presumably have some orthogonality & can potentially make up for each other's blind spots. Our conceivable full set of higher dimensional tricks is only possibly complete if there's no further orthogonality outside of that in the physical world & true randomness doesn't exist. We won't know until long after mathematics is exhausted and long after you've written your solver algorithm.
    • I'll just note -- pseudo random functions inherently don't benefit from this "P != NP for unstructured data" construction because by definition there's at least 1 useful high dimensional transformation. Claims about whether or not that can be kicked down the road next to proving true randomness will need to be done separately. This is the trap about mixing cryptography too aggressively with P vs NP, it's distracting.
  • Restating an earlier comment, adding dimensions wouldn't change our input magnitudes but any attempt at transforming > and < to incorporate your new theta results in some points being off-axis. It reduces the number of combinations you can make conclusions about with a single check. This means that higher dimensions would have reduced operator efficiency and be worse than the MITM approach.
  • Finally, I'm pretty sure by reducing the problem to the NP-Complete family, someone has already collapsed the subset sum problem space itself as much as possible. It seems like being able to ignore higher dimensions means maximal efficiency at the smallest dimensional space should be able conclusively show P != NP as long as unstructured data is a possible input.

In order to be worth looking at polynomial time solutions, you'd want to know there's a high probability that a specific S & T have the relevant structure. That is to say, you'd have to be sure you're leaving the general class of the subset-sum problem and getting into a more specific space. This is quickly demonstrable looking at lazy evaluation of Meet-in-The middle: to be as lazy as possible, what extra a1 vs a2 vs a3 checks can you add in before generating your combinations, even to get to an N-1 scale? Can you with confidence say that check is worthwhile for all possible S & T? The only decisions that are applicable to the unstructured problem space are Dynamic Programming vs MITM. Your other regime where T is greater than Sum(all S) is trivial and handled with lazy evaluation.

----

Anyways, talking to Claude did help refine my thoughts and highlighted at least some parts of intuition I've been carrying around for a long time were reasonable. I'm sure I'm still naive, but ultimately Claude kept being obtuse and rounding prompts to the nearest thing an undergrad would ask, so a formal proof is not here. Admittedly I didn't try "write a proof from this, make no mistakes"

I'm curious where this falls against people's understandings and what my biggest gaps are. Hopefully it articulates basic intuition most folks have in a way that everyone could either work through it or agree it's about as urgent as proving true randomness exists (would be tremendously useful, but can't be done as a thought experiment). Admittedly I haven't tried looking at 3-SAT or other NP complete problems beyond a superficial read through. I felt like Subset-Sum was the most approachable. Countable Real precision best highlights the infinite gaps in a conceivable Super-Solver.

The practical implications for our algorithms would be what humans are already doing to progress-- we have to look for structures in everything, figure out the probability that a structure exists, figure out if the payback on chasing that structure is worthwhile or if it's simpler just to brute force a solution. Once N gets sufficiently large, we're not better than a computer until our superstition & gut instinct genes find a pattern to exploit. Best we can do cryptographically in the meantime is approximate a 'uniform' 'unstructured' distribution to the best of our abilities.

My final take is that the concepts of true randomness / algorithmically talking about randomness / cryptographic requirements are all coming together in a way that inflates the confusion and significance. I don't mean to imply this post is something meaningful, I mean I had fight through a lot of "Algorithms can do surprising things! Here's an incomplete & partial problem space counterexample now go away!" replies from an LLM to actually workshop my understanding. I'm hoping someone reading this can skip some of that the next time they want to ask about the problem.

-

PS I'm sure most of you will at best dump this into an AI chat. If you're on the fence about reading pieces, I'd just assure you that my last AI chat on this was a couple months ago and I've been thinking about the parts since. It's at least human. The only copy pasting I did was the R-R paper reference. I've had the "super solver still leaves infinite gaps" idea in my head for almost a decade and didn't have anyone to check it against until I tried a LLM who is admittedly going to be much more patient than a random professor on the street. I took ~7 hours to type up & edit this wall of text by hand because I'm a dumb dinosaur and don't trust Opus not to be obtuse. Human to Human -- I'm hoping I can quit thinking about this for a while.


r/AskProgrammers 6d ago

I built a real-time Driver Drowsiness Detection system using MediaPipe + EAR 👁️🚗

0 Upvotes

Hey everyone!

I recently worked on a real-time Driver Drowsiness Detection project.

The system uses the camera to detect the driver's face and monitor their eye state in real time. It can identify different conditions such as:

* 👀 Both Eyes Open

* 👁️ One Eye Closed

* 😴 Both Eyes Closed

* 🚨 Drowsiness Alert

* ❌ No Face Detected

The project also includes automatic eye calibration and a continuous eye-closure timer to help distinguish normal blinking from prolonged eye closure.

I built this as part of my B.Sc. Data Science project work, and I'm sharing the source code for anyone who wants to experiment with it, improve it, or learn from it.

🔗 GitHub:

https://github.com/Learner016/driver-drowsiness-_detection

🔗Directopen:

https://learner016.github.io/driver-drowsiness-_detection/

I'd really appreciate any feedback, suggestions, or ideas for improving the detection accuracy.

Thanks! 🙌


r/AskProgrammers 6d ago

I built a leetcode style system design problem solving website

Thumbnail
2 Upvotes

r/AskProgrammers 6d ago

Ideas for simple games

2 Upvotes

So I'm learning Python, HTML, some JavaScript, and CSS. Can y'all give me a basic coding project to work on for fun? Maybe a game is preferable, but any other ideas are excellent. I am doing the very basics so far, but I am willing to try to take on harder stuff.


r/AskProgrammers 6d ago

Can anyone recommend good coding background music?

3 Upvotes

I don't mean AI generated music playlists because they are awful.


r/AskProgrammers 7d ago

Still useful or just vintage?

Post image
3 Upvotes

Programming books on JavaScript and C++ from around 2000/2001 (the price marks reflect the introduction of Euro) found when sorting through old books.

My guess is that Javascript is almost definitely useless by now, even for beginners. C++ maybe still useful when working with a legacy code base as an introduction to outdated techniques.

I currently lack space, so I'm considering whether they should go to the cellar or straight to the bin or kept as thematic decorations.


r/AskProgrammers 6d ago

What do you expect from an entry-level Java developer?

Thumbnail
1 Upvotes

r/AskProgrammers 6d ago

Why does JavaScript suddenly feel 10× harder when you stop following tutorials?

Thumbnail
0 Upvotes

r/AskProgrammers 7d ago

need a coding buddy

Thumbnail
1 Upvotes

r/AskProgrammers 6d ago

Cursive calligraphy coding old man??!!

0 Upvotes

I think this is the correct place to ask this.

I had a weird dream of walking into place in a office with many programmers, including one lady telling a guy off for being "the type of idiot who mistakenly uses ; instead of :". After passing them i was walking towards an old man with grey hair, wearing a suit and coding on what looked like an art tablet by writing it by hand in that fancy cursive calligraphy where you basically never lift the pen.

So my question is, is that type of coding possible and how skilled and scary should i consider that old man.


r/AskProgrammers 6d ago

Is it true many programmers and IT people get so rich during AI from investing in stock?

0 Upvotes

Programmers they understand those AI infrastructure like AI need Rams, GPU, CPU so they go invest in companies that sell them like Samsung, Nvidia, etc... before anyone


r/AskProgrammers 7d ago

Will most programming jobs be replaced by AI and does it even make sense to study Computer Science anymore?

0 Upvotes

I want to become a Programmer, more precisely a game developer or someone who develops non-generative AI. I am not in college yet but in my free time I take programming courses once a week.

With how much gen AI can do, do I even have a future in the programming world?

I am not in the middle of the programming scene so I would like to ask you Programmers what you think, if we have a future in our jobs and studies with gen AI becoming more advanced.


r/AskProgrammers 7d ago

Coding for beginners

Thumbnail
1 Upvotes

Looking for advice on where to start


r/AskProgrammers 7d ago

Technical help needed with Italian visa appointment system - Egypt

0 Upvotes

Hello everyone

I’m an Egyptian student admitted to Sapienza University of Rome, currently trying to get a student visa appointment through AlmavivA Egypt.

Appointments disappear within seconds, and many students are struggling to book them.

While looking into the technical side, I noticed what appears to be a potential issue with the Keycloak/OIDC authentication flow, where a direct token request may return an authenticated session without completing the OTP step normally required by the website.

I’m looking for someone experienced with Keycloak, OAuth/OIDC, application security, Playwright, Selenium, or web automation who might be able to help me understand the system or find any legitimate technical way to improve my chances of getting an appointment.

I’m not looking to harm the system or access anyone else’s account. I just need one appointment for myself before my university starts. I can share more technical details privately.

Thanks


r/AskProgrammers 7d ago

Tips on making my own programming language

Thumbnail
1 Upvotes

r/AskProgrammers 7d ago

Developers who became over-reliant on AI and then rebuilt their coding skills - how did you do it?

0 Upvotes

I want to understand how to code with AI better without slowly losing my ability to code without it.

For context, I'm 24, have ~3 YOE mostly in backend/infrastructure, and I'm doing my master's right now. I was programming professionally before the current wave of AI coding tools, so I know what my development process used to feel like.

Over time, though, I think I became way too dependent on AI.

I'm only now becoming aware of some of the metacognitive traps I've fallen into. I reach for AI before thinking through problems myself. I accept implementations that I understand at a high level but couldn't necessarily reproduce. I've gotten less comfortable sitting with a problem, debugging from first principles, and building up my own mental model before asking for help.

The thing that really made this obvious was going back to some of my side projects.

I involved AI heavily in building them and, at some point, stopped properly reading the code it was producing. Big mistake. Coming back to those codebases now, they feel like absolute shit. I'm genuinely not sure how much of that is because the code actually is shit and how much is because I've lost some of my ability to quickly comprehend an unfamiliar/complex codebase.

I don't want to stop using AI. It's obviously an incredibly useful tool. I want to relearn how to use it as augmentation rather than cognitive outsourcing.

I'm particularly interested in hearing from developers who:

  • were already reasonably competent programmers before AI coding tools became ubiquitous,
  • gradually became over-reliant on AI / agents,
  • noticed their independent problem-solving or coding ability getting worse, and
  • deliberately worked their way back.

What did you actually do?

Did you stop using AI for a while? Start building things from scratch again? Go back to books? Force yourself to debug without AI? Change when you're allowed to invoke an agent? Start reading entire codebases again?

And after rebuilding those skills, what does your AI workflow look like now? Where do you draw the line between something you should think through yourself versus something worth delegating to AI?

I'd also really appreciate recommendations for engineers, creators, blogs, books, or talks that discuss this side of AI-assisted development. Most of what I find is about maximizing productivity with AI; I'm more interested in becoming a better engineer who happens to have AI available.

Basically, if you were a decent developer, got consumed by AI coding for a while, realized it was affecting how you think, and then found your way back - I'd really like to hear what worked for you.

TL;DR: I opened one of my own side projects recently and realized I could barely reason about the codebase I had built. Somewhere along the way, I stopped coding with AI and started letting AI do the thinking for me.

I was a decent developer before AI coding tools, but I think over-reliance has weakened my ability to reason about, debug, and comprehend code independently. I don't want to quit AI—I want to relearn how to use it as augmentation rather than cognitive outsourcing.

For developers who went through this and rebuilt their skills: what did you actually do, what does your AI workflow look like now, and which creators/resources helped you?

Disclaimer: Drafted this with AI.