11 July 2010
Spain Wins! My favorite team loses! Uggh!!!
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!
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)
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[1] = 'a';myString[2] = 'k';myString[3] = 'e';myString[4] = ' '; // spacemyString[5] = 'S';myString[6] = 'u';myString[7] = 'l';myString[8] = 'l';myString[9] = 'y';myString[10] = '\0'; // null*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
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
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
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!
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:
- Read the entire chapter before the lecture.
- In the lecture, take notes but leave space between concepts for text notes.
- Ask the instructor questions (if you can).
- Re-read the chapter and take notes alongside your lecture notes.
- Solve the examples in the book. Don't just copy.
- Do the proofs (which probably are the examples) writing them down helps you understand the questions.
- Don't do the assigned questions - DO THEM ALL! It'll help your understanding.
- 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.
- Re-read the chapter and your lecture/study notes.
- Ask questions!!!!!
- When the test is given — give yourself 3 minutes to read the entire test.
- Take note of any questions that you know how to answer and don't seem difficult.
- Complete the easy question, first. If you spend more than a couple of minutes on the question move onto the next easy question.
- Return to questions not answered.
- Attempt to do all other questions.
30 June 2009
Where have you been?
26 May 2009
Hypersonic Sound
Powered by ScribeFire.
41 years old and I want to play with Legos
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.