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 - "sequelize"
-
My first rant here, don't know how to start, but fuck these self proclaimed senior developers who can't even get their concepts right about basic things and don't believe in reading docs.
Fuck you for asking if sequelize has a method to return details of the logged in user of your app, it's a fucking ORM you dumbfuck. You are a "full stack" developer for fuck's sake.
Fuck you for making those "minor changes" which breaks build and then blame it on any random plugin or lib used, or my commits.
Fuck you for expecting me to review your code on Sundays because you couldn't finish it on time.
I don't like java, at all, but even I get that without it we wouldn't be where we are right now and can't reach where we aspire to reach. But you can't keep chanting "Java is dead, Java is dead" every chance you get. No, it's NOT dead. Nor is going to, anytime soon.
And for god's sake, please stop choosing one library/plugin over another just on the basis of stars on repo, it's not the only (or valid) criteria. Look if you actually even need it. Think.
And please learn how to google first, and also stop using "the" before every the noun, the adjective and the verb. It's the fucking the annoying to read.
And yes, there are different linting presets out there, and just because a piece of code in a plugin/library/boilerplate is not following your specific, and may I say horrible standard, doesn't mean it's a "bad code". It's written by people who have created/worked-on these libraries as side projects on which your entire career is based upon.
And I haven't even talked about the code you write or your domain knowledge or the way you treat other people. So get off your high horse and behave like a developer, a real one.8 -
rant? rant!
I work for a company that develops a variety of software solutions for companies of varying sizes. The company has three people in charge, and small teams that each worked on a certain project. 9 months ago I joined the company as a junior developer, and coincidentally, we also started working on our biggest project so far - an online platform for buying groceries from a variety of vendors/merchants and having them be delivered to your doorstep on the same day (hadn't been done to this scale in Estonia yet). One of the people from management joined the team working on that. The company that ordered this is coincidentally being run by one of the richest men in Estonia. The platform included both the actual website for customers to use, a logistics system for routing between the merchants, the warehouse, and the customers, as well as a bunch of mobile apps for the couriers, warehouse personnel, etc. It was built on Node.js with Hapi (for the backend stuff), Angular 2 (for all the UIs, including the apps which are run through a WebView wrapper), and PostgreSQL (for the database). The deadline for the MVP we (read: the management) gave them, but we finished it in about 7 months in a team of five.
The hours were insane, from 10 AM to 10 PM if lucky. When we weren't lucky (which was half of the time, if not more), we had to work until anywhere from 12 PM to 3 AM, sometimes even the whole night. The weekends weren't any better, for the majority of the time we had to put in even more extra hours on the weekends. Luckily, we were paid extra for them, but the salary was no way near fair (the majority of the team earned about 1000€/mo after taxes in a country where junior developers usually earn 1500€/month). Also because of the short deadline given to us, we skipped all the important parts like writing tests, doing CI, code reviews, feature branching/PR's, etc. I tried pushing the team and the management to at least write tests and make feature branches/PRs, but the management always told me that there wasn't enough time to coordinate and work on all that, that we'll do that after launching the MVP, etc. We basically just wrote features, tested them by hand, and pushed into the "test" branch which would later get tested and merged into master.
During development, one of the other juniors managed to write the worst kind of Angular code you could imagine - enormous amounts of duplication, no reusable components (every view contained the everything used in the view, so popups and other parts that should logically be reusable were in every view separately), fuck - even the HTML was broken (the most memorable for me were the "table > tr > div > td" ones, but that's barely scratching the surface). He left a few months into the project, and we had to build upon his shit, ever so slightly trying to fix the shit he produced. This could have definitely been avoided if we did code reviews.
A month after launching the MVP for internal testing, the guy working on the logistics system had burned out and left the company (he's earning more than twice the salary he got here, happy for him, he is a great coder and an even better team player). This could have been avoided if this project had been planned better, but I can't really blame them, since it was the first project they had at this scale (even though they had given longer deadlines for projects way smaller than this).
After we finished and launched the MVP, the second guy from management joined, because he saw we needed extra help. Again I tried to push us into investing the time to write tests for the system (because at this point we had created an unstable cluster fuck of a codebase), but again to no avail. The same "no time, just test it manually for now, we'll do that later when we have time" bullshit from management.
Now, a few weeks ago, the third guy from management joined. He saw what a disaster our whole project was. Him joining was simply a blessing from the skies. He started off by writing migrations using sequelize. I talked to him about writing tests and everything, and he actually listened. He told me that I'm gonna be the one writing them, and also talked to the rest of management about it. I was overjoyed. I could actually hear the bitterness in the voices of the rest of management when they told me how to write the tests, what to test, etc. But I didn't give a flying rat's ass, I was hapi.
I was told to start off by writing a smoke test for the whole client flow using Puppeteer. I got even happier, since I was finally able to again learn new things (this stopped at about 4 or 5 months into the project).
I'm using jest as the framework and started writing the tests in TypeScript. Later I found a library called jest-extended, but it didn't have type defs, so I decided to write them and, for the first time in my life, contribute to the open source community.19 -
> TeamLeader1: I just discovered SQL is actually super fast! The low responsiveness I've experienced comes from our ORM!
> IHateForALiving: well of course SQL is blazingly fast. SQL has been refined by the best engineers in the world for the past 50 years, its performances are unparalleled for everything you could possibly need, unless you want to scale REALLY big. Sequelize, instead, is an Active Record ORM, so it's bound to struggle with huge amount of data, because every single row will get attached a significant amount of black magic to make sure everything syncs correctly. Why is that?
> TeamLeader1: I have a problem with this frontend component, it doesn't allow pagination. I tried downloading the whole DB to bypass that, but the ORM is slow... so I will bypass the ORM and download the whole table with a raw query. Look at that! It works like a charm, it's super duper fast!'
This mf is downloading some 35 thousand rows every time some user loads a page because he doesn't know how to paginate the fucking table with Angular, there's no way these people are real.12 -
Kiss for fucks sake! What the fuck of an ORM is Sequelize? How the fuck do I have to write a 50 line query json to get a query for a single object going, which doesn't work then because that shit peace of software has a bug that breaks findOne and forces you to use findAll and use the first and only hit?!
Well yes, I looked in your garbage SEO docs for that issue, but whenever I look for something specific I just end up on your optimized as hell querying for noobs doc page. FUCK YOU!
Seriously, you guys working with Sequelize saved me many hours. But fuck your fuckups! And ajfjekidjjskrhbdkaowbdjdkwobdnfie4 -
FUCK EVERY PERSON IN THIS SHIT BANK!! FFS THE IDIOTS CREATED A NEW DATABASE USING SQL SERVER 2008! Yes, 2008 and its a new database if it was some type of legacy I could try to understand, but this shit is a completely new database. I have to use sequelize and guess what? It can't paginate results because shit server 2008 does not accept OFFSET FETCH syntax3
-
Has anyone here used MongoDB for relational databases? I am trying to use MySQL with Node but I feel like the whole thing is a mess. There are some ORMs like Knex or Sequelize for MySQL but they are pretty crap. I am thinking if I should just move onto MongoDB instead of MySQL, at the same time I feel a little dirty to store relational data in a document store :(18
-
Fuck sequelize, the bloody query generated by the "ORM" give diferent result on the same DB if you trie it on dBeaver (works fine) vs node (shit results).
order DESC have 0 effect on sequelize, but it appears on the logger as part of the query.
I just want to go to sleep ffs.7 -
Hello, can someone help me with this one ? I guess that the fucking SO elitist community would have beaten me to death if I asked this question.
I'm trying to create a relational table between a Tutorial object and a User object (to know which tutorial the user has access to) using Sequelize, and I figure out that I have two PRIMARY keys in my table. How is it possible ? UserID is also marked as Index.
The both keys are not Unique in themselves but their combinations are unique.4 -
I want to know the name of the evil mastermind who once conceived the "literal" function in Sequelize.
- You design a method to insert pieces of raw SQL exactly the way they are written, no further processing
- You release this method, you call it LITERAL to make sure people know its intended purpose: it is used to insert LITERALLY everything you write, nothing more and nothing less
- Then make sure this "literal" method changes the fucking case of column names. Because that's what "literal" means in the head of this rabid animal: you arbitrarily change the code written by the developer
WHY
WHY ARE ALL AR ORM DESIGNED BY FUCKING ANIMALS
ELOQUENT IS TRASH, SEQUELIZE IS TRASH, TENS OF DEVELOPERS AT WORK TO ALCHEMICALLY CREATE THE MOST ROTTEN CODE THEY POSSIBLY CAN, BECAUSE YOU MUST NOT BE ALLOWED TO WRITE ANY QUERY MORE ADVANCED THAN "SELECT * FROM users WHERE id =1", NOT A FUCKING SHRED OF DOCUMENTATION AND 16 MILLION LAYERS OF ABSTRACTION TO MAKE SURE EVERY BUG FUCKING STAYS THERE, DON'T YOU DARE TO USE A JOIN, DON'T YOU DARE TO TREAT A DMBS LIKE AN ACTUAL FUCKING DBMS INSTEAD OF A HOT STEAMING PILE OF METHODS IMPLEMENTED BY MONKEYS.6 -
Can someone help me to get some good practices with expressjs/sequelize combinations?
I managed to find how to not have all the models in the same js page and how to organize the routing but when I look the time it took me to find, I would like to don't have to search now 😂 -
Not really a backend developer but I give my best with node.js. The way I did it was just raw SQL everywhere, and now trying to figure out Sequelize. Holly shit its to complicated to me.
Anyone knows some good tutorials?1 -
do I really need another tool to make my life more simple in the js world?? I mean who the fuck thinks we need another choice in this js world at this point? data layer used to be the easy part for me, now I need this new great thing I can't live without?? and the have to have new way tool never simplifies. like ever. sequelize my balls.4
-
Recommended PHP ORM?
Had a couple bad experiences with Sequelize (I know it's JS, save it). Also, I'd like to try the decorators pattern. I'm also looking for good (and I mean GOOD) relationships management (you are allowed ONE pun about it).
Anyone? :((3 -
I got a new idea : I'm writing some python scripts to help me in my projects at school, I think it will help me a lot !
But I would like to code some scripts for my side-projects that are made using full JS.
NodeJS + Express + Sequelize for the Web API and ReactJS and HighlightJS for the client.
I would like to know if you could give me some ideas of scripts I could write for these JS side-projects ? -
PHP: Laravel, Phalcon, Composer
JavaScript: Node.js, Express.js, Restify, Sequelize, AngularJS, React, npm, bower
Python: Django, Flask, Requests, pip, SQLAlchemy
Java: Spring, Dropwizard, Hibernate
DB: MySQL, MariaDB, PostgreSQL, Cassandra1 -
Question time, i currently have a project in beginning stages. I has a node-js back-end build with express and sequelize. My current frontend is build in twig. And is within the back-end project structure. Now i have heard that the current hype is to take those separate. What is the best approach, and what frontend should i use? (I was thinking vue as interesting thing)
-
So for the past two days I had to deal with a problem where I have to do a nested query with sequelize, pretty straight forward reading the documentation, or that was I think. I implemented everything according to the docs but the query stills fails, why ? I had no idea, I double check my implementation, I googled the error, no luck, after a day searching like crazy I talked with the backend lead about this and he help me to realize that the naming convention was changing because sequelize is creating a nested (SELECT * FROM) because one of the relations has a one-to-many realtion with the root model and I'm why the heck is doing that? But we both didn't know, and the problem was solved by just modifying the names, so we let it through, and sent it to QA. The next day I see the task rejected by QA and the reason was after the changes were merged another part of the app was broken, ok np, I'll fix it right away, and oh God I found the error was caused by another query that was including the first query we fix yesterday ! It was a nested query with 3 lvls! And the names became even more complex ( like `model1->model2.colum1`), goddamit, ok, I spent most of the day searching again, nothing, read the specification of the findAll function, nope, tried to put that name in the ON clause as the docs suggested, still an error, shit, then the lead helps me again and creates a literal which can hold that name and voila! Everything is happiness, at least for that moment, but I was still curious about this behavior, so I keep digging on it and I've just found an issue where a great guy posted an option to the findAll method that is not documented in any version of sequelize ! WTF ! And this option was "subQuery" which if you set it to false it won't create that additional (SELECT * FROM) from before, FUUUCK! I can't believe it, I know that all the effort works in my favor because I learn more about sequelize, but FFS I'm still angry because this shit shouldn't happen, you need to update the god damn docs, it's just adding a row and telling the people what it does. Well to end this, after putting that in the query and replacing all the workarounds with the expected syntaxis everything works like charm.1
-
Is NodeJS + Express + Sequelize enough for an Enterprise app from scratch. Or should I use other Node frameworks like AdonisJS or NestJS?
Frontend will be Angular 9. Database will be MySQL. Thanks!12 -
Thanks sefuckalize-mock for not letting me insert 2 row,
Now Im replicating the whole sequelize module itself to stub shit for no reason idk fuck this why am I doing this for stupid unit testing -
Sequelize is pure garbage. 🤦🏾♂️
Now i am oblige to rewrite my entire Database service because of some stupid random error it has on production5 -
Does something like this exist in the NodeJS ecosystem:
- Reads js-based ORM model definitions (e.g. ones defined by sequelize.define())
- Syncs the database's tables with said model definitions without using migrations
I've built something like this and it seems revolutionary, but I wanna make sure I'm not reinventing the wheel.4 -
Any experts in sequelize? Please message me!
I got stuck in a problem for 2 fucking days. Unable to resolve it.10 -
We learn everyday. So for the early hours of today, I've learnt how to use redux(reducers and action) to manage my state and hell, my components are looking alot organized now than calling set and setState everywhere.
Learnt that fetchById was replaced by fetchByPk for fetching single item when using sequelize in Node.js
Learnt you can display images in your django admin panel. Haven't thought about it until today.
Well end of rant.
#JobHunting #LifeOfASoftwareDeveloper #JuniorDev -
We use Sequelize. This is how we do database structure changes:
- I create/change a model in Sequelize, and let it change my local database, then I do work on that
- I push the new code to a remote branch
- my boss/CTO/lead dev then manually creates/changes the relevant table(s) in our staging database
- I finally merge the branch I originally developed into the remote branch
- boss checks that everything is working
- at last, boss does the same process of modifying/creating tables in production database
- finally, staging code is merged into main
So right now:
- I'm changing a feature, forgot I was editing in the main branch
- go ahead and create a remote branch for it, pull locally, checkout local version of newly created branch
- try to run code
- oops, there's a missing column in one of my local database tables
- ask for boss for SQL script that will create the missing column and potentially add more data or whatever
- waiting for boss to respond
H-how can we improve this process? Boss has talked about us moving to use migrations but we never ended up doing it. I don't know much about migrations either. This is gonna suck so hard.3 -
Seems like sequelize doesn't support delete join queries. I keep missing all those things I took for granted on my previous stack.
But it's too late for me, it's gonna be node and I'm gonna like it. -
Alright fuck this, I'm sick of Sequelize's bullshit. I'm thinking of moving this over to Prisma2. If anyone has done it before, how painful do you think moving 90ish table related Typescript code will be?1