>be me >have to learn java to build android app because the libraries i need are all in java >start learning java >System.out.println() >whatthefuck.jpg >fuckmylife.png
who in the good fuck thought it would be a good idea to have the logging function be as long as this. what in the good fuck.
Maybe because theres more to programming than printing output like a faggot fizzbuzzer?
Camden Ortiz
syso, shift+space
Asher Cooper
>System class >output object >println() method
Verbose languages may not be for you. You would be better off with JavaScript.
Henry Baker
>Other languages print
ok you have no fucking idea about what a programming language is in java you have tons of options for using the console.
Console c = new Console();
c.printf("OP is a retard fag");
Leo Smith
how the hell am i supposed to program when debugging takes a fucking century to do
Dylan Torres
>output object >Verbose languages may not be for you.
out is not an object you piece of shit its a namespace or package.
Ian Adams
I agree people talk about c++being hard but Java buffer and system is a complete shit show
Brayden Bailey
Did you know you can combine logic abstraction and stuff into this weird thing called a function? I know might be a little advanced for you but thats okay.
Eli Jones
>having consistent abstraction for I/O stream >properly in module where it should be >bad thing lol
Alexander Jenkins
well, LEARN the java foundations instead just copy pasting code from stackoverflow, also android has its debug log api
set up snippets, most IDEs already have one for this
Kevin Williams
do not listen this fags, snipppets are one of the reason why pajeets writes long shitty code.
Justin Martinez
no it's not, it's PrintStream object
Ayden Bennett
Please Shuaybi yourself.
Jordan Carter
It's a field which can also be an object.
Brayden Allen
>what is a logger >what is slf4j
Charles Morris
What is shortcuts
Benjamin Morales
everything except for primitive types and operators are objects in java
Lucas Cox
What is a debugger
Ethan Hughes
It is actually java.lang.System.out.println
Xavier Nelson
print() is a function op, it's a function in every language. print() isnt a reserved word
Jack Sullivan
use a logger or just fucking public void log(Object o){System.out.println(o);}
Matthew Lewis
OP if you think that is bad, java will show you a world of pain
Carter Ross
>sout >Hit tab There you go.
Isaiah Powell
like what? java is unironically the best language there is aside from maybe haskell
Isaac Allen
Okay I didnt understand that. I'm just copying and pasting helloworlds
Owen Rogers
I should also add: don't use System.out.println() with android, just use Log. It's a lot more useful.
Gavin Wilson
>expands to System out.println() What now? It is still verbose shit
William Ross
If you think java is good scala will really blow your balls off
Gabriel Parker
Who cares? Less typing is less typing. As I said in my other post use Log with android.
Jack Harris
Because in the real world you use an actual logger and don't print it to the console you retard. It's as easy as setting up a logger and the LOG. (a ,b,c,...)
Liam Long
>What now? It is still verbose shit Just because you lack a brain does not make things verbose
Jack Robinson
Why is it the best language?
Isaiah Ross
Calm down street shitter
Ryan Hill
>non-direct-question ended with a question mark redd.it
Hudson Edwards
Java has some of the best ides and debugging tools you fool
Jeremiah Russell
With how hideous it is?
Christian Davis
First, this is considered normal in Java, retard. Even the most popular logging libraries are called through static methods. Ej: Warton's Timber: >github.com/JakeWharton/timber
Second, If you knew Android you would know of a better way of logging to logcat: >Log.v >Log.e
Finally, if you needed to log many times with the Java console output you could always do >import static System.out
First, this doesn't change how badly structured the standard library is. Suggesting a 3rd party lib for something as simple print is just pathetic Second, this import static java.lang.System.out;
Still needs out because it is a field
Asher Thomas
no one ever criticizes c# even thought it has the same problem
Leo Cruz
You misspelled Kotlin ;-)
Ryan Perez
Learn Java instead of complaining. Debugging in Java is one of it's best features. Having the JVM has benefits.
Christian Lopez
Still better than public static return_type genericlel(Class clazz, /* other params */)
Evan Nelson
>for something as simple print The funny thing is that in an actual application you don't print things, so it's something that is so incredibly minor that nobody gives a shit Meanwhile actual people use a logger and then you just put log.info("eks dee"); but then you find out that logging to debug issues is a dumb idea and you're better off using integration tests and unit tests to build your applications
Jaxson Bell
Every language has its problems but java just has toooo many
>Suggesting a 3rd party lib for something as simple print is just pathetic You believe this because you probably haven't coded much professionally. In the real world you usually need to retrieve a log file from the user when there are problems. In Java this means using log4j or Logback with a properly configured file appender. More complicated appenders might involve email or sync queues.
>still needs out You get the idea.
Evan Rogers
>self explanatory function names vs >>:>~
Jayden Jenkins
Java isn't C++, you don't use logging functions, you use the debugger which is the best thing about the JVM.
Jacob Roberts
>making a shitfit thread because the print method of the standard output stream is too many characters are you writing in EDIT.COM in 80x25 mode?
what else, you're using a text editor and "javac" because you're "too good" for an IDE?
>OP complains about a function being too long >Suggests an alternative with double the size I seriously laughed.
Ayden Myers
c.printf("is unbearably long aint it lad");
Grayson Campbell
Just wrap your own function around it then Static void p(String s) System.out.println(s); Put that shit into your own class if you have to >fuk.p("niggers");
Stop LARPing. There is nothing professional about having to use a 3rd party lib instead of the standard one for simple tasks. The main point is that java has a shit standard lib and using 3rd party lib is nothing but a pathetic attempt of defending garbage Another example of this shit design is the entire inconsistent IO related classes. You have files (nio lel), file, filewriter, filereader..etc and inconsistent way of specifying encoding (sometimes a string and sometimes StandardCharsets) And another one is IntFunction, Comaprer.compareInt ..etc of pirimitive non boxing specific shit. To use streams to have to create a stream instance on every collection. Imagine the overhead when doing that in a loop. Why the hell are they called streams anyways? Why can't java provide something that is not half baked? Why functional interface? It is supposed to be a fucking lambda but it is not.. The list just goes on and doesn't get any better. Of course, you will defend this (or attempt to defend a part) or continue spouting blatant delusions.
>There is nothing professional about having to use a 3rd party lib instead of the standard one for simple tasks Your console log volatilizes and is useful for nothing. Good luck finding the cause of an unlogged exception without a proper log file. You clearly don't know the pain of having to reproduce and fix an error of an already shipped app without log. Log is a fucking must. To the point you don't start a greenfield project without adding basic infrastructure utilities such as logging. In the real world you either log the errors to a file and send them to you periodically or use something like Crashlytics.
>Of course, you will defend this Actually not, my point being log is not just the console log. The real useful log is the error/warning log. You need several levels and different loggers, and you absolutely use a library for this. Other than this I agree Java is verbose and its API sucks, but it has 20+ years and they choose to stay retro-compatible. Only in Java 9 they started giving zero fucks about breaking compatibility, and that unironically will kill Java.
Thomas Lopez
It exists for a reason and is used when needed. It doesn't change the fact that java can't get a print function right.
Juan Cox
Use Kotlin
Blake Wright
Wait till you get to the input then
Brayden Gomez
What are you on about, java IO is not inconsistent, just unfriendly to beginners. io is blocking and stream based, nio is non-blocking and buffer based. With io you feed readers and writers input and output streams. With nio you register channels with selectors, call select(), and do your operations on your set of buffers corresponding to your channels. It's very C-like, which is the point.
You do know that if the parameter you provide to Charset.forName() isn't a supported encoding you get a runtime exception? It's just a preference to specify using a string or with the sets in StandardCharsets. Everything is utf-18 by default, so unless you're doing something fancy with byte buffers and nio, you'll be fine.
The rest seem like non issues, especially the lambda thing which is solved in Java 8. You shouldn't be using shit like the raw compareTo anyways.
Camden Jenkins
actually C# doesnt have this problem, the System namespace is so much better, and now you can import static members from any namespace
Connor Powell
>printing to stdout >logging
jesus christ just kill yourself right now
Samuel Hill
sout + tab key will work on any decent editor. And on android you should be printing using log anyway.
Carter Cruz
>It is supposed to be a fucking lambda but it is not.. What's not lambda about it?