My Geeks.ms anniversary!!!!

Two years ago on 26th June, I got this blog by Rodrigo Corral. Many time have been left out. I’m writing in English about technology and general programming now, furthermore I don’t forget .NET, my passion.

Happy geeksanniversary!

How to change the UICulture in an ASP.NET Page

Sometimes, we’d stored a cookie with the user language preference. But, the fact of change the Page.UICulture don’t have any resoult.

To changed this property we should do it inside the InitializeCulture Page method and override it. Imagine that the cookie is called “lang”:

protected override void InitializeCulture()

{

    if (Request.Cookies["lang"] != null)

    {

        if (Request.Cookies["lang"].Value != "")

        {

            Page.UICulture = Request.Cookies["lang"].Value;

        }

    }

    base.InitializeCulture();

}

Thus, you could change the page language ;).

http://eugenioestrada.es/blog/

Silverlight Encryption

I wanna recommend you three posts about encryption with Silverlight. When we store in the Isolated Store, that you don’t want to leave it in clear is possible. So, we should encrypt it.

The System.Security.Cryptography is the namespaced that we must use. They explain how to encrypt/decrypt, generate and store the key,…

You can read it in the following links:

Silverlight Encryption (Part 1)

Silverlight Encryption (Part 2) – Generating the key

Silverlight Encryption (Part 3)

I hope they are interesting for you 😉

http://eugenioestrada.es/blog

Curious fact: Last WLW release’s version number

I just write about a new Windows Live Writer CTP, what i’m using now to post this entry.


The lastest stable WLW version is 12.0.1366.1026. We could imagine the new preview build version number is 13.0.xxx.xxx. But the WLW Team have decided the new release (Windows Live Writer 2009?) major version is 14.0.3913.522.


image


I don’t sure about the reason, but I supose that superstition is one.


What do you think?


http://eugenioestrada.es/blog

Windows Live Writer CTP

A new Windows Live Writer just be released by Windows Live Team. We’re using this blogging tool since the first CTP realeases.


Now, this version has new interesant features:


Video and Image Publishing Enhancements


  • Upload videos to Soapbox
  • Image cropping and tilting
  • Additional border styles (reflection!)
  • Support for LightBox and other image previewing effects (like Slimbox, Smoothbox, and others)
  • Support for centering images

Editing Enhancements


  • Auto Linking
  • Smart quotes/typographic characters
  • Word count

UI Improvements


  • Revised main toolbar
  • Tabs for view switching
  • Improved category control with search/filtering

You can download it from here.


Source: http://weblogs.asp.net/lduveau/archive/2008/06/11/windows-live-writer-ctp.aspx


http://eugenioestrada.es/blog/

Opinión: Hablemos del software libre

Tengo ciertos proyectos en mente, relacionados con el software libre. Lo que me llevado a escribir mi opinión sobre ello, con lo que haré una excepción en mi tendencia a escribir en inglés. Para lo cual quiero comenzar con una cita de uno de los grandes (por no decir el más grande) del software libre, Richard Stallman, fundador de la Free Software Foundation.

No me disgusta que se copie un programa en contra de la ley de otro país, porque lo que es ilegítimo es la ley, no la copia. Romper una ley injusta no es malo. 

Richard Stallman

He elegido esta cita de las muchas que Richard Stallman ha dicho, porque creo que el software libre va mucho más allá. La legalidad es solamente un factor que mueve el mundo del software. Yo opto no por el open source, sino por el free knowledge. La actividad intelectual, ya sea informática o de otra ciencia, ha de ser libre para el progreso del conocimiento. El fin es didáctico. La filosofía del software privativo y del software libre es muy diferente. No es comparable. No se puede convertir software privativo en software libre, ni viceversa. Son dos mundos completamente diferentes que han de coexistir. Haré un símil con la educación pública y la privada, acertado a mí entender.

Por un lado tenemos la educación pública, donde la atención es menor, el número de alumnos es mayor y es gratuita. Por el otro lado tenemos la educación privada, menor número de alumnos, mayor atención, pero hay que pagarla. A pesar de ello esos factores no influyen en la calidad de la enseñanza. Cabe la posibilidad que la educación pública de una enseñanza de mayor calidad. Esto es debido a que la educación privada crea un vínculo de dependencia entre alumno y profesor. El profesor es conocido por el alumno y éste por el profesor. Esto crea un subjetivismo a la hora de la corrección, frente al objetivismo que la educación pública otorga. De todas formas, ambas opciones coexisten. Unos optan por una y otros por la otra.

La actividad intelectual, ya sea informática o de otra ciencia, ha de ser libre para el progreso del conocimiento. El fin es didáctico.

Lo mismo pasa en el mundo del software. El software privativo propone soporte técnico y estabilidad. Por la contra el software libre propone una comunidad altruista preparada para ayudar en lo que ellos puedan cuando sea necesario (cabe mencionar que el soporte técnico es de pago en el software libre), propone que el código es abierto para conocer su funcionamiento y lo más importante, una alternativa real al software privativo. Ante esto es necesario aclarar que software libre y gratuito no es lo mismo, a estas alturas ya lo sabemos. El software libre es aquel que deja su código a disposición del usuario (ya sea mediante pago, en caso de software libre de pago, o gratuitamente con el software libre gratuito).

Pero no solo eso, la mayor parte del software libre se nutre de las colaboraciones voluntarias de la comunidad de desarrolladores de software libre. La mayoría, gente que dedica su tiempo libre al desarrollo. Por la otra banda, el software libre tiene a una serie de desarrolladores en nómina que cobran por hacer su trabajo, programar. Aquí podríamos hablar de comunismo, en lo que creo que se ha convertido el mundo del software libre, y ver de quien creemos que ese trabajo, si de la comunidad, del trabajador o de la empresa. Pero no creo que debamos seguir ese camino que no nos lleva a ningún lado.

El software privativo ha intentado (y conseguido, creo yo) llevar el software a casi todos los hogares de los países desarrollados, de hacer que cualquiera, sin conocer nada de informática se siente delante de un ordenador y sepa acceder a internet, leer el correo electrónico, redactar un escrito, etc. Cosa que el software libre aún está muy verde para conseguir una situación parecida. El punto fuerte del software libre creo que está en los países subdesarrollados o en vías de desarrollo, donde lleva un tiempo promoviéndose proyectos como “un PC por niño» a escala global. Algo que no se podría hacer sin la ayuda del software libre.

Por último he de contestar, si me preguntan si estoy a favor del software privativo, que sí, estoy a favor de su existencia. Pero a pesar de lo que en esta introducción parezca, esta es una página con ánimo de escribir código libre de cara a la investigación y a aprender. Ese es el objetivo, compartir conocimiento.

Quiero aclarar que no intento hablar de calidad. Hablo, insisto, de que el conocimiento es aquello que tras nuestras vidas heredarán nuestros hijos y demás descendientes. Si desde su creación, hace aproximadamente medio siglo, la informática ha evolucionado tanto. Me gustaría saber, y para ello he de esperar contribuyendo en ello, cómo estará dentro de otro medio siglo. La información es el futuro. Si mi proyecto sigue adelante publicaré pronto los contenidos.

http://eugenioestrada.es/blog/

Firefox 3 will be released on 17th June

The web browsers war continue. Mozilla are developing Firefox 3 (aka Firefox Paradiso) for 36 mounths. Microsoft published the first IE 8 beta and the next beta version’re being developed. Opera Software’ve published the Opera 9.5 release candidate. Moreover, Apple’re compiling Safari on Windows since November 2007. Security, standards (like HTML 5*), UX or speed are some features the new browsers are includeing.

The third Firefox version’s going to be released on Tuesday 17th June 2008. The hoped new release has new features and improvements to performace, memory usage and speed, that you can read in the following links:

http://www.mozilla.com/en-US/firefox/3.0rc3/releasenotes/#whatsnew

http://www.mozilla.com/en-US/firefox/3.0rc3/releasenotes/#performance

While we’re waiting for the new IE beta, we can test the new Firefox

🙂

 

* I’ve talked about HTML 5 on two entries in my ASP.NET Weblogs blog (http://eugenioestrada.es/blogen)

http://eugenioestrada.es/blog

Important Python features to students (I)

When you’re learning to code, you must to understand many terms (like class, variable, object, etc.). Especially when we’re focused in an object oriented language. Knowing these concepts isn’t needed for starting to code with Python. It has some features which help to students, those with an excellent math base. The knowledge curve is faster, so we can could with interactive sessions to learn the Python syntax and later we could make complete programs with advanced logic structures and expressions.

Math-like language. Comparators association.

An uncommon, but clear, example is the comparators association.

What’s the result of “1 > 2 < 3” expression using C or C++? If we evaluate the math expression, the result should be “False”. But the solution that C provides us is “True”. What is the reason? The reason is C evaluate by pairs the expression:











C/C++
1 > 2 = False = 0
1 > 2 < 3 = 0 < 3
1 > 2 < 3 = True

But someone who is learning, this expression could mingle him.

On the other hand, Python solve this expression thus:









Python
1 > 2
1 > 2 < 3 = False

Then Python don’t evaluate the other part of the expression.

Other examples could be:

1 < 2 > 0



















C/C++ Python Math
1 < 2 = True = 1 1 < 2 = True 1 < 2 > 0 = True
1 < 2 > 0 = 1 > 0 2 > 0 = True  
1 < 2 > 0 = True 1 < 2 > 0 = True  

1 < 2 < 0



















C/C++ Python Math
1 < 2 = True = 1 1 < 2 = True 1 < 2 < 0 = False
1 < 2 > 0 = 1 > 0 = True 2 < 0 = False  
1 < 2 > 0 = True 1 < 2 > 0 = False  

But C# don’t let that expressions if we want to do it, we have to write:











C# (C/C++ solution) C# (Python solution) Math
Convert.ToInt32(1 > 2) < 3 = True 1 > 2 & 2 < 3 = False 1 > 2 < 3 = False

C/C++ and Python also let the solution:









C/C++ Python
1 > 2 & 2 < 3 = False 1 > 2 and 2 < 3 = False

In short, both ways are logic solutions, but the simple python solution is easier to understand than the harder C/C++ solution that requires knowledge about type conversion.

Welcome to my blog changes

Some people was expecting my return to come back to this community. Now, I’m
coming back with lots of changes in my blog.

On one hand, now I’m going to publish my entries in English. You will agree with me in the fact that English is the most common language in computing wolrd.

On the other hand, my blog is becoming a general blog about
developerment. It will be focused on new students who want to start
coding. After trying to teach coding to some people with various
languages, now I think that .NET isn’t the best technology to learn.
I tried with C# and VB, without any result. But I’m seeing how
someone that is learning with Python (language that i’m learning too)
the results are amazing (regards to Esteban, my next university
colleague =D).

So, my next entry will be about how learn coding using Python.

I’m not going to forget my .NET passion, I’ll publish entries about IronPython too.

http://eugenioestrada.es/blog/