Traducir el blog

A solitaire game


Traducción al español aquí

We, as VBA software programmers, expend many hours alone coding applications and sometimes we are distracted playing Windows Solitaire.


But you can't always play because companies prevent their use because they "think" you lose productivity if you are distracted from time to time playing alone.

If you have restricted access to use Windows games, why not play solitaire in an Excel spreadsheet?

Indeed, Monte Carlo method for calculating complex mathematical problems has been inspired to the inventor when he was convalescing from an illness and playing solitaires.

The truth is that the post title gives much game because searching on Google for "a solitaire game" appear many morbid references to "self-esteem".  Years ago I'm writting games and by "self-esteem" I have designed this game alone. I remember with nostalgia when it was games about ships and star wars in 80x24 character screens with no graphics! Those were the days!

This game I've done trying to be faithful to the movement of the card deck of solitaire, with some cards that can be dragged and dropped onto the piles, turn them over and move in groups of cards from a pile to another, which is what more headaches than I have given. I assure you it is not a demo, is a beta (ß is the 2nd letter of the Greek alphabet) of which like so much posting to Micro$oft, though I'd say they understand it as a seam of making dollars ($ symbol or ISO 4217 USD), which I'm not going to get rich by selling this solitaire. I hope you enjoy it alone because it will soon overtake the Windows Solitaire. One can know how it's done because the code is open and VBA macros unprotected.

SOLITARIO_PW22.xls  

Today I share the beta ß of a solitaire game that will wreak havoc in worldwide offices and is going to unseat Windows Solitaire, which is removed in many office computers to do not play during working hours. After my family has tested it, I ask you the favor of being the next lonely beta-tester of this solitaire game and you have fun as much as I have been design it. Comment me if you find bugs and your ideas and improvements you can imagine. I hope you prompt response, ß-tester, to see how I was wrong to gain experience, as I always say in my signature.
SINGLE INSTRUCTION:
If you suspect from prying eyes behind your back while playing solitaire, press the card table to minimize it. Although, if anyone gets along well with his boss would be nice to share the solitaire with him, will be a special way to make good friends! PD: Password to unprotect sheets: solitario
Traducción al español aquí

Un juego solitario


English translation of this post here

Los programadores de VBA solemos estar muchas horas solos codificando las aplicaciones y a veces nos distraemos jugando al solitario de Windows.



Pero no siempre se puede jugar porque las empresas impiden su uso porque "piensan" que se pierde productividad si nos distraemos pasando un rato jugando solitariamente.

Si tienes restringido el acceso y uso de juegos, ¿por qué no jugar al solitario en una hoja Excel?

Por cierto, el Método de Montecarlo para el cálculo de complejos problemas matemáticos se le ocurrió a su inventor mientras jugaba un solitario estando enfermo.

La verdad es que el título del tema da mucho juego pues buscando en Google "un juego solitario" aparecen muchas referencias morbosas al "amor propio". Hace años que no me ponía a escribir juegos y por "amor propio" he diseñado este juego solitario. Recuerdo con nostalgia cuando hacía juegos de barcos y de guerras de galaxias en pantallas de 80x24 caracteres ¡sin gráficos! ¡Qué tiempos aquellos!

Este juego lo he hecho intentando ser fiel al movimiento de las cartas de la baraja del solitario, con unos naipes que se pueden arrastrar y soltar sobre los montones, darles la vuelta y mover en grupos de cartas de un montón a otro, que es lo que más quebraderos de cabeza me ha dado. Os aseguro que no es una demo, es una beta (ß es la 2ª letra del alfabeto griego) de las que le gusta tanto publicar a Micro$oft, aunque yo diría que ellos lo entienden como una veta de hacer dólares (símbolo $ o ISO 4217 USD), cosa que yo no pienso hacer vendiendo este solitario.
Espero que os guste solitariamente porque pronto va a desbancar al solitario de Windows.
Se puede saber cómo está hecho porque el código VBA está abierto y desprotegidas las macros.

SOLITARIO_PW22.xls

Hoy comparto la beta ß de un juego solitario que va a hacer estragos en las oficinas de todo el mundo - worldwide offices y va a desbancar al solitario de Windows, que está desinstalado en muchos ordenadores para que los oficinistas no jueguen en horas laborables.  Después de testearlo en familia, os pido el favor de ser los próximos betatester solitarios de este juego y que os divirtáis tanto como yo al diseñarlo. Comentadme los fallos que encontréis y las ideas y mejoras que se os ocurran. Espero pronta respuesta de vosotros, los ß-tester, para saber en qué me he equivocado para ganar experiencia, como siempre digo en mi firma.
INSTRUCCIÓN ÚNICA:
Si sospechas de miradas indiscretas detrás de tu espalda mientras juegas al solitario, presiona el tapete para minimizarlo. Aunque, si alguno se lleva bien con su jefe, no estaría mal que compartiera el solitario con él, ¡será una manera especial de hacer migas! P.D.: Contraseña para desproteger las hojas: solitario
English translation of this post here

Characters Games


Traducción al español aquí

The character

The character of a person or personality can not be understood by others. There are people with great character and people without character, with easy or difficult character or complicated treatment, strong or weak character, but this is not a blog on psychology but on technology.


The characters

The same goes for the characters in a computer or a computer application because it does not read well or not understood the sources of these characters or are difficult to see or do not say anything or express much as an image.


I have to say that I am unhappy with the popular saying "a picture is worth a thousand words" because a word, with graphical characters, can contain a thousand pictures and if not you can ask the Chinese or Japanese people.

Since the first PCs, we have tried that does not happen, trying to create characters games that become universal, which has not been achieved until today.

As an engineer I tend to use the 94 characters with symbols of units of measure, from &H3380 to &H33DD in the range F52C129:F52C222 and for my career in phone companies, the phones in cells F39C15 and F39C16.
☎ ☏

For example, Hertz or cycles per second to measure the CPU's speed:
㎐ ㎑ ㎒ ㎓ ㎔


Unicode characters

The latest attempt is the Unicode 6.0 version which adds 2,088 characters, including more than 1,000 additional symbols and emoticons emoji type, which are especially important for Japanese mobile phones.


The Japanese character

These usually so distant Japanese people into their far islands but so close of us exporting its high technology and that they are suffering now earthquakes, tsunamis (why Japanese people invented this word?) and a nuclear threat.


I'll take their samples of civic value, their behaving with integrity against the desolation, without incidents, looting or protests. Very different from the Western character.

津波 - Tsunami = this word is composed of two characters:
津 = Tsu, Japan port city with a barrier that provides time to evacuate.
波 = nami - wave.

The coincidence must have put following the character that represents the wave of the tsunami within Unicode, the next character:
泣 = Mourn.

When I got my nickname Wave was to refer to the power of the waves to travel and spread their message to all corners, but not as a black wave but as a wave of help.

From here, I encourage the Japanese people so they can recover soon from the uneasiness.
ここから、私は、このような不安から迅速に回復することができます日本の人々に私の励ましを与える。
(Translated with Google Translator)


Character encoding

To try to understand some Japanese character or the character encoding software, it is best to generate them. I refer to characters in the Japanese written language and an easy way to generate them in Windows is with this Excel spreadsheet that I prepared for the occasion and it generates 65,536 Unicode characters in 256 rows and 256 columns.

UnicodeFontsPW1.xls


Is a subset of Unicode known as BMP which does not refer to a Windows Bitmap file format with the extension .bmp, but as a Basic Multilingual Plane  - BMP.

The first plane (plane 0) of Unicode, comprising 17 planes, BMP contains characters for almost all modern languages​​ and a large number of special characters. It aims to support the unification of writing character sets. Most of the codes allocated in the BMP are used to encode the languages ​​Chinese, Japanese and Korean known as CJK. According to CJK Unified Ideographs code (&H4E00 to &H9FFF) in lines 79 to 160 of the table generated in Excel, or that is, a whopping 20,940 characters for 3 languages​​. (A lifetime to learn them).

The writing Japanese is called Kanji and it is composed of Chinese characters and characters hiragana (ひらがな, 平仮名) and katakana (カタカナ, 片仮名).

The full CJK characters list and their correspondence with each of the three languages is in this file of 974 pages: CJK Range: 4E00-9FCF.pdf

Wikipedia links to learn more about Unicode characters:
Unicode
ISO 10646
Mapping of Unicode characters
Unicode compatibility characters
Unicode planes

Microsoft links:
Unicode
Code Pages
Code Page Identifiers

Many Windows API functions have "A" (ANSI) and "W" (wide, Unicode) versions. The "A" version handles text based on Windows code pages, while the "W" version handles Unicode text.


Generated characters with Alt + number

Pressing numbers in the keypad while pressing the Alt key, it is possible to write extended characters in the old ASCII, but when we are using different systems and keyboards, results are different.

Things to know:
- The introduction of characters from the keyboard depends on the keyboard layout and language.
- The original ASCII table is that of the IBM PC and MS-DOS: Code page 437
- Correspondence in Western Europe can be: Code page 850
- In English tends to be: Windows-1252

A comprehensive list of ASCII and Unicode codes:
Microsoft code page numbers for various other character encodings

Herein is a method to generate all keystrokes Alt + number with macros:

Metodo de Teclado Alt+PW1.xls


You can check the characters and compare them:
- In row 24 there is the DOS compatible ASCII code table.
- In row 25 are generated with the function keybd_event keys Alt + number
- In row 26 are generated with Alt + 0 + number

To study the differences between the codes generated by pressing Alt, see this page: Alt code


Character fonts

To list the MS Windows characters fonts, installed on your computer, can be done with this Excel spreadsheet:

Fonts PW1.xls


Takes a minute to generate and, if you select a cell, automatically copy it to the clipboard for pasting it keeping font type into Word, for example.


My character

When did I come to my interest in the characters?

In my final year project about an intelligent terminal with a digital electronic prototype, a microcontroller, a modem and the program written with a microprocessor-language.

The prototype had a QWERTY keyboard but the screen was very expensive and I replaced it with a CRT TV that showed characters in 24 rows and 80 columns, encoded in ASCII, covering a proprietary ASCII and EBCDIC but not Unicode which appeared 10 years later.


Characters Games

Playing with the characters we made many computer games when there were no graphics cards in the first personal computer - PC.

They are text-based games, dungeons type (MUD), ping-pong, Star Trek or Amnesia (into a 5¼" floppy disk - see manuscript here)

List of text-based computer games

Also gave some art forms:
ASCII art
ANSI art

As the games graphics appeared, the Japanese overwhelmed us with their awesome games, which they could not do with their Chinese characters to us, incomprehensibles to Westerners.

Even now you can continue playing with the characters to draw the hearts of the cards in Excel or anything else that comes to your mind.

Well, that who have gone through the early stages of computer character encoding know something that young people leave out.

They should move their ass to learn these things and to generate better emoticons in social networking with simple characters and know what events occur when they are pummelling the keys.


Traducción al español aquí

Juegos de Caracteres

English translation of this post here

El carácter

El carácter de una persona o personalidad puede no ser entendido por otras personas. Hay personas con mucho carácter y otras con poco, con carácter fácil o difícil o de trato complicado, de carácter débil o fuerte, pero éste no es un blog de psicología sino de tecnología.

Los caracteres

Lo mismo pasa con los caracteres de un ordenador o de una aplicación informática que al leerlos en otra no los interpreta bien o no están las fuentes de esos caracteres o son difíciles de ver o no dicen nada o expresan mucho, como en una imagen.

Tengo que decir que no estoy conforme con el dicho popular "una imagen vale más que mil palabras" porque una palabra con caracteres gráficos puede contener mil imágenes y sino que se le pregunten a los chinos y japoneses.

Desde los primeros PCs, se ha intentado que eso no pase, creando juegos de caracteres e intentando que sean universales, cosa que aún no se ha conseguido hoy en día.

Como ingeniero me inclino a usar los 94 caracteres con símbolos de unidades de medida, desde &H3380 hasta &H33DD en el rango F52C129:F52C222 y, por mi carrera en compañías telefónicas, los teléfonos en las celdas F39C15 y F39C16.
☎ ☏

Por ejemplo, los hercios o ciclos por segundo para medir la velocidad de las CPUs:
㎐ ㎑ ㎒ ㎓ ㎔


Los caracteres Unicode

La última tentativa es la versión Unicode 6.0 que añade 2.088 caracteres, incluyendo más de 1.000 símbolos adicionales del tipo emoji o emoticono, que son especialmente importantes para los teléfonos móviles japoneses

El carácter japonés

Esos japoneses habitualmente tan lejanos en sus islas pero tan cercanos exportando su altísima tecnología y que tanto están sufriendo estos días con los terremotos, los tsunamis (¿por qué inventarían esta palabra precisamente los japoneses?) y la amenaza nuclear.


Me quedo con sus muestras de valor y de civismo, comportándose con entereza ante la desolación, sin saqueos, incidentes ni protestas.  Muy diferente al carácter occidental.

津波 = Tsunami, esta palabra está compuesta de dos caracteres:
津 = Tsu, puerto de una ciudad japonesa con una barrera que da tiempo a evacuarla.
波 = nami - ola.

La casualidad debe haber puesto, dentro de Unicode, a continuación del carácter que representa la Ola del Tsunami, éste otro:
泣 = Llorar.

Cuando me puse mi seudónimo Wave fue para referirme al poder de las olas para viajar en ondas y extender su mensaje a todos los rincones, pero no como una ola negra sino como una ola de ayuda - a wave of help.

Desde aquí, animo al pueblo japonés para que pueda recuperarse pronto de tanta zozobra.
ここから、私は、このような不安から迅速に回復することができます日本の人々に私の励ましを与える。
(Traducido con el Traductor de Google)


Codificación de caracteres

Para intentar entender un poco el carácter japonés, o la codificación de caracteres informáticos, lo mejor es poder generarlos. Me refiero a los caracteres del idioma japonés y una manera fácil de generarlos en Windows es con esta hoja de cálculo en Excel que he preparado para la ocasión y que genera 65.536 caracteres Unicode en 256 filas y 256 columnas.

UnicodeFontsPW1.xls

Es un subconjunto de Unicode conocido como BMP que no se refiere a un fichero del tipo Windows Bitmap, con la extensión .bmp, sino a un Basic Multilingual Plane o BMP

El primer plano (plano 0), de los 17 de que consta Unicode, es el BMP y contiene caracteres de casi todas las lenguas modernas, y un gran número de caracteres especiales. Su objetivo es apoyar la unificación de juegos de carácter para escribir. La mayoría de los códigos asignados en el BMP se utilizan para codificar los lenguajes chino, japonés y coreano CJK según el código CJK Unified Ideographs (&H4E00 a &H9FFF) en las líneas 79 a 160 de la tabla generada en Excel, o sea, la friolera de 20.940 caracteres para 3 idiomas. (Toda una vida para aprenderlos).

El japonés escrito se llama Kanji y está compuesto de caracteres chinos y de caracteres hiragana (ひらがな, 平仮名) y katakana (カタカナ, 片仮名).

La lista completa de los caracteres CJK y su correspondencia con cada uno de los tres países está en este fichero de 974 páginas: CJK Range: 4E00-9FCF.pdf

Enlaces de Wikipedia para saber más sobre caracteres Unicode:
Unicode
ISO 10646
Mapping of Unicode characters
Unicode compatibility characters
Unicode planes

Enlace de Microsoft:
Juego de caracteres Unicode


Caracteres generados con Alt + número

Pulsando a la vez la tecla Alt y un número se pueden escribir caracteres extendidos de la vieja tabla ASCII pero, al usar sistemas y teclados diferentes, cada uno es un mundo.

Cosas que hay que saber:
- La introducción de caracteres desde el teclado depende de la configuración del teclado y del idioma.
- La tabla ASCII original es la del IBM PC y del MS-DOS: Code page 437
- La correspondencia en Europa Occidental puede ser: Code page 850
- En inglés suele ser: Windows-1252

Una lista bastante completa de códigos ASCII y Unicode:
Microsoft code page numbers for various other character encodings

Adjunto un método para generar con macros todas las combinaciones de teclas Alt + número

Metodo de Teclado Alt+PW1.xls

Se pueden comprobar los caracteres y compararlos:
- En la fila 24 la tabla ASCII compatible DOS.
- En la fila 25 se generan con la función keybd_event las teclas Alt + número
- En la fila 26 se generan con Alt + 0 + número

Para estudiar las diferencias entre estos códigos generados con la tecla Alt ver esta página : Alt code


Fuentes de caracteres

Para listar las fuentes de caracteres en MS Windows instaladas en tu ordenador se puede hacer con esta hoja Excel.

Fonts PW1.xls

Tarda un minuto en generarla y, si se selecciona un celda, la copia automáticamente en el portapapeles para pegarla en Word, por ejemplo, manteniendo el tipo de fuente - font.


Mi carácter

¿De dónde me viene mi interés por los caracteres?

De mi proyecto fin de carrera sobre un terminal inteligente para el que presenté un prototipo con su electrónica digital, su microcontrolador, su módem y su programa en lenguaje microprocesador.

El prototipo llevaba un teclado QWERTY pero la pantalla era muy cara y la sustituí por un televisor CRT en el que aparecían los caracteres en 24 filas y 80 columnas, codificados en ASCII, en una extensión ASCII propietaria y en EBCDIC pero no en Unicode que apareció 10 años después.


Juegos de caracteres

Jugando con los caracteres hacíamos muchos juegos informáticos cuando no había tarjetas gráficas avanzadas en los primeras Computadoras Personales - PC - Personal Computer.

Eran juegos basados en texto, text-based games, del tipo mazmorras (MUD), ping-pong, Star Trek o Amnesia (en un floppy disk de 5¼" - ver manuscrito aquí)

List of text-based computer games

También se daban algunas formas de arte:
Arte ASCII
ANSI art

En cuanto aparecieron los juegos gráficos, los japoneses nos apabullaron con sus impresionantes juegos, lo que no habían podido hacer con sus caracteres chinos, ininteligibles para los occidentales.

Aún ahora se puede seguir jugando con los caracteres para dibujar los corazones de las barajas en Excel o cualquier cosa que se nos ocurra.

Pues eso, que los que hemos pasado por las etapas más tempranas de la informática sabemos de codificación de caracteres, cosa que los jóvenes dejan de lado.

Deberían ponerse las pilas y aprender estas cosas para generar mejores emoticonos en las redes sociales con simples caracteres y para saber qué eventos se producen cuando aporrean las teclas.

English translation of this post here

Mi lista de blogs