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 - "redundant code"
-
--- Linux wants some hugs, and everyone gives a hug about it! ---
After the CoC controversy revolving around the Linux Kernel project, a change introduced by the CoC is being put into practice:
Jarkko Sakkinen, from Intel, started replacing words comments containing "fuck" with their "hug" variant. This means comments such as
/* master list of VME vectors -- don't fuck with this */
might look a bit different in the future:
/* master list of VME vectors -- don't hug with this */
People that oppose this change criticize that the comments will make much less sense to people that aren't fluent in English yet. They also do not like the redundant censoring - the actual meaning is still implied, just no longer included as clear text. It might also cause misunderstandings to people working with the code.
Those supporting this change, aside from jokingly mentioning that this change will save one character per f-word comment, note that this can give the Linux Kernel project a more positive feeling with anyone who works with the code, with "fuck" mostly associated with bad feelings, while "hug" is indeed mostly going to call positive feelings in our subconscious minds.
Who doesn't like a good hug? :)
What is your opinion on this rather controversial topic? Feel free to let us know in the comments, as we are very interested in your stances and arguments on this!
Sources:
https://lkml.org/lkml/2018/12/1/105
Several comment sections, IRC chats, and other places for people to express their opinions. Too many to list them all.51 -
Was asked to check the sales team server as it was running slow.
Apart from redundant processes and users with too much permissions I found a "Cobol" folder under one of the sales team member's home folder.
If it weren't the sales people I would immediately disregard this as trolling but with them it's quite possible that this is a real attempt to learn programming...
...most likely from the facebook ads with the hooded guys that offer to teach you to code in 10 days for $800.5 -
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 -
My old employer used to used a highly complex people management system, made up of around fifteen or so different tools and packages. Apparently this had been the case for decades, so in my spare time, I wrote an entirely bespoke, extensible HR web application that could be easily modified without changing the code. It even supported the weird spider web management structure.
I took it to my area manager, who pushed it up the chain. Apparently the country representative liked it a lot, so decided to bring me on board for an implementation and test case. Fast forward a few months, and people are singing praises. I get a huge promotion, with a sizeable pay bump to match.
Sadly, most of my country was sold out to another org, who decided pretty much straight off to make 90% of us redundant. Last I heard, though, my app is now in use in almost every operating country around the world. Not bad for something I wrote in my spare time.
I'm waiting for them to need modifications, because I never had time to complete the documentation...4 -
When I'm coding, I often come up with some cool algos and when I do, I feel pretty good.
But the next second, I get this feeling that I know there are a million other people in the world who have solved the same problem with the same or better algorithm and I feel like shit. Like all the work I put in is somehow redundant.
Like finding answers on StackOverflow... When you do, you know the person who answered has already done it. You're just repeating it. But again, the fact that I'm looking for answers from other people in the first place is ....
I don't know. I guess I need to change the way I code from now on....3 -
Found my most ridiculous function ever, back from when I was first learning.
async Task Delay(int time)
{
await Task.Delay(time)
}1 -
OMFG BOSS STOP CHANGING MY INTERFACES INTO CLASSES WITH REDUNDANT CODE AND IF ELSES BECAUSE "IT DIDNT DO ANYTHING" OMFG WE ALREADY WENT OVER IT YOU STUPID FUCK!!!2
-
I was hired as a programmer, but I feel like the correct term is reprogrammer, because no one can code for shit at my job...1
-
I just finish "rebuilding" a page that I have built last year. My Js file (jQuery) went from 1200+ lines to 600..
I rewrite everything, the functionality is the same but the code is mush more cleaner.
Soo bad and redundant code.
Although comments where very helpful.
Feels good. -
Share your VS Code installed extensions here.
Mine is: Alignment, Better Comments, change-case, Colonize, CSS Peek, DotENV, File Utils, GitLens (my favorite!), Gulp Snippets, JS-CSS-HTML Formatter, Laravel 5 Snippets, Laravel Blade Snippets, Material Icon Theme, npm Intellisense, Numbered Bookmarks, Path Intellisense, PHP Debug, PHP DocBlocker, PHP Intelephense, PHP IntelliSense, Prettify JSON, Quokka.js, snippet-creator, Vetur.
Feels like there are redundant extensions here that I need to uninstall.
Happy Friday and Cheers! Excited for Infinity War movie! 😎15 -
My new favorite commit message:
> code modified
It must be the most redundant commit message ever15 -
A new guy was brought on to help with a particular part of my program.
He worked on it for a little while and got something working. But honestly the code hurts me. And not because I'm some arrogant prick, but because there's something about the way it's written that's really bothering me.
I was saying to my girlfriend that I don't mind people helping me out and adding new features. Usually they bring something to my attention that I otherwise would have never thought of.
However, in this case I was told to back off completely. This of course, makes sense, we don't want to be stepping on each other's toes. But now that he's sort of done, I've taken a look around at it is really getting to me.
They've placed redundant pieces of code in places that I would have never done. And objects have been made that seem to only match precisely one particular use case.
I had overhauled this program with flexibility in mind a while back, and now I feel like it's doing a 180 again simply because the client is getting impatient.1 -
I've been lurking on devrant a while now, I figure it's time to add my first rant.
Little background and setting a frame of reference for the rant: I'm currently a software engineer in the bioinformatics field. I have a computer science background whereas a vast majority of those around me, especially other devs, are people with little to no formal computer background - mostly biology in some form or another. Now, this said, a lot of the other devs are excellent developers, but some are as bad as you could imagine.
I started at a new company in April. About a month after joining a dev who worked there left, and I inherited the pipeline he maintained. Primarily 3 perl scripts (yes, perl, welcome to bioinformatics, especially when it comes to legacy code like is seen in this pipeline) that mostly copied and generated some files and reports in different places. No biggie, until I really dove in.
This dev, which I barely feel he deserves to be called, is a biology major turned computer developer. He was hired at this company and learned to program on the job. That being said, I give him a bit of a pass as I'm sure he did not have had an adequate support structure to teach him any better, but still, some of this is BS.
One final note: not all of the code, especially a lot of the stupid logic, in this pipeline was developed by this other dev. A lot of it he adopted himself. However, he did nothing about it either, so I put fault on him.
Now, let's start.
1. perl - yay bioinformatics
2. Redundant code. Like, you literally copied 200+ lines of code into a function to change 3 lines in that code for a different condition, and added if(condition) {function();} else {existing code;}?? Seriously??
3. Whitesmiths indentation style.. why? Just, why? Fuck off with that. Where did you learn that and why do you insist on using it??
4. Mixing of whitesmiths and more common K&R indentation.
5. Fucked indentation. Code either not indented and even some code indented THE WRONG WAY
6. 10+ indentation levels. This, not "terrible" normally, but imagine this with the last 3 points. Cannot follow the code at freaking all.
7. Stupid logic. Like, for example, check if a string has a comma in it. If it does, split the string on the comma and push everything to an array. If not, just push the string to the array.... You, you know you can just split the string on the comma and push it, right?? If there is no comma it will be an array containing the original string.. Why the fuck did you think you needed to add a condition for that??
8. Functions that are called to set values in global variables, arrays, and hashes.. function has like 5 lines in it and is called in 2 locations. Just keep that code in place!
9. 50+ global variables/hashes/arrays in one of the scripts with no clear way to tell how/when values are set nor what they are used for.
10. Non-descriptive names for everything
11. Next to no comments in the code. What comments there are are barely useful.
12. No documentation
There's more, but this is all I can think to identify right now. All together these issues have made this pipeline the pinnacle of all the garbage that I've had to work on.
Attaching some screenshots of just a tiny fraction of the code to show some of the crap I'm talking about.6 -
Gotta love moments when you find legacy code like this :)
P.S. Yeah, that was the whole script, written by just one guy.3 -
I started my internship at the end of the year..
Fuck my ass!!! This code I have to work with is a huge pile of shit.
The code base I need to work with is around 40k LOC. It is a mixture of C++, C, Java, Python, Bash and I think I saw some lonely js files around.
A list of awesome parts:
- Paths are hard coded.
- Redundant code everywhere
- No documentation or inline comments available
Most of the comments in the code are just old code that is not used anymore. But the cherry on the turd is the class that should provide all kind of useful functions in my daily routine. About ninety percent of the functions have the same description or nothing. Sometimes a function name says "readSomethingFromSomewhere" but instead it writes something to a file. It is really confusing and I need to check everything twice instead of rely on what the function name promises.
I have also learned why copy paste isn't that good. The brief descriptions of every method in a files are always the same.
getName() - Description: Fork child process
getIp() - Description: Fork child process
getIpv6() - Description: Fork child process.
Surprise: None of these functions forks a child process. :D
Another awesome feature is the thing that they store up to five different versions of libraries. Everyone with slight modifications but no hint which one you need to use. Sometimes it is the newest, sometimes the oldest which is running in production. Another case of try and error.
Oh and my dev machine is a potato with a power supply and a fan. I started with NetBeans and every time I compiled the code it sounds like the machine wants to lift off and leave for a better place. (At this point I switched to Emacs and everything runs smoothly now)
At first I thought that I'm just not that good at coding and understanding a big project from scratch but some colleagues have the same problem. The whole system is very inflexible and it is all about "std::cout"-debugging to check if your changes do what you want them to do.
Currently I'm just trying to fix this mess to make the life for the next student or employee easier. The first month was just frustrating as hell. I need to ask so many questions and most of the time the answer was "I don't know, haven't touched this code in years". Needless to say that my progress isn't that awesome but at least I get a nice payment for 20 hours of work a week.2 -
I guess someone couldn't be arsed to dedent a whole load of code. I can't really criticise though: I do it too.4
-
I think, after a few weeks, I'm actually quite enjoying that the Android SDK is genuinely awful.
We all know the feeling: "This is shit, whoever designed this is a fuc...oh, I get it. This is pretty cool actually."
So, it's nice to encounter a genuine dumpster fire of a platform.
I think the beautiful thing about its absolute obsession with providing a context to every single operation, is that you end up passing it around so much that the very concept of context becomes redundant.
Honestly, half of the stuff in here I've just attached to a global statics class, because it saves having to request a context, or a manager or some fucking kind of adapter, and it works just fine.
I've started to laugh when I look up a solution and see the browser scrollbar shrink into infinity, because the recommended answer is about two whole pages' worth of boilerplate to make the back button disappear or something.
I don't think there's been a single moment where I've just been in the flow of writing code. Pretty much all of the process is grafting boilerplate into it.
Not long til deadline, thank fuck.2 -
So the incompetence of this knob-head are unbelievable, so in our company there's a particular method that required to return object specific way like
{
'a' : 'b',
{
'c' : 'd',
'e' : 0,
}
};
}
which somehow will be use everywhere in the project, I decided to create a constant class therefore anyone can use it and prevent redundant code. (re write the same thing over and over again). He decided to tell me to rewrite the same method for every-time I needed to return data.
My method is to avoid writing the same thing in repetition , that is why I place a method in a constant class where I call every-time I need to return those data in the specific way.
But he prefer writing it in repetition. OMG13 -
I have always believed that clean code is readable code, and if your code is readable, then it shouldn't require masses of comments to explain it. However, in the course I am being taught, we are being told that in programming, comments are massively important to help another developer understand your code and what it does. So what is the consensus of the dev community?
Do you feel comments are key, or redundant if your code is written well?20 -
Oh gee whiz fellas. I lived through my nightmare. Recently too.
(Multiple rants over last few months are merged in this one. Couldn't rant earlier because my login didn't work.)
I joined a new shithole recently.
It was a huge change because my whole tech stack changed, and on top of that the application domain was new too.
Boss: ho hey newbie, here take this task which is a core service redesign and implementation and finish it in two weeks because it has to be in production for a client.
Normally I'd be able to provide a reasonable analysis and estimate. But being new and unaware of how things work here, I just said 'cool, I'll try my best.' (I was aware that it was a big undertaking but didn't realize the scope and the alarming lack of support I'd get and the bullshit egos I'd have to deal with)
Like a mad man I worked 17+ hours a day with barely a day off every week and changed and produced a lot of code, most of it of decent quality.
Deadline came and went by. Got extended because it was impossible (and fake).
All the time my manager is continuously building pressure on me. When I asked questions I never got any direct/clear answers. On asking for help, I'd get an elaborate word vomit of what was already known/visible. Yet I finally managed to have an implementation ready.
Reviewer: You haven't added parameter comments on your functions and there aren't enough comments in code. We follow standards. Clean code and whatnot. Care for the craft verbal diarrhea.
Boss: Ho hey anux, do you think we'll be able to push the code to production?
Me: Nope. We care for the craft and have standards. We need to add redundant comments to self documented code first, because that is of utmost importance as Nuthead reviewer explained.
(what I wish I had said)
What I actually said: No, code is not reviewed yet.
And despite examples of functions which were not documented (which were written by the reviewer nut), I added 6-7 lines of comments for my single line functions describing how e.g. Sum takes two input integers and returns their sum and asked for a review again.
Reviewer: See this comment is better written as this same-meaning-but-slightly-longer way. Can we please add full stops everywhere even though they were not there to begin with? Can we please not follow this pattern and instead promote our anti-pattern? Thanks.
Me: Changed the comments. Added full stops. Here's a link for why this anti-pattern is bad.
Reviewer: you have written such beautiful code with such little gems. Brilliant. It's great to see how my mentoring has honed your skills.
.
.
.
I swear I would have broken a CRT on his stupid face if we weren't working remotely (and if I had a CRT).
It infuriates me how the solution to every problem with this guy is 'add a comment'.
What enrages me more is that I actually thought I could learn from this guy (in the beginning). My self doubt just made me burnout for little in return.
Thankfully this living nightmare will soon be over.rant fuck you shitty reviewer micromanagement by micrococks wk279 living nightmare fml glassdoor reviews don't lie9 -
What was the most rubbish developer you had worked with?
I will go first , once I worked with a Dev who used dashes for naming variables (eg _ = 'a' , __ = 'b', ___='c'), placing every everything in the main class . We were working on android (java) project back then. He decided to place everytime in the main activity, rewriting redundant functions. And he never use git, he literally use hard-disk and Google drive to back up his code which made us difficult to know which part of code he wrote. I quit working there because he was the Senior Project Manager.6 -
Found this pearl on the code of the game I made with some friends on a game jam the last week
Beautiful6 -
In flutter , there’s something called TextButton.icon. Which render a button look like this :
(👍🏼 Like Button)
But there’s this tiny twat decided to use countless of nested column in a nested row and containers just to create a fucking button! This particular class contains 1438 lines of code! Most of the code are redundant and nested fucking shit.
I want to punch this guy so hard but I do not intend to start a ww3 with china.
That means I have no choice but refactor it as I implement a feature requested by the product team, every components break. It is like a land mine field here. One changes , the entire application crash.
So there are useless mother fucking Sherlock fucking holmes kept telling me that “don’t worry about refactoring now , just complete the task.” , like seriously “how in the name of mother fucking god of all arseholes can I complete my task when I can’t change even one component?”
These people are fucking genius. Their intelligence resurrected Einstein and made him die the second time.3 -
Just discovered I still have access to my old employers source code on VSTS, and can see from here that that there is a new team member!?
👿 I was made redundant "times are tough, there's not enough money, you were last in so first out" mother of fuck!
I wonder how many other places do this sort of thing.4 -
My first time doing a pair-programming for uni assignment.
My partner is actually smart (a Mechanical Engineering guy), except when it comes to programming :
1. Don't know how to spell FALSE
2. Don't know how to create array in Matlab
3. Poor variable naming
4. Redundant code everywhere
5. Not using tabs
6. Stealing my idea and spit it again in my face after claiming it as his idea
7. Mansplaining every line of his code like I am a stupid person who never sees a computer before.
He said he has an experience in Matlab, wants to specialize in Robotics and taking several ML classes. What did they teach anyway in class to produce a shitty programmer like him?
Thankfully despite his being an arrogant shitty guy, he still manage to get our code to works.
That's good because if not, then I will happily push his head under water while slowly watching him drown.
🤨6 -
Boss assigned code cleanup to me. We put up eslint and fixed a couple of issues, all nice and cute. Now, he wants me to find any redundant code and remove it (redundant fields in config objects). Sounds doable right?
WRONG!
Because we're writing fucking ExtJS. This abomination that is still called a "web framework" in lieu of its former glory supports no typescript, no code intel, no JSDoc, no nothing. Absolutely heinous and deplorable. Add insult to injury, our code on it is even worse. NO single component reused except from a couple REALLY fucking badly written ones, because every component queries for shit outside its jurisdiction so it's all a dependency spaghetti. Everything else is just copy-paste. Barely anything works as intended anymore in this bloody joke of an app.
I tell him in a meeting, I can prepare an automated solution. Some script or something that runs on a file watcher. All nice and dandy. A weekend and a Monday later, I get tired and do something else to clear up my mind. Show him some progress in that other thing. He's like:
Boss: that's good and all but did you remove *insert misused config that got everywhere during copy paste* like I told you to?
Me: I'm still working on it. I switched cause I got tired a bit with the automation.
Boss: automation?
Me: We were talking about in the meeting. *Explains again*
Boss: That's not what we agreed upon
Mfw I've been rambling uselessly on the meeting about it just for you to put me down and make me remove all that copy pasted GUNK from the melting hot garbage that is our codebase BY HAND? All the 150 occurrences of it? What do you think I am, a fucking robot?2 -
Automatically clean up code, removing redundant and duplicate bits, splitting large functions, and formatting it nicely. Especially useful when trying to understand some garbage code someone else wrote which you need to rewrite.2
-
Coworker pushed some changes and gave me good reason to rant.
Here's my story:
I start implementing a new feature, senior reviews it and suggest some changes, which are actually good ideas. I continue developing and implement the suggested changes.
The next day, senior keeps working on outdated source and makes similar changes like i did on the day before. Just pushes it anyway and breaks fucking everything.
The api now contains redundant information.
My classes still exist, but aren't used anymore. Let's keep some redundant code in the project, because deleting it is so much work.
All the unit tests broke, but he just commented them out, so everything is green again. We have now 0 tests which actually do something in the project, but at least the build is green...1 -
Thank God for devrant. I am literarily fuming right now. Just removed some redundant (or so it seems ) code last week and already suffering the consequencies. Crazy commenting screwed me up really bad.3
-
People get so defensive about their code! Especially, code that becomes redundant. Suddenly, they get all activist type, as if their puppy is being put to death, and come up with the most convoluted of reasons why it is very critical code.2
-
When the CTO/CEO of your "startup" is always AFK and it takes weeks to get anything approved by them (or even secure a meeting with them) and they have almost-exclusive access to production and the admin account for all third party services.
Want to create a new messaging channel? Too bad! What about a new repository for that cool idea you had, or that new microservice you're expected to build. Expect to be blocked for at least a week.
When they also hold themselves solely responsible for security and operations, they've built their own proprietary framework that handles all the authentication, database models and microservice communications.
Speaking of which, there's more than six microservices per developer!
Oh there's a bug or limitation in the framework? Too bad. It's a black box that nobody else in the company can touch. Good luck with the two week lead time on getting anything changed there. Oh and there's no dedicated issue tracker. Have you heard of email?
When the systems and processes in place were designed for "consistency" and "scalability" in mind you can be certain that everything is consistently broken at scale. Each microservice offers:
1. Anemic & non-idempotent CRUD APIs (Can't believe it's not a Database Table™) because the consumer should do all the work.
2. Race Conditions, because transactions are "not portable" (but not to worry, all the code is written as if it were running single threaded on a single machine).
3. Fault Intolerance, just a single failure in a chain of layered microservice calls will leave the requested operation in a partially applied and corrupted state. Ger ready for manual intervention.
4. Completely Redundant Documentation, our web documentation is automatically generated and is always of the form //[FieldName] of the [ObjectName].
5. Happy Path Support, only the intended use cases and fields work, we added a bunch of others because YouAreGoingToNeedIt™ but it won't work when you do need it. The only record of this happy path is the code itself.
Consider this, you're been building a new microservice, you've carefully followed all the unwritten highly specific technical implementation standards enforced by the CTO/CEO (that your aware of). You've decided to write some unit tests, well um.. didn't you know? There's nothing scalable and consistent about running the system locally! That's not built-in to the framework. So just use curl to test your service whilst it is deployed or connected to the development environment. Then you can open a PR and once it has been approved it will be included in the next full deployment (at least a week later).
Most new 'services' feel like the are about one to five days of writing straightforward code followed by weeks to months of integration hell, testing and blocked dependencies.
When confronted/advised about these issues the response from the CTO/CEO
varies:
(A) "yes but it's an edge case, the cloud is highly available and reliable, our software doesn't crash frequently".
(B) "yes, that's why I'm thinking about adding [idempotency] to the framework to address that when I'm not so busy" two weeks go by...
(C) "yes, but we are still doing better than all of our competitors".
(D) "oh, but you can just [highly specific sequence of undocumented steps, that probably won't work when you try it].
(E) "yes, let's setup a meeting to go through this in more detail" *doesn't show up to the meeting*.
(F) "oh, but our customers are really happy with our level of [Documentation]".
Sometimes it can feel like a bit of a cult, as all of the project managers (and some of the developers) see the CTO/CEO as a sort of 'programming god' because they are never blocked on anything they work on, they're able to bypass all the limitations and obstacles they've placed in front of the 'ordinary' developers.
There's been several instances where the CTO/CEO will suddenly make widespread changes to the codebase (to enforce some 'standard') without having to go through the same review process as everybody else, these changes will usually break something like the automatic build process or something in the dev environment and its up to the developers to pick up the pieces. I think developers find it intimidating to identify issues in the CTO/CEO's code because it's implicitly defined due to their status as the "gold standard".
It's certainly frustrating but I hope this story serves as a bit of a foil to those who wish they had a more technical CTO/CEO in their organisation. Does anybody else have a similar experience or is this situation an absolute one of a kind?2 -
I just realized that in my company , the code review is not important.... And the source code is fucked up.... The structure is like functional programming and Oop combine with redundant function everywhere.
And in the source code there's a folder called depreciating service , I asked them what is that , they told me it is the service previously but not recommended for using it.
I was like "you mean deprecated"? Omg
They don't care about code review and clean code here.
My struggle here is they dare to create one class for the entire project and every code are in that class...
This is fucking not acceptable. -
Ugh... some people...
Just left the office early because of the toxic climate. That one infamous collegue is basically unable to communicate without being a narcissistic 5-year-old and was arguing whether we should write a test (I was going to write the test) that would need a single additional branch in the build system.
(The test was for a parser and it should test whether it can handle absolute paths. A simple regression test with a file and an expected output. Because absolute paths are different for every platform and user, the files to be parsed would have to be generated with appropriate paths before the tests were run. Well that would require one single python script and a single line in the script that runs the script and DONE)
Well that guy was unable to focus on his own work and started an argument about whether that test was necessary.
Even though I still think it is necessary, it might have been a reasonable argument if he would have acted more agreeable. But he was saying the feature was useless anyways "everyone will use relative paths only anyways" and "because noone here cares a ratass about maintaining the tests it will all fall on me again" ..
Wtf was this guys problem, I (CAPS) was going to write the stupid test and since when do we not write tests in order to better maintain our product? I get that he worries that the test environment will get more messy, but thats better than having the product code go messy or unfunctional! And c'mon guys, how are absolute paths a redundant feature... -
So first of all I want to say I am not a Fanboy of any specific language.
But holy fucking shit is ASP.net Core shitty, not only is it practically impossible to fucking start using it considering all documentation and tutorials are for the shitty outdated ASP.net but it's also fucking redundant with the amount of bullshit you need to do to achieve a task that should be a few lines of code.
Never in my life have I hated anything as hard as I hate that complete shit. On top of all that bullshit you have Fanboys always yelling "Oh but big corporations use it" like what big corporations? Microsoft and Microshit?
Like seriously larger corporations use fucking Node.js and even just C++ more than the shitty ASP.net and ASP.net Core. Don't get me wrong .net in general is pretty good but ASP.net is just a complete fuck up and should not exist.4 -
I'm going to confess: I am the type of developer that creates the ExcruciatinglyLongAndSpecificClassNameObject with the UtterlyDetailedExplanationMethod. It's just a thing I keep doing, despite voiced frustrations from people I've worked with. It just feels right in the mindset of self-documenting code
And while I acknowledge this isn't a flawless process, I see no other way around without losing information. I've tried alternatives, but everything feels like trading one issue for another:
- Abbreviations work as long as they are well known (XML, HTML, ...). As soon as you add your own (even if they make sense in the business context) you can bet your ass someone is going to have no idea what you're talking about. Even remembering your own shit is difficult after X months.
- Removing redundant naming seems fine until it isn't redundant anymore (like when a feature with similar traits gets added). and you can bet your ass no-one is going to refactor the existing part to specify how it differs from the newly added stuff.
- Moving details to namespaces is IMO just moving the problem and pretending it doesn't exist. Also have had folks that just auto-include namespaces in VS without looking if they need the class from namespaceA or namespaceB and then proceed to complain why it doesn't compile.
So, since I am out of ideas, I'd like to ask you folks: Is it possible to reduce class/method name lengths without losing information? Or is self-documenting code just an ideal I'm trying too hard to achieve? Or are long names not a problem at all? I'm looking forward to your answers.19 -
After I have been using tabnine and Grammarly for quite some time, I thought I follow this years' hype and give GitHub Codepilot a try, before eventually considering chatGPT.
Added Copilot to my IDE, proceeded to extend behavioral test descriptions in JavaScript.
Copilot suggests the most redundant and irrelevant inline comments I can imagine. They would be a legitimate target of criticism in every code review.
Wasn't it supposed to add some code that's actually useful? Well, tabnine and JetBrains IDEA annotations already did that anyway.
What did I miss?2 -
When your senior says he may as well stops working as I'm always refactoring his code...
Same sentence says I copy what you've done in other places so I don't see why it isn't good enough. By copy he leaves redundant code in there too.
Am I a being a douche is he just being over the top?
- He writes code and expects it to live for a long time.
- I write code and will go home and refactor my own code.2 -
What if your main telecom provider is down? Can you continue to work, code, take customer orders? Do you have a redundant strategy - and no it can't be going to lunch.8
-
israel population = ~10 mil
uk population ~70 mil
popular vote uk = 0
popular vote israel = 325
huh?????? i finally believe the conspiracy theory... there is total bullshit moving through the undercurrents of international society. actually the entire media and everything on the planet is shifted by angry retards with an IQ of approximately 27 who read something on twitter and therefore they must of course conform and do it
rich hands of influence reach far across this modern world....
my twitter dies on wednesday, I think i'm quitting this platform too... i'm just so sick of wasting time 'discussing' with people who literally have informed their entire lives by sources of media that all have an agenda, and yet said reader can't recognize that. go to bot school you fucking 🤡
also inb4 eurovision is a clown event, i know it is, but the fact that 'israel' as a country was for a good 10 minutes at 1st place of the vote is simply mind boggling to me (and to be fair, switzerland, france, israel, portugal, and croatia acts in terms of art and musical talent were all shit IMO) but what do i know? apparently the 700 mio people who live in europe don't agree - but even then, who knows anything about anything as to the actual 'numbers' that are posted on these 'votes' - could all be fake, or, even worse, the entire WORLD could be fake and i'm just typing to a fucking reflection of my own conciousness on this box
ach i'm very close to just turning it all off, its just rubes on top of rubes, derivatives on top of derivatives all more retarded than the next, and each night
then i get people like kiki who rage at me for getting drunk, then 'brag' they ran 5k. i ran more and drank more than you today, get over it.
i didn't need pills to do any of it either.
or i get sid the it kid, who gives non ironic lessons in fucking PHP 😂😂😂😂 in 2024 on youtube, and yet acts like he's a badass because he pointed out a 'redundant' 'const' in my code 😂😂😂😂 actually i don't know why in the first place i listened to any of it... going my own way has ALWAYS been the best way
by 2030 i will sell my saas(es) for 500k(+) and wonder why i even gave clowns on this platform the time of day
you know what? fuck it, it's been fun devrant, as of today i become a hermit, sick of this planet, and these apes
read books, go running, learn math (or any skill at that matter) and stay calm.
i can't describe in words to all of you how much a fucking abysmal waste it all is... just build useful stuff that helps people. the enormous (and trust me, it is absolutely eclipsingly enormous) discussion about everything around everything else is truly and utterly mind numbing and time wasting to the absolute core
farewell14 -
Often when i see the annoying as hell t debug exceptionless let’s just bomb entirely but blazing fastness of c and c++ I feel like a nettard
I use c# for its immutable strings clean syntax and beautiful class markers that are redundant compared to c++ but ensure you tell after adding 1000 methods and total lack of all special characters to indicate reference and derreference and pretty lambda syntax... sure it’s lib poor but I get shit done goddamn it and can read my own code later
So why do I feel empty inside every time i run a ./configure and make under Linux like I’m missing some secret party where neat things are being done and want to sob like I do now
I am not a dotnettard even though 5.0 is an abomination in the eyes of man and god ! Even though Microsoft cooks up overcomplex framework technologies that make a wonderful language underused and make us all look like idiots that they then abandon into the scrap heap! We can’t help Linux users haven’t discovered how much nicer c# is and decided to implement it on their own and port their horrible undocumented ansi c bullshit can we ???? Oh god I feel
So hollow inside and betrayed ! Curse
You gates curse youuuu! Curse you for metro direct3d xna wpf then false promises of core ! May you have a special place in hell reserved for you and your cheap wallpaper shifting monitor paintings and a pool speaker that playeth not but bee jees and ac dc forever and ever amen !
Speaking of which do any c/c++ ides have anything that even begins to rival intellisense on Linux and don’t use some weird ass build system
Like cmake as their default ?
Oh sweet memories of time a while back when I already wrote this and still wasn’t getting then tail I deserved
Again4 -
Compromise.
I think that sums up development pretty much.
Take for example coding patterns: Most of them *could* be applied on a global scale (all products)… But that doesn't mean you *should* apply them. :-)
Find a matching **compromise** that makes specific sense for the product you develop.
Small example: SOLID / DRY are good practices. But breaking these principles by for example introducing redundant code could be a very wise design decision - an example would be if you know full ahead that the redundancy is needed for further changes ahead. Going full DRY only to add the redundancy later is time spent better elsewhere.
The principle of compromise applies to other things, too.
Take for example architecture design.
Instead of trying to enforce your whole vision of a product, focus on key areas that you really think must be done.
Don't waste your breath on small stuff - cause then you probably lack the strength for focusing on the important things.
Compromise - choose what is *truly* important and make sure that gets integrated vs trying to "get your will done".
Small example: It doesn't really matter if a function is called myDingDong or myDingDongWithBells - one is longer, other shorter. Refactoring tools make renaming a function an easy task. What matters is what this function does and that it does this efficiently and precise. Instead of discussing the *name* of the function, focus on what the function *does*.
If you've read so far and think this example is dumb: Nope... I've seen PR reports where people struggled for hours with lil shit while the elephant in the room like an N+1 problem / database query or other fundamental things completely drowned in the small shit discussion noise.
We had code design, we had architecture... Same goes for people, debugging, and everything else.
Just because you don't like what weird person A does, doesn't mean it's shit.
Compromise. You don't have to like them. Just tolerate them. Listen. Then try to process their feedback unbiased. Simple as that. Don't make discussions personal - and don't isolate yourself by just working with specific persons. Cause living in such a bubble means you miss out a lot of knowledge and insight… or in short: You suck because of your own choices. :-)
Debugging... Again compromise: instead of wasting hours on debugging a problem, ASK for help. A simple: Has anyone done debugging this before or has some input for how to debug this problem efficiently?... Can sometimes work wonders. Don't start debugging without looking into alternative solutions like telemetry, metrics, known problems etc.
It could be a viable, better long term solution to add metrics to a product than to debug for hours ... Compromise. Find a fitting approach to analyze a problem instead of just starting a brute force approach.
....
Et cetera et cetera. -
TFW you know you're going to be seen as a sort of code anarch or unenlightened (foo)barbarian for even suggesting that there are other git workflows more suitable than GitFlow, but you do it anyway.
Saying that I keep my master unprotected feels like telling Grandma I worship Satan.
I work with a very small team that's always physically nearby, we all get along well, trust each other and communicate to know what everyone is up to, which I guess is hard to believe in and of itself, but is it so fucking hard to believe that we'd be okay without redundant eternal branches or a vomitload of unbisectable history-warping merge commits? -
TLDR: Read the post.
Part of me watches the day fly by as I work through the various stories and issues my company has as we walk through the various phases and clean up of their own stupidity of outsourcing. I guess it would be unfair to say “stupidity” It was really a money thing. Excuses aside, the alcohol today tastes amazing as I work through the issues, nothing is ever the same, nothing is ever redundant or boring. There are times where you want to pull your hair out, jump off a building and question why the hell any one would write code, specifically Laravel this way.
I watch the internet from now and then and see the cry babies whine and complain about GitHub and Microsoft jumping into bed and their favourite, and mine too, editor falling into Microsoft’s hands.
It’s disgusting and completely childish, but I digress. The last time I was here the alcoholism and the loneliness had begun pushing me towards the Nicotine and suicide. I have managed to obviously push through and watch the money come in only for adult life to take it away, I guess that’s life. Complaining about it will do nothing other then show others how much control you lack in your own life. You quiet your complaints and bury them deep inside your mind where they fester and stir and become drowned in alcohol.
Dating is even harder, especially when you work from home, so much so that I have completely given up there, any semblance of social life is buried in Final Fantasy 14 online, where pixels and text other people write have become my friend, at least for a moment or two before the work takes over and I sit in a room blaring music and watching the code I write, appear on screen like some savant who has high functioning autism but can create amazing works of art. I don’t think I am autistic though.
The truth is I don’t mind my job, I love the money and the freedom as I stated before.
Code for me is like a seed of anger that starts deep in my core, festering, eating away at me, killing me slowly and branding me a fool. The problem is the best feeling, when there is a problem I can solve it with code, when there is a problem that cannot be solved by code I take solace in the problems that can be. I don’t like people, I hate offices and I despise dealing with my own personal issues, I would rather drink and vape until the nicotine and the alcohol has made me sufficiently numb.
Code is a place I can escape, a place I have control, a place where I don’t feel like blowing my brains out at the stupidity of other people. Have I mentioned that I hate people?
The internet is full of idiots, people ranting and raving about this and that and how it affects them oh so much, when they don’t even let their own code, there own programming problems, and in most cases shitty solutions, affect them. Look at this GitHub thing, the idiots are running around with their heads cut off, waiting for the world to end or in most cases acting like it has. Companies get bought, bill get paid, people leave each other – Shut the fuck up and deal with it.
I guess if you look back at what I have written you could say the same thing to me, boo-fucking-hoo working from home sucks sometimes, grow up and deal with it like an adult. Fair enough, I’ll take my lumps. Excuse me as I continue to drink this post away and watch the downvotes come in. I guess honesty comes with a double edge sword.
And yes I would rather use alcohol as a solution then deal with the issues.16 -
Guys, I want to confess something.
I redundant code.
Actually I don't want to, but it's to match the timeline.
I know I'm a bad programmer. I can't create creative UIs. :( -
Using ReSharper is like becoming enlightened, or de-brainwashing oneself to see true reality. Of my entire dev team, I'm the only one who can see the fnords!
Unused identifiers, badly sorted modifiers, unused property setters, redundant `this`/namespace, redundant casts... Surely if they could see them too, such code would not survive! -
I dont get it. Please give me one good reason to use mongoose with a mongoDB.
Once upon a time it might have made sense to use a schema for the db. Today the native driver supports schemas and can check them on inserting. Nevermind one should validate the data before its hitting the db. I listened to an 1hr podcast last week where one of the maintainers tried to give reasons why its might be a good idea to use mogoose, and he failed miserably.
It introduces dependencies that are useless, it doesnt really abstract anything useful from the native driver, its TS support is shit and I dont like the API.
Every time I see someone use it he either fails or doesnt explain at all why to use it. Its so redundant it makes me angry. We have enough abstraction already. We really dont need more code that doesnt provide value. Please just use mongo the way the people of mongoDB intended it to be used.1 -
I'm having problems understanding ngrx (or simply rxjs...), once again.
I have a feature state called "World".
This state has three Actions: Init, InitSuccess and InitFailure.
Also I have other isolated feature states like "Mountains", "Streets", "Rivers".
They have actions like this and corresponding effects to fetch data: Load, LoadSuccess, LoadFailure.
Now I would like to add an effect to WorldActions.Init, which will dispatch Mountains.Load, Streets.Load, Rivers.Load one after another. So ideally an action log would look like this:
1. World.Init
2. Mountains.Load
3. Streets.Load
4. Rivers.Load
5. Mountains.LoadSuccess
6. Streets.LoadSuccess
7. Rivers.LoadSuccess
8. World.InitSuccess
Or when an error occurs:
1. World.Init
2. Mountains.Load
3. Mountains.LoadFailure
4. World.InitFailure
How could an effect pipeline for that look?
How can I dispatch World.InitSuccess only after all LoadSuccess-Actions have happened?
Or am I still trying to implement ngrx in a wrong/bad way?
PS: The reason I am putting everything into separate feature states is because "Mountains" etc. are standalone features on their own. Only in the context of a "World" they belong together. For this reason I can't create a monstrous effect "World.Load", without producing redundant code.10 -
Spent half a day working on some code to add some functionality. Ran into some binary assumptions and found workarounds. Got everything implemented and close to start testing things. Not a lot of code, but a lot of places that needed careful attention to detail. Started looking at the final code needed for initializing things. Found that all the code I wrote would not be needed if I just initialize some things differently. Realized I don't need all this code. The code is literally redundant.
git checkout <changed files>
Okay, now I understand the code better. I am ahead because I am not maintaining code I don't need. Half a day of reading the code helps me understand everything that is there.
Life is good. 😀 -
Tried out the node.js code demo in this book.
🤦♂️
Terrible format, use tab for indentation, very very long function, redundant code (eg: new Buffer vulnerability)...
The major issue is none of the total.js nosql code works. Eg:
db.clear()
db.insert({...data})
Without any asynchronous call, how do you expect this to work?!
Just fixed the code and updated npm modules for demos in Chapter 3 btw... Took way longer than expected.3