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 - "database schema"
-
What is it with clients who have never even seen a single line of code in their entire lives telling me how long they believe a certain change request should take to code.
I mean, what if I told you that your "seemingly simple enough" change needed an update to 36 class files, 9 oracle stored procedures AND several database schema changes. Also, who the fuck is going to perform a regression test to make sure I didn't break anything? Your Uncle Bob??6 -
🍿🍿 pull up a chair and get comfy. This was a few years ago and anger has filled some details, so bear with me...
One day, during one of rare afternoons off of work, I was in the library to work on a group project for school. This was maybe a month before it was due, so we were tracking for decent progress and one less stressor over finals. It was about 80° F out, with the perfect breeze for the beach, but school comes first.
I'm team lead (which is terrifying, but less important) and my bro C shows up early to be ready to go on time because he's professional. I'M SO BAD I FORGOT DOUCHEBAGS NAME, so he's A (for asshole), shows up AN HOUR AND 15 MINUTES LATE. But it's not the end of the world, C and I worked around our database schema (which A sent us and we approved), so we could iron out kinks as we went.
A gets there... Fucking finally.
Fucker didn't have the database built (had 2 months to do it, we all agreed on schema a month prior. We're trying to be the adults our ages claim is to be).
*breathe in, count to 10* not a problem, A, just go ahead and start it now so we can at least check what we have.
Ok, my queen, I'll have it done in 10 minutes...
🤔🤔
We needed an id (sku... Which, in 99.9999% of companies is numeric), a short name (xBox one, Macbook, don't smart tv), a description and a price (with 2 decimals). All approved by all 3 of us.
His sku ranges from 3 to 9 ALPHA NUMERIC CHARACTERS, the names were even more generic than expected (item1, item 2, Item_3), no description, and he somehow thought US currency had 5 decimal places!!! (it's more accurate...)
There was an epic, royal, and expensive fight scene in the library (may have been during the Lenten season I decided to give up caffeine AND fast for 40 days to prove a point to an ass wipe of a history teacher, don't recall). I made him cry, he failed the class because C and I wound up fixing everything he touched (graded by commits, because it was also an intro to git, but also, a classmate saw it all), and I had to buy multiple people coffee for yelling in the library.
A tried making out buttons work (I was fed up and done thinking for the day, so moved to documentation), but he fucked those up. I then made those worse by having nested buttons, but I deleted all his shit and started over and fixed it.
I then cried, but C and I survived and have each others backs still.11 -
So I took on a fairly big project and poured my heart and soul into it, was the biggest thing I did yet. I kept on sending beta's to the customer after each change for review! Kept on insisting that they review it, the answer was always "this looks amazing keep doing what you're doing"! After I finished and pushed everything to production.
They didn't use it for nearly 6 months! And then out of the blue they call me saying that half of the app is wrong.. WTF? Where was this information during testing! I informed them that the changes would take some time since I need to do migrations and change the whole database schema.
In which they replied "but you already finished it once won't changing things make it easier? We shouldn't pay for your mistakes"
I don't know how I handled that but they should be thankful they were half way across the country 😠😠😠😠3 -
I've seen several rants about dumb/useless teachers, college and the CS degree studies; today is a good day to vent out some "old" memories.
Around two semesters ago I enrolled in a Database seminar with this guy, a tall geek from the 80's with a squeaky voice, so squeaky mice could had an aneurysm if they listened to him.
Either way this guy was a mess, he said he was an awesome coder, that we were still "peasants" when it came to coding, that relational databases had nothing on him since he was an awesome freelancer and did databases every day, that we had to redo the programming course with him and with his shitty, pulled out of the ass own C++ style guide with over 64 different redacted rules.
He gave us sample code of "how it should be done" in Java...it ain't my favorite language but fuck me a fucking donkey could have written better code with his ass!! He even rewrote Java's standard input function and made it highly inefficient. He still wrote in a structural paradigm in OOP languages! And he dared to make this code reviews were he would proyect someone's code and mock it in front of the class as he took off points, sometimes going to the negative realm (3,2,1,0,-1...)
But you know what's shittier? That he actually didn't even attend, 90% of the time, it was literally this:
> Good morning class
> Checks attendance. . .
> I'll be back, I'm going to check in...
> 1 hour 45 minutes later (class was 2 hrs long) - comes back
> do you have any doubts?
> O.o no...? I'm ok.
> We're done
Not only that, he scheduled from 4 to 17 homeworks throughout the week, I did the math, that was around 354 files from everyone; of course he didn't check them, other students from higher semesters did and they gained each point taken from students making students from lower semesters get the short end of the stick.
How did I pass? He didn't understood my code or database schema and he knew he couldn't fail me as he had no ground to stand on.
Thanks for listening, if you got to the end of this long ass post and had a similar experience I'd love to read it.13 -
Well, it wasn't fun, but I switched jobs this month. And sadly, it was mostly because my old company started building custom applications for our larger customers. Now, normally that wouldn't be too bad (other than the fact that it distracts us form working on our main product...) but... it was decided that we would use the back end of our user-generated forms module as the data storage layer. Someone outside of my department thought it would be a great idea, and my boss kinda just rolled over without a fight because he always just figures he can "make it work" if he works hard enough...
You shoulda seen the database and SQL code...
Because of that decision, everything took at least 3x as long to write and there was always the looming possibility that the user could change the schema on a whim and break the app.
I think the reasoning behind it was to try and keep the customers tied to the aging flagship product (with a pricy subscription model), but IMO, it was not with it. Our efforts could've had much greater impact somewhere else. Nobody seemed to care what I thought about it though...
I had to start over as a front-end dev, but I'm trying to look on the bright side and seeing it as an opportunity to sharpen my skills in that area. I'm already learning a lot. And although it's a little scary at times, it's also so refreshing to work at a place where I know I'm not the smartest guy in the room.
To the future!5 -
Coworker: so once the algorithm is done I will append new columns in the sql database and insert the output there
Me: I don't like that, can we put the output in a separate table and link it using a foreign key. Just to avoid touching the original data, you know, to avoid potential corruption.
C: Yes sure.
< Two days later - over text >
C: I finished the algo, i decided to append it to the original data in order to avoid redundancy and save on space. I think this makes more sense.
Me: ahdhxjdjsisudhdhdbdbkekdh
No. Learn this principal:
" The original data generated by the client, should be treated like the god damn Bible! DO NOT EVER CHANGE ITS SCHEMA FOR A 3RD PARTY CALCULATION! "
Put simply: D.F.T.T.O
Don't. Fucking. Touch. The. Origin!5 -
So, there was some project going around universities for online lab and connecting students to learn together. My school saw it as opportunity and I was appointed to make a simple web app doing just that.
T - teacher
First there was the database.
T1: "I think that you can design the tables better"
Me: "This is the most logical way, but sure, I can modify it. Although, T2 told me to do it this way."
T1: "Just do what I said"
And I did.
T2: "Why did you change the design, I gave you the schema, didn't I?"
Oh I was so fucking pissed. I'm skipping classes so I can work on this fucking piece of shit and this is what I get. Two self fucking centered idiots.
I resolved situation somehow, then came the frontend. I was told that the T3 will do it I just have to connect it to my backend, great.
So this so called "Teacher of Web design and development" downloaded fucking bloated bootstrap template with scripts longer than my future. It took 2 minutes to just load the html page from local drive.
I told T2 that I will make design it from scratch and I will try to make it look the same. I finished it somehow. Loaded in seconds, worked superb. First thing T1 told me: "Just roll back the design"
He didn't even listen to what I had to say.
Ohh boii, I fucking lost two months on your piece of shit garbage app, and what I have from it? Fucking bag of dicks. The thing is that I have another year with those pricks.
If this is what the industry is like, you guys deserve a medal.6 -
OMFG I don't even know where to start..
Probably should start with last week (as this is the first time I had to deal with this problem directly)..
Also please note that all packages, procedure/function names, tables etc have fictional names, so every similarity between this story and reality is just a coincidence!!
Here it goes..
Lat week we implemented a new feature for the customer on production, everything was working fine.. After a day or two, the customer notices the audit logs are not complete aka missing user_id or have the wrong user_id inserted.
Hm.. ok.. I check logs (disk + database).. WTF, parameters are being sent in as they should, meaning they are there, so no idea what is with the missing ids.
OK, logs look fine, but I notice user_id have some weird values (I already memorized most frequent users and their ids). So I go check what is happening in the code, as the procedures/functions are called ok.
Wow, boy was I surprised.. many many times..
In the code, we actually check for user in this apps db or in case of using SSO (which we were) in the main db schema..
The user gets returned & logged ok, but that is it. Used only for authentication. When sending stuff to the db to log, old user Id is used, meaning that ofc userid was missing or wrong.
Anyhow, I fix that crap, take care of some other audit logs, so that proper user id was sent in. Test locally, cool. Works. Update customer's test servers. Works. Cool..
I still notice something off.. even though I fixed the audit_dbtable_2, audit_dbtable_1 still doesn't show proper user ids.. This was last week. I left it as is, as I had more urgent tasks waiting for me..
Anyhow, now it came the time for this fuckup to be fixed. Ok, I think to myself I can do this with a bit more hacking, but it leaves the original database and all other apps as is, so they won't break.
I crate another pck for api alone copy the calls, add user_id as param and from that on, I call other standard functions like usual, just leave out the user_id I am now explicitly sending with every call.
Ok this might work.
I prepare package, add user_id param to the calls.. great, time to test this code and my knowledge..
I made changes for api to incude the current user id (+ log it in the disk logs + audit_dbtable_1), test it, and check db..
Disk logs fine, debugging fine (user_id has proper value) but audit_dbtable_1 still userid = 0.
WTF?! I go check the code, where I forgot to include user id.. noup, it's all there. OK, I go check the logging, maybe I fucked up some parameters on db level. Nope, user is there in the friggin description ON THE SAME FUCKING TABLE!!
Just not in the column user_id...
WTF..Ok, cig break to let me think..
I come back and check the original auditing procedure on the db.. It is usually used/called with null as the user id. OK, I have replaced those with actual user ids I sent in the procedures/functions. Recheck every call!! TWICE!! Great.. no fuckups. Let's test it again!
OFC nothing changes, value in the db is still 0. WTF?! HOW!?
So I open the auditing pck, to look the insides of that bloody procedure.. WHAT THE ACTUAL FUCK?!
Instead of logging the p_user_sth_sth that is sent to that procedure, it just inserts the variable declared in the main package..
WHAT THE ACTUAL FUCK?! Did the 'new guy' made changes to this because he couldn't figure out what is wrong?! Nope, not him. I asked the CEO if he knows anything.. Noup.. I checked all customers dbs (different customers).. ALL HAD THIS HARDOCED IN!!! FORM THE FREAKING YEAR 2016!!! O.o
Unfuckin believable.. How did this ever work?!
Looks like at the begining, someone tried to implement this, but gave up mid implementation.. Decided it is enough to log current user id into BLABLA variable on some pck..
Which might have been ok 10+ years ago, but not today, not when you use connection pooling.. FFS!!
So yeah, I found easter eggs from years ago.. Almost went crazy when trying to figure out where I fucked this up. It was such a plan, simple, straight-forward solution to auditing..
If only the original procedure was working as it should.. bloddy hell!!8 -
TLDR: crappy api + idiot ex client combo rant // devam si duška
I saw a lot of people bitching about APIs that don't return proper response codes and other stuff..
Well let me tell you a story. I used to work on a project where we had to do something like booking, but better..crossbreed with the Off&Away bidding site (which btw we had to rip off the .js stuff and reverse engineer the whole timer thingy), using free versions of everything..even though money wasn't an issue (what our client said). Same client decided to go with transhotel because it was sooooo gooood... OK? Why did noone heard of them then?
Anyhow, the api was xml based.. we had to send some xml that was validated against a schema, we received another that was supposed to be validated againts another schema.. and so on and so on..
...
...
supposed..
The API docs were nonexistent.. What was there, was broken English or Spanish.. Even had some comments like Add This & that to chapter xy.. Of course that chapter didn't even exist yet. :( And the last documentation they had, was really really old..more than a year, with visible gaps, we got the validation schemas not even listed in the docs, let alone described properly.
Yaaay! And that was not everything.. besides wrong and missing data, the API itself caused the 500 server error whenever you were no longer authenticated.
Of course it didn't tell you that your session was dead.. Just pooof! Unhandled crap everywhere!
And the best part?! We handled that login after inspecting what the hell happened, but sent the notification to the company anyways.. We had a conf call, and sent numerous emails explaining to them what a 'try catch' is and how they should handle the not authenticated error <= BTW they should have had a handled xml response for that, we got the schema for it! But they didn't. Anyhow, after two agonizing days talking back and forth they at least set up the server to be available again after the horrified 500 error. Before, it even stopped responding until reset (don't ask me how they managed to do that).
Oh yeah, did I mention this was a worldwide renown company?! Where everybody spoke/wrote English?! Yup, they have more than 700 people there, of course they speak English! <= another one of my ex clients fabulous statements... making me wanna strangle him with his tie.. I told him I am not talking to them because no-one there understood/spoke English and it would be a waste of my time.. Guess who spent almost 3 hours to talk to someone who sounded like a stereotypical Indian support tech guy with a flue speaking Italian?! // no offence please for the referenced parties!!
So yeah, sadly I don't have SS of the fucked up documentation..and I cannot post more details (not sure if the NDA still holds even though they canceled the project).. Not that I care really.. not after I saw how the client would treat his customers..
Anywayz I found on the interwebz some proof that this shitty api existed..
picture + link: https://programmableweb.com/api/...
SubRant: the client was an idiot! Probably still is, but no longer my client..
Wanted to store the credit card info + cvc and owner info etc.. in our database.. for easier second payment, like on paypal (which he wanted me to totally customize the payment page of paypal, and if that wasn't possible to collect user data on our personalized payment page and then just send it over to paypal api, if possible in plaintext, he just didn't care as long as he got his personalized payment page) or sth.... I told the company owner that they are fucking retards if they think they can pull this off & that they will lose all their (potential) clients if they figure that out.. or god forbid someone hacked us and stole the data.. I think this shit is also against the law..
I think it goes without saying what happened next.. called him ignorant stupid fucktard to his face and told him I ain't doing that since our company didn't even had a certificate to store the last 4 numbers.. They heard my voice over the whole firm.. we had fish-tank like offices, so they could all see me yelling at the director..
Guess who got laid off due to not being needed anymore the next day?! It was the best day of my life..so far!! Never have I been happier to lose my job!!
P.S. all that crap + test + the whole backand for analysis, the whole crm + campaign emails etc.. the client wanted done in 6 months.. O.o
P.P.S. almost shat my pants when devRant notified my I cannot post and wanted to copy the message and then everything disappeard.. thank god I have written this in the n++ xDundefined venting big time issues no documentation idiot xml security api privacy ashole crappy client rant11 -
I was asked to look into a site I haven't actively developed since about 3-4 years. It should be a simple side-gig.
I was told this site has been actively developed by the person who came after me, and this person had a few other people help out as well.
The most daunting task in my head was to go through their changes and see why stuff is broken (I was told functionality had been removed, things were changed for the worse, etc etc).
I ssh into the machine and it works. For SOME reason I still have access, which is a good thing since there's literally nobody to ask for access at the moment.
I cd into the project, do a git remote get-url origin to see if they've changed the repo location. Doesn't work. There is no origin. It's "upstream" now. Ok, no biggie. git remote get-url upstream. Repo is still there. Good.
Just to check, see if there's anything untracked with git status. Nothing. Good.
What was the last thing that was worked on? git log --all --decorate --oneline --graph. Wait... Something about the commit message seems familiar. git log. .... This is *my* last commit message. The hell?
I open the repo in the browser, login with some credentials my browser had saved (again, good because I have no clue about the password). Repo hasn't gotten a commit since mine. That can't be right.
Check branches. Oh....Like a dozen new branches. Lots of commits with text that is really not helpful at all. Looks like they were trying to set up a pipeline and testing it out over and over again.
A lot of other changes including the deletion of a database config and schema changes. 0 tests. Doesn't seem like these changes were ever in production.
...
At least I don't have to rack my head trying to understand someone else's code but.... I might just have to throw everything that was done into the garbage. I'm not gonna be the one to push all these changes I don't know about to prod and see what breaks and what doesn't break
.
I feel bad for whoever worked on the codebase after me, because all their changes are now just a waste of time and space that will never be used.3 -
TFW you realize you're the first dev at your company to ever run a database schema comparison between dev and live.1
-
We just got into a malicious bots database with root access.
So guard duty gave us some warnings for our tableau server, after investigating we found an ip that was spamming us trying all sorts. After trying some stuff we managed to access their MySQL database, root root logged us in. Anyway the database we just broke into seems to have schemas for not only the bot but also a few Chinese gambling websites. There are lots of payment details on here.
Big question, who do we report this to, and what's the best way to do so anonymously? I'm assuming the malicious bot has just hyjacked the server for these gambling sites so we won't touch those but dropping the schema the bot is using is also viable. However it has a list of other ips, trying those we found more compromised servers which we could also log in to with root root.
This is kinda ongoing, writing this as my coworker is digging through this more.11 -
Having to do database schema changes manually is HELL. Management seems to not be taking seriously enough the need to stop and implement migrations, my boss/lead dev suggested me to look up how to adopt/implement them in my own free time, instead of stopping all the feature implementing to do this VERY IMPORTANT, CRUCIAL CHANGE. Now I am the retard who takes too much time to do simple changes in the database.
Maybe I am retarded after all.7 -
10 year anniversary 'celebration' for a couple of employees (one dev, one a DBA) and the VP of the department was saying kind words about them, talking about the 'good old days'.
VP to the DBA: "I apologize, when you started, you walked into my database architecture. I didn't know that much back then and never thought about the architecture much beyond a few years. Its amazing my design has lasted over 20 years and triple digit business growth..blah blah blah"
Inner voice: "Mother F-er!...My database was designed IN SPITE of your meddling and demanding to create 1,500 field tables. Shut the F up you egotistical bastard!"
I can't even count how many times I had to stop him from, for example, adding a 'ProductID' field to a Customer table.
Me: "Why did you add a product id field?"
VP: "How else will we know what product the customer wants to buy?"
Me: "You mean like a wish list? What if the customer wants more than one product?"
VP: "Oh, that’s easy, we'll create more fields when that happens. ProductID2. Microsoft made it really easy to add fields."
Me: "We already have a wish list table schema. Customer can have as many wish lists and as many products as they want."
VP: "I don't understand. All I want is a field for me to store the product I'm buying. I don't know why you make this so hard, its just one more field."
Now the VP is bragging all the success was due to his expertise?! Gaaaaahhhh!
I quelled my rage with ample quantities of donuts, juice, and chocolate milk.1 -
Really now?
AWS, #1 cloud provider with their #1 cloud database DynamoDB, all shiny, highly dynamic NoSQL, your data schema could change any second...
then DynamoDB errors out when one of your values is an empty string? {"foo":""} is impossible to store?
Like nobody ever saw or used empty strings a a value or what? There are tons of upvotes to fix this.
I just have to imagine the Product owner standing there: "No,no,no. They are just using it wrong if their data has empty strings as value. Won't fix!"4 -
Today was a manic-depressive kind of day. Spent the morning helping some developers with getting their code to run a stored procedure to drop old partitions, but it wasn't working on their end. It was a fairly simple proc. But working with partitions is a little like working with an array. I figured out that they were passing the wrong timestamp, and needed to add +1 to delete the right partition. Got that sorted out, and things were good. Lunch time.
After lunch I did some busy work, and then the PO comes up at about 2PM and says he's assigned some requests to me. The first was just attaching some scripts. Easy. The second, the user wants a couple of schemas exported ... at 6PM. I've been in the office since 6:45AM.
While I'm setting up some commands to run for the data export, a BA walks up and asks if I'm filling in for another DBA who is out for a few weeks. Yep. There's a change request that hasn't been assigned, and he normally does the work. I ask when it's due. Well, the pre-implementation was supposed to be done in the morning, but it wasn't, and we're in the implementation window ... half way through. I bring up the change task, and look at. Create new schema and users. That's all it says. The BA laughs. I tell I need more to go on. 10 minutes later he sends an email with the information. There's only two hours left in the window, and I can only use half of it, because the production guys have to their stuff, and we're in their window. Now I'm irritated, because I'm new to Oracle, and it's an unforgiving mistress. Fortunately, another DBA says he'll do it, so that we can get it done in time. But can't work it either, because Dev DBAs don't have access to QA, and the process required access for this task. Gets shelved until the access issue is resolved. It's now after 4:15PM. I'm going to in traffic with that 6PM deadline.
I manage to get home and to the computer by 5:45PM. Log in. Start VPN. Box pops on screen. Java needs to update. I chose skip update. Box pops up again. It won't let me log in until Java is current. Passed.
I finally get logged in, and it's 6:10PM. I'm late getting the job started. I pull up Putty and log into the first box, and paste my pre-prepared command in the command line and hit error. Command not found. I'm tired, so it's a moment to sink in. I don't have time for this.
I log into DBArtisan and pull up the first data base, use the wizard to set the job, and off it goes. Yay. Bring up the second database, and have enter the connect info. Host not found. Wut? Examine host name. Yep, it's correct. Try a different method. Host not found. Go back to Putty. Log in. Past string. Launch. Command not found. Now my brain is quitting on me. Why now? It's after 6:30PM. Fiddle with some settings, reset $Oracle home. Try again. Yay. It works. I'm done. It's after 7PM.
There is nothing like technology to snatch the euphoria of a success away from you. It's a love-hate thing, but I wouldn't trade it for anything else. I'm done. Good night.3 -
"So Alecx, how did you solve the issues with the data provided to you by hr for <X> application?"
Said the VP of my institution in charge of my department.
"It was complex sir, I could not figure out much of the general ideas of the data schema since it came from a bunch of people not trained in I.T (HR) and as such I had to do some experiments in the data to find the relationships with the data, this brought about 4 different relations in the data, the program determined them for me based on the most common type of data, the model deemed it a "user", from that I just extracted the information that I needed, and generated the tables through Golang's gorm"
VP nodding and listening intently...."how did you make those relationships?" me "I started a simple pattern recognition module through supervised mach..." VP: Machine learning, that sounds like A.I
Me: "Yes sir, it was, but the problem was fairly easy for the schema to determ.." VP: A.I, at our institution, back in my day it was a dream to have such technology, you are the director of web tech, what is it to you to know of this?"
Me: "I just like to experiment with new stuff, it was the easiest rout to determine these things, I just felt that i should use it if I can"
VP: "This is amazing, I'll go by your office later"
Dude speaks wonders of me. The idea was simple, read through the CSV that was provided to me, have the parsing done in a notebook, make it determine the relationships in the data and spout out a bunch of JSON that I could use. Hook it up to a simple gorm golang script and generate the tables for that. Much simpler than the bullshit that we have in php. I used this to create a new database since the previous application had issues. The app will still have a php frontend and backend, but now I don't leave the parsing of the data to php, which quite frankly, php sucks for imho. The Python codebase will then create the json files through the predictive modeling (98% accuaracy) and then the go program will populate the db for me.
There are also some node scripts that help test the data since the data is json.
All in all a good day of work. The VP seems scared since he knows no one on this side of town knows about this kind of tech. Me? I am just happy I get to experiment. Y'all should have seen his face when I showed him a rather large app written in Clojure, the man just went 0.0 when he saw Lisp code.
I think I scare him.12 -
Inherited a simple marketplace website that matches job seekers and hospitals in healthcare. Typically, all you need for this sort of thing is a web server, a database with search
But the precious devs decided to go micro-services in a container and db per service fashion. They ended up with over 50 docker containers with 50ish databases. It was a nightmare to scale or maintain!
With 50 database for for a simple web application that clearly needs to share data, integration testing was impossible, data loss became common, very hard to pin down, debugging was a nightmare, and also dangerous to change a service’s schema as dependencies were all tangled up.
The obvious thing was to scale down the infrastructure, so we could scale up properly, in a resource driven manner, rather than following the trend.
We made plans, but the CTO seemed worried about yet another architectural changes, so he invested in more infrastructure services, kubernetes, zipkin, prometheus etc without any idea what problems those infra services would solve.2 -
When you go at your first IT internship and you realize that a SQL database could be way bigger that anything you could had imagined.
Then I showed the schema to one of my database engineer friend and he laughed at me. :( -
Fucking hate my job 😡
I joined as nodejs dev at a mnc 3months ago involved in banking software in which i dont have any domain knowledge.. first 10 days I was told to go through fucking udemy nodejs and graphql tutorial (wtf) which i already have experience with before joining.. after that my reporting manager gives me task to resolve fields and gave me shitty jira story link to read.. that shit story link had no explanation about the fields and what the database it is, then she says to use some shitty sdk which is built internally by shiity devloper which had no documentation and have to follow other module which was again written by that sr. Dev... They hav fucked up the graphql and nodejs and entire stack and also till date no one has ever given any explanation about the domain and the fields and database schema.. this manager refuses to share knowledge about the domain now how the fuck i resolve the graphql schema which was again written by non technical b.a.. all they have used is latest technology in a shitty way with no standards to to follow .. no dataloading no caching no batching.. use shitty sdk which does not give access to dbconn and fucking tightly coupling expressjs which when i start consumes crazy 400Mb of memory .. these fucking seniors devs + the fucking b.a having 12+. Yrs exp each have fucked the entire codebase... Each day killing my passion for app development.. fuckkk ... Dunno what to do now5 -
I just love PMs that wait until an hour before I'm supposed to leave and come and say, "Hey, we need you to do this thing right now. We're doing performance testing in QA this evening." And then take 45 minutes to get the information to me, without telling me which database or schema. Like, did you just find this out, or have you known this for the past week, and are just now telling me?4
-
So we had this legacy Objective-C codebase for a mobile app that was actually pretty good: I'd inherited the codebase and spent the past several years gradually improving it and I was actually quite proud of the work I put into it. So of course management decides to scrap it (with NO consultation from the engineers) and outsource a complete rewrite of the app in C# for Windows Universal.
Let me tell you. That code was without a doubt and without exaggeration the *worst* code I've seen in my close to 30 years of experience as a developer. I mean they broke every rule in the book, I'm talking rookie mistakes. Copypasta everywhere, no consistent separation of concerns, and yet way too many layers. Unnecessary layers. Layers for the sake of layers. There was en entire abstraction layer complete with a replicated version of every single data class *just* to map properties in pascal case to the same property in camel case. Adding a new field to a payload in the API amounted to hours of work and about eight different files that needed to be modified. It was a complete nightmare. This was supposed to be a thin client, yet it had a complete client-side Sqlite database with its own custom schema (oh and of course a layer for that!) completely unrelated to the serverside schema, just for kicks. The project was broken up into about eight or nine different subprojects, each having their own specific dependencies on various of the other subprojects in such a tightly-knit way that it made gradual refactoring almost impossible. This architecture was so impressively bad, it was actually self-preserving!
Suffice it to say it was a complete nightmare, and was one of the main reasons I ended up leaving that company. So just sayin', legacy code isn't always bad. :) -
Just finished coding the first parts of my soon to be obviously awesome CMS ,😁 been thinking about it for over a year, been designing it for about a month, did the database schema a week ago and this week I finally got to coding the UI kit, the database migrations and the foundation for the system 😄 and right now, I actually finished the installation page, much waow
Check out the most amazing video of the installation page here lol
https://youtube.com/watch/...7 -
Yes its completely necessary to have a spring server with a mysql database with docker containers all over your ass for 3 fucking endpoints and a (url, varchar, varchar) schema. Fuck you. How the fuck do i run all this shit and how do you expect me to create a frontend for something that has no documented endpoints?? Fuck you.
In other news, im now a senior.3 -
TLDR: There's some days where the Gods of IT are not with you. Just lost a whole day of work.
So this morning, we (me and my team) big performance issues with our web app. Lot's of requests time out, big latency, etc
Try to ssh to VPS, latency of 10 seconds between user input and output.
Usual checks: RAM ok, Proc ok, hard drive ok, reboot server (20 minutes), update/upgrade
We decide to call OVH. After 15 minutes call, we try to reboot in rescue mode. Reboot fails at 60% + everything freezes.
After an hour, OVH opens an incident ticket on +200 vps instances (including mine) everything is down during +1h
Finally everything is okay ! Even had time to migrate my new database schema.
Still, quick heavy on the mind but feels good to go home with everything working out correctly -
So here I am trying to understand the database schema in order to write a REST interface. Then I find that one of the tables contains an id and a name columns but the name is Integer not a string!
I contacted the developer who gladly explained that it was easier for them to store the ids in the database but the actual names strings were hard coded in the source files so they can handle translations! -
I really hate PHP frameworks.
I also often write my own frameworks but propriety. I have two decades experience doing without frameworks, writing frameworks and using frameworks.
Virtually every PHP framework I've ever used has causes more headaches than if I had simply written the code.
Let me give you an example. I want a tinyint in my database.
> Unknown column type "tinyint" requested.
Oh, doctrine doesn't support it and wont fix. Doctrine is a library that takes a perfectly good feature rich powerful enough database system and nerfs it to the capabilities of mysql 1.0.0 for portability and because the devs don't actually have the time to create a full ORM library. Sadly it's also the defacto for certain filthy disgusting frameworks whose name I shan't speak.
So I add my own type class. Annoying but what can you do.
I have to try to use it and to do so I have to register it in two places like this (pseudo)...
Types::add(Tinyint::class);
Doctrine::add(Tinyint::class);
Seems simply enough so I run it and see...
> Type tinyint already exists.
So I assume it's doing some magic loading it based on the directory and commend out the Type::add line to see.
> Type to be overwritten tinyint does not exist.
Are you fucking kidding me?
At this point I figure out it must be running twice. It's booting twice. Do I get a stack trace by default from a CLI command? Of course not because who would ever need that?
I take a quick look at parent::boot(). HttpKernel is the standard for Cli Commands?
I notice it has state, uses a protected booted property but I'm curious why it tries to boot so many times. I assume it's user error.
After some fiddling around I get a stack trace but only one boot. How is it possible?
It's not user error, the program flow of the framework is just sub par and it just calls boot all over the place.
I use the state variable and I have to do it in a weird way...
> $booted = $this->booted;parent::boot();if (!$booted) {doStuffOnceThatDependsOnParentBootage();}
A bit awkward but not life and death. I could probably just return but believe or not the parent is doing some crap if already booted. A common ugly practice but one that works is to usually call doSomething and have something only work around the state.
The thing is, doctrine does use TINYINT for bool and it gets all super confused now running commands like updates. It keeps trying to push changes when nothing changed. I'm building my own schema differential system for another project and it doesn't have these problems out of the box. It's not clever enough to handle ambiguous reverse mappings when single types are defined and it should be possible to match the right one or heck both are fine in this case. I'd expect ambiguity to be a problem with reverse engineer, not compare schema to an exact schema.
This is numpty country. Changing TINYINT UNSIGNED to TINYINT UNSIGNED. IT can't even compare two before and after strings.
There's a few other boots I could use but who cares. The internet seems to want to use that boot function. There's also init stages missing. Believe it or not there's a shutdown and reboot for the kernel. It might not be obvious but the Type::add line wants to go not in the boot method but in the top level scope along with the class definition. The top level scope is run only once.
I think people using OOP frameworks forget that there's a scope outside of the object in PHP. It's not ideal but does the trick given the functionality is confined to static only. The register command appears to have it's own check and noop or simply overwrite if the command is issued twice making things more confusing as it was working with register type before to merely alias a type to an existing type so that it could detect it from SQL when reverse engineering.
I start to wonder if I should just use columnDefinition.
It's this. Constantly on a daily basis using these pretentious stuck up frameworks and libraries.
It's not just the palava which in this case is relatively mild compared to some of the headaches that arise. It's that if you use a framework you expect basic things out of the box like oh I don't know support for the byte/char/tinyint/int8 type and a differential command that's able to compare two strings to see if they're different.
Some people might say you're using it wrong. There is such a thing as a learning curve and this one goes down, learning all the things it can't do. It's cripplesauce.12 -
We've got a big legacy app which we have to rewrite. The current client applications are only working on XP(!). We have to move the clients to the browser so we can finally get rid of all XP vm-s. The db schema is complex but still 1000+ stored procedures and functions and about a hundred tables with 13 years of data.
So I ask the guy responsible for maintaining the DB code. (he is ~25 years older than me)
me - Where is the source of the database. Which project?
he - Where would it be? It's in the db.
me - So we've got a huge db without VCS, upgrade/downgrade scripts, etc?
he - Yes. I don't get why young developers always want to use shiny new tech like git just because it is cool. It has nothing that an external usb backup drive can't do.
me - VCS has been around since the early 1980's...
he - If you really want, you can put it under git or whatever, so you can sleep better, but I still think it is stupid and a waste of time.
I get that it's hard to keep up, but getting personal... -
I can't convince my team that a good database model promotes a good API design and a good UI/UX experience.
Instead, I have to work with a ridiculous table setup.
Imagine, if you will, a table (table B) that references another table (table A) via a foreign key. The FK is a string in both tables. And table A only has one column, which is labeled as "name".
The schema i have to look at it kind of like this:
Table parent
Name varchar(10) primary key
Table child
Name varchar (10),
parent_name varchar(10),
Foreign key (parent_name) references parent (name)
Sorry if the syntax is wrong, a little frustrated having to look at it...
Am I crazy to want to change this table design? Am I missing something? I feel like I'm taking crazy pills, because this is just scratching the surface of the problems I have to deal with.7 -
back in college i started a project to manage my MTG and YuGiOh cards. I wanted to have a database for them with a graphical manager (already some older ones on github but i don't like the feel of them).
But between college work, the difficulty of building a SQL database schema for them and the fact I had hundreds of cards I'd need to put into the database manually I dropped the project after the 2 friends working with me also dropped out of the project.
But recently I found this hackster project (https://hackster.io/mportatoes/...), and i'm mostly sure I could retrofit it to use opencv to at least read the card title reliably allowing me to scrape the rest of the information from some wikia page as a new card is scanned. I'd just have to pick up a bin of legos at walmart lol
And previously learned about mongodb which would make storing the cards ina DB a lot easier than dealing with SQL.
I might pick this back up again, but when I first started I had 2 friends working on it with me who both dropped out before I finally gave up, so starting by myself might be a little demotivating. -
When you look at a client's current database schema and you're like (whatIWasGoingToChargeYou * numberOfUnnormalizedTables)1
-
I wonder what is going on in the minds of inexperienced developers. It must be very interesting.
I just read this bit of code
The task was to implement a certain schema into a database. They were given an ORM library, and several tutorials explaining what an ORM was and how it did it.
The result were these 3 models:
- A defaultUser with all of the defaults values for the User model. It wasn't even supposed to be instantiated, just accessed by `defaultUser.fields.username.default`
- another default table for another model.
- The "main" model, containing all other models in the form of JSON fields that would contain an array with other JSON objects that would represent the instances themselves.
I will say though, they made a home-brew ORM with (most of) all the logic a normal ORM has by parsing through the "main model", except, of course, common sense2 -
Client be like:
Pls, could you give the new Postgres user the same perms as this one other user?
Me:
Uh... Sure.
Then I find out that, for whatever reason, all of their user accounts have disabled inheritance... So, wtf.
Postgres doesn't really allow you to *copy* perms of a role A to role B. You can only grant role A to role B, but for the perms of A to carry over, B has to have inheritance allowed... Which... It doesn't.
So... After a bit of manual GRANT bla ON DATABASE foo TO user, I ping back that it is done and breath a sigh of relief.
Oooooonly... They ping back like -- Could you also copy the perms of A on all the existing objects in the schema to B???
Ugh. More work. Lets see... List all permissions in a schema and... Holy shit! That's thousands of tables and sequences, how tf am I ever gonna copy over all that???
Maybe I could... Disable the pager of psql, and pipe the list into a file, parse it by the magic of regex... And somehow generate a fuckload of GRANT statements? Uuuugh, but that'd kill so much time. Not to mention I'd need to find out what the individual permission letters in the output mean... And... Ugh, ye, no, too much work. Lets see if SO knows a solution!
And, surprise surprise, it did! The easiest, simplest to understand way, was to make a schema-only dump of the database, grep it for user A, substitute their name with B, and then input it back.
What I didn't expect is for the resulting filtered and altered grant list to be over 6800 LINES LONG. WHAT THE FUCK.
...And, shortly after I apply the insane number of grants... I get another ping. Turns out the customer's already figured out a way to grant all the necessary perms themselves, and I... No longer have to do anything :|
Joy. Utter, indescribable joy.
Is there any actual security reason for disabling inheritance in Postgres? (14.x) I'd think that if an account got compromised, it doesn't matter if it has the perms inherited or not, cuz you can just SET ROLE yourself to the granted role with the actual perms and go ham...3 -
"Could not complete cursor operation because the table schema changed after the cursor was declared"
So, our customer is updating their side of the database, while their own users continue to use our software. Would've been nice if we got word of the maintenance window too.1 -
Dumb mistake from when I was still working:
My work laptop’s SSD went haywire, and I/O would spike every 10 minutes or so for ~50 ms. The hardware guy said he could replace the SSD right away, or I could endure it for a few weeks and get a new laptop instead. Obviously, I agreed to wait. The stutter noticeably affected screen rendering, but I didn’t notice any other issues. Little did I know that every time it happened, all input was ignored (as in: not queued). Normally it wouldn’t matter, because hitting a random ~50 ms window is hard. How-the-f×ck-ever…
A few days later — without getting into “why” — I was forced to apply a patch in production. So I opened an SSH session to prod in one terminal, spun up a dev environment in another, copied the database schema from prod to dev, and made sure to test everything. No issues, so I jumped to prod, applied the patch, restarted services, jumped back to dev, and cleaned up the now-unnecessary database. Only to discover that my “jumped back to dev” keystroke didn’t register.16 -
It's too early to be asking these questions today:
Are your DB schema changes checked into source control?
What branch are they checked into?
Why are the schema changes checked into one branch, but deployed to a completely different database?
Is my CI pipeline deploying incorrectly? Oh, you manually deployed changes.
Are your DB changes in source control an accurate reflection of what you actually put in the staging database?
Why not?
Can I just cherry-pick update my schema with your changes from the staging database?
Why is there a typo in your field name?
Oh. Why is there a typo in the customer data set? Don't they know how to spell that word?
Why is the fucking staging database schema missing three critical tables?
Is the coffee ready? I need coffee.
Why is the coffee not ready yet?
What's going on in DevRant this morning?
What project am I working on now anyway?
Did my schema update finish yet?
Yup, it finished. Crap. Where the hell do I keep those backup files?
What's the command line to restore the file again?
Why doesn't our CLI tool support automated database restores?
I can fix that. What branch name should I check the CLI tool into?
What project was I working on this morning again?1 -
Been working on trying to get JMdict (relatively comprehensive Japanese dictionary file) into a database so I can do some analysis on the data therein, and it's been a bit of a pain. The KANJIDIC XML file had me thinking it'd be fairly straightforward, but this thing uses just about every trick possible to complicate what one would think would be a straightforward dictionary file:
* Readings and Spellings/Kanji usage are done in a many-to-many manner, with the only thing tying them together being an arbitrary ID. Not everything is related, however, as there can be certain readings that only apply to specific spellings within the group and vice versa. In short, there's no way to really meaningfully establish a headword fora given entry.
* Definitions are buried within broader Sense groups, which clumsily attach metadata and have the same many-to-many (except when not) structure as the readings/spellings.
Suffice to say, this has made coming up with a logical database schema for it a bit more interesting than usual.
It's at least an improvement over the original format, however, which had a couple different ways of setting up the headword section and could splatter tagging information across any part of a given entry. Fine if you're going to grep the flat file, but annoying if you're looking for something more nuanced.
Was looking online last night to see if anyone had a PHP class written to handle entries and didn't turn anything up, but *did* find this amusing exchange from a while back where the creator basically said, "I like my idiosyncratic format and it works for me. Deal with it!": https://sci.lang.japan.narkive.com/...
Grateful to the creator for producing the dictionary I've used most in my studies over the years, but still...3 -
This is the link that has brought me the most joy acceleration in my life.
Go see what it does yourself.
I love adminer so much.
Hyper recommended.
Screw MySQL Workbench.
(this rant was saved since that day images stopped working, good job guys)3 -
There were many issues that came about during my entire employment, but I woke up today with some, honestly, quite bizarre questions from my manager that made me open an account here. This is just the latest in many frustrations I have had.
For context, my manager is more of a "tech lead" who maintains a few projects, the number can probably be counted in one hand. So he does have the knowledge to make changes when needed.
A few weeks ago, I was asked to develop a utility tool to retrieve users from Active Directory and insert them into a MSSQL Database, pretty straight forward and there were no other requirements.
I developed it, tested it, pushed it to our repository, then deployed the latest build to the server that had Active Directory, told my manager that I had done so and left it at that.
A few weeks later,
Manager: "Can you update the tool to now support inserting to both MSSQL and MySQL?"
Me: "Sure." (Would've been nice to know that beforehand since I'm already working on something else but I understand that maybe it wasn't in the original scope)
I do that and redeploy it, even wrote documentation explaining what it did and how it worked. And as per his request, a technical documentation as well that explains more in depth how it works. The documents were uploaded as well.
A few days after I have done so,
Manager: "Can you send me the built program with the documentation directly?"
I said nothing and just did as he asked even though I know he could've just retrieved it himself considering I've uploaded and deployed them all.
This morning,
Manager: "When I click on this thing, I receive this error."
Me: "Where are you running the tool?"
Manager: "My own laptop."
Me: "Does your laptop have Active Directory?"
Manager: "Nope, but I am connected to the server with Active Directory."
Me: "Well the tool can only retrieve Active Directory information on a PC with it."
Manager: "Oh you mean it has to run on the PC with Active Directory?"
Me: "Yeah?"
Manager: "Alright. Also, what is the valid value for this configuration? You mentioned it is the Database connection string."
After that I just gave up and stopped responding. Not long after, he sent me a screenshot of the configuration file where he finally figured out what to put in.
A few minutes later,
Manager: "Got this error." And sends a screenshot that tells you what the error is.
Me: "The connection string you set is pointing to the wrong database schema."
Manager: "Oh whoops. Now it works. Anyway, what are these attribute values you retrieve from Active Directory? Also, what is the method you used to connect/query/retrieve the users? I need to document it down for the higher ups."
Me: "The values are the username, name and email? And as mentioned in the technical documentation, it's retrieving using this method."
The 2+ years I have been working with this company has been some of the most frustrating in my entire life. But thankfully, this is the final month I will be working with them.21 -
So yesterday at a client location, our support guy called me and said this thing is trimming the characters whenever I save it. It was a ckeditor in our application, so basic troubleshooting was to check the system configuration for that page and the ckeditor configuration.
Checked the system configuration, ckeditor configuration, found nothing.
Out of curiosity, checked the schema for the table in which the data is stored, so one of the idiots took the backup of original table and appended it with the date time on which it was backed up. And created a new table with field data type of varchar with a 255 limit.
This was in UAT server as well as Production server. Changed the field type to text again in UAT. Asked to team to get the same thing done on Production server as well. -
Can there be a happy rant?
This is going to be a bit of a rambling semi coherent story here:
So this customer who just doesn't know what their data schema is or how they use it (they're a conglomeration of companies so maybe you get how that works out in a database). For every record there's like a ton of reference number type things mapped all over the DB to fit each companies needs needs.
To each company the data means something different, they use the data differently, and despite their claims otherwise, I think there are some logical conflicts in there regarding things like "This widget is owned by company A, division B, user C.". I'm also pretty sure different companies actually don't agree on who owns what... but when I show them they just sort of dance around what they've said in the past...
So I write a report (just an SQL query that outputs ... somewhere ... I mean what isn't that?) that tells them about all the things that happened given X, Y, Z.
Then every damn morning they'd get all up in arms about how some things are 'missing' but sometimes they don't know what or why because they've no clue what the underlying data actually is / their own people don't enter the data in a consistent way. (garbage in garbage out man...)
So I've struggled with this for a few weeks and been really frustrated. Every morning when I'm trying to do something else ... emails about how something isn't working / missing.
In the meantime I'm also frustrated by inquiries about "hey this is just a simple report right?" (to be clear folks asking that aren't being jerks, and they're not wrong ... it really should be simple)
Anyway my boss being the good guy he is offers to take it over, so I can do some things. Also sometimes it helps just to have someone else own something / not just look it over.
So a few days into this.... yup, emails coming in about things 'missing' or 'wrong' every day.
Like it sucks, but it's nice to see it suck for someone else too as validation. -
God, these people...
Little backstory. I'm making an training application and we have a MySQL database set up where some elements of the training are configured. This is so learning experts can easily change some aspects of the training without programmer's help.
Meanwhile, I'm also in the middle of a server migration, because our current server is running a lot of deprecated software and is in dire need of replacement.
This is going pretty slowly, though, because of other, high-priority, work that keeps being shoved my way.
Now, someone accidentally deletes a bunch of data from one of the schemas. No big deal in my book, the training is still in development and we have nightly backups of the database.
So I shoot a support ticket to the hosting provider and ask them to restore a specific schema, telling them to restore the image to some other machine and dump the tables in an MySQL file so I can restore it that way.
I also told them to get the backup of the OLD server, not the NEW one we're still migrating to.
About an hour later, I get a message that they dumped the schema's files in a Temp folder on the D drive. So I RDP to the server to check and... The files aren't there. Just before writing a response asking where the file is, I remembered the server I was migrating to and checked that server, and there were the files.
I had already migrated part of our databases and was testing compatibility before I moved to something else.
The hosting provider just dumped the files of the wrong server, despite me telling them exactly which server to use.
This is not the first time this hosting provider has let me down...
I'm really considering jumping to another if they keep doing this... -
When I was doing my onboarding training for work, we had to do a group exercise. We had to build a small app using Spring MVC connecting to a MySQL database.
We had a team of 4 people, and I think I was the only person who wrote a single line of Java the whole day.
One person decided that she would build the DB schema, so I thought ok fair enough I will make a start on hooking up Spring. But the other 2 decided that they would “focus on making it look pretty”.
Several hours later what they had basically managed to do was import Bootstrap.
We ended up with only one screen to demo while other groups had 3-4.
Thats not the only story I have where Im in a group project and basically end up writing all the code. I’ll post the other one later. -
Writing DAL code that I am 99% sure will be replaced really soon along with the database schema.
Angry coding is almost as good as tipsy coding - AMAZING. -
I was wondering how I can go about with the development of an Android app.
I've made a few small apps, but I want to make something a little more complex.
I've made the use case diagrams, high-fidelity prototypes and the database schema is almost ready.
I'm just stuck with how to model the app. Which architecture to use? How to actually implement a complex project?9 -
I need just a bit of advice.
I am working with node.js and React and mongoDb
I just want that please take a look at my schema architecture (Specially for address) for profile and suggest me which is better
Approach 1 :
https://paste.centos.org/view/...
The things that scared me with this approach. I tried this also But it become unnecessary headaches to insert address and then query address as it is nested schema .
Also if you check this out
https://stackoverflow.com/questions...
[Answer by Konstantin Smolyanin (Long Version))]
One must not considered nested state in react.
Approach 2
https://paste.centos.org/view/...
I can store address into another collection
Also is there any reference sites where I can learn about schema architecture or database design with practical scenarios.
Thanks for reading out.4 -
I can't tell if I'm being clever or a dick here. When I can't be arsed writing a dB schema I switch hibernate to create mode, let it build the database, I then just dump the schema as SQL...2
-
So, I am in the last stages of development of a really big project and I need to figure out a way to package future patches and updates for the client in order for them to manually update the project on prod server.
For reasons I cannot specify here, they will not use any automated process, and we need to provide regular patches and updates for the next year.
So I was thinking of using git archive to package changed files from our repo for every new commit, or series of commits, and just give them that, along with any database schema updates as sql files (again, no automation can be used).
We are talking about a large PHP + MySQL app, and cannot use automated deployment strategies.
I feel there must be a better way to do this, but this is the best I could come up with so far.
What do you people think?
Any ideeas?