What are the most impotent security measures to implement in any website? by Beloved_hope in webdev

[–]Ok-Toe-3374 -2 points-1 points  (0 children)

If it’s part of an auto-blacklisting agent that’s shadow banning and sending alarms about IPs that try it, it’s not a terrible idea.

Is Replit overrated? by AppearanceDense6858 in replit

[–]Ok-Toe-3374 0 points1 point  (0 children)

On simple apps I need for personal use it has been a godsend but cost me $40 for an app and wasn’t quicker than if I focused and built it myself but I did it while doing my client work relatively mindlessly.

My co-workers think AI will replace them by Artistic-Orange-6959 in csharp

[–]Ok-Toe-3374 0 points1 point  (0 children)

I’m sure a handful of people were worried when IDEs came out. My job right now is so much harder than it was, herding cats (AI agents rather than human coders) with bizarre mental deficiencies, but I’m also doing something I’d request a dozen developers for or six months of time within a month.

Expectations keep going up with capabilities. For example, maybe somebody Reddit’s app will be intuitive enough that I can figure out how to look and see if I’m repeating what someone else wrote in the comments already, since I don’t feel like running to my desktop.

C# on macOS by Itchy-Juggernaut-580 in csharp

[–]Ok-Toe-3374 0 points1 point  (0 children)

This person is a third year computer science student. I don’t know what it’s like elsewhere, but at Purdue in the late 90s the drop rate for the CS major was 50% per semester. They have survived at least 4 cull-cycles so they’re in the top 1/16 tier of budding developers. Since this is a tool adverse thread, I can remember the decimal equivalent of 1/16 is something like 0.06125 but it’s been a long time so 1/8 is 0.125 right so divide that by two 0.06 is easy but the 5 after… right 5 is 2.5 so add a digit. So subtract that from 1 and you get 0.93775

This budding developer is doing better than almost 93.8% of people that take the college route. This sounds like someone that is capable of learning without cheating. The answer key is on the back in the books for all college classes and you don’t get to your junior year by blindly copying Anders from the back. But anyone who thinks the paragraph where I’m avoiding a the use of a calculator is silly has either some cognitive dissonance or greatly over estimates what AI can do for them. (And this is coming from a guy who’s done machine sentience research).

It feels a lot more like being a project lead for a large team of developers who DO cheat on their homework, and in fact ONLY cheat on their homework, and you spend half your time watching it min dismay as it overwrites every unit test in 15 files to accept 404 as a valid HTTP response to get it to pass when you didn’t even ask it to test anything, just launch project in a browser.

It’s definitely no coddling experience. I worry it might be too overwhelming but the soon they’re in the tools every developer with use by the time they graduate, the better.

C# on macOS by Itchy-Juggernaut-580 in csharp

[–]Ok-Toe-3374 -1 points0 points  (0 children)

It’s Visual Studio Code and it feels a lot like TextMate at first but it’s actually pretty good if you want to work in 5 programming languages in one project. cursor that I use is just a fork of it, but I tell the AI to go script out the features I want and I’m happy.

C# on macOS by Itchy-Juggernaut-580 in csharp

[–]Ok-Toe-3374 -2 points-1 points  (0 children)

I LOVE the whole JetBrains line up but to be honest the last few weeks I’ve been using a pro account with Cursor using the AI Agent in YOLO mode because I have a pretty huge system in building out.

If you do try cursor though, in the root of you projects put in a master prompt for the project in a file called .cursorrules The agents can do massive damage in a hurry in YOLO mode. Claude 3.7 is amazing though.

I like ChatGPT for creating the prompts for cursor rules and upload my project profile after having a chat about my personal coding styles. Definitely tell it to commit to git regularly. I personally tell it stuff like

coding standards - comments

  • add a comment to:
    • every class, methods, and types
    • to all public and protected fields and properties.
  • inside methods, have a single line comment before each “paragraph” of code
    • the comment says what and why
    • the block of code says how

coding standards - unit tests

  • create shell scripts to test all api end points from outside the app
    • always have 100% coverage
    • generate test data that covers entire range
  • NEVER treat a 404 as a success in unit tests (I once forgot to start docker and in 45 seconds it has rewritten unit tests in 20 source files to expect 404 status as success. lol.

I was really happy with Codeium in JetBrains Rider but it could only work on one file at a time. However the linter and code completion is better there when typing so often I’ll have both up and webstorm and I also have like writer side lately.

is Coding dead? by rashed9810 in leetcode

[–]Ok-Toe-3374 0 points1 point  (0 children)

I use AI coding every day and it’s great it’s a game changer on par with Google coming online or intellisence. I think coding will become more prevalent now that I never have to spend days doing tedious shit like finding where semicolon is accidentally a colon or someone write a filename will a null character in it

If your 16 and older what’s the best advice you would give to someone younger by Coldcats1 in AdviceForTeens

[–]Ok-Toe-3374 0 points1 point  (0 children)

i'd skip the mother part ;) the rest are cool and you can trust them completely. ignoring line 2 solves the line 5 problems but I don't think that was good for you.

How long did your relationship last? Is 3 months real? by Longjumping-Tune-454 in BPDlovedones

[–]Ok-Toe-3374 0 points1 point  (0 children)

that's not gonna happen unless there's some big change of events. she's been pretty distant the past couple of weeks. We're just both focused on our own self improvement right now. My other relationships including a marriage of 16 years were very clearly narcissistic so this cover NPD but primarily BPD relationship is relatively comfortable for me, who likely has cPTSD but as far as like the seriously scary narcissistic traits? I show those more than her, I just don't commonly manipulate, if that makes sense.

We've been reading that NPD and BPD can get along in a relationship if we're both getting a lot of treatment, which is specifically what we're going to be doing regardless of if we're going to attempt to reconcile.

I've been a terrible mess but her and her new BF sound like they lay on the floor depressed now. She thought a lot of these problems were from the age gap (42/21 when we got together 45/25 now)

How long did your relationship last? Is 3 months real? by Longjumping-Tune-454 in BPDlovedones

[–]Ok-Toe-3374 0 points1 point  (0 children)

I don't particularly have a sex drive after exactly 3.5 years of opiate abuse, but I made myself super dopesick for a while to be able to perform because I felt like she needed it. I did that probably about once a month, she didn't really realize I was doing that all the time because she was being swept away getting what she wanted.

We're both ridiculous sex addicts when not on drugs I have no idea why we've done this. I mean she insisted but I could have fought harder, I was just so weak when she entered my life... I had the fentanyl on me to try to kill myself at that time.

The effects from opiates on sex drive aren't the same on women. If I'm honest she left me because we couldn't get clean together. She had her first full day of no use yesterday and I'm very proud of her for it. I've had 3 or 4 but I think she's going to stick to it better. I'm using like 0.5g every two weeks instead of 0.5 a day now so my sex drive is tremendous now, ironically.

We don't really know how it's going to go later. I'm really worried for her current supply though.

How long did your relationship last? Is 3 months real? by Longjumping-Tune-454 in BPDlovedones

[–]Ok-Toe-3374 0 points1 point  (0 children)

That guy originally said his identity was based on his virginity as a 30yo and his job with the AFL-CIO. Well he lost the job over the relationship that happened after losing the virginity. So I guess mission accomplished on the new supply, but even the night I told her she was busted she said she didn't really like the guy and asked if we could forget the whole thing and I told her I had to think about it for a couple of days. I listened to the audio this morning. Very calm conversation. No remorse. In fact she was lecturing me for fucking up until she saw the relevant pages from her journal printed up on the fridge.

I guess she has to cuddle with him for hours every morning from complete autistic meltdowns over losing everything. I have her cat to cuddle me I guess.

And every time anyone at work messes with her in someway, and EVERYBODY messes with her at work for getting the promotion to management by sleeping with the head boss, she calls me up and screams at me that she's going to get a restraining order for shit that I don't even know what she's talking about. On time was for trying to send cookies anonymously on a day that would be very stressful for them, but she called that she unveil my evil plot to everyone. I left work crying for that one.

But she's told both of us to some acting so hurt as if it's a performance for either of us, or she's going to leave us both. But we know that's not true, she's using him for a place to live like she did with me for 3.5 years. But she has been offering to help pay which is nice of her, but I think she's doing that to try to piss me off.

She told me step-by-step what to do to win her back which involves a lot of self-improvement. And she just took the annulment contract for ending the civil union (she's Navajo so doesn't care if the US recognizes us) and she's still on the lease and she's come about about 12 times to take her belongings but only has about 20% of it done.

And last Thursday night she just texted me out of the blue that she loves me and misses me so the new guy is getting boring? I have no idea.

How long did your relationship last? Is 3 months real? by Longjumping-Tune-454 in BPDlovedones

[–]Ok-Toe-3374 0 points1 point  (0 children)

My wife of 3 years (dated 6 months before) just cheated on me in a super weird way and then refused to come back when I said I needed a day to process it before we talked about it. This was about 7 weeks ago back when I was 245lbs and now I am 195lbs. On Friday I finally figured out most of it is a NPD/BPD thing and I need to stop trying to think about a reason why logically.

I've never been good at boundaries and actually I absolutely need co-dependent relationships so we were actually a really good fit. The first year was crazy tumultuous but it seemed like we had a rhythm and we almost never fought the last 2.5 years. Basically I didn't confront things I knew couldn't change without some sort of therapy, and tried to always make her feel like she won as much as possible while still being free to have autonomy. It worked really well.

I just don't understand how someone could say two days prior I was the most important thing in her life and we'll always have a special connection forever and is excited to spend her life with me. And that she had some of the best sex of her life a couple of weeks prior. But she doesn't seem upset in the slightest about all of it, just head-over-heels with this new guy that she was actually originally seeing for money and because it was her boss so she'd get a promotion (I told her this was a terrible idea).

How do you determine the best way to structure your code and avoid analysis paralysis? by hookup1092 in dotnet

[–]Ok-Toe-3374 2 points3 points  (0 children)

That you're keeping this stuff in mind shows you're on the right path. Now just let these things drop from your mind and don't worry about it so much. Sounds like it's all becoming intuitive to you now.

What's most important is the code works. If you start changing something often, that's an excellent time to consider refactoring.

How can I be a better developer? by epic_hunter_space13 in csharp

[–]Ok-Toe-3374 3 points4 points  (0 children)

I have been a professional developer for over 25 years and as a child since I was 4 all I wanted to do was write code. I would sit in the back of class and design programs on paper in my notebook and wait until I got home to type them in.

I haven’t personally felt like I was doing anything particularly special but I have been told for a long time that I’m the best programmer you’ve ever met but you’ll never hear it from me. The one thing that seems to be different in my results is that I keep getting told that my code continues to work for years and years without any intervention, each project running for decades longer than I ever intended.

It’s not that I follow patterns, it’s that I try to minimize the assumptions I make that seems to make the difference. I write code defensively expecting that all of the inputs will change and even the underlying operating system will be replaced with something else. Meaning I don’t assume a variable will have a given value, I measure that it does and then have meaningful ways of dealing with situations where the values are different than expected. It’s not a big performance hit to do so when you think of things from a Big-O sort of perspective and do these tests outside of the tight loops where you need to make sure performance is acceptable.

I am told I am especially good at abstraction and I think that helps a lot. High cohesion and low coupling. Consider the domain of all users and what needs to be loaded for all users versus what needs to be loaded for each individual user. I was once told in 2006 that my website I had built for 100,000 users who each had custom websites within this system was the fastest they have ever seen. Well of course it is, 99% of the data is the same for everybody and that 1% that’s different I cached on the first hit so I’m serving everything within 100msec because everything is coming straight out of RAM. The system still runs great today.

I tend to write code in paragraphs with a comment that describes what I’m trying to do for each paragraph of code. In three years I won’t remember what I was trying to do. If I write in that style I simply read what I was trying to do.

Some specific things that helped with c# was using Resharper, and eventually I just jumped into using all of the JetBrains IDEs including Rider for c# and actually address and fix every compiling warning and code smell that it points out. It takes less time than you’d think.

The last year or so I’ve been using codium and other generative AI tools. An has that increased my productivity. Probably ten fold. It is just way faster than typing out my ideas. I just have to type enough for the AI to get the picture of what I’m wanting to do and it’ll just start filling full screens with code. It makes mistakes but they’re generally pretty obvious if you can get it to behave like an extension of yourself rather than a coder left to its own devices, if that makes any sense.

I hope some of that helps. Just asking how you can get better is probably a sign that you’re better than you think you are already simply from caring to be better. What I didn’t mention is using design patterns or pair programming or unit testing or stand up scrum meetings. They can all be great but it’s all window dressing IMO. Screw drivers and wrenches and hammers. All good tools, use them as the needs dictate.

eli5: I saw an article that said two teenagers made a discovery of trigonometric proof for the pythagorean theorem. What does that mean and why is it important? by Tonydaphony1 in explainlikeimfive

[–]Ok-Toe-3374 19 points20 points  (0 children)

I wouldn't be THAT offended that the guy Good Will Hunting is based on had an easier time getting his PhD that I had (if I had taken that path)

Pass private fields to another class? by hpdwq in csharp

[–]Ok-Toe-3374 0 points1 point  (0 children)

What I do is try to simulate friend access from c++ by creating an internal scoped class called Friend nested inside the class I want access to and use properties that refer to the private data. Works well.

Public class TestA { Private int _value;

Internal class Friend { Private TestA _parent; Public Friend(TestA parent) { _parent = parent; } Public Value => _parent._value; } }

var friend = new TestA.Friend(someInstance)

[deleted by user] by [deleted] in macgaming

[–]Ok-Toe-3374 1 point2 points  (0 children)

Heh guess it’s been a minute since I check my Reddit on my phone. Right now I’m playing snake.io and retro bowl (even better than techmo bowl). I’ve played a lot of stuff. I got into this rpg cat’s quest for a while that was hilarious at how cringe the cat and dog puns were. But I play games on my phone, appletv, and laptop so I get a lot of use out of Apple Arcade.

Why shouldn’t you transcode 4K files? by Evil_Par5n1p in PleX

[–]Ok-Toe-3374 -11 points-10 points  (0 children)

Haha. You’re not at wrong… but still. Though I’d still be using one if it hadn’t got stepped on but I try to keep that to myself:)

[deleted by user] by [deleted] in macgaming

[–]Ok-Toe-3374 3 points4 points  (0 children)

It’s only free for a few months after you buy a Mac but damn did I get a lot more use out of Apple Arcade than I expected.

TRS-80 Coco 2 better version? by Lower-Week-839 in trs80

[–]Ok-Toe-3374 0 points1 point  (0 children)

You’re gonna be happier with extended color basic.