• Home

  • Custom Ecommerce
  • Application Development
  • Database Consulting
  • Cloud Hosting
  • Systems Integration
  • Legacy Business Systems
  • Security & Compliance
  • GIS

  • Expertise

  • About Us
  • Our Team
  • Clients
  • Blog
  • Careers

  • VisionPort

  • Contact
  • Our Blog

    Ongoing observations by End Point Dev people

    In Our Own Words

    Steph Skardal

    By Steph Skardal
    February 2, 2011

    What do our words say about us?

    Recently, I came across Wordle, a Java-based Google App Engine application that generates word clouds from websites and raw text. I wrote a cute little rake task to grab text from our blog to plug into Wordle. The rake task grabs the blog contents, uses REXML for parsing, and then lowercases the results. The task also applies a bit of aliasing since we use postgres, postgreSQL and pg interchangeably in our blog.

    task :wordle => :environment do
       data = open('http://blog.endpoint.com/feeds/posts/default?alt=rss&max-results=999', 'User-Agent' => 'Ruby-Wget').read
       doc = REXML::Document.new(data)
       text = ''
       doc.root.each_element('//item') do |item|
         text += item.elements['description'].text.gsub(/<\/?[^>]*>/, "") + ' '
         text += item.elements['title'].text.gsub(/<\/?[^>]*>/, "") + ' '
       end
       text = text.downcase \
         .gsub(/\./, ' ')   \
         .gsub(/^\n/, '')   \
         .gsub(/ postgres /, ' postgresql ') \
         .gsub(/ pg /, ' postgresql ')
       file = File.new(ENV['filename'], "w")
       file.puts text
       file.close
     end
    

    So, you tell me: Do you think we write like engineers? How well does this word cloud represent our skillset?

    company analytics ruby


    Comments