Seven Things to Consider When Designing for a Serverless Environment

Over the past decade, developing solutions for cloud architectures has become more suitable for businesses that are trying to minimize infrastructure costs without sacrificing service availability and scaling capabilities. Cloud providers are adding new tools and services that facilitate the development and provisioning of services.

This was evident over a year ago when our team was tasked with implementing complex applications using Microsoft Azure Cloud Services. Although Wovenware has implemented cloud-based solutions in the past, we knew that there were additional considerations that we needed to address in order to accomplish our goals due to the particular requirements of a certain project.  If you have used cloud services before, let this post serve as a check-list for your future projects. If you are new to cloud services, it will help you get a better grasp of what you should expect and consider while designing serverless architectures.

Mindset Shift

The first thing you must do is shift your mindset away from what you may already know about traditional data centers. Cloud architectures provide serverless services that even though they may require minimal maintenance, they will require additional considerations during the application design phase. This was addressed in-depth in the first post of this two-part series.

API Management

Cloud service providers such as Microsoft Azure and Amazon AWS offer out-of-the-box services to manage applications. These services facilitate the access to back-end services by providing a gateway to publish API’s to the consumers of your application. When integrating with an API management service, keep in mind that you must follow the conventions and definitions of the API you design. This approach allows you to develop the back end service with the programming language of your choice and avoid integration issues in the future.

Decoupling

A decoupled application is made up of independent components that compute a specific task to provide a result. Each component is autonomous and minimizes the dependencies in an application. Developing and maintaining decoupled applications in cloud architectures is not as complex as it may sound. Concentrating on individual autonomous services gives developers more agility and focus when building solutions for the cloud.

Security

The first step in implementing security in cloud architectures is making sure that your application does not contain any risks listed in the OWASP Top 10 application security risks. Aside from addressing these risks, the application should be continuously scanned for vulnerabilities to make sure you maintain a healthy codebase. OWASP provides an updated list of source code analysis tools that you can include as part a CI/CD pipeline.

Logging

The nature of some cloud services, such as containers and functions, is that they activate at the moment they have to compute. That change of state occurs instantly and it may cause service error failures. Therefore, it is important to put the necessary measures in place to log data such as the status, state and general information of the service used.

If the application that you’re designing is going to manage personal identifiable information (PII), there may be regulations that apply to your application such as GDPR, HIPAA or IRS Pub. 1075. A good approach to your logging efforts is to look at the Logging Cheat Sheet provided by OWASP as it will provide insights into the type of information to log and the best approach to accomplish this.

Deployment

As you may know, when working in cloud architectures, you can deploy resources on the fly based on the requirements of the application you are designing. This is where the infrastructure of applications becomes codified and additional efforts are needed to validate the infrastructure code as well as application code, such as back-end or front-end services.

Although you will not have to worry about updates or security patches on the cloud infrastructure, your application will still require that you address any vulnerabilities that surface. CI/CD pipelines allow releasing new security implementations to address vulnerabilities as soon as they become available.

Coding the application infrastructure requires that you define a rollback plan in case the deployment encounters any errors during the process. This is in addition to the application code you are deploying. To address this, you need to determine if you need to roll back to a previous release, fix the issue during the deployment, or have an automation in place that can detect if a specific resource fails. My recommendation is to take the time to define and implement that automation, so that you can make sure to always be able to deploy it in case an error arises.

Patience

Last but not least, when beginning with cloud architectures, it’s important for you to have patience in your transition. There may be moments that a specific service might not work as expected or as documented by the providers. In these cases, if you have put the necessary logging in place, this will aid you in your debugging efforts to address any situation you might encounter.

Designing new applications for cloud architectures is not that different from traditional architectures. The important thing is to test and continuously scan any code the solution contains, design with decoupling in mind, apply security across the solution, log any errors that arise, and automate everything you can. With these considerations in your design, your application will perform better than expected in the cloud.

Basic Tips to Write Clean Code

Like writers of stories or poems who worry about the spelling and structure of their words, developers must worry about every piece of code we write. At any moment, someone else could work with our code and it needs to be understood and readable as if it were a newspaper. In reality, our code is our signature and legacy for a project, so for the benefit of all, it is important that we constantly practice and dedicate ourselves to learning how to write clean code.

Learning to write clean code is not easy, and not something that can be mastered overnight. There is no universal guide that we can all use to code. But there is helpful advice and best practices from experienced developers for reference. I recently began to learn about the best practices of writing clean code and below I share some useful tips to get you on your way. 

Call Me By My Name – Use Meaningful Names

Assigning meaningful names to classes, methods, and variables is a good way to start cleaning up your code. When you create a method or function, and a series of instructions, if you really analyze it, you often find the name you need for the method. For example, instead of naming a method johnCena (), or grc (), to generate a report on a customer’s purchases, I can assure you no one will know what it means in either instance or what it does. Yet, if you call the method, generateReportForClient (), it’s a lot clearer and by seeing the name you will know what action the method performs.

This also applies to classes and variables. It’s important to avoid shortening names. A long and understandable name is preferable to a short one with ambiguities. When you take the time to define a correct name, I can assure you that in the future both you and whoever reads it will appreciate it. 

Do Not Repeat Yourself

Some Integrated Development Environments (IDE)s can help you make sure you don’t repeat yourself by duplicating code.  For example, Intellij IDEA highlights a yellow warning signal when it detects repeated code. This means that the code can improve, and you can eliminate the repeated code using methods or classes. So, when developing you must be very aware and realize that when you see a code that does the same to the development, you can refactor it using a method. It also helps to keep the number of lines in classes smaller. Eliminating duplicity is key to writing clean and readable code.

One Worker, One Task 

Functions and methods allow you to encapsulate the actions that the objects perform. It is important to keep them organized and make sure they only do a single task. You cannot create a method and call it “save (User user)”, if  the code is designed to eliminate two objects, sum 2 + 2 and generate 5 reports and then save the User object. You also should make sure you don’t call the function saveAndDeleteAndGenerateReport (User user); as a solution. It’s important to be clear that the function should only save the user object.

The number of parameters is also important. Having more than two is an indication that the method does more than one thing, so it is very likely that you can split what you want to do into several methods.

Avoid Unnecessary Comments

Let’s agree to avoid using comments as a way to explain unreadable code. If you need to comment on a code, it is very likely that you will have to write the code again. Often, you understand what the code does, but you are worried that someone else cannot understand it, so you resort to leaving a comment. If that’s the case, you need to consider rewriting the code since it must be understood in the first instance. The code should speak for itself.

It’s important to remember that if you apply the previous tips, you won’t have to leave a comment about what a certain function or variable does since the name will give you an idea about the action to be performed. When you write clean code, you can use comments to provide more information about business rules that will be important for a new developer to understand.

Implement Team Coding Standards

All programmers have preferences about the format of a code. A typical example is in the location of the braces in the methods or classes. Some prefer them next to the signature while others prefer it below. When working as part of a team, preferences must be set aside and a common agreement reached so that the entire project is written in the same format. If it is decided that two spaces will be left between functions, it is your duty to write and correct it each time you see a code that does not comply with the team’s coding standards. 

What’s next?

These tips are a summary of what I have learned in several months of study. To get started, I highly recommend a book called Clean Code: A Handbook of Agile Software Craftsmanship written by Robert C. Martin. The author goes into more detail with several of the terms that I mention here and other more advanced ones that might interest you. Unfortunately there’s no short-cut to writing clean code, but with a lot of practice you will be applying these concepts in no time.

The Trends Defining the New Year of Digital-First Business Transformation

While companies have been considering digital transformation initiatives for some time now, the past year has thrust it upon them like never before. As I mentioned in a recent Forbes article, in 2021digital first is becoming the battle cry and salvation for businesses of all sizes and industries.
Four tech trends driving the digital-first era, include:

  1. Deep Learning. Thanks to greater GPU computing power and the availability of large data-sets, deep learning is addressing increasingly more complex problems in 2021. This form of advanced AI can help companies gain deeper insights than would be possible by human thinking alone. One industry that will benefit greatly from deep learning is healthcare, across diagnostics, treatment and discovery
  2. User Experience. Especially during COVID-19, a focus on user experience has enabled many companies to stay afloat. Understanding customer needs, frustrations and desires has spawned digital transformation. This may include digital touchless menus or mobile ordering for restaurants; or augmented reality apps that boost the online retail experience for shoppers. In many cases, the entire consumer experience is becoming digital.
  3. Computer Vision. An application of computer vision that will move closer to reality in 2021 involves autonomous vehicles. Software that tracks, perceives and interprets images enables cars to drive safely and navigate through traffic, identifying other cars, people and other objects. In addition, computer vision software used in satellites are allowing organizations to identify images on earth that can help them address urban sprawl, environmental challenges or other issues.
  4. AI Engineering. As companies begin to adopt AI, they will focus on ways to deploy it automatically, with continuous improvement. In fact, Gartner has identified this AI Engineering approach as a key strategic trend for 2021.

As the Forbes article explores more deeply, digital first has become the battle cry for 2021, yet it requires a mindset that embraces innovation and exploration. Instead of being an item on a company roadmap, it is fast becoming the first consideration for business improvement and continuity.

The Art of Explaining

When I was young, I hated going to church. Although I have always loved learning, I never seemed to be able to understand the priest. It was very confusing to me to understand how I could be so smart in school and so dumb in church. The reason, as I learned later, was that the priest was preaching in Latin. The priest spent an hour every Sunday preaching religious complexities to his congregation in a dead language.

The priest’s congregation was primarily comprised of lower-to-middle-class older people, many of whom had never finished high school. They also understood very little English. Yet, somehow, for some inexplicable reason, our priest thought it wise to preach most of the sermon to them in the language of the Roman Empire, which has been extinct for more than fifteen hundred years. Although parishioners religiously attended masses which they could not understand, there often came a point where they lost interest.

This story demonstrates that even if a message is on point, if it’s not understood, it loses meaning.  At Wovenware, for example, we often must explain very complex technical concepts to clients who are not tech-savvy, but how can complexity be simplified?

When it comes to technology, explaining complex topics in ways that are easy to comprehend is an art even more difficult than Latin, but there are some tips on how it can be accomplished.

Explaining vs Defining

Before getting into the specific techniques, it’s important to understand the difference between explaining and defining. It’s easy to find definitions in dictionaries and textbooks that clearly and accurately expose “the generic and differential characteristics of something material or immaterial.”  When defining a concept, you must be exact, with millimeter precision. When a concept is explained, however, it’s presented in a general and more imperfect way, but gets the point across.

This difference is important. The reason why so many scientists and intellectuals are terrible at explaining concepts is precisely because they are not actually explaining; they’re defining.

To make sure you are explaining complex topics so that they are understood, consider the following six techniques.

Techniques for Better Explanations

1. Know your audience, be it a single person or a legion

The first technique is to get to know the person you are talking to.

Speak in the person’s native language You should not speak Latin to people who hardly know Spanish. If the person speaks Esperanto or Mandarin and you know the language, speak to them in their native language.

Avoid jargons. A jargon is a set of specific and particular expressions shared by insiders of a profession that would be difficult for outsiders to understand. Unless you are going to explain something to a professional colleague, do not use them. Find another way to refer to the same concept so the rest of us mortals can understand you.

2. Storytelling

Another useful technique is storytelling, a great way to explain concepts, from the simplest to the most complex. Think of all the short stories that were read to you as a child. All those simple stories of fairies and magical creatures usually contained a lesson: from not lying (Pinocchio) to the importance of accepting and improving yourself (The Ugly Duckling). And, you understood them, even when you were a child because stories are effective. The art of storytelling is very old but very useful.

The great attraction of stories is based on two things: relationship and aspiration. We like stories because we see some of our characteristics reflected in the characters (relationship), or because we aspire to be like them, to achieve what they do, or to avoid their mistakes (aspiration). Who watches Harry Potter or reads the books and wouldn’t like to be a Hogwarts student? (Muggles, but that is another story). Who does not watch a horror movie and start to judge the decisions of the characters? “Don’t go in there!,” we say.

This does not mean that whenever you explain a concept you have to write a short story or a three-hundred-page novel. But, what you can do is include short narrative stories (real or fictional) as part of your explanation.

Note that stand-up comedians overuse this technique because it is an excellent method of connecting with the audience. “Has it ever happened to you…?” they begin by saying.

Let me give you an example of the power of storytelling. When John asked Natalia: “When did you learn to drive?”, the answer should not be: “November 13, 1987.” Instead, Natalia answered: “When I was 16 years old, my dad would take me to drive his Jeep through the mall that is close to home.” Natalia told a story, to John of how she learned to drive. Not only did she tell him what her father said and how old she was, but she shared specific details: the make of the vehicle she drove, the place where she drove, etc. John would probably have forgotten how old Natalia was at the time, (let’s face it, dates are tough to remember). However, as there was a story involved, with characters and emotions, it is very possible that years later John could explain to another person the version he remembers of the story as: “When Natalia was a teenager, her father taught her to drive a Jeep in a mall. ” Note that it is not the same vocabulary or level of detail used by Natalia, but it is still quite accurate.

By tying together characters, feelings, and emotions to an explanation, even in an implicit way, you will get your audience to understand the concept, not exactly, but quite precisely.

3. Figurative language

Although storytelling itself is a masterpiece, there is another technique that we can use to improve it even more — figurative language. Simply put, figurative language is explaining or describing through comparison. There are many forms of figurative language, but the two I find very important are simile and metaphor.

Simile

A simile is a comparison that uses the words “like” or “as” to show the similarity between two things. For example:

Her explanation was as clear as water. -> Her explanation was accurate.

He behaved like a wild animal. -> His behavior was not appropriate.

We can use the simile to add emotional details to an expression. “The building is large,” is not the same as, “The building is like a standing giant.” The second expression will make a greater impression on the listener and, therefore, it will be easier to understand the height of the building without having to use numerical values, which any human being would forget in a heartbeat.

Metaphor

Another way to better tell stories or communicate is through a metaphor. A metaphor uses the same concept as a simile, but it does not say that object A is like object B, it says that object A is object B. For example:

She was drowning in a sea of tears. -> She was crying a lot.

Juan is a morning bird. -> Juan gets up early.

In my opinion, the metaphor is even better than the simile in creating a strong impression on another person. Compare the following expressions:

Captain Sparrow sailed the seas, mirrors of the sky. (Metaphor)

Captain Sparrow sailed the seas, which are like mirrors that reflect the sky. (Simile)

Captain Sparrow sailed the seas, which reflect the sky.

In my opinion, the first one has a more poetic tone that helps it make a bigger impression. Yet, both a simile and a metaphor can help you create dramatic figures or images that will help your listener to remember and understand your explanation more easily.

4. Analogies

Another useful technique for explaining concepts is an analogy. An analogy is very similar to a simile and a metaphor, but it is not considered a figurative language because it is not used to compare, but to relate. Contrary to simile and metaphor, analogy starts from two different things and looks for a common root. For example:

A hammer is to a carpenter what a paintbrush is to an artist.

If a person did not know the word “tool,” but understood what an artist is and what he does with a paintbrush, this analogy would help him to understand the concept perfectly without even knowing its name. That is why it is important to know your audience (technique #1).

The effectiveness of analogies depends on the knowledge we have about the listener. If you use an analogy that involves quantum physics to explain something to a basketball player, there is a high probability that he will not pay any attention to you. He could understand you, of course, but only if he puts equal effort into reading complicated science books as he does winning the national championship. How about using analogies about basketball instead? Would not the chances of him understanding you be higher? The same applies to other scenarios. If you are lecturing a bunch of college kids you have never met in your life, how about making an analogy about college, books, or learning? You may not realize it but you probably use analogies all the time.

Can you relate to this typical scene at a hardware store?

“Excuse me, sir,” the lady called to the clerk.

“How can I help you?”

“Can you show me where the elbow of the pipes is?”

“The elbow of the pipes?” he asked, puzzled.

“Yeah. That thing you use to join two pipes and go around a corner. I also need a T.”

“Oh! I get it. The ‘PVC fittings are in aisle four, in plumbing. Come with me. I’ll help you.”

Has it happened to you? This story is so common that most hardware stores have already chosen to add the words “elbow” and “T” to the joints of PVC pipes. In fact, do a search of the term “elbow” on Home Depot and you will see that if you write “elbow” you will get some “PVC fitting” as a result. We all know that a plastic pipe and an elbow are two different things, but hardware store customers who do not know the name have found it easy to find a common root in the bend of a specific type of PVC joint and a human elbow. And it has paid off.

5. Images

Another technique is the use of images, and this time we are not talking about figurative images, but the real thing. This is nothing more than making similes, metaphors, and analogies with images instead of words. For example:

This image from Antonio Guillem is one of the most famous memes in the world (Distracted Boyfriend) because millions of people have been able to understand a joke without a single written word. People of all nationalities in the world have seen this image and have concluded that in the center of it a dead man is walking because that woman on the right is about to take his heart out and bury it two meters underground. Or we have mentally substituted the women and we have seen ourselves reflected in the man, where the woman on the right represents the things we have and the woman on the left, the things we want. This second interpretation is the most common and for which many versions of the same image have emerged, with texts and other images superimposed, comparing one brand, book, or series for another. Here is my version of it:

You do not have to dedicate yourself to creating memes. The magic is in using images of widely known things to imply something by comparison (metaphor/simile) or association (analogy).

When the first PCs were invented, the people who designed them were wise. They did not want to have to explain what bits or bytes were, and they recognized that you might not even care about them. So, to make life easier, instead of bits you come across words like document or folder. When you go to save a file, you come across an image of a floppy disk. When you delete a document, it goes to a trash can. These images of everyday things allow you to use the device without fully understanding how it really works.

That is the purpose of all these techniques. Remember that explaining and defining are two very different things.

6. Variety

Human beings are also very different from one another. we learn at different speeds and in different ways. That is why this last technique is really a piece of advice — Use more than one technique. There are those who understand a metaphor better than a simile, those who understand a story better, who grasp images better. So, if you use more than one technique, you will increase the chances that people can understand you better, especially if you speak to many people. And use humor from time to time. Ideas are easier to retain when they are expressed in a fun way.

How do I know if my art of explanation has improved?

The only way to know if you are using these techniques successfully is through observation. If you explain a topic and only your peers can understand you, you still need to practice. My recommendation is that you write down your ideas before saying them, and understand that you use many of these techniques unconsciously. Now, try to do them consciously, on purpose, with pure intention.

Soon, you won’t even think about any of this and you will be the Picasso of explanations.

Honored to Be Recognized By Leading Analyst Firms For Our AI Innovation

We were quite honored recently to be included in research reports by two of the largest analyst firms in the industry: Forrester and IDC.

The Forrester New Wave Report highlighted key Computer Vision Consultancies and noted Wovenware along with 12 other providers – including major firms, such as Accenture, Capgemini, Deloitte and PwC.

The IDC Innovators Report identified emerging vendors of AI services that have demonstrated either a groundbreaking business model or an innovative new technology — or both. Wovenware was one of only four providers recognized for its AI services.

Being included among an elite group of the world’s largest consulting firms and software vendors is quite encouraging. It goes to show that it doesn’t matter how big you are, but true success relies on innovation, expertise and a deep commitment to helping companies derive the greatest value out of advanced AI, such as computer vision or deep learning solutions.

While we hear daily about the growing role of AI, the truth of the matter is that it’s really only been in widespread use for a short time. AI is still a specialized science and many firms – especially large and broad-based ones – have not yet built up a customer base nor the talent and infrastructure, and they continue to grapple with how best to support it.

The fact that we’ve been built from the ground to support custom software and AI puts us at a distinct advantage. We do have the use cases, as well as the talented data science and software engineering experts to support continued innovation.

And continued innovation is exactly what is occurring. Computer vision technology is at the forefront of deep learning and it’s enabling algorithms to detect very specific images on earth, from satellites. It’s already at work with federal agencies, and seeping into urban planning, sustainability and healthcare. It can help identify the number of cars on congested thoroughfares, the reduction of trees in a forest or suspicious spots on an X-ray. In fact, the Forrester report noted that Wovenware customers “praised its support for the entire CV lifecycle, technical expertise, and professional execution.”

Other forms of AI are also emerging, such as chatbots, predictive analytics and machine learning to automate core processes in a variety of industries, and Wovenware is at the forefront of those technologies.

But, we’re not just creating technology for technology’s sake. We’ve been successful because we’re led by customer needs, and the technology solutions follow. Our Design Thinking practice helps clients uncover their business challenges, end-user frustrations and desires and then we brainstorm, test and execute solutions that address them. It’s a team effort that comprises our design professionals, software engineers, data scientists, data specialists and most importantly, customers and end users.

Computer vision and AI are just now bursting on the scene, and we’re proud that we’re being seen as one of the front-runners. These technologies are holding great promise and there are plenty of opportunities for every player to succeed – we’re so glad we’re one of them.

Wovenware Named an IDC Innovator for AI Services

SAN JUAN, Puerto Rico–Wovenware, a nearshore provider of Artificial Intelligence (AI) and digital transformation solutions, today announced that it has been named an IDC Innovator in the IDC Innovators: Artificial Intelligence Services, 2020, doc # US45733220, December 2020.

According to the analyst firm, IDC Innovators are emerging vendors with revenue of less than $100 million, that have demonstrated either a groundbreaking business model or an innovative new technology — or both. Wovenware was one of only four providers recognized for its AI services.

“AI increasingly has been playing a bigger role with enterprises, but it has truly taken off this year by providing vital support to COVID-19 research efforts, as well as businesses that have had to adapt to a digital-first way of operating,” said Christian González, CEO, Wovenware. “We’re encouraged by the technology innovation taking place daily in AI and pleased to be named an IDC Innovator for our AI services that help companies gain valuable insights from their data across industries.”

Wovenware offers a bespoke model of AI solution development capabilities that address the full AI lifecycle. Its innovation workflow methodology covers business use case development; human-centric service design; training dataset preparation; building, training and validation of AI models; integration of models with production applications, and operationalization and continuous learning of models. A large portion of the company’s clients are in highly regulated industries, such as healthcare, government, and telecommunications, where security and privacy are top priorities. In addition to focusing almost exclusively on custom development of APIs and algorithms, Wovenware offers a “private crowd” for data labeling comprised of all U.S. citizens under NDA.

About IDC Innovators:

IDC Innovators reports present a set of vendors – under $100M in revenue at time of selection – chosen by an IDC analyst within a specific market that offer an innovative new technology, a groundbreaking approach to an existing issue, and/or an interesting new business model. It is not an exhaustive evaluation of all companies in a segment or a comparative ranking of the companies. Vendors in the process of being acquired by a larger company may be included in the report provided the acquisition is not finalized at the time of publication of the report. Vendors funded by venture capital firms may also be included in the report even if the venture capital firm has a financial stake in the vendor’s company. IDC INNOVATOR and IDC INNOVATORS are trademarks of International Data Group, Inc.

About Wovenware

As a design-driven firm, Wovenware delivers customized AI, computer vision and other digital transformation solutions that create measurable value for customers. Through its nearshore capabilities, the company has become the partner of choice for organizations needing to re-engineer their systems and processes to increase profitability, boost user experience and seize new market opportunities. Wovenware leverages a multidisciplinary team of world-class experience designers, software engineers, data scientists and data specialists to create solutions for cloud transformation, advanced AI innovation and application modernization. Headquartered in Puerto Rico, Wovenware partners with customers across North America and around the world.