Archive

Archive for the ‘Sci-Fi’ Category

Tech Geek — Adventures in Objective C Land

April 2nd, 2009 1 comment

Thank you for your patience with all the Sports-Geek posts of late, but its a subject near and dear to my heart. To make up for it, lets go really geek and deal with computer programming.

I am a programmer. It’s what I do. It’s what I’m good at.

Now I’m old school and its really hard for old programmers to learn new tricks. As you age in this field, it becomes harder and harder to adapt to new concepts. I first observed this phenomena early in my career as I watched my boss, who grew up in the punch card / batch processing world have trouble adapting to a world of PCs and interactive systems. He was eventually promoted out of the way. I now see the same thing happening to me. Though I pursued moving from a Support Developer to a Product Trainer, I’m now in a similar position where I’m letting the young’en’s do the programming, letting the new technology pass me by.

I can clearly identify where my downfall began. Object Oriented Programming.

I learned programming in the days of procedural programming. That is we designed our programs using sub-routines and functions. These blocks of code performed specific functions. Data was kept separate for most parts and in things called structures. Life was easy.

A new model developed where code and data kind of merged into things called “objects”. So instead of having a string data type and having functions to get the length, find a chunk (substring), etc. as separate parts, you now have a string object and not only does it have the data for the string, it has the different methods of manipulating it. The object contains the length method or substring method. It was a different way of thinking.

Now I fully understand the idea behind object oriented programming. And I can work comfortably with objects in JavaScript, Perl, C++, though I feel I would be hard pressed to build a major project in an object oriented environment.

One of the big limitations for me is the terminology. There are so many new terms and this old brain doesn’t want to learn them. Which leads me to where I am today.

This week I had a chance to participate in an iPhone application discussion. I’ve had a Mac for almost two years, and beyond some web code, I’ve not written a single Apple app. Not a drop of Applescript. I had Xcode, the Apple Development environment loaded all most the entire time. But real life has kept me from getting down to learning this new environment.

So with this opportunity to mess with an iPhone app, I decided this was a good time to get in and wrap my hands around this and try to upgrade my skills a bit. This is where I hit a major brick wall:

Objective C

Now I can write in the programming language ‘C’ in my sleep, even though I’ve not had a serious project in it in years. ‘C’ is an old language that came out of Bell Labs in the late ’60′s as part of their Unix environment. It became the most dominate language throughout the mid ’80-s through early the 2000′s. Its cryptic. Its powerful. It produces great machine code.

With ‘C’ being so popular, many of the modern languages are derived from it. ‘C’ had a major short coming. Its a procedural language. It knows squat about objects. The Object oriented programming crowd had some languages to use, like Smalltalk.

With ‘C’ being so popular, there were several attempts to objectify it. This produced ‘C++’ which is ‘C’ with objects. Java, is a very ‘C’ like language but it was constructed with Object oriented programming in mind. As web browsers needed a scripting language, we got JavaScript, not that related to Java, but its more of a scriptable ‘C’ with objects. We got PHP for webside scripting which had objects rammed into it later in its life. Flash apps use a ‘C’ / JavaScript like language, ActionScript as its scripting language and is fully object oriented today.

Around the same time that C++ was being worked on, another group was creating Objective C which involved adding some key features from SmallTalk into C. Steve Jobs after he left Apple to Form NeXT, licensed Objective C as the native language for NeXT. Apple ended up acquiring NeXT which lead to the modern OS X operating system. Objective C is tightly embedded to anything Apple today.

I know ‘C’. I don’t know Smalltalk. Objective C is ‘C’ for most stuff, Smalltalk for the objects. So when I went to learn how to write an iPhone App, I was immediately thrown for a loop. What was this alien syntax? I thought my head was going to explode.

Now this project was part of a monthly development practice where everyone takes an idea and tries to produce something that day. It gives developers a chance to work on things that normally wouldn’t get a chance to work on; a chance to make proof-of-concept; etc.

As a product trainer, I would not normally participate in this practice, but we wanted to see if there was anything that could benefit us in the training department. So I took this opportunity to participate. I went and got the iPhone SDK and installed it and dove in.

The first thing any good programmer is going to do is build the traditional “Hello World” program. After about an hour of struggling with a tutorial to build “Hello World” and dealing with this strange syntax I was running around screaming:

“I long for the days of
10 PRINT “Hello World”
20 END”

No, this huge project was loading in all kinds of framework and was creating models, views, and controllers and passing messages. While the code I had to create wasn’t that much, it was quite a bit to see the words “Hello World” show up on the iPhone simulator.

I didn’t quite understand everything. There was a lot of new terminology: Bundles and Delegates to name a couple. Now I was feeling pretty good about things because I managed to get one of our website’s mobile sites loaded into a compiled iPhone app after an hour of modifying “Hello World” without a lot help. Then it tanked. My next task was to determine my current location from the GPS and find the nearest business unit to the phone and show it.

By the time I left, I was still having it crash trying to get it to connect to my webserver to request the location information. Most of the day was spent trying simply construct the URL by converting the Latitude and Longitude to a string. Hours. Oh, yea, the String object can’t be changed, you have to use a Mutable String if you want to change it. Why can’t I simply call sprintf() and be done. The simple task of appending two strings together is a pain in the rear.

Now to put this in perspective, I developed a simple web service that when passed your current location, it returns you the business name and website URL, written in PHP in about 30 minutes. For this simple service I didn’t need to make it database driven, just an array of values, but it was working, tested and debugged in a very short time.

Admittedly my biggest hurdle was the Smalltalk syntax. I’d eventually get delegates and views and such figured out. But the square bracket syntax and variable passing was really confusing to read.

Well today, I spent a few minutes, going back to square one were I was reading the Objective C beginner’s guide when I came across a passage.

Objective C supports “dotted” notation.

Dotted notation is probably the most common way, ‘C’ like languages deal with objects. Wanna work in Java? C++? JavaScript? They all use the standard “dotted” notation. That is:

object.instancevariable = value;

or

value = object.method(parameter);

instead of:

[object instancevariable:value]

or

value = [object instancevariable]

So what the frak are people doing using this non ‘C’ syntax in a ‘C’ language.

Alas, if I’m going to write Apple code, I’m going to have to conform since all examples are in square bracket syntax.

I have to admit after spending some time with the beginner’s guide today, the square bracket syntax isn’t that hard and I think if I spend some time with it, it will be a quite capable language. But that shouldn’t surprise any one who’s used a Mac with OS X.

Maybe this old dog can learn something new!

Sports Geek — Who should Kentucky get for their next coach?

March 27th, 2009 8 comments

Today the University of Kentucky athletic department and the men’s basketball head coach, Billy Gillispie separated ways. The separation was announced at a 4:30pm press conference after several days of speculation. You can follow the Lexington Herald-Leader’s coverage here!

There are numerous reasons why they needed to part ways but they can all be summed up with the fact that the program was going in a direction that Kentucky did not like and Gillispie was not the right coach to change that direction. Tubby Smith drilled a hole in the bottom of the ship and started it sinking. Gillispie was brought in to try and plug that hole, but the ship was still sinking. Now Kentucky needs to find someone who can save things.

But who will that be?

Florida’s head coach, Billy Donovan has been mentioned. He has built a strong program at Florida, a football school. Donovan is a Rick Pitino protege having been his assistant at Kentucky during their magical run. Is he interested? Would he fit in at Kentucky? Even with his National Championship, he is high profile enough? Can he be consistent? Florida didn’t make it into the NCAA tournament this year. That folks is a huge red flag. If Billy G’s failure to make the dance got him chased out of town, why do we think Billy D will be any different? He does come with strong UK cred having been a well respected assistant.

On the subject of assistants, does Kentucky court Leonard Hamilton, the current head coach at Florida State? He was Joe B. Hall‘s long time assistant at Kentucky? He’s partially responsible for one of the banner’s hanging at Rupp Arena with the 1978 National Championship. On the other hand, 1979 was an NIT year (though in fairness, it was a 40 team field, not a 64 team field, so it was harder to get to the big dance. Again, Hamilton doesn’t have the name power to bring in the McDonald’s All American’s needed to be a consistent Top-10 team. Also a major Geek negative, Hamilton’s Wikipedia page is abysmal. If a coach doesn’t have a decent Wikipedia page, how good can he be anyway?

How about convincing Rick Pitino to come home? Joanne will never go for it. So he would have to commute the one hour drive from Louisville to Lexington. I’m sure a private helicopter would be ponied up to make it happen. Arizona is reported to be chasing Pitino, but I doubt Joanne would put up with Tuscon if she couldn’t handle Lexington. But with Pitino just getting Louisville back to national prominence (sure Louisville wants to be a Football School!!!) he would be a fool to win and run.

Pat Riley? He could do the job, but has no interest in college basketball. He’s too used to life in Hollywood East, er. Miami. Lexington would be too simple for him.

Coach K? He would be met at the border with loaded shotguns. Roy Williams? He is the new evil overload of college basketball (though you have to respect him. He is a very good guy to be the arch-devil…..) but he is so happy at UNC, he wouldn’t give it consideration.

Jim Calhoun? The NCAA is looking at his program at UCONN for rules violations. Kentucky can’t risk that route.

John Calipari? He certainly puts together winning teams. He’s yet to win the big one, and in each of his coaching stints, he’s needed two to three years to get the teams to the NCAA. He has the most wins behind Roy Williams among active coaches. His two college jobs lasted 8 and 9 years respectfully, so based on his history, he may be ready to move on.

Bring Bobby Knight out of retirement?

Who ever it is, it can’t be someone who has built a low pressure school to making the dance. He has to be a proven winner. Someone who consistently, year-in and year-out produces a champion. It has to be someone who can thrive under the extreme pressure that is the Kentucky Basketball faithful yet not mind living in a small farm town. Kentucky doesn’t need a builder, it needs a star and those are few and far in between.

What do you think? Chime in by posting a comment on the blog.

Star Wars Quiz — Survivors

February 23rd, 2009 1 comment

Okay this will be a short post. Hopefully it will be a fun one.

How many characters introduced in movies I, II, and III are alive at the end of VI (that would be Episode 6 Return of the Jedi)?

Dead Jedi ghosts do not count. They are dead.

No cheating and looking at other comment answers before you post, then you can go back and read everyone’s result.

Categories: Sci-Fi Tags: , , , ,

#BSG – A Geek Tragedy

January 17th, 2009 5 comments

Its nine minutes until 10:00pm on a Friday night.  It may be the nine most antagonizing moments in a geek’s life.  That is because this Friday night is a very special night for geeks around the world.  For in seven minutes now, the final season of Battlestar Galactica will start with the season premier.  For many of us, we are currently watching the last episode of last season.

Its with baited breath that we wait for the beginning of the end of what may very well be the best drama on television that no one watches, except for us geeks.  Ten episodes remain to answer last seasons cliff-hanger and to answer questions that have been nurtured through the entire series.

Many of us grew up with the original series in the 70′s.  It was cheesy TV sci-fi.  The special effects were cutting edge for the time but they reused the same combat sequences over and over.  The characters were ones that we fell in love with.  But it was a show of lightly connected individual shows.  The characters, though we loved them, were shallow and perfect.

When the Sci-Fi Network announced the new series and we got a glimpse of what was to come, we saw a very edgy, updated series that trampled on several pieces of gospel from the original series. The prime example:  “What the frak?  Starbuck’s a girl?” blazoned forums and chat rooms.  It wasn’t just a remake of the one Character.  Major important plot lines were changed.  Cylons now existed in two models, the old tin can’s from the old series and new “Human” like models.

This change turned off a lot of purists, but for many we latched on to the new series with a passion.

Accepting change is hard for many people.  But many times change is good and for those who stayed with the show, they have found a true gem.

Unlike the ’70′s series, the characters in this show are complex and well thought out.  Almost all have major quirks or dark twists.  For instance, the character “Apollo” in the 70′s was a hot shot fighter pilot and an all around “Captain America”.  This version of “Apollo” is a guy name Lee, who’s fighter call-sign is “Apollo” and he’s one angry and torn character.

In addition to these great characters, the cinematography is edgy and as dark as the characters and plot twists.  It is shot in a fashion that has a very editorial / documentary feel to it which helps the viewer tie in to the show even strong.

But more importantly the story has and is intriguing.  Its a show you have to watch from the beginning.  The episodes are so intertwined its very hard to pick it up in the middle.  Luckily for those interested, DVD’s of the previous seasons exist.  There are only a hand full of episodes that stand alone.  The long term questions are not over played but carefully weaved into the short term situations the cast finds themselves.

The problem is this show is never going to be known by the masses.  Sure, its tucked away on the Sci-Fi channel, which most people don’t get unless they have digital cable, DirecTV or Dish, but the fact that its a sci-fi show is an instant reason to turn away.  Science scares people who don’t love it.  Add the fiction twist and its just too much for non-geeks to enjoy.  They will never know how great this series is.

In a way I’m glad that this has stayed on Sci-Fi.  Had NBC tried to bring it to network, we would have ended up with another “Bionic Woman” failure, where “Suits” would micro-manage the show to a total train wreck killing the wonderful freedom the directors have had in creating this dark, deadly, dreary darling of a show.

Battlestar Galactia is an expensive show to produce.  The cast, save a couple are not household names, is large.  There are dozens of main characters and dozens more in supporting roles.  The Special Effects, space scenes, variety of sets all have the feel of a big budget Hollywood production.  No wonder the show is coming to an end.  An expensive show on a station that few people watch can’t go on for ever.

So its with sadness that we know tonight starts the beginning of the end, but for the next 9 episodes now (the 1st show of the season is now over and all I’m going to say is “Wow”) we can loose ourselves in this show that is a much better drama than anything shown on the big 4 networks.  Yes, its better than CSI and better than Desperate Housewives but the masses will never know.

Or never care.

*Sigh*