Showing posts with label AWESOME!. Show all posts
Showing posts with label AWESOME!. Show all posts

Monday, February 10, 2014

Caret of Knowledge/Whoo Hexadecimal Color!

     Hello, all! I'm back again! Do I seem awake? That's because I am! French press FTW! So, Google music was being weird, I first played Foo Fighters radio on Pandora. I'm still in a Foo Fighters sort of jam, I suppose, but then I didn't want to make an account, so I'm on Grooveshark. Today I had an adventure in the world of ChromeOS! I downloaded about five text editors, but most of them just weren't my thing. I was down to Caret, and Tailor. I like Tailor better, but it's missing some key features like being able to save my work, but beside that and not being able to preview my work, I actually liked it. Yet, that was not to be, so I'm on Caret. Which is awesome. You can do HTML and CSS at the same time. Which I didn't think I'd be able to do on ChromeOS so, that saved me some bookoos (how DO you spell that word?) of money. Now I'm less poor than I could have been, it's time to plug in and plug away!


HTML/CSS





      Ah... Good 'ol coding! There's nothing quite like it! Well, the colors are coming out! the hexadecimal colors to be exact. I knew that this was gong to happen, I just thought it was going to a long time ago. But now that these colors have come out, I'll be coloring all the things!

     One of the things I was doing with Caret earlier was HTML. I had HTML and CSS running together. I save it to the computer and then open it and and it open up into the browser. You get a live preview of what you're working on. And that is so cool! I just have to figure out how to get .js into the mix. I assume that's coming down the road really fast. Also, I need to get Crouton going correctly so I can do some Linux stuff. Like Github. Anyhoo... back to the HTML/CSS. I am now on a review of the CSS that I've already done. It's pretty easy to remember the names of things in CSS because a lot of the names are the same.
     Now, if y'all remember, I said there would be more .js today, and there is! So, once I finish the review we'll head over there. Aaaaand yup. Nothing to write home about!


JavaScript





      We're still on <this>, folks. And I don't mind. This thing has a lot of different uses. I love it! Over the weekend, I did not get a chance to do any classwork(family birthdays, social protocols, yada yada yada) and this was the first weekend where I actually was excited to get back to my studies! I'm having so much fun doing this! Ok. The lesson that I'm working on had this:
var square = new Object();
square.sideLength = 6;
square.calcPerimeter = function() {
 return this.sideLength * 4; };
 // help us define an area method here

 var p = square.calcPerimeter();
 var a = square.calcArea();
The instructions said to create a <calcArea>  function that gave the area, and to use the square.calcPerimeter as a guide. All I had to do was:
var calcArea = new Object();
square.calcArea = function(){
    return this.sideLength * this.sideLength;
};
Which, in hindsight was easy, but what to return was an issue,  because I had the wrong idea about area. I got it in the end. They've got me working on constructors now. They're like an Object, but more global. Here's an example:
function Person(name,age, gender) {
  this.name = name;
  this.age = age;
  this.species = "Homo Sapiens";
  this.gender=gender;
}

var sally = new Person("Sally Bowles",39, "f'male");
var holden = new Person("Holden Caulfield",16,"f'male");
console.log("sally's species is " + sally.species + " and their age is " + sally.age + "and their gender is " + sally.gender);
console.log("holden's species is " + holden.species + " and their age is " + holden.age + " and their gender is " + holden.gender);
Notice that I just write out everything on one line. This way, if I were to be working on something that would need a lot of the same thing with changes applied to the individual, this would work a lot better than the regular Objects. So, we have constructors. But, Objects are still useful in a smaller case-use.Well, that'll about do it for me, folks! I've had a blast getting into things. See y'all on Wednesday!

--Martin

Monday, February 3, 2014

I'm Blind, But Awesome Still Happened!

     Well, it's no longer pleasant outside. It's actually frigid out there. Which is why I'm indoors with a nice cappuccino. After Fighting valiantly against the elements, I made it to my coffee shop of choice, and quickly got some hot caffeine. I have a Flightless Bird by Iron and Wine themed playlist going, I have my cappuccino, I've done some cursory puttering, so it's time to plug in and plug away! 


HTML5



      Well, after having some issues getting my text to align on the center, turns out I needed to say text-align, not font-align, seems it depends on things. Not sure what those things are, but they're there.      Anyhoo, back to the lesson at hand. So, as I'm sure all of us are aware, you need to make sure that when you write some code, spacing matters!! I can't believe I just spent seven minutes thinking I had the syntax of the code incorrectly laid out, when really, I just needed a space! I am so blind...
     And now the internet is down. That's ironic. I come here, because; the wifi is better than what I have at my house, and now it's dead.
     Aaaaand it's back.
     OK, so, I'm dealing with tables now. Table data is pretty much cells and columns. I just created a single-column table. So, that's what you'll probably see on here at some point. Pretty much, once I learn something in HTML, I'm able to apply it to here.
      These guys really like the monsters and super heroes and such. +1 for them! Here's an example:
<html>
    <head>
        <title>Table Time</title>
    </head>
 
    <body>
     
        <table border="1px">
            <tr>
                <td>King Kong</td>
                <td>1933</td>  
            </tr>
         
            <tr>
                <td>Dracula</td>
                <td>1897</td>
            </tr>
         
            <tr>
                <td>Bride of Frankenstein</td>
                <td>1935</td>
            </tr>
        </table>
     
    </body>

</html>
 
     At first, I saw the year by Dracula backwards. I was like: Dracula is not my age! 1987, what? But then I saw that it was 1897 not 1987. It would seem I'm suffering from a mild case of dyslexia today.

JavaScript

     Continuing with the whole Arrays and Objects things, I have been working on them in my lessons once again. This time I'm working on Object constructors. They're pretty much a way to assign things to an Object more easily. Here's an example for those that don't know what that looks like:
var me = new Object();
me.name="Mookie";
me.age=24;
The capitalization of the 'O' in Object is, as in everything in .js, quite important.

THAT WAS AWESOME!!

     The lesson was to create a an array with a first element  that should be a number, its second should be a boolean, its third should be a string, and its fourth should be... an object. They didn't say how to do it, you have to look at the hint, but I figured it out how to do it and it worked! OlĂ©! That makes me feel good about myself that I was able to figure it out and get it to work. I feel like they're trying to get me to do more, but not stuff that I can't handle. I like it. 

     Today has been quite the adventure! I had to relocate after the HTML because life happened, butI was still able to get everything done. I'm very happy about the fart that I was able to work those arrays, and get the Objects and arrays working together.