Skip to content
View jaeklim's full-sized avatar
  • Microsoft
  • Redmond, WA

Highlights

  • Pro

Block or report jaeklim

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Please don't include any personal information such as legal names or email addresses. Maximum 100 characters, markdown supported. This note will be visible to only you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
jaeklim/README.md
public class JaeLim extends Developer implements Dad, Golfer, YardWorker, Pilot {

  /**
   * Gets my children from SUPER secret storage.
   * 
   * @return A list of my children.
   */
  private static List<Child> getMyChildren() {
    return Arrays.asList(new Child(), new Child());
  }

  /**
   * Gets a list of programming languages that a developer can use.
   * 
   * @return A list of programming languages. Max 5 languages.
   */
  @Override
  public List<Language> getAvailableProgrammingLanguages() {
    return Arrays.asList(Language.Java, Language.CSharp, Language.ObjectiveC, Language.C, Language.Ruby);
  }

  /**
   * Gets a pilot license which is currently valid.
   * 
   * @return The current pilot license.
   */
  @Override
  public License getLicense() {
    return License.PrivatePilot;
  }

  /**
   * Gets a list of acquired ratings.
   * 
   * @return A list of acquired ratings.
   */
  @Override
  public List<Rating> getRatings() {
    return new ArrayList<>() {
      {
        add(Rating.Instrument);
      }
    };
  }

  /**
   * Works hard.
   */
  @Override
  public void work() {

    // Re-factor this method to be comparable at home office.
    super.work();
  }

  /**
   * Plays with the given children.
   * 
   * @param children A list of children.
   * @throws Exception An exception can be thrown when a dad didn't expect the
   *                   current situation.
   * @see <code>DadCapacityExceededException</code>,
   *      <code>DeadlockException</code>
   */
  @Override
  public synchronized void play(@NonNull List<Child> children) throws Exception {

    // Validation
    if (children.size() > 2) {
      throw new DadCapacityExceededException();
    }

    // ...

    // Verify result
    if (children.stream().anyMatch(child -> !child.didEnjoy())) {
      throw new DeadlockException();
    }
  }

  public static void main(String[] args) throws Exception {
    JaeLim myself = new JaeLim();
    Date today = new Date();

    Scheduler.scheduleGolf(myself, Collections.singletonList(Day.Saturday));

    if (Season.getCurrentSeason(today) == Season.Summer) {
      Scheduler.scheduleYardWorker(myself, Collections.singletonList(Day.Sunday),
          Arrays.asList(Lawn.Backyard, Lawn.Frontyard, Lawn.Shrubs));
    }

    myself.work();
    myself.play(getMyChildren());
  }
}

Popular repositories Loading

  1. jaeklim jaeklim Public

    Java