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 - "accordion"
-
A sidebar.
Literally just a sidebar.
And yes, this was in Hell.
Its code was spread across at least 40 files, and it used a bunch of freaking global variables to unfurl accordion sections, hide other sections/items, highlight the active item, etc. These were set (and unset!) in controller actions, so if you didn’t unset one, it remained open and highlighted until another action unset it.
Some of the global variable checks (and permissions checks) were done in the individual views, some outside of the `render` statements that include them. Some of them inherited variables from the parent, some from the controller, some from globals. Getting a view to work was trial and error. Oh, and some had their own inline css, some used css classes.
Subsections were separate views, so were some individual items, both sometimes rendered using shared templates, and all of the views and templates had the exact. same. filename. (They were located in different directories, and thus located automagically via implicit relative paths.) So, it was a virtually endless parade of`render partial => “sidebar”`. Which file does that point to? Good luck figuring it out!
Also, comments in several places said adding a new section required a database migration. I never did figure out why.
Anyway, I discovered this because I had an innocuous-sounding ticket to rearrange the sidebar, group some sections/items under different permissions, move some items to another menu, and nest some others differently.
It took me two bloody weeks, and this was when I was extremely productive every day.
Afterward, I was so disgusted by it that I took a day and removed every trace of the sidebar I could find, and rewrote it. I defined the sidebar in a hash, and wrote a simple recursive builder to generate the markup. It supported optional icons, n-level nesting, automatic highlighting of the current item and all parent nodes, compound and inherited permissions, wrapping of long names, hover and unfurl animations, etc. Took me a couple hundred lines of Ruby at the most, plus about the same of css.
Felt so good to remove that blight.5 -
TIL you can create accordion design by simply using details and summary html tag and without any JS and CSS.
The discovery was awesome but felt stupid not knowing it and having wasted a couple of hours making it myself.3 -
Today i faced a "bug" which caused an element not to trigger a Bootstrap 3 accordion by klicking on it. Only on iOS/iPhone - Desktop and Android worked fine.
The actual problem was that almost the same structure worked fine on another website...
took me about 3 hours to figure out that the element which was supposed to trigger the accordion needs the css property 'cursor: pointer;'.
why the hell does a touch device, which got no coursor, need this property?!3 -
Yes, i like to rant.
Yes I confirm this:
https://devrant.com/rants/13046679/...
Yet they produce bold statements about AI being in the 50 top programmers and shit.
LMAO
I tried vscode copilot insider both normal and with agents up to o3-mini and all other models (gemini, claude, etc)
I just had to do 2 things:
1) Custom angular table component which follows usual angular standards and custom columns are available (button columns, date columns etc). Asked to add an accordion column and test it in a component.
Given other samples from my code and internet.
Totally fuck up. Column never appeared and never worked. Tried to refine prompt and context 10 times each model. Nothing. it just spits shit in the chat console and tries to do backflips in resoning (agent mode) and also in edit mode.
Sometimes it even gets stuck and just goes into edit mode and refuses to modify files and just spits the code in the chat LMAO and I have to reboot vscode to make it work again.
2) Tried some unit tests with jest, given PLENTY of samples of working tests from my code.
Told it to strictly adhere to every syntax, rule and detail it sees in my tests.
Yet it adds unwanted imports, fucks up stuff and invent things.
what a delusional shit
I literally said to myself: "Sigh, I want to believe this shit will relief me from the unbearable pain of dealing with this shit angular code and this utter shit jest crap idiotic framework for testing.
I will allow myself 2 days to waste time on this retarded shit".
2 days wasted, ai = useless and bug shit.
Heck at some point i thought I was unable to write prompts and let another ai write my prompts for me to feed into copilot, but it didn't change anything.
I read an article that said you shouldn't talk "robotic" to ai and you get 10x results and i tried to talk to it like i was explaining to a colleague, then to a kid. Nothing.
Again work is safe. They are years away from making anything really replacing any human programmer with decent experience.7 -
Got a BPOS company commission a website. WordPress of all things.
But that's fine.
The client sends us a PSD to refer to. Buys a theme to modify and gives us a time frame.
Stupid client. Their design doesn't even line up with the theme.
We are getting paid peanuts for this.
Font sizes not specified.
Colours not specified.
No content
Responsive design expected but not designed
Behavior not explained
Custom footer expected that took a week to code from scratch.
Custom accordion section coded from scratch
We decided that the 15 of April would be the last date. It's the 27th and I'm still fixing shit.
We didn't get paid enough for this.
The QC for the site was done on the 24th!
I'm still working on it, for free.
The liason on the client side goes to Australia for vacation and the content is not being put on the site. They ask for content work too.
I'm just about to go postal.