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 - "picker"
-
This code review gave me eye cancer.
So, first of all, let me apologize to anyone impacted by eye cancer, if that really is a thing... because that sounds absolutely horrible. But, believe me, this code was absolutely horrible, too.
I was asked to code review another team's script. I don't like reviewing code from other teams, as I'm pretty "intense" and a nit-picker -- my own team knows and expects this, but I tend to really piss off other people who don't expect my level of input on "what I really think" about their code...
So, I get this script to review. It's over 200 lines of bash (so right away, it's fair game for a boilerplate "this should be re-written in python" or similar reply)... but I dive in to see what they sent.
My eyes.
My eyes.
MY EYES.
So, I certainly cannot violate IP rules and post any of the actual code here (be thankful - be very thankful), but let me just say, I think it may be the worst code I've ever seen. And I've been coding and code-reviewing for upwards of 30 years now. And I've seen a LOT of bad code...
I imagine the author of this script was a rebellious teenager who found the google shell scripting style guide and screamed "YOU'RE NOT MY REAL DAD!" at it and then set out to flagrantly violate every single rule and suggestion in the most dramatic ways possible.
Then they found every other style guide they could, and violated all THOSE rules, too. Just because they were there.
Within the same script... within the SAME CODE BLOCK... 2-space indentation... 4-space indentation... 8-space indentation... TAB indentation... and (just to be complete) NO indentation (entire blocks of code within another function of conditional block, all left-justified, no indentation at all).
lowercase variable/function names, UPPERCASE names, underscore_separated_names, CamelCase names, and every permutation of those as well.
Comments? Not a single one to be found, aside from a 4-line stanza at the top, containing a brief description of that the script did and (to their shame), the name of the author. There were, however, ENTIRE BLOCKS of code commented out.
[ In the examples below, I've replaced indentation spacing with '-', as I couldn't get devrant to format the indentation in a way to suitably share my pain otherwise... ]
Within just a few lines of one another, functions defined as...
function somefunction {
----stuff
}
Another_Function() {
------------stuff
}
There were conditionals blocks in various forms, indentation be damned...
if [ ... ]; then
--stuff
fi
if [ ... ]
--then
----some_stuff
fi
if [ ... ]
then
----something
something_else
--another_thing
fi
And brilliantly un-reachable code blocks, like:
if [ -z "$SOME_VAR" ]; then
--SOME_VAR="blah"
fi
if [ -z "$SOME_VAR" ]
----then
----SOME_VAR="foo"
fi
if [ -z "$SOME_VAR" ]
--then
--echo "SOME_VAR must be set"
fi
Do you remember the classic "demo" programs people used to distribute (like back in the 90s) -- where the program had no real purpose other than to demonstrate various graphics, just for the sake of demonstrating graphics techniques? Or some of those really bad photo slideshows, were the person making the slideshow used EVERY transition possible (slide, wipe, cross-fade, shapes, spins, on and on)? All just for the sake of "showing off" what they could do with the software? I honestly felt like I was looking at some kind of perverse shell-script demo, where the author was trying to use every possible style or obscure syntax possible, just to do it.
But this was PRODUCTION CODE.
There was absolutely no consistency, even within 1-2 adjacent lines. There is no way to maintain this. It's nearly impossible even understand what it's trying to do. It was just pure insanity. Lines and lines of insanity.
I picture the author of this code as some sort of hybrid hipster-artist-goth-mental-patient, chain-smoking clove cigarettes in their office, flinging their own poo at their monitor, frothing at the mouth and screaming "I CODE MY TRUTH! THIS CODE IS MY ART! IT WILL NOT CONFORM TO YOUR WORLDLY STANDARDS!"
I gave up after the first 100 lines.
Gave up.
I washed my eyes out with bleach.
Then I contacted my HR hotline to see if our medical insurance covers eye cancer.32 -
!rant
We just finished implementing a lot of features including notifications and emoji picker in "Post Rant" page! Big props to @Dacexi
Relevant Collab: https://devrant.io/collabs/420025/5 -
I just sent an email to a client about a bug fix with Bootstrap 3 Date/Time Picker, which was not working with Firefox and Safari.
My email was like this "The bug has been fixed and it will work on most browsers except IE and Edge."
He replied "Great!! I don’t like internet explorer anyway…"
I love these kinds of clients.4 -
Any eyedropper tool on linux that works in 2 click or shortest amount possible? Like instant eye dropper tool on windows, I don’t need stupid pallete on the color picker, I just want to grab the color asap with little effort18
-
While working on my one of the first project in java i ended up using deprecated Calendar API for the date. Since deadline was near i thought it would be a good idea to use the JCalendar API for as date picker (which is a third party API).BAD IDEA. It was the night before the submission round about 11pm when i realized that there is no way to convert JCal object into Calendar and it turned out it is not working as expected you have to subtract a particular number from the year to get date right.
To convert JCal into Calendar i used the toString function to get the date in string sliced it using substring into year,month,day then had to assign date to Calendar object via constructor.
Had to write 70 lines of code just to convert JCal into Calendar...
And then there were other complications related to this problem. Had tu pull an all nighter just to solve date related problems
LESSONS LEARNED :
NEVER USE A DEPRECATED API
NEVER USE THIRD PARTY APIs WITHOUT RESEARCH7 -
I gave you a nice date picker to use but instead you choose to type in the date. Type in an incorrect date and then yell at me for it. If I could enter the dates for you , you would not have a job .... stupid users4
-
Sitting in my backyard, trying to mentally troubleshoot some coding issues in the fresh air, and I hear my neighbor say, "...she was picking her bum before..."
Back inside I go.2 -
Rant. (I love and respect all people! Especially developers.)
You frontend imbecils! I just can’t deal with you any more. I’ve had it.
Stop-inventing-new-components-where-there-are-fully-developed-and-working-concepts!
I mean. Just fucking stop! If I see another worthless datetime picker with an ”innovative” design I am going to hunt you down and freaking scream in your face.
And make fucking buttons look like tappable/clickable. It’s not fucking hard! Imbecils.
Oh, ooo, look at me, I am a frontend developer and I am in UX la-la land and what I am doing is sooo hard. Fuck off with your fucking moving gradients and n:th-child childish playground.
”Yeah, I exchanged the spinner…”
Fuck you. Your not contributing. Nobody cares! We’re not doing anything for the business by having a web which can be seen on a fucking telephone. EVERYBODY IS SITTING WITH SEVERAL GIANT MONITORS AND A FUCKING WORKSTATION FOR THIS. NOBODY ASKED FOR IT. AND YOU SPEND COUNTLESS HOURS ON IT.
”Yeah, I made the site work on ipad”
Please. Why? It’s not worth anything. Zero value.
”Yeah, the toggle component is now changed since we started to use the biddle-flipflup lib and it works almost the same”
No! NO! It does not work ”almost” the same. The psychology of the toggle is now wastly different. What was On before now looks like Off and it is fucking worse!!!
Imbecils. I hate you.
And no, I can’t do your fucking work! And I know that you do other non-ui stuff as well sometimes… but anyway… I have no interest to be in that clusterfuck that modern frontend is today. It was really fucking bad twenty years ago and it is just as bad today and you are not helping.
”I’ve improved the button so now it aaaaalmost does not look like a button. But I am getting there!”
Fuck you.14 -
cool...my date picker switches month and days when picking a day after the 12th...
I don't even want to google this...1 -
User: This web page form is too hard to use and is prone to have wrong data filled out.
Me: Uh...ok. Here is a redesign. You literally fill out one text field and a date picker.
User: Oh this is great, thanks.
*checks the database and the very first entry they created had the wrong date.*
Fuck me.6 -
Now that I have a ++, I changed my BG Color so that it looks nice but I think we need a full color picker now.
BTW @dfox any ++ privileges on this? Maybe you could add my Drafts feature 😉😏7 -
A couple of weeks ago I had an internship. I worked there with a classmate. We had a simple assignment, but since we're noobs when it comes to web applications (and because you don't learn that in school), we even had a hard time preparing.
Finally, I... I mean "we" decided to use React because it's close to the way we learned to solve problems in school. I asked him to implement a page with a date picker/calendar. I even searched for a repo that. 2 Days later he was still not able to implement it, he experimented with the code, but he
1. didn't even read the readme, just copied the tutorial expecting it to work
2. Didn't even look at the logic behind it.
3. Demanded to use this other repo with less functionality
10-30 minutes should have been more than enough. Instead, I wasted time telling him to read and code properly. He refused the second (and probably also the first), because "Why should I care? We'll be here for 3 weeks and then we're done with this"
Guess whom I'll avoid in any possible group project3 -
I hate hate hate React! Sorry but to me it's just such a bloated pos of a framework. I realize it was pretty revolutionary at first, the idea of having everything "reactive" and all of that - but newer things like Svelte.js are a dream to work with, whereas trudging through the poorly coded React app I'm supposed to be testing for work is making me want to pull my hair out! I installed a vscode tool so everybody could see what the import "cost" is on everything - a simple INPUT is 50KB of pure BLOAT for something that should and can be way simpler.
I realize there are probably better coded apps out there that wouldn't drive me so crazy, but anybody importing hundreds of KB of 3rd party crap just to get a select box, some inputs, and a date picker are really out of their mind.12 -
I can't begin to know where to start. I once worked with a lady that was annoyed by me for stretching and began to start nagging at me for it. I promptly explained to her that hearing her complaints annoyed me as well and that I stretched and yawned because my work made me sleepy due to the fact that I had to listen to her relentless and incessant nagging.
I currently work with a "graphic designer" of 25 years experience who had no idea that color picker tools were an actual thing in real life. He's been eyeballing our brand colors for years. SMH... We collectively refer to him as Captain Colorpicker now.
This same guy had never used a credit or debit card in his entire life to purchase a meal at a restaurant.
I worked with a micromanager that constantly reminded me daily of the hierarchy for decision making in the company and where you stood firmly under her thumb. That is until she conveniently wanted shy away from a tough decision. Then it was all on me.
She was the marketing director and every single one of these stupid titles:
http://memeburn.com/2013/05/...
I am in a company as a shareholder with a partner who threatened to take away my shares on several occasions when I don't agree with him. At the time our company was in debt, capital accounts were low, and we were hemorrhaging money to keep afloat. The dumbass tried to offer me $200 per share to "buy me out." The company was $5,000 in the hole and my shares were worth around -$11 each. He never had that much money. -
How am I supposed to know which fr*cken whitespaces they are…
The tooltips don't even display!
Plus, emojis get descriptive names in their tooltips. These characters' tooltips are JUST THE CHARACTER ITSELF.2 -
GWT.
Let me explain:
Tl;dr : someone fucked up, I took shit, it was a gwt project. In a sense I don't hate GWT because of the framework itself but because how I was introduced and forced to "work" with it.
Context:
Was working as a paid intern at a small company there were 3 devs 2 interns and one senior employee that only worked from home handling the shit ton of legacy VB6 code he wrote over several year and a boss with no technical knowledge. (Other unimportant people as well)
I was working with their DBA (cool dude) because I was writing statistic and report generating software.
Story:
The other intern was tasked of doing a gwt app that was supposed to use a input file.
Rather than asking the user to upload it with a file picker (I guess they exist in gwt I didn't got to dig in the framework) he was trying to load the file with a http request directed at the same host the app was running on.
It did not work.
Then his contract was other and the app was left in an unfinished state.
The boss then tried to have the app deployed, the remaining dev dodged the bullet invoking some bullshit because he was clearly incapable of doing it.
So it fell on me, couldn't deploy the app because it was not even close to working.
Tried to fix things and make it work.
Turns out he thought it would take me 3h to deploy when I clearly explained that the other guy didn't finish the app.
Boss got mad, threatened to ruin my studies and my future career.
Couldn't because my uni had my back.
Didn't want to see me anymore.
Couldn't break my contract.
Told me to work from home for the end of my internship.
I got 3 weeks early vacation and got paid, fuck him, fuck GWT, fuck his company.
Still got well marked for the internship as my supervisor was the DBA who was happy with my work.
Morality:
Don't let your intern unsupervised, don't let your main dev work from home when you don't know shit, don't piss me off and send me work from home. -
I’m currently working on the profile view in JoyRant, which turns out to be much more work than I thought.
Anyway, after many iterations on the appearance, I’m now finally satisfied about how it looks and works. Especially the category picker (Rants, ++’s, Comments, Favorites).
What do you think? Do you like it?4 -
Fuck testing react native apps with Detox ! I can’t select a value in a picker no matter what I do 😭2
-
Apps having their own image picker is annoying.
I hate when apps don't have option to upload image by picking the system picker but instead show their own picker which sucks, you can only pick recent ones otherwise you need to scroll down, there is no search option or any filter at all, just allowing system picker is better, it allows all kinds of searching and Google photos picker also allows searching by dates, faces etc. No point reinventing that, I hope it becomes mandatory to only use system filepicker like it's in web browsers, this can also avoid giving access to entire filesystem when you only need to upload one image.1 -
We had a group presentations today, and one group had a simple home screen for a reservation system. It consisted of a date picker and some labeled buttons.
My teacher said, "I don't like how the date search field isn't labeled, I don't know that, that field is for a date".
It's a date picker, that date icon is a universal sign for pick a date, the group said.
He was our programming teacher in our first year 🙈7 -
Please tell me why my boss thinks instead of just implimenting a language picker, it's a good idea to:
1) store the browser's language option in the DB only for new users, but only the first time they log in, never again.
2) never give existing users the ability to change language, and just default them to English.
3) deal with all upcoming language change tickets by having devs manually do DB updates ON THE LIVE PROD DB.
I'm screaming.2 -
Bug report:
iOS 10 (latest) + iPhone 6
Can't scroll past initially loaded rants on algo screen
Also, love the new tag picker...14 -
_FUCKING_ damn... I just struggled for well over an hour because some icons on my site were displaying different colors in my browser than when viewed otherwise. They're simple icon outlines which should be #111111, but in the browser after checking with a color picker (they were clearly off) the color was #181818.
Turns out it's got something to do with the way gimp exports the png (I think, still not 100% sure sadly). My guess atm: in the export settings the "Save color profile" option was enabled (not sure why, could be I did that at some point). After clicking "Load Defaults" the option is disabled, and after another export the colors look good.
Time wasted :( Feels good to have it fixed though. Does anyone know more about what "Save color profile" does and if that could be the cause of this?2 -
Is Google trying to win a "who can create the shittiest file picker" award?
The file picker of Android OS can not even remember the last selected sorting options, and its default sorting is alphabetical. Does anyone really use alphabetical sorting? Sorting by the last modified time or by size is far more useful than alphabetical sorting can ever hope being.
The only use for alphabetical sorting is sorting files with incorrect time stamp attribute but a correct time stamp or number in the file name.
The file picker of Android OS also features pull-to-refresh. As already said, pull-to-refresh is not a helpful shortcut but a useless anti-feature. ( https://devrant.com/rants/9831669/... ) Why would anyone need to refresh in a file picker? How likely is a file to not exist before opening the file picker and then appear while browsing for the file? All pull-to-refresh does here is draining the phone battery by reloading the thumbnails.
The file search feature of the Google file picker can only search the entire storage. A search can not be limited to the currently viewed directory. Even the file picker of Windows Vista from 2007 could search only the viewed directory.
Obviously, it lacks any kind of range selection. No A-to-B selection that is like shift-click selection on desktop, and not even the inferior drag-to-select that Samsung has implemented, which would still be better than annoying individual selection.
Microsoft could build a better file picker at a time some of us were in primary school than Google can build today. Come on, Google, just scrap your garbage software and go copycat Microsoft. Useful plagiarized software is better than useless self-made garbage.
At least the Google file picker does one thing right: It remembers the last directory the user picked a file from and opens it next time.8 -
Had to be appcelerators titanium (weirdly I think this app was built with it).
I used it in the early days, before they had the foresight to add a date-time picker for Android.
It was a horrible unforgiving place, bugs on top of bugs, horrible documentation, incorrect instructions, and hacky workarounds posted as official installation instructions.
I'm not sure if it's gotten any better now, but I did give it a go again 2 years to update an app for someone. They made so many breaking changes, which is fine, but the new outcome offered less features and required more boilerplate code. I then spent (literally) 3 hours trying to get the Android simulator to run the app. Titanium just kept timing out and throwing incomprehensible errors. I eventually gave up and told my friend I updated it, it compiles but I can't test it.
Will never touch it again, and will never be used in any team I work for. Just awful.1 -
On the one hand, as an avid programmer having a non-programmer partner, we (I) once wanted to mod some Gameboy Pokémon games (Crystal), but the games were written in Assembly and I was definitely not getting myself into that. My partner was rather sad, as this was quite a big project for the both of us, but it was never finished, and it was still complicated to explain to him why Assembly is such a bitch. Nevertheless, we found other projects to have fun with (simplest of them: random movie picker that chooses a movie based on title/genre/etc. from our own movie list file).
On the other hand, explaining and making programming exciting for people who are not into it, so you still seem like an interesting person for new dates (poly relationship), is really hard. But I would also blame my introverted self and not only programming for unsuccessful dating :D -
Just got an Android app project from friends, but already have a bad feeling about it.
It already start with 11 freaking screen, an input activity with 17 field(include spinners, date picker, location picker, and a freaking table). 3 different account type, each has different item and function visible to the user. 5 main feature, one of it include *chat* that supports multimedia, A freaking alarm system, both scheduled and automatic based on certain parameter with push notification, and deadline at January 1st with teams of 3 people :)6 -
Automatically copying screenshots to clipboard has never been a good idea to begin with.
The screenshot feature since Windows 8, the full-page screenshot feature from the Firefox developer tools, and many smartphones automatically copy screenshots to the clipboard, which usurps the existing content of the clipboard If there is a clipboard manager (like on Samsung smartphones since at least the early 2010s), it usurps existing entries since clipboard managers only hold a limited number of entries. On Samsung's keyboard, that's twenty.
Thankfully, some other tools like gnome-screenshot for Linux make it optional. There is a "copy to clipboard" button on the file naming dialogue, but it does not happen unsolicitedly. This is the user-friendly way to do it.
Most websites and mobile applications do not support pasting screenshots from the clipboard anyway, only attaching them as file through a file picker or drag-and-drop gesture, making it pointless to copy screenshots to the clipboard. If I want to send a screenshot, I will attach it as a file.7 -
wanted to write my own JavaScript base calendar date picker instead of using the jquery one. really hate the idea of requiring jquery in my compiled script just for the calendar.
but the thought of mobile respobsifying the calendar UI kills me.... then there's cross browser support 😫3 -
I hate Mondays...
So, Yours truly, the multilingual flightless bird leaves his apartment... Locks door... Fucking key gets stuck in lock (had some attempted home invasion attempt last year, left a few things bent).
The last thing I can use today, important project to work on with a deadline close enough to worry about.
I would say that's a classic Error 500 on login kinda situation.
The irony? I fancy myself a pretty good lock picker(A must have for an aspiring pentester) .
Luckily, a quick squirt of gun oil resolved that one... Seriously, how do people manage without a supply of tools and stuff?2 -
I'm building an Android App and need to implement multi option selection using images. Tried google searching "android libraries for multi-option selection using images as option items just like Medium.com" but i keep getting links for image picker libraries instead.
Have you ever come across any? cus i'm not ready to implement that from scratch. Thankee2 -
I was filling a questionnaire through SAP Ariba ..
The loading time, the way you can upload files. The tree structure of the questionnaire, and their date picker. Everything is perfect no struggle with it at all.
PS: I spent about 2 hours filling it and I am not done yet! -
Umbraco updated so a Content Picker now returns a collection of IPublishedContent rather than their IDs. Fantastic.
Except, upgrading from an older version is now more tedious. -
It's 2023 and smartphones can't even properly upload files in background.
When an upload is running in background while I watch YouTube or use other apps, the upload just stops at some point. The speed indicator in the top bar goes down to a few KB/s and I know immediately the upload has stopped well before it could have finished.
When re-opening the tab, I see a blank page and a loading bar. This means the tab has unloaded. Now I will have to re-select all those files again, which comes with its own troubles ( https://devrant.com/rants/9879401/... ).
Mobile browsers need to have a "protect this tab from unloading" option. Samsung already introduced a "keep open" option in the task switcher to protect individual apps from unloading in background. Why not do this on tab level?
Once the user locks their screen, this alone might interrupt the uploading process. On laptops and desktop computers, the upload keeps running in background.
Come on, this should be as easy as childs' play for billion-dollar corporations. Aren't smartphones "smart" enough to detect that a page is currently uploading files so its tab is not unloaded?
If smartphones can not accomplish this simple task that desktop computers and laptops can easily handle since the 2000s, it is a sad and embarrassing state.5 -
Hang on image selection dialog.
I'm on Android (MIUI 12) and for a long time I've not been able to select an image. Whenever I go into the picker it slows to a crawl. Even when cancelling the pick devrant is all but frozen. I have to kill it and start again to get back. Selecting an image will make it just show a black screen. Does anyone else experience this? -
I still don't understand why the swift image picker controller doesn't allow me to pick more than one photo at a time!
-
Why in all fucks would you NOT preconfigure your language client BUT provide a shitload of highly biased default shortcuts just IN CASE some sorry soul took time to preconfigure one.
I'ma be totally honest here, Neovim has lost its way. Every single day I pick it up there's a fuckton of shitty new default bindings...
But that's not the worst of it
You see, they've cramming all sorts of shitty code in there. Like this one default commenting plugin... It does in 600 lines what my setup does in 50. Why? Because, while mine uses the lpeg lib maintainers decided to cram into the editor, the other does a fuckton of hacks so fucked that refactoring is impossible, impossível! Despicable.
Now, their C codebase... Ok, ok arena beats vanilla malloc, alright, kudos to that, BUT refactoring out that old fart of quasillions of legacy C? MADNESS! They should be focused on adding built-in auto completion??? Well-defined syntax highlighting conventions? A FUCKING FUZZY PICKER for fucksakes!! But, oh no, we've got better things to do like FUCKING THE USER IN THEIR ASSSSSSS
--
DIS-FUCKINGTRESSED here
FUUUUUUUUUCKKKKKKKKKKK6 -
what is wrong with android storage access hierarchy?All i want to do is to make a file explorer app which could show user a list of all the files on their device and memory card(if available), but its been days and i cannot find a proper way for that.
I checked all the Environment class methods and context.getFileDir()/other methods of ContextCompat , but they either point to emulated storage or the app's folder, but not the sd card. I have scratched my head and pulled all my hairs out researching a lot deep into this area, but found nothing. The only thing that works sometime is the hardcoded paths( eg new File("/sdcard") ) , but that looks like a terrible hack and i know its not good.
I have also read briefly about Storage Access Framework, but i don't think that's what I want. From what i know, SAF works in the following manner : user opens my app>>clicks on a button>>my app fires an intent to SAF>> SAF opens its own UI>>user selects 1 or multiple file>> and my app recieves those file uris. THAT'S A FILE PICKER, AND I DON'T WANT THAT.
I want the user to see a list of his files in my app only. Because if not, then what's the point of my app with the title "File explorer"?7 -
Using input type time and the format is set by chrome language.
Is there any way to force 24h-format other than change locale if using a external library such as date picker isn't an option?
I have found out that South African is a locale in English with 24h-format time. -
Live Color picker, I had developed this project almost a year ago. It was when I had started learning python. I wasn't aware of devrant back then so couldn't upload a rant for review.
But as they say it's never too late to start
I would like to have some reviews on this beginner project of mine. 😄
https://github.com/globefire/...1 -
Do read my article on Live Color Detector using python. I would like some feedback from you guys.
https://myblindbird.com/mini-projec...
It would be really helpful to me.3 -
I'm try to make a color picker browser extension and I want to open eyedropper element in firefox using `EyeDropper` api but it doesn't support in firefox it is only support in chrome, is there any alternative of it in firefox?8