Related to the previous article on hacking visual studio to get rid of the 2Gb limit on user process virtual memory there is a good article from Mark Russinovich that explains what this setting (in the bootloader) does and how the memory looks like when you have a processor and OS that supports a 64bit address space:
Thursday, June 25, 2009
I was getting a lot of OutOfMemory or NotEnoughStorage errors in visual studio when developing with large projects. It seems that this is a known memory problem. I follow the instructions on this post and with the 3Gb I have on my laptop it improved a lot. If you are experiencing the same here is the link:
Tuesday, June 16, 2009
After a couple of years of work on a modeling platform where I have been contributing in the areas of architecture, business patterns and service orientation the first product is out:
Here is a quick look on it.
The announcement is only available in Portuguese as this is a product that applies only to Portuguese legislation.
This is a state of the art product with all the latest .NET 3.5 technologies in and is based on MDD principles.
Friday, June 5, 2009
Another quick note on Windows Azure that made me loose some time.
The urls of the three storages, Table, Blob and Queue must be given without the account name:
What you will see on the portal is something like http://youraccount.table.core.windows.net and copying that string will not work with the code as is.
Thursday, June 4, 2009
I got this error while trying out Windows Azure after deploying to the cloud fabrik. When testing locally we use the option shown on the picture bellow but on the cloud that is not required.
My problem was that I was not calling the initialization code that creates the tables in the storage. This is not required locally. The recommend initialization for the cloud is demonstrated in this video:
The initialization is done in the Global.axax in the BeginRequest event handler. My looks like this:
And the FirstRequestInitialization class looks like this:
Basically what this code does is to read the configuration from the configuration file and create each required table. If you get this error and you are using this method you forgot to add a call to the CreateTablesFromModel with the missing table.
When writing demo code I think a very nice interface is a console application. It is quick way of getting an application to input and output data without having to think on all those complex UI problems.
When you have to console projects, eg. client and server, the windows will most likely start cascaded. You then have to move one of them to be able to read stuff in both at the same time. This is really annoying.
First you will need to get some native APIs:
First you use the GetConsoleWindow API to get a handle to the window where the console buffers are being outputted.
The second step is to get the RECT structure populated with the window rectangle coordinates. We need this to compute the width and height of the window because we don’t want to change that and those are needed for the next API call.
The third and final step is calling MoveWindow API passing in the new origin and the same dimensions. Where goes a method that does just that:
I call this in the Main method before doing anything:
I give each window a hardcoded position but you can try a more elaborate algorithm like dividing the available desktop space.