News for hackers. Stuff that matters.
Re:Jetbrains founders turn billionaires without VC help by victor106 on Friday December 18, 2020 @08:34AM (#25466874)
It’s rare these to read stories of software billionaires and think it’s well deserved. This is one of those rare cases.

Also, IntelliJ runs on Java, for all the bashing that Java gets on HN, it’s an example of how “what technology you pick is less important than your focus on user experience”. It’s amazing that their products are so performant on Java

Re:Jetbrains founders turn billionaires without VC help by avl999 on Friday December 18, 2020 @11:58AM (#25469043)
Folks who still think that Java is a bad language either from the perspective of developer ergonomics or performance probably haven't programmed in it since the Java 4 days and still think of the language as the language of Enterprise Java Beans, Java Applets and hundreds of lines of XML. It is not that language anymore. Modern Java is blisteringly fast(and has been for a while) and almost the same level as C# in terms of developers ergonomics
Re:Jetbrains founders turn billionaires without VC help by pie_flavor on Friday December 18, 2020 @08:12PM (#25474039)
Modern Java has nowhere near the developer ergonomics of C#, I can tell you that much. You are still manually writing tons of boilerplate, you still cannot express something as simple as List<int> (and the JSR for that is on its, what, 8th iteration? for a problem that existed since before C# existed?), there is no async/await in 2020 when even C++ has figured it out, the new module management system is a joke that solves zero problems and almost seems like it was only invented to modularize the JRE...

It's got a few bells and whistles, although I can't think of a single one that wasn't stolen syntax and all from C# at least two years after the fact, except for the aforementioned modules. But 'var' is the only thing I can think of that's actually improved the Java experience since lambdas. They've committed to a six month rolling release cycle without actually having anything to put in the releases.

That said, Java devs think C# is slow, C# devs think Java is slow, and people who are neither think both are slow. It is no longer 1995 where bytecode is interpreted; the slowdown relative to C++ is 2.5x-3x for both. Any leftover 'slow' opinions are bordering on superstition at this point.

Re:Jetbrains founders turn billionaires without VC help by jolux on Friday December 18, 2020 @08:51PM (#25474255)
I’m a huge fan of C# and how Microsoft has been improving .NET recently but as a C# fan I think you’re being a little unfair to Java. It has a slightly different perspective on language evolution than C#, in that they try to keep the language core smaller. I was overwhelmed by syntax when I first started programming C#, from all the different kinds of parameters (optional, named, ref, out, in) to all the different kinds of properties, to the actual difference between properties and fields. To this day I think it’s silly that certain tools and style guides will suggest you replace public fields with public auto-properties, when there is no difference in encapsulation in practice. In this sense C# is closer to the culture of C++, where the bar for adding features is quite low.

Java just moves a lot slower, and has a different philosophy for adding features, and the core team seems averse to introducing new forms. An example I ran into the other day is applying first-class functions in Java: in C#, this looks like

  lambda(arg1, arg2)
while in Java it’s

  lambda.apply(arg1, arg2)
This is definitely more verbose and arguably uglier, but it hews closer to the object-oriented style because it’s visibly falling a method on an object. Of course this is happening in C# as well, but it’s hidden by syntactic sugar.
Re:Jetbrains founders turn billionaires without VC help by to11mtm on Friday December 18, 2020 @10:32PM (#25474746)
> This is definitely more verbose and arguably uglier, but it hews closer to the object-oriented style because it’s visibly falling a method on an object. Of course this is happening in C# as well, but it’s hidden by syntactic sugar.

It's hard to appreciate how addictive the sugar is if you never had it.

Frankly, language level auto properties -alone- would get rid of 25-33% of the pain I feel writing Java.

Of course, there is always Scala on the JVM Side; which gives you all sorts of sugar, but in some ways -too much-.

Re:Jetbrains founders turn billionaires without VC help by jolux on Friday December 18, 2020 @11:45PM (#25475121)
I think from an object-oriented design perspective that it's quite easy to overuse public field members and that a lot of getters and setters is generally a code smell. Nonetheless, properties are a very sharp tool and having them in the toolkit is wonderful.

I've never used Scala but it seems to go much further in the syntactic sugar and semantic complexity direction, more akin to F# than C# (though with less elegant syntax, to my eye).

Re:Jetbrains founders turn billionaires without VC help by pie_flavor on Saturday December 19, 2020 @12:31PM (#25479147)
There have been many iterations of 'Java except it doesn't suck', but which all were extremely similar to Java - Xtend, Groovy, etc. So when Scala came onto the scene, even though it was a serious functional language and encouraged a very different style of programming than Java, it was seized on as a 'Java except it doesn't suck' language because it was much more different than previous ones and so felt more like a fresh start. The sentiment hasn't died yet, although Kotlin should at this point be treated as the official 'Java except it doesn't suck' language, since it's designed directly for it, is different enough, and has mainstream adoption.
Re:Jetbrains founders turn billionaires without VC help by qw on Saturday December 19, 2020 @03:58AM (#25476186)
Lombok fixes most of the getter/setter issues. It is also supported in IntelliJ
Re:Jetbrains founders turn billionaires without VC help by pie_flavor on Saturday December 19, 2020 @12:23PM (#25479068)
However bad the Java situation is, Lombok as a solution is worse. It uses unsupported and undocumented APIs of the compiler, it autogenerates code that is in some cases flat wrong (like the infamous enum @ToString), and it does this through a mechanism of the language specifically designed for pure metadata - code that compiles with annotations should not cease compiling without them. And, because of the way it does what it does, IDEs must have explicit Lombok support built into them. It is, effectively, a different language that's a superset of Java; at that point, you may as well actually use a superset of Java like Groovy, and then you don't have tools prone to breaking.
Re:Jetbrains founders turn billionaires without VC help by jolux on Saturday December 19, 2020 @03:17PM (#25480794)
I’m not a huge fan of libraries that use attributes as a hook for code generation in C# either, though thankfully there’s less need for something like Lombok.
Re:Jetbrains founders turn billionaires without VC help by pie_flavor on Saturday December 19, 2020 @12:10PM (#25478917)
I am not saying Java's model of never adding important things is better or worse. I might now say it is worse, but that wasn't the point I was making - I was simply responding to a comment saying Java has added important things, when it hasn't.

Also, auto-properties are binary compatible with computed properties, whereas public fields aren't, and you can use 'ref' on a public field whereas you can't make a ref to a property.

Re:Jetbrains founders turn billionaires without VC help by jolux on Saturday December 19, 2020 @01:00PM (#25479485)
I realize there are differences between fields and auto-props when using certain other features, but from a design perspective, these are identical within an assembly:

  public int Foo { get; set; }
  public int Bar;
Java has absolutely made important improvements, and there are even more impressive ones on the horizon. In particular you should look at Project Loom, which is Java’s answer to async/await. It’s not finished yet because the design is much more general and novel, and it avoids the “function color” problem that async/await has. It’s inspired in part by Erlang/BEAM’s green threading system.

You might also look at the JDK flight recorder, which is an amazing feature that .NET doesn't have. The Java perspective is adding complexity to the runtime fiest instead of the language.

Re:Jetbrains founders turn billionaires without VC help by avl999 on Saturday December 19, 2020 @08:02PM (#25482903)
Having primitive int as opposed just using Integer in the first place was the original sin of Java. I am perfectly fine with not proliferating that further, List<Integer> with autoboxing pretty much allows you to use primitives when working with List<Integer> and the workflow is seamless. await would definitely be nice, it's a shame Java doesn't have it. It's a bit weird to call the features they have added as "stolen from C#", these features have existed in other languages for decades- ML had type inference in the 70s, lambdas have been there since the 60s. They are not "C# features".

There have been many useful improvements between Java 8 (the lambda release) and Java 11, I haven't looked beyond 11 as I haven't worked in Java in over a year and that was the last version I wrote code with. I don't even consider var to be that useful of an improvement, the biggest pains of lack of type inference were solved in the Java 7 era with the diamond operator which eliminated the need to specify often times deep nested generic arguments on both sides. Now var was basically a bikeshed problem. Between 8 and 11, they improved Strings under the hood to move away from being backed by char arrays. This has huge implications on web services and data processing apps in reducing the memory foot print as most of them wrangle a large amount of json. Also they added an HttpClient to standard library somewhere between 8 and 11 greatly eliminating the need to depend on 3rd parties. They also added the FlightRecorder (although I haven't had a chance to personally use it yet) which improves the the instrumentation story. Not every release is going to have sexy language features but they do contain improvements with direct impact on production software- the String class compaction improvement is the best example, it is not sexy, I doubt it even had a thread on HN but in the real world it measurably improved the performance profile of a large category of applications for free. Release cycles are just numbers, most people in the real world are not keeping up with latest release and instead opting to upgrade to just the LTS releases which are on a much slower cadence of 3-4 year cycles.

Re:Jetbrains founders turn billionaires without VC help by ravi-delia on Friday December 18, 2020 @01:15PM (#25470069)
Admittedly, Java suffers from the same issue as C#; those ergonomics come from a bad case of kitchen-sink-itis. In your own code it's fine, but it's a hassle going through 8 different paradigms in one legacy codebase.
Re:Jetbrains founders turn billionaires without VC help by hn_throwaway_99 on Friday December 18, 2020 @07:02PM (#25473615)
These days, though, I feel like Java the language should die in favor of Kotlin (also invented by Jetbrains). I feel like with Kotlin you get all of the goodness of Java (and especially the JVM) without so much of the verbose "cruftiness" that is a result of Java the language being 25 years old (wow now I feel old!)
Re:Jetbrains founders turn billionaires without VC help by sangnoir on Friday December 18, 2020 @12:23PM (#25469429)
I haven't programmed in Java since around 6 - when Spring was just about to cement its dominance. The ergonomics then were bad too. It seems lots of quality-of-life features borrowed from other languages went into subsequent versions
Re:Jetbrains founders turn billionaires without VC help by flohofwoe on Friday December 18, 2020 @09:56AM (#25467651)
TBF, Jetbrains IDEs do feel sluggish at least on macOS compared to the alternatives (like Xcode or VSCode) on my mid-2014 13" MBP. I don't know if the JVM has performance problems specific to macOS which would explain why big UI applications feel so laggy, or whether other systems with more recent CPUs simply have more reserves to hide the lower UI performance though (the latter is probably more likely).
Re:Jetbrains founders turn billionaires without VC help by thu2111 on Friday December 18, 2020 @10:24AM (#25467931)
Almost always when a JB IDE is being reported as sluggish the problem is you're running out of heap space. Go to Help | Change Memory Settings and give it some more, see if that helps.
Re:Jetbrains founders turn billionaires without VC help by gregkerzhner on Friday December 18, 2020 @10:19AM (#25467883)
As a counterpoint, for a project of decently large size on my 2019 MBP, IntelliJ is snappy and a delight to work with, while Xcode takes up 30 GB of space, takes minutes to boot up, and gives me syntax highlighting and autocompletion about as reliably as a broken clock tells time.
Re:Jetbrains founders turn billionaires without VC help by saagarjha on Friday December 18, 2020 @03:19PM (#25471403)
Xcode opens in seconds for me, and my projects are massive. Sure, it can be slow to do certain things, but its startup time is generally ahead of every Java-based IDE I have every used.
Re:Jetbrains founders turn billionaires without VC help by mook on Saturday December 19, 2020 @12:25AM (#25475310)
Android Studio (which I understand is a Jetbrains IDE) has always been laggy to be too. I suspect it's because I'm only using it for personal projects on older consumer machines (one Linux, one Windows) with ~16 gigs of RAM (which also has to fit an Android VM); the people who are having no issues are probably running on newer machines with a lot more resources.
Re:Jetbrains founders turn billionaires without VC help by justsomeuser on Friday December 18, 2020 @02:08PM (#25470670)
JetBrains IDEs always takes ages to start and index my code (especially compared to Sublime), but the jump to def, symbol and other search features are fast after the initial index.
Re:Jetbrains founders turn billionaires without VC help by chokma on Friday December 18, 2020 @03:38PM (#25471641)
Performance got worse on Linux, too. A year ago, JavaDoc would be displayed instantly. Now I have to wait 5-8 seconds for the IDE to display information about a class / method. It may be a kernel related bug from what I have found on the net, but it seems strange that some operations are still fast, while others take several seconds (like opening a menu).
Re:Jetbrains founders turn billionaires without VC help by tomjen3 on Friday December 18, 2020 @03:29PM (#25471524)
I have a MBP of about the same vintage, but I retired it from hard tasks a couple years ago. It is a 6 year old machine, we can't expect it to perform well.
Re:Jetbrains founders turn billionaires without VC help by drKarl on Friday December 18, 2020 @09:45AM (#25467548)
That is actually a misconception. You may have this mental classification of Java as a slow language if you looked at its performance 20 years ago. Now it's actually really fast, it goes neck to neck with C++. Sure, Rust or Go or C (or definitely assembler) might be faster in some workloads, but Java is definitely very very fast nowadays. It uses a lot of memory because of the way Garbage Collection works, but it is fast. It's definitely faster than Python, Ruby, PHP and many other kids on the block...
Re:Jetbrains founders turn billionaires without VC help by apocalyptic0n3 on Friday December 18, 2020 @10:07AM (#25467761)
> It's definitely faster than Python, Ruby, PHP and many other kids on the block...

I don't know why, but I got a good laugh from that statement. Those "kids" are all the same age or older than Java; PHP, Ruby, and Java were introduced within a few months of each other in 95 and Python dates back to 91.

Re:Jetbrains founders turn billionaires without VC help by drKarl on Friday December 18, 2020 @11:08AM (#25468400)
I know, I didn't say "kids" implying these languages were new, it was just a manner of speaking.
Re:Jetbrains founders turn billionaires without VC help by apocalyptic0n3 on Friday December 18, 2020 @11:38AM (#25468758)
Yeah, I assumed as much. I doubt anyone is calling those languages "kids" at this point, even with PHP's reputation. I just found it funny to word it like that.
Re:Jetbrains founders turn billionaires without VC help by xamolxix on Friday December 18, 2020 @10:03AM (#25467726)
> it goes neck to neck with C++. Sure, Rust or Go or C

I hate to be that guy but 1) java does not go neck to neck with c++ unless you mean it can be in the same order of magnitude and 2) C++ is not slower than C or Go or Rust

Note: by c++ I mean c++ compiled by a decent compiler e.g. gcc/clang/msvc

Re:Jetbrains founders turn billionaires without VC help by sweeneyrod on Friday December 18, 2020 @01:17PM (#25470090)
Yes, out of Rust, C, C++ and Go, the slow one is going to be the one with a GC.
Re:Jetbrains founders turn billionaires without VC help by tomjen3 on Friday December 18, 2020 @03:24PM (#25471455)
Java is fast enough for most things, but try working with an array of a million objects in C++ vs Java and you will see the difference.

In Java you will have to deal with an array with a million pointers to a million objects and in C++ you will deal with a sequential segment of memory that is a million times the size of your object - and mostly in your CPUs cache. That alone will be much, much faster.

But you can't do that in Java at all.

Re:Jetbrains founders turn billionaires without VC help by nlitened on Saturday December 19, 2020 @04:07AM (#25476230)
I think in this case you’re holding the tool wrong.

When you want, for example, an array of (float x, float y) “objects” in Java, you just keep them as two arrays (float[] x, float[] y) — and I guarantee it will use the same amount of memory and will have nearly the same speed as C++ (depends on what cache locality you need for a specific task, it might even be faster to have two separate arrays for some tasks).

So yeah, depending on the language, a slightly different implementation is more efficient, so one has to know its tools.

Also, as far as I know, when project Valhalla extension goes live, you will have an option to do packed structs the same way as C++ or C# does.

Edit: Oops, there was another reply about the same in the thread. I should remember to refresh the threads before answering in the morning.

Re:Jetbrains founders turn billionaires without VC help by tomjen3 on Saturday December 19, 2020 @08:47AM (#25477365)
That would be a workaround, but it annoys me when you have to make a workaround for something that is available in the language it set out to replace.

And if you are doing something like nearest cluster mapping, or anything else where you process your data in linear order you are not going to get the optimized cache locality. Plus you can't read the file with mmap if your data is from there.

Re:Jetbrains founders turn billionaires without VC help by nlitened on Saturday December 19, 2020 @01:08PM (#25479559)
I agree that Java is not the best tool for things like analyzing mmap'ed data. Java replaces C++ by being better in some things, not all.

I would go further and say that if your job is analyzing terabytes of memory-mapped binary files, maybe C++ is not optimal either, and investing in specialized languages like Shakti/K would pay off quickly.

Re:Jetbrains founders turn billionaires without VC help by hucker on Friday December 18, 2020 @03:48PM (#25471770)
You typically wouldn't use an array with a million objects in Java if you cared about performance though (for exactly that reason), you'd architect it some other way. Using SoA style when appropriate, for example.
Re:Jetbrains founders turn billionaires without VC help by iamcreasy on Friday December 18, 2020 @11:52PM (#25475155)
Do you mean Structure of Arrays? Can you point to some resource to learn more about Java SoA? Quick google search didn't yield anything useful.
Re:Jetbrains founders turn billionaires without VC help by devmor on Friday December 18, 2020 @12:04PM (#25469130)
>It's definitely faster than Python, Ruby, PHP and many other kids on the block...

I would seriously contest the speed of Java compared to modern PHP. The JIT puts PHP at near-C performance levels with competently written code. Which shouldn't be surprising if you realize PHP is largely a "wrapper" around C.

Re:Jetbrains founders turn billionaires without VC help by victor106 on Friday December 18, 2020 @12:42PM (#25469691)
https://www.techempower.com/benchmarks/#section=data-r19&hw=...

Vertx framework which is based on Java is at 8th position and PHP is 18th.

But the larger point is performance is only one aspect while considering which programming lang. or framework to use

Re:Jetbrains founders turn billionaires without VC help by RobAley on Friday December 18, 2020 @01:40PM (#25470355)
I think you've proved your second point by getting your first wrong. The benchmarks posted are for a stack including PHP, not PHP itself (and not the fastest stack with e.g. pgsql). Also, I don't think thosd benchmarks use php 8, which is the first version with the jit that the post above referred to.
Re:Jetbrains founders turn billionaires without VC help by victor106 on Friday December 18, 2020 @02:20PM (#25470810)
https://www.google.com/amp/s/onilab.com/blog/php-7-vs-php-8/...

From the page above The bottomline: PHP 8 is still slower than PHP 7.

This is a realistic comparison of running Magento on php7 vs php8.

Re:Jetbrains founders turn billionaires without VC help by ta988 on Friday December 18, 2020 @11:24PM (#25475013)
You may not know that Java has a JIT and a AOT if you want even a bit more perf for cold start. And they are really good.
Re:Jetbrains founders turn billionaires without VC help by jcelerier on Friday December 18, 2020 @03:28PM (#25471518)
> Now it's actually really fast, it goes neck to neck with C++.

yet every time I try a Jetbrains IDE every action seems to take 10x the time to be processed than it takes in QtCreator

Re:Jetbrains founders turn billionaires without VC help by drKarl on Friday December 18, 2020 @06:44PM (#25473504)
Once it's finished indexing things it feels darn instant to me. What hardware do you use? Also which programming language? I've used IntelliJ with Java, Scala, Kotlin, Groovy, Markdown, and many file types and it's really snappy.
Re:Jetbrains founders turn billionaires without VC help by jcelerier on Saturday December 19, 2020 @01:57AM (#25475678)
I have an i7 6900k and 64 GB of ram. Indexing on the project I work on takes something like 3 hours. But I'm not even talking about that - just the basic user interaction, opening a menu, switching tabs... It's notslow but it drags its feet a bit.
Re:Jetbrains founders turn billionaires without VC help by dkarp on Friday December 18, 2020 @09:52AM (#25467614)
Absolutely agree. The amount of value that Jetbrains software provides far exceeds its price. Their existence is a net benefit to the whole software development field.
Re:Jetbrains founders turn billionaires without VC help by Jakobeha on Friday December 18, 2020 @04:16PM (#25472142)
I used to share the "Java is bad" mindset, but now I realize Java (at least the JVM) is actually really good.

The main issues people assume with Java are that it has slow runtime and it's verbose.

But the JVM is actually rather fast. Especially compared to JavaScript and Python, which aren't even compiled (and which I still agree with the "it's crap" hivemind). Anything that needs real performance you should be outsourcing to C/C++ FFI calls, and as long as you do that your Java app's performance should be OK. And a key cause of Java's big slowdown are checks e.g. for null-pointers and casts, which are much better than C++/Rust's approach of being unsafe-by-default.

Java is verbose, but JetBrain's awesome IDE single-handedly fixes this problem - writing POJOs and using long-named functions and classes is fast, and IntelliJ will hide excess boilerplate so that even reading code is easier. And if verbosity is still too much of an issue, there are JVM alternatives like Kotlin.

Re:Jetbrains founders turn billionaires without VC help by creata on Friday December 18, 2020 @06:14PM (#25473269)
> which are much better than C++/Rust's approach of being unsafe-by-default.

Nitpick: Rust is safer than Java by default. You can't ever dereference a null pointer (only raw pointers can be null, not references) or make a cast without dipping into unsafe code.

Re:Jetbrains founders turn billionaires without VC help by atsuzaki on Friday December 18, 2020 @06:26PM (#25473376)
Even though the specs says nothing about it, modern JavaScript is almost always JITted, i.e. V8 that powers Node and Chrome, the rest of the browser js engines
Re:Jetbrains founders turn billionaires without VC help by pie_flavor on Friday December 18, 2020 @08:20PM (#25474093)
Rust's approach of being unsafe-by-default? That's kind of the exact opposite of Rust.
Re:Jetbrains founders turn billionaires without VC help by globular-toast on Friday December 18, 2020 @09:42AM (#25467522)
Back in the 90s Java was slower and used a load more memory. But the competition was C/C++ apps with native GUIs. Nowadays with the likes of Electron as competition Java apps are fast with low memory usage.
Re:Jetbrains founders turn billionaires without VC help by gruez on Friday December 18, 2020 @11:25AM (#25468575)
>It’s amazing that their products are so performant on Java

It's a total memory hog though.

Re:Jetbrains founders turn billionaires without VC help by seanmcdirmid on Friday December 18, 2020 @12:38PM (#25469643)
And for those who weren't happy with Java, JetBrains also gave us Kotlin, which fixes many of Java's problems without overshooting into the FP space.
Re:Jetbrains founders turn billionaires without VC help by Geminidog on Saturday December 19, 2020 @01:20AM (#25475536)
Going a bit off tangent here:

A billion dollars is a ludicrous sum of money. No one on the face of the earth deserves that level wealth.

If you ever seen an actual billion dollar product or even a product hundreds of millions of dollars (in cost, not revenue generation) it is always built by hundreds of people. Your physical two hands, strength and intelligence limits you to a lifetime gdp output of well less than 1 billion. Therefore whenever you see a billionaire, the billionaire achieved his wealth off the backs of others.

A more fair distribution of wealth for jetbrains is one where the wealth is more evenly distributed among everyone who works at the company. There is a term for this... it's called communism/socialism and it has a set of downsides but I don't want to walk to far down that road.

Suffice to say capitalism works, but it works because it's not fair. No billionaire ever deserves to be a billionaire because he simply does not have the physical or mental ability to produce that much wealth. It always must be taken from the hard work of others.

Re:Jetbrains founders turn billionaires without VC help by Noumenon72 on Saturday December 19, 2020 @02:29AM (#25475810)
Ever played a video game like X3 where you can set up robot space traders to haul for you? You can only make $x flying between ports, but now you can make $5x or $10x. It's not that you're stealing from the robots, you're just making use of a resource that can be put to profitable use.

People are the same -- just another kind of resource, a black box that lets you make $5x. And the thing is, you deserve the $5x -- you took a system where nothing was being put to its best use, and now it is.

What I'm trying to say is I've worked on many projects that sucked because no one had the vision and hiring skills the IntelliJ people do, and if society could give someone a billion dollars to make every project work that well, it would be a good deal.