Sunday, December 19, 2010

Relocation tips

surprise: I am relocating to Atlanta Georgia on 15/Jan/2011 and going to manage the system engineering <Smile />

I am going to use this blog post to share some tips which should help you during the process and save you time

  • Find out who relocate to your target location from your company and stay in touch with him, ask all the questions you can (coz there are lots of small issues that will waste your time)
  • The SSN is most important thing you need to get – without it you cannot be paid! so if you are going to house hunting make sure that you have you L1 Visa ready for that date and that the duration is no less than 10 days (time for I94 to arrive) [I Checked this and you must wait 10 days!!!]
  • Most companies have budget for the entire relocation, so if you are moving with family it is advised to reduce the hotel duration to minimum (coz its too hard to be in small place) and have you rented house be there for you on the first week you arrive. the money that is left out of not using the hotel can be used to rent furniture until your container arrives
  • I personally suggest to scan ALL the documents you have and save them in a folder that is shared online (Try DROPBOX which works nice) than you can download them where ever you are
  • When packing your house, it is advise to split the house into three sections: first priority – “must be shipped” , second priority “Could be shipped” and last priority – “should be distributed to other people”. this is needed because the container is not large enough to hold all your house so you need to prioritize it. and now it’s a good time to lose the garbage (if you didn’t use it for more than 3 months you will not use it ever)
  • [29/Dec/2010] Don't forget to prepare money in advance for all your contracts that are you are canceling (e.g. Phone, Cell Phone, Cable, etc) - it could easily cost above 500$
  • [20/Jan/2011] For SSN meeting – come only AFTER you are 10 days in the USA and come with your & your wife’s passport , translated marriage certificate including the original one, I94 that shows the correct VISA type. Kids are not entitled to get SSN they will only get ITIN. Do not accept to move to USA without having SSN in hand (meaning in your house hunting you must close the SSN issues – reason is that it effect you daily actions, spend money, etc)
  • [20/Jan/2011] When renting a house make sure/demand that you will have refrigerator, Dryer and washing machine – otherwise you will need to pay 500- 2000$ (like US)
  • [20/Jan/2011] If you are going to get company phone, it is advise to request it long before you arrive and preferred to get it in your house hunting (if you have such). Coz coming to USA without a phone is hard
  • [20/Jan/2011] if you are coming from abroad than it is advised to create a local number at your origin that will allow your friend to call you for free in the local area (it should be approx 20$ monthly payment for you for unlimited account including you calling to your origin for unlimited amount of minutes)

 

Hope this saves some time for you

Cookies and load balancer stickiness

There are few load balancer that use cookie to maintain the target node that the client show work with (stickiness) while other use IP or other approach

When you write code to access some web service or WCF end point make sure that you enable the cookies (or cookies container) so that if the target address is using load balancer that uses cookies to support stickiness you will not lose it.

Failing to do so might cause you session lost / problems in authentication

If you do simple manual webrequest than you need to create new cookiecontainer and assign to the webrequest

and if you use WCF than in the configuration simply set AllowCookies to true

This should save you half a day of debugging customer site Smile

%ERRORLEVEL% and PowerShell

in case you are writing PowerShell scripts and want to monitor the success of them using %ERRORLEVEL%, you should be aware that Exit(##) in your PS1 scripts will not effect the error level you read coz you are not on the same context as PowerShell.

The solution (thanks to Dani) is to use:

$host.SetShouldExit(int exitCode)
exit

* I must say that for me if looks like a bug that I need to alter my code so that other can read my exit code.

This should do the the job.

Monday, December 13, 2010

executable file is locked for approx. 1 minute or more when deleting it by System

The root cause was found by one of my team members called Vadim Blumkin

Apparently when the service Application Experience Service (aelookupsvc) is disabled there is a weird behavior in windows 2008 R2 / Windows 7 that causes executables to be locked  when trying to delete them

Amazingly this is a known issues that is listed here

We founds this issue while our process copied an exe , ran it and than tried to delete, copy and run again – we got access denied because files is being used. the handle was locked by System process

according to Microsoft this service is not required but I would advise you to leave it as is and NOT disable it.

Vadim thanks Smile

Getting current directory of the script in PowerShell

Amazing I could find a fast solution for the question “How do I get the current directory of where I run the script”?

The solution is to use like dos command %dp0 but in powershell / .NET syntax:

$currentDirectory = [System.IO.Path]::GetDirectoryName($myInvocation.MyCommand.Definition)

This does the job very nicely but if you have better way please tell me

Creating ISO–free and easy

one of the last steps of a project is to create the media that will be used to distribute it.

Before you start searching for special and costly methods you should know that using Cygwin you can get free command line tool to create your ISOs and also to burn them

Also you can see CDRtool project that allows also burning of ISO (I think this is update faster)

The tool used to create ISO is MKISOFS

Enjoy