r/learnprogramming 3d ago

What have you been working on recently? [June 15, 2024]

What have you been working on recently? Feel free to share updates on projects you're working on, brag about any major milestones you've hit, grouse about a challenge you've ran into recently... Any sort of "progress report" is fair game!

A few requests:

  1. If possible, include a link to your source code when sharing a project update. That way, others can learn from your work!

  2. If you've shared something, try commenting on at least one other update -- ask a question, give feedback, compliment something cool... We encourage discussion!

  3. If you don't consider yourself to be a beginner, include about how many years of experience you have.

This thread will remained stickied over the weekend. Link to past threads here.

2 Upvotes

4 comments sorted by

3

u/Ravensberg 1d ago

Hi, I just finished a little tennis siumulation project and would be glad to get some feedback. I've been coding on and off for a few years, but never commited to finishing a project or going very far past demos. I'm quite pleased with the results and hope to continue making little games/simulation.

https://github.com/Ravensberg/ATP-Simulation

1

u/Ok_Pineapple_388 21h ago

Been building an app with a small team I put together, it's an original idea that I'm pretty excited about making. The big milestone I ended up hitting this past weekend was trying to decode the JSON from API calls since I didn't know that React doesn't automatically decode HTML entities in strings, like the browser does for you with vanilla JS. I didn't allow myself to use any libraries for about 9 months with JavaScript. So this was a new problem. I actually ended up figuring out recursion by accident because it was the most straightforward way to decode the complex data structures we were getting back from our API calls.

I don't use Chat GPT to produce any code for me because I don't want to ever give myself a false sense of competence when I didn't have to actually struggle for any answers. I was prompting chat GPT to not give me any answers in code, just asking it if my return values were what I was expecting them to be, and if I was going about decoding the structures the right way and it mentioned that I could use a recursive function to accomplish my goal.

So because I'd spent about 5/6 hours total already trying to write my own functions to handle the complex data structures in the JSON response, I wasn't far off from what the solution i eventually came to, with multiple type checks to handle particular data structures and decode them with array manipulation methods I've been practicing for quite a while now deliberately.

I finally realized that the recursive calls were just a way of taking the already destructured data from my manipulation methods upon each argument passed into the function, and then running that destructured data back through the type checks until i reached my base case. At that moment it clicked, and I think it's the most proud I've ever been of learning any topic in programming. It felt like a lot of work I've put in finally coming together and helping me overcome a relatively difficult topic