Joined devRant on 9/24/2017
Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
Just heard one of those little tidbits in passing about a detail for a spec which will require me to restructure the db and rework one of the core functions of the api and user client. Turns out one of the points in the original spec that was an "always" was actually a "usually, but-".
"sure, I'll see if I can get started on it tomorrow" because I'll spend today crying.
Not in prod today, but was part of a group project that we handed in and which got us an A.
The project was to write a PID controller for a robot that would drive along a track using a sensor to follow markings on the floor. During development we were drawing graphs of the PID parameters and sensor input every tick, which caused a bit of lag but no worries - we'll turn it off for the trial runs.
Imagine our pikachu shock meme when we turned off the graphs and our calibrations were suddenly *way* off since we had been oversteering all along to compensate for the lag.
There wasn't enough time to optimize it before the deadline and using sleeps didn't produce the same "type" of lag, so we just made the graph minimize itself when it opened. To this day I wonder if the professor ever saw it or if we got the A despite it.
I couldn't figure out why my server went down all of a sudden.This seems suited for this week's rant.
Expert fullstack solutions architect here.3
So here's a rant I never thought I'd write.
I'm pretty happy with my current job. I'm working for a small non-tech business where I'm making a complete solution by myself. It's pretty chill just coding away all day and being my own project owner and manager.
The iffiest aspect is that my boss(es) don't know what (or if) I'm working on when I'm implementing a vital logging system, fixing bugs that cropped up due to implementing necessary, baseline security, and so on. They see a login page and figure the entire project is shippable, and when the login breaks because I'm configuring the wsgi for https the reaction is "it worked, why mess with it; just put it how it was". But I digress.
Today I got a job offer with a pay increase that made me exclaim "are you fucking serious" irl, in a business with a more professional environment consisting of senior devs, and with benefits I had never heard of.
I can't not accept, but that means just legacying the entire project I'm working on here. They'd basically be left with nothing after shelling out wages for me for these few months. Keep in mind this is a fairly small business who debated if they could afford this to begin with.
Disregarding whether they are willing/able to make it hard for me to leave, it stabs me in my scrubby dev soul to up and leave on a personal level.
They had a 3d printer at the other place though.15
I used to associate logitech with quality, something you could spend a little more on and feel comfortable knowing you made a safe and robust choice.
For quite a few years now they've done that gamer branding thing where I'd be embarrassed to have that stuff seen on my desk - at ridiculous prices and for features I won't use. Their consumer/office grade stuff is alright but unremarkable.
I'll gladly pay more for quality and I'm super happy with my Das keyboard, but I switch out my mouse probably every year. I can't deal with mushy buttons and I'm not paying extra for marketing, branding, and rgb lights that I'll then be spending time on trying to disable properly.
I digress, but I'm legitimately curious to try a trackball. I know people kneejerk at it, but I've heard from a couple of people who prefer it when they primarily use their keyboard anyway.1
Just spent a week creating a distributed api architecture which I found out won't work due to a singular issue which can't be solved - not unless I hack stuff to a degree where I might as well write my own frameworks.
I've been aiming the user application's requests towards my wsgi, which based on a custom header will proxy it towards the correct api. Each customer base has their own api and dataset, but they all visit the same address.
I've handled CORS manually, just picking up when there's an options request, asserting the origin, then returning the correct headers. Cool everyone's happy. Turns out, socket.io includes session id and handshake info as part of their options preflight, which I can't pair with my api header (or cookie, for that matter) which means my wsgi doesn't know where to send it. You get a 400! You get a 400! You get a 401! </oprah>
So my option is to either roll my own sockets engine or just assign each api to a subdomain or give it some url prefix or something. Subdomains are probably pretty clean and tidy, but that doesn't change having to rewrite a bunch of stuff and the hours I spent staring at empty headers in options preflights.
At least this discussion saved me some time in trying to make it work. One of my bad habits is getting in those grooves of "but surely... what the hell, surely there's a way. There has to be"
Probably the smallest, most inconsequential rant I'll write here, but - is it that hard for websites with a main search input or login field on their landing page to put its tab index to 1?
I mean, my mouse is all the way over *there* ~
I've been getting a lot of mixed input on this lately and I'm curious to gauge the public opinion on it.
For key identifiers in key/value pairs (eg. days of the week, high/med/low, etc), is it preferable with semantic string naming wherever possible, or are int enums usually preferred for being more clean and robust?
I suppose it's a case of "it depends". I tend to use stringed keys myself since they are more readable but I do think it's a hassle with asserting case insensitivity and how the keys can be accessed as properties - "sometimes, probably".
People often comment on it when they see it, and it turns into this weird mutual "why strings?" vs. "why ints?".4
I wasn't happy with one of our UI views for editing a database query that consisted of about 50 fields ("editing" being the operative term here, not just viewing. It had to be two-way). Everything was hardcoded and defined manually, with each block of ~10 lines being repeated and mostly identical apart from the occasional double inline field and name of the variable. It had "just ended up that way" over time due to the variable names in the UI being different than the names of the variables that came from the API.
I decided to overhaul it all where I defined the different input components and which fields should be included, then made a function which would generate the page based on these definitions. It was about 500 lines of modularized functions and classes where the class for the actual view was about 50 lines- compared to the 1400+ lines of the previous version.
But, it didn't work. It should, but it "just didn't". There was no error. All I got was a blank, solid white page. I could make a drastic change or try something completely different and I would get the same error, same blank page. API fetch succeeded, value assignments succeeded, the object exists, but if you iterated it it was... empty.
I started getting really discouraged that I had made it too abstract. Maybe I actually made it more complex and unreadable than before. Maybe just hardcoding it all was the better solution after all. Maybe I had gone against KISS and overdesigned it.
I was up pretty late and everyone had gone home. When the last guy left there was that mood where "yeah if I can't make this work we'll just use the current version...".
Turns out I had tried iterating over a property of the set of fields to render, rather than the entire collection. In the old method the variables were a member of an object, but now they were its own object, a change I had made to isolate the set of values which were to be viewed/edited and make them easier to pass back and forth. This member existed since I hadn't cleaned it out yet, but it was empty.
I had been banging my head against this for a whole day and I was ready to admit I had made a mistake and wasted my time before discarding it all, but then I backspaced this one property and the interface went from empty to rendering perfectly and with all functionality intact. I swear god rays were coming out of my screen.
I'd be ok with monthly topics. I consider myself an active devrant user but sometimes the weeks fly by before I have a chance to check up on it.2
I unironically can't figure out how to upgrade to devRant++ on desktop. It's cool that you don't want to nag but cmon!
I did find it in the mobile app. Is it just not implemented in the browser view?3
I'm not even in the mood to speculate how much time I've spent trying to convert this certain datatype from one of the frameworks we're using. I couldn't find it in the documentation, google and SO says to use a member which just doesn't work and seems to be deprecated.
I started writing my own converter which got way bigger than what I was comfortable with due to all the special cases needing separate checks and handling.
I eventually came across a function which does exactly what I needed. It was the one suggested by said googles and SOs, it was just... recently renamed.
Not sure how to describe this sense of "yay, I found the proper solution!" and "are you fucking kidding me". Thank goodness for devRant.
Been spending the past two days setting up linux on my new work laptop which happens to have a hybrid nvidia GPU, in addition to requiring a usermade driver to get the docking station working. Both the (proprietary!) nvidia driver and displaylink driver demanded to rebuild the kernel, and the nvidia ones crashed during it.
I had no idea it could be this much of a hassle. Had I bought it myself I would have taken it back. Never buying a laptop with a discrete GPU ever again. Sweet butts.
"Engineers don't memorize documentation. They know how to use it."
Programming felt insurmountable to me before I started with it. This phrase blew my mind and changed my approach entirely.3
Sweet mother of butts, I can't believe I forgot about the Windows XP media player. Seeing it again I can't believe it ever existed.8
The goal of one of my CS assignments was to learn about makefile, and during the last minute - literally while I was waiting for the professor to come over - I was just making everything presentable and getting rid of noise. I figured putting rm -r *.* in clean would be a good way to get rid of all the debug output.
To be fair, my project folder was indeed pretty clean afterwards.7
It's oddly revitalizing to configure my IDE. I'd be hard pressed to explain how satisfying it is to organize my settings.json and clean up my ignores.
During my first semester of CS we were mostly using MatLab for basal scripting - assigning variables, learning about scope, that type of thing. I was excited to start learning programming but wanted to actually make something rather than reversing arrays and incrementing counters for weeks.
I discovered the image() function which takes a float matrix and displays it as an image. I generated my arrays of random numbers and made a simple nested loop where I iterated over each element, averaging it with its neighbours, and - it worked on the first run! I made a freaking noise and blur filter!
That rush of planning it out, making it, and seeing it work I think is my main drive in coding. All the hours of undefined-but-they-are-tho import paths and mystery segfaults are worth it once there is that moment of "it lives!".
The actual struggle of working in a non-english team who prefers to keep their variables named in our native language. Currently trying to think of a better way to phrase 'sjaafoerAerend' as dropping any part of it makes it more vague.
Is this a thing in asian countries as well? I'm guessing it's more common to just stick to english naming there.
I figure it's safe to assume that anyone who will see the code are going to be proficient in english. If they aren't, natively named variables isn't going to make a difference. Hell I even write my personal reminder comments in english.4
I'd like to propose that we pivot the saying "there are no bad ideas" into " it's okay to have bad ideas".
Having worked with web frontends the last couple of years I can confirm with reasonable certainty that there are indeed several bad ideas, and "no bad ideas" is not a veto that will make me implement a 3d carousel calendar.1
I honestly can't remember which I used first, but my dad had a monochrome apricot with snake and a Texas instruments with Parsec. I think we still have the TI lying around somewhere.
I remember it being something we shared an interest in and it's a shame most parents today view games as a babysitting tool at best.
Nothing makes me - on a regular basis - doubt myself more than when I'm reading documentation and finding the arguments and variables I need, but not for the life of me finding the syntax or which context I should be using it in.
It's as if it's assumed to be common knowledge and I dread being "that guy" to ask someone about it. I feel like such a chump opening a new tab and googling for examples.
Just had a first meeting with a customer who wants me to upgrade their system that a company spent one year making. He gave me the .exe and was surprised I couldn't just edit it.
He was cool about it when I explained, but it's tough to break it to someone how much more time it will take than they had anticipated.