News for hackers. Stuff that matters.
Re:Generating a Java program with 90% less code by ehnto on Wednesday December 04, 2019 @12:13PM (#21704146)
Some might be surprised to know that in modern PHP this is also the case. The whole point of all the typing and structure is so you and the IDE can sanely reason about and understand the structure of the code.

If I get code and all of a sudden not even my IDE knows what's going on, it clues me in that there are layers of indirection in the codebase I'm going to have to waste time reading into, like magic methods or loose typing.

Re:Generating a Java program with 90% less code by rdevsrex on Wednesday December 04, 2019 @02:58PM (#21706275)
Yep, PHPStorm is a memory hog, but man is it handy in catching errors I didn’t think of.
Re:Generating a Java program with 90% less code by cosmotic on Wednesday December 04, 2019 @04:01PM (#21706920)
Is it really a memory hog? I'm using IDEA, PHPStorm's more fully featured Java IDE (That also loads PHP code!) ; I have 6 projects open right now, including a PHP project, some java projects, some ruby, groovy, etc; I have 20 files open, numerous plugins enabled, and all sorts of connections to databases and tests; it's been running for days it's using 500MB.

Both PHPStorm and IDEA are written in Java (they share a common code base). Don't confuse [Java eagerly allocating memory from the operating system but then not using it for anything (yet)] with java using a lot of memory. For speed, java allocates memory it anticipates using in the future. This lets it manage it's own memory without involving the operating system and thus context switches. If you start using a lot of other applications and available system memory starts running low; java will detect this and relinquish the pre-allocated memory it's not using.