Week 12 — Systems development and procurement

Build or buy, the systems development life cycle, testing and launching a system, an agile method in practice, and how computers read feelings.

← Course map

This week has four short videos. Watch them in order. When a video asks a question, pause it and answer first.

Video 1 · Build or buy?

Buying, renting and building software, the seven steps of the life cycle, and agile teams.

Read the script

Hello, this is Peter Zou. A company needs new software. Should it build its own, or buy one that already exists? Today most companies buy, or rent. This video shows why, and what happens when someone still builds.

Buying is faster, because the software already exists. Many companies no longer keep a team of programmers. The price is less customization. Packaged software fits everyone a little, and nobody perfectly. Buying works best for common business functions, like finance, human resources and payroll. Everyone does payroll the same way. Two more trends. Low-code platforms let people build simple apps by dragging boxes on a screen. And the cloud: rent servers from a cloud company, and pay only for what you use.

When someone does build, they follow the systems development life cycle. Seven steps. Planning, analysis, design, development, testing, implementation and maintenance. Then the cycle starts again.

Step one, planning, ends with a feasibility study. Can we build it? Can we afford it? Is it allowed? Failing here is cheap. Step two, analysis, writes down what the system must do. Every requirement is sorted: mandatory, preferred, or nonessential. A requirement about visual appeal and ease of learning is a usability requirement. The person who leads this step needs to know both business and information systems.

Step three, design, produces the technical blueprint for the whole system. Descriptions, diagrams and models, before anyone writes the real code.

Step four, development, is where programmers write the code. Teams organize that work in three ways. Waterfall: finish each step completely, then the next, and deliver everything at the end. The problem: users see nothing until the end. Iterative: cut the project into chunks, and deliver chunk by chunk. Agile: small teams, very short cycles, and working software every few weeks.

Two famous agile methods. Scrum works in sprints of two to four weeks. The product owner speaks for the customer and keeps a ranked wish list, the backlog. Extreme programming, or XP, releases working software often. It starts from user stories: short sentences about what a user needs. Its four principles are coding, testing, listening and designing. And programmers often work in pairs: two people, one keyboard.

Your turn. Payroll software for a mid-size company. Build or buy? Buy. It is a common function. A requirement about visual appeal and ease of learning. Usability. The technical blueprint for the whole system. Which phase? Design. Next: testing, the launch, and how to buy well.

Video 2 · Test it, launch it, keep it running

Four kinds of tests, three ways to switch on, maintenance, and how to buy well.

Read the script

Hello, this is Peter Zou. The code is written. Now three questions decide whether the project succeeds. Does it work? How do we switch it on? And how do we keep it running?

First, a word about names. The textbook counts testing as part of the development phase. Programmers test while they build. There are four kinds of tests, from small to big. Unit testing: programmers check one small module of code. Integration testing: do the modules work together? System testing: end users and IT staff test the entire system together. Acceptance testing: the users decide whether to accept the system.

Next, implementation: switching on the new system. Three ways. Parallel: run the new system while the old one is still running, and compare the results. It is the safest way, and the most expensive. Phased: launch the new system one module at a time. The danger: the modules are tightly connected, so one module alone may need temporary interfaces to the old system. Direct: one day, the old system goes off and the new one goes on. Fast and cheap, and the riskiest.

Last step: maintenance. In real life, it is the longest step. Bug fixes and change requests pile up. The people who built the system leave. One day, the old system costs more than a new one, and the cycle starts again.

Now the other road: buying. First choice: many vendors, or one? Best of breed buys the finest system for each application, from any vendor. But you must build the connections between them. Unified procurement buys everything from one supplier. The pieces fit, but no piece is the very best. The rule of thumb: consider buying when a package meets 75 to 80 percent of your requirements.

And the missing 20 percent? Two roads. Adaptation: change your own processes to fit the software. Big vendors recommend this, because their packages contain the best practices of the industry. Customization: change the software itself. It works best for the processes that give you a strategic advantage. Never customize payroll. And remember: every customization must be redone when the vendor updates the package.

Projects also fail on people. Marketing wants a system that delights customers. IT asks for a requirements document. Cross-functional teams translate between them. And early adopters, the first excited users, help sell the new system to everyone else.

Your turn. End users and IT staff test the entire system together. Which test? System testing. Run the new system while the old one is still running. Parallel implementation. Buy the finest system for each application, from any vendor. Best of breed. Testing decides if a system is ready. In the lab, you will run an acceptance test yourself.

Case video · Extreme Programming

The background for this week’s case: what XP asks of people, and where it clashes.

Read the script

Hello, this is Peter Zou. This week’s case is about a team that tried Extreme Programming, or XP. Before you read it, let us see what XP really asks of people.

XP was created in the late 1990s by the software engineer Kent Beck and his colleagues, while they worked on a struggling payroll project at a car company. The idea was simple. Take the practices that already work, and turn them up to the maximum. If code reviews are good, review all the time. If testing is good, test all the time.

Here is what an XP team does. It plans with user stories, short notes about what a user needs. It releases working software every week or two. It writes the test before it writes the code. Programmers work in pairs: two people, one keyboard. A real customer sits with the team. And people work a sustainable pace, without endless overtime.

Notice what XP needs from the organization around the team. People assigned to the team full time. Fast, open talk, where a junior person can question a senior one. And managers who accept that the plan will change every few weeks.

Now imagine XP inside a large, hierarchical organization. Orders travel from the top down. Security rules decide who may see what. People are shared among many projects. Some XP rules simply do not fit. A team then has a choice: force the rules, or adapt them.

That tension is the heart of your case. A development method is not only a technology choice. It changes how people work, talk and decide. Read the case with one question in mind: when the method and the organization clash, which one should bend?

Lab preview · How computers read feelings

Sentiment scores, testing against people’s labels, and the traps.

Read the script

Hello, this is Peter Zou. Companies receive thousands of reviews and comments every day. Nobody can read them all. So programs read them, and score the feeling. This is called sentiment analysis.

The simplest method uses a word list. Words like love, great and perfect add points. Words like awful, broke and waste take points away. The program gives each text a score from minus one to plus one. Above zero means positive. Below zero means negative.

How do we know if the program is any good? We test it. We take reviews that people have already labeled as positive or negative. Then we compare the program’s answers with the people’s labels. The share it gets right is called accuracy. And a business decides in advance how good is good enough. For example: ship the system only if it is right at least 80 percent of the time.

Word lists have traps. Sarcasm: “Great, it broke again.” The word great makes the program think it is positive. “But” sentences mix good and bad words. And long reviews contain both, so the score can drift.

Remember three ideas. Each text gets a score from minus one to plus one. We test the program against labels made by people, and measure its accuracy. And sarcasm often fools the computer. In the lab, you will test a real sentiment tool on two thousand reviews, and decide: would you ship it?

Lab help · Can a computer read feelings?

After the lab: how to finish the three graded parts at home. The method on other examples, never the answers.

Read the script

Hello, this is Peter Zou. Here is a short movie review: “Not great at all.” A computer reads it with a word list. Does it say positive, or negative?

Make a guess. A: positive. B: negative. We will check it at the end. This video helps you finish this week’s lab at home. The lab has three parts. I will not give you the answers. I show you the method with a different example. Then you pause the video and do your own.

Open Google Colab and start a new notebook. Copy one challenge, from its title line to the next title line. Paste it into a new cell, and press the play button. The first run downloads two thousand movie reviews. It takes about thirty seconds. That is normal. Four underscores are a blank, and the hint is on the same line. The last line of a graded cell says self-check OK, or self-check failed.

Part one is Challenge 1, with two blanks. Blank one needs the name of a column. Here is a different example. A table has three columns: name, grade, and teacher says. To use the teacher’s column, write its name inside the square brackets and the quotes. Spell it exactly, with the same spaces. When I teach this, students often forget the quotes. In the lab, the computer gives an answer for every review. You compare it with the answers that people gave. Which column holds the people’s labels? Look at Step two. Pause the video, and fill in blank one.

Blank two turns many True and False answers into one percent. Four quiz answers: right, right, wrong, right. Python counts True as one and False as zero. Three out of four is zero point seven five. So the share of True answers is just the average. Times one hundred, it is seventy-five percent. The hint on the line shows how Python writes “the average”. Pause the video, and fill in blank two.

Now run the cell. The title tells you how often the computer agrees with people. The business needs eighty percent. The last line must say: self-check OK. Here is the good part: the error message tells you what to fix. A key error means blank one is empty, or spelled wrong. An attribute error with four underscores means blank two is still empty. When you see self-check OK, take a screenshot of the whole chart. Save it as your last name, your first name, Week 12 Lab.

Part two is Challenge 2. First, put four mixed-up lines in order. Here is a different example, a function called greet. A function starts with the word def, its name, and its input. Then come the lines that do the work. The last line returns the answer. Every line inside the function starts with four spaces. Now read the comments on your four lines. Ask yourself: what must happen first? You cannot count words before you cut the text into words. Pause the video, and put your four lines in order.

An indentation error means: check the spaces. The def line has no spaces in front, and the three lines inside have four. If the error names “words” or “points”, a line uses a name before the line that makes it. Fix the order, and run again.

Next, add at least three words of your own to the lists in Step one. Good words go in the positive list, bad words in the negative list. Each word needs quotes around it, and a comma before it. Use small letters. Run the cell. You see two bars: the professional tool, and your word list. Did your words help? Try another word, and run again. Take a screenshot of the bar chart. Save it as your last name, your first name, Week 12 Lab, Part 2.

Part three is one or two sentences. Did your words make the accuracy go up or down? Would you ship the professional tool, your word list, or neither? Use the eighty percent line in your answer. Open the Week 12 Lab Submission on Moodle. Upload your two pictures, and type your sentences in the text box. If you upload again, the last upload counts.

So, the answer to our question is: positive. The word list sees “great”, and it does not understand “not”. Small mistakes like this add up. That is why we test before we ship: below eighty percent, do not ship it. You can do this. Open the lab, and start with Challenge one.

In Moodle

The quiz, the case and the lab for this week are in Moodle. Due dates are in Moodle.