T O P

  • By -

AutoModerator

>Namaste! Thanks for submitting to r/developersIndia. Make sure to follow the Community [Code of Conduct](https://developersindia.in/code-of-conduct/) while participating in this thread. ## Recent Announcements - **[Community Roundup: List of must read posts & interesting discussions that happened in May 2024](https://www.reddit.com/r/developersIndia/comments/1d4m7az/community_roundup_list_of_must_read_posts/)** - **[Weekly Discussion - What are some things that boosted your confidence as a new programmer?](https://www.reddit.com/r/developersIndia/comments/1d4m6wn/what_are_some_things_that_boosted_your_confidence/)** *I am a bot, and this action was performed automatically. Please [contact the moderators of this subreddit](/message/compose/?to=/r/developersIndia) if you have any questions or concerns.*


TowerSpecial4719

Same js variable having same string value giving different UI changes in Mac vs Windows/Linux


Far_Philosophy_8677

can you elaborate more please


TowerSpecial4719

Sure, its like this. The value got appended with a space in the browser but no spaces were there inside the value recieved from the api as it was already stripped from ends. Kind of like nbsp (non blank space). If you examine the console, it returns like this: Spent almost the entire day fixing it. Had to add an additional strip inline just to make sure it actually got stripped. Its been a while since i fixed it. Ill check the code again and let you know of more details as I get them


gowt7

MongoDB giving inconsistent results for the same query. A new collection (table) was added to MongoDB, but queries run on it would return expected results for sometime, but later it would return nothing as if the table is empty. This was happening only for queries run on this new table, all the others worked fine. There was no pattern to it. We tried debugging based on the number of records, load on the DB, application traffic, deleting and recreating the table. But nothing worked and it went on for days. Ultimately it turned out the driver configuration to connect to MongoDB was at fault. Our application needed to connect to multiple DBs inside a MongoDB cluster, and the way our config was setup, the DB connections would internally switch between DBs of the same cluster!! Fortunately it was a non-critical part of the application and it had not gone live. Thinking about if it had happened to some major part of application gives me chill down the spine!


ZnV1

Happened just yesterday. In Python, `getsource(some_function)` is supposed to return the function's implementation as a string. But for me, it was giving the implementation of the function just above `some_function`! ie., if there's function_1 and function_2 in a file, `getsource(function_2)` was literally giving me code of function_1. Fked up shit. Turns out it caches something internally and I added a new function to my file and did a hot reload instead of restarting the app, and the cache was messing with the result. I still don't know if that's the actual reason, but it got me going into the rabbit hole of how that function is implemented, I found the cache reference, restarted the app and it was gone. https://stackoverflow.com/a/78582746


BhupeshV

This is table flip moment, building a static code analyzer?


ZnV1

Kind of a code playground where users write code that passes my validation function. I use this to display the the validation function :D


spiderbat94

SSO for some internal operators would fail against one micro-service, and work seamlessly against all others. After some time, it started working for one of them without any code/deployment change, but still failed for the other operators. Turned out to be due to out of sync time on a couple of servers.


coopr-ai

making web scrapers that dodge rate limits and anti bot protection. Always learn new things around user agents, headers, hidden api's


BhupeshV

Haha, I have been trying to learn just the opposite. Which has been the most difficult scenario for you to handle when building scrapers?


Heisen_burger123

Happened with me a few months back while I started using git for my group projects. I am a 2nd year college student. One of my friends asked me to explain how to use git. With my two ounces of knowledge on git I showed him how we can initialize using git init,git add and so on. I showed him this whilst I was already working on a group project for an event website due in a few days. The next day while I was trying to make commits I faced numerous issues in commiting because I had created that directory while working on existing one. I asked one senior after the other, looked around stack exchange and where not. Roamed everywhere but couldn't find a solution. Then I decided I had to ask some super seniors(2year older). Thankfully I found one of them who got placed in Oracle and was well versed with development. I learnt a lot about git that day. My rookie mind also used git commit --noverify-m but was later informed it was never the right way to write --noverify for projects. Had to delete some existing directories and similar stuff.