Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
Get a devDuck
Rubber duck debugging has never been so cute! Get your favorite coding language devDuckBuy Now
Search - "foreign to me keys"
I worked on a greenfield project a couple of years ago. The company had an old solution written in Omnis (heard of it? Yeah, me neither) with an SQL database. My team was to create a completely new web based system... on top of the old database, so the customers could keep their existing stuff.
The dba was an intelligent man, one of the nicest people I've met, and over the course of fifteen years he had made a remarkably terrifying monstrosity of a database. Some years before me they wanted to "future proof" the system and make it "easier to switch to new technologies". So they moved the entire business logic into the database...
I used a tool to create a visualization of said database when we started. It had no views, only tables and sprocs. Look at it! Tables and sprocs are rectangles (well, dots) and any connections are drawn in grey lines. There were no foreign keys, so a tables only visualization only yielded a collection of independent rectangles without a single line.
Now, the stored procedures were bloody MASSIVE. A single procedure that only registered a new interested party and attached them to a property had 2500+ lines and over 150 parameters.
Also, this dba added features and fixed bugs by logging into the respective customers production server and writing SQL.
That database is the stupidest thing I've ever seen a developer do.37
The use of git and understanding/working with foreign keys and performing (including the understanding) JOIN queries.
Also, it took me years and to understand OOP.
When think back to my code from before that, my brain spontaneously starts bleeding.6
SQL gives me a hard on right now.
Two tables, 954 rows and 9414, connected via foreign keys and shit.
SELECT a_id,name,shit FROM table1 a JOIN table2 b ON a.id = b.a_id WHERE ((lower(name) LIKE '%lorem%') OR MATCH(name) AGAINST('lorem' WITH QUERY EXPANSION) OR name SOUNDS LIKE 'lorem')
and you got fuzzy search with resolved keys to another table in 0.047 sec, fuck me dude.5
Woohoo!!! I made it to 1000++s :) Now I feel less newbie-like around here :)
So... I don't want to shit-post, so in gratitude to all you guys for this awesome community you've built, specially @trogus and @dfox, I'll post here a list of my ideas/projects for the future, so you guys can have something to talk about or at least laugh at.
Here we go!
Current Project: Ensayador.
It's a webapp that intends to ease and help students write essays. I'm making it with history students in mind, but it should also help in other discipline's essay production. It will store the thesis, arguments, keywords and bibliography so students can create a guideline before the moment of writting. It will also let students catalogue their reads with the same fields they'd use for an essay: that is thesis, arguments, keywords and bibliography, for their further use in other essays. The bibliography field will consist on foreign keys to reads catalogued. The idea is to build upon the models natural/logical relations.
Apps: All the apps that will come next could be integrated in just one big app that I would call "ChatPo" ("Po" is a contextual word we use in my country when we end sentences, I think it derived from "Pues"). But I guess it's better to think about them as different apps, just so I don't find myself lost in a neverending side-project.
A subchat(similar to a subreddit)-based chat app:
An app where people can join/create sub-chats where they can talk about things they are interested in. In my country, this is normally done by facebook groups making a whatsapp group and posting the link in the group, but I think that an integrated app would let people find/create/join groups more easily. I'm not sure if this should work with nicknames or real names and phone numbers, but let's save that for the future.
A slack clone:
Yes, you read it right. I want to make a slack clone. You see, in my country, enterprise communications are shitty as hell: everything consists in emails and informal whatsapp groups. Slack solves all these problems, but nobody even knows what it is over here. I think a more localized solution would be perfect to fill this void, and it would be cool to make it myself (with a team of friends of course), and hopefully profit out of it.
A labour chat-app marketplace:
This is a big hybrid I'd like to make based on the premise of contracting services on a reliable manner and paying through the app. "Are you in need of a plumber, but don't know where to find a reliable one? Maybe you want a new look on your wall, but don't want to paint it yourself? Don't worry, we got you covered. In <Insert app name> you can find a professional perfect to suit your needs. Payment? It's just a tap away!". I guess you get the idea. I think wechat made something like this, I wonder how it worked out.
* Why so many chat apps? Well... I want to learn Erlang, it is something close to mythical to me, and it's perfect for the backend of a comms app. So I want to learn it and put it in practice in any of these ideas.*
Flat-land arena: A top down arena game based on the book "flat land". Different symmetrical shapes will fight on a 2d plane of existence, having different rotating and moving speeds, and attack mechanics. For example, the triangle could have a "lance" on the front, making it agressive but leaving the rest defenseless. The field of view will be small, but there'll be a 2d POV all around the screen, which will consist on a line that fills with the colors of surrounding objects, scaling from dark colors to lighter colors to give a sense of distance.
This read could help understand the concept better:
A 2D darksouls-like class based adventure: I've thought very little about this, but it's a project I'm considering to build with my brothers. I hope we can make it.
Imposible/distant future projects:
History-reading AI: History is best teached when you start from a linguistic approach. That is, you first teach both the disciplinar vocabulary and the propper keywords, and from that you build on causality's logic. It would be cool to make an AI recognize keywords and disciplinary vocabulary to make sense of historical texts and maybe reformat them into another text/platform/database. (this is very close to the next idea)
Extensive Historical DB: A database containing the most historical phenomena posible, which is crazy, I know. It would be a neverending iterative software in which, through historical documents, it would store historical process, events, dates, figures, etc. All this would then be presented in a webapp in which you could query historical data and it would return it in a wikipedia like manner, but much more concize and prioritized, with links to documents about the data requested. This could be automated to an extent by History-reading AI.
I'm out of characters, but this was fun. Plus, I don't want this to be any more cringy than it already is.12
I really think there should be a subject in every CS course to teach us how to handle/work-under Grade-A assholes and dumbfucks. Not that it would help, but atleast warn us on what we are getting into.
In my opinion, development is not *that* hard or frustrating but is made so by these shitty people. But again, what do I know.
I was scolded by my boss for using for-loop to iterate through an array recently. Apparently for-loop is not used in real world projects and this iteration should be done "in-memory". My colleagues and I are still trying to understand and process that.
I was asked to add fitbit integration to a project within 2 hours just because I had "already done it a week ago" in *another* project. Luckily, it was then given to a "senior" developer who took 4 days for it and essentially copy-pasted my work without much changes, ofcourse it stopped working every now and then.
I am given unreal deadlines on my tasks, on technologies I haven't worked on before, and then expected to churn out production ready code with no bugs in them.
My boss literally just sends me the links of 1st three google results on the problems I encounter and report, after humiliating me ofcourse. Yes, I did google it and yes I went through all I could find from Google forums to GitHub issues. When the library/plugin author himself says that this feature is not yet available, don't expect me to develop it in 2 hours you dumbfuck.
And for the love of God, please stop changing the data model every single day and justify it with agile development. Think before making any changes to it. Ever heard of Join queries? Foreign keys? Or any other basic database concepts.
We reached a point where each branch in the repo had different data model. Not kidding. And we were a team of just 4 developers. Atleast inform us when you change models after discussing it with your shit for knowledge "senior" developer, so we don't have to redo it all over again. The channels on slack are not for sharing random articles only.
I am just waiting to complete my year here.
I should have known what I got myself into the day he asked me to remove the comments I had added to explain what my code does. Why you ask? Because "we don't write comments".
It should not be this difficult to get a database dump.
Can you please send over the schema and data for database X? I want to script together something to import the dump into my local DB and look at the entity relationships. (This is important for later. Stupidly, I thought it would be simple enough to open up SQL Server Management Studio, select all the boxes, and hit Go. How wrong I was.)
*Sends CSV files of the data*
Can you please provide a database dump in SQL format? It would make it much easier for me to import.
*Sends SQL file to create table structure*
*Sends zip containing CSV files of data*
*Sends single CSV file, forgot one oopsie*
Me, frustration building
I'm looking for a .sql that contains schema and data. Can you provide this?
Idk, I've never done this before, let me try
YOU'RE A FUCKING DB ADMIN, HOW HAVE YOU NEVER DONE THIS BEFORE
Vendor one week later:
Here it is *attaches private Google Drive link I don't have access to*
Me losing hope:
*requests access using personal email*
*imports, naively thinking my ordeal is over*
No foreign keys. I feel as though this should be implied by the term "schema dump" and the phrase "I want to look at the entity relationships". I swear to God, db admins are either totally incompetent or SQL geniuses, there is no middle ground.3
Him: i get this error when i insert into table, ForeignKey_contraint failed, what can i do?
Me: you have to obey the constraint, make sure it exists in the other table first
Him: ok i did that but i still get ForeignKey constraint error
Me: yeah that table has a couple foreign keys
Him: could you give me a very specific example how to insert into this table
Me: ........ here is a command to remove constraints on the table
Him: thanks, that fixed it!
I am helping a programmer who works with Costco integrate to software my company sells. I don't have source code, just an understanding of the database and what the software does. If he is getting paid more than me, then I should get a job there and ask for double, I could easily work 10 times faster than this buffoon.
i need advice, is this a good database structure? this is a comments table with foreign keys to users and posts table. the post_id and user_id can be repeated a lot of times so i wondered if i missed something here. i kinda forgot the 1/2/3 normalized form rules, so can someone give me a quick refresh? is this current structure good or should i change it?4
Sigh Im getting depressed from going to work whilst a few weeks ago it gave me a bunch of happines.
I think its due that management is approaching a triple deadline (?!?!?!) project in an agile/scrum way (?!?!??!)..
We can not change our data model completely when we have to be in acceptance in 3 weeks and do a demo in a few days..
Yes we can work around that but fuck database design theory and lets ignore all primary keys and foreign keys, great idea
We have to create and prioritise user stories on our own? We have two product owners and a scrum master.
Scrum master offers to deal with organising and creating tickets to organise Infrastructure without having a laptop of the client, so no Service Now access or any other system..
Guess who has to do it in the end..
Many question marks about this project
The bugs that make you think are the best/worst.
Had a ghost foreign key constraint from a dropped table. Cant drop it from a non existant table.
Turns out the dev copied a file for the new table and since you can technically name those foreign keys anything you want, there were no errors when he ran it.
Also sloppy/overworked dev teammates are the worst...
Also I'm pretty sure rule 2 of programming is "Never Copy and Paste"
I've been freelancing lately with an agency to develop an android app for their client and at the same time another person is developing the website .
The story begins when I first contacted the web dev to give me access to the database (because he started before me ).It turns out that this guy purchased an almost ready cms template with a shitty data structure that has no relations between object .This database has no primary keys , no foreign keys , no indexes ... no nothing . Adding to that the web dev refused that I rewrite a new data structure claiming that he has done a good progress on the website .
Forward couple of weeks , I managed to create the api and develop an alpha for the app and sent it to the agency manager .
This bastard told me that the website and design have changed and the app shouldn't be like that .He told me to contact the other bastard the web dev to seen what the changes are . I'm waiting for the response about the new updates and I'm praying that they'll be just minor colors updates or something not a whole concept update .
My problem here is I'm stuck with this fucking agency cuz they paid half of the payment when I started .
Damn I must learn to say no to people .2
FUCKING SHIT, I HATE THIS
Does anyone have problems with axios?
I've been trying to make this work for at least 1 hour. If I use Postman, it works alright, but using axios messes it up.
Practically what happens it's that Django does not picks the foreign keys, it loads all the fields except those two.
I've been like fucking crazy trying to understand what's going on but to no avail... I want to die, it's friday and this stupid thing is delaying me more than it should3