Wednesday, December 21, 2005
Some notes to work on later:
Communication on software project in a context of a game requires creating Domain Map, an Application Object Map and Vocabulary set for naming Object and Moves you can do with those objects. It’s an ontological work, conceptual schema distinction that needs to happen before any work can be done. Without immersing a newcomer to the team in that vocabulary and the map they are lost, do not speak the language and end up inventing new worlds of schemata that noone else but them will understand. In doing so their world is their alone and any communication is 90% guessing as to the meaning conveyed by sentences.
This is a big time waster for a team. There needs to exist a language. I am not talking about UML. Something more about humans communicating to master the moves in a game they are playing and you can’t really win by guessing alone. - more thoughts on that later.
Monday, December 12, 2005
Building blocks for making Regular Expressions.
REGEX PATTERNS
\w alphanumeric character
\w+ alphanumeric string
\W NOT alphanumeric character (special character)
`! " # $ % & ‘ ( ) * + , - . / : ; < = > ? @ [ \ ] ^ _ ` { | } ~’
\W+ NOT alphanumeric string (special character string)
[x] character x
[^x] NOT character x
[x-y] range [0-9] [a-z] [A-Z]
^ blank at beginning of line
$ blank at end of line
^$ blank line (blank beginning of line followed by blank end of line)
\b blank at beginning AND end of alphanumeric string
\B NOT \b
\< blank at begin of string
\> blank at the end of string
REGEX REPETITION OPERATORS
? matched at most once (optional)
* matched zero or more times (have not figured out how to use it)
+ matched one or more times. (same as in {1,})
{n} matched exactly n times.
{n,} matched n or more times.
{n,m} matched at least n times and not more than m times. {min, max}
Example:This regex matches email address
\b[A-Z0-9._%-]+@[A-Z0-9._%-]+\.[A-Z]{2,4}\b
Thursday, December 8, 2005
I have a problem with Rational Robot sometimes. For every object it deals with it puts coordinates. If you click in edit box it creates coordinates where you clicked it. A lot of times I want to standarize playback where I don’t care where Robot clicks my objects. I just want it to set focus. In those times I use regex to change the entire string that denotes coordinates.
I usually use jedit and it’s search and replace all functionality. I open all the .rec files I need to modify strings and load them in buffers. Then I run search and replace all using string "[0-9]{1,3},[ ]{0,1}[0-9]{1,3}" including quotes. Then I save all files.
It’s done.
Wednesday, December 7, 2005
Brush up on Unicode knowledge:
If we are playing software games then it is important to know the bits and piceces we use to build the tools with which to play those games.
Unicode is a collection of parts. It’s like a parts list when putting together a larger piece.