Archive for October, 2009

30Oct

Other than the awesome costumes today we also had a chili cook off and potluck! We definitely have the best events of any team I have ever talked to. Right now we have a beer bash downstairs. I should probably get to it… I love silicon valley. Place of dreams :)! This blog post is really about me wanting to show off some pics….

Share
29Oct

I think the only thing better than being able to give away free stuff is a lan party… Well luckily I was able to do both at last week’s Windows 7 Launch party at SJSU! There were about 60-70 people there. It was pretty awesome. Completely packed, barely able to move around, and violating many fire hazards I am sure! In any case, it was really fun and everyone there got a free copy of Windows 7, or got hooked up in some way! WOO :).

I gave away copies of Gears of War 2, PGR4, Mass Effect, Halo Wars, other games, some hardware, tshirts and stickers. Also I gave away a signature edition of Windows 7. I think it was signed by Steve Ballmer.

Share
29Oct

So I walk into work today to find the aisle of cubes next to me is full on in Halloween mode. They put up spider webs, tombstones, moving spiders, pumpkins, and TREATS :). This is why I love working at NetApp, and why it is definitely the number one place to work at! I can’t wait to see what they do during Christmas time.

They were spurred by an aisle decorating competition. They really want to win haha. If you look in my aisle it it looks perfectly normal while theirs looks epic. I am thoroughly disappointed in myself :'(!

Share
26Oct

Office lifeBetween buzzwords, mail server explosions and graphics designers falling through there were many issues that reminded me why web development is difficult. The concepts of cloud computing although not difficult to comprehend have infiltrated everyone’s mind and some how as a web developer I should deal with this. How necessary is it for a small business website with global customers? My guess is not very; however, considering the amount of new hosting solutions I suppose it is not too difficult to implement :).

This project reminded me how crucial having a solid team is, how every cog needs to fit right or else another team member ends up taking all the work load. 1 Month with no solid design caused the project to be delayed by two months. I hate getting off of deadlines; however, this one slipped out of my hands. Being the guy in charge has its benefits, but when you need to report to a client you can’t exactly say hold on let me find a new designer. So one thing leads to another and you need to take matters into your own hands.

The First Concept

For a while, I was untrusting and would never let anyone else join my team. About a year ago I started to diverge from that mentality and brought people on board. My first team member proved to be awesome so I decided looking for a designer. I posted an ad on craigslist which yielded 150+ resumes and portfolios in about an hour of which my eyes could only look at about 10 of them. Lots of people looking for experience. I took a bet, and started the person on smaller projects before throwing them into the fire. After a while I realized they can’t take it. Graphics design and art of any kind is tough. You need to learn to take criticism and work with it well. People don’t know what they want, and it is every team members job to try to decipher what someone else wants (just like a developer). Trying to manage everyone’s design opinions is also difficult. I still like my original design  the best (ha).

The final design

I don’t quite know what to make of all of this. Much of this seems pretty obvious; however, I suppose now I will revise my needs for team members. I can’t just have someone who is eager to learn. The passion needs to be there, but it needs to be more than that. Hiring is difficult :(! I now know what hiring managers must feel like at big corporation. They already have great teams, and bringing another person in could break the chemistry. Lets not even get on topic of politics.

On the other hand as a smaller developer I do have some awesome opportunities that employees of larger companies don’t have. For example this BSR website is the first live example of the CakeCMS my team is developing. We have some cool wordpress like features we are currently working on implementing like auto updating and a plugin database with the easy install. Plus we have taken concepts from joomla like their menu manager and AJAX’d it out (that currently works). Also merged tagging with SEO stuff. We have a bunch of stuff on that list!

Conclusions: life is good :).

Check it out: http://www.blueskyresearch.com

Share
21Oct

I have been making tests using Selenium IDE + Selenium RC + Python and trying to get Selenium Grid working as well. I will try to outline what I did in order get a pretty awesome test going. First download selenium IDE (firefox plugin to record your actions), Selenium RC and your choice of Language (I choose python). You can get Selenium here. Also you will need Java and the JDK or SDK whatever they call it.

Start by opening the Selenium IDE in Firefox and then record your test by hitting the record button and navigating around your website. Once you are done turn off the record button. Then play your test back to make sure its doing what you want. Click Options->Format and select the language your want to use. You can integrate this with JUnit or TestNG, but I will make another post about that. I want to try to get this to work with pyunit.

Once you are done, make sure to save your test. Open up the folder you extracted your Selenium RC folder and navigate to selenium-server-1.0.1 and make a bat file in there with the following line.


java -jar selenium-server.jar

Make sure to type this in rather than copy paste, or else it wont work. Now when you click on the bat file it should just start your Selenium RC server and show you a command prompt. If you close this command prompt the server will stop. Now in back in Selenium IDE copy all the code it generated and paste it either in an IDE or text file so you can launch it. Note that if the Selenium RC Server is not running then it will not work and you will get some exceptions thrown at you. One thing I did was tidy everything up, and automate my scripting to batch test a bunch of searches.

So I read an XML file generated by Excel and parsed the data accordingly. Here is part of my source:


from selenium import selenium
import unittest, re, time
from datetime import date, datetime
from xml.dom import minidom

class getParamTest(unittest.TestCase):
   testXML = '../xml/test.xml'
   baseURL = "http://yahoo.com"
   basePage = "/somePage.htm"
   machine = "localhost"
   port = 4444
   #you can add or remove browsers here
   browsers = ["*iexplore","*firefox"]

   def testMain(self):
      courses = self.getAllCourses()
      for browser in self.browsers:
         for course in courses:
            print(course)
            self.getParamTest(course,browser)

   def getParamTest(self, course_name, browser):
      #select local port for the Selenium RC, select the browser, pick the starting URL and start Selenium
      self.selenium = selenium(self.machine, self.port, browser, self.baseURL)
      self.selenium.start()
      sel = self.selenium
      #open the first page
      sel.open(self.basePage)
      time.sleep(5)
      #paste your code here
      #you should always try catch your tests or else you may get some nasty breaks
      self.closeAllWindows(sel)
      self.selenium.stop()
      #end Selenium before trying another test!

   #All windows should probably be closed here. Firefox closes them all
   #Other browsers such as Internet Explorer do not! This will close all
   #Windows selenium knows about
   def closeAllWindows(self,sel):
      names = sel.get_all_window_names()
      while len(names)>0:
      the_window = "name="+names.pop()
      try:
         sel.select_window(the_window)
         sel.close()
      except Exception, (e):
         pass

   #gets a list of all courses as specified by the given XML file
   def getAllCourses(self):
      courses = []
      xmldoc = minidom.parse(self.testXML)
      table = xmldoc.getElementsByTagName("Data")
      counter = 0
      #in an excel XML file everything is stored in dom element data
      #the only relevent info for me was in the third column.
      for item in table:
         counter+=1
         if counter == 3:
         courses.append(item.childNodes[0].data)
         counter = 0
      return courses

if __name__ == "__main__":
   unittest.main()

So I didn’t give you all my test code because it is kind of sensitive. Anyways you should have your own code for that already just paste it where I told you to in the code. One thing to note is then while you use firefox your windows will close automatically once Selenium is stopped at the end of the test; however, IE won’t do that so I found a way to make that happen. You could also use this technique to select nameless windows or popups.

I didn’t have an issue targeting elements on a page; however, if you do consider giving them names in the DOM. If you can’t do that there are usually ways around it. You can use Names, IDs, and maybe even the text present. My main issue was window popups didn’t have names so I grabbed all windows and popped them off of my stack (the last one in is always the last window opened. Another issue is pages not opening to fast. Usually if you insert “time.sleep(5)” or some equivalent waiting thing everything should workout. You should first always try to use “sel.wait_for_page_to_load(“30000″)” where 30000 is in milliseconds; whereas, the 5 in time.sleep is in seconds. Finally, the main method is the one with the word “test” in the front. This method is selected from the unittest class in Selenium as the main method.

Enjoy :-D! Updates coming soon for running tests in parallel and JUnit/PYUnit!

Share