Capturing and Extending Algorithms with the Template Method

When you think of the word algorithm what comes to your mind? Most people think they are something super complex like high frequency stock trading, Google’s Page Rank, or Facebook relevance algorithm.

These algorithms are all very complex and have taken years to create and tune, but the definition of algorithm might surprise you: The definition of algorithm is the following:

Algorithm – a step-by-step procedure for solving a problem or accomplishing some end.

Merriam-Webster

Millions of Algorithms

We all follow algorithms everyday, our lives are a composite of millions of algorithms. My typical morning algorithm involves the following step-by-step procedure:

  1. Wake up
  2. Workout
  3. Eat Breakfast
  4. Drive to work

Sometimes my morning algorithm needs to change. If I am late for work I usually follow my late morning algorithm which looks something more like this:

  1. Wake up
  2. Workout
  3. Quick Breakfast
  4. Drive to work

Just like humans computers sometimes need to be able to adapt their algorithms on the fly. One of the best ways to encapsulate these changes in behavior is using the Template Method Design Pattern.

Template Method to the Rescue

If I were to create my morning routine in some ruby code it would look like this


class MorningAlgorithm
# This method is used to encapsulate the algorithm's general process.
# Notice this method is not concerned how the methods are accomplished
def execute
wake_up
workout
eat_breakfast
drive_to_work
end
def wake_up
puts "Get up you lazy bum"
end
def workout
puts "1, 2, 3… That should work"
end
def eat_breakfast
puts "Mmm mmm tasty"
end
def drive_to_work
puts "Good morning crazy drivers!"
end
end
morning = MorningAlgorithm.new()
morning.execute

The high level steps are encapsulated in the execute method which handles the flow of the algorithm without knowing anything about the implementation of the eat_breakfast or drive_to_work.


# This gist is a continuation of a previous gist which defines the MorningAlgorithm class
# https://gist.github.com/jpotts18/1f4269c9e1f22c963a0d
class LateMorningAlgorith < MorningAlgorithm
def work_out
puts "Nope…"
end
def eat_breakfast
puts "Grab banana and go!"
end
end
late_morning = LateMorningAlgorithm.new
late_morning.execute
# The LateMorningAlgorithm.execute template method will call the following methods from the following classes
# wake_up – MorningAlgorithm
# work_out – LateMorningAlgorithm
# eat_breakfast – LateMorningAlgorithm
# drive_to_work – MorningAlgorithm

The templates method’s responsibility is to enforce behavior not implementation. Now lets take a look at what the late morning algorithm looks like.

  • MorningAlgorithm#wake_up
  • LateMorningAlgorithm#workout
  • LateMorningAlgorithm#eat_breakfast
  • MorningAlgorithm#drive_to_work

This is where the power lies! By using the template method you can encapsulate a lot of your base logic into a class and choose to override methods however you would like.

Real World Application

Let’s say that we need to gather a bunch of data over HTTP from two different datasources. One is an HTML table on a website and the other is a JSON API. The data sources will be different but the primary process is the same:

  1. Create a folder to store the data
  2. Download data and put it in the folder as raw text
  3. Read the data from the folder and parse data
  4. Write the parsed data to a CSV

If you didn’t understanding theTemplate Method you would simply start hacking together two completely unusable scrapers, but because you now know better now you would structure the classes something like this:


class WebScraper
def execute
create_folders
download_data
parse_data
write_output
end
def create_folder
# Make directory
end
def download_data
# Initialize Http client
end
def parse_data
# Find all rows in table and put them in a hash
end
def write_output
# Write hash to a CSV on filesystem
end
end
class HTMLWebScraper < WebScraper
def parse_data
# customize how to extract the data into a hash and
# let the superclass take care of the rest 🙂
end
end
class JSONWebScraper < WebScraper
def download_data
# initialize JSON client
# save data to filesystem
end
def parse_data
# read from file system
# custom JSON parsing code
# store results in hash
# let the super class take care of the rest 🙂
end
end
html_scraper = HTMLWebScraper.new
html_scraper.execute
json_scraper = JSONWebScraper.new
json_scraper.excute

view raw

web_scraper.rb

hosted with ❤ by GitHub

Now that you know about the template method pattern where have you seen it before? What are some cases where it isn’t good to use the template method?

Developers and Uncaptured Value

Many developers will preach a Rework-esque world of product development where you focus on keeping your feature set small and relentlessly curated until you understand perfectly the customers pain.

They might even go to the extreme of saying that if a customer wants something that doesn’t fit your product then they should be encouraged to leave.  Many developers subscribe to the notion that if you build the perfect software people will use it, fall in love, and never leave. Their general philosophy is that if you consistently focus on creating value the product will “sell itself”.

One prime example of this mentality is the App stores where developers spend thousands of hours developing apps for free with the hope that you will eventually suck it up and pay 99 cents. But the sad part of the story is that most of us won’t end up buying anything. 98% actually wont buy the app even though they might use it every day!

Because developers are so entrenched in creating value they don’t think about the importance of being able to capture the value. When the app doesn’t start making them money they immediately think that their must be something wrong with their app. But the problem is rarely the app. It is the fact that they have failed to explain and capture the value that they created.

I bet that if you were to ask someone at random the question, “who has made the biggest impact on technology in the last 10 years?”. The name would probably be Steve Jobs or Bill Gates. But I would argue that both of them were actually experts at capturing value than creating it. Jobs knew how to capture 2x the value of a Windows computer. Bill Gates knew how to capture value which he makes very apparent in his letter Open Letter to Hobbyists.

In the technology industry the most prolific names are not Linus Torvalds and Richard Stallman. I would argue that Linus and Richard have created more value than most developers can even imagine, but Bill’s and Steve’s bank accounts and media coverage would prove that they knew how to capture it.

So when you sit down to write your next application remember that creating value is one battle which requires great engineering ability, but explaining and capturing the value of technology is equally as important. In the long run the ability for you to capture value will allow you to create more value.

Which have you found more important, creating or capturing value?

Becoming a Father

I remember being in awe as Owen finally born. It was around 10:08 on Wednesday August 19th. He was covered in meconium and needed to be given to the NICU team as fast as possible. I was with him at a side table as they cleaned him off and suctioned out as much meconium as they could get. I remember taking pictures of him and feeling this incredible peaceful feeling. I couldn’t stop staring at him. Even being covered in his own meconium he was still the most beautiful and amazing thing that I had ever seen.

Once the NICU team did their initial suction they determined that he needed to have a CPAP but before they took Owen they gave Lindsey the chance to hold him. It was amazing to see Lindsey’s love for him. They looked deep into each other’s eyes like to long lost friends. Neither of them needed to say anything they were both content enough to just look into each others eyes. It was hard to hold back tears as I watched this. Owen was grunting a little bit as he breathed because he still had things in his lungs.

Eventually the NICU team took Owen from Lindsey and they continued to extract anything else from his lungs. I went with Owen to the NICU and I remember staring. I wanted to hold him so bad but I wasn’t able to because of the breathing tubes that he had. After around 20 minutes of forcing air down his lungs he was starting to stabilize more and they removed the tubes. I sat at the side of his bed and remember thinking how amazing it was to see him discovering this new world.

Owen had big beautiful eyes. He was very awake and alert from the beginning of his life. His large blue eyes were always scanning his environment and any new faces. He didn’t cry at all during the CPAP procedure. He whimpered a few times as they inserted or removed the tubes but other than that he was very content to take in as much as he could.

I was finally able to hold Owen after he was taken into the nursery. When I held him in my arms for the first time I wept. I felt so much responsibility, love, and trust. It was as if he was telling me that he knew I could do it and that he loved me. It was a feeling that made me want to be a better man to live up to that trust.

After being around Owen I have noticed the following characteristics.

  • He doesn’t seem to complain that much unless he is very uncomfortable. I think he gets his temperament from his mother.
  • I think he will be very intelligent. He is very quick to learn things. He knows how to take his protective mittens off after several days of wearing them.
  • I think he will really love his mother. They seem to have  a very special bond and he always looks for her whenever he hears her voice.
  • I am never good at playing the parts of faces game, but I think he has my eyes, hair, and Lindsey’s mouth, chin, chicken legs, and temperament.

What does innovation look like in 2015?

Recently I went to lunch with the president of a startup who was trying to recruit me away from my current team. I explained to him that I have a great team and I feel I can spend my time fixing problems and innovating. The word innovation struck a chord with him, and like a good recruiter he tried to explain to me how I could have more freedom to innovate in his environment than in my own. We talked for a while and went our separate ways.

Although the conversation and delicious hamburger have both passed, I have reflected on that conversation several times because I am still not exactly sure what an environment of innovation looks like. I decided to look into the past for a little bit of advice and my thoughts were drawn back to the conditions of the Renaissance.

The Resources

The Medici family was a rich banking family in Florence Italy. The Medici Bank was the most powerful financial institution in the 15th century. The Medici leveraged their social and economic power to rule Florence for almost 400 years.

The family’s incredible economic strength allowed them to focus on trying to fix bigger problems instead of trying to scrape out a living. Their social status meant that whatever they created would be seen by thousands and they could get an audience with whoever they want for attracting talent or business.

So what would be the equivalent of a Medici in 2015? Is it an angel investor? Is it a venture capital firm? A billion dollar check from Elon Musk? I don’t think that resources alone are enough to create an innovative environment. You have to have craftsmen.

The Craftsman

A mound of money, or a billion dollar check won’t miraculously turn into innovation. The Medici knew that to make any kind of legitimate change they needed talented people. They couldn’t just get people who were decent at their jobs, they needed to protect their name and status which meant that even the best would barely meet their expectations. So they actively searched for the most talented people in the world and brought them into their palace.

One of the young apprentices that the Medici was able to attract was teenager named Michelangelo. Michelangelo spent his formative years learning his craft at the Medici palace and surrounded himself with great tutors. He was extremely gifted and was placed in an environment where ideas and feedback flowed freely.

Michelangelo was raised with many members of the Medici family which gave him access to some of the future financial and social leaders of the world. If Michelangelo was only decent at his job, most likely he would have still been a successful artist as long as the Medici’s were in power.

What if Michelangelo had not been commissioned by the Medici family? He would have probably become a great portrait artist in a gallery somewhere in Italy. But without these unique factors the world would have missed out on some of the most prolific sculptures and paintings of all time.

What does a 2015 craftsmen look like? Is he a sweaty programmer in a coffee shop? Is he a seasoned veteran with 20 years of experience? Is it a software consulting company?

The Commission

After the Medici found the craftsmen they would give them a commission. Although it is not exactly clear what the details of a commission from the Medici family were, we can assume that Michelangelo’s rent and food was paid for since he was living in the palace, and his supplies and tools were most likely top notch since money was not an issue.

Michelangelo was placed in an environment where he could create to his hearts content and safely put all of his energy into his work. He didn’t have to worry about finding his next commission, because he knew as long as he focused on quality and being the best he could the Medici family would continue until they ran out of money — so basically forever.

Innovative Environments

So if we try to create an innovative environment in 2015 using the template of the past we would need the powerful social and economic connections, we need relentless craftsmen, and a commission with reasonable stipulations.

  • If the Medici didn’t have the money to solver bigger problems, the luck of finding Michelangelo, or the social status to award commissions for public buildings and churches the Sistine Chapel would be just another church.
  • If Michelangelo didn’t have the ability, mentorship, time, luck, tools, and resources he wouldn’t be one of the worlds most famous artists — or to eventually become teenage mutant ninja turtle.
  • If the commission had told Michelangelo every detail of the sculpture, set an unrealistic deadline, and not given the resources he needed he probably would have just not been interested.
  • Michelangelo focuses solely on his craft and produces only his best work
  • Michelangelo worked with some of the brightest minds in his field and has unprecedented access to the best tools and resources
  • Medici provide guidelines but trust Michelangelo’s decisions and expertise
  • Medici allow an unequivocal focus on quality which raised the standard on art throughout the world

Uninnovative Startups

Unfortunately most of the startups that I have worked with run into the following problems when it comes to innovation

  • Startups are forced to be short-sighted to provide investors with a 10x return in less than 5 years. What if investors looked for returns over 40 years? Instead of making a uber-insta-groupon for cats (you are under NDA now 😛 ), what if startups spent their time solving problems with a long-term impact instead of planning their exit strategies before they have profits.
  • Startups find low-cost, low-quality craftsmen and naively expect high-quality output.
  • Craftsmen are not given the best tools, mentorship, time, or mentors that they need to finish the job correctly
  • Craftsmen are given a precise commissions are not allowed to deviate from plan because they will run out of funding.
  • Startups isolate themselves and their craftsmen and bright minds, because they don’t want their idea to be stolen.
  • Startups commission work that is the minimum viable product but never want to scrap the original. Can you imagine what a minimum viable Sistine Chapel would look like. According to Michelangelo it would be unfinished. It sounds so ridiculous but most companies do this to try to minimize their costs, but what they don’t do is trust an expert craftsmen’s decisions

Conclusion

I believe that I have come up with the following list of things that are required to create an innovative environment:

  • Craftsmen are secure and free to throw themselves fully at their work and create to the best of their abilities. Please not that I didn’t say that craftsmen “feel” secure and free. I said that they “are”. They don’t have to worry about jockeying for equity, office politics, manipulative investors, financial instability, ridiculous deadlines, or isolation from others.
  • Commissions that provide a clear scope and vision while respecting expertise. True craftsmen don’t like having everything draw out for them then spend their time failing over and over until it is “good enough” to collect payment. They want to understand the vision and build something that is better than the investor or the craftsmen could have imagined at first.
  • Investors that acquire the right talent, create opportunities, and take a long-term approach. Investors with this type of vision are not in the business of tossing out a thousand seeds to see which would grow on its own. They focus their energy on a few seeds and make sure that they grow into giant redwoods.

These are my thoughts, but what do you think? What do you think it takes to make a innovative environment? How have you created an innovative environment for yourselves and those you work with?

Sources

http://en.wikipedia.org/wiki/Michelangelo_and_the_Medici
http://www.economist.com/node/347333
http://www.sparknotes.com/biography/michelangelo/section2.rhtml

http://en.wikipedia.org/wiki/Commission_%28art%29

http://en.wikipedia.org/wiki/Sistine_Chapel

Most Important Personal Finance Ratios

Ratios are used frequently to evaluate the health of a business or investment.  Some of these same ratios can be on your own personal finance to help you understand quickly your financial state.  Here are several valuable rations.

Net Worth

Net worth is a comparison to determine how much your assets exceed liabilities.  Net Worth can be applied to evaluate the financial health of an individual or company. The formula for determining your net worth is simple:

Net Worth = Total Assets / Total Liabilities

So what is an asset and what is a liability? Robert Kiyosaki summarized the definition of an asset very simple. He said.

An asset can be anything as long as it has value, produces income or appreciates, and has a ready market. Assets put money IN your pocket. Conversely a liability is anything that takes money OUT of your pocket.

A consistent increase in net worth indicates good financial health; conversely, net worth may be depleted by annual operating losses or a substantial decrease in asset values relative to liabilities. There is no recommended Net Worth that an individual should have, but it should be increasing over time.

Current Ratio

Current Ratio determines whether a person can pay off all its short-term debt with the money it got from selling its assets. The formula for this ratio is:

Current Ratio = Current Assets / Current Liabilities

The word current may look strange to you. In this example, current means anything that you will have to pay in the next month. A simple way to think about this is if I were to take all of my money in savings or checking and pay off my debt how many times could I pay it off.  Typically a recommended ratio is that you should be able to pay for your liabilities at least 2 times.

Months Living Expense Covered

One way to look at wealth, is to ask how long could you live if you were to stop working right now? This is a real ratio that many people don’t think about until they lose their jobs. At that point they start looking through their finances and realize that they can only live for 1 month before they need to get a job. One of the first things that almost all financial advisor suggest is making sure that you have an emergency fund that covers 3 – 6 months of your expenses. This is the ratio that helps you do that.

Months Living Expense Covered Ratio = Monetary Assets / Monthly Living Expenses

Monetary assets means all assets that you can convert into cash within any given month.

Other Ratios to think about

Debt Ratio = Total liabilities/total assets
Long-term Debt Coverage Ratio = Income for living expenses (W-T)/Long-term debt payments
Savings ratio = savings / income for living expenses (W-T)
Gross Savings ratio = savings / gross income

Analysis of Pariveda Solutions HR Practices and Organizational Behavior

Pariveda’s main organizational behavior and human resource policies are centered around developing talent. Bruce Ballengee, the CEO of Pariveda Solutions, decided that the world did not need another consulting company, the world needed better leaders that were continually improving themselves, striving to lift one another, and reaching their goals. He focused Pariveda’s HR policies around developing principles that can be applied in any aspect of life to accomplish a goal. Based on this idea, Bruce’s goal is to develop good, talented people that can give back to the world, not just to the company.

Competing Values Conundrum

The company goal of talent development would naturally cause Pariveda to become a collaborative work environment, according to the Competing Values Framework which is discussed in Organizational Behavior Theory.

Collaborative environments focus on values. They are a community united by shared beliefs. Their purpose is to be a community and to gain knowledge. They practice building teams and developing communities, which they accomplish through training and mentorship. They focus on building trust, are helpful to each other, resolve conflicts, empower others, and encourage participation. They measure their success by employee satisfaction, employee turnover, training per employee, and competency peer reviews. These attributes closely describe Pariveda as a company.

But applying the Collaborative Model of the Competing Values Framework to Pariveda’s organizational behavior sometimes contradicts itself. Pariveda can not be a purely collaborative environment because it must also provide professional services to its’ clients. For example, one company, Dynotech, has been using Pariveda to augment its’ staff for years. Pariveda has provided great technical skill to their workforce, and Dynotech is happy to pay the fees; however, Dynotech will not allow Pariveda to use their management model inside of their organization.

Because Dynotech will not cooperate, many of Pariveda’s employees are not able to gain the experience necessary for promotion inside of Pariveda’s competency review process. This is a contradiction in Pariveda’s collaborative environment, because although Dynotech does follow Pariveda’s management model, Pariveda continues to maintain this account because it is a significant revenue source for the company. Ultimately, the clients provide the income for the company, and the revenue is what allows Pariveda to fosters its collaborative environment.

Unique Hiring Process

One of the key roles of HR in any organization is to procure the right talent. Pariveda claims to hire only the best and brightest by using a grueling selection process to ensure the quality of its’ hires. Pariveda has a selection process that diverges in two unique aspects.

Pariveda’s selection process starts with a behavioral fit interview and a general mental abilities test. These are used to test if a candidate can be trusted with clients and if a candidate demonstrates a capacity to learn.

The selection process deviates from the traditional selection process by using a personality test. The personality test is used to characterize the candidate based on four attributes. The four attributes are associated with letters — A, B, C, and D. “A” represents the range of a person’s independence to dependence. “B” represents the range of introversion to extroversion. “C” represents the range of attention to detail. “D” represents the range of pace of work. An example personality report is shown below.

Although personality tests are not found to predict job performance according to academic studies in HR, they can be used to understand a candidate’s natural inclinations that may not be apparent in an interview. Pariveda uses personality tests to provide a common language throughout their organization. This shared personality language allows people to realize the value of a person with specific traits to work efficiently with each other.

The last way that Pariveda selects for talent is by using case studies. Every candidate must complete a series of case studies that are used to determine the person’s skill level. The case studies are used to test the necessary knowledge, skills, and abilities (KSA) to be successful in the position. Academia indicates that testing the required skills for a position is the most accurate prediction of job performance. Parived has found this to be the most effective hiring method because candidates may lie in an interview, but case studies prove the person’s knowledge and skill through application.

As an employee progresses in the company, they use the same case studies to prove themselves worthy of promotion. The case studies become rights of passage that allow people of similar skill levels to understand and trust one another more deeply. In a collaborative environment it is important for people to be able to rely on each other. Pariveda uses case studies as a test to prove and reveal the ability of an individual to themselves and to their firm.

Planned Career Path

Academia has shown that career path management is very important to job satisfaction. Job seekers are not only looking for a good company, but also looking to see how the job will fit into their career goals. Career path management inside of HR departments is not typical. Some companies have different rotational programs where an employee can try different work to find their fit. However, most employees are responsible for their own career path.

One of the ways that Pariveda tries to answer this problem and attract new talent is through their carefully designed and planned career path. The CEO of Pariveda has compared joining Pariveda to an executive fast-track program. Along with the program, an Expectations Framework has been created to measure employee progression. Pariveda has also linked pay levels to mastery of certain aspects of the Expectations Framework. For example, all of the first level consultants will make the same starting salary. Moving from first level to second level consultant results in a 10% increase in pay. Moving between cohort levels (from a consultant to an associate) is a 20% increase in pay. By joining Pariveda, an employee is given a clear salary expectation and a clear career path.

One of the concerns that has been raised about the Expectations Framework is that it is something that is constantly evolving. As different skills and expectations are identified at different levels, these expectations are added to the Expectations Framework. Each new expectation adds another skill that must be completed to reach the next promotion for every employee. This causes some uneasiness among Pariveda employees because it is as if they are being measured with a sliding scale can be changed to control the speed of promotions inside the company.

Another problem that has been raised about the Expectations Framework is that it has not been tested from college hire to vice president. Because Pariveda is still a relatively young company, they have been forced to seek talent from other companies to fill their management team needs. So although the Expectation Framework has been applied acrossed the company, lower level employees are intently watching the first class of college hires and watching their progression to see if the Expectations Framework can be trusted. Thus far, no one has followed the actual career path from beginning to end, so it is unclear if the career path is as reliable as Pariveda claims it to be.

Conclusion

Pariveda Solutions is a successful company that is accomplishing its HR and Organizational goals of creating a talented workforce. Although it sometimes struggles to support a collaborative environment while maintaining satisfied clients, it provides employees with a clear salary expectation and planned promotions, and uses unique hiring strategies to create camaraderie and trust throughout the organization.

Pariveda Solutions Initial Review

My summer internship at Pariveda Solutions has three main goals. First, to gain an understanding of Pariveda Solutions as a company and potential full-time employer. Second, to become a better software developer through real experience. Third, to experience all that Houston has to offer as a future residence.

Pariveda Solutions has decided to restructure it’s internship program to improve their internship program. They have deemed this year as a “pilot” year for their internship program, and have asked for help and feedback along the way.

For this year’s internship Pariveda has decided to do a project for a non-profit organization in the community. Buffalo Bayou Partnership was selected as the best candidate for the internship. The Buffalo Bayou Partnership, also known as BBP, is responsible for a $40 million revitalization project for the Buffalo Bayou in downtown Houston. BBP plans to turn the Buffalo Bayou into the “Central Park” of Houston.

Pariveda will be helping the BBP by developing a mobile guide for the park’s visitors. Pariveda plans to mentor the interns through the software development process and distribute a mobile application in Android and iPhone to the public by the end of the summer. I will be involved in planning, analyzing, developing, and transitioning the application to BBP by the end of the summer.

The internship team consists of 5 interns, a project manager, and a vice president. This project falls under two of Pariveda’s core service lines– custom development and mobility.

Pariveda Solutions was created in 2006 by Bruce Ballengee. Bruce had already sold a successful consulting agency and was looking into different ideas that could help lower-income people to be able to rise above their circumstances and to become leaders. While he was searching for a more philanthropic business venture, he was approached by an old friend who asked him to start a new consultancy.

Bruce said he would join the team as long as it was “different”, meaning that it would have to take a different approach on the traditional consultancy. He wanted the new consultancy to be an employee owned company focused on developing talent, and have a transparent, collaborative company culture. Bruce felt that these different characteristics would create leaders that could help lift society and fulfill his philanthropic goals.

Pariveda has experienced steady growth since it inception and currently generates around $50 million in revenue per year. The first two offices were Dallas and Houston, with Dallas as it’s headquarters. In the last several years Pariveda has moved into Atlanta, Chicago, Los Angeles, New York, San Francisco, Seattle, and Washington D.C..

Pariveda has nine different “service lines” in their company. These lines include IT strategy, data, custom software, mobility, portals and collaboration, enterprise integration, cloud, customer relationship management, and user experience.

The strategy service line helps organizations align the business with the information technology capabilities. Pariveda’s data service line involves helping an organization collect, organize, distribute, and analyze information. The custom software service line includes software assessment, design, development, testing, deployment, and training, to improve company efficiency, and customer experience.

The mobility service line helps businesses understand how mobile computing and can be leveraged to benefit their company. The portals and collaboration service line helps improve how information is managed and streamlines the communication process in an organization. The enterprise integration service line helps clients obtain a holistic view of the information used to operate the business and identify connections for sharing across the organization.

The cloud service line helps clients build the right cloud solution that scales efficiently, operates reliably, and minimizes the time and effort that is required to maintain the infrastructure to bring value to an organization. The customer relationship management service line helps in managing customer information and interactions to improve customer margins, retention, and profitability. The user experience service line helps to create a cohesive, simplified solution to assist the client’s users to complete their tasks with greater ease and efficiency.

Pariveda’s business strategy is to be located in major cities with strong industries and to partner with industry leaders to provide IT services to them. This helps them be more trusted by companies and retain long-term clients and reduce employee burnout through excessive travel.

Their other strategy is to build the communities and people. They feel that through building their employees and their communities they will attract clients to their company because they are good leaders and they will have an impact on the community.

As part of Pariveda’s career development plan everyone is required to create career development points (CDP). These CDP’s are my goals that are to be accomplished during the internship. I have three goals.

My first goal is to learn more about continuous integration environments and how they can enable a development team to be more effective. I am also supposed to manage the source code repository and work on a good process for repository management. My second goal is to deepen my knowledge of software development best practices by reading a specific blog and discuss the readings with my mentor. My third goal is to deepen my knowledge about Pariveda’s value proposition to clients. I am supposed to understand Pariveda’s major service lines and frameworks.

By obtaining these three goals during my internship, I will be able to create my own learning value from this experience. Each of these goals will be broken down into smaller action items. I am planning on tracking my progress in the companies intranet and on my blog. By the end of the summer I hope to understand if Pariveda is a good fit for my career and family.

Software Development Process (simplified)

Software pushes the limits of possibility in technology every day. This creative potential makes it exciting, but also difficult to manage. The idea behind a new software application may be simple, but creating a system that will react intelligently is a complex problem.

The software development process is a structured process that helps produce software that meets the differing needs of project sponsors, developers, and application users. The software development process allows sponsors to direct the strategy of the software, gives the developers instructions about what to build, and provides the application users with a better product.

The process of software development  is broken down into “releases”. Releases are progressive versions of the software that the public can use. Each release is made up of smaller parts known as “iterations”. The image below describes three main processes in a release —  requirements and planning, development iterations, and deployment. These three segments will be discussed in the following pages. Study this chart carefully before continuing.

image01

Requirements & Planning

It is difficult to build anything if you don’t know what “finished” looks like. Requirements and Planning is the phase when the blueprint is created and the look, feel, and interaction of the product is designed. This phase is the mental creation of the software. It consists of defining user interaction with the application through user stories, estimating the size and scope of the user stories, release planning, and preparing the infrastructure in “iteration zero”.

 image03

User Story Workshop

What is the application going to do? Who will interact with it and why? These different questions are captured in user stories. The user stories follow a pattern of, “As a <who> I need to <what> so that <why>”. These three questions help us understand the different user roles, the things they are expecting the application to do, and the reason behind them doing it.

User stories are the building blocks of an application and they will be used to make sure the goal will be accomplished in user acceptance testing. User stories are typically gathered at one time in a user story workshop. This brainstorming session should produce an end result similar to the image below.

image06

Wireframes

Once the user stories are created, they can be synthesized into a sketched visual representation known as “wireframes”. These wireframes are used to describe how the application will look and the interactions the app will have. It will show every screen of the app with enough detail to explain what happens when people click on buttons, scroll, etc. This is not a polished version, it simply shows the basic layout and design (see below).

 image00

Research and Estimation

After creating user stories and wireframes, the technical feasibility of the stories must be assessed for time and effort estimates. During this process, the developer investigates what can be accomplished and the relative complexity of each task. This process helps developers remove uncertainties and give more accurate estimates of the true time and cost.

image04

Release Planning

Each user story, with its’ estimate, is presented to the sponsor for prioritization. This way the developer give estimates based on their domain knowledge, and sponsors give prioritization based on their strategic vision. As a group, the developers and the sponsors decide what will be in the first release of the application to the users. This is also the time to calculate the amount of time and the cost of a specific release.

Iteration Zero

This iteration is used to set up the infrastructure and technologies that will be used in development. It is also when the technical architecture is planned, documented, and implemented. This process is similar to constructing a house. The foundation, plumbing, and utilities must be finished before construction can be continued.

Development Iterations

In this phase, computer programming is used to turn the plans and designs into a product. This is the process where the developers focus on the chosen user stories and work to implement them in an iteration. It consists of iteration planning, kickoff, daily activities, product demos, and iteration retrospectives. The goal at the end of every iteration is to have a presentable product to show the sponsor, and potentially the end users.

image02

Iterations

Iterations are short time frames that typically last from one to four weeks. Each iteration involves a cross functional team working in all functions: planning, requirement analysis, design, coding, unit testing. At the end of an iteration, a working product is demonstrated to stakeholders. This minimizes overall risk and allows the project to adapt quickly to changes. An iteration may not add enough functionality to warrant a market release, but the goal is to have an available release at the end of each iteration. There are further steps inside the “Daily Activities” section shown in the diagram above, but they are more specific to developers and will not be described at this time.

Deployment

The deployment process follows the each market release. In the case of a mobile application, this is when the application is submitted for review into the Apple App Store. Before the app is submitted, it is important to do system testing and user acceptance testing (UAT). The sponsor examines the completed user stories and chooses whether the story is accepted or not. The end result of the deployment process is to have a downloadable application in a store.

image05

Testing (UAT)

User acceptance testing (UAT) is done by reviewing the previously created user stories and having the sponsor test to make sure the application accomplishes that specific story. This is the way the sponsor is able to understand where the application is in the development process and how many of the user stories are completed. The sponsor may give feedback and make changes to guide the application’s progress.

Production Deployment

Once the product is accepted, the application is released to the public. This could be through submitting it to the Apple App store for review, or publishing it to the web. The production environment needs to be monitored to understand how the app is being used and what changes need to be put into the list of user stories for future releases.

Getting Started with CouchDB

After my previous project in Node.js, I have been interested in a full Javascript stack. In particular, there are two databases that I wanted to investigate. The first one on my list was CouchDB and the second is MongoDB.

Apache CouchDB

Image

CouchDB is a database that completely embraces the web. Store your data with JSON documents. Access your documents with your web browser, via HTTP. Query, combine, and transform your documents with JavaScript.

A CouchDB server hosts named databases, which store **documents**. Each document is uniquely named in the database, and CouchDB provides a RESTful HTTP API for reading and updating (add, edit, delete) database documents.

Documents are the primary unit of data in CouchDB and consist of any number of fields and attachments. Documents also include metadata that’s maintained by the database system. Document fields are uniquely named and contain values of varying types (text, number, boolean, lists, etc), and there is no set limit to text size or element count.

The CouchDB document update model is lockless and optimistic. Document edits are made by client applications loading documents, applying changes, and saving them back to the database. If another client editing the same document saves their changes first, the client gets an edit conflict error on save. To resolve the update conflict, the latest document version can be opened, the edits reapplied and the update tried again.

Document updates (add, edit, delete) are all or nothing, either succeeding entirely or failing completely. The database never contains partially saved or edited documents.

 My Impressions

To get started first I watched this great video on vimeo that gave a great intro to how to interact with CouchDB.

http://vimeo.com/18808177

Basically, CouchDB treats every model or table as a new document database. To pull the information out of the document model you have to use views. These views use Map Reduce to find the information and return them in the response. Map Reduces runs a function that is applied to every document in the database(map) then the results that were mapped are (reduced) down to the specific answers.

Couch seems like a really quick database to get started with. You can curl most requests.

Image

Questions

I still don’t exactly know how it handles joining two different databases. For example, what if I have a company that has many employees. How will I be able to access the companies database and the employee? Like a request to /companies/{id}/employees should return company information with a bunch of employee objects inside.

So it is great that you can curl instructions to the database and that it uses requests over HTTP but can you make the same requests through a socket? I worry about performance over the network. It seems like a socket would provide a larger pipe to send data through.