Skip to content

Commit

Permalink
Separated Pages, Setup for Templating.
Browse files Browse the repository at this point in the history
  • Loading branch information
atsansone committed Oct 17, 2012
1 parent a64086d commit 7ff6eb3
Show file tree
Hide file tree
Showing 4 changed files with 447 additions and 154 deletions.
115 changes: 115 additions & 0 deletions ruby/alreadyknow.html
@@ -0,0 +1,115 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Ruby: Introduction</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<!--Brief page description:-->
<meta name="description" content="">
<!--Name(s) of primary authors-->
<meta name="author" content="">

<!--Styles-->
<link href="/assets/css/bootstrap.css" rel="stylesheet">
<link href="/assets/css/bootstrap-responsive.css" rel="stylesheet">
<link href="/assets/css/prettify.css" rel="stylesheet">

<!--Custom styles-->
<link href="/assets/css/custom.css" rel="stylesheet">

<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->

</head>

<body>

<div class="navbar navbar-inverse navbar-fixed-top">
<div class="navbar-inner">
<div class="container-fluid">
<a class="brand" href="/">Bootcamp</a>
<ul class="nav">
<li><a href="/cli/">CLI</a></li>
<li><a href="/git/">Git</a></li>
<li><a href="/md/">Markdown</a></li>
<li><a href="/html/">HTML</a></li>
<li><a href="/css/">CSS</a></li>
<li><a href="/js/">Javascript</a></li>
<li class="active"><a href="/ruby/">Ruby</a></li>
</ul>
</div>
</div>
</div>

<header id="page-header" class="">
<div class="container-fluid hero-unit ruby-header">
<h1>Ruby</h1>
<p>Programming Made Easier</p>
</div>
</header>

<div class="container-fluid">

<div class="row-fluid">
<div class="span3 bs-docs-sidebar">
<ul class="nav nav-list bs-docs-sidenav">
<li><a href="index.html"><i class="icon-chevron-right"></i> Why Program?</a></li>
<li><a href="alreadyknow.html"><i class="icon-chevron-right"></i> What Should I Already Know?</a></li>
<li><a href="tolearn.html"><i class="icon-chevron-right"></i> What Should I Learn?</a></li>
<li><a href="whyruby.html"><i class="icon-chevron-right"></i> Why Ruby?</a></li>
<li><a href="#doing"><i class="icon-chevron-right"></i> Doing Something</a></li>
<li><a href="#methods"><i class="icon-chevron-right"></i> Methods</a></li>
<li><a href="#vars"><i class="icon-chevron-right"></i> Variables</a></li>
<li><a href="#"><i class="icon-chevron-right"></i> </a></li>
</ul>
</div>

<div class="span9">

<article id="know">
<header class="page-header">
<h2>What Should I Already Know?</h2>
</header>
<section>
<p>This section assumes that you know:</p>
<ul>
<li>How to use a text editor</li>
<li>How to use the Linux command line</li>
<li>How to use Git</li>
<li>How to read <a href="/html/">HTML</a></li>
</ul>
</section>
<footer>
<ul class="pager">
<li><a href="index.html">Previous</a></li>
<li><a href="tolearn.html">Next</a></li>
</ul>
<h5>Progress in This Tutorial</h5>
<div class="progress progress-striped">
<div class="bar" style="width: 10%;"></div>
</div>
</footer>
</article>

</div><!--/.span9 -->

</div><!--/.row-fluid -->
<footer id="page-footer">
<p>Written and designed by Anthony T. Sansone. &copy;2012. Licensed under Creative Commons</p>
</footer>

</div><!--/.container-fluid-->

<!-- JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="/assets/js/jquery.js"></script>
<script src="/assets/js/bootstrap.min.js"></script>
<script src="/assets/js/prettify/prettify.js"></script>

</body>
</html>

215 changes: 61 additions & 154 deletions ruby/index.html
Expand Up @@ -29,175 +29,82 @@

<div class="navbar navbar-inverse navbar-fixed-top">
<div class="navbar-inner">
<div class="container-fluid">
<a class="brand" href="/">PreReq</a>
<ul class="nav">
<li><a href="/cli/">CLI</a></li>
<li><a href="/git/">Git</a></li>
<li><a href="/md/">Markdown</a></li>
<li><a href="/html/">HTML</a></li>
<li><a href="/css/">CSS</a></li>
<li><a href="/js/">Javascript</a></li>
<li class="active"><a href="/ruby/">Ruby</a></li>
</ul>

<div class="container-fluid">
<a class="brand" href="/">Bootcamp</a>
<ul class="nav">
<li><a href="/cli/">CLI</a></li>
<li><a href="/git/">Git</a></li>
<li><a href="/md/">Markdown</a></li>
<li><a href="/html/">HTML</a></li>
<li><a href="/css/">CSS</a></li>
<li><a href="/js/">Javascript</a></li>
<li class="active"><a href="/ruby/">Ruby</a></li>
</ul>
</div>
</div>
</div>

<header id="page-header" class="">
<div class="container-fluid hero-unit ruby-header">
<h1>Ruby</h1>
<p>Programming Made Easier</p>
</div>
</header>

<div class="container-fluid">

<div class="row-fluid">
<div class="span3 bs-docs-sidebar">
<ul class="nav nav-list bs-docs-sidenav">
<li><a href="index.html"><i class="icon-chevron-right"></i> Why Program?</a></li>
<li><a href="alreadyknow.html"><i class="icon-chevron-right"></i> What Should I Already Know?</a></li>
<li><a href="tolearn.html"><i class="icon-chevron-right"></i> What Should I Learn?</a></li>
<li><a href="whyruby.html"><i class="icon-chevron-right"></i> Why Ruby?</a></li>
<li><a href="#doing"><i class="icon-chevron-right"></i> Doing Something</a></li>
<li><a href="#methods"><i class="icon-chevron-right"></i> Methods</a></li>
<li><a href="#vars"><i class="icon-chevron-right"></i> Variables</a></li>
<li><a href="#"><i class="icon-chevron-right"></i> </a></li>
</ul>
</div>

<header id="page-header" class="">
<div class="container-fluid hero-unit ruby-header">
<h1>Ruby</h1>
<p>Programming Made Easier</p>
</div>
</header>

<div class="container-fluid">

<div class="row-fluid">
<div class="span3 bs-docs-sidebar">
<ul class="nav nav-list bs-docs-sidenav">
<li><a href="#intro"><i class="icon-chevron-right"></i> Why Program?</a></li>
<li><a href="#know"><i class="icon-chevron-right"></i> What Should I Already Know?</a></li>
<li><a href="#tolearn"><i class="icon-chevron-right"></i> What Should I Learn?</a></li>
<li><a href="#whyruby"><i class="icon-chevron-right"></i> Why Ruby?</a></li>
<li><a href="#doing"><i class="icon-chevron-right"></i> Doing Something</a></li>
<li><a href="#methods"><i class="icon-chevron-right"></i> Methods</a></li>
<li><a href="#vars"><i class="icon-chevron-right"></i> Variables</a></li>
<li><a href="#"><i class="icon-chevron-right"></i> </a></li>
</ul>
</div>

<div class="span9">

<article id="intro">
<header class="page-header">
<h2>Why Program?</h2>
</header>
<section>

<p>Most programming guides just jump into the language, but don't get into why someone would want to make their own program. With all of the commercial software available, why would anyone want to create their own?</p>

<p>If you want to build a piece of furniture or repair a leaky faucet, you need the right tool. You wouldn't use a hammer when assembling a chair if all it came with were screws; you wouldn't try to tighten a pipe joint with a screwdriver. Even if you have a screwdriver or wrench, is it the proper screwdriver or the proper wrench? What if you could create the exact tool you needed when you needed it?</p>

<p>We do. Programs are tools. They create or change data.</p>

<p>Why program? So you can make the exact tool you need to work with your data. If you want to merge ten files into one, you can write a program to do it. If you want to change a comma-separated text file into an HTML table, you can write a program to do it.</p>

<p>Let's get to it.</p>

</section>
<footer>
</footer>
</article>

<article id="know">
<header class="page-header">
<h2>What Should I Already Know?</h2>
</header>
<section>
<p>This section assumes that you know:</p>
<ul>
<li>How to use a text editor</li>
<li>How to use the Linux command line</li>
<li>How to use Git</li>
<li>How to read <a href="/html/">HTML</a></li>
</ul>
</section>
<footer>
</footer>
</article>

<article id="tolearn">
<header class="page-header">
<h2>What Should I Learn?</h2>
</header>
<section>
<p>After completing this section, you should understand how to:</p>
<ul>
<li>Read Ruby code</li>
<li>Understand general programming terms</li>
<li>Identify operators, variables, arrays, hashes, methods, objects, classes, modules, symbols</li>
<li>Create variables, arrays and hashes and assign values to them</li>
<li>Create methods</li>
<li>Create classes and objects</li>
<li>Create symbols</li>
<li>Error check your program</li>
</ul>
</article>
</section>
<footer>
</footer>


<article id="whyruby">
<header class="page-header">
<h2>Why Ruby?</h2>
</header>
<section>
<p>There are many programming languages available to a new programmer. Some you may know: Java, C and Javascript. Some you may not know: Haskell, Lisp or SmallTalk.</p>

<p>Ruby is flexible, popular, easy to code and free.</p>

<h3>Flexible</h3>

<p>Ruby can be used for most anything: web applications, system utilities or even games. It is not made to only do one thing.</p>

<p>Any programmer can also alter Ruby. If needed functionality does not exist in Ruby, the programmer can add it.</p>

<h3>Popular</h3>

<p>Ruby is one of the top ten most used programming languages. Ruby on Rails, introduced in 2003, allows for rapid development of web applications. Many well known sites use Rails: Groupon, LinkedIn, GitHub, Hulu, Basecamp, Penny Arcade and others.</p>

<p>Ruby's popularity stems from its ease of use and comprehension.</p>

<h3>Easy to Read and Code</h3>

<p>Ruby is written to appear as close to English as possible. It does not add more to the language to do something simple.</p>

<p>If you want to have your computer show "Hello world!" on the screen, you would need to do the following...</p>

<h4>In Java</h4>

<pre>
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello world!");
}
}
</pre>

<p>Translated, this says: Create a block of code that anyone can use to show "Hello world!". In this block, there is a block of code, a function, that runs by default, called "main", whenever someone tries to use HelloWorld. This function does not require additional information. This function runs a command, called a method, that prints a line of text ("Hello world!") out to the system (System.out.println). <i>Whew.</i></p>

<h4>In Ruby</h4>
<div class="span9">

<pre>
puts "Hello world!"
</pre>
<article id="intro">
<header class="page-header">
<h2>Why Program?</h2>
</header>
<section>

<p>This says put "Hello world!" on the screen.</p>
<p>Most programming guides just jump into the language, but don't get into why someone would want to make their own program. With all of the commercial software available, why would anyone want to create their own?</p>

<p>Which language would you rather learn?</p>
<p>If you want to build a piece of furniture or repair a leaky faucet, you need the right tool. You wouldn't use a hammer when assembling a chair if all it came with were screws; you wouldn't try to tighten a pipe joint with a screwdriver. Even if you have a screwdriver or wrench, is it the proper screwdriver or the proper wrench? What if you could create the exact tool you needed when you needed it?</p>

<h3>Free</h3>
<p>We do. Programs are tools. They create or change data.</p>

<p>Ruby can be downloaded and installed at no cost. All you need to program with it is a text editor; no specialized programs are required.</p>
<p>Why program? So you can make the exact tool you need to work with your data. If you want to merge ten files into one, you can write a program to do it. If you want to change a comma-separated text file into an HTML table, you can write a program to do it.</p>

</section>
<footer>
</footer>
</article>
<p>Let's get to it.</p>

</section>
<footer>
<ul class="pager">
<li><a href="alreadyknow.html">Next</a></li>
</ul>
<h5>Progress in This Tutorial</h5>
<div class="progress progress-striped">
<div class="bar" style="width: 5%;"></div>
</div>
</footer>
</article>

</div>
</div><!--/.span9 -->

</div>
<footer id="page-footer">
<p>Written and designed by Anthony T. Sansone. &copy;2012. Licensed under Creative Commons</p>
</footer>
</div><!--/.row-fluid -->
<footer id="page-footer">
<p>Written and designed by Anthony T. Sansone. &copy;2012. Licensed under Creative Commons</p>
</footer>

</div><!--/.container-fluid-->
</div><!--/.container-fluid-->

<!-- JavaScript
================================================== -->
Expand Down

0 comments on commit 7ff6eb3

Please sign in to comment.