Details
-
AboutFather, web developer, gamer, and metal head
-
SkillsBy choice: JavaScript, Python, frontend frameworks By force: Java, PHP
-
LocationChicagoland
Joined devRant on 2/20/2018
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
-
Angular devs:
If you're importing a component into another component just to get a value from the controller of the imported component, that's like, awful, right? I can think of at least two other ways to do that more efficiently2 -
Any other metal heads on here? If so, what have you been listening to? I've been obsessed with Mutoid Man's most recent album, War Moans, as well as Cult of Luna's Mariner2
-
Finally got to play around with CSS grid today. Only dipped my toe in but it's very promising. Just have to test it a ton since I still need to support IE11 😒4
-
Inspired by @shahriyer 's rant about floating point math:
I had a bug related to this in JavaScript recently. I have an infinite scrolling table that I load data into once the user has scrolled to the bottom. For this I use scrollHeight, scrollTop, and clientHeight. I subtract scrollTop from scrollHeight and check to see if the result is equal to clientHeight. If it is, the user has hit the bottom of the scrolling area and I can load new data. Simple, right?
Well, one day about a week and a half ago, it stopped working for one of our product managers. He'd scroll and nothing would happen. It was so strange. I noticed everything looked a bit small on his screen in Chrome, so I had him hit Ctrl+0 to reset his zoom level and try again.
It. Fucking. Worked.
So we log what I dubbed The Dumbest Bug Ever™ and put it in the next sprint.
Middle of this week, I started looking into the code that handled the scrolling check. I logged to the console every variable associated with it every time a scroll event was fired. Then I zoomed out and did it.
Turns out, when you zoom, you're no longer 100% guaranteed to be working with integers. scrollTop was now a float, but clientHeight was still an integer, so the comparison was always false and no loading of new data ever occurred. I tried round, floor, and ceil on the result of scrollHeight - scrollTop, but it was still inconsistent.
The solution I used was to round the difference of scrollHeight - scrollTop _and_ clientHeight to the lowest 10 before comparing them, to ensure an accurate comparison.
Inspired by this rant: https://devrant.com/rants/1356488/...2 -
My wife is sick, my infant daughter is teething, and my toddler son won't stop begging for fruit snacks. I haven't slept more than 4 hours in the last 48 hours.
And now, I have to work on my weekend, since our division refuses to say "No, that wasn't in the scope of work" to another business unit and put them in their place. They're lucky they're getting the feature they requested 6 weeks from launch _at all_, let alone with the extras that they requested 4 weeks from launch. Now it's on my shoulders to fix this bullshit because they won't pony up extra budget to pay the external dev shop we used (who failed to implement said features in a timely fashion) to fix this shit.
I really need to get my business shit together and start consulting on my terms. Working for other people can suck a fuck.4 -
I'm a web developer that would like to do some game development. I focus on front end, and have done backend work (not a lot of databasing, though). I mainly use JavaScript and Python, with enough knowledge of Java, C#, and PHP to get by when I need to. I've also got a background in graphic design.
What aspects of game development might be a good fit for my skillset?
Where and how do I get started? I've looked at Phaser in the past, since it was inspired by Flixel, a Flash game library I used for a some simple projects in college.3 -
Over the last few weeks, I've learned two things about the head of my division:
1. They "don't care about code quality"
2. They want to try a "low-code" approach for the web frontend of a completely custom piece of what is currently desktop software
This is despite the fact that we have three full time developers with a wide range of both front and back end skills on the payroll, a deep library of existing components for various frontend frameworks, a custom CSS library, and a decent deployment pipeline for frontend code.
But sure, let's try low-code. Let's see how far that gets us. -
My biggest challenge has been moving away from an unmaintainable Java/Tomcat/Spring Security application server to a Node.js/Express application server. That handles single sign on and two factor authentication. In 2 weeks.
I'm a front end dev. I'm sure it's fine 😓6 -
What's your go-to logging word/message for when you just need to see if a function is executing/reaching a certain point?
I usually go with "dude"5 -
Had a blast from the past the other day. Testing an issue with an AngularJS app in IE11 on a project managers Surface.
Nothing works. Just a blank screen. I open the JavaScript console to hundreds, maybe thousands of errors. They all seem eerily familiar, but I can't place them. It's like something from a past life.
Then I see one that brings the issue into sharp focus.
"{{variable_name}} is a reserved word"
No it isn't, I think. That hasn't been a reserved word in JavaScript since...
Me: "Is your browser in Compatibility Mode?"
PM: "Yeah, it's for one of our legacy programs"
Me: "You need to turn that off to test this app. It thinks you're using IE6, so it's having a 2 decade old shit-fit. I haven't seen those errors since I was a teenager making crap on Geocities"
I never thought an error message could make me feel so old 😩 -
Are there any good SAML 2.0 libraries out there for Node.js or Python?
Background: I'm working with SAML 2.0 SSO through ADFS at my current job. Our application server is a Java/Tomcat/Spring beast that I'm becoming more familiar with, and disliking more each time I toy with it. I'd like to move to something I and my team are more familiar with, and can better maintain/update/enhance.
So far I've tried (for Node.js) passport-saml and samlify, but neither have great documentation. I've also used python3-saml and it worked well. We're mainly a JavaScript shop, at least in my department, so Node.js would be preferable.3 -
I'm about to put an iframe in an Angular app that displays a Java applet. This isn't development, it's a suicide note10