Broken Finger and JSON

I broke my left middle finger last week. I think that may have been one of the reason’s I was in so much pain last week. I believe I broke it getting out of the car. My nine remaining fingers are worn out and frankly, a bit confused. Not sure why it effects my ability to type with my right hand, but it does. It must be all in my head.

JSON

I wanted to make sure that our code met all the basic requirements of the rubric, so I decided to add some JSON code to the file I shared here last week. I created a JSON Object, used JSON.stringify before I set data via local storage or cookies and I used JSON.parse to retrieve the data. Here is a very short example of each:

JavaScript
Example of JSON Object and Stringify
localStorage.setItem(“objectName”, JSON.stringify({param1: data1, param2: data2 }));

Example of JSON.parse

var varName = JSON.parse(localStorage.getItem(“objectName”));
// Note varName is now a new object holding the info inside the objectName object.

I hope this helps. It is written just as I have it here.

Week 11 Meeting

We were all eager to get the meeting started this week and everyone was well prepared. I presented my updated code and then our visually-orientated teammate presented an awesome changed version of my part of the app placed on his page. You enter you name and password, hit the login button and it does a really cool flip animation to our app’s main page! I love it! Our third teammate has had a little trouble, but will be getting to work this week. Some people perform better under pressure.

Conclusions

This was a triumphant week for me in some ways. I didn’t let my finger stop me from doing my school work, I was able to get my code up and running quickly and my work load was a bit lighter this week in one class. It all led to a great week mentally. I am excited to see how things turn out next week! Until then.

JSON with Data and Scrum Agile Development

We continue exploring the nine topics this week. I covered JSON using data and my teammate covered the Scrum Agile Development process.

JSON with Data

Last week one of my classmates worked on JSON with a txt or xml file. I decided to try it with data this week. It’s very simple. You create a variable name and create an array in brackets []. Each element needs to have a name and a value pair inside braces (curly brackets){}. The name needs to be in quotes, next comes a colon and the value goes inside a second pair if quotes. Place a common between each set of pairs inside each set of braces. A comma must go between each set of braces.

JavaScript Example
var varName = [
{“firstName”:”Joe”, “lastName”:”Wright”},
{“firstName”:”Bob”, “lastName”:”Jones”},
{“firstName”:”Biff”, “lastName”:”Smith”}
]

To access the data by position in the array:

JavaScript Example
document.getElementById(“divNameHere”).innerHTML =
varName[0].firstName + ” ” + varName[0].lastName;

Scrum

Scrum is an Agile Development system. You can read more about it here.

Conclusions

I have to still look into development systems. I’m not a big fan of learning a totally new system just for our short 4-week development cycle. Scrum sounds simple enough.