<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>The Dennis Race &#124; Learning Front-End Foolery</title>
	<atom:link href="http://thedennisrace.com/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://thedennisrace.com</link>
	<description>Keep Learning - Keep Coding</description>
	<lastBuildDate>Tue, 28 Feb 2012 20:40:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Reds Starting Rotation</title>
		<link>http://thedennisrace.com/?p=875&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=reds-starting-rotation</link>
		<comments>http://thedennisrace.com/?p=875#comments</comments>
		<pubDate>Tue, 28 Feb 2012 20:40:43 +0000</pubDate>
		<dc:creator>Dino</dc:creator>
				<category><![CDATA[Cincinnati Reds]]></category>
		<category><![CDATA[Aroldis Chapman]]></category>
		<category><![CDATA[Bronson Arroyo]]></category>
		<category><![CDATA[Homer Bailey]]></category>
		<category><![CDATA[Johnny Cueto]]></category>
		<category><![CDATA[Mat Latos]]></category>
		<category><![CDATA[Mike Leake]]></category>

		<guid isPermaLink="false">http://thedennisrace.com/?p=875</guid>
		<description><![CDATA[Disappointment in 2011 The 2011 starting pitchers of the Cincinnati Reds did not excel the way everyone thought they would have.  Due primarily to injuries, and early they came.  At the beginning of last year&#8217;s season, Homer Bailey and Johnny Cueto were on the DL and again later  in the year.  Cueto missed the first 5 [...]]]></description>
			<content:encoded><![CDATA[<h4>Disappointment in 2011</h4>
<p>The 2011 starting pitchers of the <strong>Cincinnati Reds</strong> did not excel the way everyone thought they would have.  Due primarily to injuries, and early they came.  At the beginning of last year&#8217;s season, Homer Bailey and Johnny Cueto were on the DL and again later  in the year.  Cueto missed the first 5 weeks of the season and was knocked out my another injury in mid-September missing the rest of the season.  I believe if those two were to stay healthy and the offense came alive more often than they did we could have seen October ball in Cincinnati again.  With the new addition to the starting rotations (Mat Latos) and more dedicated players, I believe <strong>WE WILL</strong> see October ball in Cincinnati.  Along with that, they will need to stay healthy throughout the season and the offense needs to perform more on a consistent level.</p>
<h4>Six guys, Five spots</h4>
<p>When it comes to the decision of the opening day starter there shouldn&#8217;t be a mystery to that question.  <strong>Johnny Cueto </strong>had the best season last year of the team.  Some of the numbers may not show it, but his season was shorter than the Reds wanted.  When it comes to choosing the number one starter in the rotation you have to think about the ERA.  When it comes to ERA, Cueto would have won that title last year but he was a few innings short of qualifying for it.  You want to match up the pitcher will the best ERA with the opponents best ERA pitcher.  So it&#8217;s a no brainier picking Cueto for the opening day starter.  Cueto went 2.31 ERA with a record of 9 &#8211; 5.  He pitched just 156 innings with 47 walks and 104 strikeouts.  Also he only gave up an impressive 8 home-runs.  Cueto has excellent stuff and with that his goal is to start 30 games and pitch 200 innings, but he knows that the key to that is staying healthy.  If he can stay healthy, Cueto could reach both goals. He adjusted his delivery early last season, and got more groundball outs while using less pitches.  &#8221;I want to go maybe 30 starts,&#8221; Cueto said. &#8220;That would mean I am throwing strong.&#8221;</p>
<p>If you were to judge how good <strong>Mat Latos</strong> is just based on who all the <strong>Reds</strong> gave up for him, well, he better be pretty good.  Walt Jocketty sent top prospects Yonder Alonso, Brad Boxberger and Yasmani Grandal along with starter <a title="Stats" href="http://sandiego.padres.mlb.com/team/player.jsp?player_id=" target="_blank">Edinson Volquez</a> to the Padres for starting pitcher <a title="Stats" href="http://reds.mlb.com/team/player.jsp?player_id=502009" target="_blank">Mat Latos</a>.  Latos is thought to be expected to be the number 2 starter behind Cueto with the future potential of becoming the Reds Ace.  Last year Latos went 9-14 with an ERA of 3.47.  But the stat that I like most is the 31 games started.  Even though Latos is young, those 31 games shows me that he knows how to stay healthy.  And healthy starting pitching is what the Reds need to win the division this year.  Also, Latos allowed a respectable 16 homeruns and striking out 185 batters while walking 62.  Being a young 25 years old this year, Latos has a top of the rotation arm and the potential to be an ace.  To me, this is the one two punch the Reds have been looking for.</p>
<p>Following the one two punch of Cueto and Latos, the Reds have <strong>Bronson Arroyo</strong>.  Arriving during Spring Training in 2006 from the Red Sox in a <strong>lopsided trade</strong> for Wily Mo Pena, Arroyo is the <em>longest tenured member of the Reds</em>. He is also signed through the 2013 season as part of a three-year, $35 million extension that he signed in December of 2010.  Arroyo had a rough season last year posting a 9-12 record with an ERA of 5.07.  He gave up a league worst of 46 homeruns while walking 45 and striking out 108.  Again, one stat that I like to see is that you started 32 games last year.  Arroyo is 35 years old has no plans of slowing down.  He has changed and retooled his entire workout program in the offseason.  He worked on his legs and lower back along with the flexibility around the hip area.  He has realized that in order to keep his fast ball down and the breaking balls accurate, his legs and back  need to be stronger and last throughout the entire season.  He says that he has never felt so anxious to get back onto the field.  His goal is to become a 15 game winner again and pitching 200 innings in doing so.  On the annual perspective, Arroyo has be very consistent but hasn&#8217;t always had a pretty record to show.  Besides last year, (199 innings) Arroyo has pitched 200+ innings for the past 6 years and in the years of 2008 thru 2010 has won 15 games with 17 wins coming in 2010 when the Reds won their division.  Arroyo doesn&#8217;t want to be the guy or just <em>vanishes</em> and has everyone asking, &#8216;what ever about to that guy&#8217;.</p>
<p>To me, I think the the first three spots of the starting rotation belong to Cueto, Latos and Arroyo.  There are three more pitchers competing for the final two spots.  Those pitchers are <strong>Aroldis Chapman, Mike Leake, and Homer Bailey</strong>.  Even though he has a 105mph fastball, <strong>Chapman</strong> has yet to prove himself to the Reds as a starter.  He was suppose to be tested in winter ball but shoulder issues put a stop to that and he was told not to throw until spring training.  Last year he was used as a set-up man posting a 4-1 record along with a 3.60 ERA in 54 games.  In those 54 games in pitched 50 innings allowing 41 walks and 71 strike outs.  Towards the end of the year last year Chapman began to show some control issues and was sent on the DL and rehabbed in the minors.  Within a month after his return, Chapman retired 30 of 31 batters over a stretch of nine appearances.  Starter or Reliever?  Well, for Chapman he is mentally and physically preparing himself to be a starter.  Only time will tell.  With the Reds happy with the five starters they have now, I feel Chapman will start the year in the minors as a starting pitcher to get the innings in.</p>
<p>A heavier (by 15lbs in a good way) <strong>Homer Bailey</strong> is determined to help the Reds win the division by staying healthy.  He met with a nutritionist and continued his winter workouts to reach is goal of getting stronger and lasting through the entire year.  He has spent more time with weights than he has with throwing.  He is taking his throwing a lot slower this year and focusing on his health.  He started the season last year on the DL and eventually made it back by the middle of the year.  <em>&#8220;Obviously he has good enough stuff to win 12 games in his sleep if he stays healthy&#8221;</em>, Bronson Arroyo says.  So, the key for Bailey making the starting rotation is staying healthy.</p>
<p>With a strong second half of the season, <strong>Mike Leake</strong> is probably more of a shoe-in for the fourth spot than having to compete for it.  With a 12-9 record and an ERA of 3.86, Leake is flying under the radar.  He started 26 games playing in 29 and pitching 167 innings giving up 23 homeruns and 38 walks along with striking out 118.  With the talk of the winter being mostly about the organization of the Reds and the moves the office has made, I feel Leake has flown under the radar.  He very well has the chance to become one the of stand out pitchers for the Reds this year.  In just 26 starts he lead the team in wins with 12.</p>
<h4>Key to Winning</h4>
<p>If the Reds get 30+ starts and 15+ wins out of at least 3 starters and the other two give quality starts with around 8-10 wins, the Reds will be in the playoffs.  The key to that though is for the pitching staff to stay healthy throughout the season.  With Chapman being a question mark as far as a starter or reliever goes, he is very well capable of being in the bullpen as well.  That is not out of the question.  Respectable outings of  6 or 7 innings from the starters will allow the bullpen to be well rested throughout the season.  Healthy starters with long outings will allow the bullpen to be rested and ready to go which will lead to another Championship in 2012.  <strong>Go Red Legs! </strong></p>
]]></content:encoded>
			<wfw:commentRss>http://thedennisrace.com/?feed=rss2&#038;p=875</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Defining and Calling Functions</title>
		<link>http://thedennisrace.com/?p=853&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=defining-and-calling-functions</link>
		<comments>http://thedennisrace.com/?p=853#comments</comments>
		<pubDate>Mon, 27 Feb 2012 14:29:49 +0000</pubDate>
		<dc:creator>Dino</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[functions]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[scope]]></category>

		<guid isPermaLink="false">http://thedennisrace.com/?p=853</guid>
		<description><![CDATA[What is a Function? A function is a piece of reusable code that performs a common task.  Functions are one of the fundamental building blocks of JavaScript.  A function is a JavaScript procedure, a set of statements that perform a task or calculates a value.   Functions allow you to make JavaScript code more efficient and reusable.  Functions [...]]]></description>
			<content:encoded><![CDATA[<p><strong>What is a Function?</strong></p>
<p>A <strong>function</strong> is a piece of reusable code that performs a common task.  Functions are one of the fundamental building blocks of JavaScript.  A<strong> function</strong> is a JavaScript procedure, a set of statements that perform a task or calculates a value.   Functions allow you to make JavaScript code more efficient and reusable.  Functions are task-oriented, good at code organization, and excellent problem solvers.</p>
<h4>Defining a Function</h4>
<p>When it comes to creating a function, there is a consistent  syntax that you must follow that ties the name of the function with the code that it runs.  The syntax that is following is the most basic <strong>JavaScript</strong> function:</p>
<pre>function <strong>+ </strong>name <strong>+</strong> () <strong>+ </strong> {
   <em>Body</em>
}</pre>
<p>You start a function with the keyword, <strong>function</strong>.  Following the keyword of function is an <strong>identifier</strong> that uses <em>lowerCamelCase</em>.  Meaning the first word is in lower case, the second words&#8217; first letter will be in upper case and the rest in lower case, and the same goes for the third word and so on.  Also there is no spaces in between the words.  Next is the set of parentheses.  These are a tell-tale sign that this is a function.  More on these later.  Last but certainly not least is the place where the code of the function will go, called the body of the function.  Surrounded by two curly brackets <em>{ }</em>, the code is what makes the function do what you want it to do.  This is where all the work will take place to complete the common task at hand.  Here is another example:</p>
<pre>function square(number) {
  return number * number;
}</pre>
<p>The function <em>square</em> takes one argument; &#8216;<em>number</em>&#8216;.  The function consist of one statement and that statement is telling it to return the argument of the function (which is, number) multiplied by itself,  (number * number).    The <em>return</em> statement specifies the value returned by the function.</p>
<h4>Calling the function</h4>
<p>Defining the function does not execute it.  Defining it simply names the function and tells it what to do when it is called.  Calling the function is what actually performs the action of the function.  For example, to call the function from above:</p>
<pre>square(5);</pre>
<p>The function, <em>square,</em> was called with the argument of <em>5</em>, resulting in the function being executed and therefore returning the value of 25, (5 * 5).  A pretty important piece of the code is the semi-colon.  You do not want to forget that.</p>
<h4>Scope</h4>
<p>In JavaScript, scope refers to the <em>context of data</em>, as in where the data lives and how it can be accessed.  Depending on its scope, <em>global or local</em>, some data can be seen everywhere in a script, while other data is limited to a specific block of code, such as a function.  For example:</p>
<pre>var x;
function doSomething(z) {
  var y;
}</pre>
<p>The above code has two variables that are declared in two very different places in the script.  First the variable x is declared outside of the function and any other block of code for that matter.  With that said, it means that the variable x is considered a <strong>global</strong> variable.  Therefore, it can be seen throughout the entire script and more importantly is &#8216;alive&#8217; as long as the script is running.   Now, on the other hand, the variable y is considered a <strong> local</strong> variable.  This is because it is declared inside the body of the function &#8216;<em>doSomething&#8217;</em>.  This means that the variable y is only visible in the body of the doSomething function.  Also, y only exists while the doSomething function is being executed.  The variable y is created when the function is called and is destroyed when the function is done.</p>
<h4>More to Come</h4>
<p>When it comes to learning about functions, there is obviously a lot more to learn.  Right now I am just concentrating on the basics of JavaScript.  Once I learn the basics I will go back and dig deeper into all the basic areas of JavaScript.  It&#8217;s going to be a long haul, but taking baby steps and making sure I understand the area I&#8217;m working on before I move on I will be able to survive the long haul and achieve my goals.   I hope all you other beginners out there are benefiting from my blogs.  If you would like me to concentrate on a certain piece of JavaScript, leave me a comment and I&#8217;ll be happy to do so.  Till next time, Keep Learning , Keep Coding.</p>
<p><strong>WGT!</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://thedennisrace.com/?feed=rss2&#038;p=853</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pitchers and Catchers Report</title>
		<link>http://thedennisrace.com/?p=847&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=pitchers-and-catchers-report</link>
		<comments>http://thedennisrace.com/?p=847#comments</comments>
		<pubDate>Mon, 20 Feb 2012 12:43:20 +0000</pubDate>
		<dc:creator>Dino</dc:creator>
				<category><![CDATA[Cincinnati Reds]]></category>
		<category><![CDATA[Edinson Volquez]]></category>
		<category><![CDATA[Mat Latos]]></category>
		<category><![CDATA[Spring Training]]></category>
		<category><![CDATA[trades]]></category>

		<guid isPermaLink="false">http://thedennisrace.com/?p=847</guid>
		<description><![CDATA[Bye-bye Off-season Do you know what the best thing about winter is?  Near the end of winter means that pitchers and catchers report for spring training.  The Red&#8217;s office was busy in this past off season adding players that have a few more people predicting the Reds will win the Central Division this year.  I&#8217;m [...]]]></description>
			<content:encoded><![CDATA[<h4>Bye-bye Off-season</h4>
<p>Do you know what the best thing about winter is?  Near the end of winter means that pitchers and catchers report for spring training.  The Red&#8217;s office was busy in this past off season adding players that have a few more people predicting the Reds will win the Central Division this year.  I&#8217;m not much on predicting the future, but I must say that the Reds are definitely contenders.  I believe that if the injuries stay short and low, the Reds will have a excellent chance to make the playoffs for the second time in three years.</p>
<h4>Bold Trades/Free Agent</h4>
<p>One of the boldest trades during the winter months was made by Reds General Manager Walt Jocketty.  He sent top prospects Yonder Alonso, Brad Boxberger and Yasmani Grandal along with starter <a title="Stats" href="http://sandiego.padres.mlb.com/team/player.jsp?player_id=" target="_blank">Edinson Volquez</a> to the Padres for starting pitcher <a title="Stats" href="http://reds.mlb.com/team/player.jsp?player_id=502009" target="_blank">Mat Latos</a>.  Some people are saying that Jocketty gave up way to much for what the Reds got in return.  Me, well, I think only time will tell.  Latos is only 24 years old and is likely the number two starter behind Johnny Cueto.  Also the club is thinking Latos as &#8216;ace&#8217; potential in the future.</p>
<p>Another bold trade by Jocketty was made just one short week later.  The Reds sent <a title="Stats" href="http://chicago.cubs.mlb.com/team/player.jsp?player_id=475243" target="_blank">Travis Wood</a>, Dave Sappelt and Minor Leaguer Ronald Torreyes to the  Chicago Cubs for set-up man, <a title="Stats" href="http://reds.mlb.com/team/player.jsp?player_id=445156" target="_blank">Sean Marshall</a>.  With this move, the bullpen was help and that leaves Marshall as the set-up man for the Reds new closer, <a title="Stats" href="http://reds.mlb.com/team/player.jsp?player_id=425492" target="_blank">Ryan Madson</a>.   Madson was acquired off the Free Agent market.  He was not picked back up by the Philadelphia Phillies.</p>
<h4>Ready to Win</h4>
<p>Starting rotation helped&#8230;&#8230;.check.  Relief pitching helped&#8230;&#8230;&#8230;check.  Closer position helped&#8230;&#8230;.check.  The Reds have successfully improved all three areas of pitching during the off-season.  Yes, the Reds gave up a lot to get it, but that is why the Reds have a great farm system and they will continue to have one.  The prospects that were traded have great talent and a great future ahead of them.  Unfortunately, the Reds had no roster room for them to play right away.  Why should a team keep that talent in the minors?  Put the talent to good use, and that is exactly what the Reds did.  The Reds are in it to win it in 2012.  I can&#8217;t wait for the season to start&#8230;&#8230;oh wait&#8230;&#8230;it already has. (At least to me it has.)</p>
]]></content:encoded>
			<wfw:commentRss>http://thedennisrace.com/?feed=rss2&#038;p=847</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Opening Day</title>
		<link>http://thedennisrace.com/?p=832&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=opening-day</link>
		<comments>http://thedennisrace.com/?p=832#comments</comments>
		<pubDate>Sun, 19 Feb 2012 01:26:16 +0000</pubDate>
		<dc:creator>Dino</dc:creator>
				<category><![CDATA[Cincinnati Reds]]></category>
		<category><![CDATA[2012 Baseball Season. MLB]]></category>
		<category><![CDATA[George Bush]]></category>
		<category><![CDATA[Opening Day]]></category>
		<category><![CDATA[Redlegs]]></category>

		<guid isPermaLink="false">http://thedennisrace.com/?p=832</guid>
		<description><![CDATA[For those of you who know me, you are probably annoyed by how much I talk about the Cincinnati Reds.  Well, I&#8217;m not sorry and you better get use to it.  I can remember watching the Reds since I was little and I have only become a bigger fan as the years have passed by. [...]]]></description>
			<content:encoded><![CDATA[<p>For those of you who know me, you are probably annoyed by how much I talk about the <strong>Cincinnati Reds</strong>.  Well, I&#8217;m not sorry and you better get use to it.  I can remember watching the Reds since I was little and I have only become a bigger fan as the years have passed by.  I bleed red&#8230;&#8230;.I mean, I really do.  My most memorable game that I can remember watching when I was little was the <a title="Final out of 1990 World Series" href="http://mlb.mlb.com/video/play.jsp?content_id=19970337" target="_blank">1990 World Series</a>.  I remember watching Todd Benzinger back pedaling and catching the ball in foul territory down the right side of the field to make the final out.   I was 8 years old then and I was just excited that they won the game.  If they were to win the World Series now, I wouldn&#8217;t know what to do with myself.  With Opening Day 2012 about 2 months away, I got to thinking about past years.</p>
<h4>My first Opening Day</h4>
<p>I have been to the past 6 Opening Days and I will continue the streak to 7 on <strong>April 5, 2012 against Florida Marlins</strong>.  On April 3, 2006, I went to my first Opening Day and it started out great.  I showed up to the stadium when the gates opened at 10:00am.  My brother-in-law, Freddy and I started to walk around to enjoy the scenery, but not without walking through metal detectors first.  They had high security due to <strong>George Bush</strong> throwing out the first pitch.  We soon found the spot to get some autographs.  I didn&#8217;t get to exciting of autographs but I did get Billy Hatchers along with about 5 others on a Reds hat that I still have today.  The forecast for the game was typical for the Cincinnati area.  A high temperature of 55 degrees (which was at 7:00 am) and with the rain coming in temperatures dropping to the mid 30&#8242;s as the game went on.  Needless to say, it was a cold, wet,  bitter end to the day with a  loss to the Chicago Cubs with the score of 7-16.</p>
<h4>My Opening Day stats</h4>
<p>With 6 Opening Days under my belt I like to look back at them and compare the days.  My record is a horrible 2-4 with my second win coming from last year&#8217;s game winning walk-off heroics by <a title="Herdandez Walk-off homerun" href="http://www.youtube.com/watch?v=8tWDCN_cP7Y" target="_blank">Ramon Hernandez</a>, (<em>more to come on this later</em>).  The year before that the Reds played the Cardinals.  The Cards started off the game with a 1-0 lead and that set the pace for the remainder of the game.  The Reds hung in there until the top of the ninth where Nick Masset walked 2, gave up 2 hits and a whopping 5 runs.  This loss hurt more because the fact that it was against the Cardinals.  The Reds have been outscored by 12 runs on Opening Day since I have been going; <em>28-40</em>.</p>
<h4>Most Memorable</h4>
<p>As mentioned before, Opening Day 2011, will go down in history as the <strong>best Opening Day game ever</strong> that I have been to.  Volquez was our starting pitcher (our new Ace) and he had a rough first inning giving up 3 runs. But, as the Reds did in 2010, they hung in there throughout the game and was still in it in the bottom of the ninth.  With Axford, the Brewers <em>dominating closer</em> coming in with a 3 run lead, a few people began to walk out.  That was a decision that I&#8217;m sure they are still regretting.  Things were happening in the Reds favor and before you knew it Ramon Hernandez was up with 2 men on and down 2 runs.  On one pitch he hit a towering shot down the left field line but foul.  I started to think to myself, &#8216;Man, this place would have went crazy if that was a home-run.  Then, what I think was two pitches later, <strong>Hernandez hit a line drive shot down the right field line over the wall into the visitors bullpen for the game winning 3 run home-run</strong>.  And let me tell you, that place went crazy.  I was jumping around like a crazy maniac giving out high fives to everyone and anyone that I could reach.  I even believe I was giving high fives out to security guards as I was walking out.  It took about two hours before I calmed down from all the excitement about the game.  I talk about the game with the people I went with all the time and will continue to do so&#8230;.. forever.</p>
<h4>Looking Forward</h4>
<p>As I sit in front of my computer typing this blog, I am getting more and more excited about <strong>Opening Day 2012</strong>.  The Reds have been very busy this off season and I can&#8217;t wait to see if it pays off this year.  I hope to still be going to Opening Day games for as long as I am capable of walking, and if I can&#8217;t walk my son Henson will be pushing me in a wheel chair or carrying me in on his shoulders.  One way or the other, I will be attending Opening Day games in Cincinnati for as long as I am alive.</p>
<p>Bring on the 2012 season.  GO REDLEGS!!</p>
<p><strong>WGT!!</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://thedennisrace.com/?feed=rss2&#038;p=832</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Variables and Constants</title>
		<link>http://thedennisrace.com/?p=796&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=variables-and-constants</link>
		<comments>http://thedennisrace.com/?p=796#comments</comments>
		<pubDate>Wed, 15 Feb 2012 20:15:34 +0000</pubDate>
		<dc:creator>Dino</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[const]]></category>
		<category><![CDATA[constants]]></category>
		<category><![CDATA[identifiers]]></category>
		<category><![CDATA[initializing]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Mozilla Developer Network]]></category>
		<category><![CDATA[var]]></category>
		<category><![CDATA[variables]]></category>

		<guid isPermaLink="false">http://thedennisrace.com/?p=796</guid>
		<description><![CDATA[Getting my info For me, when it comes to learning the basics of JavaScript there are an endless number of places to go. Reading through the book from &#8216;Head First&#8217;  I was beginning to get lost&#8230;.and really quick.  I didn&#8217;t let myself get overwhelmed or discouraged about it.  I just chose to take a few steps [...]]]></description>
			<content:encoded><![CDATA[<h4>Getting my info</h4>
<p>For me, when it comes to learning the basics of JavaScript there are an endless number of places to go. Reading through the book from &#8216;<em>Head First&#8217;</em>  I was beginning to get lost&#8230;.and really quick.  I didn&#8217;t let myself get overwhelmed or discouraged about it.  I just chose to take a few steps back, and a few deep breathes and relax.  The next thing I did was something I wish I could/should have done back to high school.  I &#8220;<strong>googled&#8221;</strong> it.  The results I got back were amazing.  I got a wide variety of websites ranging from beginners to professionals  Now, I was ready to get back at it.  One of those web sites was &#8216;<a title="Codecademy" href="http://www.codecademy.com/#!/exercise/0" target="_blank">Codecademy</a>&#8216;.  It&#8217;s a nice site where you can learn to code in an interactive way.  For me that is perfect.  Another website I was told about was  <a title="Mozilla Development Network" href="https://developer.mozilla.org/en/Web_Development" target="_blank">Mozilla Developer Network</a>.</p>
<h4>Variable</h4>
<p>Variables are a big part of JavaScript (JS).  Variables are symbolic names for values in your application.  A <strong>variable</strong> is a storage location in memory with a unique name; like a label on a box to store things.  Variables start out without a value.  When you create a variable it is a good practice to go ahead and give it an initial value, also known as <strong>initializing</strong> a variable.  It is okay to not initialize the variable, but just be careful not to attempt to &#8216;<em>read</em>&#8216; its value before doing so.  It&#8217;d be like trying to play a song on your iPod before loading it with music.  When declaring a variable you will want to use the keyword, <strong>var</strong>.  For example:</p>
<pre>var redlegs = 'champs';</pre>
<p>The first part is the keyword &#8216;<em>var</em>&#8216; and it is used for creating the variable;  &#8217;<em>redlegs</em>&#8216; is the name of the variable, and <em>&#8216;champs</em>&#8216; is the specified value.  Unlike an undefined variable, an initialized variable is instantly ready to be used.  Initializing a variable is all about setting its <strong>first</strong> value and with it being a variable there is nothing stopping that value from being changed <strong>later</strong>.</p>
<h4>Constants</h4>
<p>Constants, on one hand, are like variables, but on the other hand are not.  Just like the name hints, constants will keep the same value unless you change the value you set for it the first time.  To store a piece of data that can never be changed while the script is running, you would create a constant.  Creating a constant is done the same way you did a variable.  But the only difference is the keyword.</p>
<pre>const TAXRATE = .06;</pre>
<p>The keyword &#8216;<em>const&#8217;</em> is what you need to use to create a constant.  <em>TAXRATE</em> is the name of the constant and .06 is the given value.  The first initial value of the constant becomes permanent.  This constant <strong>cannot</strong> be changed while the script is running.  It is a good practice to put the name of the constant in <em>ALL CAPS</em> so it is easily told apart from the rest of the variables in your script.  Constants are good for storing information that you might directly code in a script, like a tax rate.  Instead of using .06 in your code, it is much easier to understand <em>TAXRATE</em> when you or someone else sees it in your script.  Also if you ever needed to change the value of the <em>TAXRATE</em> you would only have to change it where you initialized the constant.</p>
<h4>Identifiers</h4>
<p>Variables, constants, and other JS syntax constructs are identified in scripts using unique names known as <strong>identifiers</strong>.  Notice the word, unique. Variables and constants cannot have the same name.  They must be different for things to work and be less confusing for people.  Along with everything else to do with web development, naming identifiers comes with some rules which are laid down by JS.</p>
<ul>
<li>An identifier must be at least one character in length.</li>
<li>The first character in an identifier must be a letter, an underscore (_), or a dollar sign ($).</li>
<li>Each character after the first character can be a letter, an underscore, a dollar sign, or a number.</li>
<li>Spaces and special characters other than _ and $ are not allowed in any part of an identifier.</li>
</ul>
<p>When creating an JS identifier for a variable or constant you not only want to follow the rules mentioned above but you want the name to be descriptive so that the data is easily identifiable.  Granted, you will come across some data where it is hard to do so, but just do your best with it.</p>
<h4>The next step????</h4>
<p>When it comes to learning JavaScript, don&#8217;t rush into things and be patient with it.  If you keep up with it and never give up, things will start to come around and you&#8217;ll be a professional web developer before you know it.  Don&#8217;t be afraid to take a few steps back and reread a chapter or two so you can understand it.  If you move to the next step before understanding the first one, you will be in a tough battle when it come to learning JavaScript.  Take your time and enjoy what you are doing.  In the end&#8230;.Keep Learning Keep Coding.</p>
<p><strong>WGT!!</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://thedennisrace.com/?feed=rss2&#038;p=796</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JavaScript is where it&#8217;s at</title>
		<link>http://thedennisrace.com/?p=779&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=javascript-is-where-its-at</link>
		<comments>http://thedennisrace.com/?p=779#comments</comments>
		<pubDate>Fri, 13 Jan 2012 00:12:11 +0000</pubDate>
		<dc:creator>Dino</dc:creator>
				<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://thedennisrace.com/?p=779</guid>
		<description><![CDATA[Moving Forward I know I have only been learning about HTML and CSS for about four months and you&#8217;re probably thinking, &#8216;Why are you moving onto JavaScript so soon? Surely there is a lot more to learn about HTML and CSS.&#8221;  Well, you are right.  There will always be new things coming out for HTML [...]]]></description>
			<content:encoded><![CDATA[<h4>Moving Forward</h4>
<p>I know I have only been learning about HTML and CSS for about four months and you&#8217;re probably thinking, &#8216;Why are you moving onto JavaScript so soon? Surely there is a lot more to learn about HTML and CSS.&#8221;  Well, you are right.  There will always be new things coming out for HTML and CSS.  Heck, there is already HTML5 and CSS3.  I feel like I have a good grasp on things and I want to move on.  For me, learning comes a lot easier when I just&#8230;&#8230;&#8230;do it. <strong> Learn by doing, that is what I am about</strong>.  I may not have the patience that I should, but I am hanging in there and learning what I can, when I can.  WGT!!</p>
<h4>It&#8217;s time for JavaScript</h4>
<p>Why JavaScript?  Well, how would you feel if the internet was like a book?  I mean, the interaction part of a book (which is none, unless you are counting the pop-up books from kindergarten class).  If web sites had no interaction, do you think the internet would be as popular as it is?  The interaction part is where JavaScript comes into play.  JavaScript can turn a web page into an interactive application as opposed to a static, lifeless page.  Sure you can work some code is CSS and make pages interact with its&#8217; users but not like you can with JavaScript.  <strong>JavaScript is a scripting programming language</strong>, you can learn to write code to respond to user interactions, like performing calculations, dynamically swapping images on a page, or even validating data.  JavaScript brings a webpage to life by allowing it to respond to a users input.  JavaScript sits with HTML and CSS as one of the three pieces of modern web page construction.  Use HTML for the structure, CSS for style, and JavaScript for the action.</p>
<h4>What&#8217;s to come?</h4>
<p>I have started a new chapter in my journey of web design; JavaScript.  As I work through the book, <em><a title="Head First JavaScript" href="http://headfirstlabs.com/books/hfjs/" target="_blank">Head First JavaScript</a></em>, I will be blogging about what I am learning and will pass along my knowledge as best as I can.  Until next time; Keep Learning &#8211; Keep Coding.</p>
<p><strong>WGT!!</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://thedennisrace.com/?feed=rss2&#038;p=779</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Layout and Positioning</title>
		<link>http://thedennisrace.com/?p=705&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=layout-and-positioning</link>
		<comments>http://thedennisrace.com/?p=705#comments</comments>
		<pubDate>Mon, 02 Jan 2012 15:59:55 +0000</pubDate>
		<dc:creator>Dino</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[absolute positioning]]></category>
		<category><![CDATA[fixed positioning]]></category>
		<category><![CDATA[flow]]></category>
		<category><![CDATA[frozen layout]]></category>
		<category><![CDATA[jello layout]]></category>
		<category><![CDATA[layout floating]]></category>
		<category><![CDATA[liquid layout]]></category>
		<category><![CDATA[Web site layouts]]></category>

		<guid isPermaLink="false">http://thedennisrace.com/?p=705</guid>
		<description><![CDATA[So, you&#8217;re looking to add some design to your web site.  Now, I&#8217;m not just talking about adding background and font colors.  I&#8217;m talking about full blown professional designs using multi-column layouts.  Have you ever been on a web site that has multiple columns and an overall nice layout throughout the site?  Well, if you [...]]]></description>
			<content:encoded><![CDATA[<p>So, you&#8217;re looking to add some design to your web site.  Now, I&#8217;m not just talking about adding background and font colors.  I&#8217;m talking about full blown professional designs using multi-column layouts.  Have you ever been on a web site that has multiple columns and an overall nice layout throughout the site?  Well, if you thought to yourself, &#8216;Man, how can I do that?&#8217;  You have come to the right place.  I will be discussing how to create that type of web site.  Lets get started.</p>
<h4>The Browsers&#8217; Flow</h4>
<p>What am I meaning when I say the <em>browsers&#8217; flow</em>?  Well, <strong>flow</strong> is what the browser uses to lay out a page of HTML elements.  Browsers will start at the top of the file and follow the flow of elements from top to bottom, displaying each element it encounters.  When the browser comes to a <strong>block element</strong> it will follow it will a line break.  Inline elements are done a little differently.  The browsers flow will have the <strong>inline elements</strong> be next to one another horizontally and from top left to bottom right.  As long as there is enough room on one line the inline elements will be next to each other.  If the window of the content is  made smaller, the browser will use as many lines as necessary to display all inline elements (word wrapping).  Furthermore, while dealing with margins of inline elements that are side by side, a browser will keep margins of both bordering sides of the inline elements.  On the other hand, when it comes to block elements the browser will keep the margin of greater size of the bordering block elements.</p>
<h4>Floating</h4>
<p>The float property specifies whether or not a box (an element) should float.  For every <strong>floating element</strong>, there is one requirement and that is it must have a width specified for it.  So, for example say we want to float a paragraph which I gave an id of reds:</p>
<pre>#reds {
		width:	200px;
		float:	right;
}</pre>
<p>First I gave the paragraph a width of 200 pixels (width is required).  Next I used the float property with the value of right.  You have an option of left, right, and none.  If you were to view this in the browser along with the rest of your code, the browser will start reading the file from the top left to the bottom right.  When the browser comes across this paragraph it will float it according to the value of the float property, in this case to the right of the browser window.  Also, it removes the paragraph from the flow of the content; like it&#8217;s just floating on the page.  Hence the property name of float.  As the inline elements, that are inside the other block elements, come to the floating paragraph, the inline elements will begin to wrap around to the next line of content.</p>
<h4>Types of Layouts</h4>
<p>There are so many ways to layout a page.  There is not one perfect way to do it.  Certain content looks better with certain layouts.  You just have to mess around with it and see what looks better.  I&#8217;m going to  talk about a few types of layouts.  First is the type of layout called a <strong>liquid layout.</strong>  They are called liquid layouts because they expand to fill whatever width we re-size the browser window to.  This is useful because by expanding, they fill the space available and allow users to make good use of their entire screen.  This layout will work for some but not for others.  For example, some designers might want their pages to look the same no matter what size the browser window is made.  Meaning, locking down the layout to look the same in small or large windows.  Two layouts will work for this technique and one of them is called the <strong>frozen layout</strong>.  Frozen layouts lock the elements down <em>(frozen to the page)</em> so they can&#8217;t move at all.  Using a frozen layout will allow one to avoid issues that may occur when a user is expanding the window.</p>
<pre>#allcontent {
	width:			800px;
	padding-top:		5px;
	padding-bottom:		5px;
	background-color:	#675c47;
}</pre>
<p>With the above css rule I have frozen the content of my page to 800 pixels wide.  First thing I did was contain all the content into the &#8220;allcontent&#8221; &lt;div&gt;. Next I gave the width property a value of 800 pixels.  This is going to &#8220;freeze&#8221; the main content at 800 pixels no matter how much the browser window is expanded.  Sometimes with a frozen layout the browser window can be expanded enough to make the look of the site just plain awful.  There is a fix for that.  What is the  between state of frozen and liquid?  It&#8217;s jello.  The <strong>jello layout</strong> locks down the width of the content area in the page, but centers it in the browser window.  It is easy to change the layout to a jello layout.</p>
<pre>#allcontent {
	width:			800px;
	padding-top:		5px;
	padding-bottom:		5px;
	background-color:	#675c47;
	margin-left:		auto;
	margin-right:		auto;
}</pre>
<p>Rather than have fixed left and right margins on the &#8220;allcontent&#8221; &lt;div&gt;, I set the left and right margins to &#8220;auto&#8221;.  With &#8220;auto&#8221; margins the browser will figure out the correct size of the margins for you while keeping in mind that left and right margins are the same, therefore, keeping the content centered.  If you were to make the browser wider the content in the &#8220;allcontent&#8221; &lt;div&gt; will remain 800 pixels wide but the also centered in the page.</p>
<h4>Absolute Positioning</h4>
<pre>#sidebar {
	position:	absolute;
	top:		100px;
	right:		0px;
	width:		280px;
}</pre>
<p>What is <strong>absolute positioning</strong>?  Well, it&#8217;s another way to make a two column layout for your page.  As you see above, I have the css rules for the sidebar &lt;div&gt;.  First thing is the position property with the value of absolute.  When the browser sees this it first removes the element out of the flow of content.  Next the browser positions the element according to the top and right values.  (Could also use bottom and left)  This element will be position 100 pixels from the top and 0 pixels from the right.  Also it will be 280 pixels wide.  After you have the sidebar positioned where you want it you will probably notice that the rest of you content is flowing underneath the sidebar with the inline elements not wrapping around the sidebar. That is because when an element is absolutely positioned not only is it removed from the flow of elements, but it is also completely ignored by the other elements.  As if it isn&#8217;t even there.  To fix this small problem you will have to go back and change the right margin of your other elements that are flowing underneath the sidebar to at least match the width of your sidebar if not a little bigger to show some separation between the two.</p>
<h4>Fixed Positioning</h4>
<pre>#redsimg {
	position:	fixed;
	top:		300px;
	left:		0px;
}</pre>
<p>Fixed positioning is pretty straight forward.  You specify the position of an element just like you would be absolute positioning.  But with <strong>fixed positioning</strong> the position is an offset from the edge of the browsers window (view point) rather than the page.  The interesting fact is that once the content is positioned where you want it, it will remain there no matter what happens to the page.   If you scroll up or down that fixed positioned content will stay in the same spot.  With the above css, I have an image with the id of &#8220;redsimg&#8221;.  I am putting this imagine 300 pixels from the top of the view point, (browser window) rather than the web site page itself.  Also is will be hugging the left side of the screen (0 pixels from the left) as well.  This image will stay at this position not matter what.</p>
<h4>Laying it all Out</h4>
<p>Making up a website can be very aggravating at times.  There are so many different possible ways to layout your website.  I suggest that you browse the web to get some ideas on what looks good and what doesn&#8217;t.  Like I said before, some content looks better in certain layouts than others do.  You just have to play around with it and keep working hard at it.  Don&#8217;t be afraid to try different layouts that you might come up with.  What&#8217;s the worse that can happen?  People don&#8217;t like it and they tell you about it?  Oh well, take their advice or criticism and use it to better your layout.  Like always, Keep Learning, Keep Coding.</p>
<p><strong>WGT!</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://thedennisrace.com/?feed=rss2&#038;p=705</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Running</title>
		<link>http://thedennisrace.com/?p=698&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=running</link>
		<comments>http://thedennisrace.com/?p=698#comments</comments>
		<pubDate>Tue, 20 Dec 2011 21:40:30 +0000</pubDate>
		<dc:creator>Dino</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://thedennisrace.com/?p=698</guid>
		<description><![CDATA[I&#8217;m Back Okay, okay, okay.  I know what you&#8217;re asking.  &#8217;It&#8217;s been longer than 2 weeks, where have you been?&#8217;  Well&#8230;..um&#8230;&#8230;.yeah, I got nothing.  As you may recall, I stopped running due to shin splints.  I usually get them but am able to work through them.  This time around, not so much.  The plan was [...]]]></description>
			<content:encoded><![CDATA[<h3>I&#8217;m Back</h3>
<p>Okay, okay, okay.  I know what you&#8217;re asking.  &#8217;It&#8217;s been longer than 2 weeks, where have you been?&#8217;  Well&#8230;..um&#8230;&#8230;.yeah, I got nothing.  As you may recall, I stopped running due to shin splints.  I usually get them but am able to work through them.  This time around, not so much.  The plan was to take some time off (2 weeks, not 4) and get back into it nice and slow.  The only reason I can come up with is that I just didn&#8217;t feel like running.  I was being lazy and I am very unmotivated.  Where did I get my motivation you ask?  Well, my legs are hurting.  I can hear you asking me now, &#8216;if your legs are hurting then why are you running?&#8217;  My theory is if I get my legs back in shape then they won&#8217;t hurt anymore.  That is at least what I&#8217;m going to try.</p>
<h3>My Times</h3>
<p>Before I started to run again I asked my friend, <a title="Adam Wills Blog" href="http://runandstuff.wordpress.com/" target="_blank">Adam</a>, if he had any advice for me.  Adam said, &#8220;Just take it nice and slow.  Don&#8217;t rush and you will get where you want to go.&#8221;  Easier said than done.  I started out at a slow pace to get my legs warmed up.  That didn&#8217;t last long.  I was still running at a slow pace of what I thought was around the 12 minutes per mile pace.  Once I reached the 1 mile marker, the app on my phone yelled out &#8217;1 mile in 10 minutes and 30 seconds.  Now, I know that is not a world record pace or even one worth talking about.  But it is faster than I thought I was going.  I was feeling good so I kept up the pace and at the end of my 2nd mile my phone yelled out &#8217;2 miles in 21 minutes and 36 seconds.</p>
<h3>Stretch Time</h3>
<p>After the run I walked it off a bit and came into my house where I proceeded to drink some fluids and begin to stretch.  Stretching is another thing that I am going to concentrate more on to keep injuries down.  Also, I plan to keep posting my journey in the running world.  I will accept any advice giving to me, and I will send my appreciation your way in advance.  WGT!!</p>
]]></content:encoded>
			<wfw:commentRss>http://thedennisrace.com/?feed=rss2&#038;p=698</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding Tabular Data</title>
		<link>http://thedennisrace.com/?p=673&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=adding-tabular-data</link>
		<comments>http://thedennisrace.com/?p=673#comments</comments>
		<pubDate>Mon, 19 Dec 2011 15:52:43 +0000</pubDate>
		<dc:creator>Dino</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[border collapse]]></category>
		<category><![CDATA[border spacing]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[data cells]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[table heading]]></category>
		<category><![CDATA[tables]]></category>
		<category><![CDATA[tabular data]]></category>

		<guid isPermaLink="false">http://thedennisrace.com/?p=673</guid>
		<description><![CDATA[Lets Begin Adding a table of data to your web page can be quit time consuming.  That part I can not help you with.  It is what it is.  However as far as how to put it into your HTML, well, that I can help you with.  HTML has a &#60;table&#62; element that will help [...]]]></description>
			<content:encoded><![CDATA[<h2>Lets Begin</h2>
<p>Adding a table of data to your web page can be quit time consuming.  That part I can not help you with.  It is what it is.  However as far as how to put it into your HTML, well, that I can help you with.  HTML has a <strong>&lt;table&gt; </strong>element that will help out with making tables.  The &lt;table&gt; element starts the whole thing off.  It is what you put first to start the table.  Within the opening and closing tags of the &lt;table&gt; element is where the data will go.  In order to add the data there are other elements that we are going to use.  First will be the <strong>&lt;th&gt;</strong> element.  This stands for <em>table heading</em>.  It is the heading for the column.  The first row you insert into your table is usually the headings for all the columns.  In case you didn&#8217;t know, when making a table you add data to your table row by row.  So, after the &lt;th&gt; element you will add the next row by using the <strong>&lt;tr&gt;</strong> element, which stands for <em>table row</em>.  Each &lt;tr&gt; element forms a row of information.  To add the information we will use the <strong>&lt;td&gt;</strong> element, which is <em>table data</em>.  Each &lt;td&gt; element holds one cell of the table and each cell makes a separate column.  You can have as many &lt;tr&gt; and &lt;td&gt; elements as needed to get your information out there.  What follows is an example of a few players on my softball teams stats:</p>
<pre>&lt;table&gt;
	&lt;tr&gt;
		&lt;th&gt;Name&lt;/th&gt;
		&lt;th&gt;Nickname&lt;/th&gt;
		&lt;th&gt;Number&lt;/th&gt;
		&lt;th&gt;Position&lt;/th&gt;
		&lt;th&gt;AVG&lt;/th&gt;
		&lt;th&gt;HR&lt;/th&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt;Brian Henson&lt;/td&gt;
		&lt;td&gt;Sniff&lt;/td&gt;
		&lt;td&gt;13&lt;/td&gt;
		&lt;td&gt;2B&lt;/td&gt;
		&lt;td&gt;.600&lt;/td&gt;
		&lt;td&gt;3&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt;Cory Dorning&lt;/td&gt;
		&lt;td&gt;Joggs&lt;/td&gt;
		&lt;td&gt;1&lt;/td&gt;
		&lt;td&gt;LC&lt;/td&gt;
		&lt;td&gt;.601&lt;/td&gt;
		&lt;td&gt;5&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt;Dennis Race&lt;/td&gt;
		&lt;td&gt;Dino&lt;/td&gt;
		&lt;td&gt;22&lt;/td&gt;
		&lt;td&gt;LF&lt;/td&gt;
		&lt;td&gt;.450&lt;/td&gt;
		&lt;td&gt;1&lt;/td&gt;
	&lt;/tr&gt;
&lt;/table&gt;</pre>
<p>Like I said before, you start it off with the &lt;table&gt; element.  After that is the first row of data.  You wrap your row of data with the &lt;tr&gt; element.  What ever is in between the opening and closing tags of &lt;tr&gt; will be displayed as your data.  In the above code I started out with the &lt;th&gt; element.  These are the headings of the columns for my table.  Once I get the headings done I moved onto the data (stats) for the rest of the table.  Remember, each row of data will be wrapped by &lt;tr&gt; and &lt;/tr&gt; and this will form on row of data.  &lt;td&gt; is the table data, this is where I added the names of the players and the stats are following.  Each &lt;td&gt; element holds one cell of the table and each cell makes a separate column.  Tables give you a way to specify tabular data in your HTML.  Tables consist of data cells within rows.  Columns are implicitly defined within the rows.  The number of columns in your table will be the number of data cells you have in a row.   In general, tables are not meant to be used for presentation; that&#8217;s the job of CSS.</p>
<h2>Lets Improve the Table</h2>
<p>There are a few ways to improve this &#8216;plain jane&#8217; looking table.  First we could have a summary to it:</p>
<pre>&lt;table summary="This table holds data about the Mens Slow Pitch Softball Class E team named 
'Balls Deep'"&gt;.......&lt;/table&gt;</pre>
<p>The summary will not appear on the web page.  It is purely for accessibility and acts as a bit of text a screen reader may read aloud to a user.  The &lt;caption&gt; element on the other hand:</p>
<pre>&lt;caption&gt;
    Balls Deep 2011 Individual Stats
&lt;/caption&gt;</pre>
<p>The caption is displayed on the web page.  By default, most browsers display this above the table.  Some browsers don&#8217;t allow it yet, but if you are not happy with the location of the caption you can use CSS and move it where you feel.</p>
<h2>Using CSS to style table</h2>
<p>Styling a table can be fairly easy.  First we&#8217;ll style the table as a whole.</p>
<pre>table {
		margin-left:		20px;
		margin-right:		20px;
		border:			thin solid black;
		caption-side:		bottom;
		border-collapse:	collapse;
}</pre>
<p>Here we are adding style to the table.  Both left and right side margins are set to 20 pixels.  The border is a thin solid black line, and I ended up moving the caption from the default location on top of the table to the bottom.  Also if you noticed, the border-collapse property with a value of collapse.  Instead of setting the margin of an individual table cell (cause you just can&#8217;t), you will set a common spacing around all cells by using the border-spacing property.  On a personal level, I believe border spacing is a little distracting.  There is a fix for this; the <strong>border-collapse property</strong>.  This will collapse the borders so that there is no border spacing at all.  Leaving the table cells boxed in with a single line.  You can also change the style for the table data cells:</p>
<pre>td, th {
	border:		thin dotted gray;
	padding:	5px;
}</pre>
<p>Nothing to major going on here.  I simply made the border a thin dotted gray line and added 5 pixels of padding in the table data cells.  How bout we add a little more style to the table to make it stand out a bit more:</p>
<pre>th {
	background-color:	red;
}

.cellcolor {
	background-color:	gray;
}</pre>
<p>Here I am making the background color of the table headings to red to make the headings stand out a little more.  Also, I am going to give the remaining table rows a &#8216;stripped&#8217; effect.  This will allow users to more easily see each row without getting confused about which column goes with which row.  I defined a new class and called it cellcolor and gave it a back ground color of gray.  The CSS part of it is done.  Don&#8217;t forget to add this attribute in your HTML code to each row you want to add the gray background color to, like so:</p>
<pre>&lt;tr class="cellcolor"&gt;
		&lt;td&gt;Brian Henson&lt;/td&gt;
		&lt;td&gt;Sniff&lt;/td&gt;
		&lt;td&gt;13&lt;/td&gt;
		&lt;td&gt;2B&lt;/td&gt;
		&lt;td&gt;.600&lt;/td&gt;
		&lt;td&gt;3&lt;/td&gt;
&lt;/tr&gt;</pre>
<p>This will make this row gray.  The next row will have the default color, the next gray, and so on.  Giving the rows alternating colors for their background.</p>
<h2>In the End</h2>
<p>Tables are a good way to present a lot of data to your users.  Try to keep your tables organized and keep useless data out.  Tables can get to a point where they are presenting to much data, (just to big of a table).  Style the table where it is easy on the eyes of the users.  Practice around with different color and font variations until you feel like you have the right combination.  In the end&#8230;.Keeping Learning, Keep Coding.  WGT!</p>
]]></content:encoded>
			<wfw:commentRss>http://thedennisrace.com/?feed=rss2&#038;p=673</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Putting Forms in Your Website</title>
		<link>http://thedennisrace.com/?p=622&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=putting-forms-in-your-website</link>
		<comments>http://thedennisrace.com/?p=622#comments</comments>
		<pubDate>Sat, 17 Dec 2011 15:19:43 +0000</pubDate>
		<dc:creator>Dino</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[controls]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[form element]]></category>
		<category><![CDATA[get]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[input type]]></category>
		<category><![CDATA[method attribute]]></category>
		<category><![CDATA[option element]]></category>
		<category><![CDATA[post]]></category>
		<category><![CDATA[select element]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[web application]]></category>

		<guid isPermaLink="false">http://thedennisrace.com/?p=622</guid>
		<description><![CDATA[How forms works If you ever been on the web you know what a form is.  Anything from filling in your username and password to filling out your billing address and shipping address.  But, do you know how they work with HTML?  Well, if you don&#8217;t you came to the right place and I thank [...]]]></description>
			<content:encoded><![CDATA[<h2>How forms works</h2>
<p>If you ever been on the web you know what a <strong><a title="w3schools - forms" href="http://www.w3schools.com/html5/tag_form.asp" target="_blank">form</a></strong> is.  Anything from filling in your username and password to filling out your billing address and shipping address.  But, do you know how they work with HTML?  Well, if you don&#8217;t you came to the right place and I thank you.  A <strong>form</strong> is basically a web page with input fields that allows you to enter information.  When the form is submitted, that information is bundled up and sent off to a web server where a web application processes the information.  After the processing is done, a response in the form of another web page is sent back to you to see.</p>
<h2>Browser&#8217;s Job</h2>
<p>First the browser will load the HTML code like it would any other time.  When the browser encounters the form elements it will create controls that allows you to input various kinds of data.  <strong>Controls</strong> are simply just something like a button, text input box, or a drop down menu (<em>more info and these later) </em>&#8211; basically just something that allows you to input your data.  So, you use the controls to enter your data and you press the submit button.  Hitting the submit button cues the browser to package up all your data and send it off to a server.  Once the server receives the data, it passes the data onto a web application for processing.  This processing results in a new web page.  Since the new web page is simply just another page of HTML, you get a response in the form of a new web page.</p>
<h2>What can go in a form?</h2>
<p>Just about any block element can go into the form element, but we are most interested in the form elements that create controls in the browser that allow users to enter their information.  The first one is the <strong><a title="w3schools.com" href="http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_form_submit" target="_blank">text  input element</a></strong>.  It is used for entering one line of text and optional attributes can be used to control the maximum length of characters and the width of the control.  As follows:</p>
<pre>&lt;input type="text" name="fullname" maxlength="20" /&gt;</pre>
<p>In the input element, using the &#8216;<em>type&#8217;</em> attribute of text creates a one line control in the browser page.  The <em>&#8216;maxlength&#8217;</em> attribute sets the maximum length of characters to 20.  Most form elements require a name that is used by the web application which allows the sever and web application to process the data and return a response correctly.  The <strong><a title="w3schools.com" href="http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_input_type_button" target="_blank">submit input element</a></strong> creates a button that allows you to submit a form.  This is the button that you click in order to tell the browser to package up the data and send it off to the server where the web application is waiting for it.</p>
<pre>&lt;input type="submit" value="click to send to server" /&gt;</pre>
<p>The input type is submit.  That is what makes the button on the browser.  The value attribute is where you type in what you want the button to say.  For example, most people put &#8216;send&#8217; or &#8216;submit&#8217;.  It&#8217;s your choice but make it appropriate.  After someone has filled in their information in the form, they will click on the submit button and off goes their information to a server.  Another input type is the radio button.  The <strong><a title="w3school.com" href="http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_input_type_radio" target="_blank">radio input element</a></strong> creates a single control with several buttons.  Only one of these buttons can be selected at once.  Think of it like an old school car radio.  Where when you push one button in and the rest pop out.</p>
<pre>&lt;input type="radio" name="hotornot" value="hot" /&gt;
&lt;input type="radio" name="hotornot" value="not" /&gt;</pre>
<p>For each choice you have to use the radio input element.  Also, all the radio buttons associated with a given set of choices must have the same name.  On the other hand, each choice will have a different value to choose from.  The <strong><a title="w3schools.com" href="http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_input_type_checkbox" target="_blank">checkbox input element</a></strong> is another way to input information on a form.  It creates a checkbox control that can be either checked or unchecked.  You can use multiple check boxes together, and if you do, you can check as many or few as you like.</p>
<pre>&lt;input type="checkbox" name="sports" value="baseball" /&gt;
&lt;input type="checkbox" name="sports" value="softball" /&gt;
&lt;input type="checkbox" name="sports" value="bowling" /&gt;</pre>
<p>Just like the radio input element, here you will use the checkbox input element for each choice.  Also, related checkboxes will share the same name.  And you guessed it, the value will all be different.  Okay, so far we have talked about input elements for a form.  That is not all that can go into a form.  What if you want someone to leave comments on your page?  They would need more and one line of text to do so, usually.  For this we can use the <strong><a title="w3schools.com" href="http://www.w3schools.com/tags/showit.asp?filename=tryhtml_textarea" target="_blank">textarea element</a></strong>.  It creates a multi-line text area that you can type into.  If you type more text than fits in the area, a scroll  bar will be used to see all the text.</p>
<pre>&lt;textarea name="comments" rows="10" cols="48"&gt;&lt;/textarea&gt;</pre>
<p>First, the textarea element is not an empty element so it needs both opening and closing tags.  Again, use the name attribute to give the element an unique name.  Next, the rows and cols attributes tells the browser  how many characters to make the text area.  The <strong><a title="w3schools.com" href="http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_option" target="_blank">select element</a></strong> creates a menu control in the web page.    The menu provides a way to choose between a set of choices.</p>
<pre>&lt;select name="reds"&gt;
	&lt;option value="votto"&gt;Joey Votto&lt;/option&gt;
	&lt;option value="bruce"&gt;Jay Bruce&lt;/option&gt;
	&lt;option value="phillips"&gt;Brandon Phillips&lt;/option&gt;
	&lt;option value="stubbs"&gt;Drew Stubbs&lt;/option&gt;
&lt;/select&gt;</pre>
<p>The select element goes around all the menu options to group them into one menu.  Also, just as before, give the select element a unique name using the name attribute.  The <strong><a title="w3schools.com" href="http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_option" target="_blank">option element</a></strong> works with the select element to create a menu on your web page.  You use the option element for each option in your menu.  The content of the option element is used for the menu items description.  Each menu option also includes a value representing the menu item.</p>
<h2><strong>The &lt;form&gt; element</strong></h2>
<p>Okay, now that I have told you some of the things that can go into a form, what is the next step?  That is creating the <strong>form</strong>.  You ready for this?  To create a form,  you must use the <a title="w3schools.com" href="http://www.w3schools.com/html/html_forms.asp"><em>&lt;form&gt;</em> element</a>.  Crazy, right?  The &lt;form&gt; element holds all elements that make up the form, and also tells the browser where to send the information entered in the form.  When it comes to creating the form, the first thing you have to know is the URL of the Web application that is going to process your form data.  Once you know this all you have to do is plug it into the action attribute of your form element like this:</p>
<pre>&lt;form action="http://www.thedennisrace.com/processcomments.php" method="POST"&gt;
&lt;!--Input elements will go here--!&gt;
&lt;/form&gt;</pre>
<p>First is the opening tag of the form element, and I went ahead and added the closing tag as well.  The <strong><a title="w3schools.com" href="http://www.w3schools.com/tags/att_form_action.asp">action attribute</a></strong> contains the URL of the web application that will do the processing of the form once it is submitted.  Also, we are using the <strong><a title="w3schools.com" href="http://www.w3schools.com/tags/att_form_method.asp">method attribute</a></strong> with the value of <strong>post</strong>.  There are two primary methods the browser uses; post and get.  They both accomplish the same thing but in different ways.  <strong>Post</strong> packages up your form variables and sends them behind the scenes to your server.  <strong>Get</strong> also packages up your form variables, but appends them on the end of the URL before it sends a request to the server.</p>
<h2>Last step</h2>
<p>After all you have read about forms and the controls that can go in a form, what is the next thing to learn?  Well, that is for you to find out.  You can start by writing some code and just doing it.  Just make forms.  Use all the above information about controls and input types and put them in between the opening and closing tags of the form element. Play around with it until you are perfect at it.  Make up various forms for various situations.  The more you code the more you learn.  Well, on that note&#8230;.</p>
<p>Keep Learning, Keep Coding  WGT!!</p>
]]></content:encoded>
			<wfw:commentRss>http://thedennisrace.com/?feed=rss2&#038;p=622</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

