Design Patterns

Once you have started your carreer as a software engineering it is almost imposible not to hear about design patterns, and the more that you go further your career the more important this topic becomes.

In order to understan what a design pattern is, we must see the definition of pattern, a pattern can be describes as a repeated or singular way in which particular things are done, what this definitions ways is that a pattern is like a serie of steps that ,must follow an order.

We are going to make a bowl of cereal

  • First put the bowl
  • Then put the cereal
  • Then pour the milk in the bowl
  • Finally enjoy

This is the most common way to make a bowl of cereal, because in this way all the cereal gets milked, even though there are other ways to make a bowl of cereal, like pouring the milk before, the result may not be the same, or at least a little bit different than normal.

Cereal
This is a picture of a bowl of cereal by Annie Wang

Thats basically how a pattern works, and it is no different when we talk about design patterns in computer science, as we previously saw, design patterns are must not define the final product, but a serie of instructions that may lead you to the final product, defined as repetable solutions that allows users to solve common problems.

One of the best things about design patterns is that because they are meant to solve common problems, and common problems occur quite often, these patterns are always improving, which helps to make them more usefull.

There are two types of design patterns: structural or behavioral

Behavioral

rooftop pattern
A photo of a window pattern, by Lubomir Panak

This kind of patters focus in the object comunication patterns, which focuses on functions instead of rules, most commonly followed by:

  • Chain
  • Iterator
  • Mediator
  • Observe
  • State
  • Visitor

Structural

that´s life
A photo of a stair structure by ThatsLife

On the other hand, structural focuses on object and class compositions, in which it is defined the ways to compose new objects in order to obtain new functionalities

Some of the different methods in structural design are:

  • Separating object’s interface from it’s imlementation
  • Compose objects intro tree structures to easy manage
  • Add responsabilities to objects
  • Creating classes that represents a subsystem

My personal opinion

This is something that I definetely have struggled with, because when you are working in a colaborative project the way that your mind works is not the same as your partner, which means that most likely the way that you will work with the code is not going to be the same, this because you follow diferent design patterns, so it can turn out into an spaguetti code, in those cases I think that is really smart to have these kind of programmin strategies because with these design patterns you can divide the main functionality of the software into pieces that can be treated as individuals and finally merge them to obtain a full-well organized software, this is definetely a proccedure that I would consider using next time I’d have a software project.

If you want to know a little more about design patterns check out this video

This is a video of a brief introduction to design patterns by TechLead

REFERENCES

Object Oriented Design. (n.d). Design Patterns. Retrieved from: https://www.oodesign.com/

Source Making. (n.d). Design Patterns. Retrieved from: Souhttps://sourcemaking.com/design_patterns

Modeling Languages and Tools

In order to talk about modeling languages we firt define what a language is, language is a neurotipical process that allows people to organize and analyse diferent patterns, these will lead people to understand and replicate what others do, as an example a baby hears that everyone calls the woman who gave him birth «Mom», so he analises and replicates the sound, this how a language works.

The diference here is that the topic that I will explain in this post has nothing to do with babys, instead we will see how a computer will analyse and compare situations in order to create proccedures or develop a diferent context.

A modeling language is a graphical or textual computer language that is used to design models of new software or system.

tools
This a photo by This_is_m, it is a Mac computer

Modeling is an integral part of the software development process, this process allows to user to understand how the data works, the sofware structure and the states that the software will take. Worldwide there are a lot of modeling languages but the most common of all is known as UML, Unified Modeling Language, which describes the software with all of their functions and how the software communicates.

In other hands Textual Modelin Languages are quite popular nowadays, this because they are formalized natural languages that has the capability to describe the whole functionality of the sofware, this Modeling Language has to follow these simple requirements.

  • Easy to read: No matter who, everyone should be able to understand the main functionality of the software by reading the TML
  • Not ambiguous: If the TML is confusing it may cause some misunderstandings about the functionality of the software
  • Describe levels of abstraction: This is one of the main characteristics of the modeling language because it should be able to describe the software in a logical and physical enviroment

The main diferences between a Graphical Modeling Language, and a Textual Modeling Language is the way that each one describes the software

Graphical

This a picture of an UML desing made by me, it describes each method in the software and how are these conected

Graphical shows how the software communicates and and it’s method elements

Textual

This is a picture of a TML model describing the color and the shape of an item in a software

Textual shows every aspect of the item, including it’s characteristics

My opinion

I can easily say that I have used some of this modeling languages, but as I as I said, just some of them the one that I have the most experience with is definitely the UML, this because in my opinion is the best way to describe what the software can do, how does the software is connected, how the communication between methods work, the elements of the method and how does they work as one simple software, by the other hand I have never used any TML, not because I did not need to use them, instead because I have not known them yet, of course there are pros and cons about every model, but my recomendation is that feel free to use the one that you are more comfortable with, this because no matter what you are the one who is going to make the model, and is your project the one that needs to be explained in it’s more simple form.

References:

Martin, M; Macek, O (2012) On General-purpose Textual Modeling Languages, recovered from: http://ceur-ws.org/Vol-837/paper10.pdf References:

When to use Use Cases

Imagine that you have a project that you want to build, the only problem is that you don’t know when or how to start it, this when you can use Use Cases procedure.

Use cases is a method that allows the users to identify, organize and clarify the requirements of their projects. This method describes step by step what the user needs to accomplish in order to get a successful project, in each step there is a specific goal to accomplish and how to avoid mistakes, this method allows the user to decidir which path will he choose to create his product.

  • Organize the requirements
  • A sequence of follow up actions
  • Multi use model, if it worked for something it should work for something else
  • The vision of the goal of the product
the instant of success - had to snap a photo
Blake Patterson– This is a picture of one of the firsts Mac computers

How to use it

Fist of all the user needs to have a clear idea of what he is trying to achieve, Secondly, describe the process that he will follow in order to get the product, Thirdly, the user must check and re-check the product in order to give maintenance to the system, and Finally, repeat the process until the product achieves the main goal, previously established.

I will try to give an example of how can a use cases model can be used, We are going to use a normal shopping situation as an example

First of all describe the users, and their responsabilities.

  • Customer: look for an item, purchase item, cancel purchase.
  • Seller: look for an item, add item, delete item, ship item.

Once you have described the actions that can perform the users, now you must create a model with this actions, and relate the actions to the users allowed to realize them, this model should look like this.

This a picture of the use case model described in the last parragraph

Personal Opinion

This a nice way to represent the actions that the users are allowed to perform once your project is done, it is basically what your project must be available to perform and verifies the permisions and restrictions of users, in every big project development there must be a document that describes the main functionality of the project, the requirements, the goals, the process that needs to be followed in order to create a project, I consider this model to be an easy option to explain the permitions of the users, this is definetely an easier way to see the users potential.

At the moment I am working on a tennis project for one of my subjects, and in this project we must implement every topic that I am posting, for this example I woul like to show you how our use cases model looks like, this project allows the users to play tennis, the thing is that uour project is basically a datin app, just instead of dating users play tennis and get fun.

This a picture of an use cases model made by one of my colleages

If you want to know more about our project check my colleage Francisco’s post.

References

Brandenburg, L. (s.f) How to write a use case. Bridging the gap. Retrieved from: https://www.bridging-the-gap.com/what-is-a-use-case/

The in depth of USP

This is a picture that describes the amoun of time taken on each of the phases of the model, it describes the amount of time and the duration of the phase in terms of time.

When it´s time to create a software from scratches you must allways choose a model to develop your software, in which every model you choose you will allways follow the same phases in order to develope your product,which are:

Planning: Which is the phase where all the requirements and the tools to create the proyect are defined, basically define the structure of the proyect.

Modeling: Which is the phase were it is defined how the proyect must look at the end of the development.

Construction: Which is the division of the software in order to make the job easier and faster to complete.

Deployment: Which is the phase where the process of delivering the product takes part.

Communication: Which is the phase where the consumers gives feedback about the products in order to upgrade the software.

Unified Software Process

All this models follow this simple phases in their own ways, even though this model gives, the difference between these models and the USP is that this model is an iterative and incremental model that can be customized depending on the software needs.

This model adds four extra phases that allows the developers to upgrade the proyect at every main phase, which are:

Inception: This is the phase where the requirements and the goals of the proyect are, as well as the risks of developing the proyect.

Elaboration: In this phase an in depth analysis of the software is made in order to know the pros and cons of the software.

Construction: This is the phase were the software is developed, then is tested and finally prepared to be given to the consumer.

Transition: This is where the software is delivered to the users in order to receive feedback.

Personal Opinion

As I wrote in the description of my blog, I would like to help readers to understand the topics and explain how these topic helped me to develop better projects, first of all, in every post I will give a brief introduction about the topic, and then at the end explain what are my thoughts about it.

This is definetely a process that you would like to implement when working in a big project, why?, because the way that this model works takes too much time in analysing and verify each phase, when you try to create a small project like for a class or something that needs to be done in a small amount ot time is way better to use another model process, it won’t take a long amount of time and would fit the main need of a project, instead if you want to develop a big project, this is definetely the process to implement, the reason is very simple, with this method you can analyse, implement, develop, check, re-check, fix, repeat, test and fix again, this method allows to detect the strenghts and weaknesses of your project, it will tell when to and how to work on your project, I definetely recomend using this method only when working on big projects, because takes large amount of time and work.

References

Information: http://bawiki.com/wiki/Unified-Process.html, David Olson

Information: https://www.youtube.com/watch?v=yUB0BsEimTU, Education 4u

Photo: Wikpedia

A never ending cycle?

The life cycle of a software

Coming out (Links to an external site.) flickr photo by Randy Read (Links to an external site.) shared under a Creative Commons (BY) license

Through the years people and technology had been evolving continuously, there is no doubt about it, even though people are made by nature and nature and technology is made by people both follow the same basic life rules, the life cycle. People born, grow, make other people and die, so how does technology follows the same rules? Well it is not that similar but pretty much, as an example I will introduce to some example of some software life cycles.

A must have of a software

When we talk about software and how it is created we can easily think about some simple task that the software must complete before becoming a full working software

  • An idea
  • How will it be designed
  • How it is going to work
  • How is it going to be produced
  • It is going to keep updating, or complete a objective and die

In my opinion every software before becoming a software needs to get through all this points before being ready to sell to the public, that is the reason why there are so many life cycle models that describe the beginning and the end of a full working software.

Waterfall

The waterfall model is the oldest in the world because it was the first model that could handle the basic needs for a software, it follows a structure where all the instructions for an specific phase needs to be done before getting to the next phase in order to finish every phase successfully, the only problem is that when the software is done it may have some not updated or pre finished error that were not notable when each phase was done.

Agile

The agile model is one of the newest models in the world, it focuses on quick actions to solve the customer needs easily and efficiently, because the software is divided into little segments that can be treated as individuals so when a need is presented it can be easily manageable it has shown really good results so it may be not the most effective method but one of the fastest one.

Software follows the same life cycle that humans, because as humanity is magical so do software development, even though there are still more models and updated versions for older models, viewing all of them would take us weeks so there are some of these models:

  • V shaped model
  • Prototype model
  • Spiral model
  • Magic box
  • Iterative
  • Incremental

Images and references taken from:

A Broken Me

This is the place where you can be the real you, it is time to show you that you’re really missing.

Why am I here?

I’m here because I needed a place to talk about myself and about how does it feel to be in my place, the more you read this page the more you will understand the main focus of my blog.

I would like to talk about how does a life of a software engineer is, about how does it feel to want something really bad but at the same time not feeling part of it, about the things that made me give all of me in order to achieve what I proposed, because I want to help people by showing them that with the time and effort every goal is achievable, they just need to never surrender.

By doing this I would like to get involved with people that have faced similar situations like mines, that every day keeps fighting for what they believe is good for them, for what makes them never surrender, I want get involved with more broken wallflowers.

A wallflower by definition is a person who occasionally feels that he is not a part of a group, that is isolated, shy and who sometimes feels like he is invisible, with this blog I want to show other wallflowers that we can be heard, we can be seen and most important we can still be ourselves, that what I would like to accomplish with this blog, to make us feel that we are not broken wallflowers anymore.