domingo, 14 de mayo de 2017

Chosen Jquery with dynamically load

Recently my boss ask me change the select2 plugin for the chosen plugin for jquery in order to use only the libraries that the entire department had approved previously. As you know, chosen plugin does not have an option for remote data. That does not mean that we cannot use remote sources with chosen, in fact, we can but with some "tricks", I mean, there's no so complicated but I did not find any answer in stackoverflow that convinced me very well.

So, this the explanation about how I achieved the chosen plugin into chosen remote plugin.

1. Understand the debounce concept
2. Program an ajax call
3. Format results
4. Clean chosen select
5. Update select.

Well, the code is here

viernes, 21 de abril de 2017

Lightning Talk in Free Code Camp

I think is time to start to write in English, so, this time I want to write about the talk I gave in a workshop from a community called freeCodeCamp(). I friend of mine, aka Mike, requested me some example about javascript programming and I said him "oh yeah, I have a memory game and the page of the cats". Then, an arrangement was done.

The workshop started on Monday 17th at 7 pm but I arrive one hour late, as a good Mexican in Mexico. Mike was explaining about conditional structures, loops, and arrays. When I saw it, I thought the memory game was a kind of hard for beginners so I decided to show them the GifCat project with Vuejs.

Before me, it was another guy that showed us a calculator made with CSS and vanilla js. It was very interesting because He wasn't a programmer, not at all. He said us that he was an economist but when he saw how good was the employments for programmers he decided to study programming.

The presentation was good despite I had two o three years since my last talk in which one I talked about the beast, yes, LaTex. I showed how I had ordered randomly the cards in the HTML document and how I was doing the comparison and finally what kind of thinks could be added in order to improve the game experience, things like an attempt counter, multiplayer option, more transitions effects with CSS, etc. After the memory game, I show the GifCat project and it was very good to watch their faces since GifCat, certainly, was a more interesting project because everyone loves cats and what they do. I explained that there already are many services that provide you pictures of any kind and everyone can use them in the ways you want.

The repo from the memory game is this: github.com/Lvcios/Memorama and the GifCat can be found here: github.com/Lvcios/GifCat

Finally, a pic from the event.


martes, 7 de marzo de 2017

Problema con MVVM Cross

En el SplashScreen tenemos este código


[Activity(
        Label = "GifCatRoulette.Droid"
        , MainLauncher = true
        , Icon = "@mipmap/icon"
        , Theme = "@style/Theme.Splash"
        , NoHistory = true
        , ScreenOrientation = ScreenOrientation.Portrait)]

La guía de MVVM Cross dice que hay que en el caso de Visual Studio no debes cambiar la línea que dice "Icon... @mimap/icon". Falso,  hay que cambiarla a drawable como sigue


using Android.App;
using Android.Content.PM;
using MvvmCross.Droid.Views;

[Activity(
        Label = "GifCatRoulette.Droid"
        , MainLauncher = true
        , Icon = "@drawable/icon"
        , Theme = "@style/Theme.Splash"
        , NoHistory = true
        , ScreenOrientation = ScreenOrientation.Portrait)]

miércoles, 15 de febrero de 2017

Primeros pasos con Vue.js

No soy tan fan de programar frontend pero ultimamente me ha llamado la atención ya que el mercado está mas activo que nunca.  Siempre he trabajado con Jquery y me ha resultado buena opción para todos mis desarrollos, sin embargo el performance no siempre es el esperado. Por esa razón me decidí a probar un nuevo framework o libreria de Javascript para frontend. Un amigo me platicó de Vue.js y entonces hice una página de gifs de gatos usando Vue.js


Pueden acceder a la página aquí