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 - "dev confusion"
-
*Battle music*
Wild customer appeared!
dev used Ubuntu
It's not very effective...
Foe customer used Stupid Feature-Request
It's super effective!
dev is confused!
dev hurt itself in its confusion!
dev used Reasoning
dev's attack missed!
Foe customer used Ridiculous Feature-Request
It's super effective!
dev used Rage Quit
dev fled using its Rage Quit
...2 -
Dev: boss, there are some abnormalities and confusion in the client's specifications.
Boss: So?
Dev: Shouldn't we get clear about them and then start coding?
Boss: No need. We assume and code. Then show them to our clients and then ask for their opinions. We will change again according to their opinion.
Dev: ..
A few months later....
Dev: *seeing so many specifications change and realizing now have to refactor a lot of codes* , FML.15 -
I wrote a database migration to add a column to a table and populated that column upon record creation.
But the code is so freaking convoluted that it took me four days of clawing my eyes out to manage this.
BUT IT'S FINALLY DONE.
FREAKING YAY.
Why so long, you ask? Just how convoluted could this possibly be? Follow my lead ~
There's an API to create a gift. (Possibly more; I have no bloody clue.)
I needed the mobile dev contractor to tell me which APIs he uses because there are lots of unused ones, and no reasoning to their naming, nor comments telling me what they do.
This API takes the supplied gift params, cherry-picks a few bits of useful data out (by passing both hashes by reference to several methods), replaces a couple of them with lookups / class instances (more pass-by-reference nonsense). After all of this, it logs the resulting (and very different) mess, and happily declares it the original supplied params. Utterly useless for basically everything, and so very wrong.
It then uses this data to call GiftSale#create, which returns an instance of GiftSale (that's actually a Gift; more on that soon).
GiftSale inherits from Gift, and redefines three of its methods.
GiftSale#create performs a lot of validations / data massaging, some by reference, some not. It uses `super` to call Gift#create which actually maps to the constructor Gift#initialize.
Gift#initialize calls Gift#pre_init (passing the data by reference again), which does nothing and returns null. But remember: GiftSale inherits from Gift, meaning GiftSale#pre_init supersedes Gift#pre_init, so that one is called instead. GiftSale#pre_init returns a Stripe charge object upon success, or a Gift (and a log entry containing '500 Internal') upon failure. But this is irrelevant because the return value is never actually used. Pass by reference, remember? I didn't.
We're now back at Gift#initialize, Rails finally creates a Gift object using the args modified [mostly] in-place by all of the above.
Another step back and we're at GiftSale#create again. This method returns either the shiny new Gift object or an error string (???), and the API logic branches on its type. For further confusion: not all of the method's returns are explicit, and those implicit return values are nested three levels deep. (In Ruby, a method will return the last executed line's return value automatically, allowing e.g. `def add(a,b); a+b; end`)
So, to summarize: GiftSale#create jumps back and forth between Gift five times before finally creating a Gift instance, and each jump further modifies the supplied params in-place.
Also. There are no rescue/catch blocks, meaning any issue with any of the above results in a 500. (A real 500, not a fake 500 like last time. A real 500, with tragic consequences.)
If you're having trouble following the above... yep! That's why it took FOUR FREAKING DAYS! I had no tests, no documentation, no already-built way of testing the API, and no idea what data to send it. especially considering it requires data from Stripe. It also requires an active session token + user data, and I likewise had no login API tests, documentation, logging, no idea how to create a user ... fucking hell, it's a mess.)
Also, and quite confusingly:
There's a class for GiftSale, but there's no table for it.
Gift and GiftSale are completely interchangeable except for their #create methods.
So, why does GiftSale exist?
I have no bloody idea.
All it seems to do is make everything far more complicated than it needs to be.
Anyway. My total commit?
Six lines.
IN FOUR FUCKING DAYS!
AHSKJGHALSKHGLKAHDSGJKASGH.7 -
Talked dev with my uncle today at the dinner table. Every other family member slowly backed away in boredom and confusion as we discussed spaces vs. tabs3
-
HR, why so stupid?
I'm currently living in Sweden, want to move to Austria (significant other is studying there, I'm finishing my studies over here)
Me: *Applies for a Junior Java Dev job via company's online platform*
HR1: We like your CV, be here for an interview in person in 5 days.
Me: That's expensive, can we do it via Skype? I'm still in Sweden.
HR1: How are you planning on working in Austria while living in Sweden?
Me: I'm not. I'll move to Austria in 2 months. That's when I'd like to start working with you.
Me: *wonders why they skipped that part in my CV/cover letter as it's clearly stated there*
HR1: ....
Me: Hello?
Me: Helloooo?
HR2: We're sorry to tell you that the position of Senior Database Engineer has been filled. May we use your CV for other potential openings at our company?
Me: No worries, I applied for Junior Java Dev anyways. You may use my CV for other openings.
HR2: Oh, sorry for the confusion. I just mistyped the job title.
Me: *WTF? That was a machine-generated answer. Your system filed my application in the wrong place. You didn't mistype shit.*
HR1: Oh good for you. We've suddenly found out we need a Junior Java Dev as well as a Senior Database Engineer. Do you have time for a Skype interview this afternoon?
Me: ....
HR1: Hello?
Me: ....
HR1: Tomorrow then?4 -
The one time a piece of software I was semi-responsible for maybe had been compromised. But I was student dev so I wasn't even brought into the meeting despite being the only person in the entire organization who knew how it worked. Gr8 politics, glad you hennies trust me. They came out and a good colleague of mine was brave enough to come over and ask if maybe I knew how this and that worked and I could clear up the confusion they spent 45 minutes on in 20 seconds 🙃4
-
(Dev)Life in the past 12 hours
Oh boy have the last 12 hours been a roller coaster ride for me. Noob me decided to "compile" AoSP for my device to get a taste of how custom ROMs are built from source. Overall it was fun but the errors were a very good excercise for googling, SO. Couple stuff I learnt ( possibly useful for anyone who comes here )
* The shebang line ( #!/usr/bin/env python ) on my system translated to Python 3.7 environment instead of the expected Python 2.7. Best solution I think to avoid confusion is to create a python 2.7 environment and source it.
* Get your trees right. A jar file called WfdCommon.jar ( apparently known as wifi-display common ) was the cause of several hours of hunting the fault. My vendor tree somehow didn't have this file so dex2oat was borking out like mad. I'm still amazed how I figured this one out almost by myself. ( Basically I had to check every file included in the boot class path, and find the odd one )
* I wasted a lot of time in finding the right files to change version numbers and all. Maybe I didn't search XDA properly for a guide ?
Overall it was a fun experience. Also if anyone's experienced in this area could you share resources to learn more about custom ROM development? Specifically on the tweaking part where you mix features from different ROMs to make a great ROM ( like AoSP extended or Pixel Experience ). All I could find were on the zips and not on sources.7 -
Quite a blurry one. Currently going to uni to dip my toes in some of the subfields of CS. Until now, I found more things that I wouldn't want to do than I'd enjoy.
Ultimately I just wish to sit at a desk and program all day, preferably for a public transportation company (read/hope: railway company), ideally on the route scheduling side
However, it would be nice to know what I wish to do dev-wise on the shorter run besides uni and side-projects :D2 -
I'm writing all the dev things I know in a docs site as a means to be hireable should I need to switch jobs.
I'm not gonna go too deep on how I'm doing it. One style I'm enjoying is making every article take only one page long, and if they take longer, maybe consider breaking it into another article.
Fuck long articles. Yes, that's a bit autistic.
But I will describe the challenges I'm finding (which are quite many) in further detail.
One of them is that words can be ambiguous. Production can mean the production environment but it can also mean production in plain english.
And there are tons of cases like this.
Because of this, I felt a lot of confusion in my beginner days. So it my objective to write this as to prevent as much confusion as possible.
Granted, I don't want to write "development for dummies". Software is complex. But because it's complex on its own, I don't want to add complexity to the learning process through obscure language usage.
"Fine", I say, "I'll disambiguate". But this means I find myself branching out very often into fundamental or commonly used software terms like "framework", "model", "scaffold", "algorithm", "viewport", "breakpoint", etc.
Another challenge is reaching good levels of completitude.
This means I have to explain that obscure CLI flag I never used in my life.
If I don't do this, then what makes my docs different than these superficial dev.to or medium posts? Nothing.
But trying to explain EVERYTHING about a software can generate a lot of frustration: I never finish.
It also makes me wonder "do I even know shit?". I think some amount of insecurity is healthy and pushes myself forward.
But at some point it's kind of making me feel like shit. Maybe I just need to keep learning.1 -
!dev
Well, it's time for a personal thing today, because I was hit with some shit today that I'm still kinda shook about.
So, as a bit of introduction (I've mentioned these in previous posts before but whatever, not everybody sees everything): I'm currently a senior in high school and I'm in the school's band (neither are too related, but a bit of setup for this story). I've been talking to a girl lately and I think I like her. She's fun to be around, kinda silly, and just great overall. She makes me happy and I like it. Her name is Grace, her sister's name is Taylor (just to avoid confusion later)
In the school's band, we play at home football and basketball games. Today was a basketball game. Normally when there's a game I just stay after school because I don't want to go home and come back a couple hours later, plus I like to hang out with some of the other people who do the same thing.
Grace was staying after for the game too. I was talking to her in the band room, kinda flirting a bit (on an unrelated side note, she's ticklish). Someone comes in the band room because he wanted to practice a bit, to get ready for the game. She's going back and forth between the band room and somewhere else (not too sure where she was). At one point I left to get a drink, come back, she's sitting next to him, just talking. I join the conversation, and her sister (Taylor) comes in, to get ready herself.
I go over to talk to Taylor for a minute. She looks at Grace and the other guy, then looks at me and just says "separate them". To which I said "...what? why? how?"
Me and her go outside the band room and she tells me that basically the guy has been cheating on his girlfriend with Grace, and it's just hurting everyone involved, except him basically. His girlfriend doesn't seem to fucking care, and he's done it before with someone else. (The other person actually like vaguely mentioned it to me a long time ago, but I didn't really know what she was talking about until now)
So basically, dude's cheating on his girlfriend with Grace. And I like Grace. Honestly don't know what the fuck to do. I want to do something because whenever something's going on with Grace, her sister always trusts me to make sure shit goes right. Some times when Grace wouldn't eat, her sister would always talk to me and ask me to make sure she actually eats.
Fuck guys. This stuff has been on my mind for the past ~4 hours and I don't know what to do, or if I even can do anything about it. I just needed to get this shit off my chest.
Sorry for the long personal story. Some parts I didn't really articulate very well. Honestly it was more of me just getting everything into words.4 -
Which movie or TV show do you think has caused the most damage and confusion about how programming actually works?
For me it's Silicon Valley with their "Tabs VS Spaces" scene where the dev who advocates spaces actually hits the spacebar key 4 times manually.
(In reality no does that - everyone just hits the tab key and most Editors convert the tab into 2 or 4 spaces bars on your setting. In fact a vast majority of github repos use spaces - despite some of their devs now thinking "I use tabs")1 -
After some time, planning to install Linux again for personal use and some dev work at home. My current pc is getting too slow sometimes and it irritates me a lot.
My current pc 2gb RAM, Dual core Intel, 32 bit.
Main criteria, os should be fast, I can compromise on GUI, should be stable, should support my old configuration. I like to work on Java/Scala, python, js and sql. Eclipse will be there since I use it at work.
Short listed Ubuntu 16.04.2 LTS,
mint (huge confusion on gui),
Opensuse, elementary OS and arch. I had Ubuntu, mint for some time as secondary OS. Arch will be totally new world for me. I have tried few OS in USB boot but couldn't fix one.
Right now I am confused about which one to choose, since everything looks fine but I want the best choice based on my criteria.9 -
Last week summary:
-questioning my identity (I’m cleaning and realised I forgot I used to like many activities I forgot and decided to give them more time)
-questioning how tf my unconscious seems to always plan ahead of me (ah yes I can do this cause I prep… why tf did I prepare for this?)
-questioning my skills (just a standard imposter syndrome, nothing to see here, move on)
-questioning my worth (as above)
-questioning how tf somebody connected to a secret account I have (spoiler: they don’t know and it’s a crazy coincidence… but now I know secrets about them 😏)
-randomly freezing during everyday life for all the above points
Job wise all is cool, tho 🎊2 -
So here is the question.
Am a CS student and interested in app development languages like C++ and C#. And leaning a lot about those languages and practicing.
Today in our class some member from **** company came and they told us that are going to arrange a 2 days workshop for php, JS, Ajax, HTML and CSS languages. After that they are going to offer a internship also. 😃
So should I go or not?
Intrested in app development but still wanted to have knowledge about web. Really confused on what to do! 😕😕😕8 -
Might of just shot myself in the foot. Asked user on screen record to open dev tools by pressing f12 and click into console so I could visually see if any errors occur.
What have I done...the questions and confusion are overflowing. -
Not dev related.
Two incidents that I'd like to share.
So here in India two major streams for college are engineering and medicine (others do exist). So entrances to both these colleges are based upon entrance exams. So here are two "events" that happened this year and worth mentioning.
Incident 1:
The exam for the engineering stream had a section where the answer is a number with up to two digits of decimal. Range is (0.00 - 9.99) So apparently this two decimal precision created some confusion and the court decided that if the answer is precisely "seven" then only the candidates who've marked 7.00 are given marks while those who marked 7.0 or 7 were given wrong answer.
Incident 2:
So for the medical entrance, exam was for 720 marks (180 questions * 4marks each). So every candidate from the state of Tamil Nadu were given a full 196 marks as bonus because the translations from English to Tamil we're inaccurate.
Now I need to mention that around 300 marks would fetch a decent seat in a government college.
What the fuck is happening? One the only thing they're supposed to conduct every year is also messed up. And who the fuck created complicated shit like 7.00 is correct while 7.0 and 7 are wrong. I mean should the candidate worry about the getting the answer or marking it?
For those who don't know wrong answers are penalized heavily and there's huge competition.
https://m.timesofindia.com/home/...
https://m.timesofindia.com/india/...1 -
People, help me out.
(first some abstract thoughts)
I am a final year undergrad yet to take steps in the world and i am trying to figure out what to do with my time, what my end goal and next steps should be.
As of now I think my end goal is "relaxation , peace and happiness of me and my loved ones", and to reach there , i need money.
My younger self chose engineering for a particular reason(that i vaguely remember) and weather it was a right or wrong/illogical decision, i guess i am stuck with it and have to use this only to reach my end goal.
Maybe i am regretting this and want to change. Maybe i am just a lazy ass who is bad in his assigned role of an engineer and is running towards glitter in other fields, whatever it is , i am not going against the decision of my past and accepting my identity as an engineer.
I believe once i am able to achieve my goal( that am still not sure about but overall is a good one from general perspective), i guess i will be satisfied
------------------------------------------------
(enough with the deep stuff)
I want to learn how to "learn" . like i am always conflicted about what to do next once the tutor leaves my hand.
for eg, let's say i goto a site abc.
1. They got 1 course each for android , web dev and ai. I choose the web dev course and give my hardworking attention to it
( At this point my choice is usually based on the fact that <A> i should not be stupid to buy all 3 course even if i have money/desire to buy all of em because riding 2 horses is only going to break my ass and <B> some pseudo stats like whichever got more opportunity, which i "like", etc(Point B is usually useless in the long run i guess) )
2. From what i have experienced, these courses usually have a particular list of topic that they cover and apply them to 1 or 2 projects. For eg, say that my web dev course taught me 20 something concepts of basic html/css/js/server and the instructor applied it to blog website
BUT WHAT IS NEXT ?
2.1.
>> Should I make more projects using only those particular list of concepts?
I usually have a ton of ideas that i want to implement now that i know how to build a blog site.
say i got a similar idea to make say url shortner. I start with full enthusiasm but in the middle way there is some new thing that i don't know and when i search the internet, i realize that there are 5 ways to implement such concept, making me wander off towards a whole list of concepts that were not covered in my original 20 concept course. This makes the choice 2. 2
2.2
>> Should I just leave everything , go to docs and start learning concepts from the scratch ??
Usually when i start a project, i soon realize that the original 20 concepts were just the tip of iceberg and there are a ton of things one should know, like how os works, how a particular component interacts with another, how the language is working, how the compiler is executing, etc .
At that point i feel like tearing all my notes away, and learning every associated thing from the scratch. No matter how much my project suffers, i want to know how the things are working from the bottom , like how the requests are being mad, how the routes are working, etc which might not even be relevent for the project.
Why i want to follow approach 2? because of the Goal from abstract thoughts. in theory, having deep knowledge is going to clear my interview thereby getting me a good job.
I will get good money, make projects faster and that will be a happily ever after story.
But in practical this approach is bringing me losses and confusion. every layer of a particular thing i uncover, turns out there is another layer below that. The learning never stops. Plus my original project remained incomplete.
What is your opinon, how do you figure out what to do next?8