miércoles, 4 de noviembre de 2015

Comments on "An introduction to Metaprogramming"

In this article we could learn about some methods and ways of auto generating code for other programs in other to do something in an automatic way without having to write huge programs.

Metaprogramming means a program that generates other programs or generates program parts. It can become very useful when we are trying to reduce a tedious or error-prone program.

Then way metaprograms work is by creating scripts that will generate other code that will eventually be executed to give the expected outcome.

There is also the possibility to generate source codes and also executes it in real time, this facility is commonly called eval, which allows the metaprogram to generate and execute a piece of code at the moment. This features is commonly available in languages like LISP, Perl, Ruby, Python and JS.

This eval function must be used carefully, it can become dangerous if it’s coming from an untrusted source, and although it can be dangerous there are some alternatives to this to avoid security concerns.

There are other types or source code generators such as Quines which is a program that generates a copy of its own source text as its complete output.

Some dynamic languages such as Ruby, allow the programmer to modify different parts of the program in an easy way during its executions. Some frameworks, such as Ruby on Rails allow the programmer to make automatic common programming tasks.


Metaprogramming may seem a complicated technique, but it is actually not complicated as it might look. It allows the programmer to automate some error vulnerable or repeated programming tasks. It can be used to pre-generate stuff like data structures and data tables, or test some of our programming abilities and save huge amounts of time by eliminating the need to right repeated code and improve our programming strengths.

miércoles, 21 de octubre de 2015

Comments on "Dependency Injection Pattern"

In the article Inversion of Control Containers and Dependency Injections pattern, the author presents to fundamental ways in which we can eliminate dependencies between a given a class and its implementation, this is called a Plug in and its a very useful too to add into our projects when trying to improve functionality. Some important plug ins mentioned in the article, are the Dependency Injection and the Service locator, but these are just some of the plug ins that are available and other ones can be useful as well but but other type of problems and solutions.

The configuration of the assembler can vary within criteria and tastes, from what we could read in the article, there are two main configurations available, the programmatic interface and the XML configuration type of solution.

In the XML configuration, it starts with a file, but it soon becomes problematic when trying to assemble, the best way to eliminate this issue is by using programming code to improve the performance of such configuration an avoid adding complexity to our development.

Implementing a flexible solution is of huge importance in the real world, it determines how easy it would be to change how the system works to another configuration without going through a lot of trouble. Developing Flexible projects with flexible configuration is key to a good quality software.

Systems always depend on other things, and its up to the developer to make such dependencies flexible and manageable.

Plugins are great solutions for theses kind of dependency problems, when usually the plug in has a prepackaged set of instructions that will deal worth a given issue or problem that was generated as a cause of a dependency.

As programmers, we must avoid developing software that depends a lot on complicated modules, instead, we should focus in developing flexible and easy configurable software.

miércoles, 14 de octubre de 2015

Comments on "Understanding the SOLID Principles"

The definition of the “Solid Principles” is a set of principles and practices that aim to improve and have better practices in the development and creation of classes and the creating of instance objects of a class. These practices are not always the same, and depend of the type of object we want to create, in some cases such practices may vary.

Solid doesn't refer to the conventional meaning of the word, it is actually a game of letter, which represent some principles know in the computer science community.

The first principle of the “Solid Principles”, is the SRP principle, which focuses on the development and verification of classes that must have certain responsibilities and will make a better understanding on which their responsibilities are. This principle prevents that any changes made to a certain class may affect other independent class in a given project.

The next principle of the “Solid Principles” is the OCP principle, which says that any class and/or function should be available for other classes to extend, in order to write unnecessary code and duplicated code. The class must be adaptable for modifications of any circumstance given.

The next principle of the “Solid principles” is the LCP, this principle establishes that classes must be able to be interchange, where two classes have a common parent or inheritance, this will permit flexibility in our projects.

The fourth principle, is the ISP principle, which says that is better to have a lot of interfaces doing certain processes that to have one interface doing a lot of tasks.
The last principle is the DIP, which says that a class must have to use abstraction in order to avoid having dependency between classes, which makes the relationship between classes much more free and natural.


These principles if applied in a correct manner, will make classes a lot more efficient and therefore better programming projects.

miércoles, 7 de octubre de 2015

Comments on "Inversion of control"

Inversion of Control is another way of thinking about the interaction of a certain flow of actions of a piece of software are not always controlled or not necessary in control of the programmer, in which case the program acts in some cases by itself doing things without human intervention.

These automatic behaviours are often defined by another piece of software, a clear example by this can be a framework, in which the instructions and set of pre charged modules of the framework will determine the actions and the moment in which certain instructions will be called and take the role of controlling the applications activity and behaviour in an automatic way.

This, in a simple sense is a king of artificial intelligence, some pieces of software work by themselves without the need of human or the programmer’s intervention.

There is another very important concept mentioned in the article, which is Ioc, this concept is fundamental to understand how it is possible that a framework can act by itself and make decisions on its own, in order to determine when to take action an execute certain sections of our program. It makes clear, which is the difference between a framework and a library, and explains that a framework is capable of calling code from a certain source, and a library is simply the definition of any needed functions in order to make a piece of software work by extending certain functions and classes.

The Ioc method becomes quite useful when we involve the template method pattern, in the situation where a super class defines the flow of events and controls how a program will behave in a given scenario.


Some things are meant to be done in an automatic way and this king of tools become very useful, when quick and automatic decision making is crucial. 

miércoles, 30 de septiembre de 2015

Comments on "Software Craftsmanship with Bob Martin"

Software craftsmanship is when new people get involved in the software development industry, and can learn from the previous experiences of the people already involved, these persons become mentors to those with little of none experience in the field and creates a growing opportunity in the software community, where some people help others and at the same time are been mentored by others and so on. This cycle generates a growing potential and enables people to learn new things.

Some disciplines like computer programming can sometimes be tedious to this king of practices, because the knowledge needed is not just something you can learn from voice to voice, and requires experience in the field to fully understand how things are done and how certain things work. This doesn't mean it’s impossible to mentor someone with little experience in a certain area of the computer software development process. This can become a collective success opportunity if executed in the right way.

The “Manifesto of Software Craftsmanship” is a great example in how advises and tips from someone with the right experience can change and become something of a huge impact. A simple tip can reflect on better software quality and therefore higher product value. By doing this as a community we can all improve from small things to huge things that will have an enormous impact on software development projects.


Having the initiative to ask for advice from somebody that has a lot of expertise in a certain area and being able to give such advice to someone who is in the process of learning or is new in the industry, can sometimes make a difference between starting with the right foot than starting with the wrong foot. It is always comforting to have advice from someone who has already done mistakes in the process of developing software, in order to avoid making such mistakes ourselves. This way we can grow personally, professionally and as a community.

lunes, 28 de septiembre de 2015

Comments on "Is design dead?"

Some sceptics may think or say that design is dead, the true about this is nowhere near it. Design has been and will be a fundamental piece in the process of developing software. Without design a software project can’t work because design is essential for making a quality and durable software that is easy to develop and simple to maintain.

Design may not be everything, and probably some projects can be developed effectively without doing so, but it is definitely a good practice that can facilitate the process of software developing and future software maintenance.

Some programming techniques have changed over time, a clear example of this is the Extreme Programming. The change between programming techniques doesn't mean that the fundamental steps of the development process should change. In other words, as long as the actual development process line remains, taking the necessary time to design and think how the software we are going to develop must be built will remain as we know it and will have the huge e importance in the development process it has now a days.

Sometimes taking the necessary time to make a proper design can become boring, but as a long term investment of time it is definitely worth it. Doing proper designs can save hundreds of hours in computer programming time and development, tests and post project fazes.

Other important practices when designing a software project, is not to forget to make diagrams such as UML diagrams and using the re factoring techniques, to avoid spending time in unnecessary steps that can easily be avoided if using the proper design practices.


These things all together, when done in the right way, will reflect in a good software which is easy to modify is needed and will help to put in practice the experience of previous design methods.

miércoles, 2 de septiembre de 2015

Comments on "Who need an architect?"

The word architecture or architect if often misunderstood, some people think architect or architecture are just fancy ways of saying design or designer, but the real meaning of these two concepts is a lot more complex, and a lot deeper.

Some people say architecture is just “the highest level concept of a system in its own environment”, this is not completely accurate. Another definition people consider is “the shares understanding of how a system works by everybody involved in the development process. This means that everyone in the development team, understands how the large components are composed by smaller components, but the architecture only includes the components and interfaces that are understood by all the developers.

Finally there is a third accepted definition by the software community, this definition states that an architecture is the set of design decisions that must be made early in a project.

The architect must not only design the main structure an module relationship between the software components, the architect must be very aware of what’s going on in the project, looking out for important issues and following them before they become serious problems.

The most important role of the architect is to work in collaboration with the development team to make sure everything is following the design plan and expected outcome, the role of the architect it no really to mentor the team, but to make it raise and take on more complex issues to develop a better and more efficient software.

It is very important to get the design architecture right before the development process starts, architecture design error may result in a very complicating issue to solve once the development process has started. Although it has hard to go back and change our designs, it is not impossible.


Software has little limitations, but the main limitations software development may have are design and organization, so this is why making proper architectures is crucial for our software development projects.