Chapter    24

Planning a Program Before and After Coding

Before you invest days, weeks, months, or years working on a program, make sure the world even wants your program in the first place. If you’re writing a program for yourself, then you can ignore what the rest of the world thinks. However, if you plan on selling your programs to others, make sure your program has a future before you even begin.

Here’s one way to determine if there’s a market for your program. Look for competition. Most people think it’s better to target a market with no competition, but if there’s no competition, this could be a big clue that there’s also no market.

However, if you look for a market loaded with lots of competitors, this means there’s a thriving market for that type of program. Just do a quick search for lottery-picking software or astrology programs and you’ll find plenty of competition. The more competition, the more active the market.

If only one or two big companies dominate a particular market, chances are good that the opportunity in that market has already passed. For example, despite the availability of OS X and Linux, Windows is still the dominant operating system for PCs. That means you’ll probably waste your time trying to write a rival operating system to compete against Windows.

Likewise, there are only a handful of major word processors, spreadsheets, and presentation programs on the market today, which means trying to write another general word processor, spreadsheet, or presentation program will likely be an exercise in futility.

Lots of competition means an active market. Little or no competition means that the market has probably already settled on a leader, and your program likely will never be able to overthrow that leader. Trying to convince people to buy your word processor instead of using Microsoft Word or Pages will likely be a waste of time.

However, look for niche markets. For example, the word processor market may already be dominated by Microsoft Word, but specialized word processors are still in demand. Although Microsoft Word can be used to write screenplays and novels, it’s not optimized for that purpose. That’s why other companies can successfully sell screenplay writing word processors or novel writing word processors that help you organize your ideas.

Such specialized niches are too small for big companies to worry about, which means you’ll never have to compete directly against any of these big companies. Besides targeting niche markets that big companies ignore, a second approach is to find out what the big companies are lacking in their software, and then write a program that solves that missing need.

For example, Microsoft Office offers a password protection feature to lock files. However, Microsoft’s encryption feature is weak and easily broken. As a result, there’s a market for software that can encrypt files much better than what Microsoft Office does, while offering a similar user interface as Microsoft Office.

Most important, write a program because you’re interested in that particular field, not because you think it will make you a lot of money. There may be money selling real estate management software or software for controlling drones, but unless you’re interested in those fields, you likely won’t have the passion or long-term interest to spend the long hours needed to develop and market a program for those users.

As a general rule, avoid competing directly against a big company. Even Apple couldn’t compete against Microsoft Windows for the PC operating system market, and a free offering such as Linux hasn’t succeeded much against Windows either.

Instead of directly competing against a big company, look for niche markets that are too small for big companies to tackle, or look for ways to supplement a big company’s existing programs. Above all, look for a problem in a field that you’re passionately committed to solving, and this will give you the motivation to create the best program possible.

Identifying the Purpose of Your Program

When programmers first get an idea, their natural tendency is to rush to the computer and start writing code. However this is like living in Los Angeles, getting an idea to visit New York, and hopping in your car to drive there. You may get there eventually, but without a plan, you’ll likely waste time by not planning which roads to take or what to bring with to make your trip more enjoyable.

Just as you should take your time and plan ahead before rushing off to visit another city, so you should also take your time and plan ahead when developing a new program. If you start writing Swift code in a flurry of inspiration, you’ll likely run out of energy and ideas long before you finish your program. That will likely create a half-completed, poorly designed program that will need to be heavily modified or dumped completely to make it work.

Writing code is actually the most straightforward part of creating any program. The hardest part of programming can be deciding what you hope to get out of a program when it’s finished.

For example, if you’re learning and experimenting with Swift, you might want to create programs just to learn a specific feature such as how to retrieve data from a stock market web site or how to create animation for a game. In this case, your goal is just to create short, disposable programs that let you understand how to use specific programming features.

If you’re planning to create programs for other people to use, then you need to do some additional planning. First of all, why do you want to create a program for other people? Perhaps you want to create a custom program for a particular person. Maybe you want to create a program that offers features that current programs lack. Whatever the reason, every program must ultimately satisfy the user.

If you’re creating a program for your own use, then you’re the user. However if you’re creating programs for other people, then the user can be a specific person and computer (such as one dentist in your neighborhood dental office), or a general group of users (any dentist who needs to manage a dental office). Whoever the user might be, identify the single most important task your program must solve for that user. Then make sure your program accomplishes that one crucial task correctly.

 Note  Between 2000 and 2005, the FBI spent $170 million dollars creating a program called Virtual Case File. The government eventually abandoned the entire project because of constantly changing specifications for what the program was supposed to do and how it was supposed to work. If you don’t know what a program is supposed to do, you won’t know how it’s supposed to achieve that result.

Before writing any program, identify the following:

  • Who is the user of the program?
  • What is the program supposed to do for the user?
  • How will the program achieve that result for the user?

The user of your program completely determines the design of your program’s user interface. Compare the cockpit of a 777 jet airliner to the dashboard of a typical car. To the average person, a 777 cockpit may look intimidating, but to an experienced pilot, everything is within arm’s reach and easy to understand. If your program caters to specialists, your user interface can rely on the user’s knowledge to work. If your program caters to the general public, your user interface may need to guide the user more often.

Every program must create a useful result for the user. Word processors organize text into neatly formatted pages, spreadsheets automatically and accurately calculate mathematical formulas, and even games provide entertainment. Imagine your program giving the user superpowers that the user can’t achieve any other way. What superpower will your program give to the user?

Once you know what your program should do for the user, the final step is determining how it will achieve that result. Programs typically accept input from the user, manipulate that input somehow, and provide a new result. As a programmer, you need to determine how to achieve that new result, step by step. Then you need to translate those steps into a programming language such as Swift.

Ultimately, programming is a creative talent that requires clear, specific goals and methodical persistence to succeed.

Designing the Structure of a Program

Once you know what your program needs to do and how it can do it, the next step is to design how your program will actually work. There’s no single “best” way to write a program since you can write the same program a million different ways. However, you need to design a program that not only works, but is also easy to understand and modify in the future.

Every program can always be improved. Sometimes that improvement means optimizing the program so it runs faster or uses less memory. Other times improvement means adding new features to the program. In either case, every program will likely go through several modifications during its lifetime, so it’s crucial that you design your program from the start so it’s easy to understand and modify.

In the world of object-oriented programming, the common way to design a program is to separate a large program into multiple objects that represent logical features. For example, if you were designing a program to control a car, you could divide the program into the following objects:

  • Engine object
  • Steering object
  • Stereo object
  • Transmission object

Now if you needed to improve the program’s steering ability, you could just replace the steering object with a new steering object without the risk that your changes would affect the rest of the program.

How you divide a program into objects is completely arbitrary. You could just as well design the same car program into the following objects:

  • Front object
  • Back object
  • Inside object
  • Undercarriage object

If you design your program well from the start, you’ll make it easy for you or other programmers to modify that program easily in the future.

Designing the User Interface of a Program

Besides the structure of your program’s design, the other crucial element of your program is the user interface. With Xcode, you can design the structure of your program (its various objects) in complete isolation from the user interface (and vice versa). This gives you the freedom to easily design and modify the structure of your program or the user interface without affecting the other part of your program.

The user interface defines how your user sees your program. A poor user interface makes a program hard to use. A good user interface makes a program easy to use. Even if the underlying structure of a program is poor, a good user interface can make that program appear responsive, elegant, and well-designed.

So what is a good user interface? Ideally a user interface dissolves in the background to the point where the user isn’t even aware that it exists. When you pinch two fingers on the screen of an iPhone or iPad, you can make an image appear larger or smaller.

From the user’s point of view, the user interface doesn’t even exist because the user gets the sensation of directly manipulating an image. In reality, the user interface translates the user’s fingertip positions into magnifying an image’s appearance. The user interface is still there, but the user doesn’t need to read a thick training manual and follow multiple steps to manipulate it. A good user interface essentially melts into the background.

Here’s how a clumsy user interface would accomplish the exact same task. First, the user would have to tap a button on the screen to display a menu. Second, the user would have to choose a Zoom command from that menu. Third, the user would have to type in a number that represents the magnification percentage such as 50 percent or 125 percent. Fourth, the user would have to tap an OK button to finally complete the task and change the magnification of an image.

Which user interface would you rather use?

As a general rule, the more steps needed to accomplish a task, the harder the user interface will be to use because if the user omits one step or does one step out of order, the entire task fails. Oftentimes programmers try to fix poor user interface designs by simply adding more ways to accomplish the same task through keystroke shortcuts or toolbar icons. Unfortunately if you have a poor user interface, adding more ways to accomplish the same task won’t necessarily make your user interface easier to use.

If you have a poor user interface, it may be easier to redesign the whole interface rather than try to fix a faulty design.

Design a User Interface with Paper and Pencil

As a general rule, your first idea for a user interface will rarely be the final design. That’s because what you think will work won’t work, and what you may not even consider could be vitally important to your users. So rather than design your user interface and be forced to change it later, it’s far faster and simpler to design your user interface with paper and pencil instead.

Once you have a rough design on paper, show it to your eventual users to get their feedback. Even though looking at static images of crudely drawn user interfaces might seem pointless, it can give you feedback on the general design of your user interface. When evaluating a preliminary user interface, ask your users:

  • What’s missing? Are there commands or features that need to be displayed but aren’t?
  • What’s not needed? Are there commands or features that are currently displayed but aren’t necessary?
  • What could be easier? How can the user interface be rearranged or organized to make it simpler?
  • What’s confusing? Is there anything that users don’t understand? Help menus and descriptive tool tips can never substitute for cleaner user interface designs.
  • What’s intuitive? What will users expect to do with your user interface? Does your user interface support or frustrate users’ expectations?

Designing user interfaces on paper is quick, fast, and easy. Since you don’t have much time invested in any particular user interface design, it’s much easier to throw away bad designs rather than try to defend and justify keeping them.

In addition, paper designs make it easy for you or others to scribble on them to redesign them. Because paper user interface designs are so fast and simple for anyone to make, feel free to experiment. The more user interface designs you can create, the more likely you’ll stumble across one that will work.

Study existing programs and see what you like best and what you like least. Then put both features (the ones you like and the ones you dislike) into different user interface designs. The design you may think is best may be the ones that others like the least, and the design you like the least may be the ones others find are the best.

Design a User Interface with Software

Once you’ve experimented with different user interface designs and found one or more that seem promising, it’s time to move beyond paper and pencil and create a user interface prototype that people can actually see on a computer screen.

What may look nice on paper may not work on a computer screen. More importantly, a computer screen can create a simple form of interaction. When the user clicks on a button, a new screen can appear just like the real user interface would work. This interactivity is something you can only poorly mimic with paper and pencil designs.

A fast way to create an interactive user interface prototype is to use presentation software such as PowerPoint or Keynote. Presentation software lets you create slides where each slide can represent a window of your user interface. You can place buttons and graphics to create rough user interface designs, then create links between those buttons and slides to create a limited form of interactivity.

An interactive user interface prototype lets you test how users expect the user interface to respond. For example, users might expect to see a certain window after clicking a command. If your interactive prototype shows users a different window, then you’ll know what you need to fix.

Like paper and pencil designs, the goal of a user interface prototype is to find out what works and what doesn’t work while spending as little time designing your prototype. The less time you spend designing your prototype, the more time you can spend coming up with alternate ideas and testing them.

In addition to creating user interface prototypes using presentation software, you can also buy special mock-up software that contains common user interface elements such as buttons, windows, and check boxes that you can quickly drag and drop to create a simulated user interface as shown in Figure 24-1.

9781484212349_Fig24-01.jpg

Figure 24-1. Balsamiq Mockups is a specialized program for creating user interface prototypes

A software version of your user interface prototype provides interactivity. When you’re satisfied with your user interface design as a prototype, the final step is to convert your prototype into an actual Xcode user interface.

Remember, Xcode lets you create your Swift code completely separate from your user interface. That means you can create user interfaces in Xcode without writing a single line of code. When you’re happy with the appearance and design of your user interface, you can connect its various items (buttons, menus, etc.) to IBOutlets and IBAction methods to link your user interface to your Swift code.

Marketing Your Software

Once you create a program, you’ll need to test it to make sure it works. Such early testers (known as alpha and beta testers) can help spot bugs in your program so you can fix them right away. When your program is as bug-free as possible, that’s the time to release your software on the market.

Here’s the biggest mistake most people make. They write a program, put up a web site advertising the program or their company, and wait for the orders to roll in. In the OS X world, Apple offers a special Mac App Store that gives every Macintosh user potential access to your software.

However, it’s never enough to advertise your software on a web site or the Mac App Store and wait for people to buy it. To maximize sales, you also have to promote your software.

To many people, marketing means spending money advertising. While you could do that, it’s always best to spend as little as possible. It’s easy to spend money on advertising and marketing, but unless your advertising and marketing expenses are less than the sales that advertising and marketing generates, you risk going bankrupt slowly. Where most people go wrong is that they spend money on advertising and marketing, but they have no idea if all that advertising and marketing is generating enough sales to justify the expense.

That’s why you should focus on free ways to advertise and market your software so you can find out what people like about your software, what types of people are more likely to buy your software, and the best ways to reach your potential users, all without going broke to do it.

For example, suppose you sell software that makes video look aged as if it had been filmed decades ago on film complete with scratches, faded images, and sound effects of film threading through a movie projector. You might initially target people who want to turn their videos into older movies for fun, but you may find that your actual market is Hollywood studios who need to create visual effects to simulate older films.

Your initial market may not care about your software but an entirely different market just might. If you spent money advertising to your initial market, you would have wasted money targeting people who didn’t really want your program after all. Only later might you find the real market for your software, and it could come from an unexpected niche that you never thought about before.

So don’t substitute spending money for doing market research. It’s easy to spend more money. It’s harder to take the time to determine how effective your marketing and advertising really is and whether you’re even targeting the most lucrative market for your software in the first place.

Beyond spending a minimal amount of money promoting your software through a web site, here are some other ways to promote your software for little or no cost:

  • Start a blog.
  • Give away free software.
  • Post videos of your software on video sharing sites such as YouTube.
  • Create and give away free information stored in PDF files offering tips for people who are potential customers of your software.
  • Find the social networks where your potential customers gather and participate in discussions to answer their questions.

Blogging About Your Software

A web site is like putting a billboard in the middle of the desert and hoping people will magically find it. While search engines can help people find your web site, it’s far better to include a blog on your website as well.

A blog serves several purposes. First, by constantly blogging at least once a week, you generate new content for your web site. New content tells search engines that your site is active, and thus search engines will rank them as more relevant than a site that hasn’t been updated in months or even years. So blogs increase your search engine rank, thereby increasing the chance that potential customers can find your product.

Second, a blog puts a human face behind your software. By discussing the challenges you faced creating the software and responding to questions from people about your software, you demonstrate that there’s someone who cares and is willing to respond to questions about that software. Given a choice between buying from a faceless corporation or someone who seems like a real person, this subtle difference can increase the likelihood that potential customers will buy your software.

Third, each blog post acts like another miniature ad for your software. Most people create a web site describing their software and hope that will convince people to buy it. However, a blog lets you focus on a different aspect of your software. One blog post might talk about a special feature that you’re particularly proud to highlight. A second blog post might tell a story of a happy customer who used your software to solve a problem. A third blog post might explain why you designed your program the way you did.

Since each blog post is slightly different, you avoid repetition. Yet since each blog post continually promotes your software, you’re constantly advertising your software from different points of view. This increases the chance that one of your blog posts will convince someone to buy your software.

Blogging simply costs time, yet provides higher search engine rankings while promoting your software over and over again. Think of blogs as a free way to advertise on the Internet.

Giving Away Free Software

There’s a reason companies give away free samples of everything from food to toothpaste. They know once you try a product and like it, you’ll be far more likely to buy it. If you never try a product, it’s much harder for a company to convince you to buy it.

Giving away free software works the same way. Some companies give away free “lite” versions of their software that’s fully functional. This lets customers try and use your software at no cost. A certain percentage of people will eventually want more advanced features, and those people will translate into paying customers.

The more people you get using your free software, the more people you’ll get paying for the advanced version.

For example, assume 1 percent of all people trying your free software decide to buy your advanced version. If you can get your free software in the hands of 100 people, that translates into one sale. However, if you can get your free software in the hands of 10,000 people, that translates into 100 sales.

Since distributing free software doesn’t cost you anything to duplicate or distribute, your advertising and marketing costs are essentially zero.

Besides offering a free “lite” version of your program, you could also offer free software related to your main program. For example, suppose you sell a word processor targeted for scientists to write complex mathematical and chemical formulas. Rather than give away a free “lite” version of your program, you could give away free software that your target audience (engineers and scientists) might like such as an interactive periodic table of elements or a simple equation solving program.

Such free software simply gives potential customers something for free. Now if they like your free software, they’ll be far more likely to trust your commercial software. If your free software is well-designed and useful, potential customers will believe your commercial software must also be just as well-designed and useful. Free software lets potential customers sample your products without risk.

Posting Videos About Your Software

Blogging about your software can be great for people who like reading. Unfortunately, in today’s busy world, many people don’t have time to read. That’s why you can make short videos demonstrating how your software works so people can see what problems your software solves and how it does it.

In general, nobody wants to buy or use your software. What they really want are the solutions your software offers, and that’s what you need to emphasize in your videos. Don’t explain the menu system or the organization of your user interface. Focus on solving a single problem and emphasize something unique about your software.

For example, suppose your software is designed to help real estate agents. Your potential customers will either want to save time or make money, so show how your software can help real estate agents do both. Show a feature that simplifies an existing, time-consuming process. Show another feature that increases the number of potential buyers of a property with little additional work. Always focus on how your software benefits the user.

Keep your videos short and to the point. More people will watch a video demonstrating a single feature that runs under a minute. Far fewer people will watch a thirty-minute video demonstrating multiple features. With many video sharing sites like YouTube, you can even link multiple videos together so when one video ends, a second one begins. Now each video acts like another advertisement for your product and by linking each video to another one, each new video increases the chance that someone will find and watch at least one of them.

Give Away Free Information

People tend to buy more from people they trust, so one way to get people to trust you is to give out free, useful information. For example, if your software helps edit photographs, write up a list of tips for capturing better pictures. Now share that list of tips as a PDF file and give it away for free, with a link back to your web site promoting your software.

Free, useful information acts as a subtle advertisement. Traditional ads blatantly promote a product, which can immediately turn off even your best potential customers. Free information subtly promotes a product. Since the free information is useful to your potential customer, they’ll be more willing to look at it and even share it with others. If they want more information, they can visit your web site.

One visually appealing way to provide free information is through a combination of text and graphics known as infographics. An infographic presents information in a colorful manner so it’s easy to read and understand without wading through large amounts of text. As Figure 24-2 shows, even IBM creates and distributes free infographics to promote their services and products.

9781484212349_Fig24-02.jpg

Figure 24-2. IBM provides an infographic as a PDF file to promote how their services helped American Greetings

By providing free, useful information, you establish yourself as an authority. If you can provide free, useful information as PDF files and blog posts on your web site, you’ll give people additional reasons to keep coming back to your web site/blog over and over again. The more times people visit, the more likely they’ll eventually buy your software or tell others about your web site/blog.

Free, useful information establishes you as trustworthy, which lowers the barrier to buying your software. The more people trust you, the more likely they’ll believe your product will do what you claim it does.

Join Social Networks

Giving away free, useful information in your blog or as PDF files can help establish you as an authority in your field. However, a blog requires that someone visits your site and a PDF file requires someone download that file. Another way to share useful information for free is to stay in constant contact with popular social networks.

Find out which social networks your potential customers visit and join those networks. Now as people post questions, jump in and answer them with useful advice. The purpose is to answer people’s questions and establish yourself as trustworthy. Then make sure each post you make includes a link back to your web site or blog.

Visiting social networks lets you reach potential customers far faster than hoping they’ll visit your blog or find your PDF file. Just make sure you provide useful information instead of thinly disguised advertising copy that will simply annoy others. The more people learn to trust you on a social network, the more likely they’ll also visit your web site/blog.

With all of these techniques, the goal isn’t to get someone to buy your product right away (although that’s always nice). The real goal is to draw them one step closer toward learning more about you and your product. The more people know about your product, the more likely they’ll buy from you.

Advertising and marketing is basically a numbers game. Keep helping others for free in ways that don’t take up much time or money, and you’ll eventually find that others will find you and buy your software. The more you help others, the more others will trust and buy from you.

The old way of marketing and advertising involves trying to force people to listen to ads and buy against their will (which is why so many people dislike marketing and advertising). The new way of marketing and advertising is to give potential customers something of value before you ask them to buy from you.

Summary

Most programmers focus on increasing their technical knowledge of programming. While knowing as much as possible about Swift’s features and the Cocoa framework can always be helpful, technical knowledge alone is rarely enough.

Programming involves more than just writing code. Before you even start writing Swift code, you need to make sure there’s a market for your program. Rather than try to compete against big companies, look for niche markets that big companies are ignoring, or look for ways your program can supplement programs offered by a big company. Big companies have far more resources that they can use to crush any direct competitors, so by targeting a niche market or a way to supplement their own products, you can avoid directly competing with a much bigger company.

Before you start writing Swift code, create prototypes of your software’s user interface. Although user interface design may not sound as appealing to programmers as digging into the intricacies of writing code, it’s a vital part of any software project. The user interface determines how people view your program. A well-designed user interface can make your program easier to use. A poorly designed user interface can make a program seem harder to use, despite any technical features it may offer.

Test your user interface designs as quickly and cheaply as possible using paper and pencil. When you need to create an interactive version of your user interface, create simple mock-ups using presentation software such as Keynote or PowerPoint, or consider buying special mock-up construction software.

When you have a final user interface design, create it in Xcode. Just remember that as your program continues to evolve, you’ll likely still need to make changes to your user interface.

Finally, when your program is complete, your work still isn’t done. You’ll still need to advertise and market your software. Rather than spend money buying ads, it’s far less expensive and often more effective to pursue free options instead.

Start a blog, give away free information, and provide something of value to others. The more you give to others, the more likely others will be attracted to your product and buy from you.

As you can see, coding is just one stage of creating and marketing software. Technical knowledge can create software, but you still need additional skills before and after coding to properly design your program and successfully sell it afterwards.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset