@DevOpsSummit Authors: Destiny Bertucci, Pat Romanski, Yeshim Deniz, Dalibor Siroky, Liz McMillan

Related Topics: PowerBuilder, Agile Computing

PowerBuilder: Blog Post

What Are Assertions?

PowerBuilder Journal - The crux of "Test Driven Development" and refactoring is writing assertions to test your code

PBDJ Blog on Ulitzer

PowerBuilder Developer's Journal - The crux of Test Driven Development and refactoring is writing assertions to test your code.   So what's an assertion?  The dictionary says that an assertion is "a positive statement or declaration."  According to the computing dictionary (this is definition you're looking for) it's "An expression which, if false, indicates an error."  In unit testing you are formulating assertions to catch not supposed to happen coding errors.  So you write the assertion first in a test - then you write simple code in the method under test to make the test pass.  Then you write more complex code and test again and around you go etc. etc. until your logic is complete and the test still passes.  Now you have confidence that your method really works!

OK.  Now the catch <g>- What about when you want to write a test that is expecting an exception - Usually when an exception is thrown in code - that's a bad thing and you want to know about it.  Well following the definition for assertion you set up for an exceptional condition and then write an assertion that will make the exception occur.  So the error is when the assertion does not occur - So you leave the catch block empty - and in the TRY block, on the line after the real assert you add another assertion that this line will never occur - cause if it does then that's a bug cause the exception was never thrown!

Insight: I'd assert that 'Unit Testing and TDD is a hot topic in the industry.' Evidence - publishers are releasing new books on the topic.  They only publish if they can make $$ - so developers must be buying!

Observation:  TDD gives you more freedom to experiment.  Sometimes you identify little changes that might just improve the code - but you've used never the technique or written anything like it before.   Ordinarily because of the overhead of testing via debugging you would be inclined not to bother since the deadline is looming and time is tight and debugging can be a long drawn out affair - BUT - when you have a test in place and know you code is working - you can make that little experimental change and run the test in a few microseconds.  Wow

Funny:  Writing courseware is allot like TDD - You write Objectives (High Level Design) -  Then you write Quiz Questions  (Assertions!!!!).  Then you write the detail (Implement the method). Someone can test their understanding through doing the questions!  (iterate as necessary) Amazing!!

Qutable quote:"Yesterday's pie in the sky becomes today's desert".  I arrived at this one while thinking about how the object purist ideas of the late 90's early 2000's Test Driven Design and Refactoring have become the powerful necessary development methodologies in today's application world.

Off the wall observation: Did you ever notice that weird is a weird word - remember - I before E except after C - so it should be spelled wierd but it's not!

More Stories By Yakov Werde

Yakov Werde, a 25 year IT industry veteran, is a member of TeamSybase and the newly formed Sybase Customer Evangelist Team. Yakov is a recognized author, speaker and trainer who has been designing and delivering PowerBuilder, .NET, EaServer, Web App Development, and Java training for over 14 years to corporate, military and government developers. Prior to discovering his aptitude as an educator, Yakov worked as an architect, project manager and application coder in the trenches of application software development. Yakov holds a Masters in Education with a specialty in instructional design for online learning from Capella University and a BS in math and computer science from Florida International University. Yakov, managing partner of eLearnIT LLC (www.elearnitonline.com), authors and delivers workshops and web based eLearning tutorials to guide professional developers toward PowerBuilder Classic and .NET mastery. Follow Yakov on Twitter as @eLearnPB

@DevOpsSummit Stories
ChatOps is an emerging topic that has led to the wide availability of integrations between group chat and various other tools/platforms. Currently, HipChat is an extremely powerful collaboration platform due to the various ChatOps integrations that are available. However, DevOps automation can involve orchestration and complex workflows. In his session at @DevOpsSummit at 20th Cloud Expo, Himanshu Chhetri, CTO at Addteq, will cover practical examples and use cases such as self-provisioning infrastructure/applications, self-remediation workflows, integrating monitoring and complimenting integrations between Atlassian tools and other top tools in the industry.
A strange thing is happening along the way to the Internet of Things, namely far too many devices to work with and manage. It has become clear that we'll need much higher efficiency user experiences that can allow us to more easily and scalably work with the thousands of devices that will soon be in each of our lives. Enter the conversational interface revolution, combining bots we can literally talk with, gesture to, and even direct with our thoughts, with embedded artificial intelligence, which can process our conversational commands and orchestrate the outcomes we request across our personal and professional realm of connected devices.
The need for greater agility and scalability necessitated the digital transformation in the form of following equation: monolithic to microservices to serverless architecture (FaaS). To keep up with the cut-throat competition, the organisations need to update their technology stack to make software development their differentiating factor. Thus microservices architecture emerged as a potential method to provide development teams with greater flexibility and other advantages, such as the ability to deliver applications at warp speed using infrastructure as a service (IaaS) and platform as a service (PaaS) environments.
The use of containers by developers -- and now increasingly IT operators -- has grown from infatuation to deep and abiding love. But as with any long-term affair, the honeymoon soon leads to needing to live well together ... and maybe even getting some relationship help along the way. And so it goes with container orchestration and automation solutions, which are rapidly emerging as the means to maintain the bliss between rapid container adoption and broad container use among multiple cloud hosts. This BriefingsDirect cloud services maturity discussion focuses on new ways to gain container orchestration, to better use serverless computing models, and employ inclusive management to keep the container love alive.
As DevOps methodologies expand their reach across the enterprise, organizations face the daunting challenge of adapting related cloud strategies to ensure optimal alignment, from managing complexity to ensuring proper governance. How can culture, automation, legacy apps and even budget be reexamined to enable this ongoing shift within the modern software factory? In her Day 2 Keynote at @DevOpsSummit at 21st Cloud Expo, Aruna Ravichandran, VP, DevOps Solutions Marketing, CA Technologies, was joined by a panel of industry experts and real-world practitioners who shared their insight into an emerging set of best practices that lie at the heart of today's digital transformation.