Giter VIP home page Giter VIP logo

cal's Introduction

First Back-End Capstone: Ruby Calendar

#Objectives

  • Practice with Arrays, Hashes, and Strings
  • Develop the logic of a non-trivial algorithm
  • Programming to meet a (changing) specification

#Requirements

  • Your program must have tests. These test may be as high-level (integration tests) or as low-level (unit tests) as you wish. I highly recommend a mix of tests.
  • You may not use any of the built-in Ruby classes that provide date, time, or calendar functionality.
  • You may not use exec, Kernel, etc. to shell out to any Unix programs.
  • You should not use "magic" numbers.
  • You must commit your code at least once per day and push it to your github repository.
  • As a capstone project for the basic Ruby portion of the course, this should demonstrate your skills. Do not share code with your peers. Youcan help each other think about the problems, but don't help each other code.
  • Your program should accept any combination of months and years between 1800 and 3000.

#Suggested Implementation Order

You will find this (and all future) programming projects much easier if you take the time to break it down into smaller parts. I will suggest a breakdown that works well for me:

  1. Implement Zeller's Congruence, with test for all of the special types of months/years.
  2. Implement printing a month where the first day of the month is on a Sunday. For example, January 2012. This is the easiest type of month to print and can be thought of as a base case. For this, you can temporarily hardcode the assumption that the month will start on Sunday. Of course, you will use tests for this!
  3. Combine the powers of your Zeller's Congruence (which will tell you the real first day of the month) with your basic month printing from step 2. Test the hell out of this!
  4. After you feel good about that and have had your first milestone reviewed, combine the ability to print each individual month, to allow you to print an entire year. Hint: This is all about combining strings!

#Resources:

Wikipedia articles that may be of use:

cal's People

Contributors

matthewreuther avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.