Tuesday, November 26, 2013

Day 51

This week so far has been pretty dead, due to that fact that everyone is on "break." I am trying to get as much time in as possible--with the short amount of time we have left.

Since I now know how to add friends to my Facebook project, I am going to be attempting to add that in, as well as making everything with objects. I wanted to know how to make it so the request was pending, before I started this, but our instructor helped me with it. I just need to add another category to the friend table, which just needs to be a Boolean. Either stating NULL or unknown, "true" meaning we are friends, or "false" meaning friendship was rejected.

Here is a little of the code I was working on today with Ruby. One of the easier problems.

The neat thing about Ruby is that it makes everything so simple. I still am a little indifferent about not going on further with Python, though. The double basically multiplies the 2.double by two and you get 4, then 8 for the next one. 4.prev just returns the number before 4 or 3. Lastly, the 2 ".skips" just returns 5. Difficult, right?                                                                            








Should probably post some more difficult problems,

- Kyle

No comments:

Post a Comment