Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Feed
All
Post Types
- Rants
- Jokes/Memes
- Questions
- Collabs
- devRant
- Random
- Undefined
Cancel
All
-
Gonna love ChatGPT from time to time.
Best version of this method I wrote by hand was 7 lines. Now it's 3.
And it's perfectly readable.
private static DateOnly ParseDateArgument(GraphQLValue? argumentValue, IResolveFieldContext context)
{
return argumentValue switch
{
GraphQLStringValue strVal when DateOnly.TryParse(strVal.Value.ToString(), out var date) => date,
GraphQLVariable varVal when DateOnly.TryParse(context.Variables?.ValueFor(varVal.Name.StringValue)?.ToString(), out var date) => date,
_ => default
};
}1 -
It just hit me that despite being possibly the most object-heavy language out there, JavaScript actually wasn't even properly object oriented for the longest time. No language-level support for Encapsulation, Inheritance, and without a strict class system, it can never really have polymorphism or abstraction.
Since literally everything is an object, it's impossible to make it object oriented 🤯6 -
Interesting project lined up for today!
I'll be installing a security system, one camera connected to a DVR pointing at a front door triggering a buzzer and sending a video feed to a monitor in a ground floor room at the other side of the house.
But it's my dads house so I'm going to have fun with it and install a wired Cat5 network an Isolated offline router and build in some "smart home" features from scratch, all running on a Local Area Network.
I've built a private home server package for media and storage using Apache and I want to add as many features to the house as I can, maybe even install an extra camera pointing towards the sky (every home should have a sky cam lol).
I can take my time with this project over the next several weeks and I was wondering what would you add to this project?10 -
So the guy across me at work goes KLATIKY KLAK in the keyboard n i always wondered why
coz we're mid/senior devs, there isnt that much to type usually
saw his screen a bit ago n the nigga typing/copying code from ChatGPT 😩2 -
If someone still uses the word "surfing" in relation to the internet, what would you infer about them?11
-
Objectively, I know I should leave.
The company hasn't been doing well. At all.
Projects are a shit show.
Despite everything everyone is kind and respectful, though.
My team's great and boss is good.
Pay is okay, too.
As the lead dev I am appreciated for my work and knowledge.
But the company itself seems unable to learn despite the coworkers being young.
My team doesn't have any work now because the customer canceled the project.
There have already been layoffs. 40% of people gone.
Other companies also pay well.
But damn my team is amazing.
Although I am the most experienced developer. But I know I am not THAT experienced, really. i am still young and would love to work with someone MORE experienced.
Maybe i am just lazy. Then I will likely soon be lazy and unemployed.
Oh no....2 -
Team Leader, once again, wagered I was wrong on a technical thing
I, once again, accepted his wager
Team Leader, once again, lost the bet.
That's 3-0 now.2 -
Fucking hell, why does the phone decide I can't use my last 4% of battery for the torch function? Fuckers, you can imagine that if the user does that, it's really needed right!? Give a warning or smth. It's not like that 4% is good for a phone call either. What's the point of that last 4% battery then.
I live in a park 5km from outside village center. When it gets dark in the middle of nowhere, it gets black, really black. So, I was cycling home and my bicycle light died. And halfway, it was almost completely dark so I wanted to use the torch on my phone so I could at least see if I'm still on the bicycle road. That's how dark it was and it fucking refused. But then - someone caught up from behind and could follow that person until my exit (one I would've never had found anymore) cycled a hundred meters in pitch black until I saw lights of the park. God dammit, fucked up experience. If that cyclist with light wasn't there, I would've had to walk and hoping I was walking in a straight line. Normally I already go before it gets that dark because bicycle light nearly isn't enough.
And that all, because those fuckers decide what you do with your last battery. Fuck you.
Same for headphone, if ten percent battery left, more than a hour, it starts beeping every minute. So I have to listen a hour that the battery is almost "dead"? Almost dead is 5 minutes left fuckers, not whole hour!
Who designs these things?25 -
So I have been setting goals for my interaction with people on devrant. I had the goal of getting someone to spray liquid out of their mouth in response to something I posted. I believe I had one person self report on this (maybe two). My next goal was getting someone to shit their pants in response to a post. I figured with @b2plane here my chances were a lot higher. As of Nov, 2024 nobody has reported on this. That goal still stands.
Maybe some new goals for this next upcoming year should be:
1. get someone to rage quit (not sure this in a good goal)
2. get someone to "dad splain" to me
3. triggered downvotes (I have had some in the past, so this is a recurring goal)
4. inspire anti-posts (some of you are natural inspirers it seems, respect)
5. actually create funny memes (maybe not possible, shitposting will continue though)
Does anyone have ideas for some good edge lording goals?10 -
Spent 3 hours not understanding why the exact same procedure on Linux worked while not in windows. Ended up installing Linux on the windows computer.5
-
Staring at computer trying to figure out why I can't read a float from modbus. I swapped the bytes correctly for my platform. I also ensured the endianess of the words matched my platform (byte endianess is not the sames as word endianess, fml). Was driving home thinking about what could be wrong. My mind saw this code:
uint32_t newint;
for(int count=0; count<2; count++){
newint |= words[count] << count;
}
Then I am fuck! It should be:
newint |= words[count] << (count*16);
This was later turned into float. I kept getting values in the 1e-40 or some shit. Now it makes sense. The upper word was not set.
This is such newb shit. Fuck you newb shit I should just know!
Reading more I realized that the endianess of words can vary between devices even though the spec calls for big endian words. Fuck you non-compliant vendors! So I gotta add a flag for fucked up devices. Fine. The pay off is a generic way to add modbus to our opcua server. I want this easily editable in the field. For now it is readonly. So that makes it nicer.
Just a little torqued that I solved this driving home instead of at work. Too close to the code. I think tomorrow I will have my boss review it to tell me of other logical crap I missed.3 -
Angular is not fun to work with. The amount of jumping between files to do a thing is tiring. And its documentation fucking sucks.
I guess I'm just used to single file components and Laravel's amazing docs...5 -
Fuckdev: I heard people were having meltdowns in certain more political corners of the interwebz, you figure out why, and so I went to read a little bit to see what was going on.
Truth be told, I did not expect this wild mask-off type shit, but it's interesting nonetheless. Malcolm X was proven right once again. I mean el Hajj Malek el Shabazz, dude. These bitches are indeed like foxes, showing their teeth but pretending to smile.
I'd feel bad for the poor fucks, hadn't they come out swinging against immigrants with a copy of Mein Kampf. Not so disgusted by the dextral folks, then? Sinister!
Anyway, having bore witness to such undeniable proof of their conceited wickedness, which makes them more than ever indistinguishable from what they merely *claim* to oppose, I am now at ease for thinking that the B-52 bomber with pride flag meme was kinda funny.44