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 - "pagination"
When you start a new job as a Senior Developer, and start asking questions about the code, and you have these collections of conversations with other front-end people:
Random dev: No, it's done with Angular.
Me: I think we should add frontend pagination to this page. There will be too many elements on it if you're a customer with 2000 servers.
Random dev: Don't bother, there's no pagination in the API call... So that will not gain any performance.
Me: But it wouldn't take long to implement and it would improve the user experience, why would you want to show ALL the elements, when you have an option not to... Also, it WILL be a major performance hit, especially on mobile.
Random dev: People will use search anyway.
Also, there are no coding standards, every file looks different, and my opinion is being disregarded in everything, and I thought my last job was bad...
Seriously how are some people hired as front-enders?
Since I just took this job, I feel obligated to stay a couple of months... But hey, don't cry for me, I might have more rants for you. 😂
Sorry for the long rant, here's cake: 🍰5
Best part about the covid19 manufactured crisis?
Liquor stores deliver. Worst part about liquor stores delivering? Needing to use their shoddy websites.
I've been using a particular store (Total Wines) since they're cheaper than the rest and have better selection; it's quite literally a large warehouse made to look like a store.
Their website tries really hard to look professional, too, but it's just not. It took me two days to order, and not just from lack of time -- though from working 14 hour days, that's a factor.
Signing up was difficult. Your username is an email address, but you can't use comments because the server 500s, making the ajax call produce a wonderfully ambiguous error message. It also fades the page out like it's waiting on something, but that fade is on top of the error modal too. Similar error with the password field, though I don't remember how I triggered it.
Signing up also requires agreeing to subscribe to their newsletter. it's technically an opt-in, but not opting-in doesn't allow you to proceed. Same with opting-in to receiving a text notification when your order is ready for pickup -- you also opt-in to reciving SMS spam.
Another issue: After signing up, you start to navigate through the paginated product list. Every page change scrolls you to the exact middle of the next page. Not deliberatly; the UI loads first, and the browser gets as close as it can to your previous position -- which was below that as the pagination is at the bottom -- and then the products populate after. But regardless of why, there is no worse place to start because now you must scroll in both directions to view the products. If it stayed at the very bottom, it would at least mean you only need to scroll upwards to look at everything on the page. Minor, but increasingly irritating.
Also, they have like 198 pages of spirits alone because each size is unique entry. A 50ml, 350ml, 500ml, 750ml, 1000ml, and 1750ml bottle of e.g. Tito's vodka isn't one product, it's six. and they're sorted seemingly randomly. I think it's by available stock, looking back.
If you fancy a product, you can click on it for a detail page. Said detail page lists the various sizes in a dropdown, but they're not sorted correctly either, and changing sizes triggers a page reload, which leads to another problem:
if you navigate to more than a few pages within a 10 or so second window, the site accuses you of using browser automation. No captcha here, just a "click me for five seconds" button. However, it (usually) also triggers the check on every other tab you have open after its next nagivation.
That product page also randomly doesn't work. I haven't narrowed it down, but it will randomly decide to start failing, and won't stop failing for hours. It renders the page just fine, then immediately replaces it with a blank page. When it's failing, the only way to interact with the page is a perfectly-timed [esc], which can (and usually does) break all other page functionality, too. Absolutely great when you need to re-add everything from a stale copy of your signed-out cart living in another tab. More on that later. And don't forget to slow down to bypass the "browser automation" check, too!
Oh, and if you're using container tabs, make sure to open new tabs in the SAME container, as any request from the same IP without the login cookie will usually trigger that "browser automation" response, too.
The site also randomly signs you out, but allows you to continue amassing your cart. You'd think this is a good thing until you choose to sign in again... which empties your cart. It's like they don't want to make a sale at all.
The site also randomly forgets your name, replacing it with "null." My screen currently says "Hello, null". Hello, cruft!
It took me two days to order.
Mostly from lack of time, as i've been pulling 14 hour shifts lately trying to get everything done. but the sheer number of bugs certainly wasted most of what little time i had left. Now I definitely need a drink.
But maybe putting up with all of this is worthwhile because of their loyalty program? Apparently if you spend $500, you can take $5 off your next purchase! Yay! 1%! And your points expire! There are three levels; maybe it gets better. Level zero is for everyone; $0 requirement. There are also levels at $500 and $2500. That last one is seriously 5x more than the first paid level. and what does it earn you? A 'free' magazine subscription, 'free' classes (they're usually like $20-$50 iirc), and a 'free' grab bag (a $2.99 value!) twice per month. All for spending $2500. What a steal. It reminds me of Candy Crush's 3-star system where the first two stars are trivial, and the third is usually a difficult stretch goal. But here it's just thinly-veiled manipulation with no benefit.
I can tell they're employing some "smarketing" people with big ideas (read: stolen mistakes), but it's just such a fail.
The whole thing is a fail.9
This was WAY back in my first job as a programmer where I was working on a custom built CMS that we took over from another dev shop. So a standard feature was of course pagination for a section that had well over 400,000 records. The client would always complain about this section always being very slow to load. My boss at that job would tell me to not look at the problem as it wasn't a part of the scope.
But being a young enthusiastic programmer, I decided to delve into the problem anyway. What I came to discover was that the pagination was simply doing a select all 400,000 records, and then looping through the entire dataset until it got to the slice it needed to display.
So I fixed the pagination and page loads went from around 1 min to only a few seconds. I felt pretty proud about that. But I later got told off by my boss as he now can't bill for that fix. Personally I didn't care since I learned a bit about SQL pagination, and just how terrible some developers can be.5
"Don't worry about pagination, we can just send the whole database to the front-end" ~ My Boss, being serious AF.
Worst of all, he has worked in system development for 20 years, he is not meant to be this stupid.6
So, my friend tryed making a website like a portfolio/blog thing. He thought about making a pagination so the website has part 1, part 2, etc.
He, on his own, with no research, made an entirely different project, with an entirely different domain name for "part 2".
When I saw this I paused for a second, then told him to make a file called `2/index.html` in his first project. then go to his domain, and add `/2` after it.
he didn't know you can have multiple files or folders in a damn website, help me.4
Sitting 10 min+ to understand why the pagination comes up empty when results per page is increased...
Then in the url i relises that "...?page=2" ☺️
Happy Monday everyone!
We started working with some pretty big (in data volume) client. Around 4.000 projects with about 10 to 15 deliverables by project. Our software helps them plan/manage that.
US : Hey, so on this page we only display first 10, so it is fast and you can adjust using filters.
Client: No, I want to see all 4.000 projects on the same page
US : Well, for one year it will generate : 4000x10(deliverables)x12 editable fields. Your browser will crash. (No time to add virtual scroll)
Client: No, I want to see all 4.000 projects on the same page
US : Ok, here is pagination to help you.
Client: No, I want to see all 4.000 projects on the same page
Tomorrow is going to be fun.17
So, it's time to fucking rant!
Location: A small startup where direct contact with C-Level members is frequent.
A while back we had a customer using our SaaS product who had gripes about the way it worked.
He contacted our CEO and made a bunch of claims based on bad assumptions.
In the end, he wanted all images removed from his site. I was pulled aside by the CEO and asked if I could handle this for him and make a new screen for them without images.
So I did. I tried to discuss and get deeper into the problem by saying "this seems like a symptom of a problem and not the actual problem. What do you think?" He responded with "That was his request so it must be the problem if it won't take long then let's fix it for him.
- a week later
The problem is fixed and in the wild. No more images. Now he has another request :/
He does not like the pagination on his site. He says " I shouldn't have to click a button when I scroll so I want the be able to scroll and see all my products!"
This time the CEO asks me if this can easily be done and I take him aside and say "no, this will be a big change to our system and will need to be discussed with the team."
The main point I make is that we should go down and spend some time with this customer to find out what the real problem is.
After a half hour of discussion about the real issue he decided to bring in the CTO.
In the end, we implemented infinite scroll, dropping our current product building tasks to service one customer (yeah, it's a bad scene). But we got infinite scroll built and shipped.
- 2 Weeks later
This time he demands that infinite scroll isn't good enough. "If I scroll fast then I have to wait for them to load, they should all load at once!"
This time I have had enough. I can see the CEO is coming over to me to as me how much work is in this. I tell him there are 3 things I have to say...
1. I'm going to implement exactly what he asked by the end of the day.
2. We will only release it to him because it is going to be a shit-show loading everything at once, the load times will be mental!
3. We should fire this customer, right now.
So, I built it. Customer hated it (of course, who the fuck wants to wait 30s for loading. That's basically a lifetime). We changed it back and he was still mad.
- 2 weeks later
Customer leaves. Good riddance.
- sometime later
I am in the customer's store on a road trip. I get a feel for how their store works and they have a different system for making things operate.
It turns out that they did not know what the real problem was. They actually needed a completely different system (from a UX perspective) for accessing their data.
To top it all off, the system would have taken less time to build than the shitty fixes we made over weeks of work. FFS
I guess the moral of the rant is to find the problem, not a symptom of the problem.2
OsCommerce is literally the most awful piece of software ever. Granted, I'm migrating a version from 2007, but even still.
The admin area has a screen to set related products to a target product.
The page takes an age to load, even longer to save and is god awful to use from a UI POV.
Why may you ask?
The OsCommerce devs decided to display a flat list, which check boxes of ALL products in the database.
So for the site in question, that's a single list of 167,000 products, without pagination. Some of the worst development/design on a single page I've seen since last week when I inherited a god awful butchered Wordpress site :|
I fucking love https://datatables.net/ I haven't given it another look for a while, after discovering it ages ago and have been always implementing that all on my own, now I can just slap it into any project and have search, filters, pagination and more handled for me, what a fucking awesome project1
Fuck me ... Redesigned my website ( www.whatkeptmefrom.com ) within the day and solved a bug with the date pagination while I was at it 😄 time for a beer 😍5
It promised full-blown CRDT functionality. So I decided to adopt it.
Disappointment number one: you have to use CouchDB, so your data model is under strict regulations now. Okay.
Disappointment number two: absolutely messed up hack required to restrict users from accessing other users’ data, otherwise you have to store all the user data in single collection. Not the most performant solution.
Disappointment number three: pagination is utter mess. Server-side timestamps are utter mess. ANY server-side logic is utter mess.
Just to set it to work, you need PouchDB itself, websocket adapter (otherwise only three simultaneous syncs), auth adapter (doesn’t work via sockets), which came out fucking large pile of bullshit at the frontend.
Disappointment number four, the final one: auth somehow works but it doesn’t set cookie. I don’t know how to get access.
GitHub user named Wohali, number one CouchDB specialist over there, doesn’t know that either.
It also doesn’t work at Incognito mode, doesn’t work at Firefox at all.
So, if you want to use PouchDB, bear that in mind:
1. CouchDB only
2. No server-side logic
3. Authorization is a mess
4. Error logs are mess too: “ERROR 83929629 broken pipe” means “out of disk space” in Erlang, the CouchDB language.
5. No hosting solutions. No backup solutions, no infrastructure around that at all. You are tied to bare metal VPS and Ansible.
6. Huge pile of bullshit at frontend. Doesn’t work at Incognito mode, doesn’t work at Firefox.8
It sometimes really sucks to see how many developers, mostly even much better than me, are too lazy to implement a function to its full UX finish.
Like how can you not implement pagination if you know there's going to be fuck ton of content, how can you not allow deleting entries, how can there be no proper search of content, but instead some google custom search, how can you not implement infinite loading everywhere, but only in parts of your application, how can you not caching a rendered version or improve the page, that loads EVERY SINGLE ENTRY in your database with 11k entries, by just adding a filter and loading only chunks of it.
I know sometimes you need to cut corners, but there's rarely any excuse with modern toolsets to just write 3 lines more and have it ready for such basic things.
I sometimes just wake up during the night or before falling asleep and think "oh, what if in the future he might want to manage that, it's just another view and another function handling a resource, laravel makes that very easy anyway", write in on my list and do it in a blink the next day, if there's nothing else like a major bug.
I have such high standard of delivery for myself, that it feels so weird, how somebody can just deliver such a shitty codebase (e.g. filled with "quick/temporary implementations"), not think of the future of the application or the complete user and or admin experience.
Especially it almost hurts seeing somebody so much more versatile in so many areas than me do it, like you perfectly fine know how to cache it in redis, you probably know a fuck ton of other ways I don't even know of yet to do it, yet you decide to make it such a fucking piece of shit and call it finished.3
How do you folks handle your pagination at backend?
I was initially using skip and limit. But that is prone to error.
Then I thought about using last sent items id and using its created_at time and fetching rows/documents after that. But that too is prone to error ( more than one can have same timestamp) hence either having data repeats or data That gets missed.
What is your goto strategy for pagination?8
Co-Dev: The table doesn't have pagination. You said if I use your code it will have search bar and pagination.
Me: Did you initialize datatable? (we are using JQuery DataTables)
CD: No. Do I have to? How can I do it?
I. can't. even.6
Past month I had been working on a JSON hierarchy construction from flat rows returned by query where some bugfuck had introduced pagination for some damn reason, I never gave a flying duck to this till I get a email from one of the clients who supposedly made a complete hierarchy and my endpoint wasn't returning some hierarchy after some levels.
Frustrated that my service layer there is a bug, I debug to realise only certain rows are getting sent back from the query and ebullient from this fact , I put the bug on the DB person and walk off for a smoke.
After a smooth drag , I realise while closing the email on my phone that this client had entered 10 on pagesize which would indeed just return 10 rows. *Facepalm* I didn't even need to debug all this and now I had to a face a db person I just plastered a bug on. BAHHUMBUG2
Rant and opinions wanted. Its a long one.
I have been working on a project for a month and a half. For the first week I was requesting designs that I got about 2 of out of 15. For the next week and a half the designer was on holiday so I couldn't do anything but delivered a few more designs once he got back.
This takes us 2 weeks in already. I have other things to do as well so at the same time I work on support tickets and some bespoke development coming in.
I get given 2 or 3 more designs and can't get anything else out of the designer after waiting a week so I have to design everything myself as I go and build it. Something I have never done before.
We are now 3 and a half weeks in. My boss randomly tells my pm it needs to be demo ready the next day. I work furiously to hack something together. It works but key functionality is missing.
I move house and work from home for a week and a half. I do my best but the project is full of bugs and the CSS is horrible because I didn't know what I was making at any stage. It is therefore CSS rules repeated in IDs everywhere.
My colleagues join me on the project because my boss has decided to try and sell it tomorrow.
They run through it and find all the bugs left from me working furiously to get things done quickly. Things like no search pagination and missing validation.
My boss is now pisses at me because the project is not finished, my colleagues are now all working on it. Throughout it all he knew the designer was not delivering me anything and that I was struggling.
Am I in the wrong for writing shit code that came about because I was coding with no idea of what the finished project should look like? Is he in the wrong for dumping this on me and just letting me get on with it even though he knew there were no designs?
Btw I am just finishing a 1 year internship and before this have never done web dev before.
There's a team where the leader has some real weird/bad ideas here, it's like, ugh, no. I can't say no because I'm not in position to contest, but geez I so want to.
Like, we wanted to load data with pagination because there could be a lot of them (could reach thousands objects of data easily).
Team Leader: No, no pagination because that ask to call those services several times. Only one call, you load all the data in the same single page and you don't call the service again, so stock them in cache.
So the idea at first looks bad, and after analysis and research, it is real bad, of course.1
I needed to rewrite pagination from:
A) 1 ...  4 5 6 ... 13
B) 1 ...  5 6 7 ... 13
A) 1 2  4 5 ... 13
B) 1 ... 3  5 6 ... 13
And the maths got me a headache3
So does devrant save all your rants?
Apparently I'm super narcissistic and enjoy reading my old rants and the responses to them. A lot. And I'm browsing through, clicking, reading all the old comments (you guys are really great, I love reading your comments) and I realize at the bottom of the list of my rants theres no pagination, no infinite scroll. It just ends at the bottom.4
When u are at page 8 of promotions of pc components, click on "see 100 products" and go to the first page 🤦
Following an interview, I've been tasked with creating a "simple address book" webapp with Laravel and Vue.js.
There isn't much in the spec, with the only requirements being the use of Bootstrap, no auth, and inclusion of pagination and searching.
This is very easy with Laravel and my question to the community is how much further do I go with this?
Should I add alphabetical pagination alongside laravel pagination? What about a nice material ui?
I sent a design from Dribble to the employer and asked if making the app look fancy would be worth my time. He said I'm free to use any front end design and lib that I want if I'm able to demonstrate my use of them in code review, and he also said that the project "was only intended to take you a couple hours" which it would if I weren't to add a fancy ui.
So, shall I just make a simple app with Bootstrap tables, add responsiveness and keep the css semantic for brownie points, or go all out and spend a day or two making it beautiful? There is one other candidate so I have competition.1
suggestion for devRant
I'm posting them here so if others want they can flame me as they see fit.
- Please add the ability to customize which notifications to get and which rants to watch.
- Please move around options in profile and settings and for the love of God move the delete profile button. It's just behind the settings button so if you press settings and click again there's a chance you have clicked the delete button.
- Some of the app is using JS for navigation and other parts don't. Pagination can be done with JS. Seeing notifications too.
- I get that the app is designed this way to be displayed on mobile but for someone like me who uses the web app the small editor and it's huge font size and the big plus button are really annoying.
I love this place. I hope it gets better.1
So I have a xaml object that is designed for pagination on web pages, and the current page must be at least 1.
But the web service used for the data that go with that object starts its pagination at least at 0.
So everytime I must assure that the xaml object has 1 and the web service has 0 for the first page.
That's not hard, but that's the kind of thing that's annoying, why doing it that way
I'm trying to make API calls to a service to query some info. This is all the information that's available for pagination. No info on max PageSize and there's no Pagination section in the output that says the number of pages of results that match the query. What am I supposed to do with this? -_-
Why use vue pagination when you can create pagination using Laravel paginate (https://cloudways.com/blog/...) method?2
First contact with XEN.
Xen Orchestrator UI / Web, logged in first time...
Wow. The UI is a big giant mess...
I don't care for this fucking bling bling shit... Need to have an overview of all VMs.
Oh Lord... Wtf... Icon hell...
Hm, I need more detailed information... Ah. Found the button.
Wtf... What's taking so long...
Bloody shit.... Why does it include real data diagrams of usage statistic per row????!!! (had pagination set to 100 rows, one row is one VM)...
Bloody christ, ain't no option to configure that monstrosity... Export function?... Nope... Great. This will be a giant fuckfest...
Rest API? Nope.... Non existent as it seems. Thought that would be common in the 21st century... Guess what, nope.
Oh interesting. An cli client in NPM?
Hm, pretty scarce documentation...
Poked it a bit... Got first results...
xo-cli --list-objects type=VM
Let's take a look...
Oh JSON. Gooooooo(d)....
Wow. The document structure looks like someone puked out alphabet soup...
Or maybe the dev had hemorrhagic fever and was suffering from delusion and blood loss.
After this... More than devastating experience...
I took a look at Proxmox REST API.
Sweet jesus. That's like... Stone Age to 23rd century. Oo
Seriously... It seems not so hard to define an API to get the data of all VMs... Without suffering a traumatic brain injury.1
When the vendor did a search page but retrieve all the records from the database and paginate them with js, and the load test crashes with 20 concurrent users!!!