Details
Joined devRant on 5/24/2018
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
-
for (email in inbox) {
if ( email.contains("policy") ||
email.contains("privacy") ||
email.contains("GDPR")) {
email.delete();
}
}12 -
I'm editing the sidebar on one of our websites, and shuffling some entries. It involves moving some entries in/out of a dropdown and contextual sidebars, in/out of submenus, etc. It sounds a little tedious but overall pretty trivial, right?
This is day three.
I learned React+Redux from scratch (and rebuilt the latter for fun) in twice that long.
In my defense, I've been working on other tasks (see: Alerts), but mostly because I'd rather gouge my freaking eyes out than continue on this one.
Everything that could be wrong about this is. Everything that could be over-engineered is. Everything that could be written worse... can't, actually; it's awful.
Major grievances:
1) The sidebars (yes, there are several) are spread across a ridiculous number of folders. I stopped counting at 20.
2) Instead of icon fonts, this uses multiple images for entry states.
3) The image filenames don't match the menu entry names. at all. ("sb_gifts.png" -> orders); active filenames are e.g. "sb_giftsactive.png"
4) The actions don't match the menu entry names.
5) Menu state is handled within the root application controller, and doesn't use bools, but strings. (and these state flags never seem to get reset anywhere...)
6) These strings are used to construct the image filenames within the sidebar views/partials.
7) Sometimes access restrictions (employee, manager, etc.) are around the individual menu entries, sometimes they're around a partial include, meaning it's extremely difficult to determine which menu entries/sections/subsections are permission-locked without digging through everything.
8) Within different conditionals there are duplicate blocks markup, with duplicate includes, that end up render different partials/markup due to different state.
9) There are parent tags outside of includes, such as `<ul>#{render 'horrific-eye-stabbing'}</ul>`
10) The markup differs per location: sometimes it's a huge blob of non-semantic filthiness, sometimes it's a simple div+span. Example filth: section->p->a->(img,span) ... per menu entry.
11) In some places, the markup is broken, e.g. `<li><u>...</li></u>`
12) In other places, markup is used for layout adjustments, such as an single nested within several divs adorned with lots of styles/classes.
13) Per-device layouts are handled, not within separate views, but by conditionally enabling/disabling swaths of markup, e.g. (if is_cordova_session?).
14) `is_cordova_session` in particular is stored within a cookie that does not expire, and within your user session. disabling it is annoying and very non-obvious. It can get set whether or not you're using cordova.
15) There are virtually no stylesheets; almost everything is inline (but of course not actually everything), which makes for fun layout debugging.
16) Some of the markup (with inline styling, no less) is generated within a goddamn controller.
17) The markup does use css classes, but it's predominately not for actual styling: they're used to pick out elements within unit tests. An example class name: "hide-for-medium-down"; and no, I can't figure out what it means, even when looking at the tests that use it. There are no styles attached to that particular class.
18) The tests have not been updated for three years, and that last update was an rspec version bump.
19) Mixed tabs and spaces, with mixed indentation level (given spaces, it's sometimes 2, 4, 4, 5, or 6, and sometimes one of those levels consistently, plus an extra space thereafter.)
20) Intentional assignment within conditionals (`if var=possibly_nil_return_value()`)
21) hardcoded (and occasionally incorrect) values/urls.
... and last but not least:
22) Adding a new "menu sections unit" (I still haven't determined what the crap that means) requires changing two constants and writing a goddamn database migration.
I'm not even including minor annoyances like non-enclosed ternaries, poor naming conventions, commented out code, highly inefficient code, a 512-character regex (at least it's even, right?), etc.
just.
what the _fuck_
Who knew a sidebar could be so utterly convoluted?6 -
I just want to add my 2 Cents to the all this GDPR chaos. Because I feel lots of you are missing the point here.
When reading here about GDPR I hear all kinds of fair statements of how flawed it is and how it's mainly hurting the small companies etc etc.
I agree, at this state GDPR might actually be doing more harm than good.
However, I don't think that is what it is about. It's about going in the right direction. If you read/look over the course of history we've had several technological revolutions. Industrial, renaissance. They all start the same:
"This technology is going to change everything, it's going to solve all our problems!" It's something holy. Something that shouldn't be touched or regulated, only embraced.
But as we all know it wasn't all that pretty.
Industrial revolution was hard super underpaid, dirty work. Children had to work too. People were getting sick. Lots of alcoholism, depression.
And what made the factories start taking better care of their employees? Regulation.
Once fines start to come, companies will have to adapt.
We have to learn and understand that these systems like government, company, capitalism. They're built for reasons. They all exist for reasons. And only when it is in balance, things will flourish.
So I encourage you all to stay as critical as you are, but to give it a chance. To have a bit of faith.
It might just turn into something worthwhile!
Thanks for reading!:)4 -
3,5hrs trip to Stockholm. Good time spending on devrant and working on exam project. Css3 grid everything!5
-
So I'm installing Ubuntu 18.04 iso (downloaded via Mobile Data) from an SD card through a USB adapter, (on an HDD)
What are you guys doing with your lives?7 -
Holy shit, it happened to me today, I thought it was a myth that people actually use zip for source code.
So, got the task to help out the operations team naturally I for access to the repository. I got a zip file.
#fml -
Just read that EU may planning regulating Algorithms...
What the fuck? WHAT THE FUCK?
They want that programmers make their Algorithms public accessible for transparency and say what algorithms are allowed to do, because people are scared of them?!
MY BRAIN HURTS AFTER THAT FUCKING GENERAL DATA PROTECTION BULLSHIT THEY WANT TO REGULATE HOW OUR PROGRAMS SHOULD WORK?!
AHDHSHSJSDHJABDJS SHDNSBDBSNSN *RAGEQUIT*27 -
I've been trying to query some data from an 18 GB xml DB through BaseX for about 9 hours without success.
Just wondered how LinQ would work with the same xml info. Just got the info I needed in less than 15 minutes.
God bless LinQ.5 -
Pushed to production with a debug message left in. Whoops, debug message includes the private key. Ummmm...2
-
Me: ...blockchain...
*Wanna be techies*
*Investors*
*Dude who read a few articles about blockchain*2 -
My first complete pipeline with Jenkins:
- push on gitlab
- build with maven
- test with junit
- deploy with Ansible
- integration test with Selenium
I love devops!6 -
As someone who works in Student Administration with an expensive and broken system, I often wonder why we can't just get the IT students to build us a system as part of their Final Year Project.4
-
I think I understand now why people who mastered vim recommend it.
It is so comfortable to not have to move your hands away from the writing position when you want to navigate through code.
I would really like to enable the vim keys plugin for my IDE but I think it would slow me down a lot because I'm so used to a lot of shortcuts in the IDE and not used to a lot of vim stuff -.-4 -
So I finally decided to take the plunge to dualboot my Windows 10, since I'm using Linux applications more and more than Windows applications.
I just had to choose Fedora out of all distros. It sort of worked. When I tried to install, it won't get pass the login screen (kept getting blanks). I rebooted several times and went with "Troubleshooting" and it got me passed the login screen and proceeded to install at the lowest graphical settings, i.e. 800x600
So far so good, I was able to operate stuff that I wanted but I just can't stand working in a really low resolution. My guess is probably incompatibility with nVidia driver. Tried everything, rpmfusion, the negativo17 repo, the current official fedora repo, the If-Not-True-Then-False guide, and bumblebee. None works.
Makes no sense at all. Luckily my Win10 still works. Now I'm stuck on whether to continue trying to get Fedora distro up or try a different distro and start back from square one...3 -
Tip: If you try to show LaTeX to someone and you want to show them examples, don't use the images of your search engine of choice for the examples unless you put "formula" next to it.
My teacher at least understood, lul.6 -
blockchain.
blockchain?
blockchain!
Why THE FUCK does a game of poker need fucking blockchain?
FUCK.11 -
Forms with autofocus. What are your opinions on that?
My boss keeps asking us to always give autofocus to the first input of a form, without any UX study to support it, just his opinion ("I think it makes sense"). I fucking hate it. He says it's nice for keyboard users, but I'm a keyboard user myself and I say that's what the tab key is for. To fucking focus stuff.
It really annoys me to no end when things like this are requested, but it's ok to have buttons, checkboxes, etc without fucking :focus and :active styles. Just :hover is not enough ffs.
And "links" that work with "onclick". Damn how I want to kill anyone that does that.5 -
Teacher:"You have two years before you have to hand in your coursework and final coding project"
Me:"Yes plenty of time I got this"
1 week before final deadline
Me:"WTF have I not done anything"1 -
Well, sh*t.
There is special hell for people using GOTO in C and even more special hell for people using it in *this* context.9 -
I love how "shotgun debugging" works.
Let's say the microwave doesn't work. I put my burrito in it, press buttons. Nothing happens.
Any sane person would trace the possible cause: Check if it is plugged in, maybe the fuse is blown? Nah, we don't have time for this: Let's try shotgunning it!
- Turn the burrito upside down.
- Try aligning the burrito in different cardinal directions.
- Press random buttons
- Remove burrito wrapper
- Separate burrito into single components, sort them onto a plate in a nifty layout and try microwaving that.
- Remove each component of the sorted burrito plate and try microwaving the plate with less and less items.
- Try microwaving each separate item and then later reassembling them back into burrito to see if it gets heated after the act.
- Try putting a cat on top of the microwave.
- Pour water on cat
- Notice a strong reaction involving water and the cat.
- Try catching the cat for additional testing.
- Go to the hospital to get stitches on your open wounds.
Later write a bug report to the maintainer: "Microwave doesn't work. Tracked the issue down to the moisture level of the cat, additional testing needed."7 -
My mother lives and works overseas, and she'd complain about her IT department all the time.
Wish I could get work permit to work there, but I'd have to serve in 'their' military for 2 years...
Yeah, totally makes sense. Nope.5