11 July 2010

Spain Wins! My favorite team loses! Uggh!!!

Today was the last day of International Football. And the final conclusion of the last game of the world cup is that Spain won! I was rooting for the Netherlands to win the game. They've been to the final four times and they deserved a win. Unfortunately, Spain and they deserved to win just a much. It was a game of ups and downs and finally went into a final 30 minutes. The worst part of the game was a couple of yellow cards that I didn't think were deserved on both sides. One foul the referee didn't even see and if he did why did he wait until after Spain protested to deliver a yellow card. We'll never know.

But all in all I went through the stages of watching a wonderful game of football: drinking beer, cheering, laughing, screaming, pleading, and finally accepting that the game was over at 126 minutes of play and the Netherlands had a great moment they just couldn't put one in.

Four times and still no win. Spain is a virgin on longer and they have the win! Oh well, I have to wait four years to see if the Netherlands can do it again. Maybe even team USA will go further than the round of 16. We'll see...we'll see.

04 July 2010

Happy Fourth of July!

I’m such a procrastinator!

It’s the fourth of July and has been a month since the last time I wrote anything. I suck!

I’m all alone and instead of doing anything I’m just lounging around the house. Actually, I’m vacillating between the bedroom and the office. I want to be studying but I’m not. Right now, my computer is backing up everything to an online storage. My biggest fear, even though I’m not a hundred percent digital, is that everything on my laptop will disappear. It’ll be gone and there would be no way to get any of it back. I haven’t massively screwed my computer over in at least 4 or 5 years. I don’t want too ever again. Well, I don’t want to lose everything ever again. So, I’m encrypting and storing it somewhere in cyberspace. Mozy is a company that offers backup solutions for $5.00 a month. And it’s unlimited. So rather than doing anything with programming I’m sitting here waiting for my system to be completely uploaded. 132 gigs of my life encrypted and tucked away somewhere else so that if I do screw my computer again I still can get my data. Is Mozy the best? I don’t know. But the price is right and if I had more money I’d just purchase two years worth of backup but I can’t afford that. So I'm blogging this because I haven't done that for a while either.

It's the Fourth of July and I'm doing nothing. It actually feels good to slow down and do nothing for a change.

Happy Fourth of July everyone!

11 April 2010

Assignment 1B - WhatATool (Part I)

I've completed this assignment from the Stanford class CS193P - Programming for the iPhone. It is a basic assignment less than to teach about Objective-C and more about teaching the student how to use the documentation system via XCode. I did learn some really neat tricks with strings.

First, everything can become an object. In C if you need to create a string you create an array of characters with a null terminator such as:

myString[10] = "Jake Sully\0";

Or rather it breaks down to:

myString[0] = 'J';
myString[1] = 'a';
myString[2] = 'k';
myString[3] = 'e';
myString[4] = ' '; // space
myString[5] = 'S';
myString[6] = 'u';
myString[7] = 'l';
myString[8] = 'l';
myString[9] = 'y';
myString[10] = '\0'; // null


Well, with Objective-C it's a bit easier:

*myString = [[NSString alloc] initWithString: @"Jake Sully"];

There is no need for the null terminator nor worry about initializing an array to a specific amount of memory. Of course in C you could get a variable array by defining it with nothing such as:

myString[];

And then strcpy the string portion. But no need with Objective-C, let the object worry about it.

Another cool thing how to expand paths. In unix the tilde '~' is used to an easier way to express: /Users/home/jsully. It saves on keying things in but also if the program is going to work on the users home directory but it may not know who the user is or you just rather not hardcode the users path. Really, you don't want to hardcode the users path then '~' to the rescue.

But what about expanding it like so:

*myString = [[NSString alloc] initWithString: @"~"];

And now we just expand the tilde and print it out:

myPathString = [myString stringByExpandingTildeInPath];
NSLog(@"My home folder is at '%@'", myPathString);


I kind of think that's pretty neat and a little bit awesome. I can see how that can be used for good and evil.

Also a part of the assignment is to print process information. Well, there's an object for that as well call NSProcessInfo. You work with URLs then NSURL.

By far my favorite thing that I learned was about hashes. In Perl I've used hashes and an array of hashes to create very sophisticated data structures. In Objective-C there are no hashes but there is NSDictionary. This allowed me to create two arrays, one used for the keys and the other for the value of those keys. At first I didn't like this idea and sought to create a simpler way of creating a bunch of static keys and values. Then I discovered that I can create and NSDictionary object from a file:

*myHash = [NSDictionary dictionaryWithContentsOfFile:@"somepath/file"];

This solved that problem and creating a something static. Even though these assignments are for making me understand the Objective-C way I still want to learn how I would do things as if it's a real tool designed to help me. That's how I learn.

The last thing was enumerating through the dictionary as I needed to. I could use the simple for...loop or the newer for...in way. The for...in way is way cool and simple and reminds me of the foreach way I would enumerate through my hashes. At first I used a while loop, because I didn't know about the for...in. But with the while loop I have to create an NSEnumerator object which I could I then set that object to my keys via keyEnumerator. Something that I guess is built into dictionary objects. Messy is what comes my mind compare the two ways:

NSString *keyValue;

// while loop way
NSEnumerator *keyEnum;
keyEnum = [myHash keyEnumerator];
while (keyValue = [keyEnum nextObject]) {
           // do something
}

// for in way
for (keyValue in myHash) {
          // do something
}


Yeah, a lot of easier and I don't have to create extra objects just to enumerate through the hash.

All in all I'm enjoying learning how to create an app for my iPhone because I'm learning about the language I've wanted to learn but have procrastinated in learning. The lecture series offered by Stanford kind of give me a structure to learning the language. Though I should put a disclaimer on doing what I am doing: first, at least know c, java, c++, python, some object oriented languages. They don't spend too much going into detail — really just two lectures glossing over Objective-C. And though c isn't an object oriented language get used to the concept of pointers and references. Objective-C makes heavy use of them and to understand them will help. Second, this really is a programming class for the iPhone and not Mac OS X in general so some of the really neat things in OS X are not dealt with in this class, most obviously, garbage collection as of the 3.2 SDK doesn't have that and if you know java you'll know what I'm talking about.

Next post on the class I'll review assignment 2a - WhatATool (Part II) which goes into creating objects and doing stuff with them. Good stuff!

26 March 2010

Objective-C, iPhone Programming, & Stanford

OMG! I found this awesome website for Objective-C iPhone Programming. I downloaded from iTunes the latest (winter 2010) class. All of the accompanying information (class notes, slides, program examples, etc) have been removed to make way for spring 2010. I have so far finished lectures 1-3 and I'm working on Assignment 2a. What makes the class really awesome is that there is no textbook at all. They use Apples documentation.

This is the best lecture series I have ever had over the Internet. Lectures 1 & 2 went over some of the basics of the class, also a little of Objective-C. There is an assumption that you have programmed before and used Object Oriented Programming (OOP). Lecture 3 goes more in depth about Memory Management. I have to admit I'm struggling with that one a bit. Unlike, programming for Mac, the iPhone doesn't have items like Garbage Collection so you have to more diligent about allocating, and releasing object from memory so that you don't have memory leaks.

I know OOP from Perl. It's very different from where I came from. I've programmed in C, and took a class in C++ (they didn't cover the memory management side of it in the first class). And OOP in Perl is just different because you don't have to think or worry about memory links in the same manner. I'm actually relishing the experience to really have to learn more about the internals of the device.

I've been looking for something that would cover programming in Objective-C and Cocoa like this but for just the Mac. This is really an iPhone programming course so once the lectures end the small tutorial on Objective-C then it will start on the UI of the iPhone. At least, I can take the learning experience and what I have learned about programming on the iPhone and expand it to learn more about programming for the Mac. So maybe by this time next year I'll have a program out here on the Internet for the Mac and an iPhone app out there. I already gave ideas!

Once I finish the Assignment 2a I'll post some stumbling blocks that I've had and how I finally resolved them. Next post will be about Assignment 1b. I just wanted to introduce the website and the series. So go to iTunes and pull down the winter 2010 lectures. The course downloads are found here.

Today should be my last day...on Facebook

Fourteen days ago, the last post actually, I wrote that I had committed Facebook Suicide. Basically, I deleted all of the content first and then I requested to have my entire page deleted from the Facebook servers. Of course, FB sent me a note stating that in the next fourteen days I would be deleted. Today is my last day and I have to admit it is kind of disturbing that no one has emailed me about any of my missing FB content, nor of the status updates missing. Really, no one has stated anything which one could view as being sad but in reality I don't really care. I still have this blog. Of course, I don't think anyone really reads it which doesn't matter. I still have my Twitter feed which I have incorporated to the right of this blog. And I have different social networking areas that I update, Yelp for businesses, LivingSocial for books; so I'm not done with social networking I'm just tired of FB. I also have a Buzz feed, which I would like Google to get out of Gmail and let it stand on its own. I know that Buzz is like FriendFeed. In that it aggregates information from different sources and presents it to friends, family, or anyone who comes across. So really, what is FB really doing for me? Nothing. And my last reason, which occurred after I left FB, is this little tidbit.

So, they really don't want the user to tamper with the experience. What?! That just kills me. I always used the GreaseMonkey Script that removes FB ads. (To spare that script writer any issue I'm not going to link to it.) The problem with what they are saying is that the end-user has no right to alter the page — even after it leaves their server and is residing on the users computer — which is what happens when someone views a page. The script doesn't alter the server at all it alters the users page from within the browser. So lets alienate users and script writers and maybe everyone...great strategy. I guess that is how Google became what it is today. You know your competitor the company you want to become bigger than.

I know many people are not going to leave FB and that's fine. It was just me that found FB to be too bothersome. It made me feel disconnected from people rather than more connected. So hopefully, tomorrow I will be completely removed from their servers. On some level I doubt it but there is nothing on that old FB page that I'm ashamed of. So cheers FB!

12 March 2010

I've committed Facebook Suicide

I have left Facebook forever. I requested the my account to be permanently deleted. Of course, Facebook gives you 14 days from the request and to restore my account all I need to do is log in. But I know that will not be happening anytime soon. I'm sure that people will NOT be looking for me.

The main reason I left Facebook was because I felt like I was in High School again, a feeling of being alone. I joined so that I can communicate with family and friends and the reality was I wasn't reconnecting with anyone. I did become friends with my niece and nephew and that was great but I was talking to them I was playing games. And they weren't even really good games at that!

Facebook had become boring. People that I had not spoken with in 10 to 20 years I thought I would re-establish some kind of friendship but that didn't happened. Nothing happened. Who wants to be a part of a community that no one talks to or listens to. I don't so I left. Besides, I have this blog that no one reads to feel alone in the world wide web that is the Internet. So boo-hoo me but I'm out of here.

I'd rather post here and continue to post to my Twitter account. Facebook goodbye forever!

I've also picked up my Programming in Objective-C book by Stephan Kochan and I will be blogging about the exercises in the next few weeks. Get ready to start seeing more stuff happening regarding programming my Mac and even my iPhone.

09 January 2010

What's happened in 6 months - Happy New Year!

Well, I didn't have school over the summer session but instead of writing I was reading and journaling, which is writing just not for the world. I didn't think that anyone would mind sense since I'm not read all that much and unlike some other great bloggers I have no coherent voice. It's the New Year and its time to change that. My posts are going to start being geared towards interesting science, some horrible short fiction that I write for no other reason that I have a teenage dream of being a writer, and my true experiences of school. And maybe some posts on the classes I'm taking.

Regarding the classes I'm taking or took, Calculus I - well, I have struggled with the class during an illness and dropped it. Then I thought I didn't have to pay so much attention to it and passed by it with a low grade (nothing that allows you to move on), and on my last outing I have this to report: CALCULUS IS FUN! Now, I'm sure that anyone passing that remark is doing a Scooby double take but this last semester I took the course with the objective to get an A. I didn't get an A but I'll live receiving a B. And I can only tell you it was because I choked on the final - I don't know why but I've a couple of tips for that too.

If you are taking Calculus this spring here our my steps for getting a good grade:

  1. Read the entire chapter before the lecture.
  2. In the lecture, take notes but leave space between concepts for text notes.
  3. Ask the instructor questions (if you can).
  4. Re-read the chapter and take notes alongside your lecture notes. 
  5. Solve the examples in the book. Don't just copy.
  6. Do the proofs (which probably are the examples) writing them down helps you understand the questions.
  7. Don't do the assigned questions - DO THEM ALL! It'll help your understanding.
  8. Ask questions on the homework — but only on the ones you have attempted. If you haven't done a question and you let the instructor do it then you won't get much out of it.
  9. Re-read the chapter and your lecture/study notes.
  10. Ask questions!!!!!
Those ten things helped me almost get an A. My problem with the final had less to do with the work and more to do with these couple of tips.
  1. When the test is given — give yourself 3 minutes to read the entire test.
  2. Take note of any questions that you know how to answer and don't seem difficult.
  3. Complete the easy question, first. If you spend more than a couple of minutes on the question move onto the next easy question. 
  4. Return to questions not answered.
  5. Attempt to do all other questions.
What happened during my final was that I bogged myself down on what I thought was an easy question but I spent way - WAY - too much time on it. That left less time for the rest of the final and I didn't do too well on it.

Thats it for this New Year's post. I won't post anything about Calculus in the fall since I'm not taking Calculus II till then. I have a new role at my full-time job so and I have training in the morning and they don't offer evening Calculus Classes here.

I will post a stupid idea of a short story I can't get out of my head — so far it's titled: Earth Movers Universal, Inc.  (which is odd because I usually don't title till a story until I've completed it).

30 June 2009

Where have you been?

Well, it's not like I have a ton of subscribers reading this blog. It seems to be more for my vanity than anything else. Of course, if I would update this on a more regular basis maybe I'd generate more interest. Nonetheless, I was reading up on some news in my RSS reader when I came across this little tidbit over at techdirt. It seems that Obama is falling into the same trap as everyone else, mainly, that video games are making our children obese and that we should encourage them to put down the controllers and play outside. Well, someone over at techdirt found and interesting article stating that Chess was doing the same thing to our poor kids. Of course it was written in July 1859 issue of Scientific American. I found this to be entertaining to say the least. Also, in a similar vein. Go over and listen to PRI's the World Tech Podcast, they have a interesting report regarding today's kids being dubbed Generation Google. Unlike Generation-X'ers, of whom I'm a part of this group, kids aren't watching more TV but are using the Internet more, and it's not necessarily a bad thing. Why? Because they are learning to collaborate more, are doing their homework, and know how to find information better than the previous generation of kids. All very interesting tidbits.


26 May 2009

Hypersonic Sound

You don't get to hear anything but this is the guy that came up with Hypersonic sound. It was mentioned in an awesome book called, The Daemon, that I just finished. It sounded Sci-Fi but it the end it is a real technology.

Powered by ScribeFire.

41 years old and I want to play with Legos

Okay, I never had the Legos Mindstorm Kit but man does this post over at boingboing.net really makes want to go out and build Lego robotic devices.


Powered by ScribeFire.

24 May 2009

The Banned Book Library

There is a great post over at BoingBoing.net, about a kid who started keeping banned books in his locker. I think that it's awesome that he has started to encourage others to read the classics. Whenever I hear of anyone banning a book all I can think about is a great book by Ray Bradbury, Fahrenheit 451, it is the reason why the moment a society bans one book or censors speech that society finds objectionable it starts the ride down the slippery slope towards a police state.

Books should be read, not burned.

Powered by Qumana

23 May 2009

Data Overload

I found this on the New York Times Technology page. It is an interesting article about the government and the data that it has collected. The Unites States has been publishing this data for years electronically, and on paper. The CTO for the government is now putting more data on the web and even asking citizens to rate how useful the data was that found. This small blurb I found interesting. By rating the data, the government can create data about what is useful and what isn't. The opens it up for a couple of questions that I have: If most people don't find a particular data set useful will the government stop collecting it? Or will it stop offering the data at all?


Either way just because some piece of data may not seem relevant right now doesn't mean that it won't be relevant at some future time. I don't mind that the government is rating their data but what will it do with the metadata (data about the data)? Will that be for our consumption? What purpose would there be to major waterfowl flyways? Doesn't seem all that interesting, until you decide that you want to build an airport. With the airplane accident in New York last year, that seems to be incredibly interesting data to look at if your building a new airport.


Data is interesting but it might not be interesting to everyone. Rating is a really good idea because it lets you know what people find useful. My biggest fear though is stopping to collect certain data sets that my appear to be not useful. And the reason to stop collecting the data is to save money on the budget. This is congress constant push regarding the budget. Members question throwing money at science research projects like the life cycle of the fruit fly. So they stop funding the research, and just increase the use of pesticides on orange trees to kill them. Twenty years later the incidence of cancer goes up and no one know why. That is an extreme thought experiment but that is really the entire concept of collecting data sets in the first place. We may not know what it means now but I can bet that given enough time something relates to that data set. And it can probably help us in the future.


Removing data sets or stop collecting data on particular data sets can be harmful. We just don't know. So again I ask a simple question, what is the government going to do with data that is considered not useful?


Powered by Qumana

Powered by ScribeFire.