Casiva Agustin

Engineering, Development and IT Management

Hi there! 馃憢

I’m Agustin Casiva, I’m a Software Engineer from Argentina.

I have been working on IT for many years now, I worked in many fields of the industry, such as hardware support, networking, sysadmin but what I do love most is development.

I have worked for many organizations, public and private, local and remote, filling many roles.

My expertise is on Web Development, Linux, Open Source, CMSs, HTML, CSS, PHP, JavaScript, Backend Development, Product Development, Project Management, Team Leading, among others.

In 2013 I have founded 42mate, a Web Development Agency focused on the design, development, maintenance of Web Apps. I still work on 42mate where I work leading development teams and scoping new projects.

Besides 42mate I also work as an independent consultant where I provide services such as

  • Development Training, for individuals or teams.
  • Architecture Design and Review.
  • Tech Advisor for non tech startup founders.
  • Tech Advisor for Digital Design Agencies.

If you are interested on my services let’s talk!

More about me

Evitando Switchear

Entre las estructuras de control disponibles en PHP tenemos el famoso y conocido Switch. Famoso por que
esta entre las estructuras de control de los lenguajes de programaci贸n mas conocidos desde hace mucho tiempo.

Esta es una estructura, a m铆 gusto, es bastante incomoda para utilizar dado que no tiene una sintaxis
muy amigable y generalmente introduce un monton de c贸digo rigido y aveces innecesario.

Hoy estaba viendo algunas alternativas utilizando funciones anonimas para evitar el uso del switch. Una opci贸n
que me pareci贸 interesante es definir las funciones anonimas para tratar cada caso y
despu茅s componerlas en un array donde la clave de cada entrada sea la opcion del case.

Por 煤ltimo podemos invocar directamente a la funci贸n que maneje el caso correspondiente.

Si no les gusta definir las funciones por separado, puede hacerlo directamente sobre el array.

Obviamente no es un reemplazo para todos los casos del Switch, pero puede ser muy pr谩ctico para varios escenarios.

Leave a Reply

Your email address will not be published. Required fields are marked *

*