So I have to write server-side Java code.
Coming from C# I thought all the hate was somewhat unwarranted.
Turns out it wasn't.
Who the fuck uses this bullshit?
What sucks about it anon? Too hard for you or what?
>>55878923
I came from Java and C to C#; the hate isn't warranted. They are virtually the same languages. C# does have some nice prebaked shit (monads, LINQ), but it's not like that shit hasn't been done in Java by 3rd parties.
The real advantage C# has over Java is WPF. And thats Windows only. So it's a shit advantage at best.
Like
>>55878968
said; too hard for you or what? Are you a shitty C# dev as well?
C# is also verbose af and encourages over-engineering
>>55879135
It's only verbose if you're a shit dev and dont use linq and binding to cut the cruft. Java is equally as verbose.
>>55878968
>>55879076
>too hard, huh? HUH?!
lmao what kind of shit argument is that for a programming language, you might as well use assembly then
>>55879222
No, because OP is shit-posting. Java is just as verbose as C#
>>55879188
l done Java @ Uni & it suked. bloated ass shit
>>55879936
I had to work with J2EE 1.4 back in the day. Bloat took on a whole new meaning.
Scala was practically a godsend.
>>55878923
I went from Java to C# and then back to Java again. I prefer C#. LINQ, reflection and generic types are a lot smoother to work with than their Java equivalents.
>>55878923
apparently literally everyone, so get used to it if you enjoy employment
>>55879904
This is just a troll image but I'll take the bait. That Java code is unnecessarily verbose. C# (and Java as well) could be something like the below. Sure it's more verbose but not that horrible.static void Main(string[] args)
{
Console.WriteLine("Enter the URL you wish to crawl..");
Console.Write("@> ");
var url = Console.ReadLine();
using (var client = new HttpClient())
{
foreach (Match match in Regex.Matches(client.GetStringAsync(url).Result,
@"href=[""'](.[^""']+)[""']", RegexOptions.IgnoreCase))
{
var text = match.Groups[1].Value;
Console.WriteLine(text);
File.AppendAllText("results.txt", text + "\n");
}
}
}
>>55880233
>ConsoleWriteLine
>WriteLine
>W
Holy shit. Like sucking microsofts cock is bad but you fuckers are going to the next level by using this kind of shit.
>>55879188
We're not allowed to use linq (on operations per frame) at my job, because it generates a shitload of garbage. Such a frustrating library.
Unity.
>>55880873
If your arthritis is acting up and it's still to verbose for you you could do a static import and just useWrite("...")
>>55881586
>>55880873
Oh, just curios. How does a print() without new line look in python?
>>55880233
>inadvertedly changed java to dynamic typing
You don't know shit about programming languages, do you?
>>55878923
Yeah. The problem I have with Java is not the language, which is not terrible, but both the fucking stupid idea that a POJO is the best solution for every problem, hence bloat, and also the idea that XML configuration is free in some way, so that Java frameworks put a huge emphasis on hand-writing hundreds of lines of XML, then claim that you only have to write a few lines of code to get X task to work. It's so clearly aimed at managers who can't tell code from a hole in the ground that I can't believe anyone agrees to use it. Which is probably why you get $10k a year more to use it I suppose.
>>55881631
var is a statically typed variable. Have you ever used C#?
The worst aspect of Java is definitely the garbage collector. Taking the already slow mark and sweep algorithm and making it even slower.
>>55881813
Java isn't very slow anymore, it just uses a lot of memory
>>55879904
>not handling network errors
>not handling error response from the server
>not checking if content-type of the response if fucking text/html at all
>not handling decoding errors
>parsing HTML with regex, the Pajeet way
>>55881955
>padabum kiss
goes the gaff relief drum thingy