Tuesday 16 December 2014

Cómo hacer mejores estimados de tiempo y recomendaciones para reducir las fechas de entrega de proyectos

Realizar buenas estimaciones de tiempo para los proyectos es muy importante. Mantiene los objetivos, fechas y presupuesto en un buen estado. A veces decidimos tomar el camino fácil y comenzamos con estimados de tiempo poco fundamentados para los proyectos. Esto es una mala práctica; es necesario revisar la documentación, las experiencias y las personas involucradas con el fin de realizar una mejor estimación y tener una base sólida que la sustente. La mejor forma de obtener datos para apoyar nuestros estimados, es a través de proyectos anteriores y situaciones similares, Esto es fácil de lograr si mantenemos una bitácora del presupuesto que en realidad se requirió y de las fechas de entrega para todos los proyectos.

Comencemos con los pasos necesarios para tener buenas estimaciones de tiempo:

Dividir el proyecto en tareas. Éste es el primer paso que debes realizar. Cada tarea debe de tomar entre dos y cinco horas para ser completada, algunas tomarán más o menos tiempo, por ejemplo, ciertas tareas son muy importantes y necesitan estar aisladas, otra situación, puede ser que la tarea requiera completarse toda de una sola vez y no es posible dividir. Cuándo nos encontremos dividiendo tareas, debemos tratar de mantenerlas lo más aisladas posible unas de otras, ya que es más sencillo realizar estimados para pequeñas tareas en comparación con el esfuerzo requerido para estimar tareas grandes o con muchas relaciones entre ellas; esto te puede mantener enfocado y  encontrar requerimientos adicionales / documentación / personas que van a ser necesarios para completar cada tarea. Esto es de gran ayuda también cuándo buscas tareas anteriores con las cuáles quieres comparar las actuales y ayuda a entender si otras tareas deben ser realizadas por otros equipos. Por ejemplo, si deseamos obtener cuentas de prueba para un sistema, es posible que el departamento encargado de manejar las cuentas, tenga datos más relevantes para nuestras pruebas, porque ellos conocen mejor cómo funciona el sistema y que cuentas les interesa probar.

Revisar proyectos anteriores para encontrar situaciones similares. Ésta es la mejor forma para conocer cuánto tiempo tomará realizar un proyecto similar. Aquí debemos tomar en cuenta que si el nuevo proyecto es muy parecido al anterior, probablemente tomaremos menos tiempo en realizarlo, puesto que ya hemos superado la curva de aprendizaje necesaria para las tareas que requirieron investigación y la lectura de diversa documentación.

Juego de poker. Cuándo se esté calculando la cantidad requerida para una tarea, es una buena idea tener la opinión de uno o dos miembros experimentados del equipo. Ellos siempre ven algo diferente y pueden ayudar a realizar una mejor estimación visualizando algún dato que no tomamos en cuenta. Es importante mencionar que si las estimaciones difieren mucho de persona a persona, es posible que no tengamos suficiente información para determinar cuánto puede tomar realizar una tarea.

Pasos previos y pasos posteriores. Muchas tareas tienen pasos que se deben realizar antes de comenzar la tarea por ejemplo: crear un nuevo repositorio, una nueva cuenta de prueba, esperar la configuración de un ambiente de pruebas. Estos se deben tomar en cuenta como parte del estimado, asimismo, cuándo la tarea se finaliza, casi siempre hay una serie de pasos posteriores, por ejemplo: enviar un correo a los solicitantes de la tarea, crear notas para la liberación a producción, dar de baja cuentas de prueba, etc.

Factores externos. ¿El equipo de soporte está muy ocupado para configurar un ambiente de prueba?
¿El área de finanzas no puede proveer la información en las fechas de ejecución del proyecto? ¿Podemos liberar el sistema en la fecha que seleccionamos, o esto no está en la ventana de liberación para el área afectada?. Todas estas preguntas son importantes cuándo establecemos la fecha de liberación de un proyecto; de nuevo, cuándo hemos estado en situaciones similares, podemos usar la experiencia para determinar que factores externos debemos tomar en cuenta.

En resumen, hay muchas cosas que se deben tomar en consideración, pero algo que debemos tener en mente, es que debemos mantenernos lo más "optimistas" posible, no podemos estar pensando que mañana va a ocurrir un "Armageddon" para fundamentar que el proyecto no se entregará a tiempo. Se pueden dar situaciones que retrasen la entrega, pero deben de ser resueltas en el momento en el que se presentan y el proyecto debe de ser reorganizado adecuadamente.

Finalmente escribiré sobre algunas formas de entregar el proyecto en menos tiempo y con menos esfuerzo:


  • Involucra a todos los departamentos interesados en el proyecto. Los proyectos de desarrollo de software también deben incluir a miembros de los departamentos interesados o afectados por el proyecto. Se les debe asignar tareas como: búsqueda de cuentas de prueba, análisis de resultados, etc. Esto tendrá como resultado, la revisión a tiempo de los requerimientos de los departamentos y la planeación de los siguientes pasos; por otro lado, los departamentos podrán conocer cómo va el proyecto, qué expectaciones tener, dar retroalimentación a tiempo y entregar información relevante para las pruebas.
  • Sistemas prefabricados. Muchos proyectos contienen un objetivo similar al de algún software existente en el mercado. Si puedes comprar un sistema que tenga una buena relación costo/beneficio/calidad, debes considerar comprarlo y apropiarlo a las necesidades del proyecto. Debes comprar un sistema confiable que haya sido usado por varios usados, esto garantiza que tengas una cantidad importante de pruebas que validen su funcionamiento y reducirá drásticamente el tiempo del proyecto que estás ejecutando.
  • Contratar compañías expertas. Si el software que vas a desarrollar es muy genérico, es posible que exista una empresa dedicada a realizar el sistema que necesitas en una cantidad menor de tiempo y que probablemente te sorprenda con un buen precio. Esto te permitirá enfocarte en otros proyectos que sí requieren la atención explícita de tu equipo y realizarás más cosas en menos tiempo.
Esto es una guía básica que espero encuentren útil al momento de realizar estimaciones para proyectos. Ésta es la versión original. Estaré traduciendo varias entradas, con la finalidad de llegar a más usuarios. 

¡Espero hayan disfrutado la entrada!

Monday 15 December 2014

Making good estimates and ways to reduce delivery dates



Making good estimates is very important because it keeps the project goals, dates and budget in a healthy state. Sometimes we take the easy path and just throw numbers for the budget and the time that it takes to deliver the project, but that's a bad practice, we must review documentation, experiences and the people involved in order to give a good estimate and support our numbers. The best way to obtain support data is through old projects and similar situations, this information should be easy to obtain if we keep track of what was the real budget and the real dates of delivery of all the projects.

First I will talk about the required steps to have good time estimates:

  • Divide the project in tasks. This is the first thing you need to do. Each task should take around two through five hours to complete, some tasks might take more time or less time, for example, certain tasks are very important and they need to be isolated, or it could also happen that they need to be completed all at once. Something else to take into account when dividing tasks, is to keep them as self independent as possible, meaning that there's no dependency on another tasks. It's always easy to estimate the time required for small items than the one required for big items, this can keep you focused and find additional requirements/documentation/people that you will need to complete each task. This also helps when you're looking for similar situations in the past, it's easier to find a matching similar situation when tasks are divided properly. Another good thing about this is that it helps in understanding if some tasks should be made by another team, for example, in some cases, testing accounts can be provided by another department because they know better what are the things that they want to test.
  • Review old projects and find similar situations. This is the best way to know how much will it take to create a similar project. Take into account that if the new project is really similar, we may end up finishing it sooner than expected. This is because in most projects, there's a learning curve for items that needs discovery and reading documentation.
  • Poker game. When deciding the amount of time required for a task, it's a good idea to have the opinion of one or two experimented members of the team, they always see something that is missing for the other individuals, and that could be key to set the estimate for the task. Keep in mind that if the estimates provided are very different, is a smell of insufficient data to set the required time for completing a task.
  • Pre-steps, Post-steps. It's important to know if there are another things needed to start and to finish the task and add it to the estimate. For example, you might need to create a branch for working on the task, set up a new account for a system, wait for a testing environment, etc. Those are the pre-steps, but when you finish the action items of the task, there might also be another post-steps, like creating release notes, sending out an email to the business owners, deleting testing accounts, etc.
  • External factors. Network team is too busy to set up a testing environment? Working with the financial area in a time that they cannot provide information fast? Can you release the software project in the date you selected?. This and many other questions are important when creating an estimate and deciding on dates of delivery, if you have been in a similar situation before, it could be easy to know when some external factor will be affecting the date of delivery.

There are many things to take into consideration! but something to keep in mind is that you should stay as "optimistic" as possible, meaning that you cannot put as a support to your estimate, the fact that there could be an "Armageddon" tomorrow, and your project might not be completed on time.

There will be situations that can delay the delivery date of the project, but they should be addressed at the moment that they happen, and the project should be reorganized accordingly. Another thing that I would like to talk about is ways to deliver the project in less time, and with less effort:

  • Get all the team interested in the project involved. Software projects are not completely developed by the software team. If there are going to be changes to the some department systems, it's a good idea to have them involved as much as possible, and even assign some tasks to them (like finding testing accounts, providing data analysis, etc). The outcome of this will be early checking the requirements of the departments and based on that, planning the next steps, on the other hand, the departments can know how's the project going, what are the expectations, provide early feedback about features, and give relevant data for testing.
  • Buying systems. Many projects are similar to current systems in the market. If you can buy a system that has a decent trade-off between cost/value/quality, think about buying it and customizing according to your needs. You should buy a very known system in order to trust that it has been deeply tested and that can reduce the time required for delivery.
  • Request help from another company. If you have the budget, it can be useful to have another company help you, specially if they're experts on the system you want to develop, this can be cheaper than expected, because they have passed the learning curve and can save you a lot of time, and allow you to focus on another projects that can only be developed by your team.
That's it for now. I hope you enjoyed this entry. Let me know if you have any questions or if you would like me to talk about another topic. Many thanks readers!


Sunday 9 November 2014

Benefits of SEO (Search engine optimization)

My last post was an introduction guide for a successful website. Now I will present you the benefits of going through the search engine optimization process.

  1. Increased traffic. Generally speaking, the main objective of a website is to reach a bigger audience, it doesn't matter if your website is a store or if it's for helping other people with some topics, the bigger the traffic, the better results you'll have. The reason why traffic is increased is because search engines will place your website in a better position in the seach results, once you finish the SEO process.
  2. Usability is a side result. The website is faster and when you have friendly URLs, your website is easier to navigate for the users, so they will be happy to use your page, content is also improved and they will know were they can reach things. For search engines, it will make it easier to understand your website.
  3. You can track everything. It's much easier to track a website that has gone though the SEO process, because you have a better organized website, the content is interesting, the structure of the URLs can help you with insights on what to improve, you can track which pages are not being visited, get statistics of usage of a specific section, know where your visitors are leaving the page and so on.
  4. Putting ads from other companies. If your website has a lot of visitors, it's very likely that companies related to what you do, would like to have ads in your website. This can give you some money in return and make your website even more popular.
  5. Have an international 24 x 7 website. Once you start to be popular, you can decide to expand your website to reach more countries by creating country specific pages, and of course, your website is alive all the days! it never closes, so, everyone who can reach you, will be able to do so through your website.

There are many other benefits, I just wanted to give you an idea of the importance of SEO. If you like this post, please comment or tell me about a topic that you would like me to write about. See you soon!

Introduction guide for successful websites (SEO, analytics, page rankings, popularity, code insights)

Popularity, visibility, traffic, are important characteristics that a web site must have in order to be successful. I will talk about things that you can do to improve your website. Please take into account that this is for general purpose and that in most cases they work, but depending on the context, you might find it useful to follow other paths.

A very helpful tool you can use to know who visits your website and give you important usage statistis is google analytics. You can follow the instructions on this page to have google analytics on your web site: https://support.google.com/analytics/answer/1086338?hl=en&ref_topic=1726910&rd=1

Now that you have this tool, I will present you two major aspects and the important recommendations you must follow during the Search Engine Optimization process:


1) Code


Search engines are indexing web sites. They work on understanding what's the page about, and then they can categorize and assign search keywords to decide when to show up the page. But remember that search engines are reading the html code, so if it's not structured in a good way, it will be very difficult for the search engine to index and categorize the pages. The starting advise on this is to set metakeywords and metadescription according to the page content, try to catch the big picture in a few words, this is a marketing endeavor, but devs should be aware of having this done for every important page on the website. Another recommendations are:

  • Having friendly URLs. The first thing used to index a web page is the URL. So it's important to keep them readable and understandable. For example it is much better to have foo.com/colors/grey, than to have foo.com?default.html?category=12&item=15.  Can you do some interesting indexing with the second url? Guess what, search engines cannot do it either. There are many tools that depend on the code / technology used for creating the page, that can help in having friendly urls. 
  • Title is important. I'm referring to the <title> html tag. This is the second thing that the search engines use for indexing the page. What does the title says about the content of the page? It is important to have this in mind when you're setting it.
  • Content should start in the first lines of the html. This means that the content specific of the page should be easy reachable by the search engines in the first lines of the html. If you put a lot of non content related code, search engines will fail to do a correct indexation of your page and it would be hard for your page to be reachable even if someone is searching for something specific to  your website.
  • Optimized static content. Images, css and javascript are static content that should be optimized, in the case of the images, this means, that they should have a decent size, a helpful  tool to accomplish this is yahoo image optimizer or irfan view, this last one has a way to do a batch compression of a set of images, this is very helpful, because you can reduce the size of a complete directory quickly. Talking about css, it is recommended to have all the css in one or two documents at most, it's not recommended to use inline css and in order for the browser to load the page quickly, it's a good idea to use a css minifier like css compressor, css should be somewhere in the <head> tag to make it easy to read for the browser. Talking about javascript, it's a good idea to have it in one separate file, it's not recommended to use inline javascript and it should be placed near the end of the html in order for the browser to load the page quickly.


2)  Marketing 


I will not give a full detail of why marketing is so important and the things you can do to improve it, because this blog is about software development and the technical -develoment- side of it. Anyway, there are some things that I would like to mention.

  • Be aware of the analytics concerns on the website. In order to obtain useful data from analytics, the marketing department should decide what things apply for the website. For example URLs need to provide useful data. For example, let's say that you're a company that sells hotel reservations and that you need to know how many reservations are made per month for each hotel company, and that you're not that interested in knowing the place. In this case, the url confirmation of the hotel reservations, can be created having this format: hotels.com/Confirmation/HotelCompany/Place/.. and then, in google analytics, you can see how many confirmations were made to an specific hotel company by checking the visits made to this url: hotels.com/Contirmation/HotelCompany. If you were to do it the other way around: hotels.com/Confirmation/Place/HotelCompany, it would be hard to obtain the decided data, you'll need to check all the visits made for each place to the hotel company you're looking for. Another important thing to define is when you want to track URL clicks from your website, this are concerns that the marketing team needs to establish and make them clear to the developers in order to get useful data from analytics. If you want to know more about URL structure, check this post.
  • Get insights from analytics. Once the website is launched, it's a good idea to keep track of the visited pages and the flow of the customers through your website, in this way, you can have useful statistics for knowing things like, which products are being successful, which sections of the website are used (for example, if you have a comment section, it is helpless if it's not in use), and so on, this can help you decide on future campaigns and see were you need to make investment.
  • Targeting more than one country. Some people doesn't know that having different websites (even in the same language) but that target different Countries, need some special considerations. For example, if you're using the same top level domain for both websites (for example storeforusa.com and storeforcanada.com) and you have pages with the almost the same content (for example the page of a product) then, when you search in google, you'll find results from both websites! this is because .com is considered "international" for google. You can change this behavior by using a different top level domain, it would be better to have something like: store.com.us and store.com.ca. And apply some configuration changes in google analytics. For further and more specific information, please visit this google documentation page.  

A final advise is to use tools that can help you know which aspects of the code can be improved. I find them very helpful, you can read the results and take action to improve the code, they give information about loading time, css, image improvents and so on:


There are many benefits of having a well optimized website. If you want to check them, please follow this link. I hope you enjoyed this entry! 




Sunday 26 October 2014

Soft skills - An overview of major software aspects

The "darkest" required aspect of sofware development! (or at least I believe so). But in the end it is a very important aspect -just like the others- because it relates to communication, and the ability to obtain the required information at the right time.


These are some important soft skills for software development:

  • Communication abilities. Needless to say how important it is! developers must find a way to effectively communicate with the team and vice versa. Something I always suggest, is to write what we want to communicate, it is usually easier, and then start a discussion with the team.  Communication abilities, include the effective way to answer emails, which can led to a complete entry, but the thing is to always focus on the key questions of the email, and answer then, once that that happens, then you can continue with less important topics like "personal" questions. For example, let's suppose that you arrive late one day and you receive an email asking about why a component is not working properly and the reason for you to be late. You should start answering the reason why the component is not working properly, and then at the very end of the email, the reason for you to be late at the job.
  • Team work. You'll usually find yourself working in conjunction with other members of your team, so it's important to know how to be a good team player. Be polite, be respectful, keep focus on what you're doing, be assertive, be on time, and be inspirational to the other members. Put your personal feelings on one side and be professional, try to understand your team-mates. Some concrete advise for example, is to be very communicative, for example, if you're taking a day off, you're probably telling your boss about this, but you should also tell this to the members you're working on, so they can get organized. Take an active part when you're being asked about code conventions -or any  convention: arriving late, taking day offs, changing lunch time, etc-. That is the only way to keep a team happy and effective.
  • Negotiation. When you're in charge of a piece of the system, sometimes you can be asked to do stuff that is very complicated and that cannot be delivered on time. In this cases, you must communicate this, and id possible, analyse what you are being asked to do, and come up with another option. This apply usually to developers, but also for project managers, when they're being asked to include a lot of features, they should find a way to balance the due dates vs the work that has been developed.
  • Education. Unfortunately -or fortunately?- education has a lot to do with soft skills. Usually your parents are the first ones to teach you how to handle situations. Of course, having a "bad" education is not the end of your career, you must also read books related to this topics to get a full understanding on how to be an excellent developer. And another thing to keep in mind is to use common sense. If you're in a complicated situation, what can you do to improve it? is it your fault? what options do we have? And keep yourself positive, don't let other people bitterness change the person you are. Think always on a polite way to handle situations, if you receive a rude email or someone is acting awfully, you shouldn't do the same, keep focus on the goal of the project and find a polite answer to the request they're making.
  • Ownership of your tasks. You should always take full responsibility of your tasks, this means that you should find a way to get all the things you need to complete the task. A good example is scaling communication ways. If you're in need of some information, and you send an email, if you're not receiving an answer in a reasonable time, you should then try chatting, if that doesn't work, then try calling, and finally, if that also doesn't works, you should talk directly your request. This is why daily scrum meetings are important. If you get stuck on something, you'll find a way by letting everybody knows about your need. There are many other things like, checking your own progress, and see if you're not going to deliver on time, make everybody knows the reason. Don't forget to do on-line research whenever is needed and try to find interesting ways to solve the problem.

These are some consequences when the team doesn't have soft skills:
  • Critical errors because of a bad communication of issues
  • Loosing a lot of time in questions that were not addressed at the right time
  • Big differences between: what is really needed, what it's being done, the project specification and what the customer requests
This are questions that can save a project:
  • Do we really, really need all the features for the first release?
  • Is there an existing software that can help us in developing the project?
  • Is everybody in agreement with the project specification
  • Is it possible to divide in more releases the project?

And that's it folks, this series is coming to an end! I hope you enjoyed it. Let me know if you have questions or if you want me to talk about something in particular for future entries.

Administrative goodies - An overview of major software aspects

I wanted to dedicate an entry to the administrative aspect of sofware projects, because sometimes the project can have a very good architecture, excellent code and marvellous performance and yet it fails the expectations because it has a very poor administration. I will not get very deep into this topic, because it is the least technical aspect (at least for developers and IT persons).

Basically these are the major administrative aspects:

  • Licensing. How are you going to license the project? is it a free social project? are you going to sell add ons? how much will each license cost. These are some questions that must be answered when creating a software project, because in the end you need to find a way to pay for the development of the project. You must also make sure that you're following the rules of your country, otherwise you'll have problems when trying to commercialize the project.
  • Marketing. You have to know very well your target market to do marketing. It's important to reach your people and to make them use your software. Here you must think about stuff like: is there any other similar software? how can I reach more people? what are the strengths of the system? How can I communicate the features of the system to the target users?
  • Brand creation. It doesn't matter if the project is going to be free. if you're targeting a wide market of people, you must create your brand and make everybody recognize the project with the logo or slogan of it. Think about a small and easy to understand slogan that describes your system. Have you seen this before? of course! for giving you an example, all apple products have a very small slogan that makes all the world know why are they created and the usage that each product has.
  • Payment methods. If you're going to commercialize your project, keep in mind the payment methods, and analyse the options that you can offer to your target market.
  • Contracts. If you're selling the software to another company,  don't forget to have a very good and specific contract! The documentation made for the test can be helpful, because it describes the features covered and the expectations, so you can use it for the contract with your customer.

Short entry, I know! but I hope you like it. Leave comments at the end of the section and let me know if you want me to talk about a particular topic.




Clean code - An overview of major software aspects

Let's start by defining what's clean code?. This definition can get very particular and specific depending on the language you're using for developing and the assumptions of the system. But basically, I would say that clean code is code that is easy to understand and easy to use for the environment that it was created for. Just like Robert C. Martin stated in his book:  Clean Code: A Handbook of Agile Software Craftsmanship: , “Clean code is code that has been taken care of. Someone has taken the time to keep it simple and orderly. They have paid appropriate attention to details. They have cared.”

Sound pretty straight forward isn't ? But truth is that it takes time and effort to have clean code, and another important thing to notice, is that code is really the core of any system, and that it almost always is reused by other developers, so it's important to keep it clean, besides, having bad code lead to terrible outcomes that will be explained later. Extending a little the defition, this is what I mean with code easy to understand:


  • Relationships between projects are easy to understand
  • The methods are easy to understand and they don't need a lot of additional comments more than their name and the context to  make sense of the usage
  • The flow of the system is easy to understand and you can guess it by reading the code
  • The names of the variables make sense and it can give you context of where they belong and their usage  
On the other hand, this is what it means to have a code that is easy to use:
  • Classes and methods are small and they're in charge of only one thing
  • There are API for projects and that's the only way to communicate between other sub-systems
  • Testing is easy and there are interfaces for important classes
  • At least 80% of the code has unit tests, and there are integration tests for all the features
  • There is no need to have a big set of documentation for the project. The methods, classes and structure of the projects, make it easy to understand

Something to really keep in mind are names of the classes and methods. They are very important because business people also talk about them, so you are very likely to have smart conversations using names of variables / classes / projects. Besides, new developers might be re factoring or adding new features to the code, and they will have a big "?" on their minds if the names are "encoded" in a weird language. You don't want to look like him, right? 




The cost of not taking care of the code is really high. We're talking about:
  • Productivity
  • Efficiency
  • Assertiveness 
You cannot have a good estimate of time for new features when you're working on a system that has bade code. You will never know how many new bugs you can create when you're adding features or how the flow of the system is affected as well as how many areas you need to do regression testing.


Another entry comes to an end. I hope you're enjoying the series, let me know if you want me to talk about some particular subject on software development, I will be happy to do so. By the way, I really recommend to read Robert C. Martin book:   Clean Code: A Handbook of Agile Software Craftsmanship . I'm sure that it will help you in creating better code.

  





Saturday 25 October 2014

Software application architecture - An overview of major software aspects

Software application architecture (I will deliberately use architecture from now on)  is an aspect that should involve the whole team, from the business owners to the developers and the final users -at least a prototype of them-. I will use the MSDN definition because I find it complete and easy to understand: Software application architecture is the process of defining a structured solution that meets all of the technical and operational requirements, while optimizing common quality attributes such as performance, security, and manageability. It involves a series of decisions based on a wide range of factors, and each of these decisions can have considerable impact on the quality, performance, maintainability, and overall success of the application.

Now that we know it's definition and the usage it has, let's talk about key factors related to architecture:

  • Communication. I'm not just talking about "being available" for answering questions, the business owners must communicate new features required as well as bugs found in the business logic. They must provide detailed and specific descriptions of the process that the developers are going to work. This also apply from the developer to the business side, if the developers find a feature very hard to develop, they must suggest something and make it clear to the business owners, doing so may provide a different way to tackle the problem
  • Documentation. The software system must be documented and described in detail. This documents are the contract that will prevent misunderstands and will help new members of the team understand the system.
  • Keeping a list of concerns, assumptions and expectations. This can help when reviewing the project in the future and understanding the architecture decisions. It's a good idea to keep it organized by subject. For example, divide it in infrastructure considerations, software concerns, business analysis, etc.
  • Create more than one architecture. It would be very hard to have one architecture, ideally you will create more than one with enough detail to start testing and see how things are looking. It's better to do it iteratively and in an incremental way to refine the architecture.
  • Have a due date for completing the architecture. Because architecture involves the whole team, it could take forever to have a "perfect" and approved architecture, but the reality is that we will need to make adaptations because we cannot know everything up front, but we can create an architecture that is ready to handle future changes. So it's a good idea to decide on how much time is the team taking for defining architecture, and start working right away to find issues in an early stage of the project and address them as soon as possible. 
  • Take an active part in the decision making and then follow through!. It would be very important that everybody gets involved according to their role in the project. Once that the decisions are made, they should be followed. For example, if you need a web service for some sort of operation and the team decided that X web service is the right one, then it should be used whenever that operation is required. Also if the architecture requires to do some code files in order to create a process, they should be created whenever a new process is requested. On the administrative side, there is also an effect, if the team decided to use an excel spreadsheet for uploading information, the business side must accept this responsibility and create the required files.
  • Hide details of implementation. When you're working with a software system, it is important to have a good service layer to reveal only what is necessary. Revealing architecture to other systems can be dangerous for security and in the "best case" it can make other developers think a lot on things like: "why have they do that?". Well... that's not the concern of people connecting to your system, they should only know how to obtain exposed data required for other systems.  

Important factors affected by the architecture:
  • Time for adding features. If we got a good architecture, then the new features are pretty much "expected" and they can be delivered on time. This is because we would probably leave the "skeleton" ready for the upcoming features of the system. Besides, when you have a bad architecture, it's really hard to obtain time for re factoring,because it's the most technical aspect of software development, so the other areas involved will not clearly understand the importance of the architecture, so they will not allow much time for re factors.
  • Performance of the system. If we do the right choices, the performance will be the expected. This is related to the entries of performance: Back end and Front end.
  • New people in the team. If there are new business owners or new developers, a good architecture will make the learning path very straight forward, and this will save time and money to the company.
  • Integration with other systems. Most systems nowadays interact with other systems. Having a good architecture (for example, creating a web service layer) will make it easier to interact with other systems, and it's important to see this on the beginning of the project. Doing so will save a lot of time, when this kind of interaction is needed.
  • Bugs. Good architecture leads to less bugs, bad architecture leads to a lot of bugs. That's something easy to understand, because if the architecture is not ready to show good messages whenever you're having a new issue, it's very unlikely that you'll find the reason of the bug, also if the architecture has bar practices like not having a good structure of the project and then creating a lot of methods for the same thing, you'll probably find the same bug repeated in different areas of the system.
  • Value. The architecture plays a very important role in the value of the project. In the end, the expected times for adding features, the performance, the usability, the results and everything related to the system is directly derived from the architecture decisions, and the users will take advantage of the system, if and only if our decisions are appropriate.


It's complicated to give and estimate on how the architecture affects software systems, it depends on a lot of factors and the context of the systems, but I will use a piece of an interesting article to give you an idea:

"It can be hard to measure the cost of software erosion and convey this cost to non-technical people who often have to sanction work to stop software erosion. Even though software erosion causes reduced productivity, reduced quality and increased time-to-market, no one specific point of erosion causes these effects in isolation, rather it is the effect of multiple points of erosion that combine and reinforce each other to cause them.
However, a study by the US Air Force Software Technology Support Centre (STSC) attempted to put some rough measure on the costs of software erosion. The researchers took two versions of a mature software system (50k LOC) and asked two different teams to perform the same maintenance task (adding approx. 3k of code) on their respective version. Version 1 was an existing system suffering software erosion. Version 2 was the same system but with the architecture restructured to remove erosion.
The results were staggeringly different. Team 1, working on Version 1, needed over twice as long as team 2 to complete this relatively short task. Furthermore, Team 1’s results contained more than eight times the number of errors than the work submitted by team 2, working on version2. Erosion in a small system such as this still had the potential to lead to significant problems when the software was maintained."

This is the link to the original article:

http://www.methodsandtools.com/archive/archive.php?id=85

Ok, this is just the tip of the iceberg, but I wanted to share with you, how important is to have a good architecture. My best advice is to do early planning and to have great communication channels between teams, this are the very key factors to success. I hope you're enjoying the series! if you want me to talk about a particular software topic, let me know in the comments.










Tuesday 16 September 2014

Front end Performance - An overview of major software aspects

In this post I'll be writing about Front end performance focusing on web applications, but many things apply to desktop and mobile systems. You'll need some background on web development to understand the story behind the scenes, I also recommend reading the introduction post of the series to know all the topics of this series and the focus I'm having. The purpose of this post is to understand the importance of front end performance and things that you can do to keep it fast.

Let's start with a list of things that matter when developing web applications, then I will give you some tools that will help you in having things in order:

  • CDN For static elements. Using a Content Delivery Network for static content like images, javascript, files, etc, helps in maintaining a low bandwidth usage and it's a must when you've a web site with a lot of traffic because this content is usually the bigger part of your web page, and if you have a lot of visits, you'll probably have trouble in serving all the requests from your hosting server. You can analyse this by downloading your web page and see how much space does this type of content represents in comparison with dynamic content.
  • Image optimization. If you have a web site that uses a lot of images, let's say that they represent 80% of the weight of your site, and if we take into consideration that not optimized images can weight more than 3x the size of their optimized version, if you have a web site using unoptimized images can result in a web site 240% heavier (80% x 3 = 240%). What this will mean is that your web site is going to be slow, it will take at least... yeah, you got that right, 240% more time in loading than what it should be.
  • Data cache. Most web servers nowadays have a cache system for pages. This works by setting up pages and their expire time. This can help in slowing the resources needed to load your web site, this also helps with the page speed.
  • Optimizing CSS, Javascript, HTML. This is a big topic, I will dedicate an entry for it, but what I can say now, is that it really matters when you want to have a fast web site and it's also easier for the search engines to index your web page.
  • Friendly URLs. This means to have urls that when you read them, you can tell the story in that page. for example, it's much easier to read: www.maps.com/Mexico, than to read: www.maps.com/default.html?Country=Mexico.  And guess what? for search engines it's easier to index, because the first thing they use to categorize the page is the url. This can also help when using google analytics, I will dedicate one post to this, but in summary, with friendly urls you're able to have a better understanding of what pages are being visited, and this can give insight on what you should be working and improving.
  • SEO. Another big topic, I will create a separate entry for it. It's important because if you have good meta tags, meta keywords, friendly urls, and the HTML as it should be, then your web site is going to be "friendly" for the search engines and more people will reach it when searching for related topics. There are many, many things related to SEO, for example: is your web site for a particular Country? Are you hiding it for some others? are you using the right domain (.us, .com. org) ?
  • User friendly interface. A web site must be easy to use, you should be able to understand the content easily and the navigation needs to be friendly, this will help people and will make them return to your web site.
  • Optimized for mobile. If you've a web site targeting mobiles, you'll need to have an optimized version for it. Usually with lightweight content, and the interface with some adaptations to make it easy to navigate.

Now, let's talk about some tools that can help us to keep things in order:

And what could happen if you don't care about this concerns? Our example is going to answer that question:

Example: unoptimized web site and hosting prices

  • Let's suppose that we've a web site in which most web pages weight 6mb. 
  • The web doesn't require a lot of processor speed, because most content is static.
  • Let's imagine that we've been investing a lot in marketing and that our page is reaching 100,000 visits per day.
  • How much bandwidth do we need per month? We will need: 30 * 6 * 100,000 = 18,000,000 mb each month.

Now, I will calculate the cost of not having an optimized web site. For keeping things simple, I will use approximate values. The prices are based on a true hosting vendor: each month your hosting plan includes 5 TB of bandwidth, we're using 17.5 TB, that means that we're exceeding our consumption by: 12.5TB. The price for each extra TB is: $42 US, this means that you'll be paying: 12.5 * 42 = 525 extra dollars each month. That's a lot! That could be used for campaigns, or for other stuff. And you'll probably have more visitors if you have an optimized web site, and something I must also say is that optimizing bandwidth usage is not complicated, so there's no real reason for paying that extra dollars.

Ok guys! that's it for now,  hope you're enjoying the series. Let me know if you want me to talk about a topic in the upcoming entries :)






Sunday 14 September 2014

Back end Performance - An overview of major software aspects


I decided to start with back end performance, because I believe it's the most technical side of software development, and it's a topic that every software developer must know about. I will start with some definitions, that I'm going to use in the post to make it easy to understand, keep in mind that we're in the context of computer sciences and systems, you will need to have some background in algorithms, and data structures:
  • System Performance. In a few words, how effective your system is in the desired scenario. There are two scenarios, one is how much time does your system requires to execute a task, the other one is how much memory are we using for executing a process.
  • Computer speed. How many operations a computer can execute in a unit of time. Usually this depends on the task, and the type of operation. For the examples, we will suppose that a computer can execute N number of operations in a minute. 
  • Data structure. Is a particular way of organizing data (information).  
  • Algorithm. It's a finite, optimal, complete, accurate, precise, step by step definition for solving a problem. Some people doesn't include finite or efficient as part of the definition, but I want to include them because if it's not, then it's not useful, an algorithm is expected to be fast and intelligent.
  • Complexity. How efficient an algorithm is in a field. In the case of speed, it's measured in the number of atomic operations required for the algorithm to return the data we will call this speed complexity. The memory is measured in the amount of memory used for the algorithm to return the data we will use memory complexity when referring to this field. Both complexities are set against the size of the entry. For example, if the parameter for the algorithm is an array of size N,  then, the speed complexity is how many operations do we have to do against that array  to obtain the desired result (N, log(N), etc). For the memory is the same history, how much memory do we need to execute the algorithm apart from the array passed as parameter. Because memory is growing faster than processor speed, we prefer to use more memory and less processor when we can.
  • NP (complexity class). It's a class of problems that cannot be solved in polynomial time.
  • Heuristic: It's a step by step definition for solving a problem, the difference with algorithms is that it doesn't have one or more of the characteristics of the algorithms: finite, optimal, complete, accurate or precision. It's an approximate solution that speeds the process. For example, organizing a list of tasks in a way that they will be solved as fast as possible, these problem falls in the NP complexity class, and is faster to use an heuristic to solve it.
This aspect is very important, because even with all the improvements to the memory and processor speed, having an effective algorithm for solving a problem is the only way to keep things fast. Have you ever notice how much does the processor speed increases every year? Whatever the answer is, the truth is that you'll see that if the old speed was X, the new speed is expressed as NX, i.e. the speed was increased by a linear factor. What will happen if we use algorithms that have a speed complexity beyond that linear factor? We'll answer that in this example:

Example: Comparing binary search against linear search

Execution information:
  • We will suppose that we've two computer:
    • Computer A. Speed: 100 operations per second. It will use linear search.
    • Computer B. Speed: 1000 operations per second. It will use binary search.
  • We will execute 100 search operations.
  • The data structure is going to be an array containing 20,000 elements sorted alphabetically. 
  • We will suppose that for each binary search we will need 9 operations and for linear search we will need 10,000 operations. I'm suggesting this, in order to have a way to compare the execution times of the algorithms. Worst case for binary search with that size is  15  and for linear search is 20,000.

Execution time in seconds for each computer:
  • Computer A: We will search for 1000 elements, and for each one, we're supposing that the binary search algorithm will require 9 operations, so the total number of operations is (1000 * 9 = 9000. We will require 9000 operations to complete or test, and this computer can execute a total number of 100 operations per second, so it will take 9000 / 100 = 90 seconds to complete the task. 
  • Computer B: Using what we already explained for computer A, the execution time in seconds is: (1000 * 10000) / 1000 = 10000.
Are you surprised? Computer B can execute 10 times more operations per second in comparison with Computer A. But as you can see, if we use a slow algorithm, the execution times are really high for Computer B! this is the reason to optimize algorithms and keep things fast. 

Can you think about another reasons to keep things fast? check this list:
  • Hosting prices. If you have a web system that is using bad algorithms, then it's very likely that you'll need to have more a better processor and more memory to cover the demand of your web system. This is traduced in more money each pay period!
  • Compatible devices. If your app needs more processing speed, then your app is not going to be compatible with all devices, this means that your market is going to be reduced and some people will use other app that can be executed by low-end devices. And also, remember that memory in small devices is a constraint. If your app needs a lot of memory, only top end devices are likely to run your app.
  • Better graphics. The faster your algorithm is, the more beautiful the graphics are going to be, because you'll use more processor and memory for displaying them.
  • Battery life in mobile devices. Slow algorithms use more processor, and the processor is one of the thing that uses more battery! so try to keep things fast when developing a mobile app!

Something to keep in mind is that this is just the tip of the iceberg. In order to have great performance, the context of your application is also very important, for example:
  • If your have a process that takes much time to return a set of data, but you know that it only changes every day, you can have a cache of data and query it when a search is taking place. 
  • If it's more important to bring data faster than accurately, you can use a flag to set the required quality of the data returned or you can retrieve some data while you process the best result and then return it. 
  • If your algorithm can be a multi-theaded algorithm, then do it, most devices nowadays have more than one core processor.
  • Do you need the user to wait until the process is finished? for example, let's say that your app is sending a request that needs to be verified in some other systems, that could take up to 5 minutes to complete. In this cases, is better to send the required data, and let the process work, and tell the user something like: "your request is in process" and close that dialog and let the user work with the app. When the process is finished, then you've to send a message with the results.
  • Always keep an eye on the end user's opinion, requirements, and needs. It's worth nothing a system that does some features faster than another if the user is using more the slow features.
Ok, that's it! those are the reasons to always keep an eye on the performance of your system. This is the first entry of the series, I hope you enjoy it. If you want me to write about some particular subject or topic, please let me know! I'll be happy to do that.

Btw, this is the index blog post, here you can see all the posts of the series and some background on what to expect:

http://codeauthorityandmanagement.blogspot.mx/2014/09/index-overview-of-major-software-aspects.html








Introduction - An overview of major software aspects

It's time to start a series of posts related to major software aspects. Every topic is too big for itself to be covered completely with just one post, so the purpose of these series is:
  • Have an overview of every aspect in a language that everyone with some knowledge about software development can understand and find it useful. 
  • Understand why software development is so important nowadays and also why it's so complex

These is the index of the topics that I will cover:

Keep in mind that the affirmations in the post are valid for web applications and mobile apps. This is because most systems nowadays fall in one of this categories.

I you want me to talk about a particular subject, just let me know in the comments. Enjoy the series!

Friday 29 August 2014

-Searching- finding like a real pro

Everybody uses search engines, but a big amount of users doesn't know that the search engines have a lot of powerful functionalities for searching, and it's no surprise! usually these functionalities are only known by tech savvy people. I will guide you through tricks that are explained using google, but most functionalities are present in all the search engines, and trust me :P if you don't know them, you're missing like 90% of the power of search engines, so even if you think you're an expert, keep reading! you might find something useful or that you don't know. I'll also include complicated search scenarios and a way to overcome them, because I believe that finding information for some topics can be complicated using the conventional ways.

Let's start with some facts and considerations about searching:
  • Google doesn't care about punctuation, so stop using "," and ".".
  • Keywords are not case sensitive. This means that apple = aPple for google.
  • The search results are affected by your location. This means that if you want to search for something in a place you're going to be on vacation, you  will want to change the location. To do this, on the search results, you can clic on Search tools and then change your location there:
  • The order of the words establish it's importance, so chose it carefully! This also means that the first results are more related to the first word the next results with the first and second word and so on. A good way to find lyrics in google is to set the word lyrics at the beginning and then the phrase or the name of the song. For example, searching for: lyrics "song of myself" will search first results containing lyrics, and then within those results, google will look for "song of myself".
  • Be specific (we will talk about scenarios were this is not the best approach).
  • Google will notify you at the top of the results, when words are being ignored.
And now let's check this search tools and recommendations:

  • Phrases. This is my favourite functionality, you can enclose words with: " to search for phrases, for example, when searching for a song that you don't remember the name, but you do remember the lyrics, you can search for something like: "and salt betrays my eyes again" lyrics.
  • Images. This is also an awesome tool! If you find a picture, and you would like to know more about it (for example, the place were it has been taken) you can save the picture on your desktop and then go to the search images in google, and then click here:                                                                                       
  • That will open a window and you can select the image you want to search. It will show results matching the same picture, and similar images.
  • Searching in a particular web site. Sometimes you know that the information you're looking for is in a web site, but you just don't remember were. For this cases, if you include: site:www.website.com plus the words you're searching for, google will look for results that are only in the web site specified. For example, searching for site:www.rainforest.org trees, will look for the word trees in the web site: www.rainforest.org.
  • Word definitions. If you want to know the definition of a word you can search for define:word. And google will look for a definition (like a dictionary).
  • Or. The word OR helps you search for one term or another. For example, if you want to search for results that contains chocolate or pie, but not both! you can do it by searching for: chocolate OR pie.
  • Wildcard. The "*" character is like the joker card for google. When you use it, google will  match it with any word. This can be very useful, used in combination with phrase searching. For example, when you're searching for the lyrics of a song and you don't remember a complete phrase, This is the result of searching for: lyrics "ever * away with me"             
  • Results of introducing a phone number. Sometimes, when you just have the phone number of a person, you can search for it using google. In order for this to  work properly, you will want to make sure that the results are searched in the location were the phone belongs. 

Now it's time for the cherry of the cake ;) I will give you advise for searching under complicated circumstances, you'll be surprised by it, give it a try when your conventional ways of searching are not producing the expected results:

  • Different pages were your info can be. Suppose that you installed a new version of an operating system and you want to update your drivers to make them work properly. Where are you going to search? usually you'll search for the driver's page and then you'll download the drivers there. But... what will you do if the page is down! are you going to wait until it is up again? For this particular case, you know that most parts of your machine are of another brand different from your computer's brand. So, for example, if your gpu driver is Nvidia, you can go and search for it in the Nvidia's page! or maybe in a page of another brand that also uses the same Nvidia gpu that you've.
  • Searching for a very specific topic. Were did you search when you want to buy something? did you use google? Of course no! you go to some online store and then you search for the item there. The same logic applies to some very specific or complicated topics, for example, when you search for a math problem that is uncommon, it's better search in sites like: http://math.stackexchange.com/.or to make questions there, usually you'll receive a response in less than a day. There are many communities online that are focused on particular topics, usually they've a very good and structured web site with lots of information and search resources. Another thing that you can do, is to search for something more generic, and then take a look at the results, and came with another more particular words to find what you're looking for.
  • Searching for something difficult to describe or for something that you don't know much about. In this case you can also try to search for something more generic, for example, if you saw a recipe for a cake with a very specific name, but you just don't remember the name, you could try searching for cake's recipes, and then get some more context to do a better search (for example, the ingredients, the country's recipe, etc). 
  • About online systems. Are you using online systems (CRM,  RP, school web sites, etc) ? if your answer is yes, remember that you can take a look at the communities of the online system for answers, they'll probably came across the same issue that you need to address.
  • Searching for images. Searching for images can be though, sometimes google image search is not good enough, so if you want to search for a set of images, that are related to some topic, you'll find a lot of resources in tumblr or flickr. Particularly in tumblr, you can find lots of accounts that are related to some topic, for example: http://strictly-mma.tumblr.com/ is a tumblr page were you can find lots of mma related images.


Ok, this post is comming to an end :) My final advise is to use common sense and create your own search heuristic based on your situation. 

I want to thank you for reading, and if you enjoy, please share! If you want me to talk about some software related topic, please let me know in the comments!


Friday 22 August 2014

Being extremely successful at working remotely

Working remotely can be easy and awesome, you just need to realise that it is way more different in comparison with working in an office and also use a lot of common sense to be effective and successful.

These are some conditions that are -almost- always true when working remotely:

  1. You need to be available for meetings
  2. Answering and reading email is important
  3. You'll need a good internet connection
  4. A second monitor is a must
  5. You'll be at least in one meeting during the day
  6. You'll do less exercise because your home is your new office



I will present recommendations based on the given conditions, but you can always evaluate your own conditions and set up your work rules to be productive:
  1. Stay visible! Make sure that during your work hours you're always reachable. Log into your IM account and stay available during work. I suggest to not spend time messing with the IM client status. Current chat clients have ways to identify if you've been away for a period of time enough to put you in a "away from computer" status. And also, changing your status to "busy" can be bad, why will you change it? if you are going to be really busy, and you're not being available for a period of time, you can log off and let everyone know the reason. On the other hand, if you're again "available" will you remember to change the status again? if you don't, then the members of the team could think that you're busy and they'll not contact you
  2. Have a comfortable and effective work place. Let's talk first about furniture: Make sure that you have a desk with enough room for your hardware requirements. I suggest to have enough room for a laptop and a second monitor, another important piece of furniture, is a comfortable chair, make sure that you don't hurt your back or neck with it. Talking about an effective place, you've to take into account that you're probably being in meetings during the day, so I suggest to have a quiet place or make it quiet with a noise cancelling curtains for example. another important piece for this is a good headset, a "trick" that many people don't know is that you can probably use the headset of your cellphone in your laptop, those devices are usually great, good looking and using them can save money.
  3. Be communicative. Are you about to finish a task? Have you been working a lot with a co worker? Are you changing your lunch schedule? All of these situations needs to be communicated to the team. For example, if you're about to finish a task, you'll probably need to pair with a member for reviewing or actually, your manager will be assigning a new task soon depending on how much time you're planning to spend on the current task. It's a good idea to let the members of the team that are actively working with you know when you're grabbing lunch. 
  4. Be ready for stand up. Prepare a couple of minutes before stand up: check your items, your needs, open the meeting, go to the restroom, bring a cup of tea or coffee (in case you enjoy them!)
  5. Email and chat latency. Set email and chat notifications to "on" and answer them quickly. For chat in less than one minute. For email, well... depends, but ideally in less than 10 minutes, sometimes email can be a little more complex. And also, don't forget to check all the emails you receive,  no matter if they're a general announcement, you'll probably want to know if the office is being closed for a couple of days :)
  6. Schedules. Try to decide on an appropriate schedule. Set your work hours and lunch time and let everyone know. If you're going to change something for a reason, you should always send a message!
  7. Cameras. Yes! video chats are really awesome when working remotely and they're so overrated. Seeing the people of the meeting will help in understanding the point of view of your team, you will feel closer to them and then you'll communicate better. Just give it a try! it really improves overall communication. 
  8. Remote meeting tools. Try to use as much as possible tools like sharing screen, drawing in the screen, letting other person take control of your computer. Record your meetings. These tools will help in being more productive and will improve communication.
  9. Set rules based on your own context. Talk with everybody on your team and set the appropriate rules for your team. For example, if a member of the team is arriving earlier than everyone, he could probably do the tasks of database maintaining.
  10. The other side of the mirror. For those people on the team working in the office, remember that some rules also apply to you. For example, if you're working closely with someone, it  would be a good idea to let them know about your meetings and the times when you're going to be unavailable, remember that the remote team members cannot go to your place and see that you're not in your spot. In general, it's a good practice to set up a calendar visible to every member of the time with the available and unavailable times of everyone.
  11. Do more exercise!  Trust me... you'll gain some weight because you'll be doing much less exercise, so this is the right time to attend some kick boxing classes and stay in shape! -ok just kidding, but really, try to do exercise, running, hiking, martial arts, yoga, gym, whatever you decide-

As I've already say,  these recommendations are based on my experience, every team should sit and dedicate time in creating their own particular rules, these will make them more productive.

I hope you enjoy these entry! feel free to leave your comments at the end of the post.

Thursday 21 August 2014

First entry

Hey! My name is Roberto, I'm a computer scientist, and I'll write articles about software development, effective ways of working and addressing software related issues. And hum! you might find some personal entries, but I promise to make them interesting :)

Have a look! you might find something useful, or you can suggest me to write about a topic :)