domingo, 25 de septiembre de 2022

More inefficient when we take on more projects

When we work in two projects, and we swap from one to the other we have a cost. We know that two times 50% equal 100%, but it is not always as a valid analogy to use in some context. When two people work half time that not necessary mean one person can do the same work in a day.
"While it takes one woman nine months to make one baby, nine women can't make a baby in one month."

From Brooks's Law
At the end of the former century it was when we use the term multitasking operatins system with computers that only had one CPU. It appears to work in many tasks at the same time but it is not. What really happen is the CPU work in one task A during certain time, save the status of the task A, then start or continue with a task B during certain time, and so on. That means the computer works for a lapse of time in one task at a time and then in another, then to finish one task it could takes many work lapses on the task. This happen so quickly that seems to do many tasks at the same time. But this context switching have a cost.

Multitasking is not as effective as appears

Also, people must let all ready to continue a tasks in the future when is stoping a current task that is not finished yet. Then when they retake on the task it would be easier to continue and to go in a flow state, be productive. Sometimes to change context is necessary to refresh ideas, let time to creativity, have other perspectives. This is context switching in order to rest some area that need it. If the sight sense is tired then to move to other project does not mean to rest the sight if both projects need an effort of sight.

For each additional project someone undertakes, he lose up 20% of his time to the act of context switching. (1). In the next figure we can see if we work in three projects we lost up 40% in context switching instead of doing the work then the time to work would be 20% to each project instead 33,33%.
  • (100% – 20%) / 2 = 40% available to each of the 2 projects.
  • (100% – 40%) / 3 = 20% available to each of the 3 projects.
  • (100% – 60%) / 4 = 10% available to each of the 4 projects.
  • (100% – 80%) / 5 = 4% available to each of the 5 projects.

From the side of a client we can think about if we hire someone who is working in many projects, as more they would be less would be the time to our project (it could affect in quality or the time to finish the work).

How to cut the cost of switching context?

First at all, we can delegate, pospone, do it. For a company to delegate would be assigned it to a free group. Same as a computer uses more than one CPU.

If we will work on several project then we need to find a way to do the context switching efficiently, to reduce as much as posible the cost and to do a quick switching and continue where it was paused. We can learn agile frameworks and metrologies where it is used small task that are atomised, that meas they are divided in small tasks, detailed, understandable to not lost time understanding what is the task and if something is necessary, they have an precisely action to do.

Brooks' Law is about projects that are behind schedule and if we add manpower, it will cause them to be further behind schedule. Then when we can add manpower at the beginning of a project with less cost than if we do it in a later time. More later more cost. Also, there are tasks that can do new manpower and it does not necessary cause delay to the project because these tasks are complementary, do not have an impact in others tasks, need to be started, are not complex.

Just as two part-time people do not necessarily do the work of one. If both people are inexperienced, neither full-timer will do the job of a part-time expert. For this reason, introducing highly qualified personnel, without being more than necessary, can shorten times if it does not entail the incorporation of other techniques, methodologies whose use or learning of these is another impediment. The knowledge of the tools, knowledge about the needed area, similar projects, etc. have a great influence.

So, do not make the mistake of lightly using an engineer, architect, programmer as any other resource (a battery) as a replacement for another without this causing a cost. If in the change of a battery can be repercussions then there can be much more repercussions in the change of people. And the more specialised or complex the project, the more notorious the change in human resources.

References

(1) Gerald Marwin Weinberg. An Introduction to General Systems Thinking.
Don McGreal, Ralph Jocham. The Professional Product Owner.

sábado, 24 de septiembre de 2022

How to hide toolbar buttons in Autodesk Forge Viewer?

 



First, we can print in console the toolbar variable in order to show controls values. These are the sections of the toolbar.


Each control:

  • navTools
  • measureTools
  • modelTools
  • settingsTools
Then, if we expand one of them we can see the buttons inside controls


To hide or to remove the camera button we can do this:

this.viewer.toolbar.getControl('navTools').removeControl('toolbar-cameraSubmenuTool');

Let's remove some more buttons and see how it is showed.

this.viewer.toolbar.getControl('settingsTools').removeControl('toolbar-propertiesTool');
this.viewer.toolbar.getControl('settingsTools').removeControl('toolbar-modelStructureTool');
this.viewer.toolbar.getControl('settingsTools').removeControl('toolbar-settingsTool');
this.viewer.toolbar.getControl('modelTools').removeControl('toolbar-explodeTool');




jueves, 22 de septiembre de 2022

¿Cómo ocultar botones de la barra de menú de Autodesk Forge?

 



Podemos empezar imprimiendo en consola la variable toolbar para ver los valores de controls. Los cuales son las secciones en las que se divide la barra.


Podemos ver que  cada sección se llama:

  • navTools
  • measureTools
  • modelTools
  • settingsTools
Y si expandimos una de ellas podemos ver que dentro encontramos controls donde está cada botón de la sección. 


Es decir, si queremos ocultar la cámara de la primera sección tenemos que hacer algo como:


this.viewer.toolbar.getControl('navTools').removeControl('toolbar-cameraSubmenuTool');

Vamos a ocultar algunas más y ver el resultado.

this.viewer.toolbar.getControl('settingsTools').removeControl('toolbar-propertiesTool');
this.viewer.toolbar.getControl('settingsTools').removeControl('toolbar-modelStructureTool');
this.viewer.toolbar.getControl('settingsTools').removeControl('toolbar-settingsTool');
this.viewer.toolbar.getControl('modelTools').removeControl('toolbar-explodeTool');




miércoles, 8 de junio de 2022

Script para reiniciar audio en Mac

Para restablecer el sistema de audio en OS X, la forma en la que lo hacía era buscar el comando para ejecutarlo desde terminal.

sudo -s killall coreaudiod

Dado que he necesitado varias veces hacerlo y no recuerdo el mandato lo asigno a un atajo de teclado.

  • Abrir Automator para crear un servicio. Escoger opción "Quick Action"
  • Agregar el paso "Run Shell Script"
  • Escribir el código:
osascript -e 'do shell script "sudo -s killall coreaudiod" with administrator privileges'
  • Indicar "no input" en cualquier aplicación como entrada a recibir
  • Guardar
(De esta forma se ejecuta el comando solicitando la contraseña necesaria para aprobar la acción)



Para agregar un atajo de teclado
  • Ir a Preferencias del sistema - Teclado - Atajos - Servicios
  • En el listado debe estar el script creado anteriormente (Una vez creado como Acción rápida y guardado con el nombre indicado se muestra en esa sección) Agregar una combinación de teclas a utilizar para ejecutar el script.

Una vez hecho todo esto al usar el atajo de teclado se ejecuta el script solicitando la autorización necesaria.




sábado, 12 de marzo de 2022

¿Qué tienen en común la esclavitud y el patriotismo?

En la actualidad querer decir que la esclavitud es algo bueno es inaceptable. Algo que solo se les ocurre a algunos pocos pero rechazada por la inmensa mayoría independientemente de religión, raza, ideología política.

Pensemos por un momento en la humanidad hace miles de años, cómo era cuando aún no existía la agricultura, ganadería y solo existían nómadas en busca de alimentos. Grupos pequeños que iban de un lugar a otro y si se encontraban con otros y luchaban por los recursos posiblemente terminaban matando a sus oponentes. Así que si pasamos de matar a dejarle con vida y obligarle a trabajar, esto facilita la vida al conquistador. Puede poner a trabajar a otros. Obliga a los esclavos a construir, arar, y con ello evoluciona. En ese contexto es un paso adelante. En ese contexto la esclavitud puede ser vista como algo positivo y un avance. Por supuesto no es el único punto de vista a tener. El punto es que algo que ahora es totalmente inaceptable y un retroceso en ese entonces era algo aceptable y un avance. Hay que entender el contexto y significado que pudo tener en aquel entonces; así como Tomas Jefferson, fundador de EE.UU., proclamaba la libertad de toda persona pero tenía esclavos, ya que se liberaban los blancos de tener un rey que gobernaba en Inglaterra pero no se liberaba a los negros pues los consideraban inferiores.

Así mismo el patriotismo conectó a las personas a luchar, avanzar, se hizo sinónimo de orgullo y progreso. Y tras ello podemos distinguir elementos como la unión, confraternización, cooperación y demás características o virtudes. Pero también tenemos que distinguir las negativas.

Hay distintas formas de ver un partido de fútbol en un estadio. Una forma puede ser sentados con familiares, amigos, niños, mayores, mezclados los distintos hinchas, avivando sanamente y disfrutando del juego independiente de los resultados. Otra forma puede ser evitando llevar a mujeres, niños, ancianos, teniendo vallas entre el público y el campo, avivando con insultos, los hinchas separados según equipo, siendo obligados a salir una hinchada y luego otra, con fuertes controles policiales, peleas.


Y así como el ejemplo del futbol, hay rivalidades entre grupos que son de un pueblo con el pueblo vecino, de una región con otra región, de un país con otro país, de una religión con otra religión, un grupo político con otro. Un grupo con un sentido de pertenencia e identificación con el grupo vs el otro. Este mismo sentido de pertenencia se da en el patriotismo. Y mientras siga existiendo el patriotismo negativo seguirán existiendo guerras. Seguirá existiendo: esta tierra era nuestra o, es nuestra, o los unos vs los otros.

Así que la esclavitud y el patriotismo son un ejemplo de algo que en su momento sirvió de avance, evolución pero llega un tiempo en que es un retroceso. Solo sirven algunos elementos con los que se vincularon: unidad, enfoque en objetivos.

martes, 11 de mayo de 2021

Crear disparadores (Triggers) en Google Cloud

Tras recibir el error:

ERROR 1419 (HY000): You do not have the SUPER privilege and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)


Leí que SUPER no está habilitado en las instancias de Google Cloud. Lo que permiten es configurar Marcas de bases de datos.

Seguir el procedimiento indicado:
  • Abrir la Consola
  • Ir a la instancia SQL
  • Editarla (En mi caso pidió activar la API de la consola previamente)
  • En la sección Marcas agregar el elemento deseado de la lista desplegable. log_bin_trust_function_creators
  • Guardar


Esperar a que el proceso termine y luego ya se puede crear disparadores. Después se puede eliminar la marca.

viernes, 7 de agosto de 2020

Monitor de actividad Mac no muestra columnas


Lo primero es comprobar que están activadas algunas columnas para mostrar. En el menú Visualización -> Columnas ->
Si están activas pero no se ven. Se cierra el Monitor de actividad. Y abrimos Finder -> Ir -> Ir a carpeta

Introducimos la siguiente ruta al fichero de configuración.
~/Biblioteca/Preferences/com.apple.ActivityMonitor.plist
Borramos el archivo.

Y abrimos el Monitor de actividad.

Visto en: https://macreports.com/activity-monitor-columns-are-missing-fix/