Microsoft Dynamics Ax developer's blog

Tuesday, February 20, 2007

Podcasts



I am now in pause between the two jobs. So almost every day I am walking through the nearby forest park with my child. She is sleeping and I have about three hours to do something interesting or useful. Snowflakes falling down do not allow me to read on paper or my pocket pc, but I can listen podcasts or webcasts.

The additional reason to do such things is to learn spoken english. For example when MS contacted me via phone on the SQL injection hole i've found (BTW i have tried to reproduce it on Ax4 and it is still here) I was not able to understand almost anything from what they have spoken.

So I need to train...

The first candidate to listen is the list of webcasts on channel 9 tagged with "Dynamics" because it is an interesting topic to me.

It is very useful, but have some disadwantages:

  • the files are very big - I need soundtrack only
  • my mp3 player can not play wmv smoothly (and it plays them only after renaming them to .wma) - I am forced to use a Pocket PC
  • I feel, I can get a slight Danish accent (it is nice, but I think not when mixed with Russian ;) )


So I am switched to other podcast named .NET rocks - an internet radio about Microsort .NET and related technologies. It is interesting for me, sounds quite professional and, I think, made with a clean American English.

Can you recommend me interesing podcasts in English?

Do you know something for extracting soundtrack from a wmv file?

PS. The latest ".NET rocks" show is with a Steve McConnell, the author of the "Code complete" book, recomended recently by MFP

Saturday, February 17, 2007

Sidax 0.4 b 2

See page at axaptapedia for details. It is strongly recommended to upgrade beta0 to beta 1 or beta 2.

Tuesday, February 06, 2007

Python

Every programmer, ecpecialy one, which deals with some ugly language like X++ or BAAN 4GL should know some scripting language. Its a kind of practical and easy tool which allows you to write small programs quickly, in cost of performance.

My favorite is Python. It is nice, mature enough and widely supported (even my Pocket PC has an interpretter).

For example one task which I did with python a couple days ago is a preparation of data of the legacy system to load in Dynamics Ax. The source file consists of text lines, where data fields are separated with the piplene character ('|'). Some of data fields values contain pipeline character too. The first field of the line identifies type of the data (invenotory group or inventory item). The file was encoded using DOS (cp866) encoding. So there was 3 actions po perform:

  • recode data to Windows encoding (cp1251)
  • separate item data from inventory group data
  • check for lines which pipeline in data


It was done by the following scipts:

1. Splitting files by data type and converting from DOS to Windows

src=open('input.txt', 'r')
dst = {'asl': open('inventory.txt', 'w'), 'ctl': open('group.txt', 'w')}
lineNo = 1
for line in src:
type = line.split('|')[0]
if type in dst:
try:
dst[type].write(line.decode('cp866').encode('cp1251'))
except:
print line
print lineNo
lineNo += 1


2. Checking for correctnes:

import sys
lineCount = 8
fileName = sys.argv[1] if len(sys.argv)>1 else 'inventory.txt'
for lineNo, line in enumerate(open(fileName, 'r')):
if line.count('|')!=lineCount:
print lineNo
print line.decode('cp1251').encode('cp866')


As you can see it is readable and easy.

If you get interested, look at the following links:

Thursday, February 01, 2007

Tabax 0.2.14: View query of the active datasource

A new version of tabax:

download (27K)

Now you can view the source of the query in the active datasource by simply holding Ctrl+Shift while pressing the 'Table browser' button (code by Ivan Kashperuk).

Also you can list all datasources on the active form and then browse the data by holding Shift while pressing the 'Table browser' button.