Where can I find good code to read and learn.

Barclays PLC FAANGHNTER
Apr 6 22 Comments

JAVA Code base . Any specific repositories on GitHub that are very well written?

My target area is Webservices , Multithteading, Spring etc etc . Mostly monoliths.

comments

Want to comment? LOG IN or SIGN UP
TOP 22 Comments
  • Amazon / Eng AlexaSDEII
    I take it Barclays doesn’t have a good code base?
    Apr 6 4
    • Barclays PLC FAANGHNTER
      OP
      Not the best, at least not my department. Could have been done better. I also wish to rewrite some of our codebases.
      Apr 6
    • Ah yes the classic, this code is shit let's rewrite it from scratch. Tread carefully. Good read if you have some spare time: https://www.joelonsoftware.com/2000/04/06/things-you-should-never-do-part-i/

      I applaud the effort to learn how to write better code, but at the end of the day, the best code is code that serves the business need and exists.

      For Java specific, some good resources are "head first design patterns" and "effective Java" (disclaimer: I haven't finished or gotten very far in either) or if you're looking for more high level structure see if you can find a open source project that tries to do similar. I've found open source projects to high good code organization simply because it's necessary to allow so many collaborators (caveat, open source level quality is probably way overengineered for any project that only has a handful of engineers)

      Edit: also Google "<technology> boilerplate" e.g. "spring webservices boilerplate" for inspiration
      Apr 7
    • Bloomberg EVALSlayer
      I somewhat agree with the maxim “all code is shit”... Actually, I’m in the camp “most code is shit.”

      That link is just an opinion and nothing more. I’ve seen a ton of success stories in the opposite camp including a recent big one at work. A reasonably sized distributed and heavily multithreaded project was recently rewritten and it was a huge success. That being said, the OP clearly is not in the position to do that or lead that effort if he wants to learn from other codebases.

      If you have to now read and learn multithreading and don’t already see all the threads interacting in your head before writing a single line of code, then you won’t be ready for years to do that properly.
      Apr 7
    • That's fair yeah. I think with most things the right answer is in the middle. There's a time and place to rewrite things from scratch, I think the post is just erring caution that just because a codebase/project looks bad doesn't mean it is/needs rewrite (but it also doesn't mean that it for sure shouldn't be rewritten)
      Apr 7
  • BlackRock xis
    Read the Apache top level projects codebase.
    Apr 6 5
    • Barclays PLC FAANGHNTER
      OP
      Cassandra Airflow etc?
      Apr 6
    • BlackRock xis
      Sure if that’s most interesting to you.
      They have atleast 100, and 15-20 are extremely popular.
      Apr 6
    • Expedia hurr_durr
      Hard to find good Apache projects code wise. Most of them are over complicated and badly documented. Tread carefully.
      Apr 6
    • BlackRock xis
      Good code easily gets away with bad documentation. I am guessing you write a paragraph before every function, followed a statement saying “here follows one line of code’” .
      Apr 6
    • Expedia hurr_durr
      Not at all, but I am a frequent sufferer of Apache projects so speaking from experience
      Apr 6
  • Bloomberg EVALSlayer
    Point 1: If you have to now read and learn multithreading and don’t already see all the threads interacting in your head before writing a single line of code, then you won’t be ready for years to rewrite your company’s monoliths properly.

    Point 2: You need to read design documents and discuss design set ups with mentors, not read code for this.
    Apr 7 1
    • Barclays PLC FAANGHNTER
      OP
      I did not say I need to learn Multithteading, there are better ways of doing it than what I do.I will redesign my existing code and write specs for the modified design and I want it to be good. The existing base did not use Multithteading at all but it should
      It's an old codebase and requirements were different then.
      Apr 7
  • Google / Eng jwwwwww
    Cassandra
    Apr 7 0
  • EA / Eng activision
    Square, Kickstarter
    Apr 7 0
  • Microsoft sendAsync
    How about openjdk?
    Apr 7 0
  • Amazon 8jah
    Spring core framework src
    Apr 7 0
  • Amazon ;&;&$:5$4&
    Netty JodaTime
    Apr 6 0
  • Clever Devices / Eng nzbU08
    Check out FizzBuzz enterprise edition
    Apr 6 0
  • Google lumpi
    The stack sounds so bank-y
    Apr 6 1
    • Barclays PLC FAANGHNTER
      OP
      Yeah what's the googlyness score of this stack ? Care to cite some good GitHub repos for me to read?
      Apr 6
  • Amazon / Data
    iamsrk

    Amazon Data

    PRE
    Amazon
    iamsrkmore
    Anything similar for python?
    Apr 7 0