Wednesday, March 18, 2009

IBM to buy SUN??

My dad called me this morning about the headlines today that say "IBM to buy SUN."  This took me buy surprise as it has obvious direct implications for me.  While this is possible ... I think this may be more of a marketing move to raise interest and sales in a bottom scrapping market.  The companies run parallel in a lot of their directions (opensource, servers, unix, green initiatives), they also have completely difference business strategies that an acquisition of this magnitude would come with way too much overhead.  While I am not a business guy, it would be interesting to see how the brass @ Microsoft would react to this.  Because if it works MS could be the next acquisition for big blue.

(These are solely my views and do not reflect the views of any of the companies mentioned  [Insert legal jargon here] )

Monday, March 16, 2009

Your creativity is on loan

The TED Conference (Technology, Entertainment, Design) is a conference where basically  famous/successful people from all areas and disciplines give keynote speeches.  The theme of the conference, according to wikipedia is "ideas worth spreading." These conferences are usually held in a Palm Springs or places like that.

[[A lot of the talks available for your viewing pleasure online.]]

The first talk I listened to and found talk enlightening was by Elizabeth Gilbert entitled: A different way to think about creative Genius.  While I don't agree with everything she says I think her ideas can stir up a good discussion between artists.

She just had an extremely successful book and she is now worried, and reminded by people that she may never have another successful book.  So she went on a search for creativity.  Here are some notes:
  • The Greeks and Romans believed that creativity was given by a magically divine, and disembodied entity.  The Romans called this Entity a Genius.  This protected people from taking the glory/blame for creative ideas.
  • The Renaissance brought the idea of creativity being from self.  People began to be called Geniuses.  This brings pressure to artists.
  • She said this better explains the capricious creative process.  It is unpredictable.
  • She continued to give examples of successful people who believe in this genius.
  • We should think about our creativity on loan.
  • We should continue with our human mule like stubbornness to continue to go to work.

This is talk is an answer to a prayer of mine.  I spent almost all of Saturday trying to debug one of my projects.  At the end of later during my quiet time I questioned whether or not wasted my time, especially because I made almost no progress.  I do believe that all of my success thus far is not of myself but of God.  I find a lot of things whether programming, sports, attaining positions - I will complete then look back and see that was unexpectedly easy.  Then on the other hand when I am stuck on something I will stay stuck on it, and If it gets unstuck I won't be able to tell how it because unstuck.

It's like opening a jar.  You try and twist and twist and it wont open, so you hit the edge of the jar against the door a bunch of time, but that doesn't seem to work.  Then at one point you twist and the jar inexplicably opens.  You don't know which of the times when you hit is the jar actually became loose, you just know  that the jar was once closed and now you are able to open it.

We will probably never know the exact moment or what in particular caused us to pass certain thresholds.  We will achieve things and look back and not really understand why.  So the times when we are struggling we should not give up or loose hope.  2 Timothy 2:15 says to "Study to show yourself approved unto God, a workman that needs not to be ashamed..."  Also, Colossians 3:23 says "And whatsoever ye do, do it heartily, as to the Lord, and not unto men..."  

Below is the Video:



Sunday, March 15, 2009

OpenSolaris @ Florida Linux Show

I just came back from a talk at the Florida Linux Show at Jacksonville, Florida (University of North Florida).  Here is a Bio they posted about me.

Because my car was out of order, I called my Account Manager Tim Simmons and he came to my rescue picking me up from my apartment in Gainesville and driving all the way to Jacksonville and back.  It was a nice time to get to know him and his expereince working at SUN.

Also, Martin Brown the Campus Ambassador at FAMU made the trek across the panhandle to the first coast to support me in the talk.

I knew I was going to speak to an audience of linux enthusiast so I decided to speak about Open Solaris and what it has to offer with respect to linux in general.  I made my slides from pieces of Open Solaris slides all over the web.  (I will make my slides available to CAs on http://www.sunambassadors.com/

Most people were impressed with the features available in Open Solaris.  The biggest misconception I corrected was the advancement of OpenSolaris's package management system.  Most people don't know that Ian Murdock (the Ian in Debian, the linux distro that introduced packagees) is helping to design Open Solaris.  The biggest wow factor I got was the time slider and the ideas driving ZFS.  If I had more time I would have went more indepth about ZFS and Zones.

I was suprised to see the amout of people who have used the open source music player SongBird.  Also, people seem to prefer VirtualBox as their virtualization tool.

I love giving open solaris talks and impressing people with all the features in the OS.  It is always a bummer to confess to people that it still is not mission ready yet, and they should run it on virtual box first.  I am hoping the 2009.6 version will be much more stable and ready for installation on my machine.

Below are some shots of the sun team that represented at the Florida Linux Show.








Wednesday, March 4, 2009

How angry is God?

A lot of people take the account of Jesus chasing out the money changers (Mark 11:15) to be an impulsive act of wrath.  However, a couple of verses before in Mark 11:11 the Bible says that Jesus went into the temple and 'looked round about upon all things.'  

Of course the verse doesn't say that Jesus saw the money changers and did nothing but this may be inferred.  Also, I am not sure if he visited the temple on the Sabbath in which case may mean the temple may have been empty.  

But verse 11 this does take away from that prevalent thought that Jesus's anger is harsh and rash.  Instead, it makes this account seem more like a chastisement than a raging attack.

A lot of people have this idea of God being a harsh, lightning striking, menacing big brother when in fact He is more similar to a loving, giving, and understanding Father.  Lamentations says that His compassion's are new every morning, and his faithfulness is great.

If you have an issue trusting God, know that he has called you to be in a relationship with him.  He is good to the soul that seeks after Him.  Come to God, he showed his great love already by dying for you.

Tuesday, March 3, 2009

Web Object Grabber in Python

I had a goal to write a simple Python functions that takes either a url or html document and an XPath query and returns the queried element. This was surprisingly difficult.

After researching some through some blogs I decided to go with lxml. I also installed beautiful soup which supports the parsing of html that is pretty far from structured. I needed to use something that is as system compatible and os independent as possible. I was testing on Ubuntu 8.10.
sudo apt-get install python-lxml
sudo apt-get install python-beautifulsoup
I'll go step by step through the lines of code I wrote give comments

from lxml.html import parse
root = parse('http://www.hotels.com').getroot()
or
root = parse('hotels_test.html').getroot()
The above code first imports the parse function from the appropriate package. The parse command takes either a url or a file name as a parameter. One note about taking in a URL is that websites do not produce the same html as your browser, hence the second argument. I saved the html in a file and parsed that instead. The command .getroot() is called on a document object and returns the HTMElement at the root of the document (<>).
x = root.xpath('/html/body/div[2]/div')
The above command is the magical statement I wanted to return to me the node in the document which corresponds to that XPath statement. HOWEVER, lxml does not support the position elements ([#]). This is a big monkey wrench in my plans and it requires a significant work around. The naive method is to replace all the elements containing ' [#]' with the descendant operator ('//'). The does grow the size of the result set.

I am currently thinking of solution which elegantly fit in my methodology. I would love suggestions!! Below are some websites and resources I used and recorded.


Update
It turns out that in order to properly specify which in a number of elements an xpath is specifying you need to put parenthesis around the xpath string.

Instead of:
x = root.xpath('/html/body/div[2]/div[3]/li/ul')

we have:
x = root.xpath('((/html/body/div)[2]/div)[3]/li/ul')

This seems to work fine.


Update 2:

I was grabbing XPath's via Firebug... but it seems like either Firefox or Firebug change the the underlying DOM for some reason.  Now I need to make sure I either get the transformed HTML or an XPath query which built from the source html.