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 - "parameters"
-
Boss: “Our YouTube channel doesn’t look at all like our website.”
Me: “I’ve made it look as close to our branding as YouTube allows for with its limited editing controls.”
Boss: “This is unacceptable. I expected more from you.”
Me: “I cannot accept the blame for this. YouTube is setting the design parameters for all channels and I can only do so much.”
Boss: “You can call the YouTube, can’t you? Why didn’t you call them?”
Me: “.......and ask them....what?”
Boss: “You don’t ask! You tell! Our company has been around for 140 years. Our brand name carries that weight. They’ll change their design to what we need if you’re assertive enough.”
Me: “Ma’am, that’s just not how this works. That’s not how any of this works.”50 -
Next time I see a constructor with 22 parameters. I'm gonna report whoever wrote that to the police40
-
Asked a girl what would she like to eat and gave her two options. She answered "Ok. Let's go".
Error cannot find parameters in line 212 -
java --version
FATAL: Unknown parameter
java -v
FATAL: Unknown parameter
*googles get java version*
java -version
openjdk version "1.8.0_252"
FUCK YOU20 -
Do not continue reading if you value your life.
Visual fucking studio 2015 installation. MOTHERFUCKER !!!
OK new project will only work on VS2015. Need to download it. OK, go to MS website. Project works with community edition. Fucking great. Download the installer. Run the installer. MOTHERFUCKER DON'T OPEN THE FUCKING BROWSER TO THANK ME, YOU FUCKING FUCK. Ok...Wait to download the packages. One fucking eternity later download completes. FUCKING GREAT. Proceed to package installation. After two fucking hours installation progress bar stays the same. Google "vs 2015 installation stuck windows 7". MOTHERFUCKING BACKGROUND PROCESS IS FUCKING STUCK AND INSTALLATION DOES NOT CONTINUE. FUCK YOU. I'VE LOST TWO HOURS. OK, stop the process. Installation gets cancelled. Run the installer again. STOP THANKING ME YOU PIECE OF SHIT :@ OK, check again all downloaded packages. All good. Continue with installation. Installation completes. MOTHERFUCKER WHY YOU WANT TO RESTART THE WHOLE SYSTEM ? FUCK YOUR WINDOWS UPDATES. Ok, restart and be done with it. SSD to the rescue. Try to set up the project.
MOTHERFUCKER I DIDN'T INSTALL THE C++ PACKAGES. WTF WERE YOU DOING ALL THAT TIME? OK, run installer again and install C++ packages. I SWEAR TO GOD MICROSOFT, IF YOU THANK ME ONE MORE GODDAMN TIME, YOU'RE GETTING HATE MAIL.
Ok, installation completes. It's coding time. NO BITCH. VS2015 silently crashes after splash screen. :@@@ Google wtf is wrong again, turns out the C++ packages fuck shit up. Ok, pass some arguments to devenv.exe to reset. Restart VS. Ok, seems to be working now. Make a test project. Fucking awesome. Close VS and get the project files from perforce.
OK, files downloaded. Open VS again....
VS: "You're my bitch, you won't code today. Run from console and pass some shitty reset parameters"
YOU FUCKING FUCK. GO FUCK YOURSELF UP YOUR FUCKING ARSE. Ok, pass the parameters from console. Run again. Same "you're my bitch message" :@ OK, run with administrator rights, opens like charm. Run without admin rights again, "you're my bitch message". :@@@@@
Restart system, VS2015 finally opens project normally. Build project, 6934 errors.... :@ I'M DONE ! IM GOING BACK TO LINUX PROJECT. FUCK YOU ALL.18 -
I worked on a greenfield project a couple of years ago. The company had an old solution written in Omnis (heard of it? Yeah, me neither) with an SQL database. My team was to create a completely new web based system... on top of the old database, so the customers could keep their existing stuff.
The dba was an intelligent man, one of the nicest people I've met, and over the course of fifteen years he had made a remarkably terrifying monstrosity of a database. Some years before me they wanted to "future proof" the system and make it "easier to switch to new technologies". So they moved the entire business logic into the database...
I used a tool to create a visualization of said database when we started. It had no views, only tables and sprocs. Look at it! Tables and sprocs are rectangles (well, dots) and any connections are drawn in grey lines. There were no foreign keys, so a tables only visualization only yielded a collection of independent rectangles without a single line.
Now, the stored procedures were bloody MASSIVE. A single procedure that only registered a new interested party and attached them to a property had 2500+ lines and over 150 parameters.
Also, this dba added features and fixed bugs by logging into the respective customers production server and writing SQL.
That database is the stupidest thing I've ever seen a developer do.35 -
Got a phishing email with name-pw sent as get parameters so i did what ever respectable human would have16
-
I guess that is what you get for bringing up security issues on someones website.
Not like I could read, edit or delete customer or company data...
I mean what the shit... all I did was try to help and gives me THIS? I even offered to help... maybe he got angry cause I kind of threw it in his face that the whole fucking system is shit and that you can create admin accounts with ease. No it's not a framework or anything, just one big php file with GET parameters as distinction which function he should use. One fucking file where everything goes into.21 -
Today I felt sorry for my boss.
Story behind it:
My boss always encourages me to do the right thing. One of those right things is to enforce quality gates in our build pipelines which, as many of you know, means that the build fails if certain quality parameters are not met. Now an external vendor team merged the code this past thursday for a large feature that they had been working on and our build failed majestically throwing out the statistics and the offending files and lines of code.
All hell broke loose and there were escalations and what not and people working extra hours and over the weekend to try and get it right. So, I get a call from my boss earlier today to explain to me how important it is to release the feature and how it's going to be very bad if we don't. He was trying to justify his ask which was to lower the quality criteria and let the build pass for this week. Of course the dev in me was furious but then I realized it's not him but the corporate culture. Why would he or anyone would risk losing their jobs over the quality of code?
If you work at a place where IT is a support function of the company's primary business, I understand the moral compromises you guys have to make sometimes to keep the ball rolling. Thank you for your effort to make the world a better place.
So, thank you boss for all your support. I know it's not always up to you to decide on things but keep up the good work.4 -
WTF your function takes in 12 parameters!!! Then it checks one and pass the rest to another function!!12
-
It would be really FUCKING great if NodeJS or mysql could give me a FUCKING shout or ERROR MESSAGE when one of the parameters I'm giving is not the RIGHT FUCKING DATA TYPE INSTEAD OF THROWING A RANDOM ERROR THAT DOESN'T INDICATE A WRONG MOTHERFUCKING DATA TYPE. Five FUCKING hours of debugging later.16
-
I JUST FINISHED MY FIRST NEURAL NETWORK!!!
But first of all, as I know you guys, it's spaghetti code and even I as a newb see places where I used too few-dimensional array or passed useless parameters or simply wrote too many redundant lines of code. I know it. I will make it MUCH better next time. Period.
But OMFG this made me scream from happiness today!! Just these few seemingly random numbers... I'm really done.. That's why I jumped into coding year or two ago..
And for some background, I didn't study any IT school, I'm just highschooler (general grammar school) who traded gaming for learning. Also my maths teacher teached NNs on university and is very keen to teach me, so that's that.
Now I wanna make the best out of it and I'm looking forward to write some well documented and flexible library, parallelized and everything (I'm gonna learn a lot in the process of doing this) better then FANN.
Maybe I'm gonna fail(99% probability but hey, I'm programmer beginner, I still think I can code everything I want). But if there is just one moment like when I saw this screen today, I'mma trade my life for it.
Sorry for taking your time guys, I was just genuinely stunned... A lot24 -
I’m so mad I’m fighting back anger tears. This is a long rant and I apologize but I’m so freaking mad.
So a few weeks ago I was asked by my lead staff person to do a data analysis project for the director of our dept. It was a pretty big project, spanning thousands of users. I was excited because I love this sort of thing and I really don’t have anything else to do. Well I don’t have access to the dataset, so I had to get it from my lead and he said he’d do it when he had a chance. Three days later he hadn’t given it to me yet. I approach him and he follows me to my desk, gives me his login and password to login to the secure freaking database, then has me clone it and put it on my computer.
So, I start working on it. It took me about six hours to clean the database, 2 to set up the parameters and plan of attack, and two or three to visualize the data. I realized about halfway through that my lead wasn’t sure about the parameters of the analysis, and I mentioned to him that the director had asked for more information than what he was having me do. He tells me he will speak with director.
So, our director is never there, so I give my lead about a week to speak with her, in the mean time I finish the project to the specifications that the director gave. I even included notes about information that I would need to make more accurate predictions, to draw conclusions, etc. It was really well documented.
Finally, exasperated, and with the project finished but just sitting on my computer for a week, I approached my director on a Saturday when I was working overtime. She confirmed that I needed to what she said in the project specs (duh), and also mentioned she needed a bigger data set than what I was working with if we had one. She told me to speak to my lead on Monday about this, but said that my work looked great.
Monday came and my lead wasn’t there so I spoke with my supervisor and she said that what I was using was the entire dataset, and that my work looked great and I could just send it off. So, at this point 2/3 of my bosses have seen the project, reviewed it, told me it was great, and confirmed that I was doing the right thing.
I sent it off to the director to disseminate to the appropriate people. Again, she looked at it and said it was great.
A week later (today) one of the people that the project was sent to approaches me and tells me that i did a great job and thank you so much for blah blah blah. She then asks me if the dataset I used included blahblah, and I said no, that I used what was given to me but that I’d be happy to go in and fix it if given the necessary data.
She tells me, “yeah the director was under the impression that these numbers were all about blahblah, so I think there was some kind of misunderstanding.” And then implied that I would not be the one fixing the mistake.
I’m being taken off of the project for two reasons: 1. it took to long to get the project out in the first place,
2. It didn’t even answer the questions that they needed answered.
I fucking told them in the notes and ALL THROUGH THE VISUALIZATIONS that I needed additional data to compare these things I’m so fucking mad. I’m so mad.15 -
You can't imagine how many lines of pure and utter horseshit, seemingly written in PHP, I had to dig through this whole weekend. (relating to my 2 previous rants)
How is it even possible to write code this unbelievably ugly?
Examples:
- includes within loops
- included files use variables from parent files
- start- and endtags separated to different files
- SQL queries generated by string concatenation, no safety measures at all (injection)
- repeating DB calls within loops
- multiple directories with the same code (~40 files), only different by ~8 lines, copied
- a mixture of <?php echo ... ?> and <?= ... ?>
- a LOT of array accesses and other stuff prefixed with "@" (suppress error messages)
- passwords in cleartext
- random non-RESTful page changes with a mixture of POST and GET
- GET parameters not URL-encoded
- ...
My boss told me it took this guy weeks and weeks of coding to write this tool (he's an "experienced dev", of course WITHOUT Git).
Guess what?
It took me only 20 hours and about 700 lines of code.
I must confess, since this task, I don't hate PHP anymore, I just simply hate this dev to death.
Addendum: It's Monday, 5:30am. Good night. 😉12 -
Had a job interview recently that went well besides one little disagreement... and it has made me question my sanity. Tell me if I'm wrong.
They asked the difference between a GET and POST request.
Wow, that's an easy one, they're giving me a break, I thought to myself.
I said "GET is used to retrieve data from a server, whereas POST is used to add data to a server, via it's body, which a GET lacks" or something like that.
They were like "ya mostly, but GET can be used to enter data into the server too. We were just looking for the body thing."
And I'm like.... yeah, you could do that, but that's not what it's meant for.
They mention stuff about query parameters and I hold steady that GET and POST are different because GET has a specific purpose. Otherwise, we wouldn't need the "method" part of an HTTP request at all. We could just either include a body or not include a body.
I ended it with "Well, POST implies that you are adding data to a server, and GET implies you are querying data from the server. When I'm reading documentation, that's how I quickly determine what an endpoint does."
My confidence was a little shaken at this point. Crazy what two people with (I assume at least) 10+ years of experience telling you you're wrong will do to your confidence.21 -
#2 Worst thing I've seen a co-worker do?
Back before we utilized stored procedures (and had an official/credentialed DBA), we used embedded/in-line SQL to fetch data from the database.
var sql = @"Select
FieldsToSelect
From
dbo.Whatever
Where
Id = @ID"
In attempts to fix database performance issues, a developer, T, started putting all the SQL on one line of code (some sql was formatted on 10+ lines to make it readable and easily copy+paste-able with SSMS)
var sql = "Select ... From...Where...etc";
His justification was putting all the SQL on one line make the code run faster.
T: "Fewer lines of code runs faster, everyone knows that."
Mgmt bought it.
This process took him a few months to complete.
When none of the effort proved to increase performance, T blamed the in-house developed ORM we were using (I wrote it, it was a simple wrapper around ADO.Net with extension methods for creating/setting parameters)
T: "Adding extra layers causes performance problems, everyone knows that."
Mgmt bought it again.
Removing the ORM, again took several months to complete.
By this time, we hired a real DBA and his focus was removing all the in-line SQL to use stored procedures, creating optimization plans, etc (stuff a real DBA does).
In the planning meetings (I was not apart of), T was selected to lead because of his coding optimization skills.
DBA: "I've been reviewing the execution plans, are all the SQL code on one line? What a mess. That has to be worst thing I ever saw."
T: "Yes, the previous developer, PaperTrail, is incompetent. If the code was written correctly the first time using stored procedures, or even formatted so people could read it, we wouldn't have all these performance problems."
DBA didn't know me (yet) and I didn't know about T's shenanigans (aka = lies) until nearly all the database perf issues were resolved and T received a recognition award for all his hard work (which also equaled a nice raise).7 -
John von Neumann once said: "With four parameters I can fit an elephant, and with five I can make him wiggle his trunk."
We took it literally4 -
An application based on a single MySQL stored procedure that contained all the application business logic inside of it (plus a poor webapp that simply called it). The stored procedure had 97 (yes, NINETY SEVEN) parameters... and about half of them were boolean flag used for enabling/disabling another parameter. I think that Uncle Bob could follow you holding an AK-47 if he saw that. The saddest part is that the shit was written by a guy having a PhD in computer science, and he knew that was bad, but the boss asked him to do it in that way. The guy left the company before I joined it and I had to maintain that crap. Guys, the first time I saw it I thought that should be a joke. Code generated by decompilers was easier to read, maybe even Brainfuck. I tried complaining with the boss but she said that the system was wonderful and very efficient. This was one of the reasons I moved to another company after some months.3
-
Working in company where part of team is located in Austria and these morons write evrything in fucking german, method names, comments and even the parameters which are sent to fronted. Like it isn't enough they even use special characters like ß,ü,ä and ö everywhere12
-
Swagger does not send request body for GET calls.! WHAT THE FUCK..! And the argument supporting is get calls should not have any request payloads and rather should have response payloads since its a "get" call. Are you serious?? What if there are parameters to be passed which cannot be accomodated in the params or the header. Even though people are kind of literally abusing on their issues page still they adamantly refuse to add support for this.
Swagger you had high standards in my book. You just fell so deep down there is no coming back.3 -
Ahem ahem.
*clears throat*
Front end bois, listen that carefully.
YOU DONT FUCKIN TELL THE BACKEND HOW TO ACCEPT REQUESTS.
Backend creates the fuckin methods, the parameters and the responses, AND YOU FUCKIN ADAPT TO IT.
This guy at my work, we are both from Uni but i picked backend because i suck at frontend and i like using backend languages, sends me a message and tells me he can't make the project work.
At this time i have almost finished my part, i have made the method, have checked that they work, and i closed the work computer.
And now he tells me he wants to make a GET request instead of POST. LISTEN HERE MOTHERFUCKER. The methods are ready, adapt to them and shut the fuck up.
And before you tell me some methods don't work, make fuckin sure your part is correct because if i boot up the work laptop again to check why the method you have told me doesn't work, and it still does the job it was intented to do but you can't fix your part, i will fuckin cut your throat.
Sucker.
I do my part, and have to study for uni exams, since you don't have to because you have passed them, do your self a favor and fuckin learn to do things.
It's not my fault that i got experience on my own while you were just only doing our uni retarded projects and didn't bother to learn anything on your own.
I don't mean by any needs that i'm better than you but fuckin accept that i have learned something else that you have not and i would like to share the knowledge with you since you didn't bother.14 -
Opening up a view file, and first thing I see is a function accepting 13 parameters.
I don't know where to start, so much wrong..
Kill me.5 -
I'm currently rewriting perfectly clean and functioning Scala code in Java (because "Enterprise", yay). The amount of unnecessary boilerplate I have to add is insane. I'm not even talking big complicated code but two liners or the lack of simple things like a range from 5 to 10.
Why do I have to write
List<Position> occupiedPositions = placedEntities.stream()
.flatMap((pe) -> pe.occupiedPositions().stream())
.collect(Collectors.toList());
instead of simply
val occupiedPositions = placedEntities.flatMap(_.occupiedPositions)
Why on earth does `occupiedPositions.distinct` suddenly become a monstrosity like `occupiedPositions.stream().distinct().collect(Collectors.toList())` where the majority of code is pure boilerplate? And this is supposed to be the new and better Java8 api which people use as evidence that Java is now suddenly "functional" (yeah no, just no).
Why do APIs that annotate parameters with @Nullable throw NullPointerExceptions when I pass a null? Why does the compiler not help prevent such stupidity? Why do we use static typing PLUS those annotations and it still crashes at runtime like every damn dynamic, interpreted language out there? That's not unfortunate, it's a complete waste of time.
Why is a simple idea like a range from x to 10 (in scala literally `x to 10`) not by default included in Java? There's Guava's version of Range which does not have a helper for integer ranges (even though they are the most used ones). Then there's apache.commons version which _has_ a helper for integers, but is strangely not iterable (wtf I don't even...).
Speaking of Iterable: How difficult could it be to convert an abstract Iterable<T> into a concrete List<T>? In scala it's surprisingly `someIterable.toList`. I found nothing like that so I took to stackoverflow where I found a thread in which people suggested everything from writing your own ListUtils helper class, using Guava (which is a huge dependency!) to using the new Java8 features inline (which is still about three lines long). I didn't know this was such a hard problem in computer science, TIL.
How anyone can be productive in this abomination of a language is beyond me now, even though I've used it for many years while learning to code (back then I didn't know there were much better ways to do things). The only good part is that I have to endure this nonsense for only about 3 days longer then I'm free again!12 -
When working in embedded, you basically write your program, compile it and flash it on some hardware.
Compiling and flashing usually require some black magic commands with lots of parameters so i set up two shortcuts in my terminal
yolo to compile
swag to flash
Understandably i keep it to myself1 -
To all developers,
Please stop making web applications where ALL state is saved in cookies. If I make a search and select a result, why the hell are the search parameters not in the address bar, but rather in a bloody cookie, and why when I select a result is this page not identified by a unique address? Rather saved in a COOKIE. This makes having multiple tabs open pretty useless.4 -
i had this weird dream. i invented a programming language that was connected to the physical world. every time an object was instantiated during runtime, a 3D printer would print this object immediately in real time, into the void of a confined space without gravitation (like a physical stack, but not like a stack). if this object was passed objects as function parameters of its methods, these little objects were printed as well and temporarily moved into the orbit of this object, orbiting it like electrons or little moons.21
-
What manner of imbecile writes a password reset function that passes the email and password as god damn query parameters, in the email link....1
-
When you're trying to support a legacy product and you come across this goldmine. Stupid shit like this is the reason I want to murder people
(Read the order of the parameters)8 -
Dev: Can you please tell me why you changed this?
Me: Because we need to handle permissions in the app. The quickest way of doing it, according to the docs, is [insert change log here]
Dev: But we can just check for the user's token.
Me: That's not exactly a permission, because...
Dev: I was only showing the information related to the user according to their token.
Me: I understand. But that means you're filtering data, not authorising users to access it. If a user is logged in, but changes query parameters, they can still access data they shouldn't be able to.
Dev: Whatevs.
Le me then proceeds to try to push my changes (that took the whole day to implement), gets a "you need to pull first" message from git, doesn't understand why, logs onto GitHub and realises dev has implemented their "permissions".
I was the one responsible for making those changes. Le dev was meant to be doing other things.
How do I even begin to explain?7 -
I started hearing about Git about a few years ago (I think I was in the first or second class of my study, am in the fifth now). I understood the concept but found it really hard to work with, as in, so hard that I just didn't use it. It kept coming back again and again and a few months ago I thought: Fuck it.
What is one thing that a lot of devs are good at? Automation, exactly. So, I had a GitLab account (idc about their recent fuckup, will keep using it) and had to keep asking people to set stuff up for me.
I started to do research and stumbled upon the empty repo page from GitLab which provided clear instructions on how to locally do stuff so I could interact with a remote repository. Then I started to bash script.
After one day, I had a fully working bash script which, with just two parameters, initiates a new repo, clones it locally, creates a README.MD and commits + pushes it.
Then I put it as executable in the /usr/bin.
So now, whenever I start a new project, I just have to create a directory, go into that directory and call a command with two parameters and I'm good to go!
Actually pretty proud of that, although it might be the most usual thing for a lot of peoples, I wrote a workaround/automation thingy for the thing I find the hardest in development :).25 -
Oauth2 examples.
Seriously all examples I found use library that use library that use library to just build url encoded parameters like this
client_secret=foo&code=bar
Got me 5 hours to dig going trough couple of github repos with implementation to see that shit at the end.
Seriously people !!!
Start thinking before you write single line.
I don’t want to download 10 dependencies and 100MB+ just to send 2 requests with url encoded parameters.
It’s in every - literally every language.
I know you’re stupid but please just try to understand how things work instead of copy paste another stackoverflow and medium snippet.4 -
Perfect job is when sandbox and production api endpoints works the same.
Fuck all api endpoints where their sandbox works differently than the production.
Fuck all those error messages that appear only in production, despite faithfully following the documentations.
Fuck the gateways where their sandbox is more stable than the production.
Fuck the endpoints whose api parameters differ in what they accept between sandbox and production.
Fuck those manuals that does not document these diferrences.
Fuck those developers and support team who don't know how to support integrators. They don't even know how their apis work!9 -
The new guy:
- I'm a big fan of effectiveness and efficiency. The faster can you do the task - the better.
- naah, typing in the terminal is soo inefficient. Typing, remembering commands, parameters, paths... That's such a drag! Such a lag! Having a button I could click to do the job is far better!
- OSS is the root of all the evil!
- I'd like to try linux once again. I like it, hopefully I won't need to spend another couple of weeks setting up dual-gpu power management and searches for an Intel wifi's dual-antennae driver.
- I need a bluetooth mouse for my laptop. Using trackpoint or a touchpad is a nonsense [I agree abt the trackpoint]. Using a keyboard/typing for navigation?!? That's utter nonsense!
- I'd like to try i3wm, it looks effective and efficient
it's happened within the last month and I'm still trying to compile all this input into his preferences. So far I'm getting too many conflicting errors13 -
I didn't even know what photography is a month ago. Then I was going on a road trip with my girlfriend so I bout a camera. Didn't read the manual just watched bunch of videos and realized it was just tuning parameters. Now I'm the master.6
-
My girlfriend configuring her e-mail account in the app because her phone had to be reset to factory :
-I can't figure out how to do these setting, annoying...
-Oh yeah the imap and smtp servers can be tricky, let me put that
(I Google the settings for her mail provider and put them in)
-It still doesn't work.
-Uuuh, maybe with another security setting, try it.
-This shit still doesn't work, seriously my phone is broken.
-Have you verified the e-mail address and carefully typed the password?
-Yes of course, I've tried it several time
(I take the phone and check all the parameters... During a looooong time... Until it hits me.)
-Hmm... Can you read the e-mail you've entered?
-Yeah, it's my mail, blabla@hotmail.com.
-No can you read it again please?
-It's blabla, why?
-No, can you *spell* your e-mail?
-Yeah it's B-L-A-B-L-A-@-H-O-M-A... Ow shit...
- ¯\_(ツ)_/¯ -
Motherfucking website style JavaScript rant ahead.
Just tried to register some travel tickets, at FlixBus. Of course alternatively I could go for a train but those would be more expensive. So yeah.
Turns out that the website loads JavaScript from 20 domains including 3 required CloudFront ones (those are the most annoying because it's not possible to tell by the domain what it would be doing). But alright, I'll take it. Web 3.0 amirite?
So I go and find myself a nice bus, add it to my cart.. oh shit it's the wrong one. Change some parameters, hit return.. well guess what. Turns out that in all their JavaScript glory they couldn't implement that much. Awesome!
Go to another site to get another ticket for my travel back, only to find out that while they couldn't implement return, their webdevs are apparently skilled enough to get a giant boner on blinking "(1) Almost ready!" in the site's title, when changing to another tab and there happens to be stuff in the cart. Do you really think I care about that shit! Don't distract me and let me get my shit done!!!
So, to all you webdevs who would pull something like this and wank on it too. Guess what motherfucker. That purchase got cancelled through the power of JavaScript wank, because there's no way I'm supporting that dystopian junk. Guess what, when people shell out money at your shitty online shop, they may want a quarter-ass decent UX too. And no notifications or any of that wank, you hear me?
But yeah fucking Web 3.0!!! Give me a fucking break.8 -
Working on a project with 2 other students. One of them makes a C# "super class" with 50 fields, and manually creates getters and setters for each and every one. Then he proceeds to write a constructor that accepts 50 parameters, because why not.
I comment on the git commit, telling him that he can just write " get; set; " in C# and that he should model the problem in smaller, more manageable classes ( this class had 270 lines and did everything from displaying data to calculating stuff). Tried to explain to him that OOP works kind of differently from how he did it.
....
His answer: "Yeah, I don't really care. If it works once, it's okay for me".
This after the most beautiful code review I have ever done...
Fml8 -
Sad story:
User : Hey , this interface seems quite nice
Me : Yeah, well I’m still working on it ; I still haven’t managed to workaround the data limit of the views so for the time limit I’ve set it to a couple of days
Few moments later
User : Why does it give me that it can’t connect to the data?
Me : what did you do ?
User : I tried viewing the last year of entries and compare it with this one
Few comas later
100476 errors generated
False cert authorization
Port closed
Server down
DDOS on its way1 -
So I have seen this quite a few times now and posted the text below already, but I'd like to shed some light on this:
If you hit up your dev tools and check the network tab, you might see some repeated API calls. Those calls include a GET parameter named "token". The request looks something like this: "https://domain.tld/api/somecall/..."
You can think of this token as a temporary password, or a key that holds information about your user and other information in the backend. If one would steal a token that belongs to another user, you would have control over his account. Now many complained that this key is visible in the URL and not "encrypted". I'll try to explain why this is, well "wrong" or doesn't impose a bigger security risk than normal:
There is no such thing as an "unencrypted query", well besides really transmitting encrypted data. This fields are being protected by the transport layer (HTTPS) or not (HTTP) and while it might not be common to transmit these fields in a GET query parameter, it's standard to send those tokens as cookies, which are as exposed as query parameters. Hit up some random site. The chance that you'll see a PHP session id being transmitted as a cookie is high. Cookies are as exposed as any HTTP GET or POST Form data and can be viewed as easily. Look for a "details" or "http header" section in your dev tools.
Stolen tokens can be used to "log in" into the website, although it might be made harder by only allowing one IP per token or similar. However the use of such a that token is absolut standard and nothing special devRant does. Every site that offers you a "keep me logged in" or "remember me" option uses something like this, one way or the other. Because a token could have been stolen you sometimes need to additionally enter your current password when doings something security risky, like changing your password. In that case your password is being used as a second factor. The idea is, that an attacker could have stolen your token, but still doesn't know your password. It's not enough to grab a token, you need that second (or maybe thrid) factor. As an example - that's how githubs "sudo" mode works. You have got your token, that grants you more permissions than a non-logged in user has, but to do the critical stuff you need an additional token that's only valid for that session, because asking for your password before every action would be inconvenient when setting up a repo
I hope this helps understanding a bit more of this topic :)
Keep safe and keep asking questions if you fell that your data is in danger
Reeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee5 -
...i just remembered why I have a MasturbatorPattern repository on my bitbucket, why is it named that way, and what it does.
It's one of the core abilities of that magical AI i've mentioned in my previous rant. And it's called that way, because of how it works:
The Agent has some objects (as in, class instances) available to it, and wants to get some other kind of object. So it inspects by reflection ("touches") all objects around itself, inspecting their public functions, building up a plan/path/tree of "this function takes the object I have as input, and returns this other object which this other function of other object takes as input and returns this different object, which...." etc, etc, until the final function returns the object the Agent wanted to get in the first place.
And then it goes and "does" all those functions, in that order piping the parameters through.
So first it touches them (second layer of metaphor - linux finger command), and then it does those which output (ejaculate =D) something useful to it.
Therefore, MasturbatorPattern =D
Not sure if my sense of humor is just weird or outright unfunny.8 -
MENTORS - MY STORY (Part I)
I've had several great mentors during my career. This is the story of the three most important.
1.- Professor E.
When I was on my first year (University - Computer Science), all my professors were 'normal' except for this one.
E. was the Programming I - Laboratory professor. And the most important thing he teached us was to think. To be independent, and to look for answers beyond simple solutions.
He was always pushing us beyond what was requested and to try new things, to try to improve our own solutions and to look at them as always improvable.
In a regular class, this would happen:
Student: Hey E. How can I do this X requirement?
E.: Use function xyz with A and B parameters.
S: Ok thanks...
...10 minutes later...
S: Hey E. that function doesn't work very good for my case.
E.: You have a book, you have internet connection. Don't waste 10 minutes trying to abide what I told you. Investigate, find a way or even a better way; use your resources.
Other example, in the first year all projects were requested to be delivered with text based interface (console projects).
What about E.?
"Well, you CAN deliver your project with a text based interface BUT you definitely SHOULD try to make a GUI, something simple but effective. Just so you learn more in the process"
Good E. He gave me strong foundations for this industry.2 -
Today I come across something interresting in SQL Server.
I was optimizing a report query and in the SSMS windows runned in 10 seconds for 3000 rows.
Put it to a stored procedure took me 5 minutes for getting 100 rows.
I was like WTF?
After some research I found out that the problem was that I was using the Stored Procedure parameters in the query.
Created local variables for the parameters and poof... 10 seconds again.
So if you are creating Stored Procedures in SQL Server DO NOT USE THE PARAMETERS FROM THE PROCEDURE. CREATE LOCAL VARIABLES.5 -
We have an API available for our customers to integrate our software with their Webshop.
A client and their developer complained because not all of the products came through. I checked the products, the validation, the parameters, the database .. everything looked fine and I was scratching my head why these articles wouldn't come through (but it did work at my end).
After some time, I checked the request logs..
Apparently it wasn't quite clear for them that a loop is required with the 'skip' and 'take' parameters to create an offset for pagination.They only synchronised the first 500 products.. everytime..
We have a limit of 500 products per batch (take) for performance reasons.
They asked if we could increase this limit, because they have "a large range of products" (not really, only 800 or so and we have clients with more than 2mil. products..) Oh pls.. I've sent them a link to the PHP manual for a basic 'while' loop..2 -
OMFG I don't even know where to start..
Probably should start with last week (as this is the first time I had to deal with this problem directly)..
Also please note that all packages, procedure/function names, tables etc have fictional names, so every similarity between this story and reality is just a coincidence!!
Here it goes..
Lat week we implemented a new feature for the customer on production, everything was working fine.. After a day or two, the customer notices the audit logs are not complete aka missing user_id or have the wrong user_id inserted.
Hm.. ok.. I check logs (disk + database).. WTF, parameters are being sent in as they should, meaning they are there, so no idea what is with the missing ids.
OK, logs look fine, but I notice user_id have some weird values (I already memorized most frequent users and their ids). So I go check what is happening in the code, as the procedures/functions are called ok.
Wow, boy was I surprised.. many many times..
In the code, we actually check for user in this apps db or in case of using SSO (which we were) in the main db schema..
The user gets returned & logged ok, but that is it. Used only for authentication. When sending stuff to the db to log, old user Id is used, meaning that ofc userid was missing or wrong.
Anyhow, I fix that crap, take care of some other audit logs, so that proper user id was sent in. Test locally, cool. Works. Update customer's test servers. Works. Cool..
I still notice something off.. even though I fixed the audit_dbtable_2, audit_dbtable_1 still doesn't show proper user ids.. This was last week. I left it as is, as I had more urgent tasks waiting for me..
Anyhow, now it came the time for this fuckup to be fixed. Ok, I think to myself I can do this with a bit more hacking, but it leaves the original database and all other apps as is, so they won't break.
I crate another pck for api alone copy the calls, add user_id as param and from that on, I call other standard functions like usual, just leave out the user_id I am now explicitly sending with every call.
Ok this might work.
I prepare package, add user_id param to the calls.. great, time to test this code and my knowledge..
I made changes for api to incude the current user id (+ log it in the disk logs + audit_dbtable_1), test it, and check db..
Disk logs fine, debugging fine (user_id has proper value) but audit_dbtable_1 still userid = 0.
WTF?! I go check the code, where I forgot to include user id.. noup, it's all there. OK, I go check the logging, maybe I fucked up some parameters on db level. Nope, user is there in the friggin description ON THE SAME FUCKING TABLE!!
Just not in the column user_id...
WTF..Ok, cig break to let me think..
I come back and check the original auditing procedure on the db.. It is usually used/called with null as the user id. OK, I have replaced those with actual user ids I sent in the procedures/functions. Recheck every call!! TWICE!! Great.. no fuckups. Let's test it again!
OFC nothing changes, value in the db is still 0. WTF?! HOW!?
So I open the auditing pck, to look the insides of that bloody procedure.. WHAT THE ACTUAL FUCK?!
Instead of logging the p_user_sth_sth that is sent to that procedure, it just inserts the variable declared in the main package..
WHAT THE ACTUAL FUCK?! Did the 'new guy' made changes to this because he couldn't figure out what is wrong?! Nope, not him. I asked the CEO if he knows anything.. Noup.. I checked all customers dbs (different customers).. ALL HAD THIS HARDOCED IN!!! FORM THE FREAKING YEAR 2016!!! O.o
Unfuckin believable.. How did this ever work?!
Looks like at the begining, someone tried to implement this, but gave up mid implementation.. Decided it is enough to log current user id into BLABLA variable on some pck..
Which might have been ok 10+ years ago, but not today, not when you use connection pooling.. FFS!!
So yeah, I found easter eggs from years ago.. Almost went crazy when trying to figure out where I fucked this up. It was such a plan, simple, straight-forward solution to auditing..
If only the original procedure was working as it should.. bloddy hell!!8 -
Fuck me in the ass, but do it harder then this api just so I can feel some love 😖
it's one of those days where you have to migrate from soap to rest, only the rest api doesn't have the same structure or search parameters as the soap api, so there's this entire fucking application sending requests at a brick wall, and expecting a purple throbbing 12 inch cock of xml to be pushed into an multi dimensional array and pushed through to the views to derange the mess, only you have to create that fucking 12 inch cock from several 2 inch dipsticks that have a different hierarchy, different field names, and merge the shit together with a glue gun...
good thing it's only an unexpected prod problem... right? 🤷♂️
Ah, the woes of a Monday on the legacy app adventures.rant bullshit applications over engineered using a view to build a data set from hell adopt a piece of shit day1 -
I'm a "published" freelance dev!
Last night I made my first web application available to the internet. It's an internal enterprise management system for a small non-profit.
It's running on a single $6 a month digitalocean droplet, and the domain is $12 a year, so yearly cost for them is absolutely rock bottom.
It's written in asp.net 6.0 razor pages, nginx reverse proxy, certbot for HTTPS certificates, fail2ban for ssh protection (ssh login is via ssl keys), entity framework with MySQL.
The site itself has automatic IP banning based on a few parameters like login spam, uses JWT tokens, and is fully secured.
All together, it's a lot of value for about $100 a year.14 -
fuck you, man. eat a bag of dicks, a bag of shit and a shit load of dead animals.. you dumb fucking cunt ... go and die ... who the fuck modifies state of 3rd party object and think it is ok to do so.. the fucking prick deserves to get castrated with rusty, old school, gardening scissors...
through some mysterious, obfuscated, buried deep in the asshole code, the fucker decided to set a user-specific value in the default query params of guzzle so that every fucking object using it passes the fucking thing around like a cheap hooker at a dorm party... causing the API calls to misbehave because of the fucking thing.
you send the parameters you want to send but mister sucking-dick-up-the-ass-smarty-pants decided you don't want to do that and because of that I almost broke a core library a week before a fucking major feature release because half the functionality got broken automagically, worst thing is I have no fucking clue where the bloody thing gets inserted ...
I swear if you do that I will find you and I will get a rusty razor to cut your balls into paste and rectally infuse them untill your shit start to come out of every oriphise of your fucking empty head8 -
In the 1990s code editors on the Mac could insert the omitted function prototypes into a header file with one command; and even automatically keep the header declaration updated when you changed the source definition (name, parameters, etc)
Today in Xcode you have to copy and paste the stupid function header definition from the source code into the header file. What happens if you leave the "{" that got copied accidentally? OMFUCKING LORD, it triggers all sorts of erroneous errors in all the **source code** files where it is included instead of the header with the stray "{"
I started to question whether nor not I knew C, if gravity worked, if the sun would come up. I wasted a day of dicking around in StackOverflow trying to chase down all these insane error messages which make no sense in Xcode.
I just **happened** to see at the bottom of one of the source files, after all the erroneous error, a very important error:
"};" Expected
So I started deleting code from the bottom up in this source file, same error every time. Got to the point where the includes were all that was left.
FUCK YOU XCODE and the hacks that designed that horrendous piece of shit
Xcode is only free if your time is worth absolutely nothing.11 -
Me: have you tried turning it off and on again?
Customer: oh come on, is that the best you can do!
M:ok how about we
clear all active memory,
Reset the firmware parameters
run system diagnostics and
reinitialise the basic input output system?
C: Wow .. yeah how do we do that?
M: turn it off and on again! -
Mystery of the day: why some developers can't decide on a code style. Let's count:
- two types of brace placements
- three types of assignment spacing (with, without spaces, and aligned with extra space)
- two types of clause spacing
- mixed case in the first char of a variable for no apparent reason(?)
- bonus: unneeded parentheses
At least in ONE thing the person was consistent: no space between parameters!
WHY GOD.13 -
My predecessor used auth as a bool. The only way he kept basic users from accessing admin functions was by including the word "admin" or "user" in the URL so any user could be the administrator by just changing the URL parameters after logging in
For example, mysite.com/admin/editorderdetails vs. mysite.com/user/editorderdetails -
I work in a contract position and reviewed the code of a senior engineer recently. Regretfully I can't provide context to preserve anonymity.
He wrote awful JavaScript;
- handled a single DOM element with 2 different frontend libraries
- used the logical operator && to 'chain' two methods (it didn't work) instead of returning a boolean value,
- broke everything down into minute detail (a comment box had 7 components!),
- API calls were made for every component update instead of maintaining local component state where it made sense, which meant UI updates were slow,
- animated EVERYTHING, which made my Firefox on Xubuntu i7 64bit with 16GB RAM beg for mercy.
I had a rough couple of months with interviews, with 2nd stage technical interviewers throwing impossible tasks at me.
Example:
1. Create an online Python code editor with Javascript which can compile Python bytecode,
2. Use Mesos and Kafka to create real time architecture for Tensorflow with a Javascript frontend in 1 day. (I asked, and wasn't allowed to use Kubernetes or serverless architecture),
3. Hack a website from the browser's address bar using parameters ( what?!! ),
Obviously, the next time I meet a 'senior', I'm going to tell him talk is cheap;
'SHOW ME YOUR CODE.'3 -
So these motherfuckers... they have stored the queries to generate the reports... fucking guess where. Just guess.
They stored the queries AS FUCKING STRING DATA IN THE TABLE. And you know how they get the parameters? A FUCKING JOIN WHERE THEY HAVE STORED THE PARAMS AS DATA IN ANOTHER TABLE.
So you query set the params to query to get the query to get that is joined with a query to get the reports.
If God is a programmer after all y’all are fuuuuuuuuuuuuuucked4 -
Current task:
Somehow, one of my predecessors made some sort of custom hook tied to woocommerce check out that pipes some data into a nightmarish spaghetti fuck pile of undocumented wild west visual basic bullshit. It does this, presumably, via a set of parameters passed as plaintext in a url. I know this because I found the singleton that declares this. Helpfully, Mr. Fuckass named the class "Default", so I only have around 30k instances being kicked back by my IDE when I search for it. The only reason I "need" to find this, is so that I can just change the button to an href pointing at my own MS for shipping, and I need to change the fifteen params being passed to just one - a customer ID, which should be stored in the session, and referenced by a cookie. Once that is done, I should be able to freely delete a couple of gigs worth of bullshit. Been stuck on this for three days now. God forbid we have a test environment or something.
I'm tired. Can't even get angry anymore really. Can't even think of anything funny to say about it either, I just can't wait until this is done and I can go back to sleep.4 -
"It works on our end", the sentence that made me lose my shit.
I've been working on a project were we're supposed to integrate an API into our system.
When trying to get some user id's (UUID) from said API, we got a type-error in the response (???), so I called their integration support and asked what the fuck they were doing (not really, i was kinda calm at this point).
The answer I got was following:
Integration guy: "Uh, bro, like, I don't even know, it's probably on your end"
Me: "We literally used this endpoint with the same parameters yesterday, and got a result we expected. I noticed you updated your API this morning, did you make any major changes?"
Integration guy: "Yeah we changed the type of user id from string to number"
Me: "So, you changed the type of a UUID (uuid4) from string to number? How did you not think that would be an issue? I can see in your forums that everyone else is having the same issue."
Integration guy: "Nah, it's probably a bug in your code, it works on our end"
Me in my mind: *IT WORKS ON YOUR END?!? IT DOESN'T FUCKING MATTER IF IT WORKS ON YOUR END, FUCKTARD.*
What I actually said: "Uhm, I'm not sure if works on your end either, I'm not even sure how this change made it to production. But hey, thanks I guess, bye."
WHY AM I NOT ABLE TO YELL AT PEOPLE WHEN THEY ARE BEING RETARDED???
But really though, when you're maintaining an API, you shouldn't fucking care if things work on your end in your dev environment. What matters is how it works in production, for the end user/users.
And I know that 99% of cases it's the users fault by entering the wrong parameters or trying to request with wrongly setup auth and what not, but still.
Don't ASSUME nothing's wrong on your end. It's your fucking job to fix the issues.
And guess what? The problem was on their side.
I'm going fucking bald.2 -
Do things in JS they said, it'll be easier they said...
(After a few WTF's i found the problem, arr.map passes more parameters to parseInt than just the strings. It also passes an array index that gets interpreted as radix)18 -
The joys of mapping...
I'm playing around with some cartographer parameters and this happened. Thought it fits the christmas theme and was kindas beautiful so decided to share.
It's a map snowflake :39 -
Have a function that takes parameters and then performs a switch statement to determine what function to call next with those same parameters. One of those parameters is a Union type.
During CR, my reviewer said they’d like if instead of returning the function per case, I instead assigned a handler to the value of the function per case and then returned that handler at the end of the switch. Simple change, right? Only snafu, I’m casting one of the parameters on a per-case basis.
Somehow, through no fucking change of my own, TypeScript in its wisdom has decided that the type of that value by the time I call the next function is a fucking Intersection.
WHY THE FUCK DO YOU THINK IT’S AN INTERSECTION?! I’m fucking casting it per case! I’m ensuring it’s the right type for the next function called on a per case basis!
…. And that, my friends, is how I wasted a day with a stupid refactor that was ultimately just scrapped because no one could figure out how to make it work.
Goddamn fucking TypeScript. I3 -
Apparently DELETE and... most of the HTTP verbs are disabled by default in IIS (ASP/ MVC/ Microsoft server software)
Am I wrong in saying that's fucking bullshit?!
Why make an HTTP serving environment with a massive array of tools to help you do everything you need in the web environment... And then DISABLE some of the web protocol??? What???
Not even the obscure verbs. DELETE. Is microsoft the type of bitch to delete using a GET request?? I bet the send passwords as get parameters.8 -
At this point i'd like to talk about the original PHP founder Rasmus Lerdorf, who was obviously too distracted by his own beard while watching the NBA Playoffs in 1995 to write a proper language.
There's not a language more inconsistent, ilogical, deficient, and best of all, bad structured.
Seriously, which substances was he smoking when thinking up such things as: non objective strings, incasesensitive functions and associative arrays?
What have objects ever done? any other honorable language does that, python, javascript, rails, C#, take your pick.
Not to mention the order of needle/haystack parameters.4 -
In my day off I was eager to try overclocking in my pc and this is how it went:
- Fucked up overclocking parameters for cpu and ram speed.
- BIOS is broken, had to take out gpu to do a reset taking out the bios battery.
- BIOS is up again, default values loaded, bla bla
- Did not try to fuck off anymoar with overclocking, just kept playing star wars and went to sleep safe and sound like a baby.
- Gotta work now. docker does not start, closes itself after tried to start, docker panic, I panic, tried to uninstall, tried to update. nothing works
- Then I remember bios default values leaves virtualization off. enables it again, docker still not working. I panic again, restarted pc like 10 times between disabling/enabling hyper-v in windows.
- Docker dies. not gonna change my overclock options again. silly me 🤦♂️9 -
Dynamically typed languages suck. God I hate them
It's like one big clunky free for all. I don't understand how people can work in Python or even JavaScript and tell me that they're good languages with a straight face
Not having proper autocomplete or documentation (a somewhat seperate issue of Python) is a kick in the stomach for productivity.
I've seen people advocate for using EXTERNAL DOCUMENTATION VIEWERS. WHAT
I hate not being able to enforce types so I can reason about little parts of my program. I hate not having an IDE that can actually help me. I hate having to see stupid grep'ed code snippets instead of nicely formatted javadocs. I hate having to double and triple check everything when trying to code. I hate handling effectively opaque values where I don't know anything about the type without looking it up. And I especially hate not knowing what types function parameters need to be.
Dynamic typing doesn't remove types. That, although completely unfeasible, I could respect.
Oh no, the types are still there. Just not for you
It's like solving a jigsaw puzzle with a blindfold on56 -
Worst documentation I've seen?
Our "Coding Standards" 20+ page document. The team who put it together got so detailed, there wasn't much 'wiggle room' for natural deviations in a developer's coding style. For example, a section devoted to no abbreviations. So if you had a variable 'invoiceId', they complained you violated 'standards', even though 'invoiceId' matched a field name in a database table. Using Dapper or another ORM that relied on the 1:1 name match? Nope, you were still forced to inject your own mappers so the code didn't violate standards.
As you can probably guess, such a long, detailed document would have contradictions. I pointed out one of the contradictions. Example:
Page 5: Section B, sub-section B-5, paragraph 3 : "To minimize network traffic, when querying the database, request all the data necessary for the application."
Page 8: Section K, sub-section K-2, paragraph 4 : "For maximum performance, when querying the database, request only the most minimum amount of data necessary for the application ."
In a review I pointed out this contradiction (there were several more)
Me: "If we satisfy A, one could say the code is in violation of B. Which is it?"
<Pointy-Hair-Boss throws his pencil on the table>
PHB: "WHAT IS YOUR PROBLEM WITH STANDARDS! It couldn't be more clear! We are a company of standards because without standards <blah blah..straw man argument..blah blah>"
<deciding not to die on that hill, I move on>
Me: "On page 12, paragraph 9 code is in violation if a method has more than 3 parameters. That seems a little restrictive given our interaction with 3rd party products."
PHB: "There you go again. As stated in the document, ALL code used by the company will comply to our standards. What part of 'ALL' do you not understand?"
Was he bluffing about requiring 3rd party vendors complying with our standards? Heck no. That's a story for another day.10 -
Dear coworker,
when I asked: "So, how does it work?", I didn't expect the answer to be: "Well, you push this button, wait three seconds and when it's finished, this LED turns on."
I was hoping for a more in-depth description (like, the way you'd consider me to be seriously interested in your work or learning from you) along the lines of "Well, you see, I have written this CLI-Tool here, which connects to the adapter and parses the contents of the file via serial interface to the on-board controller. This controller performs an integrity check of the device and then decides whether to flash or not. The testing unit itself checks if its being programmed with the right parameters."
Of course I know how a programming device works but I was interested in your solution in this special case ... so I think I'll just check the doc later if there'll ever be some.4 -
My business partner who claim to be the best Wall Street programmer, probably 160 years ago, decided to improve our core system written in Go.
He dragged a *shortcut* of *whole* local github folder into Vendor(sort of node_modules), Manually changed commit hash in Gopkg.lock, etc,
Next morning I woke up to 24 failed builds on Master; all protobuf redone with his unknown gogo version, database trigger function with changed logics added parameters, and a text message “has anyone experienced build corruption? Works on my mac”
My other business partners said “it’s okay, He’s going through tough divorce needs some distraction”
F M L1 -
Okay. So my dumbass boss took this project that had a steep timeline. I told him straight up, it won't work because we won't make the timeline. If we do this, I will be the one bending over backwards to deliver. I don't like to promise and fail. I got the oh don't worry let's just try. If we don't make it that's fine. Unfortunately that's not how I work. I refuse to deliberately fail. So I say okay and we begin. I suggested open source is the fastest way to deliver bit the fucked up part is, I am the only senior dev in the team. I will be expected to reverse engineer the open source app to connect our own deployment parameters. Use tech I have never used before. Connect frontend and backend. Handle dns bullshit. I have literally been working on Vibes and coffee for the past two weeks because ofcourse I ran into so many issues. Now I have an extension for Monday and I hate to fail. So I am not sleeping or resting just working on a fucking java app I didnt build and I am expected to make it work seemlessly on our production environment. I made some progress. Deployed frontend, deployed backend. Forgot to connect production dB so I decided to go with azure database for mysql driver since we have credits on azure. Now my java app is pissing itself over ssl handshake. I generate my keystore and add it and now java socket just times out. I want to pummel somebody or a punching bag that looks like my boss.15
-
Guys what I want to know is how do you secure your code so that they pay you after you deliver the code to them?
So recently I was in this internship that I secured with an over-the-phone interview and the guy who was contacting me was the CEO of the company (I'm going to refer to him as "the fucking cunt" from now on). He asked me to do some OCR and translations and I managed to write a few scripts that automate the entire process. The fucking cunt made me login remotely to his desktop which was connected to the server (who the fuck does that) and I had to operate on the server from his system. I helped him with the installation and taught him how to use the scripts by altering the parameters and stuff, and you know what the fucking cunt did from the next day onward? Dropped contact. Like completely. I kept bombing emails upon emails and tried calling him day after day, the fucking cunt either picked up and cut the call immediately on recognising its me or didn't pick up at all. And the reason he wasn't able to pay me was, and I quote, "I am in US right now, will pay you when I get back to India." I was like "The fuck was PayPal invented for?" Being the naive fool that I was, I believed him (it was my first time) and waited patiently till the date he mentioned and then lodged a complain in the portal itself where he had posted the job initially. They raised a concern with the employer and you know what the fucking cunt replied? "He has not been able to achieve enough accuracy on the translations". Doesn't even know good translation systems don't exist till date ( BTW I used a client for the google translate API). It has been weeks now and still the bitch has not yet resolved the issue.And the worst part of it was I got a signed contract and gave him a copy of my ID for verification purposes.
I'm thinking of making a mail bomb and nagging him every single day for the rest of his life. What do you guys think?7 -
Conversation between a developer and admin team to change configuration in higher environment.
Dev: Please change these config parameters.
Admin: What is environment url
Dev: 😑. Gives the url
Admin: How to change?
Dev: 😑. Gives all the details
Admin: I am unable to perform as server is slow.
Dev: Whom will you report the slowness of server as you are the admin?😵
Admin shocked developer rocked -
Webservice asks for parameters. We give the right parameters, gets results.
Now here's the funny part, we replace the parameters with "banana". Same results.
So no matter what parameters you pass, it returns THE SAME FUCKING RESULTS.1 -
Am i obsessed with security?
No Way!
Does my laptop need five seconds to calculate the aes-key for the program I'm working on, because I've set the hash-parameters unreasonable high ?
Maybe.3 -
So part of my job is to watch movies.
Unreleased movies. Premier special movies. Restricted access movies. Special screening movies.
Fun part about being in a media tech company is you get amazing perks.
One of the product verticals we have, competes with Netflix and Amazon Prime Video.
So, we have to determine which movies to license and resell on our platform.
For which we have volunteer program where they assign us movies to watch. A couple of movies everyday. Folks have to submit their feedback on certain parameters and then the team evaluates and makes the decision.
As of last few weeks, Cannes 2022 was on and we had a lot of movies lined up. Got to watch some real good ones while some were mediocre.
Surely fun, don't get paid for it. Good perks. Loving it so far.10 -
Is it so hard to comment your code?
I work on collab projects here and there and both the comments and documentation are both awful, nearly always, there are some exceptions.
This is a plea to all those who teach anyone to program. "This performs a loop" is not a helpful comment, nor is "This sets variable x to 1" where the line below is "let x = 1".
The last piece of code brings me on to my next point meaningful variable names. If x is a variable that stores the age of a machine call it ageOfMachine or age_of_machine. Not aom, not x but what it actually is, modern IDEs and text editors will fill this out for you.
Finally documentation, a good friend of mine sent me this quote a while back, I can't find the image but "Documentation is like sex, when it's good, it's great. But when it's bad it's better than nothing." Your documentation should be good, a good pattern to follow is the Node.js documentation, it tells the function, what it does and what parameters it takes.
Anyway rant over; and I'm sure that this applies to people outside of this community only.5 -
Is there anything uglier than XML documentation comments? The signal to noise ratio is appalling, like an exercise in redundancy for the sake of redundancy.
/// <summary>
/// Initializes a new instance of the <see cref="CipherInfo"/> class.
/// </summary>
/// <param name="keySize">Size of the key.</param>
/// <param name="cipher">The cipher.</param>
public CipherInfo(int keySize, Func<byte[], byte[], Cipher> cipher)
{ ... }
Compare that to the equivalent markdown documentation comments:
/// Initializes a new instance of the <see cref="CipherInfo"/> class.
/// ##Parameters
/// - `keySize` - Size of the key.
/// - `cipher` - The cipher.
public CipherInfo(int keySize, Func<byte[], byte[], Cipher> cipher)
{ ... }3 -
During a design meeting, our boss tells me that Vertx's MySQL drivers don't have prepared statements, and that in the past, he's used a library or his own functions to do all the escaping.
"Are you kidding me? Are you insane?"
I insisted that surely he must be wrong; that no one would release a database library without built in support for query arguments. Escaping things by hand is just asinine and a security risk. You should always use the tools in the database drivers, as new security vulnerabilities in SQL drivers can be found and fixed so long as you keep your dependencies up to date.
He told me escaping wasn't as tricky as I made it out to be, that there were some good libraries for it, and insisted Vertx didn't have any built in support for "prepared statements." He also tried to tell us that prepared statements had performance issues.
He searched specifically for "prepared statements" and I was like, "You know they don't have to be called that. They have different names in different frameworks."
Sure enough, a short search and we discovered a function in the Vertx base database classes to allow SQL queries with parameters. -
Today, I was so certain that all the functionalities were implemented to handle some webhook calls from a third-party service. It's a script I wrote that has been running for 2+ years uninterrupted or without any issues.
We got some "complaints/notices" today that some "special" actions weren't registered, so I thought that the third-party service just didn't send those actions via their webhook. After some research I found a part where they explained that those actions trigger the webhook like any other action etc. So..
First thought: "okay, maybe they implemented that at a later stage" (was not the case)
Second thought: "maybe this is not what the client meant" (it was)
Third thought: "Then it should have been implemented" (it wasn't)
Okay, time to look at the code to see where this could get handled but apparently isn't. All the actions look good, nice, clean handeling etc, nicely documented code (gave the 'past-me' mentally a high-five)..
I scroll further down to that specific action and it was quiet obvious why it didn't work.. I just see an empty function with the comment:
"//TODO: maybe handle this action one day. don't know what this does atm, probably unused.. Will take a look at it next week.."
.. :D
I took my 'high-five' back..I just needed to copy-paste some other code and change 1-2 parameters..1 -
Holy crap, I can't take it anymore.
I know that user acceptance testing is supposed to be done by the end user but it's as if they entirely skipped UNIT TESTING and QUALITY ENGINEERING.
Does their API work? Yes. It does.
Are their endpoints working? Sort of... why are query parameters required again?
Is it good overall? No, there are CORNER CASES ALL OVER THE PLACE (are they even still corner cases at this point?). It feels like it was made by amateurs!
Why am I doing quality testing on their services??? holy crap, they should pay ME for doing this1 -
How about creating a new programming language named "C slang"
highlights from the language:
1. variable declaration :
by default, all declaration are var, but inorder
to declare a constant, write:
cunt a = 15; // means const a = 15;
2. input and output :
suck(b) // input stored in variable b
spit(b) // output b
3. function declaration:
f**k <function_name>(parameters);
4. null or None will be replaced by sh*t
for example: if(node root == sh*t)....
any other sh**y recommendation will be appreciable6 -
Today I had a problem with a JS framework. The only person who was available who could help me was the one I avoid, because he always knows everything better.
Well, after I asked if he had time for me, he sits next to me and I started to explain.
After looking around, he started blaming my backend code.
(I belong to the kind of dev that tries to write small and simple code. But I also often use the more complex features of the languages.) He suddenly started accusing everyday things in the backend like inheriting a class or using objects and basic data types together as parameters of a method (WTF???) Hell, all I could say at that moment was that I had a problem with this JS framework and not with the backend that worked well. He probably tried for over an hour to find the bug in the backend and just wouldn't listen, after that he gave up. I wonder what this bitch has learned over the years. Can it really be that he forgot the basics of a programming language? Or has the fool never worked with an inheritance before? I think he's an incapable piece of shit, he hasn't even patched my reported vulnerability in his project in the last half year, which allows to inject own code onto the server.
Because of such fucking morons I get a headache when I think about it. How can it be that he's got a higher degree and earns about 50% more. I should leave this company!3 -
Dude what the fuck with C#'s code style?
Pascal case variable names and classes? Don't we do this so we can differentiate between variables and classes??
Newline between parentheses and brackets?
Retarded auto get/ set methods that serve no purpose than to make code difficult to read and debug?
And after all that shit, string, which is a class, has a lowercase s and is treated as if a primitive?
I really have no idea why this language is so widely praised. The only thing I like about it is that it's the only major bytecode language that has operator overloading and reference parameters.19 -
Why Gmail. Why the fuck do your search parameters, especially your date filters, not work anywhere near as expected.
You make me have to query and test, query and test, just, randomly fucking guessing because, fuck it, right?
With a good 10 second refresh time. I love twiddling my thumbs and pulling my hair out.
after:2018/11/1 should produce emails from Nov 1st onward.
Not, TODAY ONLY, if no other parameters are
specified.
If there's a from: parameter, now we want to do after Nov 1st, right?
And also, don't show me how to sort in reverse order, either. Not without a complete rewrite of my class there, which clearly I'm too lazy to do right now.
Fuck the Gmail Api, responsible for weeks of wasted dev time... or more aptly put, "fuck devs using our gmail api" says the maniacal, sociopath devils that created it
fuckers.1 -
can we all take a moment to appreciate the developers of flutter. they're smart, and they took the time to make flutter the *right* way.
they used an easy to learn language that's ideal for mobile development, which means hot reload/restart is possible (because dart supports aot and jit compilation)
the way it's designed is beautiful. everything is a widget, and it's easy to customize them via named parameters.
the community is great. it's not large, but it's supportive, with two active subreddits. yesterday i asked a question on r/flutterdev, and a member of the flutter team at google answered the question with a comprehensive answer.
flutter is very consistent across platforms. if it works on android or ios, you can bet it'll work on the other just as well, with the exception of platform-specific code.
it is VERY performant. unless you write a major bottleneck, 60fps is easy to achieve.
animations are EASY. define a tween and animation controller and then write a callback function. not to mention it's straightforward, and complex/combined animations are easy, too.
you can get almost direct access to the canvas, should you need it, with custompainter.
oh my god, this is revolutionary in the programming world. development is quicker than it is with native android alone, and for people who have no access to a mac, like me, i can develop for ios and compile via code magic. if you haven't checked it out and you develop for mobile, check it out.
oh yeah, did i mention it's not just mobile. hummingbird - flutter compiled to web - is already in experimental public betas, and will likely be released by the end of the year. there's also experimental desktop support, which is amazing, and much better than electron. not to mention flutter is the future, as it will be the primary way to make apps on fuchsia os.13 -
Working on a new payment gateway for one of my customers, and it turns out that instead of just specifying the parameters for what to include in the API call they want you to use their drop-in module for it...which is still written in PHP 4 and hasn't been updated since 2011. Also turns out that they only accept data formatted in XML.
Not insurmountable, but more than I feel like dealing with right this moment...7 -
That moment when you would get graded 4.5/5, but you got 3.5 because you made a joke about Java.
Did you know that back in the good ol' days (1-2 years ago lol) - If you wanted to have a function with optional parameters, you would need to create an overload without that parameter?
Which isn't that bad, until you realize that a function with 4 optional arguments would require 16 overloads (basically n^2).14 -
What kind of seizure of insanity led the devs of Python to believe that static, mutable default parameters could be a good idea? You can literally share whole arrays between multiple calls of the same function with the same input, and the number of cases where a sane person would intentionally want to do that is FUCKING ZERO.4
-
When you're mentally debugging a module and you have an intuition about the point of failure.
So you start mentally tracking variables, going down functions calls, moving from one class to another until finally you reach that one line of code that you feel is getting the wrong parameters.
You substitute in the 10 different variables you have been mentally tracking and find out that...
THE LINE OF CODE IS GETTING THE CORRECT PARAMETERS, AND IS FUNCTIONING AS IT SHOULD.
fuck.1 -
Whole class: makes an sql database using phpmyadmin. Simple, easy, meets the requirements
Me: fuck it. Use python with pyqt5. And Microsoft sql server Spend unnecessary hours on making repetitive functions, cause my stupid ass can't figure out how to pass more than one parameters in class methods.
All in all, it looks good. I feel like I did something, learnt something new. Took on a challenge. Its a wierdly good feeling, somewhat rewarding.5 -
The company's director and I:
Him: I think we need to build a hybrid mobile app, because the JavaScript code that renders images is the same on our front- and backends.
Me: Well, we could just send the parameters to the server, let it render it and get a response back.
Him: How?
Me: With an API.
Him: Oh! -
Working in a organization that hire people that don't know what they doing and can't ask a question correctly...
HELP WE'RE GETTING AN ERROR IN OUR CODE WHILE TRYING TO GET DATA FROM YOUR DB... PLZ FIX IT
WTF IS NOT WORKING, WHAT ARE YOU QUERYING, WHAT IS THE ERROR?
**Sends a SQL query but with ? for all the parameters**
WTF..... U PPL ARE IDIOTS.... CAN'T EVEN ASK A QUESTION CORRECTLY OR PROVIDE NECESSARY INFORMATION... CLEARLY YOU HAVE NO IDEA WTF UR DOING..
EVEN GOD CAN'T HELP YOU... -
Actual Shower thought about showers.
Every shower has 2 “parameters”: Throughput and Intensity.
When the intensity is high and the throughput is high, you feel like you are being hosed down by the fire brigade.
If the intensity is low and the throughput is high, it feels like you’re standing in the rain.
When the intensity is low and the throughput is low, you get mist/fog.
If the intensity is high and the throughput is low you’re just being fucking pissed on.
Somewhere in between is the sweet spot imo.7 -
My dumbass removes a setter and then starts wondering why the API isn't accepting any query parameters anymore1
-
> be me
> be developing a react native app
>realize the iPhone X notch is clipping your content on the first/home screen of the app
>google says: simple fix
>find a built-in react native thing to add safe area padding
> refresh the app
> ohno.png
> the other screens with navigation bars already have built in padding
> TOOMUCHPADDING.jpeg
> remove safe area thingy
> finds a clever, not particularly hacky way to pad the home screen without showing the header bar by setting its height to 0 and the color to match the content background
> more-problems.app
> there’s a small 1–pixel light colored line separating the header from the content clearly breaking the otherwise continuous single color background
> google.sh
> wtf.txt
> stackoverflow.html
> no responses except something I’d already done
> keep experimenting
> tries basically everything to figure out where that line is coming from
>sets borders to thicccc and bright red
>no bottom border? Ok that’s not it
>opacity?
>forgetaboutit.mov
>try shifting the header position around by a few pixels? Maybe it’s misaligned with the white parent layer underneath?
> nope.jpg
>it’s past bedtime
>Sleep.jpg
>thenextday(today).zip
> what about the content? Is that misaligned?
> nope2.jpg
>Maybe its an iOS feature not a react thing?
> make a test Xcode project, completely native to test
> negative.dng (pun intended)
> more-furious-googling.mp3
> find a native iOS stackOverflow question with the same issue (1px line)
> realize your Xcode test wasn’t done properly.
>atleastimmakingprogress.iso
> start looking into the SO post
>it’s native so I have to find out how to do it in react-native
>invent a bunch of style parameters that don’t exist in the documentation to see if there’s an undocumented thing
>loadsaloadsaerrors.log
>googles for a react native version of the iOS only SO post
> somethingpromising.tar.gz
> *tries it*
> “Haha nope” -my code
> whataboutthisotherthing.bin
> KENSISHSBUCNEGWISBVSIDNRVSIDNFIRJRBDKFNFIDJFIFKFNR
> HOLY FUCK
> IT WORKED
> AFTER TWO FUCKING DAYS OF SHITTERY AND SHENANIGANS
>AND MANY STACKOVERFLOW EDITS TO A NOW VERY MESSY POST
>THEREISNOMOREBORDER(final).zip
>*screams of relief*7 -
A dev found a bug I created where I set a SQL parameter name to @OrderID instead of the expected @Order. The standard is @OrderID, there is one stored proc where it's @Order.
Oops...I didn't catch it because the integration test didn't cover that area of the code. My mistake...I should have checked...I take complete responsibility for the screw up.
He let me know by email..
"When refactoring, from now on check the stored procedure parameters, there are a few that don't follow the standard."
I was like "from now on..."? ...wow....bold comment from someone responsible for code that doesn't check for nulls, doesn't log errors, and relies on exceptions for flow control. You wouldn't even have known about the error if I didn't modify your code to log the error (the try..except returned false)
I really wanted to reply ...
"Fixed. From now on, when you come across those easily found bugs, go head and fix it, write a test, and move on. Don't send a condescending email to me, my boss, your boss, all the DBAs, and the entire fracking order processing team. Thanks."
But..I thanked him for finding and letting me know...we're a team..blah blah blah..
Frack..people suck.1 -
Last night i had to write sms center for a panel for my client
I was awake till 5 am 😧 why you ask ?
They had a restful api and also a webservice but neither was complete 😑
And the documents of it was f*#$& worst
They had UserName as parameter but the actual one was userName 😑😐 thats not just it they had more
Also they missed some parameters for some functions 😑
They had parameters for Count and instead of int they said its a Bool and on the description it said 1-100
Im so frustrated1 -
I used to be a Java fanboy.
After seeing the modern things one can do with other languages I am just disappointed, that Java is so old-fashioned.
Some would say "BUT IT HAS LAMBDAS".
Good, that we have lambdas. We don't have optional parameters or objects (like in JS's {} or PHP's stdClass).
JVM may have many advantages, but I think, that Java is slowly dying although it is kept alive by some companies, still using Java in prod.
I think, that Kotlin is, what Java should have been.
I hope, that my wishes will be implemented in Java 10. If not, Java is considered as dead.8 -
When coworkers built the shop to allow adding items to cart via url query parameters-_-
/shop/?itemNum=1234&Qty=4
..what?4 -
I am currently working in a company which according my parameters is very good and which I've been "chasing" for over 1 year and a half... I feel really fine...
But something curious started to happen 3 weeks ago... Companies before that in which I had an interview and that they said I wasnt enough experienced (not even with 5 years almost 6 working as a dev), started to contact me making a job offer (obviously without tech interview)...
Does anyone feels this like funny or a dejavu of an experience in another area ?... They said no but when I found the a place they start to appear like the grass of my backyard with offers... They would have made an offer before dumbasses3 -
Just spent forever trying to figure out why my POST request parameter(s) weren't working. The PHP was checking for GET parameters. Fucking hell.1
-
I love how most users carefully snip out the problematic areas of web the page to a bare minimum, where all I can see is the broken bit... which is fine...
...BUT I'M REALLY ALSO INTERESTED IN THE URL because parameters, man!!!1 -
I am starting to get really annoyed by shitty devs and tech leads from other teams that ask me to fix urgently a "problem" with my project they rely on, but turns out they did not even debug the fucking thing in the first place to understand where the problem comes from.
Turns out someone used the wrong parameters on his duct taped jenkins CI and instead of finding the reason for the failure, he just assumed my code did not work.
This is the last time I'm helping you fucks before a release while I am on holidays in my country. Worst thing is you guys are paid twice my salary in US dollars but you still can't code and debug for shit.
How about telling me truth when I asked you guys if everything was working fine before I took my vacations? Do you fucking test your shit for fuck's sake? Nah you guys just suck ass.
I will turn off my computer when off work from now on and uninstall slack and emails from my cell phone. These guys are not competent enough to use those tools properly.3 -
wtf!! That stupid piece of @#$@#$, how does it even work for anybody. EVER. Bundle it in a container, make sure it's ephemeral. Yerterday it worked, and today it fucking does whatever it wants@!!! That fuking fucktard piece of shit!!
Fuck it. Fuck all of it.
It must be a fault in my RAM or something. I mean, nothing has changed since yesterday. I could run the appp in the container yžday ez, and today -- it gives me a finger, completely ignoring my parameters!! Asshole!!!!6 -
So about two months ago in my consulting firm I was asked to replace a colleague on a project (node and Angular). The project is only a few months old but it’s already a total clusterfuck. DB is very poorly designed. It’s supposed to be a relational database but there’s not a trace of a foreign key or any key for that matter and I’ve seen joins like tableA.name = tableB.description (seriously, that’s your relation??). The code is a mess with entire blocks of code copied from another project and many parts of the code aren’t even used. He didn’t even bother renaming variables so they would make sense in the context they were shamelessly thrown into. The code is at best poorly typed if not typed at all.
During our dailies I sometimes express my frustration with my other colleagues as I very politely allude to my predecessor’s code as being hard to work with. (They are all “good friends" with him). I always get the same response from my colleagues: "yeah but you’ve gotta understand Billybob was under a lot of pressure. The user stories were not well defined. He didn’t have time to do a proper job". That type of response just makes me boil inside.
Because you think I have time to deal with this shit? You don’t think I’m working with the same client and his user stories that are barely intelligible? How long does it take to write type definitions for parameters going into a function? That’s right, 30 seconds at most? Maybe a minute if it’s a more elaborate object? How much time do you think you’ll save yourself with a properly typed function or better yet an interface? Hard to tell but certainly A LOT MORE than those 30 seconds you lost (no, the 30 seconds you INVESTED) in writing that interface!!!
FUCK people with their excuses! Never tell me you don’t have time to do a proper job! You’ve wasted HOURS of my time just because you were too fucking lazy to type your functions, too lazy to put just a little more thought into designing your tables, too lazy to rename a variable so that it’s name actually makes sense where it’s being used. It’s not because you were short on time. You’re just lazy!
FUCK!!!!!!3 -
So for those of you keeping track, I've become a bit of a data munger of late, something that is both interesting and somewhat frustrating.
I work with a variety of enterprise data sources. Those of you who have done enterprise work will know what I mean. Forget lovely Web APIs with proper authentication and JSON fed by well-known open source libraries. No, I've got the output from an AS/400 to deal with (For the youngsters amongst you, AS/400 is a 1980s IBM mainframe-ish operating system that oriiganlly ran on 48-bit computers). I've got EDIFACT to deal with (for the youngsters amongst you: EDIFACT is the 1980s precursor to XML. It's all cryptic codes, + delimited fields and ' delimited lines) and I've got legacy databases to massage into newer formats, all for what is laughably called my "data warehouse".
But of course, the one system that actually gives me serious problems is the most modern one. It's web-based, on internal servers. It's got all the late-naughties buzzowrds in web development, such as AJAX and JQuery. And it now has a "Web Service" interface at the request of the bosses, that I have to use.
The programmers of this system have based it on that very well-known database: Intersystems Caché. This is an Object Database, and doesn't have an SQL driver by default, so I'm basically required to use this "Web Service".
Let's put aside the poor security. I basically pass a hard-coded human readable string as password in a password field in the GET parameters. This is a step up from no security, to be fair, though not much.
It's the fact that the thing lies. All the files it spits out start with that fateful string: '<?xml version="1.0" encoding="ISO-8859-1"?>' and it lies.
It's all UTF-8, which has made some of my parsers choke, when they're expecting latin-1.
But no, the real lie is the fact that IT IS NOT WELL-FORMED XML. Let alone Valid.
THERE IS NO ROOT ELEMENT!
So now, I have to waste my time writing a proxy for this "web service" that rewrites the XML encoding string on these files, and adds a root element, just so I can spit it at an XML parser. This means added infrastructure for my data munging, and more potential bugs introduced or points of failure.
Let's just say that the developers of this system don't really cope with people wanting to integrate with them. It's amazing that they manage to integrate with third parties at all...2 -
Not sure if it's the worst code review but it's a recent one.
We don't really do code reviews where I work unfortunately but my coworker used my framework for the first time (build some nice composer libraries for cmdline projects) and asked if I could make them do autoloading.
He never used namespaces before so I was glad to help him out.
What I saw was a dreadful mess. His project was called "scripts" so good luck picking a namespace...
Than it was all lose functions in the executable file. All those functions are however called by a class in another file (if they where not calling eachother as a cascading mess). That class was extending an abstract class from my library as instructed. However I never imagined my lib being raped like that.
The functions themselves are a horrible mess. Nothing uniform completely different style (our documentation states PSR's should be used).
Parameters counts higher than 5.
Variable names like Object and Dobject (in calling function Dobject is Object but it needs a fresh one.
If statements on parameters that need basically split it in two (should simply be to functions)
If else statement with return of same variable as a single line (sane people use ternary for that)
Note that I said functions. All of it should have been OO and methods. Would have saved at least some of the parameter hell.
I could go on and on. Do I think the programmer is bad yes (does not even grasp interfaces, dep injection, foreach loops). Is this his best work no. He said that for a one of script like this it just has to work. Not going to be used elsewhere. I disagree as it is a few thousand lines of code that others have to read too.2 -
If you're not going to update your API documentation please just delete it. I spent two hours trying to use the example only to discover SECRET REST PARAMETERS that solved my problem.
If it weren't for the hero bitching in the comments about the missing documentation I would never have gotten this to work.2 -
Head of technical team thinks it's a best practice to include stringified JSONs in the HTTP GET request parameters...3
-
Pretty much Python automation on steroids.
https://github.com/konradhalas/...
Dacite is an integral part in it, cause it makes most auto generated API wrappers like Cloudflare API "maintenable".
Getting dicts, converting via Dacite to defined data classes...
Then using TOML to define e.g. output parameters (e.g. list of classes / properties one needs)...
... To export them via Pandas to anything what one needs.
It's just so comfortable.
Definining data classes, sprinkle the API calls and dacite in it, some definition via TOML, done.
Yes, lots of dark vodoo / behind the scenes magic... But ... It removes all this annoying fucked up boilerplate writing that takes ages and makes it frustrating.
As long as the data wrapper (e.g. clousflare API) generates Dicts, its really minutes to get an export working.
If you know the pain of having to deal with multiple accounts, different formats (e.g. different companies)… hours of manual copy pasting to aggregate the data etc.
Then you can maybe understand why I love this so much.
Data classes and dacite makes painful confusing workflows so much nicer and self documenting, I get wet in my pants while writing this. :) -
Company had problematic client projects that each client has a bucket load of change requests. Company doesn't know how to say "No" to them. Company can't afford to pay the subvendors for the changes and the subvendors aren't willing to do them for free.
I went in, reverse engineer the shit out of each application, database, system, documented my own findings, changed according to each client request. This involves editing tables in MSSQL, rerouting PHP files, adding field and validations in C#, passing parameters in VB to Crystal Report, and managed every change request into my own personalize ticket system (that the company does not have).
Saved the company, everyone was grateful. A couple of months later, the company hasn't paid my salary on time, I left like a boss.
They're in shit again and need my help. Haha! -
i cant believe i actually spent 6 fucking hours trying to write the implementations for string functions and trying to consider having null parameters ehwndbwksbdk wtffff is happening2
-
Python devs and data analysts....
Do you recommend using pycharm for working with jupyter notebooks? I surely had a bad time with it.
I have been using many jetbrains softwares , and am a fan of their docs search and autocompletion. But I don't think there is a full support for jupyter jn it, because sometimes my graphs made using matploit or seaborn just brakes.
And some libraries have a lot of functions taking parameters as " *args, **kwargs " , I don't know what that means but those function take a lot of "value" parameters i guess?(like this: plt.figure(figsize=[13,6], axis=False) )
Pycharm also don't seem to have access to list of those arguments...
Are you having such problems too? Have you found some better ide with autocompletions and support for jupyter? Do tell.
(Ps: i know jupyter can be run directly on a browser, but as i said "auto completions and documentations" )5 -
That shitty moment when you are reverse engineering an app (LINE), but can't find any useful hints.
Web analysis didn't help. Decompiling the windows executable also didn't help. Testing the app on different behaviour with python scripts didn't help. Analysing the android app on windows with the jadx decompiler and other decompiler didn't help that much.
BUT today it worked. I did use a paid "Dex dump" android application. I found some methods that the app receives from the servers with a thrift protocol.
Now I just need to find the right parameters to be finally able to make a bot. Hehehe.
That was a hard way, but it paid out. I did learn so many things. It took me like a whole year.5 -
My current project involves storing parents and children of parents in to a community database.
My current parameters include "availablechildren", "selectedchildren" and "forchildren"...and I'm worried somebody in this office is going to see this and I'm going to end up on some kind of register :S12 -
Fuck Wordpress, Fuck Wordpress's PHP
I'm so fucking tired of everything in this godforsaken CMS. Import a JS File? Sure, just add a *completely obvious* line into a very specific PHP File, where you'll have to specify a lot of "useful" parameters. No, I somehow DON'T want to specify that I don't wand jQuery in every import. And don't even get me started on Content Delivering. Embed CSS? Sure, just write the fucking whole path to the file, or use the broken get_stylesheet_uri() Function. Embed an Image? Sure, let me just go to the Backend and wait 6 Minutes for this bullshitty System to upload the image and then copy the hard-coded Link. Oh, you want to remove googleapi embeds? Sure, let me just fuck up your whole Website in return.
You want jQuery? Well instead of using the "$" Symbol, you have to use the jQuery() Function. Except when you don't have to, which is 100% random each time you reload the page. Oh, you actually did import a JS File? Sure, let me just not run it. Thank you fucking piece of shit thats calling itself "WordPress" and fuck you and everyone whos actively encouraging its usage1 -
Let's say you're working on a web application, and you notice that one of the pages is not displaying the correct data. You investigate further and realize that the data is being retrieved from an API endpoint, but for some reason, the API is returning the wrong data.
You start looking into the code that calls the API and notice that it's passing in the correct parameters, so you dig deeper into the API code itself. After hours of poring over the code, you finally discover that the bug is caused by a typo in the database query that the API is using to retrieve the data.
You fix the typo and think the problem is solved, but then you realize that the data is still not displaying correctly on the page. After even more investigation, you discover that the bug is actually being caused by a caching issue on the client side.
At this point, you're feeling incredibly frustrated and overwhelmed. You've spent hours trying to track down this bug, and it feels like every time you think you've found the root cause, another issue pops up. This is just one example of the many challenges that developers face on a daily basis.6 -
New in my job
Start to work on a abandoned project for one of our client not very happy cause the lack of update
Go for a critical issue which exists since 2 months where everyone was telling me that they passed a huge time working on it with no answer
*check error*
*check code*
The code is so fucking much not DRY so I was able to see the same 4-5 incriminated lines elsewhere
*see that the request is lacking of one parameters just has the error suggests*
*copy paste the missing line*
*it works*
I’m now a hero for them but they become fucking peasants for me
(In addition, when code reviewing, some one had the nerve to tell me that “haha it was nothing much finally, it was easy”
To him : fuck you, eat my 💩) -
I'm trying to build VoIP into my browser-based game, and holy shit are sound processing people bad at explaining stuff.
Every stackoverflow answer has badly named variables, noone names the algorithms they're using (which makes research near impossible), and literally every single Web Audio API pipeline I have seen so far contains at least one unexplained effect with no parameters, but it's a different effect each time.
One guy had implemented some kind of smoothing for catching up with the stream after interruptions (where the playback speed is proportional to how far we're behind the intended latency), without ever mentioning it anywhere. And this is meant to be a basic example!4 -
In Django code, looking at a class for caching REST calls. The cache is using Redis via Django's cache layer. In order to store different sets of parameters, each endpoint gets a "master" cache, that lists the other Redis keys, so they can be deleted when evicting the cache. Something isn't right, though. The cache has steadily increased in size and slowed down since 2014 even though many events clear the whole thing!
... And then it hit me. Nothing empties the list of cache keys. Nothing. So it has been growing endlessly since 2014. And everytime it grows, cache eviction gets a little more expensive, network traffic increases a little more, and cache evictions get a little slower.
Fixing this bug took things that were taking routinely an entire minute to complete and made them take a couple seconds. -
Python. Oh dear Python. Why, oh why, when I have your function with parameters defined as an int, do you blithely accept a string and just go about your merry day? If I wanted you to be able to accept a string I would have let you accept a string. But no, I want ints. Its not a suggestion. Its a demand.
You're dynamically-typed thug life gets on my static-typed backgrounds nerves.
(I am fully aware of the reasons for it and why, but my goodness I do sometimes miss my static-typed compile error languages, rather than pseudocode that accidently compiles python)25 -
Whenever anyone asks me why I dislike C++ I'm just going to point to this current app I'm working. Had a unit test with an extern method declaration that had 7 or 8 different parameters. No big. Problem is that the ACTUAL definition of the method had 1 less parameter than the extern declaration. It worked perfectly fine in x86. Ported to x64, compiled fine, hard crash at runtime. Debugger not a super lot of help. Took me a couple days to figure that one out. Also I am broke so I can't even drink the pain away. Neat.
-
rant¹⁰⁰⁰⁰⁰⁰⁰⁰
WHAT THE FUCK IS THAT SYMFONY DOCUMENTATION. When i'm coding and i'm searching for some info on a function, I DON'T FUCKING WANT A TUTORIAL. I DON'T FUCKING WANT EXAMPLES. I WANT A FUCKING DESCRIPTION OF THAT FUNCTION. WHAT PARAMETERS ARE NEEDED. WHAT CAN I GET IN RETURN. IS IT SO FUCKING HARD TO UNDERSTAND ?
Seriously though, i can't believe actual devs thought this was a good idea. at this point i've been searching for two goddamns hours for a solution to something that should be TRIVIAL, and i'm NOWHERE near a solution. Thanks for my time, Symfony.1 -
Working on some 2 year old php code don't know who has written it.
Found a function with some 500 lines of code and there is 3 times MySQL connection is initiated overriding same fucking variable with hardcoded database parameters in all of them
What the fuck man😦😦😦
Plus I have just started revewing the code there are tons of files and everywhere connection is hardcoded.4 -
Just in a meeting with data science team. They're testing a different random forest implementation and getting better results and I asked why and the HEAD OF THE FUCKING DATA SCIENCE DEPARTMENT says "I'm not sure, I think maybe different default parameters" and I'm like WHAT THE FUCK the old implementation we just set the defaults and went with that1
-
I'm developing a web app, which is purely based on some commercial .NET driven API. The documentation is a 12 page MS Word file with incorrect parameters and non-existing endpoints. I think there's also a cronjob which purposely crashes their server every 15minutes. I just love getting client emails saying I need to fix my app and get my shit together.
-
Looking at an old Java project, running java 1.6, test folder doesn't even exist and the "old but gold" java.utils.Date class is used throughout the whole thing. How do I initialise a new date again...? I actually just googled that :D At least the constructor parameters are named nicely... wait.. what...1
-
I can't stand Swift's initializers. No other languages have the problem with constructors/initializers that Swift does. It's a complete failure of a feature and to hell with safety if it comes with this cost.
Just to illustrate how ridiculous it gets, I want to have a class where my initialization logic can be split among reusable parts. That is, the logic that initializes the class with no parameters has logic that I want to reuse in my other initializers. Simple DRY stuff. Well, the only way I can do that in Swift is if I use a convenience initializer that calls another one. But convenience initializers have completely different rules from designated initializers (again, something only Swift does).
For example, you can't access "self" until you call a designated initializer. You can't chain designated initializers, and if you want to chain anything in the same class you have to handcuff yourself by using a "convenience" initializer (there's nothing convenient about them, I might add).
So now I want to subclass my class and initialize myself using one of my superclass initializers. Oh but the one I want to call is a *convenience* initializer so I can't, unless I turn my new initializer into a convenience initializer. Except wait, a convenience initializer must delegate with self.init(), so it can't even call a superclass initializer!
And it just goes round and round and round. I don't know if I should try to convert all of my initializers to convenience initializers or the other way around.
Why all this nonsensical madness? Get rid of the distinction and go back to nice clean powerful initializers like Objective-C. I mean what does it have to take? This is a complete nightmare.13 -
"An array of arrays? What the hell?" - the client's dev team, failing to understand the parameters of the JS lib they chose to implement.2
-
I have to add an endpoint to integrate an API and I want to vomit when I think about this major security issue they introduce.
What type of prehistoric dumbass thought GET requests with username and password in the query parameters is a good idea to burden your partner with.4 -
JSrant
Is there no other uglier way to create a constructor in JavaScript apart from using parameters for the properties?
Some of my entity has like a dozen properties (+_+)12 -
!rant
Digging though my old emails found this joke sent to me long time ago. Think that originally was posted in a 1997 issue of Computerworld. Maybe you already suffered the effect of the "Opcodes" listed here. Hope that !tl;dr
ARG Agree to Run Garbage
BDM Branch and Destroy Memory
CMN Convert to Mayan Numerals
DDS Damage Disk and Stop
EMR Emit Microwave Radiation
ETO Emulate Toaster Oven
FSE Fake Serious Error
GSI Garble Subsequent Instructions
GQS Go Quarter Speed
HEM Hide Evidence of Malfunction
IDD Inhale Dust and Die
IKI Ignore Keyboard Input
IMU Irradiate and Mutate User
JPF Jam Paper Feed
JUM Jeer at Users Mistake
KFP Kindle Fire in Printer
LNM Launch Nuclear Missiles
MAW Make Aggravating Whine
NNI Neglect Next Instruction
OBU Overheat and Burn if Unattended
PNG Pass Noxious Gas
QWF Quit Working Forever
QVC Question Valid Command
RWD Read Wrong Device
SCE Simulate Correct Execution
SDJ Send Data to Japan
TTC Tangle Tape and Crash
UBC Use Bad Chip
VDP Violate Design Parameters
VMB Verify and Make Bad
WAF Warn After Fact
XID eXchange Instruction with Data
YII Yield to Irresistible Impulse
ZAM Zero All Memory -
Best documentation, cakephp/laravel
Worst is by far Java docs...
for fucks sake include some useful examples i dont wanna see a table with parameters, My IDE can provide more helpful info than that4 -
The worst technology i had to deal with was probably a piece of hardware. It was a mini-pc combined with sensors and digital IOs and thus, it should have been able to do process control all by itself.
At that time, there was hardware that did that, but this one had an intel cpu, windows embedded and some powerful libraries pre-installed.
Sounds good, didn't work. The thing was so unstable and buggy and crashed on everything. The sensor part had lots of parameters and the right order was trial and error, documentation didn't match behavior, fixes promised but never delivered.
Lucky for us: it was just a demokit, no real project.
I still remember it with a smile. We got in contact to that company at a trade fair and they had most impressive booth. I also remember their companies image movie from their homepage with developers in dark labs with holographic monitors and the boss in his shiny bright office as he looked out of the window and quoted a famous german author.
Hilarious and sad. :-)2 -
It's more of a QA rant....
A Website takes address information via POST. Since Selenium can not do POST properly devs said: "no worries, we will make the site accept addresses via GET url parameters"
Me:"Why not make a simple page with input fields that just behaves like the site calling our site via POST?"
Devs:"Nah we don't need that. Will be fine. We will ensure that POST service works via unit test."
Come release week... Dev:"Guys, POST isn't working, IT Analyst tested with the other site..."
Dev1:"Why did QA not test this earlier?"
Dev2:"He wanted to, we told him that we would unit test this. He fucking knew it. He fucking knew it so don't blame him!"
Me: :34 -
After learning a bit about alife I was able to write
another one. It took some false starts
to understand the problem, but afterward I was able to refactor the problem into a sort of alife that measured and carefully tweaked various variables in the simulator, as the algorithm
explored the paramater space. After a few hours of letting the thing run, it successfully returned a remainder of zero on 41.4% of semiprimes tested.
This is the bad boy right here:
tracks[14]
[15, 2731, 52, 144, 41.4]
As they say, "he ain't there yet, but he got the spirit."
A 'track' here is just a collection of critical values and a fitness score that was found given a few million runs. These variables are used as input to a factoring algorithm, attempting to factor
any number you give it. These parameters tune or configure the algorithm to try slightly different things. After some trial runs, the results are stored in the last entry in the list, and the whole process is repeated with slightly different numbers, ones that have been modified
and mutated so we can explore the space of possible parameters.
Naturally this is a bit of a hodgepodge, but the critical thing is that for each configuration of numbers representing a track (and its results), I chose the lowest fitness of three runs.
Meaning hypothetically theres room for improvement with a tweak of the core algorithm, or even modifications or mutations to the
track variables. I have no clue if this scales up to very large semiprime products, so that would be one of the next steps to test.
Fitness also doesn't account for return speed. Some of these may have a lower overall fitness, but might in fact have a lower basis
(the value of 'i' that needs to be found in order for the algorithm to return rem%a == 0) for correctly factoring a semiprime.
The key thing here is that because all the entries generated here are dependent on in an outer loop that specifies [i] must never be greater than a/4 (for whatever the lowest factor generated in this run is), we can potentially push down the value of i further with some modification.
The entire exercise took 2.1735 billion iterations (3-4 hours, wasn't paying attention) to find this particular configuration of variables for the current algorithm, but as before, I suspect I can probably push the fitness value (percentage of semiprimes covered) higher, either with a few
additional parameters, or a modification of the algorithm itself (with a necessary rerun to find another track of equivalent or greater fitness).
I'm starting to bump up to the limit of my resources, I keep hitting the ceiling in my RAD-style write->test->repeat development loop.
I'm primarily using the limited number of identities I know, my gut intuition, combine with looking at the numbers themselves, to deduce relationships as I improve these and other algorithms, instead of relying strictly on memorizing identities like most mathematicians do.
I'm thinking if I want to keep that rapid write->eval loop I'm gonna have to upgrade, or go to a server environment to keep things snappy.
I did find that "jiggling" the parameters after each trial helped to explore the parameter
space better, so I wrote some methods to do just that. But what I wouldn't mind doing
is taking this a bit of a step further, and writing some code to optimize the variables
of the jiggle method itself, by automating the observation of real-time track fitness,
and discarding those changes that lead to the system tending to find tracks with lower fitness.
I'd also like to break up the entire regime into a training vs test set, but for now
the results are pretty promising.
I knew if I kept researching I'd likely find extensions like this. Of course tested on
billions of semiprimes, instead of simply millions, or tested on very large semiprimes, the
effect might disappear, though the more i've tested, and the larger the numbers I've given it,
the more the effect has become prevalent.
Hitko suggested in the earlier thread, based on a simplification, that the original algorithm
was a tautology, but something told me for a change that I got one correct. Without that initial challenge I might have chalked this up to another false start instead of pushing through and making further breakthroughs.
I'd also like to thank all those who followed along, helped, or cheered on the madness:
In no particular order ,demolishun, scor, root, iiii, karlisk, netikras, fast-nop, hazarth, chonky-quiche, Midnight-shcode, nanobot, c0d4, jilano, kescherrant, electrineer, nomad,
vintprox, sariel, lensflare, jeeper.
The original write up for the ideas behind the concept can be found at:
https://devrant.com/rants/7650612/...
If I left your name out, you better speak up, theres only so many invitations to the orgy.
Firecode already says we're past max capacity!5 -
Turns out you can treat a a function mapping parameters to outputs as a product that acts as a *scaling* of continuous inputs to outputs, and that this sits somewhere between neural nets and regression trees.
Well thats what I did, and the MAE (or error) of this works out to about ~0.5%, half a percentage point. Did training and a little validation, but the training set is only 2.5k samples, so it may just be overfitting.
The idea is you have X, y, and z.
z is your parameters. And for every row in y, you have an entry in z. You then try to find a set of z such that the product, multiplied by the value of yi, yields the corresponding value at Xi.
Naturally I gave it the ridiculous name of a 'zcombiner'.
Well, fucking turns out, this beautiful bastard of a paper just dropped in my lap, and its been around since 2020:
https://mimuw.edu.pl/~bojan/papers/...
which does the exact god damn thing.
I mean they did't realize it applies to ML, but its the same fucking math I did.
z is the monoid that finds some identity that creates an isomorphism between all the elements of all the rows of y, and all the elements of all the indexes of X.
And I just got to say it feels good. -
fuck the guy that writed the api that I consume at my company
he's not the worst guy ever, and he might be going through some stuff in life, or maybe he's just happy. There's no way to know actually.
but fuck him. fuck this fucking guy. fuck him with a thousnd dicks.
this guy defends his postures on the api like this thing was fucking sacred and masterly designed ok?
if I ask him to change one url's method from get to post so that I can send more longer data for the request, he comments "i cant believe they still haven't figured out a get request with a body". I appreciate him caring abkut the correctness.
but this is the same piece of shit that makes NOOO fucking validations on whatever I send to it. I get 500 for fucking EVERYTHING.
And if he does 400, the actual response messages are garbage, the same fucking text with no explanation.
FUCK YOU!!!!!!
I hate the way he structures the names of the url and the parameters, sometimes I have to send arrays of strings, other times arrays of objects, the naming is garbage and INCOSISTENT.
And when we asked him to do the API dotnet core, he was like "nah" FUCK YOU FOR USING SOON TO OBSOLETE TECHNOLOGIES!!!
THIS PIECE OF SHIT IS SLOW, because a coworker did another spi in core and the response times are hugely better.
I wouldnt mind if he was 100% of the time careless, but he actually makes a stand for his ideas, as if he actually gave two shits.
he's actually an ok guy though but... fuck hiim!!!! ive been holding onto this for a while... and I'm sure I have some flaws too.7 -
Fried two devices today by simply connecting them to a power source.
Changed nothing in the circuitry, no shorts due to solder residues (a simple modification was made), no changes in the input parameters. Check.
The afromentioned devices should have only minor HW changes compared to a previous version I'm working with and as far as I can see absolutely nothing which should cause the damn microcontroller to release smoke like a steam train. (All right, a very miniature steam train.)
So the only significant difference might be the firmware which I didn't check yet but will tomorrow. Not my code and the corresponding IDE just basically sucks. Yay.
On the other hand, the Software part finally feels like I'm getting somewhere. It seems just ... to work. Very suspicious.
Feeling ambivalently frustrated and relieved at the same time. Sigh.7 -
Working with machine learning gets very tiring sometimes.
Waiting for the results, tuning the parameters...
Arghhh....why does it keep getting stuck...1 -
PHP is such an absolute shit.
`array_map` takes function first param, array second param
`array_walk`, which is similar for associate arrays, takes array first param, function second param
and at the same time, the function of `array_walk` takes parameters in `value, key` order
what the crazy fuck this is.2 -
I'm shitting there hammering out some code butchering some real problems when I suddenly realise I'm surrounded. I look around and yes it's the bloody committee.
The committee is what I call the rest of the department and it is dominated by the old guard which comprises of the programmers that have been around for longer.
None of the old guard can program particularly well but because they had been around the longest they'd all grown senior. The committee had free reign but anyone else doing anything differently has to get approval from the committee.
The only way to code otherwise was to copy and paste existing code then to primarily rename things. If anyone did anything that hadn't been seen before then it would have to be approved by the committee. Individual action was not permitted unless you were old guard.
I swept my headphones away expecting it to be something unimportant. It was.
First things first they announce. We're going to add extraneous commas to the last element of all possible lists separated by comma including parameters or so they say. Ask but why so I do.
Because the language now supports it. They added support for it so it must be the right way someone proclaimed. Does it? I didn't realise we were waiting for it. Why do we want it though?
Didn't you hear? It's all over the blogosphere. It massively improves merge requests. But how I ask?
Five minutes later I grow tired of the chin stroking, elbow harnessing, slanted gazes into the yonder and occasionally hearing maybe its because and ask if they mean when you for example add an element the last element registers as changed from adding a comma. Turns out that's all it is.
How often do we see that tiny distraction and isn't it pointless to make the code ugly just for a tiny transient reduction in diff noise I ask. Everyone's stumped. This went on and on and got worse and worse. But it makes moving things around easy half of them say in unison like the bunch of slobs that they are. I mean really. It doesn't make expanding and contracting statements from multiline to single line easy and it's such a stupid thing. Is that all they do all day? Move multi-line method parameters up and down all day? If their coding conventions weren't totally whack they wouldn't have so many multiline method prototypes with stupid amounts of parameters with stupidly long types and names. They all use the same smart IDE which can also surely handle fixing the last comma and why is that even a concern given all the other outrageously verbose and excessive conventions for readability?
But you know what, who cares, fine, whatever. Lets put commas all over the shop and then we can all go to the pub and woo the ladies with how cool and trendy we are up to date with all the latest trends and fashions then we go home with ten babes hanging off each arm and get so laid we have to take a sick day the following to go to the STD clinic. Make way for we are conformists.
But then someone had to do it. They had to bring up PSR. Yes, another braindead committee that produces stupid decisions. Should brackets be same line or next line, I know, lets do both they decided. Now we have to do PSR and aren't allowed to use sensible conventions.
But why, I ask after explaining it's actually quite useful as a set of documents we can plagiarise as a starting point but then modify but no, we have to do exactly what PSR says. We're all too stupid apparently you see. Apparently we're not on their level. We're mere mortals. The reason or so I'm told, is so that anyone can come in and is they know PSR coding styles be able to read and write the code. That's not how it works. If you can't adjust to a different style, a more consistent style, that's not massively bizarre or atypical but rather with only minor differences from standard styles, you're useless. That's not even an argument, it's a confession that you've got a lump of coal where your brain's supposed to be.
Through all of this I don't really care because I long ago just made my own code generators or transpilers that work two ways and switch things between my shit and their shit but share my wisdom anyway because I'm a greedy scumbag like that.
Where the shit really hit the fan is that I pointed out that PSR style guide doesn't answer all questions nor covers all cases so what do we do then. If it's not in PSR? Then we're fucked.4 -
Twilio's API docs suck.
Why can't they just provide a simple API reference will all the endpoints and parameters instead of some hand-holding tutorial with a helper library.11 -
It would have to be variable names for classes. I mainly use C#, but I'm sure this applies to other languages. You need a name for the instance variables, the parameters for the constructor, and properties.
-
i had an epiphany today, in a discussion with the software architect of our new project.
i'm having the epic job to design & implement a prototype for a C++ library in a new software project and collected some inspiration in our "old" software, where i'm maintaining the module that fulfills the same functionality (i thought). i've been maintaining this module for around a year now. i analyzed the different features and stuff to consider and created a partial model of the new library.
when i showed it to the architect today, he was like "oh my god, no no no, you don't need all this functionality, this shall not be part of the new library!"
this was the moment when i realized how deeply fucked up the code base of the old module is.
imagine it like this:
you want to automate the process of making yourself a good ol' cup of coffee.
the reasonable thing would be to have
- a smart water boiler where you set parameters water temperature and amount of water to be fetched from the water supply
- a smart coffee bean grinder where you can set type of beans, amount of beans and grinding fineness
- a component where water and ground coffee are joined to brew the coffee, where parameters like duration, pressure etc. are set
- a milk tank where amount of milk, desired temperature and duration / speed of foaming can be set
- a sugar dispenser where amount of applied sugar can be set
- optionally, additional modules with spices, syrup, ice cubes, whatever for your very personal coffee experience
on requesting a coffee, you would then configure and orchestrate all components to your wishes to make you a fine cup of coffee. you can also add routines like "makeCappucchino()", "makeEspresso()", or whatever.
our software is not like this.
it is like this:
- a smart water boiler consisting of submodules that know how to cook water for e.g. "cappucchino with sugar" or for "espresso without sugar, but with milk and ice cubes"
- 5 smart bean grinders that know how to grind beans for e.g. cappucchino, espresso, latte macchiato and for 73ml of water preheated to 82°C
- a very smart sugar dispenser that knows how to add sugar to 95, 98 and 100°C coffee and to coffee made of BOTH coffee arabica AND coffee robusta beans.
etc. etc., i think you're getting the gist.
when i realized this, it was like, right in front of my eyes, this terrible pattern emerged like a foul, corrupted caleidoscope of chaos, through the whole code base of this module.
i've already known how rotten from the core this code base is, but today i've actually identified a really bad pattern that i hadn't realized before. the whole architecture is so bloated that it is hard to have an overview of the whole thing. and it would require a LOT of refactoring to repair this pattern.
but i guess it would also be infinitely satisfying because i could probably reduce the code base for 30% or something...
but unfortunately, this is never going to happen, because screw refactoring.
it's a great feeling to start this new library from scratch, tho...6 -
Testing a script embed plugin I am building on various random websites, and came across this.
Like, bruh; have you ever heard of a javascript map? Basic functional programming? Or even a switch statement?
It's the same statement, over and over again, but with different parameters. Even old javascript had enough tools to do this with at least a basic stench of "efficiency"11 -
Client complains constantly over image quality.
Then continues to upload diagrams as jpg not as png and then is bothered about compression artifacts...
It also doesnt help he works on a retina screen and we had to migrate his tiny thumbnail images from his old website.
Maybe I should buy a microscope... Or maybe send him the imagemagick documentation and he can choose the parameters to his liking? -
Starting to learn Haskell/type theory. I have put it off long enough and I hope this time I can get past the 5 minute intro/overview.
So far the only functional programming I have done is trying to write/use functions that take state in parameters only and limiting side effects (that I know of).
Expecting to have my mind blown and to get a monocle too.3 -
I once had to fix a webservice endpoint another developer added that accepted any file from the public internet and loaded it directly onto an NFS file mount with the rest of the site's image assets and then inserted a record of the file into SQL via a hand-stitched query with parameters from the endpoint.
I was working for a large enterprise company at the time... I was very disappoint. -
Not in prod today, but was part of a group project that we handed in and which got us an A.
The project was to write a PID controller for a robot that would drive along a track using a sensor to follow markings on the floor. During development we were drawing graphs of the PID parameters and sensor input every tick, which caused a bit of lag but no worries - we'll turn it off for the trial runs.
Imagine our pikachu shock meme when we turned off the graphs and our calibrations were suddenly *way* off since we had been oversteering all along to compensate for the lag.
There wasn't enough time to optimize it before the deadline and using sleeps didn't produce the same "type" of lag, so we just made the graph minimize itself when it opened. To this day I wonder if the professor ever saw it or if we got the A despite it. -
Heck yeah,
So an old Ionic 3 project wont work on the newest CLI.
I check around for the error, update some dependencies, sure enough it starts working again, all is great or so I thought.
Later something weird starts happening, upon pushing a new view on the navCtrl, the navParams are null on the next view.
I later find out that navCtrl is becoming navParams just on the first bit of the view loading, so I do a dirty fix just to keep working on the functionality from my browser, I know very well this will cause problems later on, this is just so I can keep working on functionality.
I finish all of the functionality and I'm ready to compile for android, I run my script, the dirty fix comes to bite my butt now.
I remove the dirty fix hoping for it to work just well on the apk.
Now gradle doesn't find ddmlib.jar, some 15 minutes of troubleshooting do nothing.
Fuck it, I'll just create a new project from the CLI and drag all the code there so that navParams work as expected.
Sorry Ionic, but the world is not our oyster when subtle changes in dependencies produce such unexpected behaviour, with some fucking view parameters!.
I'm looking forward to get done with all the current projects to jump back to native.1 -
does my co-worker code is actually really necessary, for the sake of arguments lets ignore server performance, and focus on this snippet.
added comment on the side of the parameters11 -
Just happened 4 days ago.
I was writing a thesis and at the same time creating a tool which automates my measurements.
It was written in Python and everything worked very well.
Of course I left it to my advisor for further measurement, telling him that if he want to measure multiple times he just need to loop over the measure-function.
I left him an example-file which looked a little like this:
example.py:
"""
import measurement_class
# Parameters
if __name__ "__main__":
m_class = measurement_class.coordinator(#Parameters)
m_class.measure(#someotherparameters)
"""
So after a few weeks I came back to my advisor (four days ago) to see this:
loop_over.py:
"""
import os
for _ in range(0,100):
os.system("python3 example.py")
"""
I'm not sure how I should feel about it...2 -
Scala. The compiler is slow; sbt is buggy; too much syntactic sugar; implicits; cryptic; unreadable; and my biggest issue, symbols are reused and their use changes depending on how they are used, let's look at _:
As an existential type, as higher kind type parameter, as ignored variables, as ignored parameters, as ignored names of self types, as wildcard patterns, as wildcard imports, as hiding imports, for joining letters to punctuation, as assignment operators, as placeholder syntax, in partially applied functions, when converting call-by-name parameters to functions. -
After years of back-end development there's a thing which keeps bugging me: how little "interactive" the development process can be.
When I did front-end I took for granted that the application I was developing was easy to run so I could immediately test any little change I do on code but on back-end this is rare to see: you develop with tons of external dependencies (authentications, VPNs, databases...) so getting your application up and running can be an huge hassle and testing API controllers can be slow and frustrating since I have to continuously juggle multiple development environments, manually regenerate tokens, do guesswork to find which parameters you have to use for your API request, maintain my Postman/Insomnia HTTP calls collection to prevent it from turning into an unusable spaghetti mess... lots of repetitive tasks which kills my focus and makes me struggle in getting into a decent flow.
Automated testing has lot of potential in helping with that but its hard to introduce when you're rewriting a legacy sistem and you're already exceeded your budget.
I wonder if I'll keep doing back-end once I'm done with this project.9 -
To all self made seniors (and those who got granted this title because it was a morale boost): is it really so difficult to grasp ideas like: Single responsibility? Don't repeat yourself? Encapsulation?
Seriously? Is it difficulty level of some quantum physics or what?
I'm not a fucking genius myself either, but when I see 300-500 LoCs function, accepting 10 parameters, having half of code duplicated in different parts of solution - I really wanna start firing people ON THE SPOT.
P.s.
To all shitty developers advocates - I know that everyone makes mistakes sometimes - I'm talking here about consistent "don't give a shit about code" behaviour.23 -
I have become the only thing I always hated in a developer. Building a project without a proper documentation.
As a solo developer in a company where I have to do database architecture, front-end, back-end, testing, NETWORKING (I am the most ignorant guy when it comes to networking), product design, there is no time for documentation.
But hey, I have structured the project, files and functions (with comment, parameters type and return type) properly and I understand what I've done even after 4-5 months without touching that specific project so I got that going for me which is nice... I guess.3 -
Started working as a "working student" in an it company to write unit tests. (which then will be executed automatically - so automated unit tests)
Realised that I write more or less the same code just changing the names and some parameters (sometimes more if it's not an number but a bool for example but it's pretty much the same scheme)
So I bought a tool for 1$ to use "auto complete" on custom templates.(I type testgetbool and the tool replaces this to the test case only asking for the variable name.)
So now I'm writing automated automated tests 😁😅
(which is btw pretty boring but cost & time effective)2 -
As a part of a project in university, we are making an extension to a functional programming language, made in Scala. One of my groupmates had made some fancy logic with spawning threads, but we had some issues with multiple function parameters. Me and another mate have then spent like 3 days trying to figure out the problem, only to realise he forgot a $ sign in string interpolation for naming parameter. Talk about feeling like you're wasting time 🙃
-
So I've a little freelance project, is basically a blog. I've decided to use microservices with angular in the front end and python in the backend.
I've been about 2 weeks copy pasting code in my api because all the modules are pretty simple CRUDs that do the same thing, there is not heavy business logic or anything, just database handling.
I was really tired of copy pasting modules and his test, only changing function names and parameters, today I've this "epifany" about the inheritance and thinked about using it in my service, creating a base class and making all the other classes children of him.
Before the change my project has 220 tests (100% coverage) now I have only 40 tests (the same 100% coverage)
So, the lesson is: don't start throwing code like an idiot and start your project with some good planning1 -
Up all damn night making the script work.
Wrote a non-sieve prime generator.
Thing kept outputting one or two numbers that weren't prime, related to something called carmichael numbers.
Any case got it to work, god damn was it a slog though.
Generates next and previous primes pretty reliably regardless of the size of the number
(haven't gone over 31 bit because I haven't had a chance to implement decimal for this).
Don't know if the sieve is the only reliable way to do it. This seems to do it without a hitch, and doesn't seem to use a lot of memory. Don't have to constantly return to a lookup table of small factors or their multiple either.
Technically it generates the primes out of the integers, and not the other way around.
Things 0.01-0.02th of a second per prime up to around the 100 million mark, and then it gets into the 0.15-1second range per generation.
At around primes of a couple billion, its averaging about 1 second per bit to calculate 1. whether the number is prime or not, 2. what the next or last immediate prime is. Although I'm sure theres some optimization or improvement here.
Seems reliable but obviously I don't have the resources to check it beyond the first 20k primes I confirmed.
From what I can see it didn't drop any primes, and it didn't include any errant non-primes.
Codes here:
https://pastebin.com/raw/57j3mHsN
Your gotos should be nextPrime(), lastPrime(), isPrime, genPrimes(up to but not including some N), and genNPrimes(), which generates x amount of primes for you.
Speed limit definitely seems to top out at 1 second per bit for a prime once the code is in the billions, but I don't know if thats the ceiling, again, because decimal needs implemented.
I think the core method, in calcY (terrible name, I know) could probably be optimized in some clever way if its given an adjacent prime, and what parameters were used. Theres probably some pattern I'm not seeing, but eh.
I'm also wondering if I can't use those fancy aberrations, 'carmichael numbers' or whatever the hell they are, to calculate some sort of offset, and by doing so, figure out a given primes index.
And all my brain says is "sleep"
But family wants me to hang out, and I have to go talk a manager at home depot into an interview, because wanting to program for a living, and actually getting someone to give you the time of day are two different things.1 -
For the last time, ES5 DOESN'T support optional function parameters. gulp --production fails when running on testing when you do that.
*fixes gulp tasks to do gulp --production by default*
Next day : hey, why does gulp keep failing.
IT IS BECAUSE YOU DIDN'T LISTEN TO ME THE LAST 100 TIMES WHEN I SAID OPTIONAL PARAMETERS DOESN'T WORK WHEN MINIFYING
Let's see how you do it now.3 -
This is a question and a rant about my frustrations with an API description. First take a look at this usage information for a library I have been playing with:
https://github.com/avaneev/avir/...
Now my first question: Is it clear as to you what the formats are for the InBuf and OutBuf parameters are?
Now, read his response to people (including me) struggling with determining the format of the buffers for this resize function:
https://github.com/avaneev/avir/...
Does the guy come across as condescending as hell? Am I reading into this? It is like the guy takes every opportunity to find fault with people not understanding the details he didn't put in his API description. I would find it difficult to have to work with someone like this.
The irony about this is the description of his code makes me think it is going to magically create this wonderfully rescaled image preserving details. The result is that a standard bilinear filtering scaling function looks practically the same. I saw no real perceptible improvements of his code over the scaler I tested against. When I adjusted parameters using presets he provided it didn't improve the results and added artifacts I could not accept. His scaler is also at least a magnitude slower than the bilinear version. So the code is pretty much a non-starter for my current project.
Ah well, I appreciate him posting the code and making it a very permissive license. That part is really cool.16 -
Hi there, I don't know what to do...
I got interviewed, and offered by two companies.
One startup, being around for 5 years, they loved me and they offered me a whole project to lead in a team of three, starting from scratch, in something that I am really interested in, plus the location is central and amazing.
The other one is a bigger company, located a bit far away from the city centre, the position is senior but not lead, is not an agency but they work on a huge range of products, so I will never get bored working on the same thing all the time.
Pay is the same, the first one I possibly could negotiate a bit more, the second one I can't for sure.
I am a hit scared of getting bored in the first one, even though I have been working on single products company all my life, now I wanted to change.
What do you guys suggest? Any other parameters I would need to consider?7 -
What do you guys think about backend developers who design&implement POST requests with URL parameters? Is this even legal? 🙄14
-
Not the worst, but deserves a mention due to how common it is.
Say your whatever object has a method called Configure. You can infer a lot from the configuration parameters or type that it takes, but for whatever reason something is unclear or doesn't work.
Tooltip from xml comments: Sets the configuration.
Official guide: Sets the configuration <br />.
Technical API reference: Sets the configuration.
I would create a support ticket explaining how this is unclear if I wasn't half expecting the suggested solution to be "you know what I mean".2 -
My colleague had some problems today.
He had problems from both user input and predefined strings sent with ajax to backend. The "&"-sign was splitting values in GET-requests into unintended parameters. So... he was simply going to search and replace all of those signs with the word "and"...
encodeURI()? Why are you sending our forms with GET-requests?! 🙃 -
Why the fuck open source solutions need to be such a load of bullcrap? I've spent a week trying to set up every single self-hosted video conference software, and the only thing I've got is a shorter lifespan.
How the fuck does your (judging by GitHub, well maintained) software only support Ubuntu 16.04? And I mean ONLY, there's no support for docker, or any other distro either, and we're only weeks from getting the second LTS since 16.04. And why the fuck does documentation tell me to manually go through 20 different config files just to enable SSL?
Why the fuck doesn't your official AWS cloudformation template include VPC or other required parameters? I've had to rewrite the whole thing just to get a valid stack you dipshit!
And how fucking hard is to make your software look decent, I can't expect clients to chat with me using something that looks like an incest child of 2003 MSN and eDonkey?
Oh, and it'd be fucking dandy if your documentation wouldn't return 404, maybe I'd be even able to test what your product has to offer?
I guess after everything I've tried I'll go with Jitsi; it seems the most decent, although it lacks some pretty basic features like limiting chat features for guests.22 -
Hi fellow ranters,
Its been awhile since I last was here posting stuff..
So, I've commited to my effords getting shit done in golang. And I met a lot of painpoints, and I mean...
A
Lot
Of
Them.
Anyway, most of them are solvable by changing mindset or having some macros set up for no-one-fucking-wanted bloody boilerplate code that is omnipresent fucking EVERYWHERE.. **cough**
Steering back on what I want to rant about.
We with our team have one major problem with golang. There is no standard for docs in code...
Like, Fing legit. Everyone uses notation for closest to theirs heart language, so you get inconsistent-as-fuck notations for parameters / function descriptions.
We have functions that look like
//doSth does something
and also
// doSth
// @Summary does sth
// @Description does something but in more words
// @Param
and so on and so on
And trust me Im getting mild example.
Why this language does not have A F...ING (well defined, using proper definitions) STANDARD YET?
EDIT:
bonus context: We decided that too much of our code is undocumented and we go through efford of documenting it, but everyone sees it differently, and we can't agree on one single standard... So we decided to not refuse PRs due standard, as well, nobody would ever had PR accepted3 -
I don’t want to come across as entitled, but what kind of person gets a software internship in California?
I go to university in California, I’m a junior CS student, I have 8 public ios apps (2 charted in US, 1 acquired small sum [5k]), I completely designed the blockchain parameters and built multiple front-end apps for a new cryptocurrency (it hit 3mil$ market cap).
And I applied to 22 tech companies. Rejected from pretty much all (waiting on my dream company still). Do they just not even get to some applications or do I literally have to be superhuman?5 -
They keep training bigger language models (GPT et al). All the resear4chers appear to be doing this as a first step, and then running self-learning. The way they do this is train a smaller network, using the bigger network as a teacher. Another way of doing this is dropping some parameters and nodes and testing the performance of the network to see if the smaller version performs roughly the same, on the theory that there are some initialization and configurations that start out, just by happenstance, to be efficient (like finding a "winning lottery ticket").
My question is why aren't they running these two procedures *during* training and validation?
If [x] is a good initialization or larger network and [y] is a smaller network, then
after each training and validation, we run it against a potential [y]. If the result is acceptable and [y] is a good substitute, y becomes x, and we repeat the entire procedure.
The idea is not to look to optimize mere training and validation loss, but to bootstrap a sort of meta-loss that exists across the whole span of training, amortizing the loss function.
Anyone seen this in the wild yet?5 -
Do not buy Hostinger... They are so aggressive with caching that I ran out of devices to test the features. They probably cache based on userAgent because changing other parameters (IP, local cache) doesn't resolve the issue. I talked to tech support whole day, and although they were helpful few times I just got three same answers for the three different questions. Seriously, the only thing I like about Hostinger is their user friendly UI.
The rant goes on. I can basically DoS my website by clicking fast on it. That shit doesn't happen with some free hosting plans... My site goes down for a few minutes before I can visit it again.
THE RANT GOES ON
Using the file manager is tedious work as you get randomly disconnected after less than few minutes of inactivity.
I might seriously switch to Google's Cloud Console. It is more expensive, you have to do all the hosting config yourself using a virtual machine, but I guess it's more reliable and it gives you a lot more control.5 -
See now why I understand that in essence given a vector (parameters), you modify weights and biases minimally and these get passed through a set of dropoff style layers like ReLU and that in the end each layer leading to an output will basically sum up to a value that goes through sigmoid and concurrently equals the value desired once trained..... i don't see how this could cover all bases when parts of the math used to calculate the output is trigonemetric and polynomial. I mean not complex math ! Real basic things in my case, but a polar from cartesian coordinate conversion, angle and leg size, etc all going into determining that a target equals a landing zone and if not how to move things to it.
Is there something I'm missing where you kind of model the math because at best sin and cos could be a power series.77 -
I'm too embarrassed to show my team leaders code to other developers..
unreadable, no tests, parameters hardcoded..
But managers want to "help him grow"..
When do you decide you can't fix a lemon?4 -
1. For my employer to invest in QA. Honestly, even if I'm 101% confident about my code, if nobody tests it other than me, I would advise against prod-ing(Is that a word?) it.
2. For recruiters so stop expecting a Full stack dev to be perfect in both ends (especially with an entry level salary. Stop taking advantage of them!!). Just stop using the term full stack entirely, please.
3. For API docs of other companies to be deserving of the title 'Documentation'. I'm so tired of figuring out other API parameters via trial and error. Just make your docs as clear as you can please, so we don't have to bother each other with so much email.
That's all for now. Thanks dev Genie.3 -
Once one of my teachers told me - when giving me and my colleague feedback on a project on Java - that in a certain method we shouldn't be giving as parameters parts of an object, as we're not IKEA or something, when we could be giving the object as a whole. Not the best teacher I've had so far but I still (try to) program by that rule LoL
-
So... Working alone in a hollyday, at night .
Turning mill operator.
Started working here 2 months ago.
Had to stop a machine. They like to work by brute force here, so a tool is braking on every piece I try to make...
Might just go home early.
I know what the problem is and how to solve it, but I'm new here, I'm not going to tell the engenheir how these very expensive machines should operate.
Problem is: cutting tool should cut at most 1mm per passage, they program only one passage so its cutting maybe 10mm each time.
I just had to change a few parameters in the variables for cutting depth... But they will never learn while operators solve that problem behind the boss back. So machine is resting.
Also have no more pieces to work in the other machines... They don't pay well, so 4 people left just last month for better jobs and now there isn't enough workers to keep production.
Why do people still use 1940's methods in today's companies?2 -
First post on devRant... Aaaaand it's university hw... I can't wrap my head around this...
So, the problem is: I have to implement writing and printing 64 bit decimal integers (negative and positive with 2s complement) in NASM Assembly. There are no input parameters, and the result should be in EDX:EAX. The use of 64 bit registers is prohibited.
There is a library which I can use: mio.inc
It has these functions:
- mio_writechar (writes the character which corresponds to the ASCII code stored in AL to console)
- mio_readchar (reads an ASCII character from console to AL)
It also has to manage overflow and backspace. An input can be considered valid or invalid only after the user hits Enter... It's actually a lot of work, and it's just the first exercise out of 10... 😭
The problem is actually just the input - printing should be easy, once I have valid data...
Please help me!3 -
Lesson of the day... Always validate your input parameters, every last attribute of your parameters.2
-
Worked entire day on an ML to predict train ticket status for Indian Railways.
While doing the analysis of the data, and trying to check/research which parameters to use and which not, I'm feeling like racist -_-.
I was looking for busy period of the year(read festive seasons) and I removed those festivals which are celebrated by minor groups.
There's more to it, but the results are better now.4 -
posting the question here, because it's quite esoteric.
for the guys familiar with the devrant api: how do i know what value to use for the app parameters? when i use '3' (as suggested) i get an error telling me that the app id is invalid
or do i have to request one now?3 -
I wrote a simple Python script to split a Wikipedia page into manageable chunks. But it took a while to load, so I decided to add a loading indicator. Just a few dots appearing and disappearing. How hard could it be?
"Okay, so I just need a few dots as a loading thing."
"Right, so I suppose I'll need a separate thread for this... Better look up Python's threading again"
"So the thread is working, but it keeps printing it out on separate lines"
"Right, that should fix it ... nope."
"I should probably fix the horrible mess here"
"Hmm... maybe if I replace the weird print() calls with all those extra parameters with sys.stdout.write()..."
"Right, that kind of works, but now there's just a permanent row of dots"
"Okay, that's fixed... Ish."
Well, it works now, but there's a weird mess of two \r's and a somewhat odd loop. Oh, and there's more code for the loading indicator than for the actual functionality. This is CLI by the way.7 -
We need a list of functions with an associated string, keyed by a sequential int. Neither can change between program versions. In fact, any changes align perfectly to program versions.
The datastructure: a list of string and func with statically known parameters
The solution my PO insists on: a class with static methods that have an attribute for specifying the number, and a database table of number to string. Whenever you need to pass around the list, you pass around a Type object of the class.6 -
Confession - Testdriven UnitTests
First of all, I regret all and wish there would be no SQL Scripts but an external tool to analyze data, but the project grew hysterically and when I joined the sh*t had already been established...
I had to test some SQL Scripts. As there is no real UnitTest framework which is under development/gets support, the whole suite is kinda buggy.
So I had my script, and had the required input + expected output, but the UnitTest always failed. So I manipulated the framework parameters until the test finally passed.
Shame on me and on the project, but atleast there are tests now... -
I shall delay your PR with my giant egotistical scrotum by:
- Use less words for your function name
- Use this obscure pattern you have not learnt in your outdated compsci degree
- Each loop should get their own function
- Your function has too many parameters
- You must name every instance of magic numbers / strings
- Here, have another obscure test case to write9 -
God DAMN IT!!!!
I swear, every single time I get close to a Spring project I'm elbows deep in shit.
Like this case... I have to explicitly specify @DependsOn for my @Component, so Spring could autowire constructor parameters. If I don't, sometimes the app starts fine (if I start it through IDE) and sometimes it fails, saying bean could not be created (apparently, there's some functionality gap causing PostProcessors not to be called if the bean is first touched by a constructor autowirer)
when they say frameworks are good and fast, I say "LOOK AT MY LIFETIME SPENT WORKAROUNDING THEIR ERRORS!!!" -
That moment you forget to tell the devs about the new tests and end up doing brute force for some pen testing and load capacity and they do a rant of you
-
Today I had the pleasure of adding a feature to our intranet service written by two of my colleagues since they suffer from severe unix dyslexia. One of them was sick so I sat down with the other one and somehow he didn't know how to interpret the output, how to correctly call it from the terminal or even which parameters are needed for it to work so I had to try and decipher their code.
How can one work on something for a month and not know anything about it?1 -
Hello fellow Devs,
I have developed a small Android library for handling HTTP POST and GET requests. Anyone who is looking for an easy way to perform HTTP calls, can use this library. It supports post requests with JSON and Multipart Form data, file uploading and Get request with URL parameters.
Hope it will help you guys.
https://github.com/shubhadeepb14/...8 -
I gotta say. Zig generics / comptime code gen remind me of old (pre-prototype) JavaScript code where you construct an object using parameters and return that object to be used as a class (except in this case it's actually turned into a class at comptime instead of an object masquerading as class)28
-
There is a element in mappView that lets you display a specific image from a list based on a index. It has the parameters selectedImageIndex and selectedIndex. One is used to set the other to read. Its not like that you need RW separation. Its done with variable binding. So why the FUCK is it there????2
-
First rant;
First of all I am an applied computer science student in the second semester.
We've got a few assignments and the first set went fine but this last week boy ohh boy - first of all today I got noticed by one of my two teammates that the other one won't get stuff done in this assignment (he also did next to nothing in the first)
Also the the assignment is unclear and the given methods and parameters don't care about naming conventions (for one method I don't even know what it should do). Also we have to use new liberies (java.io etc.) and learn them on our own so far it would be okay, the time limit is two weeks, also doable
BUT the same chair also made one assignment for web development with the same deadline and also no explanation how to do stuff.
I don't say I am perfect but the expectations are too high, while also studying for other modules1 -
Nothing like trying to understand a single 1500-line source file that implements the API usage in the frontend. Without a single comment.
No, wait. There are comments! But it's only commented-out code. Or explicit shit (like "gets the version" before a getAssetVersion function).
Functions with unused parameters? ✅
Weird var names (like "tmpX")? ✅
`console.log(var)` everywhere? ✅
Long-ass lines with 150+ chars? ✅
Duplicate code? ✅✅
Not a single interface was used so everything is var: any? ✅
Random unreadable RegEx? ✅
If-chains of 6+ more levels? ✅
Many `else if` towers instead of a switch? ✅
And did I mention it was written by a fucker who can't speak proper English so shit like visiable, cataloge and isExist is everywhere? Yeah.
Fun day at the office reading spaghetti code 🙃 -
Friday
> Mister IHateForALiving, we have an automated procedure which downloads files from a website. You should update it and use the new webservice instead.
Sounds cool, just send me the documentation
> Oh yeah, have this example of a request
... Dude, this thing has 10 parameters. None of them are named, and 7 of them are actually nulled. How do I fill this thing?
> IDK
Oh, ehm... Let's ask the client then!
> NONONONO, we told the client this update was live at least 3 months ago, we can't begin asking questions now
Ouch. How much time do I have to make sense of this mess?
> The new supplier should take charge by the end of the month, I'd like this to be live by Tuesday
Needless to say, it's not going well, but that ain't none of my business1 -
How do you implement TDD in reality?
Say you have a system that is TDD ready, not too sure what that means exactly but you can go write and run any unit tests.
And for example, you need to generate a report that uses 2 database tables so:
1. Read/Query
2. Processor logic
3. Output to file
So 1 and 3 are fairly straightforward, they don't change much, just mock the inputs.
But what about #2. There's going to be a lot of functions doing calculations, grouping/merging the data. And from my experience the code gets refactored a lot. Changing requirements, optimization (first round is somewhat just make it work) so entire functions and classes maybe deleted. Even the input data may change. So with TDD wouldn't you end up writing a lot of throwaway code?
A lot of times I don't know exactly what I want or need other than I need a class that can do something like this... but then I might end up throwing the whole thing out and writing a new one one I get a clearer idea of what i or the user wants or needs.
Last week I was building a new REST API, the parameters and usage changed like 3 times. And even now the code is in feasibility/POC testing just to figure out what needs to be used. Do I need more, less parameters, what should they be. I've moved and rewritten a lot of code because "oh this way won't work, need to try this way instead"
All I start with is my boss telling me I need an API that lets users to ... (Very general requirements).10 -
More a positive rant...
Just casually looked into an invitation to a collab tool my workplace set up for discussing optimizations of workflows, internal collabs, communication, yada yada...
Just to figure out, that there's A LOT of room for improvement being discussed and new ideas related to our work. Which is fucking great! Like "Hey we could maybe introduce A/B testing for our software" or "We should change the way our CI/CD works".
One of the best things I've seen so far: "We should do smth about (react) component XY, as it currently holds many configurable parameters for look and feel with too many possibilities" ... these components are like each 1 big file or so, that covers EVERY possibility. I had a feeling in my gut that some things were built quite complicated, but originally with a good idea/intention in mind. I thought that I just needed time to get used to new things. Now I know that I need to learn nevertheless but that things NEED improvement and that others agree on that, too.
I think this is a good sign when a company tries to reflect on itself to become better.2 -
So fun fact! The Rust macro error
"Macro expansion ignores <token> and everything after it"
does NOT mean that macro expansion on general ignores this token. What it DOES mean is that the macro expanded to something, then the parser was invoked, and the parser stopped consuming tokens at the specified point.
In normal human speak, this means
"This token is invalid in its context after macro expansion. Refer to the generated code for concrete error."
I spent hours moving intermediate results into macro parameters because I thought the error meant that your macro cannot expand to the second half of a comma-separated list or whatever, until I got the same message about '(' which is very obviously permitted macro output and doesn't even really make sense given that it's not a token.2 -
BLOODY FIREFOX DEVELOPER TOOLS
I was troubleshooting an app (inside container) hitting an endpoint. For debugging purposes I tried hitting the endpoint from my machine, but always got a 404.
So in the firefox developer tools under the network section you see all of the requests happening. Every request, application/json or url-encoded, lists its parameters inside the tab 'parameters' tab. I thought that means those parameters were i side the request body.
Turns out I should have sent the parameters as url encoded instead of POSTing JSON as the request body. This took me way too long.
Why not display the request url like http://url?key=value ... Firefox? Eh?7 -
wanted to parse jinja templates for parameters to be collected at runtime.
Python - 4 lines and done
Java with jinjava library - did not get anything done, lost some hair going throught their highly undocumented code.1 -
stop using arrow function everywhere!!!!!!!
what that is mean ?
fns.reduce( (prev, fn) => fn(prev), input)
Are this is `fns.reduce` with two parameters
Or arrow function that return `input` variable.
take your time to visual parsing this crap4 -
everyone has one function that they have to look up every time they use it. for me its str_replace() in php. i can never remember the order of the parameters...and ive been using it for almost 10 years....3
-
Ever happened you find yourself deep into a function holding onto lots of unused parameters and after 6 hours of diving you close the editor, close notepad++, shutdown the system, put the laptop under the mattress and lock yourself in the wardrobe2
-
Memorizing hundreds of commands with thousands of parameters to be used on an unforgiving command prompt was the next logical step. I mean who needs GUIs or IDEs with intuitive context menus and point-click operations in 2017 anyway?
I must be getting old.4 -
Jason Bourne logic: type "run predictive algorithm" without any parameters into a terminal and it returns the locations of whatever you want. Either that function is the _best_ at predicting user input, or its variables are so hardcoded that we've just discovered the hardest material on earth2
-
I think the Gelbooru API is pretty nice.
It's consistent, has a structure that makes sense, supplies JSON and has pretty nice endpoints + parameters.2 -
guard let param = param, otherParam == .someValidValue else { return }
Beautiful one-liner that validates your function's parameters without having to incur in another indentation level. -
When you work with a "Systems Architect" that doesn't understand object oriented programming but still insists on writing code.
This particular person only uses one class in a given application and names it "Class1." He also doesn't understand ORMs and insists using inline SQL statements without parameters because he can do "just as good of a job" with his SQL "cleaner."2 -
Suffix parameters with _, so you can distinguish them from the attributes.
I wonder what IDE the person who has given me that advice uses... -
Why THE FUCK would Array.fill(arr) use arr's REFERENCE?
I know it's the default behaviour on parameters but WHY WOULD YOU WANT THAT BEHAVIOUR IN THAT METHOD?3 -
Am I the only one who wants to be able to write functions in a human readable way, allowing for parameter in-between the words?
Instead of defining:
const enforceStringEndsWithChar(string: string, char: string) => {...}
I want to define it as:
const enforce(str: string)EndsWith(char: string) => {...}
.
.
.
I'll see myself out.6 -
Our site has a feature where if a user changes some parameters in his profile, his plans on the site are updated in accordance with the change.
It took me a 2 weeks to implement a proper queue based updating mechanism.
My manager : "What's taking so long? Why not implement it in a recursive loop of all the users in the database?"
I could only stare with my mouth open. -
There are just those days where nothing seems to work. I am now 8 hours on an issue that was estimated for 3 hours and new issues pop up every time where its not even my fault. In one instance, I get the correct value back, the next time with exactly the same parameters I get a COMPLETELY different Value back which keeps crashing my code. Who coded this thing that it is so inconsistent. Starts to get REALLY annoying. ._.1
-
Amother one:
Seconf CS101 class. We had to write a program that multiplies two parameters in a method.
I asked the tutor for help because it was my forst timr ever writimg code.
"ARE YOU FUCKING KIDDING ME? THIS IS BASIC STUFF YOU SHOULD ALREAEDY KNOW IN YOUR SLEEP. ANYMORE QUESTIONS? "
Went to the prpfessor and told him what kind of assholes are working for him. Found out that the tutpr is not tutoring anyone amymore because the found someone who is not an asshole.
College is fun.1 -
Is anyone familiar with Bitwig? It's a pretty good DAW and you can write your own controller scripts in JS. I bought two controllers (Launchpad Mini and Launch Control), one of which has a really outdated factory script and the other one doesn't have anything, so I decided to update the existing one and port it over to the other controller. They do similar stuff.
I started going through the code and I think it gave me cancer. It has many gems, but so far this is my favourite. The second is a function that takes two parameters and returns false. -
So....
Another machine not working till morning.
That's what happens when the engineer knows a bit how to operate the machines but doesn't have a grasp on how cutting tools work...
Replacing 60€ tools every 4 hours that should last a week is not profitable.
When so many tools are spent that there's no more in stock.
Also manufactor has cutting parameters for a reason... Making the tools work 3 times faster or deeper does not mean profit, means damaged machines and tools.
As comparison, think over clocking a cpu to 7000hz and pushing it to the max 24h a day...5 -
Web API: "Oh, I see that you're trying to update to our new design with a category and sub-category dropdown layout. Here's one api endpoint that provides you the whole table without fucking input parameters to filter per category and sub-category. Goodluck! And Have fun filtering through the json and sub-json response!
And btw, don't even bother asking me to update the endpoint. Cause admin already said that the UI SHOULD ADJUST TO THE API AND NOT THE OTHER WAY AROUND. AS THE APIs ARE HARDER TO REVISE"
It's not our fault your api design is crap. You piece of shits. -
Today I discovered trial and error driven development for myself:
Me, reading spec..
Spec: „Do something with an CSR“ (not the exact wording :D)
So instead of just googling C# + CSR and copying the code examples,
I went like:
What means CSR -> Certificate (Something Something)
-> could be this namespace (Something with „Crypto...“ in its name)
-> could be this class (Something with „Certificate“ in its name)
-> take the easiest overload (string is always nice)
-> try filling in the parameters from the spec
-> start debugger and inspect properties
-> repeat if necessary
I don’t know if this is the correct pattern to proceed my project with...
But hey, today it worked and now I also know, what „distinguished“ means -
Writing code at work be like:
Hmm okay so if I call this facade looking for an order with a code, and the order can't be found, it will return null. Thank God this bit of code is documented...
Ten minutes later
Why is this not throwing an exception when I pass invalid parameters in...?
Two minutes later
Oh, so this never returns null. If the order isn't found, it returns an empty DTO. Fucking docs.
Seriously, the only thing worse than no documentation is documentation that lies. And that's all I get for my first project at the company, which I am having to do alone. Either no docs, or misleading docs. -
It's really frustrating, how named params have been suggested since php 5.6 but never since implemented, it's a thing that I just keep missing from .net and other languages, that have had it for more than a decade now.
https://wiki.php.net/rfc/...
https://philsturgeon.uk/php/2013/...6 -
Noob question
Is it better to implement a cryptpgraphic algo in a function or in a class? Also how?
More info:
I have a cryptography class and I really enjoy implementing the different techniques that we study in class. At first I was just implementing the techniques in a simple function with 3 parameters; key, message and a bool for encryption or decryption. But as they are getting more complex, it is becoming harder to continue implementing them in a single function block. So I thought of using a class but ran into the problem of how do I even do that? Do I make different methods for key generation, encrypting and decrypting?
P.S. It's really just for learning how the crypto technique works and not for anything serious.12 -
How do you think about unit testing/TDD when writing apps? (I'm working this at 3am so might be a bit messy... Just a thought I woke up to).
Whenever I write an app, I don't write unit tests but as I'm developing I may create test functions for specific parts that I run to validate a specific component is working before moving onto the next.
So first, when I get a problem, break it up into components based on the requirements. It's usually sort of input, processor, output sequence.
Where the processor is essentially the core app. And so I start coding it, referring to the input thru an interface, model objects, adding fields as I go along (assume no matter what the input, I will get these before the logic is called). I may add some more interfaces as well for other data I may need but I know won't be going in the first input.
So I write all the logic, functions needed to get a basic app to run that does what I am writing the app for.
Only then do I write a test functions passing in different parameters to make sure the logic and response is what I want and making fixes as necessary. At that point I basically have the simplest version of the app.
(I guess this is sort of like mocking?)
Then build outwards implementing and testing components as I go along and may do some simple refactoring/redesign. (I guess all these tests are functional then, have to start the whole app).
And finally when I have the basic requirements fully complete I will add the "nice to haves" on top via refactoring of specific logic in specific components. Again testing by running the app maybe with simple inputs.
I guess now I'm thinking how do you write unit tests/TDD if the app keeps changing (via adhoc refactorings) as you are creating it? -
Why does the documentation in the website for API doesn't include the optional parameters to use?
Why are you making my life harder!
Good thing their github.io docs has the documentation for the parameters I needed.
So, why not include it in the official documentation?! -
can't use IDE automated refactoring to extract method because we can't figure out the types of parameters and variables
fuck you typescript, javascript, graphql3 -
Half a day wasted. FUCK!
I use grafana loki and mimir/prometheus for telemetry. A few days ago I queried loki to see if logging is still working. Yesterday I changed the datasource to mimir, changed the query parameters to get metrics from another env, ran the query, and... Querier [mimir] crashed.
Wtf.
Error says it got too much data to chew on.
So I spend 4 hours playing with the querier and grpc limits, balancing between limit errors and OOMKills [2G ram].
I got suspicious about oomk. Why would it...
Then I tried to shrink the timeframe to 15min. Still oomk. Down to 5min -- now it worked. But the number of different metrics returned was over 1k
then I look once again at the query. And ofc it is ´{env="prod"}´
turns out, forgetting that you're querying metrics with a logs' query is an expensive and frustrating mistake. Esp. at 3am.
idk why it even returned me anything...7 -
When documenting some stuff in Eclipse and you separate the parameters from the actual explanation with a - and hit ctrl+shift+f (refactoring) so the - goes to the next line along with the explanation... good thing I only documented 2 methods so far LoL they have like half a dozen parameters though o-o
I wanna thank the comment I just deleted for making me realize this LoL better now than when the whole interface is commented good jesus -
So I was wondering if any of you know if any good ways to inject additional functionality into a function in CPP. My use case is injecting a counter into an OpenGL draw function to see how many times per frame it's called. I know I can do this using assembly Inca more hacky manner as you might do for cheats in games(code caves), but I'm more interested in adding is for debugging/statistics for the game engine I'm working on. Basically im looking for a portable stable way of doing it that when I compile as a debug build, the code gets added to various functions, and when I compile under release, it doesn't.
Example:
glDraw();
Would call
glDraw() {
drawCount++; //some debug stuff
glDraw(); //call the real one internally
}
I should mention with code caves you can do this by saving the original address of the function, patching the vTable to point to your new function that has the same parameters etc, then all calls to that function are redirected to yours instead and then you simply call the original function with the address of the function you originally saved. That said, I'm not sure how to access vTable, etc the "normal" way...2 -
A better half of the day wasted.
Why?
Because fabric8 k8s client probably has a bug, where it fails to deliver the last part of the exec() output. Or the whole output, if it's short enough.
brilliant... Aaaaaand we're going back to the official k8s client with ~10 parameters in their methods.
Fucking awesome. -
The more i use chatgpt the more i begin to understand: (speaking within dev context only) this thing can most likely answer and resolve anything IF you know What to input and How to ask it. If you ever happened to fail getting an answer you were looking for, that's probably because you haven't wrote the correct input parameters4
-
So I apparently forgot to encrypt some parameters when sending error reports from our app to the server.
Which means the server tried to decrypt them but couldn´t and just threw an error...
No error logs for the app this week I guess. Yay!
I need "git reset --hard head~1" for my brain this weekend, to get rid of this week... -
Apparently you cannot filter based on two parameters in firebase so something similar to "select * from table where email='something' and password ='something' " doesn't work .
So a shitty hack is to create a string to concatenate email and password and store it as a field and validate based on that field.
So basically there is a field in database which is
Sha256("emailid"+_+sha256("password"))2 -
Sometimes Idk if it's MARS (a MIPS Assembly simulator) slowing down progressively on my laptop on purpose, or if my specs just can't take my runs of my Space Invaders project that was due for today, but...
With the parameters I put for my PC, it worked just great. But on the university PC, I can't tell what's worse between playing my game or playing Touhou 6 at 650FPS. -
Anyone has any idea how to debug occasional (Severa times a day) where one of our servers decides to mount a second copy of the same NFS? It triggers our monitoring system thinking there was a change to the mounts of the system, and I was able to verify through the mounts command, that it indeed had the same NFS mount mounted twice, with exactly the same parameters.
Is there a debug interface of some sort to see what initiated that mount? Or any tool to help me track it down? I've been stuck with this mysterious issue for a while now (As it's not really a priority, it doesn't break anything, but it bugs me and I wanna know)3 -
Anyone have experience with technical analysis, algo trading?
Was reading an article about how markets are probably going to crash next year based on some technical indicators and it reminded me of the days back in uni when I tried to create (simple) trading algos using all sorts of technical indicators...
Never got anything better than random... And I recall was basically throw some indicators together and backtest using different parameters. I think it's called p-hacking.
But anyway just wondering how is it actually done such that it works... And well how can technical analysis ever work if it's completely subjective to the parameters u use? Like just take Moving Average. You can take a average over any range 1s, 1min, 1d, 1 month, etc.
So many combinations u could use, how can you make any rules that you are confident enough to put lots of money on...7 -
Me: Assigned to do some NoSQL injections test cases in December on Jira by product owner.
After asking him about it, he said it can be vague and it’s only for developers to get an idea. I also have this restriction where I can’t really keep actually data or databases in our test sample application, so I could only mock mongodb. Product owner says just mongo is fine.
I do it. Now it’s January, product owner away for a month we so director is managing it. She then schedules me to talk to database team. I show them the very simple test cases which essentially just inject payloads I found online into different parameters specified in test case. They say if that’s it. I say yes. They say what’s the point of this. I said that it’s probably to test your database clients and ensure they’re rejecting bad Malicious input? They then keep asking but I’m just the dev and tell them the product owner is away. Then the guy calls my test case essentially useless and the others agree. Then they tell me to do it for other databases which I can’t mock like couchbase even tho my PO said it’s fine for mongo only.
Am I just being silly here? I am pretty new to working in a dev environment so please feel free to be blunt.4 -
Functions with all Get/Post data as parameters like this
public function qwerty($params)
{
return $params['item']['price'][0]* 2;
} -
Has anyone tried to export a jar in a simple Java project that has JavaFX (and uses WebView) from VSCode?
When I test the program it works fine but when I export it and execute it I get JavaFX errors.
I met those errors early in development, the fix was adding some parameters to the run command (--add-modules and such), maybe I need to add them to the compile process but I can't find how...
I've been searching all across the web and the rant part of this question is why isn't there an answer anywhere? Has NO ONE tried this before? Really? And if someone did, how did they find the solution!?
My only hope is compiling by hand by now... But there must be a way... I could also use Eclipse but I'd like to know how to do it from VSCode, it would be a shame having to take everything to Eclipse just to compile.3 -
Somewhere in out application backend we generate a simple bullet chart. But in the most complicated way possible.
We call a web service to retrieve it(yes, a simple bullet chart). The service requires some parameters, and the code that generates them is hidden behind a wall of interfaces and abstract methods (the best and apparently only way to get to the actual code is to debug it).
However, one of these parameters is very well visible and it is a string with (uncommented)javascript function that manipulates the resulting chart, adding some final touches. With hardcoded values etc..
Dear programmers, I know we should avoid reinventing the wheel, but sometimes we should stop and consider the possibility, that we are using the wrong wheel and in completely wrong/obscure way. Thank you.
Yours WhoeverWillMaintainTheCode3 -
This invite to an ElasticSearch webinar is epic:
webinars/proven-architectural-patterns-for-mature-elastic-stack-deployments?ultron=reference-architecture-webinar&blade=invite&hulk=email -
public function index(Request $request): array
{
$parameters = json_decode($request->get('lazyEvent'), true);
if (isset($parameters['page'])) {
$page = $parameters['page'];
} else {
$page = 0;
}
$queryBuilder = DB::table('companies')
->leftJoin('company_contact', 'company_contact.company_id', '=', 'companies.id')
->groupBy('companies.id')
;
if (isset($parameters['filters']['name'])) {
$queryBuilder
->where('name', 'like', '%' . $parameters['filters']['name']['value'] . '%')
;
}
$total = $queryBuilder
->count()
;
$companies = $queryBuilder
->select('companies.id', 'name', 'email', 'phone', DB::raw("COUNT('company_contact.id') AS contact_count"))
->orderBy('name')
->offset($page * $parameters['rows'])
->limit($parameters['rows'])
->get();
return ['companies' => $companies, 'totalRecords' => $total];
}
what is this shit? I get $total 1 when in reality is $companies count is 51
I am thinking avout writing whole sql as raw because I cannto get fucking count correctly21 -
Adding extensions to Swift classes so that all methods have exact equivalents with anonymous parameters so you don't have to use parameters names when invoking which goes against the spirit of the language. #douchebagdeveloper
-
Looking at Rust's preliminary fn trait model (basically the function call operator) and I don't get one thing:
Why is the argument tuple a generic type parameter and not an associated type? It would've been so easy to ensure consistency in the position that Rust doesn't have overloads. A trait can be implemented for any number of generic type parameter values, but an implementation may only have a single type for each association.3 -
"When I design, I don’t consider the technical or commercial parameters so much as the desire for a dream that humans have attempted to project onto an object." - Philippe Starck
-
NodeJS' url module of course doesn't include __proto__ when enlisting parameters (in /?__proto__=hi for example).
People using objects as maps are insane. They are so insane, that they don't even realise that. -
Sigh same bug
Or design flaw
Fuck off
The box it grows to encompass a character for extraction to certain parameters
But if the page has a border it selects the whole page -
None::<()>
I hope as never (`!`) gets stabilized in Rust, they come up with a clever heuristic to set it as the default value of generic parameters that cannot be deduced because the variants using them are never constructed. -
I love serverless functions but I'm so tired of complex orchestration, juggling event parameters and now scipy+numpy+pandas exceeds size limit of 250MB..
Feel like cramming it all in a monolith like the geezers of yore and be done with it3 -
Been working on integrating mail gun into the MVP of the webapp I am creating. Couldn't figure out why I kept getting a 400 response. Check the mail gun documentation and realize that it's expecting post parameters not JSON...
Well there goes those 5 hours. -
The boss says: "Spreadsheet structure must be the same of this other app".
There is no documentation of the other software so:
• try some different input parameters;
• compare the spreadsheets;
• find a possible (and temporary) solution.
I do not like Excel.
😤😤😤😤😤😤 -
In JS/Node, is there a performance and memory cost to nested functions?
I.e.
function handle(req, res)
{
var x = 5, y = 10;
function add() { return x + y; }
function multi() { return x*y; }
res.send(add() + multi());
}
As opposed to taking out the 2 functions and making them accept x,y as parameters.6 -
You know it is not acceptable to not finally answer this goddamn question for myself or with some help !
PyTorch is driving me insane !
I follow the goddamn docs, practically just created a copy of the sample for the training portion, even if my design were to suck, the training steps SHOULD change the model parameters right ?
so if I do a...
model.parameters().clone() before training
and mode.parameters().clone() after training
torch.equal(p1.data,p2.data) should be false right ????6 -
Why is it, that #Java Spring AOP are this stupid:
When accessing parameters at a joined method, it is not guaranteed, that they are in the right order.
Some guy thought it would be a good idea to use fcking "System.arrayCopy" because of performance during dependency injection-based aspect-oriented programming.
Roast me but when doing give me a solution to get the right ordered args. -
Being greedy is good at some point, but when you're so greedy that you take up a project without any tickets (JIRA Sprint) and requirements over Skype.
That being said, managers should not get greedy all the time.
I mean when the previous developer left he made is so difficult(I am assuming) to run that hourly job, that it took me around
> 4 hours to fix spaghetti code still job not running,
> Fix missing parameters still not working
Finally said to the manager that the configurations are not on the server which are being used in the code. -
ohhhhh I am pissseddddddddddd
itss the fucking pytorch.module class it would seem !
I do exactly the same goddamn shit as its supposed to do in a goddamn notebook and run it step by step and the fucking model trains and the output values change !!!! and the loss decreases !!
I do this in the goddamn class derived from model with a call to model.parameters() and the fucker fails !!!
why ???
why ?????
why ??????
is it cloning the goddamn parameters so the references aren't there ????
seems to work goddamn fine when i call a layer and activation function at a goddamn time chaining the calls one after another !!!!!!
UGHHHH IT LOOKS LIKE IF YOU DEFINE THE LOSS AND OPTIMIZER OUTSIDE THE FUCKING CLASS IN A SEPERATE TRAINING FUNCTION IT DOESN'T TRAIN !!!!!!
WHY ??
A REFERENCE IS A GODDAMN REFERENCE !!!! -
You set a value to a variable at line 80. At line 237, you set the value again, calculated in the same way, with the same, untouched parameters. The variable isn't used at all anywhere between these two points...
If I have to do maintenance to your .net code, and can tell that not only did you learn on COBOL, but that you're a bad COBOL programer, Fuck You!2 -
I was hoping it would be possible in a big international company to work (as a software developer) on my own laptop (MacBook Pro) - cause of better parameters = better performance = better efficiency. After I got hired, I was told that it is not possible to bring my own laptop. So I was given an old DELL laptop with Windows + a lot of security stuff in it from the company. The poor DELL is so slow - that even a single commit into the branch takes about 2 minutes because of the security stuff : -O ...I am soooo disappointed... :[ .... On the other hand, by working at home on my MacBook in compare with that DELL I feel about it like I work with some super ultra alien technology from the future :D what a feeling <35
-
NEED HELP: C#
Please I am a Beginner in C# and I need little help with Methods.
In the Picture attached, I'd love to use User input as Parameters in the method. Example: example getting user imput with Console.ReadLine(); and storing it to num1 or num2 as parameter in the Method.
Is this possible in C#, if so, how can I make it work? Thanks5 -
Hi, so currently I am developing a program in Java that requires a few enums (I'm new to them and so far they are pretty awesome) and currently I want to create an enum that requires a single field, an instance of another enum. So in the first enum's constructor, I'm setting all the parameters into a new instance of the second enum, however, I'm getting "Enum1 has private access in Enum2!".
I'm off for the day but rq I just wanted to ask if anyone could help me with this. I'll be back in a few hours!1 -
So we're supposed to test even the most imporbable edge cases to make sure that our software is reliable. But there is a limit. We let a marketing intern go bug hunting. We use the same component in two tabs of our SPA, but we distinguish them through some parameters. The intern found that if you switch back and forth between those two tabs super fast a couple of times, the program for some reason confuses those two tabs and swaps them. Now management has listed it as a priority. When are the customers _ever_ going to do that?!4
-
Who else finds HTML/CSS to be just plain bad?
since that's what the web adopted, apparently no matter what you are developing if it involves a GUI then the design method almost always follows in the same path as the web.
that's not the issue though, the real problem is that the web adopted a very horrible way to create a UI, while HTML might have been fine for 90s-style websites I just feel like its a very lousy way to create a modern interactive webapp UI, its just very painfully obvious that it wasn't designed for that purpose. remind me again what HTML stands for? "HyperText Markup Language" yea that sounds about right. and CSS really doesn't help but double down on the flaws of HTML.
on a whim I can come up with a better method:
instead of the weird <body><footer> structure, why not have say "objects that flow in a 2D space", you define the parameters location and dimension of these objects, with something like javascript they interact with each other and just like div in HTML objects contain smaller objects.
this makes a lot more sense than the footer/body design or the obviously duck-taped attempts at controlling the style in CSS, like flow, and absolute-position.
am I alone in this?9 -
Learning Flutter since I've seen it suggested somewhere on here, and therefore I'm having to learn Dart. It just bugs me how it doesn't complain when I leave an extra comma at the end of the constructor parameters3
-
Any Firestore experience willing to help me ?
I got 3 big collections let's say they are 1:1:n how should I save them in 🔥 so I can query them efficient when I have parameters for each of them in a query -
...of course after carefully perusing the doco and ensuring the parameters are right the supplied conversion utility crashes with no error message .... of course it does
-
Something interesting i learned today about the html5 video tag is that even if preload is set it's up to the player the render engine is using to fetch the index of the file first as with mp4 this is usually at the end of the file.
This means that for Blink and Gecko most likely fetch this first themselves. But for webkit it opens in quicktime on mobile devices which you cannot pass parameters to and flat out waits for the entire stream to start playing.1 -
How to get good at solving problems.
My managers says that I should consider scalability, dev efforts, Operational costs etc. I am really new in this, I really need to figure out a lot of things by understanding architecture and then there are added quality parameters of the solution, where can I read all this? How to get good at this? I know one of the solution is to actually work on it, can I still get some other resources to understand things better?1 -
I’ve been trying to work smarter and not harder.
I’ve been applying to internships with my cover letter and resume.
My cover letter is pretty generic so I only need to change the company name and company position for each application.
Used to do this all manually through google docs but I just wrote a cool script
Using bash, I ask for the company name and position, and then I just generate and compile a latex version of my cover letter with those parameters updated.
Then, the pdf of my cover letter is combined with the pdf of my resume.
After that, the pdf of my application goes into a directory in my career folder so I have a record of it.
This has saved me so much time lol I’m happy I took the time to figure this out2 -
y'all the optometrist just fat fingered the parameters for my 500€ custom order glasses for my uniquely fucked up eyes
I ask specifically the seasoned webdevs here, what's the most effective typo prevention system you've ever seen, where a measurable decrease in mistakes indicates the effectiveness of the system?3 -
I have a function that receives 2 parameters: a string and a max numer of characters.
It returns an array with the partitioned string.
Example:
function name("hi, I love devRant", 10);
//return:
array(2){
[0] ->"hi, I love"
[1] ->" devRant"
}
Now.... what would be the appropriate name for that function?10 -
I'm trying to create log files with the PID or some JVM arg like app name but File appender doesn't parse ${myVar} in the config.
Issue is we have multiple instances of an app running but they can't be all writing to the same file.
I tried creating a custom Appender by pretty much copying the source code of FileAppender and then adding a function to add PID to the filename.
But when I use it, get some error saying "name, and fileName" are invalid parameters.
So wondering if anyone has experience building one that works out maybe there an existing code for such an appender?12 -
Meta Platforms has launched Llama 3, their newest large language model (LLM), alongside a brand-new stand-alone AI chatbot. Llama 3 comprises two versions, one with 8 billion and the other with 70 billion parameters. Furthermore, Meta is currently developing an even more advanced 400 billion parameter model, though its release date remains unannounced.
Ragavan Srinivasan, Meta’s VP of Product, expressed enthusiasm about the model’s capabilities in a recent interview, stating, “From a performance perspective, it is really off the charts in terms of benchmarking capabilities.” He specifically referred to the ongoing development of the 400 billion parameter version.
https://freeaiall.com/ai-news/...6 -
When do you use parameters in your Dto/ViewModel constructors?
I'm trying to explain to a senior developer, that we don't need to have all parameters for all properties,
we only need it to set default/private fields.3 -
PLEASE i understand how it works but how is hashicorp vault supposed to be used?
Not to mention how should i use it for production? Literally no dipshit tutorial explains it. Everyone explains the vault server -dev part and thats it. Fuck you
Every time i restart the vault server all of the secrets and config get deleted. And then i have to readd them all over again?
How is vault supposed to work in terraform?
How can I automate storing secrets in vault instead of manually doing it?
How to automate starting vault server by a single command along with provisioning secrets and parameters?
How to store iam credentials from ~/.aws/credentials into vault by profile AUTOMATICALLY as soon as vault server is started?
Because if my backend depends on some secret from vault, how am i supposed to automatically have these secrets created so i can just run my backend without worrying which secrets i have to recreate because the restart of vault server deletes all the fucking secrets in dev mode?
How do i use this bullshit?
- Every guide explains it partially
- No guide explains how to 100% automate it
- every dipshit youtube video explains it poorly
- NO ONE explains how to configure it for production.
I am so Fucking lost in learning this bullshit.
Can someone give me a link to a repo of a working example of the things i just mentioned? Either you create it or send an existing link cause i cant find any.
Basically i just want to use Terraform and Vault together but i cant understand how to combine them together so that its all automated 100% -- for example i just want to do
terraform apply --auto-approve
And then the entire terraform aws gets provisioned + vault server stars AND gets provisioned with secrets.
How to do that?9 -
Can't find official documentation or examples... Wtf...
In Log4j configs appender.filepattern, what are the % parameters that can be used. And is there one for UUID or process ID.
I have multiple instances of an app running with difference parameters, but they can't all write to the same file. -
Hey rants! So I am going to test Balmer curve once again! Preparing regression model for altered SIR model with time dependent parameters (for Covid). Wish me successful code!
-
Why has nobody at Microsoft thought of implementing optional parameters for functions in SQL Server? I guess backward compatibility is something they haven't heard of. I mean hell, Postgres can do it easily.2
-
There's a special place hell for people who put their entire documentation on using an NPM package in the fucking READ.ME file.
I shouldn't have to play whack a mole through one giant ass file to figure out how a specific function works. Or figure out how specific optional parameters need to be defined.3 -
Fucking wrong parameter number.
select id,
name,
email,
logo,
IF(company_contact_ids is null, 0, contact_count) as contact_count
from (
select `companies`.`id`,
`name`,
`email`,
`phone`,
`logo`,
COUNT('company_contact.id') as contact_count,
GROUP_CONCAT(company_contact.id) as company_contact_ids
from `companies`
left join `company_contact` on `company_contact`.`company_id` = `companies`.`id`
where name like '%:name%'
group by `companies`.`id`
order by `name` asc
) as companies;
how many parameters do you see? I see 1.
https://pasteboard.co/KjDUjA3.png
Now how many parameters you see in $bindings array? I see 1
Fuck you laravel creators - it is not fucking wrong count. Why this error lies to me? Or what fucking count do you expect if I defined in the fucking query 1 parameter?3 -
When a function has parameters for "limit" and "skip", make sure to double check those first when something seems broken. I switched them around so limit was 0, and I kept wondering why it returned 0 objects. It took me way too long before I figured that one out...