[Webinar] 10 Keys to Ensuring Success for Your Next Qt Project

16
© Integrated Computer Solutions, Inc. All Rights Reserved 10 Keys to Ensuring Success for Your Next Qt Project Justin Noel Senior Consulting Engineer, ICS, Inc. 1

Transcript of [Webinar] 10 Keys to Ensuring Success for Your Next Qt Project

Page 1: [Webinar] 10 Keys to Ensuring Success for Your Next Qt Project

© Integrated Computer Solutions, Inc. All Rights Reserved

10 Keys to Ensuring Success for Your Next Qt Project Justin Noel Senior Consulting Engineer, ICS, Inc.

1

Page 2: [Webinar] 10 Keys to Ensuring Success for Your Next Qt Project

© Integrated Computer Solutions, Inc. All Rights Reserved

The Right Tools

• Qt is huge!

• Study the API and docs for hidden treasure:

• QML Styling: QQmlFileSelector

• Web Services: QNetworkAccessManager

• There are other toolkits to help

• Boost, Vtk, FFMpeg, libusb

• Don’t be afraid to look around for solutions

• Complex video rendering?

• Maybe QtMultimedia fits. Maybe not.

2

Page 3: [Webinar] 10 Keys to Ensuring Success for Your Next Qt Project

© Integrated Computer Solutions, Inc. All Rights Reserved

The Right People

• Staff the project up early.

• Don’t hold your “big push” for the end

• Consult with experts (internally or externally)

• For each of your “hard parts”

• Also for each toolkit

• Get training!

• Avoid re-inventing the wheel!

• Get advice early!

3

Page 4: [Webinar] 10 Keys to Ensuring Success for Your Next Qt Project

© Integrated Computer Solutions, Inc. All Rights Reserved

User Experience (UX)

• User Experience is vital to a project’s success

• Start early with a Human Centered Design

• Good UX should optimize and simplify the user’s workflow

• Especially true for embedded devices and mobile

4

Page 5: [Webinar] 10 Keys to Ensuring Success for Your Next Qt Project

© Integrated Computer Solutions, Inc. All Rights Reserved

Iterative UX

• Engineering must be a stake holder in all UX activity

• Make sure UX maps to realities of HW and SW stack

• Rework UX? Or does the stack need changing?

• User Experience process needs to be iterative just like the software process

• UX needs to start the project a month ahead of engineering

• You will catch them. Also you will need UX support.

5

Page 6: [Webinar] 10 Keys to Ensuring Success for Your Next Qt Project

© Integrated Computer Solutions, Inc. All Rights Reserved

Be Agile

• Agile is more than just daily standups and design on demand

• Although both of these help quite a bit

• The next 5 points are all agile related

• Keep standup very short. Three questions:

• What did I do yesterday?

• What will I do today?

• Does anything prevent work from continuing?

6

Page 7: [Webinar] 10 Keys to Ensuring Success for Your Next Qt Project

© Integrated Computer Solutions, Inc. All Rights Reserved

Test Early

• Earlier you can test code the more traceable it is.

• What went wrong? Why?

• Can we stop it from happening again?

• Is our pattern wrong?

• QTest is good unit testing framework

• Has Qt specific things: Test events and signals

• GTest and GMock are much more powerful

• Qt compatible. Can use features of QTest

7

Page 8: [Webinar] 10 Keys to Ensuring Success for Your Next Qt Project

© Integrated Computer Solutions, Inc. All Rights Reserved

Be Testable

• Structure code and design to be testable

• Build as libraries, DI, Signals/Slot Interfaces

8

Backend.dll

App.exe

(only main.cpp)

Ui.dll

BackendTests.exe UiTests.exe

C++ Test Fixtures QML Test Fixtures

Page 9: [Webinar] 10 Keys to Ensuring Success for Your Next Qt Project

© Integrated Computer Solutions, Inc. All Rights Reserved

Layered Design

Qt and a Layered Design can help Testability and Demo-ability

9

Signals

Up

Visualization Layer (QML)

Presentation Layer (QObjects)

Data Layer (Local Data Storage)

Communications Layer (TCP)

Calls

Down

Page 10: [Webinar] 10 Keys to Ensuring Success for Your Next Qt Project

© Integrated Computer Solutions, Inc. All Rights Reserved

QML as Visualization Only

• The best QML advice is Keep It Simple!

• QML is the best UI visualization toolkit

• Let it do what it does best: Draw and Animate.

• Let C++ classes take care of the rest

• Business logic, Storage, etc

• Even UI flow in some cases

• See the Qt State Machine talks!

10

Page 11: [Webinar] 10 Keys to Ensuring Success for Your Next Qt Project

© Integrated Computer Solutions, Inc. All Rights Reserved

Always Be Delivering

• Deliver from Day 1

• Spend Day 0 setting up a Continuous Integration Server

• Create installer scripts for what little code you have

• Always be ready to distribute or demo the code.

• Being able to run “off device” is quite helpful for getting stake holder feedback.

11

Page 12: [Webinar] 10 Keys to Ensuring Success for Your Next Qt Project

© Integrated Computer Solutions, Inc. All Rights Reserved

Always Be Reviewing

• Code review is essential

• Is the code correct?

• Does it follow project patterns and style?

• Cross-pollination of developer knowledge

• Code review servers are best

• ICS suggests Gerrit

• Pre-commit checks / review

• Same system that the Qt Project uses

12

Page 13: [Webinar] 10 Keys to Ensuring Success for Your Next Qt Project

© Integrated Computer Solutions, Inc. All Rights Reserved

Don’t Be Too Agile

• Know your schedule.

• It’s easy to put off creating stories until immediately before the sprint starts.

• Create rough estimates for large tasks as soon as they are known

• Don’t need to be super accurate. Iterate over time.

• Points or time

• Having these will provide a rough estimate for completion

• Also as new requirements arise you can predict schedule impact

13

Page 14: [Webinar] 10 Keys to Ensuring Success for Your Next Qt Project

© Integrated Computer Solutions, Inc. All Rights Reserved

Checklist Big Items

• You should know what to expect for “the hard parts”

• External Interfaces

• Fancy Renderings

• Performance Requirements

• Create a checklist and assign research tasks

• Find “Unknown Unknowns”

• These can kill your schedule if they arise late

14

Page 15: [Webinar] 10 Keys to Ensuring Success for Your Next Qt Project

© Integrated Computer Solutions, Inc. All Rights Reserved

Internationalize Early

• Internationalize from Day 1

• Wrap user visible string in tr / translate

• Use QLocale for all numbers and dates

• Create a dummy translation file for testing

• A script can update a .ts with fake translations

• Be sure to use some non-latin1 characters

• Verify all the strings / dates / numbers change

• As you deliver each screen!

15

Page 16: [Webinar] 10 Keys to Ensuring Success for Your Next Qt Project

© Integrated Computer Solutions, Inc. All Rights Reserved

Thank You!

16

Justin Noel Senior Consulting Engineer, ICS, Inc.