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 - "annotations"
-
No, listen to me. I cannot approve this PR because your code does not comply with our code style. All the imports and annotations must be sorted in ascending order by length. They must all make fir-like blocks of code. Because it looks nice.
Now go and fix your code
I just smiled and walked away to obfuscate my code with firs . I had no idea what to even say to that... I still don't14 -
-Look at super hacky code for 30 minutes
-Ask yourself, how did this ever work, guy must have been an idiot
-Check annotations, you committed it
-"Dear God past self, what have you done..."3 -
Online tutorial pet peeves
————————————
My top 10 points of unsolicited ranting/advice to those making video tutorials:
1. Avoid lots of pauses, saying “umm” too much, or other unnecessary redundancy in speech (listen to yourself in a recording)
2. If I can’t understand you at 1.5 - 2x playback speed and you don’t already speak relatively quickly and clearly, I’m probably not going to watch for long (mumbling, inconsistent microphone volume, and background noise/music are frequent culprits)
3. It’s ok to make mistakes in a tutorial, so long as you also fix them in the tutorial (e.g., the code that is missing a semicolon that all of a sudden has one after it compiles correctly — but no mention of fixing it or the compiler error that would have been received the first time). With that said, it’s fine to fix mistakes pertinent to the topic being taught, but don’t make me watch you troubleshoot your non-relevant computer issues or problems created by your specific preferences (e.g., IDE functionality not working as expected when no specific IDE was prescribed for the tutorial)
4. Don’t make me wait on your slow computer to do something in silence—either teach me something while it’s working or edit the video to remove the lull
5. You knew you were recording your screen. Close your email, chat, and other applications that create notifications before recording. Or at least please don’t check them and respond while recording and not edit it out of the video
6. Stay on topic. I’m watching your video to learn about something specific. A little personality is good, but excessive tangents are often a waste of my time
7. [Specific to YouTube] Don’t block my view of important content with annotations (and ads, if within your control)
8. If you aren’t uploading quality HD recordings, enlarge your font! Don’t make me have to guess what character you typed
9. Have a game plan (i.e., objectives) before hitting the record button
10. Remember that it’s easier to rant and complain than to do something constructive. Thank you for spending your time making tutorial videos. It’s better for you to make videos and commit all my pet peeves listed above than to not make videos at all—don’t let one guy’s rant stop you from sharing your knowledge and experience (but if it helps you, you’re welcome—and you just might gain a new viewer!)14 -
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 -
THE UNITY API IS SUCH A PILE OF UTTER FUCKING DOGSHIT I CANNOT BELIEVE IT
EVERY FUCKING TUTORIAL IS OUTDATED SINCE LIKE FOUR YEARS
THE FUCKING REFERENCE OFTEN DOESN'T EVEN LIST THE NEEDED ARGUMENTS SO HAVE TO GOOGLE AGAIN
"MOST FRIENDLY ENGINE" MY ASS
GRAAAAAHHHH
NOT TO FORGET THAT ALL EXPLAINING VIDEOS WERE MADE IN 2011 AND ALL VIDEOS ARE PLASTERED WITH ANNOTATIONS SINCE EVERYTHING IS DIFFERENT6 -
Me: Bro look, I have learnt so many things from the past couple of days.
-Introduction
-Data Types
-Variables
-Arrays
-Operators
-Control Statements
-Classes
-Methods
-Inheritance
-Packages
-Interfaces
-Exception Handing
-Multi-threaded Programming
-Enumerations
-Autoboxing
-Annotations
-Generics
My senior: Congrats on finishing up the basics
Me: Those were just basics???...///!!! 😜3 -
My boss just asked me for a cheat sheet I have that lists all our app server's paths.
The paths are attached as annotations throughout some Java files.
Anyway I send him the one I have but he asks if he could have an updated one.
Now imagine if I were like most monkeys and had made this cheat sheet by hand....
2 mins easy vs an(other) hour of grunt work
Why is it that I'm the only person on the team that writes utilities to automate boring grunt work while everyone else just does it manually whenever it needed....
Isn't DRY a core principle of being a developer?
I'm the only person that builds utility apps that automate frequent tasks that people keep asking us to do....21 -
Dynamically typed languages are barbaric to me.
It's pretty much universally understood that programmers program with types in mind (if you have a method that takes a name, it's a string. You don't want a name that's an integer).
Even it you don't like the verbosity of type annotations, that's fine. It adds maybe seconds of time to type, which is neglible in my opinion, but it's a discussion to be had.
If that's the case, use Crystal. It's statically typed, and no type annotations are required (it looks nearly identical to Ruby).
So many errors are fixed by static typing and compilers. I know a person who migrated most of the Python std library to Haskell and found typing errors in it. *In their standard library*. If the developers of Python can't be trusted to avoid simple typing errors with all their unit tests, how can anyone?
Plus, even if unit testing universally guarded against typing errors, why would you prefer that? It takes far less time to add a type annotation (and even less time to write nothing in Crystal), and you get the benefit of knowing types at compile time.
I've had some super weird type experiences in Ruby. You can mock out the return of the type check to be what you want. I've been unit testing in Ruby before, tried mocking a method on a type, didn't work as I expected. Checked the type, it lines up.
Turns out, nested away in some obscure place was a factory that was generating types and masking them as different types because we figured "since it responds to all the same methods, it's practically the same type right?", but not in the unit test. Took 45 minutes on my time when it could've taken ~0 seconds in a statically typed language.11 -
Client: “I’ve attached a screenshot of the issue.”
The “screenshot” is a printout of the website, with no annotations detailing what the issue is, scanned back in at a 90° rotation and saved as a PDF 😄2 -
Slowly getting better with RegEx problems! Warning, lots of non-computer linguistic geekiness ahead.
Been working on some functions recently to replicate the furigana (Chinese character annotation) functions available over at JP.SE in PHP for a project.
Managed to get the basic cases down fairly quick:
[Chinese character][reading] => <ruby><rb>Chinese Character</rb><rt>Reading</rt></ruby>
However I realized this evening that there are patterns where this repeats twice for one word, such as the following:
[Chinese Character][helper Japanese character(s)][Chinese Character][possibly optional word ending][reading for the whole thing]
Managed to get it working for both cases initially, but then I found out that adding a Japanese character to either of my test strings (see graphic) would cause the annotations to fall grossly out of sync. The next two hours disappeared pretty fast before discovering that the issue was that I was removing the wrong string length from the annotation string, and just happened to luck out with a test case where it worked the first time.
Probably going to do a code review of it with the intern next time he's in. One of the things I've been stressing to him lately is that however easy a task may be for a human, there are all kinds of extra things that need to be tracked in order for a computer to be able to follow your logic.7 -
Maybe in special dedication to @kiki.
I cut the unit tests down in LOC size by roughly 50 - 60 % in most projects.
It's really easy once one sees unit tests not as a dunking pile of copy pasta wild west, but rather as a code base that needs architecture and design.
Some extensions, some annotations, some good old helper classes.
Pooooof.
Why I did this? ...
Because it's fucking annoying when you read a PR with tests and need a fucking diff tool to spot the difference between two tests cause they're 80 % the same.
Yeah. Thx for giving me brain cramps, motherducker.
I'm not an expert in unit tests, but if all test codebases look like the "usual stuff" in our projects...
It's no wonder bugs exist...10 -
!rant
Today was the first day I ever added @deprecated annotations to our codebase at work
I'm not sure why, but it felt amazing to use those for the first time ever in an active project I work on1 -
I might create a coding course for people actually interested in learning how to program correctly (not Get Rich Quick Bootcamp style, not webapps, not magic Javascript incantations).
I have an idea on how to structure it but I worry it'll be too weird for most people to follow (starting from binary theory and then teaching machine code and then working upwards to C and beyond) explaining how a computer works along the way, showing the real errors with annotations explaining things, etc.
I've always wanted to teach in this format but I feel as though it's too.. idk, "useless" to most people? But I've never had a friend go through e.g. CodeAcademy and come out knowing how to actually make applications from start to finish without just hacking together random React components and hoping the frankenstein project works well enough.
The target demographic would be those either completely new to programming or just have a fundamental or web-centric preexisting knowledge, or maybe those who simply want to understand computers better.
Am I barking up a shitty tree?28 -
Once I sent an email to a coleague asking what is the diff between @Resource and @Autowired annotations.
A simple google qry would have handed me the answer right away..1 -
FUCK MICROSOFT!!! WHAT THE ACTUAL FUCK!?!?!?!? WHY IS THIS EVEN A THING!?!?!?!?
WHYYYYYY HAVE WE GOT A FUCKING DARK THEME IF WHEN I ADD ANNOTATIONS IN SSIS IT'S HARDCODED COLOURS.
No...seriously...not only am i doing this bullshit waste of time redundant annotations for some bullshit client that thinks they know shit but when I use the dark theme like a normal person, if you go back to a normal theme, all annotations in white.
Just finished like 30 packages on this slow ass remote connection and now all these backward ass people that use light themes (like everyone but me) can't see anything written.
Fuck you Microsoft!!!!! Soooooo many fucks for you right now....don't even know how to express the fucks.4 -
The first time I've used JPA and Lombok annotations and suddenly didn't have to bother about getters and setters anymore and pretty much persisted my whole data tables with no effort.
Total game changer for me. -
For all the hate that Java gets, this *not rant* is to appreciate the Spring Boot/Cloud & Netty for without them I would not be half as productive as I am at my job.
Just to highlight a few of these life savers:
- Spring security: many features but I will just mention robust authorization out of the box
- Netflix Feign & Hystrix: easy circuit breaking & fallback pattern.
- Spring Data: consistent data access patterns & out of the box functionality regardless of the data source: eg relational & document dbs, redis etc with managed offerings integrations as well. The abstraction here is something to marvel at.
- Spring Boot Actuator: Out of the box health checks that check all integrations: Db, Redis, Mail,Disk, RabbitMQ etc which are crucial for Kubernetes readiness/liveness health checks.
- Spring Cloud Stream: Another abstraction for the messaging layer that decouples application logic from the binder ie could be kafka, rabbitmq etc
- SpringFox Swagger - Fantastic swagger documentation integration that allows always up to date API docs via annotations that can be converted to a swagger.yml if need be.
- Last but not least - Netty: Implementing secure non-blocking network applications is not trivial. This framework has made it easier for us to implement a protocol server on top of UDP using Java & all the support that comes with Spring.
For these & many more am grateful for Java & the big big community of devs that love & support it. -
I like how software is smart so I have to do things twice instead of once.
Automatically putting quotes works only if you put quotes and then paste inside it, the problem is I usually paste then put first quote and then need to remove second quote and put it on back and remove second quote from back.
Video start from where you left automatically fires and shows closing credits because you obviously want to see them.
Evaluate variable removes old evaluation because why you want old one when you have new.
Collapsing imports or functions in ide so you need to expand them all the time because who needs to look at functions when we have ai
AI models suggesting and adding meaningless annotations and code suggestions to distract me.
Randomly running some console command because I entered keyboard shortcut I don’t know even exists.
Literally every web browser address bar becomes advertising network instead of showing me history results.
Shadowing browsing history when you click back and forward button.
Search results are now buy results.
Suggesting me useless crap to watch because I watched one video in that topic.
Showing me 10 minutes videos as a solution to my problem where I want to find exact line of text to copy paste it. If I’m lucky I need to write text from video into my computer.
Stack overflow infinite loop of answered in #some-different-question
I think it’s about time for me to slowly retire from programming and software as a whole or switch to notepad because I don’t want to use this crap anymore.
Looks like software is now meant for entertainment and distraction instead of doing actual work where you need precise data and information.
Luckily if everything goes good I can retire soon and throw everything away for a while.3 -
When you have notepad++ with 30+ files open, Excel spreadsheets on the taskbar, One Note annotations all over the screen, some email drafts pending in Outlook, but you can't remember where you Ctrl+v'd the fucking snippet.. alt + tab for ages to find it pasted in the browser's url bar lol1
-
I always find reading small configuration files way more difficult than reading a big codebase.
I accept config files do really help in writing a better flexible code and separating the logic and settings but always offer a stiff learning curve.
And often, people make changes in config either unintentionally or with half knowledge which works in local but later blows up the entire system.
Wondering how config files can be presented in a way that the learning curve is minimal and the understandability of its impact is more visible.
I do really like annotations or decorators which provides a closer visibility between config and code. -
Today I've implemented two custom annotation and two validators for those annotations (Java). It's a huge nested object so it's not as easy as I thought to begin with. That pretty much the only thing I've been doing today, and I feel like I've added absolutely no value to the company and feels a bit ashamed not to have done it faster when I look back at how simple it actually was. Makes me wanna choke myself...
-
My last post was a year ago. What brought me back here is the ability of AI to agree and apologize to anything and everything, while producing the worst hopeful code.
4 days I wasted, trying to make an android audio visualizer, but AI... sigh.
It gave me the wrong structure of FFT bytes emitted. I corrected it
It gave me the wrong logarithm calc, I corrected it
It gave me the wrong sampling rate, I corrected it.
It gave me the wrong texture order, I corrected it.
It gave me the wrong glsl sample2d, I corrected it.
It gave me the wrong textureID generation, I corrected it.
It gave me a render which was about 10 fps, I found out that instead of using native onDraw, I had a fcking delta time in my shader. I almost corrected it, I gave up
Lets go to code generators with Annotations.
Like always, starts very positive, until I start to correct it.
It gave me the wrong file locations, I corrected it.
It gave me the wrong order of find copy modify and write to .build, I didnt correct it.
It gave me regexes to find annotations. Im like So whats the use of an "ANNOTATION PROCESSOR"
It apologizes and used a fucking regex in the processor,..... I didnt correct it, in the end, I was left with a separate module, targetting iOS Android and JVM, with an annotation processor implemented in jvmMain, which tries to modify commonMain src by finding annotations with regexes, which wont run on app build or app sync project, but only on java -jre command pointing to that fucking .java class in that module, which takes at least 2 mins to run, and Finally generate 0 files.
I needed to rant, I understand LLMs are just models of words built and stolen from the most intelligent and dumbest people out there. But Im an idiot for getting my hopes high. I cant build anything new and unheard of. I used to do that. I once made a textView + image print util for a bluetooth printer just to say FU to libraries and heavy sdks. like literally rasterizing shit to bluetooth packets. I needed to let off some steam. I havent been here in a year so I dont know what reactions I can get from this rant. I bet someone will just say yeah we tired of 'Fuck AI' rants. but shit, it hurts. When I gave up on that visualizer, I downloaded an app, I think its called project M, like in reference to MilkDrop.. like the Winamp Milkdrop. I opened it, played something on spotify, and let my eyes go blind9 -
Asciidoc! I finally got around to play around with it and it is just so awesome! Best tool for documentation hands down! So many improvements over Markdown:
- importing real code snippets based on tags with syntax highlighting and annotations (which can be also auto numbered with "<.>" instead of "<1>"!)
- Admotions! Love them!
- automatic TOC! Finally!!
- joining a child item to a parent item in a list with "+" in a new line (this one took me a while to understand, but no more offset items in lists! Love it!)
- making tables and loading data from an actual CSV-file! The future is now!!
- embedding images with a fixed size
Just a few things from the top of my head. I don't know why I put up with vanilla Markdown all these years...
Last but not least, a big THANK YOU to everyone who recommended Asciidoc! I accidentally stumbled across multiple mentions of Asciidoc a few months ago. Sorry, but you know who you are! Much love to you and your loved ones! You changed my life for the better. Thank you! -
Finished exams, in 3 days i have a flight to my parents house to see them.
Before that, thought about comming to my grandma's home, which has a beach nearby so i can spend 1-2 days relaxing.
Came here. No one is home. I don't have keys either. I'm hungry too.
Fortunately the wifi signal is ok.
Sat in front of the door, and opened my laptop.
Time to start migrating my projects from duck to static typing and practising my ability to write python code with type annotations until someone comes home.3 -
If I interview one more guy who thinks dependency injection is wholly "those spring annotations" and nothing else, I think I might scream.4
-
The previous developer didn't write a freaking single test for a system that does a lot of calculations. Performance was shit so I got tasked with re-writing everything from DB queries to the actual calculation functions.
This has been the worst developer hell I've ever been. Without tests I cannot change anything without knowing if something breaks!!!
I gotta understand first the mess this guy left behind, then freaking write the tests that are missing and finally refactor the stuff. FML.
Btw, its Python and the guy didint even bother to do some basic type annotations so it's even worse. Function arguments are "data", "score", some are dicts, some are floats, some are lists.
Faaaaaaaaaaaaaack!!!!4 -
To Android developers:
ALWAYS use annotations for service classes when using minifyEnabled option in build.gradle!! I learn it in the hard way 😐 -
I don't get why annotations are even allowed for local variables.
Reflection doesn't even work for local variables.
What's the entire purpose to annotate!!!
Am I missing something!!!1 -
the irony appears to be that JavaScript is more consistent than rust
so let's say you want to create some enums to represent some potential values in a REST JSON payload
well you can implement Display trait but that won't determine the JSON output
you can make a as_str() method and that doesn't even make sense frankly, I guess it's not even a trait even though it's everywhere in the std library? (traits being rust's version of interfaces, so you'd think they should be consistent)
I have a halfway urge to say rust was a beloved language but then the foundations' drama made everyone escape the ship, leaving behind a mess
well evidently the answer is you use the stupid annotations:
enum Lang {
#[serde(rename = "en-US")]
EnUS,
}
well then this only works in serialization with serde. way to go.
how about if I have some JSON data that starts with numbers? I have an interval field in the REST that expects things like 1m, 15m denoting time scale
well no deal
because rust doesn't want enums starting with numbers
and here I thought rust was superior with its static typing. but I am having to rename things all the way down and nothing is consistent. this would be so trivial in JavaScript. and there's only one toString() method! and no interfaces people say you should use while nobody uses them!87 -
Jesus so help me god. I just come here to rant about this FUCKING API PLATFORM. It uses doctrine, i set annotations, YET IT FUCKING KEEPS PUSHING the IRI's. IRI FOR IRITANT. What a fuck fuck fuck fuck fuck fuck system. Bah bah... lost 2 hours because of this SHIT!
Ok, that helps. THANK YOU!6 -
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 -
Wow.... it seems Entity Framework with Code First/Annotations is FAAASSSTTTT vs using Fluent API. I don't mean writing the actual code but the DB file opens very quickly unlike my last attempt years ago...
Or whoever wrote this library is really good... https://github.com/msallin/...
Solves the whole headache of creating the initial SQLite DB... -
I to myself:
"I do not really need to add type annotations here, it is just the small coding part of my thesis!"
(about 500 LOC)
Later...
"Hmm, lets just activate flow and get the typedefs of some packages from flowtyped..."
Found 5 Errors!
Dang! -
Hmmm, so you’ve used the DAO pattern everywhere so you’re not coupled to a particular database, but you don’t mind having 8 lines of Hibernate annotations at the start of an entity class, and 2-3 annotations on every property.
I see... -
Pluralsight is so infuriating. First of all my trial lapsed (classiccc move) so I figured I would use it.
They’re content is so outdated.. it’s driving me mad. The past 3 courses have been 2+ years out of date.. and I get it, it’s a lot of work to maintain a course but could you not at least provide links or new annotations?
And I’m not talking a couple of package version updates where things change. This guy is using Bower which to my knowledge is pretty much deprecated and references yarn. Which completely breaks the course.
My thing is, why are you charging $30/month (i think), if I have to jump through these hoops to learn??? I was doing a great job of that on my own via google and YouTube.
The one Udemy course I bought is constantly being updated with notes and annotations and boy do I appreciate that. They’re marketing and cookies are toxic but at least the content is reliable.3 -
Useless language feature #1: specify kind in explicit expression type annotations that you insert to guide the type inference engine.
How did I work on this for 6 months without realizing that the kind of a value's type is always the kind of types because that's literally what the kind of types means?2 -
Hello folks.
This is my first rant ever here, although it may not be a 'standard' one. Am I the only poor soul who finds Java Enterprise annotations (the fucking @DoSomething) the zenit of antiesthetic and unreadable code?
I fear I may be alone in this battle.2 -
A co-worker ask me to translate my "comments" (*which are in facts annotations) to french since it's private code and as it "plays hackers game". The same coworker writes his methods starting with a uppercase.
This is bothering me a lot.
I want to quit.1 -
I always thought J2EE was like a completely different thing from general Java. It has features like Enterprise management beans, special packages and has it's on Project type, structure in IDEs.
But it seems like it's not actually that different? If you use Spring, Hibernate, custom library annotations and build a Servlet, web server with @POST, @GET or use Serialization... And maybe use JDK instead of JRE, Maven, Ant... apparently that's considered J2EE?9 -
And why is symfony so fucking slow? Well I guess it has something to do with depending on code annotations for everything, or every simple task requiring a whole cloud of a thousand classes, stupid design decisions....I fucking hate symfony, piece of shit software
-
Online resources that discuss testing recommend the following pattern when writing your unit test method names:
given[ExplainYourInput]When[WhatIsDone]Then[ExpectedResult]()
This makes developers write extremely long test method names.. and this is somehow the acceptable standard? There must be something better.. I think I've seen annotations being used instead of this.5 -
APi platform for Symfony :
How to transform a system which worked perfectly with 10 lines of code for each functionality with 100 lines of annotations and requires...
Why so much anger ? -
Hey, I have a question concerning the use of jpa annotations in a kotlin multiplatform project and how to organize shared data classes.
I already posted the question on stackoverflow: https://stackoverflow.com/questions...
I would appreciate every help :) -
One side effect of learning React Native for Android is JavaScript and Java start to look the same...
The only way to tell at a glance is the Java annotations...
https://facebook.github.io/react-na...
https://facebook.github.io/react-na... -
What was the idea behind java spring (jpa) and creating/using like a million annotations? There are annotations for literally everything...2