Reading view

documenting old solo code and found a try/except that just silently swallows one specific exception. no comment. no ticket. no context. I wrote this. why did I write this

been the only dev on a backend service for about two years. finally sat down to write proper docs for it today.

found a try/except block in the job queue handler. catches one very specific exception type. does absolutely nothing with it -- no log, no reraise, no fallback. just silences it. there's no comment explaining why. no linked ticket. no slack thread I can dig up. git blame points to a commit message that says 'fix job queue issue' with no further detail.

I genuinely cannot reconstruct what I was protecting against.

if you work solo, please leave your future self a comment. even one line. it costs nothing. I am begging you.

submitted by /u/quietcodelife to r/webdev
[link] [comments]
  •  

Pagespeed phantom domain

Pagespeed phantom domain

Not sure what to make of this, been making some tweaks on my WordPress site and checking pagespeed as well as other tools for progress and one session suddenly csa.crazygames.com/event pops up?

A burst of panic had me hunting for mailware or something in a plugin that's gone rogue... But nothing.

Subsequent tests it's gone, installed wordfence for a scan, nothing. I tried another page on pagespeed and Microsoft Clarity appeared, subsequently it's disappeared too, haven't had clarity in over a year and that was run in edge cloudflare tag management.

I'm hoping this is some unexplained ghost glitch from Google on that test session?? Anyone able to put my mind at ease or advise what I'm looking at? Never seen anything like it before.

Apologies for the average screenshot.

Update: after 12 hours of fluffing about I am no further ahead, completely unable to repeat the domain instance, unable to find any evidence of code or script in anything thus far. Still searching (db now) but have a feeling I maybe hunting a phantom occurrence. Pagespeed has been timing out today regularly, all instances with internal timeout errors at Google end. Where as any other tool, dev lighthouse included, runs clean with nothing weird. Everything site wise remains flawless and fast('ish by my standards). No evidence of admin manipulation, user or plugin wobbles... It's going to be a troubled sleep night while I second guess myself. Edit: the only other common thread to the instances observed is they were all using my phone doing pagespeed test, desktop is zilch... I doubt very much this has anything to do with anything at all but I'm just going to start yelling at the passing clouds now...

submitted by /u/Beneficial-Rise-740 to r/webdev
[link] [comments]
  •  

Fellow devs under AI mandates, how do you deal with the shame/social stigma?

Preface this by saying I have moral scrupulosity/ social judgment-related OCD, so there’s that lol

I see people on here still writing their code by hand; at my company we do not have that option unless we outright defy orders from our boss, which I assume would get you fired. I get a lot less satisfaction out of my work now, the code generation part is extremely mind numbing, I’m really sad about not getting to write code anymore. The planning/architecture phase can be kind of fun though.

Yes I am looking for a new job but the issue is (maybe I’m just a shitty developer but) I am genuinely like 10x faster with AI so if I do not use it, I would be consciously choosing to do a worse job, which also feels wrong and silly. I also hate admitting this but it has given me a lot of genuinely helpful suggestions and taught me new things. obviously sometimes it also does dumb things, but I do dumb things sometimes too. As obnoxious and eye rolling as it can be talking to Claude, “he” is genuinely that good when it comes to the types of things we are building.

In my personal life I do not use AI because I have a 100% HEAVILY anti AI social group, and I try to make ethical choices like I avoid beef, boycott Amazon/Spotify/Starbucks, etc. I feel like an impostor for not confessing to them that my entire job is to use AI all day now. Like for example last night a girl I know posted on her close friends about how she wants to murder people who use AI at work (hopefully being hyperbolic) and I have to hang out with this girl in a couple weeks…

my coworker has also refused to use it but for some reason my boss hasn’t talked to him about it yet. He’s just waiting to get fired. My therapist is making me do stuff like put an AI app on my home screen where someone could see it as homework. Maybe I should be posting this on the OCD sub but I really want to hear from other people going through this same dilemma.

submitted by /u/ASS_MASTER_GENERAL to r/webdev
[link] [comments]
  •  

How do sites detect whether someone is running adblocker?

I've been interested in this functionality (when a site detects your adblocker and kindly asks u to whitelist).

The only idea that comes to mind is setting a div in the layout with "ad" class or something similar, and then if a user has adblocker the adblocker would be removing this div from the dom. I don't think this would consistently work for every (or at least most of the popular) adblockers out there.

submitted by /u/ImBoB99 to r/webdev
[link] [comments]
  •  

Whenever I work on a project with heavily nested folders, I lose track of where the folders end. So I made this VS Code extension a while ago, that adds colors to the nested folder tree view and it actually helped me a lot. I thought it might help others too, so here it is.

Whenever I work on a project with heavily nested folders, I lose track of where the folders end. So I made this VS Code extension a while ago, that adds colors to the nested folder tree view and it actually helped me a lot. I thought it might help others too, so here it is.

Note: This extension injects CSS styles to the VS code workbench HTML file. Because of which you need to run the application as administrator only for toggling the extension or if the VS code or the extension is updated.

Free & Open Source. You can find it here:

Hope this is helpful. Feel free to drop any feedback, suggestions or ideas.

submitted by /u/RajSrikar to r/webdev
[link] [comments]
  •  
❌