24 October 2008

rollback a changeset and shelve it

A little bit of history. I commit a changeset a while ago. A client doesn't want to see it in next release. So I like to extract my changes, but save it for future. Yep, my code in TFS.

There is no right-click-command to rollback changes. But! There is tfpt rollback from power tool. You need to run "tfpt rollback /changeset:N "from the source folder. This will take all latest from the server then present you a list of files from the changeset and roll-back it happy ever after. Your change extracted from the code base. Hey, how can I shelve it now?..

First of all it is quite scary to click "Rollback". There is no any kind of disclaimer what actually happen. What is it going to purge your changeset from the history? Nope. It will update your local files to the state they were before the changeset (somehow it will resolve conflicts if any) and you get list of files from the changset but in reverse direction which you can check in.

But there is no way to shelve a changeset.

Addition:
Actually there is one.
Check-in your changes (of roll back) and then note a change set you just created. Perform rollback again but with number of rollback operation. You will get a changes you rolled back which are actually changes you like to shelve. Shelve it. Smile and Enjoy for the moment. Then Undo this changes.



07 July 2008

Magic ~

When you need a local path for your web service or aspx path you may exercise Server.MapPath("~") to get a folder or Page.ResolvePath(@"~/image/"). The key symbol is ~ which is translated to a local path.

Enjoy .net responsive!

03 July 2008

Who noticed the world has flipped over:
"registration fee that's already the lowest in the industry - and we charge in U.S. DOLLARS!" "Use the dollar to your advantage and get the most from your IT budget."

The fact that dollar loosed its positions presented as an advantage...

24 June 2008

Tricks with Flex compiler:

1) "120" + 30 = "12030"

and if you pass this to function with int parameter it will receive 12030 as integer. No warnings given.

2) Alert.show("Warning: " + + message);
appears as "Implicit coercion of a value of type String to an unrelated type Number

19 May 2008

I installed DiffMerge from SourceGear. I like how it highlights changes in a part of expression. But sometimes it go mad and starts showing rainbow of similar symbols in two methods. I need probably show a snapshot of best example.
I am trying to use it as merge tool and it not simple to set command line for it. But thanks
Keith Craig and James Manning as original source.

09 May 2008

Lucky day!

Hey! I won something!
I won a ringtone which my mobile cannot play - it is amr file.

It is strange Friday. I didn't change anything in a framework, instead I had 1.5 hour conference call and fixed 3 bugs.
You might think:
- No, it is NTFS
- No, hard drive is just 1 year old
- No, it is Vista and it has been tested for ages
- No, I always check in as soon as it is ready

But, it happened on Monday. When the deadline was on Friday and you need to finished and ship it "yesterday". Source folder with sources not check in for 2 working days reported corrupted and not accessible. Go change you pants and run check disk.

Post Mortem: I lost 4 hours waiting for data recovery application and check disk. No data has been lost. It was good lesson. Thanks!

11 April 2008

SOAP header between flex client and .net web server

There is no day without invention.
Seems to be a simple code, but I manage to kill two hours to make it work.
This helps. Don't bother chinese. It just works.

10 April 2008

LINQ to SQL readings

Still under impression after LINQ to SQL session from IMTC.
The first thoughts are:
  • wow it is quick and easy;
  • code is generated for me for nice visual tool
  • full way from database to LINQ interface and classes is available to use out of box
To the end of session I remembered TDD and scratched my head with how apply this to it. Also I've samples of ugly t-sql generated - SQL Profiler is you friend forever.

Few days later I noticed the articles in my RSS Reader. And today ate 8 articles by Ian Cooper:

Architecting LINQ to SQL applications, part 1

...
Architecting LINQ To SQL Applications, part 8


He shows samples of unit tests and set ranges for layers. He advices to use class attributes or xml notation files but not a visual designer for craft entities. Oops. :( My dream of software factory blown away.

In my case I have quite complex database (which is far away from ideal). My application one of few and respectably consumes part of tables. My current approach is to generate all classes for whole database and add extensions in partial classes.
My issues are:
  • merging changes of database structure from other branches
  • ugly database content, which I managed to insert into each entity
  • difficulties with testing
  • serialising entity for passing to presenter (which is not .net)

What I learned from these articles:
  • cover only entities the application is using. I got this already. Our generation tool covers whole database when generates nHibernate mapping structure. This automatically transforms each FK into IList. One day this should go...
  • In the examples he stores an entity in a repository - this allows replace it with mock for testing. I have in reverse - each entity must have a link repository in order to operate;
  • My model for user session in not complete. I need to decouple it into module and make it flexible in order to move application onto it;
  • LINQ to SQL is not a magic. It is another ORM created with lessons learnt (are they?) from the past. Yep, there is a visual design, but this is for simple projects.

22 February 2008

Today I meet interesting problem.
I have an XmlDocument and do a lot of manipulations with elements.
It appears that when I do element.SelectNodes(xpath) and in xpath I have something like //value it does search in whole document and not in the element itself.
Surprised and confused. After all what I done in xml to find this bugfeature.

19 February 2008

When focus goes away from visibility Flex doesn't scroll automatically. This helps.

And to selected and display the very last item in a grid use myGrid.scrollToIndex(data.length);

04 February 2008

If you need to handle sorting on Date type column in DataGrid (in Flex) don't do that. It is much easier to do this.

As "not now" solution you may set sortable="false"

30 January 2008

Global.asax is big!

You know, this Global.asax is pretty important file. You would not believe how my Flex-.NetWebservice application reacted when I decided to deleted it from test site.

It works until exception happens. And then exception corrupted and Flash Player shows crazy Stream IO error

TypeError: Error #1010: A term is undefined and has no properties. at Forms.Login::LoginPanel/onWebServiceFailure() at Forms.Login::LoginPanel/___Operation1_fault() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.rpc::AbstractOperation/http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent() at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::faultHandler() at mx.rpc::Responder/fault() at mx.rpc::AsyncRequest/fault() at DirectHTTPMessageResponder/errorHandler() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at flash.net::URLLoader/redirectEvent()

When this happens after I recetly installed Flex3 Beta3 - of cause I blame it.
There is plenty reports of such error when you install HotFix2 or HotFix3. Which I didn't installed, but I understand I got it with Flex3 Beta3. It also says that you need to install HotFix3 only after installed HotFix2. Which I believed installer of Flex3 Beta3 would not do. I rolled back to Backup folder and tryed, than installed HotFix2 and HotFix3 - and tried. It didn't helped.

Result: I purged all versions of Flex. I installed Flex2, covered with 2.0.1. And it doesn't help.


Solution: Copy Global.asax to test site. It works like a sharm.
Bug: stupid me

17 January 2008

The worst ever technical documentation is probably Ibex Xml2Pdf.

Description is very sophisticated (~100 types of elements and endless number of attributes)
There is no error on mistyping an attribute or its value - it is just ignored.

Today the battle was to centre and set a width of svg image in a table cell.

Do not use width attribute as everywhere in documentation and examples - use content-width, as


...

07 January 2008

Spent two hours playing with IIS 6 helping to add second web server to IIS.
I wish I read a book about it.

Load data Questionnaire still doesn't work. Designing and designing from different sides and no result. One day left.

The audio books comes up as a great structured and very well professionally recorded with music and other back sounds. No need to cut into small pieces. Burnt dvd for history.

going home...

04 January 2008

test

This is test post from email.
 

Oleg Kalenbet
Software Developer

 

second attempt

I am glad to return to this blog. I registered it back in 2004 and then it was forgotten. An idea to write blog professional blog in English start bothering me couple months ago. When I put professional, I mean about my professional interests.
I am lucky today - I found it and managed to gain access back.
Would expect much activity here. My plan is two posts per month.
See you soon.