Trámites para ser un desarrollador independiente en Colombia

Quieres ser un trabajador independiente? Dejaste de tener la calidad de empleado para ser independiente? Trabajas desde casa para una empresa extranjera? Ahora que has dado el paso hacia tu independencia, hay un par de cosas que tienes que hacer que antes eran responsabilidad de tu empleador y que ahora son tuyas.

ADVERTENCIA Consulta a tu contador de confianza o a algun experto en el tema. Estos pasos te servirán de guía para saber qué trámites debes hacer. Estos datos son en base a la legislación del año 2019

  1. Aportes de salud y pensión: La base para el pago de los aportes será el 40% de los ingresos mensuales. Estos aportes deben ser cancelados mes vencido, los primeros días de cada mes de acuerdo a un calendario según tu número de cédula.1 Estos aportes no se realizan directamente en las entidades a las que estes afiliado, se realizan usando la Planilla Integrada de Liquidación de Aportes (PILA) a través de operadores autorizados.
    • Deberás registrarte con uno de estos operadores para liquidar y pagar tus aportes. (Por ejemplo, aportesenlinea.com es uno de ellos)2
    • Dependiendo de la EPS a la que estes afiliado, deberás realizar la notificacion de tu novedad de afiliación como independiente, en caso de que ya hayas estado afiliado como empleado. Para este trámite deberás ir a tu EPS con la fotocopia de la cédula y llenar un formulario que te suministrarán allá.
  2. ARL: Al ser trabajador independiente es opcional estar afiliado a una ARL, salvo que el tipo de actividad que realices se considere de alto riesgo o que tu contratista te lo exiga. Pero, tranquilo el desarrollo de software no figura como una de esas actividades.2, 3
  3. Cuenta bancaria: Si vas a recibir tus pagos a través de transferencias bancarias desde el extranjero, deberás notificar a tu banco para que te activen este servicio. Para esto, deberás ir a una de las oficinas de tu banco o contactarlos via telefónica. Recuerda que tu banco puede o no cobrar una comisión de algunos dolares por transferencia.
  4. Cuenta de cobro: Una de las cosas que no hacías al estar empleado era facturar a tu empleador por tus servicios, al ser independiente tendrás que hacer una factura o una cuenta de cobro dependiendo del monto que vayas a recibir. Una cuenta de cobro es un documento que contiene el nombre de la emprea, tu nombre, una descripción de los servicios que estás cobrando y el total que vas a recibir.4 Ten en cuenta que puede que la empresa realice la retención en la fuente sobre el valor de la cuenta de cobro.5

Remote interview. Here I go

Are you applying for a remote position? Or for a on-site position but the interviewer is on another branch outside your city? Are preparing yourself for future interviews? These tips are for you. Read on!

Interview types

There are four types of interviews you can find while applying for a new job.

  1. Conversation: The interviewer will start a casual conversation about your experience, your past positions and your skills. Be ready to describe one or two past projects. Make sure to include:
    • Name of the project
    • Purpose and Market
    • Duration: How long did it take to finish it? or how long were you in it?
    • Tech Stack: what frameworks and tools did you use on the front-end and the back-end?
    • Team Size: Did you have a QA team? designers?
    • Role and areas in charge: What did you do inside the project? What were you responsible for?
    • Biggest challenge you faced in the project: a new tech stack? changing requirements? short duration?
  2. Interrogation: The interviewer will have a list of predefined questions to test your knowledge on the skills required for the position. Be ready to answer questions of the type:
    • what’s the difference between a class and an object?
    • what’s the difference between inheritance and polymorphism?
    • state and explain 3 GangOfFour design patterns
    • state and explain the SOLID principles
    • what’s the difference between Func and Action?
    • what’s the difference between LINQ and extension methods?
    • what’s the difference between async and await?
    • what is ASPNet Core?
    • How do you do dependency injection in a APSNet Core project? You got the idea!
  3. Programming exercise: Have a dev environment ready! The interviewer will ask you to open your favorite IDE or text editor to solve one or two exercises.
  4. Homework: The interviewer will ask you to solve a medium-size exercise in a couple of hours or even days. Make sure you follow best practices and code as clean as possible! It’s time to show off your coding skills

Before, during and after

Now you know the interview types, it’s time to move on to the interview preparation.

  1. Check the date and time. Make sure you have the time in your own timezone
  2. Install and setup the software needed. Is it Skype, Zoom or Hangouts? Did you receive an invitation link?
  3. Do not answer the videocall using your cellphone. Do you remember the type of interviews? It isn’t that comfortable to solve an exercise using the phone
  4. Use video only if the interviewer uses it
  5. Reduce background noise. Do not answer the videocall from a cafe, a shopping mall or a public hotspot. If your are staying at home, ask the people around you not to disturb you while in the interview.
  6. Show up 10 minutes earlier
  7. Be ready to introduce yourself using an elevator pitch. You will have less than 30 seconds to say who you are and what you have done professionally. Make sure to include in your pitch:
    • Years of experience
    • Education
    • Type of projects you have worked with: banking, marketing, etc
    • Specialty: fullstack, backend, fronted, mobile, etc
    • Languages, frameworks and tools you know
    • A hobby
  8. Be precise. Answer within 60 seconds
  9. Summarize all your skills and strengths, before finishing the meeting

Final tips

Now, you know the type of interviews you will find. Be prepared for them! Practice your elevator pitch and your project descriptions. Have a printed copy of them next to you during the interview. Be enthusiast and precise. Happy interviewing!

7 Interview Tips That Will Help You Get Hired

60 seconds and you are hired

This post was inspired by all the tips I have received from colleagues, managers and the Internet while preparing for remote interviews

Rotating an array: An interview exercise III

There you are. You start to feel confident in your interview. You have already gone through some exercises. Now, the interviewer challenges you with a new exercise. So, you open a new tab or create a new file in your editor. And, start!

Problem

Given an array of integers and an integer k, rotate all elements k positions to the right. For example: After rotating [1,2,3,4,5,6] two positions is [5,6,1,2,3,4]

Solution

Obivous one

Your first approach is to roll a loop through the array and put in another array each element shifted to the right. You have to take care of elements near the end of the array. Otherwise, you will get outside of the array and an exception will be thrown. So, you add an if to check you keep it inside the bounds. Something like this:

static int[] Shift(int[] array, int k)
{
var result = new int[array.Length];
for (int i = 0; i < array.Length; i++)
{
  if ((i + k) >= array.Length)
    result[(i + k) - array.Length] = array[i];
  else
    result[i + k] = array[i];
}
return result;
}

Modulus operator

You can do better. Can you remove the bound checking? –the interviewer says. Now, you start to use an example. If array=[1,2,3,4,5,6], k=1 and i=5, the last element must be the first one and so on and so forth. It reminds you the modulus operator (%). Instead of dividing two numbers, it calculates the remainder of dividing those two numbers. Since the remainder is less than the divisor, you will always be inside the size of the array if you apply the modulus with the array length. So, you modify your previous solution.

static int[] Shift(int[] array, int k)
{
	var result = new int[array.Length];
	for (int i = 0; i < array.Length; i++)
	{
	  result[(i + k) % array.Length] = array[i];
	}
	return result;
}

Space complexity

What is the space complexity of this solution? –the interviewer asks. Space complexity is a metric to compare the amount of memory required to run an algorithm in relation to the input size. If the input gets bigger, how much storage the algorithm requires? Since you are using a temporay array, the storage will be proportional to the size of the array. So, it’s linear!

Right! –the interviewer replies. Can you come up with a constant solution? –he suggests. So, you have to get rid of the temporary array! What if you shift one element at a time and the repeat the process as many times as needed? This solution isn’t the most performant, but it uses constant space. But, this time you have to do it backwards to only temporary keep one element of the array.

static int[] Shift(int[] array, int k)
{ 
	for (int times = 0; times < k; times++)
	{
	  int tmp = array[array.Length - 1];
	  for (int i = array.Length - 1; i > 0; i--)
	  {
	      array[i] = array[i - 1];
	  }
	  array[0] = tmp;
	}
	    
	return array;
}

Another happy interview!

Bonus What about a one-line declarative LINQ solution? The interview could go in a different direction?

static int[] Shift(int[] array, int k)
	=> array.Skip(array.Length - k)
		.Concat(array.Take(array.Length - k))
		.ToArray();

Time complexity: An interview exercise II

You nailed it at your first interview. You impressed the interviewer with your answers. Now, another interview. This time, it’s the interviewer’s boss turn.

The interviewer asks you to introduce yourself. You answer using the elevator pitch you prepared. Then, he suggests to start a whiteboard exercise. You open Notepad++, VSCode or your favorite editor. And, there you go.

The problem

Given two array of integers, find a pair of elements, one from each array, that adds up to zero. The size and the order of the elements aren’t specified. They may be sorted or not

Time complexity

Time complexity is a mechanism to compare the performance of two algorithms as the input grows. Time complexity measures the number of operations instead of seconds or milliseconds. An algorithm with small number of operations will beat another that makes the same task with a larger amount of operations.

Well-known algorithms and common patterns of code have already a time complexity associated. For example, performing an assignment or checking if a dictionary contains a key have constant time. Looping through the elements of an array has linear time. Dealing with matrices using two nested arrays has quadratic time. Dividing an array into halves each time (do you remember binary search?) has logarithmic time.

Time complexity uses a mathematical notation to describe the complexity of an algorithm, Big O notation. It assigns a function (you remember functions from Math class, right?) to the complexity of each algorithm. So, constant time is O(1), linear time is O(n), quadratic time is O(n^2) and logarithmic time is O(logn). You could use this cheatsheet to find the complexity and BigO notation of well-know algorithms.

The solution

First approach

Your first and obvious approach is to roll two loops and check every pair of elements. It would be slow, if the arrays are big, but it will get the task done.

for (int i = 0; i < a.Length; i++)
{
	for (int j = 0; j < b.Length; j++)
	{
		if (a[i] + b[j] == 0)
		{
			Console.WriteLine("Found");
		}
	}
}

The interviewer asks you about the time complexity of this solution. Since, you have to traverse the second array per every element in the first array, you will end up with n x m operations. So, you answer quadratic time or O(n^2). Right!

Better

Then, he asks you to do better. A linear solution. To have a linear solution, you will have to get rid of traversing the second array. So the problem will be solved if you know if any element in the first array has its inverse in the second array. If you create a look-up or a set from the second array, you can only traverse the first array and check for the inverse. Since, checking if a set contains an element has constant time, you will have a linear solution or O(n).

var set = new HashSet<int>(b);
for (int i = 0; i < a.Length; i++)
{
	if (set.Contains(-a[i]))
	{
		Console.WriteLine("Found");
	}
}

Here it is! Another interview! Now you have in your toolbox time complexity. Not only for next interviews, but for everyday programming.

Five lessons after five years as a software developer

Five years of experience. Two companies. Two positions. These are 5 lessons I learned:

  1. You are not your code Don’t judge someone by his code. Don’t take it personal. You could miss professional connections or friendships by judging someone by his code. Assume everyone does his best with the resources he had. There always will be different opinions on how to do things. In the future, you will have one about your current work!
  2. Coding is not the only thing Collaboration is key. You won’t be locked in a basement coding. You will have to talk to clients, conduct meetings, agree on estimations and ask for help. At the beginning, I only wanted to code. I didn’t attend to meetings, answer phone calls or even reply to emails.
  3. You don’t have to feel miserable. Change jobs when you feel your life is miserable or wasted because you wake up and you realize you have to go to work. Find a way to motivate yourself: start a side project, learn a new stack, discover a new way of doing your work. Or, update your CV and move on.
  4. Bus syndrome: Don’t have hero developers. I know, I know! It feels awesome when at the end of the day you were the one who save the day. But, if you are the only one who can solve some type of issues or know how a component works, then it will make you indispensable. And, therefore, irreplaceable. So you can’t get sick, go on vacations or be promoted. Take every chance to share what you know and mentor junior members of your team.
  5. Have a minimal viable product ASAP An awesome website or mobile app can make a huge difference. But, start small with finished core features and iterate on that. At the beginning, you will have to setup the system through scripts or do some manual configuration. It’s better to demo a whole feature with an unpolished UI than a very awesome UI that does nothing.