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
Search - "consistent inconsistent"
-
Timezones. So, general rules are:
1. If you don't store timezone, always use and assume UTC. Databases, backends, whatever you use, all time must be kept be in UTC.
2. If you store timezones, ensure you store them everywhere and don't drop them anywhere.
3. It's always better to ignore backend server time in favor of database's `now().` Having a single source of truth makes time consistent (if it's the same database, obviously). If you combine backend time and database time, you likely get a violation of causality.
I've just spent a couple of hours investigating "weird random one-hour time drifts on updates." Guys violated all three rules above:
- they didn't store the timezone;
- their servers had inconsistent timezones. Java was in +XX., while the server itself in UTC. On one host, they forgot to put JVM in the same timezone;
- they dropped the timezone because they thought it was the same everywhere, so there was no point in serializing it.13 -
When it comes to the indentation or look I am fully consistent.
But when it comes to naming I am inconsistent like a crack whore telling she's clean.
Camelcase, underscores inconsistent variable and function names. I use all of them within a single file. On some days I even switch languages.
I truly am miserable in code consistency. Is there any good advice to keep the code consistent?10 -
I don't know if I'm being pranked or not, but I work with my boss and he has the strangest way of doing things.
- Only use PHP
- Keep error_reporting off (for development), Site cannot function if they are on.
- 20,000 lines of functions in a single file, 50% of which was unused, mostly repeated code that could have been reduced massively.
- Zero Code Comments
- Inconsistent variable names, function names, file names -- I was literally project searching for months to find things.
- There is nothing close to a normalized SQL Database, column ID names can't even stay consistent.
- Every query is done with a mysqli wrapper to use legacy mysql functions.
- Most used function is to escape stirngs
- Type-hinting is too strict for the code.
- Most files packed with Inline CSS, JavaScript and PHP - we don't want to use an external file otherwise we'd have to open two of them.
- Do not use a package manger composer because he doesn't have it installed.. Though I told him it's easy on any platform and I'll explain it.
- He downloads a few composer packages he likes and drag/drop them into random folder.
- Uses $_GET to set values and pass them around like a message contianer.
- One file is 6000 lines which is a giant if statement with somewhere close to 7 levels deep of recursion.
- Never removes his old code that bloats things.
- Has functions from a decade ago he would like to save to use some day. Just regular, plain old, PHP functions.
- Always wants to build things from scratch, and re-using a lot of his code that is honestly a weird way of doing almost everything.
- Using CodeIntel, Mess Detectors, Error Detectors is not good or useful.
- Would not deploy to production through any tool I setup, though I was told to. Instead he wrote bash scripts that still make me nervous.
- Often tells me to make something modern/great (reinventing a wheel) and then ends up saying, "I think I'd do it this way... Referes to his code 5 years ago".
- Using isset() breaks things.
- Tens of thousands of undefined variables exist because arrays are creates like $this[][][] = 5;
- Understanding the naming of functions required me to write several documents.
- I had to use #region tags to find places in the code quicker since a router was about 2000 lines of if else statements.
- I used Todo Bookmark extensions in VSCode to mark and flag everything that's a bug.
- Gets upset if I add anything to .gitignore; I tried to tell him it ignores files we don't want, he is though it deleted them for a while.
- He would rather explain every line of code in a mammoth project that follows no human known patterns, includes files that overwrite global scope variables and wants has me do the documentation.
- Open to ideas but when I bring them up such as - This is what most standards suggest, here's a literal example of exactly what you want but easier - He will passively decide against it and end up working on tedious things not very necessary for project release dates.
- On another project I try to write code but he wants to go over every single nook and cranny and stay on the phone the entire day as I watch his screen and Im trying to code.
I would like us all to do well but I do not consider him a programmer but a script-whippersnapper. I find myself trying to to debate the most basic of things (you shouldnt 777 every file), and I need all kinds of evidence before he will do something about it. We need "security" and all kinds of buzz words but I'm scared to death of this code. After several months its a nice place to work but I am convinced I'm being pranked or my boss has very little idea what he's doing. I've worked in a lot of disasters but nothing like this.
We are building an API, I could use something open source to help with anything from validations, routing, ACL but he ends up reinventing the wheel. I have never worked so slow, hindered and baffled at how I am supposed to build anything - nothing is stable, tested, and rarely logical. I suggested many things but he would rather have small talk and reason his way into using things he made.
I could fhave this project 50% done i a Node API i two weeks, pretty fast in a PHP or Python one, but we for reasons I have no idea would rather go slow and literally "build a framework". Two knuckleheads are going to build a PHP REST framework and compete with tested, tried and true open source tools by tens of millions?
I just wanted to rant because this drives me crazy. I have so much stress my neck and shoulder seems like a nerve is pinched. I don't understand what any of this means. I've never met someone who was wrong about so many things but believed they were right. I just don't know what to say so often on call I just say, 'uhh..'. It's like nothing anyone or any authority says matters, I don't know why he asks anything he's going to do things one way, a hard way, only that he can decipher. He's an owner, he's not worried about job security.13 -
So I saw this argument between two intellectual titans on Quora about C vs C++. It was pretty amusing lol.
First Guy: “C programmers are the Amish! They’re afraid of change. C++ is a better C because it repairs it insufficiencies like classes and namespaces.”
Second guy: “C is fairly consistent, while C++ is inconsistent in many places. It performs so many allocations without you even knowing it. It’s complexity is very distracting !”10 -
A linux distro with all popular apps rewritten from scratch to use a single UI toolkit and consistent default keymaps, for a smoother desktop experience.
It's one of the reasons I have a tough time switching full-time because all the apps I need use so many different toolkits/versions/random keymap variations (inconsistent font-sizing, ctrl+tab vs ctrl+pgup, etc) that even the thought of switching makes my head spin.
Love the way GNOME's been going though (Except for their default keymaps. Ctrl+PgUp for Next Tab? Srsly?), and KDE is getting more consistent.
And yes, I know you can modify keymaps, but just wish they'd stick to widely used ones by default).1 -
Got a new job a couple days ago, cleaning cars at a dealership. One of my friends works there doing the same and he told me I should apply.
The hourly rate isn't much more than I was making at McDonald's, but I have very consistent hours now. I'm only scheduled for 35 hours a week, but normally we don't get out on time. On Friday we didn't get out until an hour after I was scheduled to leave, so chances are I'll get overtime here.
Basically all I wanted in a job was to have consistent hours. Come in at 2, leave at 8, rinse and repeat. McDonald's was basically, come in at 4, leave at 10, maybe stay until 11. Next day you're coming in at 7 and closing, next day you normally work but now you don't. Just very inconsistent, and basically no chance at full time unless you're a manager's favorite.
I like the new job, I get to drive nice cars and clean them, and that's basically it. I got to drive a car that's the same model as my mom's car, but 7 years newer (she has a 2011, the one I drove was a 2018). Even got to drive the exact model of the car that hit me a few months ago (same year too).
I've never been a huge car guy, but I really like it there. There's just something very satisfying about driving a brand new car. Also, at McDonald's I wasn't allowed to have a beard. At the new job they don't give a shit, as long as I work.3 -
TL; DR;
I'm one with code and the code is one with me.
Everything in my life has been inconsistent and as soon as I start building expectations from someone or something, it disappoints. Be it my friends (😂😂) or my ex girlfriend or my studies or my college or my professors or work, or food (sometimes).
Coding, or programming, has been the only consistent and non disappointing thing since 2010 for me. It just works. If I write a wrong program, I know its why and where its wrong and then fixing it works. Sometimes it works in one go. And sometimes is works beyond my expectations. Its like coding chose me rather than me chosing coding. -
F U browser vendors!
Why is it, that we have specifications for HTML, JS, CSS, etc and we have browsers for more, than 10 years now AND THEY STILL CANNOT MAKE SOMETHING CONSISTENT THROUGHOUT EVERY PLATFORM!
An event is not being triggered somewhere? No problemo. An extra event there? Nay, still okay. Inconsistent state for the same operation on different platforms? Cool, simply cool!
But instead of fixing these shitty things, they introduce bullshit on top of this, like a media element requiring a user interaction to be able to play content.4 -
I’m one month into my first job as a C++ dev for a company with a MASSIVE code base and I still am struggling with having a consistent build environment, sometimes spending almost 3 hours a day troubleshooting because my environment is always inconsistent. I’ve barely gotten my hands into the code nor pushed anything because I’m stack tracing through thousands of compiled dlls through process of elimination to identify a bug in the software.
Is this normal? What am I doing wrong? I’m freaking out that I haven’t shown any productivity to this company.1 -
JPA my friend ... JPA why are you like this? JPA why do hate me so much? JPA, let's have a word ...
How come you are so far away from real-world problems, so cumbersome to use, so ugly (criteria API), so wrong and inconsistent?
Oh, what it's all your parents fault? Oh come, on that can't be, right? Did you have a bad childhood?
Your parent's were fucking crack-smoking maniacs which didn't know a single bit about actual databases?
They design you as an API without actually trying you out in the wild? And then they patched up together with some essential DB stuff, like friggin indexes? Not even tried to make this API consistent nor really functional?
Oh poor, you little JPA ... -
On science and religion. Inspied by a comment in another rant, credits to @Commodore and @cjbatz
According to Godel's incompletness theorems, aritmetics is incomplete and inconsistent. Therefore, any science based on aritmetics (dude, like, every) is also.
Therfore, as a mathematician, I must accept that there are things that cannot be proven by current science, and that there are statements that are true and false at the same time in current science.
So, science can't prove religious beliefs? It cant prove P vs NP either. It might someday. Science couldn't prove earth wasn't flat for a looong time. Or Pythagoras theorem.
But more importantly, if science can prove something, doesn't mean it can't prove the exact oposite.
This way of thinking allows for any and all ridiculous beliefs, under the shield of "it might be proven one day" or "doent't mean opposite isn't true also" but kerp in mind that there are complete and consistent sciences and proofs in them. Check if something's been proven to exist or not exist without doubt.11 -
Why are apple so fucking back assward and stubborn when it comes to their app review process?
So, at work I made an app. It's a simple one, but it's an app.
It makes it so that the user doesn't have to enter their credentials to sign in to a system developed on our platform.
If you give it a hard oded config it will only connect to that server, if not, it fetches a list of available servers and the user has to select which they want to connect to.
I've uploaded basically the same fucking app thrice, twice with and once without a config.
Two of them when somewhat smoothly through the review, but the last one has been stuck for almost two fucking months! And guess what it's one of the ones with a config!?!
How is that in any way consistent?
They fill us with shit like "your screenshots aren't representative", so I update them.
They go "this is not an AP for the public", I tell them I give less than a steaming pile of fresh dung from a retarded donkey, the intended users are freelancers, so just fucking greenlight it.
Then they go "your screenshots aren't representative", so I tell them to pound sand or specify which screenshot is wrong or what they think is missing.
How are they so fucking inconsistent with their process? Isn't is this process that they used as of defence for their shittastic monopoly, that they don't want to call a monopoly?
I'm so fucking tired.5