<commit_before><!DOCTYPE html>

<html>
<head>
      <title><NAME> - Web Dev</title>
      <meta charset="UTF-8">
      <link rel="stylesheet" type="text/css" href="../stylesheets/stylesheet.css"><!--In the CSS challenge you will need to link to the CSS stylesheet.
  The link has been left blank for now -->

</head>
<body>
  <header>
    <div id="header-logo">
      <h1><NAME></h1>
      <h2>WEB DEVELOPER</h2>
    </div>
    <nav>
      <ul>
        <li class="button"><a href="../index.html">HOME</a></li>
        <li class="button"><a href="../myprojects.html">MY PROJECTS</a></li>
        <li class="button"><a href="index.html">BLOG</a></li>
        <li class="button"><a href="../aboutme.html">ABOUT ME</a></li>
        <li class="button"><a href="../connect.html">CONNECT</a></li>
      </ul>
    </nav>
  </header>
  <main>
  <h1>Classes</h1>
  <h2>When, Why and How</h2>
  <h4>04-14-15</h4>

  <section>
    <p>When programming, there are many ways to get the outcome you want. It's simple when you want your program to do a very small task that doesn't require more than using a built-in class for that language. With Object Oriented Proframming(OOP), you have the ability to create programs that are quite extensive and can carry out many different programs for different scenarios. </p>
    <p>When coding using the built in Classes, you can sometimes share the methods from other Classes in the one you are currently working with. This is fine. But as the program becomes more and more complex, with many developers working on it, it may be much more useful to work with new Classes that have not only Semantic meaning but can also have methods created for use within just that Class. This prevents future bugs from occuring because a method for one Class was used improperly and is now casuing havoc on the rest of your program.</p>
    <p>Code becomes more maintainable. This is because objects are self contained within each Class. The reusability of ojects becomes important. A Class used in one program can be ported to another program if they are to be used in a similar fashion. Your programs are also easily scaled as the Classes can be updated to contain new algorithms and newer technology. </p>
    <p>Classes keep order within your program. If you want items to be within a certain family, you can create a Class to rule them. Create methods for them and only them. </p>

    <code><pre>
    class Ball
      attr_accessor :size, :sport, :color
      def initialize(size, sport, color)
        @size = size
        @sport = sport
        @color = color
      end
      def which_sport
        puts "The sport you can play with this is #{@sport}"
      end
      def what_size
        puts "The size of this ball is #{@size}"
      end
      def what_color
        puts "The color of this ball is #{@color}"
      end
    end</pre>
    </code>

    <p>Classes are created using the class keyword. As you can see, this Class if for all manner of balls for various sports. You can then initialize the Class with any attributes you like. Then define specific methods for only your Class. These methods are called Instance Methods. You can also create Instance variables. This variables can only be used within this Class. They cannot be accessed by any objects in any other Class and so it is protected by manipulation from elsewhere in the program.</p>

      <!-- copy and paste as many sections as you want to add paragraphs -->
  </section>
</main>
</body>
<footer>
  <div id="social-media">
    <a href="https://github.com/hukashi"><img src="../imgs/github-icon.png" alt="Github"></a>
    <a href="https://twitter.com/HuKaShI"><img src="../imgs/twitter-icon.png" alt="Twitter"></a>
    <a href="https://www.facebook.com/jonathan.chung.116"><img src="../imgs/facebook-icon.png" alt="Facebook"></a>
  </div>
</footer>
</html><commit_msg>change style for t6 blog post<commit_after><!DOCTYPE html>

<html>
  <head>
    <title><NAME> - Web Dev</title>
    <meta charset="UTF-8">
    <link rel="stylesheet" type="text/css" href="../css/bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="../css/main.css">
    <script src="//code.jquery.com/jquery-1.11.3.min.js"></script>
    <script src="../js/bootstrap.js"></script>
  </head>
  <body>
    <div class="navbar navbar-default navbar-fixed-top">
    <div class="container">
      <div class="navbar-header">
        <a href="../index.html" class='navbar-brand'><NAME></a>
        <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#jonathan">
          <span class="sr-only">Toggle Navigation</span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
        </button>
      </div>
      <ul class="nav navbar-nav navbar-right collapse navbar-collapse" id="jonathan">
        <li><a href="../blog/index.html">BLOG POSTS</a></li>
      </ul>
    </div>
  </div>
  <div class="container">
    <div class="row">
      <div class="col-md-12">
        <h3 class="text-center well">Classes</h2>
        <h4 class="text-center">04-14-15</h4>
      </div>
      <div class="col-md-12">
        <p>When programming, there are many ways to get the outcome you want. It's simple when you want your program to do a very small task that doesn't require more than using a built-in class for that language. With Object Oriented Proframming(OOP), you have the ability to create programs that are quite extensive and can carry out many different programs for different scenarios. </p>
        <p>When coding using the built in Classes, you can sometimes share the methods from other Classes in the one you are currently working with. This is fine. But as the program becomes more and more complex, with many developers working on it, it may be much more useful to work with new Classes that have not only Semantic meaning but can also have methods created for use within just that Class. This prevents future bugs from occuring because a method for one Class was used improperly and is now casuing havoc on the rest of your program.</p>
        <p>Code becomes more maintainable. This is because objects are self contained within each Class. The reusability of ojects becomes important. A Class used in one program can be ported to another program if they are to be used in a similar fashion. Your programs are also easily scaled as the Classes can be updated to contain new algorithms and newer technology. </p>
        <p>Classes keep order within your program. If you want items to be within a certain family, you can create a Class to rule them. Create methods for them and only them. </p>
        <code><pre>
        class Ball
          attr_accessor :size, :sport, :color
          def initialize(size, sport, color)
            @size = size
            @sport = sport
            @color = color
          end
          def which_sport
            puts "The sport you can play with this is #{@sport}"
          end
          def what_size
            puts "The size of this ball is #{@size}"
          end
          def what_color
            puts "The color of this ball is #{@color}"
          end
        end</pre>
        </code>
        <p>Classes are created using the class keyword. As you can see, this Class if for all manner of balls for various sports. You can then initialize the Class with any attributes you like. Then define specific methods for only your Class. These methods are called Instance Methods. You can also create Instance variables. This variables can only be used within this Class. They cannot be accessed by any objects in any other Class and so it is protected by manipulation from elsewhere in the program.</p>
      </div>
      <div class="col-md-12">
        <a href="../blog/index.html" class="btn btn-link pull-right">Return to Blog List</a>
      </div>
    </div>
  </div>
  <div class="footer">
      <div class="navbar navbar-inverse navbar-fixed-bottom">
          <div class="row">
            <div class="col-sm-6">
              <div class="navbar-text">
                <p>Site built by <NAME> using <a href="http://www.getbootstrap.com" target="_blank">Bootstrap v3.3.5</a>
                </p>
              </div>
            </div>
            <div class="col-sm-6">
              <div class="navbar-text pull-right">
                <a href="mailto:<EMAIL>">
                <img src="../imgs/email.png" alt="Email">
                </a>
                <a href="https://twitter.com/hukashi" target="_blank">
                <img src="../imgs/twitter.png" alt="Twitter">
                </a>
                <a href="https://github.com/hukashi" target="_blank">
                <img src="../imgs/github.png" alt="Github">
                </a>
                <a href="https://plus.google.com/u/0/101325203228366048733/about" target="_blank">
                <img src="../imgs/googleplus.png" alt="Google Plus">
                </a>
                 <a href="https://www.linkedin.com/in/jonathanechung" target="_blank">
                <img src="../imgs/linkedin.png" alt="Twitter">
                </a>
              </div>
            </div>
          </div>
        </div>
      </div>
  </body>
</html>
    <!-- <div class="cheat">
      <h1>Cheat Sheets</h1>
      <ul>
        <li><a href="cheat-sheet-html5.html">HTML5</a></li>
      </ul>
    </div> -->
{'fraction_non_alphanumeric': 0.12031516183986371, 'fraction_numerical': 0.007772572402044293, 'mean_word_length': 2.593343534812548, 'pattern_counts': {'":': 0, '<': 205, '<?xml version=': 0, '>': 205, 'https://': 7, 'lorem ipsum': 0, 'www.': 3, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7428146', 'n_tokens_mistral': 2695, 'n_tokens_neox': 2609, 'n_words': 1070}