Showing posts with label badges. Show all posts
Showing posts with label badges. Show all posts

Friday, February 21, 2014

Groovy, Man!/ Friends In Address Books

     Here I am at the coffee shop once again. I've got GrooveShark going. Click the link for the playlist that I'm playing. I've been on this one for a while, and I still like it! Always a solid electronic song going on. I've had a latté, I may get a regular coffee at some point to keep my eyes open. Friday being its usual self, I'd rather get this over quickly, but I need to put some time in. So, time to plug in and plug away!


HTML/CSS





      I'm sorting my friends! It feels a bit like circles in g+. They're even using Google colors. Anyhoo, it's the CSS I'm looking at. they pretty much don't care to teach you how to make a circle border. It's just there. Seriously. Don't just throw things at me, tell me what they are! Good thing ye olde Personal Initiative is still around.
div {
display: inline-block;
margin-left: 5px;
height:100px;
width:100px;
border-radius:100%;
border:2px solid black;
}
And that's how to do a circle border.
Now they teach me something cool. You can have an <id> and a <class> in the same tag. That is definitely nifty! Lots of uses for that. And I finished. That was quick. Looks like we're about to get into this:

I'll continue with that in the next post.












JavaScript




      Isn't it funny how normal it can become that a single letter being incorrectly capitalized eventually is not so stupid any more? It's perfectly logical that the computer would have a binary (heh. I made a play on words) track. It's either right, or it's wrong. There is no such thing as close. That's totally normal for me now! How strange... The Address Book of happening is still happening. I was trying to get it to print out a return on a search and it just wasn't working. It wasn't until I hunkered down and really scrutinized the code that I discovered my error. A lower-case 'l'. How thoughtless of me. I shall endeavour a better attempt at correct grammar today. After smashing my way Neanderthal-style through the lesson I moved on to adding more people in an easier method.
Starting off with this function:

var add = function(firstName,lastName,email,phoneNumber){
    contacts[contacts.length] = {
    firstName: firstName,
    lastName: lastName,
    phoneNumber: phoneNumber,
    email: email
};
It allows for any additions to be done with one line of code like this:

add("Mookie","Chess","example@example.com", 9003006000);

It doesn't print anything, it just adds that person to the address book. In order to see if actually worked, we use this:

list();

If you recall, that was part of the earlier code.
Turns out, it actually has a use.
And project Address Book is complete!










Olé!
Now it is time to bid you adieu. See y'all on Monday!

--Martin

Wednesday, January 15, 2014

Are you Human?


     Well, I'm back and hoping there'll be less stupidity today which will be difficult since I forgot my wallet like a genius, so water is my drink today. One of my g+ peoples shared some music that I thought I'd check out. So, I'm listening to Tomahawk. Never heard of them, but it seems kinda nifty. Now it's time to plug in and plug away!

     Blackjack. That's a fun game. Now I'm going to be writing code to make the game. Good news: I like the fact that they want you to think about how to figure it out by yourself. Bad news: I don't like the fact that once you uncover the "hint" that tells you what you need to do, it turns out there's only one way that they will take as a pass. It should be that if it works, that's a pass. If you don't tell me how to get it done, I should be able to have a certain amount of freedom as to how it gets done, but no. Only one way. Oh well. I just wish there wording had been a little bit more transparent.
Well, that was easier than I thought it was going to be. I didn't like how they finished it, but it works. So, whatever.
     Now I've moved on to a "review primitives" section. Pro: I remember most of it. Con: all they have you do is print a sentence to the console to pass the section. This is going to take some personal initiative. After playing with some of the lessons, they are now actually having me do some stuff. So, I don't have to come up with my own stuff. I kinda liked it. Ah well, back to the grindstone.

     I really like using <Math.random()> and such. It's so easy and yet so useful! A handy dandy little random number generator.

     OK, this was a little strange; I just did a lesson and they had a var that they didn't use, but they wanted me to answer. I'll show you:
// Write your full name
var myName = ("Mookie Chess");

// And your age
var myAge = 24;

// Are you a human? Be honest.
var iAmHuman = "no";

console.log("My name is " + myName + " and I am " + myAge + " years old.");

Am I human? Alone a strange question, but then to not use it? It's times like these when I over-analyze things. I just want to know!  But hey, now I have a post title.

     So, a Boolean is only true or false? Well, OK then. Good thing I looked it up, or I would have been stuck. These guys really don't inform you of everything, but then I suppose that's a good thing. Use some personal initiative to get through sort of thing.

     Hey, another badge!







We made it through! Olé!
Well, hopefully I won't be so slow to Google some definitions next time! See you humans on Friday!
--Martin