Be me

>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.

Other languages
>print()
>console.log()
>cout

Attached: Screen Shot 2018-05-30 at 15.17.43.png (206x374, 42K)

Other urls found in this thread:

developer.android.com/studio/debug/am-logcat
redd.it
github.com/JakeWharton/timber
youtube.com/watch?v=lGHrhtuxnOc
twitter.com/NSFWRedditGif

Maybe because theres more to programming than printing output like a faggot fizzbuzzer?

syso, shift+space

>System class
>output object
>println() method

Verbose languages may not be for you. You would be better off with JavaScript.

>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");

how the hell am i supposed to program when debugging takes a fucking century to do

>output object
>Verbose languages may not be for you.

out is not an object you piece of shit its a namespace or package.

I agree people talk about c++being hard but Java buffer and system is a complete shit show

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.

>having consistent abstraction for I/O stream
>properly in module where it should be
>bad thing
lol

well, LEARN the java foundations instead just copy pasting code from stackoverflow, also android has its debug log api

developer.android.com/studio/debug/am-logcat

set up snippets, most IDEs already have one for this

do not listen this fags, snipppets are one of the reason why pajeets writes long shitty code.

no it's not, it's PrintStream object

Please Shuaybi yourself.

It's a field which can also be an object.

>what is a logger
>what is slf4j

What is shortcuts

everything except for primitive types and operators are objects in java

What is a debugger

It is actually java.lang.System.out.println

print() is a function op, it's a function in every language.
print() isnt a reserved word

use a logger or just fucking
public void log(Object o){System.out.println(o);}

OP if you think that is bad, java will show you a world of pain

>sout
>Hit tab
There you go.

like what? java is unironically the best language there is aside from maybe haskell

Okay I didnt understand that. I'm just copying and pasting helloworlds

I should also add: don't use System.out.println() with android, just use Log. It's a lot more useful.

>expands to System out.println()
What now? It is still verbose shit

If you think java is good scala will really blow your balls off

Who cares? Less typing is less typing. As I said in my other post use Log with android.

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,...)

>What now? It is still verbose shit
Just because you lack a brain does not make things verbose

Why is it the best language?

Calm down street shitter

>non-direct-question ended with a question mark
redd.it

Java has some of the best ides and debugging tools you fool

With how hideous it is?

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

Attached: 4fnb38b.jpg (125x104, 3K)

Not so ugly compared to java

Attached: c7ShWbf[1].png (451x640, 49K)

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

no one ever criticizes c# even thought it has the same problem

You misspelled Kotlin ;-)

Learn Java instead of complaining. Debugging in Java is one of it's best features. Having the JVM has benefits.

Still better than
public static return_type genericlel(Class clazz, /* other params */)

>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

Every language has its problems but java just has toooo many

holy fuck I remember when I was 12

Attached: Capture.jpg (94x103, 11K)

>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.

>self explanatory function names
vs
>>:>~

Java isn't C++, you don't use logging functions, you use the debugger which is the best thing about the JVM.

>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?

Attached: 1523021336564.jpg (630x421, 221K)

>OP complains about a function being too long
>Suggests an alternative with double the size
I seriously laughed.

c.printf("is unbearably long aint it lad");

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");

>cout

youtube.com/watch?v=lGHrhtuxnOc

String tag = "For faggot OP";
Log.i(tag, "Use logs for Android faggot OP");

>pajeet video
The most liked comment is fucking pic related
I am literally dying lmfao

Attached: Screen Shot 2018-05-30 at 18.07.53.png (974x252, 40K)

HAHAHAHAHHAHAHA
The fucking comments.
laughing. my. fucking. ass. off. I cannot even... lmfao

Attached: Screen Shot 2018-05-30 at 18.09.12.png (1886x830, 197K)

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.

Attached: 1527444329953.jpg (463x384, 14K)

Ahh.. The good ol' Durga Weapon

>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.

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.

Use Kotlin

Wait till you get to the input then

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.

actually C# doesnt have this problem, the System namespace is so much better, and now you can import static members from any namespace

>printing to stdout
>logging

jesus christ just kill yourself right now

sout + tab key will work on any decent editor. And on android you should be printing using log anyway.

>It is supposed to be a fucking lambda but it is not..
What's not lambda about it?

Attached: 20180518_114126.jpg (1915x1080, 986K)

What is this "problem" you speak of? Is this how people that only write hello worlds analyze languages using import statements?

>Great explanation durga sir

Kek

>he debugs using print statements

what the fuck man ? i thought this board was tech related ?

That's the best way to debug.

Nobody uses C#.

It's the twentyfirst century gramps

Go fix your bugs kiddo.

Yeah with a debugger instead of print statements

Attached: boilerplate.jpg (550x279, 89K)

...

Verbosity is good for people who don't write throwaway code.

Type this at the top to take our the System prefix
import static java.lang.System.out
Then you can just type out.println()

Basically, Java is such a mess you're forced to use an IDE for everything. So use your IDE for debugging.

BASED DURGA

Attached: 1524383384646.png (875x877, 34K)