Hacker News new | past | comments | ask | show | jobs | submit login

An amusing combination of titles:

In Search of Concise Software

Git Breezily Handles our 500,000-line Enterprise Java Project




500,000 lines may be extremely concise for what it does :/


I wonder what that 500,000 lines buys them.


I am also not sure why it matters - we switched 3,000,000+ lines of code from subversion to git, but the effort was not really correlated with LOC. The major overhead of switching from subversion to git is the learning hit on the developers (though it is certainly worth it for many of the reasons described in the OP).


200,000 getters and setters.


I'm not convinced language snobbery is something to be encouraged personally :/ If it was lisp it'd be 200,000 lines of parenthesis, if it were python it'd be 200,000 of significant whitespace, perl? 200,000 of random punctuation characters etc etc.

It's not the language, it's what you do with it that counts. If someone is writing countless getters and setters, in any language, they're clearly doing something terribly wrong.

my 2c.


Sure, but at the same time all languages were not created equal. Some are better designed and more powerful than others. They're not all just equally great at different things and let's sing "Kum ba yah" together now.


> 200,000 of significant whitespace

Significant whitespace does not occupy its own lines in Python.


Java doesn't require getters and setters :/


Does there exist even a single non-trivial Java project that does not have loads and loads of them?


Umm yes. Most of them. FWIW, Mibbit/Comet server etc is about 30k lines of java, and the number of 'getter/setters' is probably < 10.


But has anyone fixed this in Java yet, or does every large app still consist of thousands of nearly-identical methods?

Things like parentheses and whitespace don't affect the ongoing maintenance of your codebase; a bunch of code that your IDE typed for you does.


Using your IDE to type code for you is the problem. Not Java. Place the blame where it should be. If a programmer is foolish enough to use an IDE to generate code, and doesn't mind if it's near identical rubbish, then it's not the languages fault anymore.


So could you explain the "right way". I'm not a Java programmer, and googling did not reveal any way to generate accessors other than inserting code in your source file.

An explanation of how you do it would be very valuable, at least to me.


I think it's called inheritance, but most programmers try to stay away from that because of the headaches of the diamond problem.


If it was lisp it'd be 200,000 lines of parenthesis, if it were python it'd be 200,000 of significant whitespace, perl? 200,000 of random punctuation

How do you know this?


In a comparably sized codebase at my job, there's connectors to this and that idiosyncratic/complex external system (some of which require for example extinct dialects of SOAP), there's legacy cruft, there's systems that draw together multiple providers and present a unified interface, or that distribute commands to the proper subsystem, and there's a ton of reports and front ends and back ends for multiple years of customers, which get remixed and reused.


500,000 lines isn't a lot of code. The compiler I work on has almost that many lines, but the larger product (IDE) has many millions.


"500,000 lines isn't a lot of code."

in Java. Not to spawn any language wars, but imagine 500,000 "lines" in something like J, FORTH or even Factor.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: