Sunday’s Challenge

Full of the knowledge gained from Coder Night on Thursday, I made an attempt at creating a poker game. My original plan was to create three classes, a Player class, a Deck class and a Game class. The general construction of the game would be the Game class would use take a new deck object and pop the last card out of the shuffled array and assign it to one of the players in the array “hand”

The first problem I ran into was getting each player cards from the same deck. When I wrote the program the first time I assigned a new deck to each player.

I think I finally figured out the problem there, but I broke the program :/

I am pretty sure the problem is somewhere in my Game class. Any ideas?

require_relative 'player'
class Game
  attr_reader :hand
  attr_accessor :make_game
  def initialize numplayers
    @numplayers = numplayers
    hand = []
  end
  def make_game
    i = 0
    while i < @numplayers
    hand << Player.new()
    i+=1
    end
  end
end

Yeah… I’m a bad blogger.

I’m coming back now, I promise

I’m sorry, audience of zero, I haven’t been updating you on my learning process or helping you keep up. The problem is, I have been moving way too fast to write about it every day. So, to update you:

HTML:

While I am no master, I plowed through my HTML book and felt comfortable enough to move on.

CSS:

I know the concepts of CSS, I know what it can do and I know where to look up commands, I think I will get better by doing.

So the blog originally was for you to learn with me and I dropped the ball on keeping up with it. Sorry.

So, Where am I now?

JavaScript

I have been playing around with codecademy for a few months now and I love it. The exercises are challenging and you have a lot of freedom to mess around. It was a great intro to programming and I have since expanded my pursuits!

Ruby

Through the urging of my wonderful friends Jessica Barnett and Aubrey Goodman, I decided to pursue Ruby. I love it. Actually love is a gross understatement. When I sleep, I have dreams of objects and methods dancing in my head (you think I’m joking).

I am currently working my way through the Learn to Program by Chris Pine (highly recommend) and a course offered by Pragmatic Studios (equally awesome).

Needless to say, I don’t want to do anything else but program in Ruby for the foreseeable future.

General Computer Science

For this I am reading Schaum’s Outline which moves really fast but is completely worth the effort. I think this will prepare me well for some further exploration into algorithms and databases.

Java

I am also going through Standford’s Intro to Programming Methodology and Computer Science class to hopefully give me some training in larger theories and best practices of software design.

So, yes I am busy. I will however try to post more often with some tidbits, challenges and advice I pick up along the way. I hope you continue to read!

HTML Meet Style

Sorry for the unannounced absence. Life gets in the way.

Let’s look back at what we have learned so far:

First, we learned about how to secure a domain name and set up hosting.

Next, I introduced you to HTML and how it fits in the web.

After that, I showed you what a simple HTML document looks like.

Finally, I showed you how to set up your text editor and your website’s folder.

Today we are going to learn some basic styling and introduce the “style” element to your HTML document. NEWS FLASH: It is no longer 1999 and we can’t use HTML to style our webpages…Gasp.

I know that is common knowledge to most people in web design, but don’t roll your eyes at me. It is a misconception many beginners carry.

I won’t be teaching any CSS today, just showing you where it fits in and what it does.

So let’s go back to the code from the earlier lesson:

Straight HTML

That code gave us this web page:

Now take a look at the same code with a little CSS thrown in:

Notice that I threw in a “Style” tag. The tag has an attribute, text/css. This tells the browser that we will be styling the website with CSS. I won’t tell you exactly what each one does, try to figure it out based on the picture below.

So what did the CSS accomplish?

Setting Up Your Website

Homework Answers:

<html> and </html> let the browser know where the html document begins and ends

<head> and </head> starts and ends the page “head”

<title> and </title> Gives the page a title

<body> and </body> starts and ends the “body” of the document.

<h1> and </h1> changes the formatting of the enclosed text to the size of  heading 1

<p> and </p> shows when a paragraph begins and ends

<h2> and </h2> Same as heading 1 except slightly smaller.  There is a total of 6 heading sizes

Today’s Lesson

Setting up your website

In order to begin creating your website you have to first choose a text editor. If you have a Mac you can use TextEdit. If you have a PC, Notepad comes standard. Thanks to Jessica I will be using TextMate which is a text editor made specially for developers.

So open up the text editor of your choice and make sure that it is set to a plain text format (not necessary if using TextMate)

Save the file as “index.html” to a folder called “learnwithjeff.”

Now, try creating a file like the one I did in my previous post. Once you have finished open the file using your browser and check out your first HTML website!

 

A Quick Look at HTML and Your First Assignment

Hello!

Today we are going to look at a little basic HTML. I’m running behind so this will be a short post.

This is what a (super) basic HTML file looks like:

 

This is what that file looks like on a web browser:

 

Homework:

Your homework for tonight is to compare the two and make a guess as to what each tag does. Tomorrow we will go over it.

Lesson 2: An Intro to HTML

Disclaimer:

Third post in and I’ve already made an executive decision about this blog, it is about me. I know this may sound a bit selfish. I am okay with that.

I want you to read, follow along and learn with me. I will answer all questions as best I can. I won’t, however, choose what I teach based on popular demand. I want to learn, so I won’t cover things I already know.

So, on that note, we are not going to go over WordPress today like I had originally planned. We are going to go straight into HTML.

Now I know a little HTML but I figure it can’t hurt to get a little refresher so I will start from the beginning.

HTML:

I got my book in the mail, Head First HTML with CSS & XHTML. It looks pretty basic and seems like a lot of fun (Lots of pictures). I will try to explain everything as best I can but I will always refer back to the book. If you want to follow along I would suggest purchasing it.

So let us first delve into the basics of HyperText Markup Language or HTML for short. To do that we need to first take a look at where it fits into the equation of the internet.

HTML is the language your browser understands. When you make a website you load HTML file(s) onto a web server. A web server is just a computer that stays on, connected to the internet.

When you visit a website you are sending a request to the server to send you that HTML file. Your browser than interprets all the HTML tags (certain words surrounded by <…>), and displays websites as you know them.

I know, I can't draw

 

So now we know where HTML fits into the web in general. It is a language that browsers use to determine the structure of a website. Next lesson, basic HTML tags.

See you next time :)

For My First Lesson: My Digital Resume

I’ve done a lot of cool things in my short 24 years. I’m proud of my accomplishments and I want to show them off to future employers, partners and investors. To do this, I am making an online resume.

First, I need a url. To do this you need to find an available domain name and a domain registration company.

Here are some of the tools I used:

  • Domai.nr - This tool helps you find interesting domain names

 

  • Fat Cow - I love this website. It handles my domain registration as well as my hosting. It has one click Word Press installation, unlimited storage and a free domain name. It may not be the best in the market but I have been very happy with them.

 

Some other tools:

  • Domain Registrars
  1. Name Cheap – Voted number one by lifehacker
  2. 1&1 – Came highly recommended
  3. Godaddy – I have used in the past, generally more expensive and not user friendly
  • Website Hosting
  1. Blue Host – Highly recommended by friends
  2. Host Monster – Generally good online reviews
  3. Godaddy – Popular but again, more expensive and not user friendly

What I did:

  1. Searched for domains using domia.nr. I tried a few combinations and settled on hirejeffbaird.com
  2. Opened a new account of Fat Cow, entered in my desired domain name and credit card information. I am now the proud owner of hirejeffbaird.com and have a hosting account to go along with it. Yay!

Tomorrow’s Lesson: Getting Started with Word Press

 

I am Jeff. Learn cool shit with me.

Welcome to my new website, where we get to learn cool stuff together! I have spent a lifetime in school learning jack shit. Everything I’ve learned, for real, I taught myself or learned on the job.

That is what we are going to take a stab at on this site. I am going to pick a skill and then I’m going to teach myself said skill. I will then post how-to guides, instructional videos, detailed accounts of my mistakes, and (sometimes) funny anecdotes of the learning experience.

Sound fun? I hope so.

So a little about me:

  • I am an undergraduate student in the entrepreneurship program at University of South Florida St. Petersburg.
  • I worked on ships (no not cruise ships, the ones that bring all those products from China that you like)
  • I’ve started three companies
  • I just got engaged to the most wonderful woman in the world
  • I read. A lot.
  • I like to teach
  • New is exciting
  • I love learning

Okay, I won’t talk much more about myself from here on out, but I thought you should know the man behind the curtain.

As this website progresses I would love to field suggestions on topics to cover so jump in on the comments :)

Proudly powered by WordPress
Theme: Esquire by Matthew Buchanan.