23. November 2011

Mintty – resizable terminal for Windows

Update 4.11. 2012: Mintty/Cygwin Termina; has also support for transparency.

Update 31.12. 2011: new version of Mintty (see discussion).

Cygwin is great tool for Windows.

E.g. You can create shell script to access windows share via //computer/share_name. This saves a lot of time when you’re domain admin and you need to maintain many computers.

The only BIG drawback of Cygwin for Windows was terminal window. When you work on Mac or Linux you can resize terminal window as you need. Terminal (CMD) for Windows sucks. In default installation you can resize just in one direction. The other option would be to mix Cygwin with PowerShell, but then many things are not working at all.

Good news! Great news! There is new terminal window in Cygwin 1.7.x. It’s application mintty.

Installer will create link to this app with name Cygwin Terminal. It will launch mintty process and you can resize window without problem.

It works fantastic! After so many yeaars it is now possible to use full power of Windows and Linux together in one bundle. (Yes, I know about other terminals like rxvt or X-based stuff, but it required always some extra steps).

Some computers were complaining that /Cygwin-Terminal.ico was not found and I was not able to launch terminal. Solution was easy. Right click on launcher icon and remove icon parameters from Target. The result target command should look like: C:\cygwin\bin\mintty.exe

Hooray! BIG thank you goes to authors of mintty for Windows.

Follow Mintty T.

14. October 2011

_ITERATOR_DEBUG_LEVEL’: value ‘0’ doesn’t match value ‘2’

Update 16.10. 2011: new information added to article.

I was trying to compile an application with Visual Studio 2010 which has some dependency on GDAL open source library.

Everything went ok. GDAL compiled without problem from VS and also from command line:

nmake -f makefile.vc MSVC_VER=1600 DEBUG=1

Compilation of application based on GDAL was also ok. The only problem was when I switched project from Release mode to Debug mode. Linker was throwing a lot of messages like this:

'error LNK2038: mismatch detected for _ITERATOR_DEBUG_LEVEL': 
value '0' doesn't match value '2' in vrtizer.obj

I found some explanation that new version of VS has _ITERATOR_DEBUG_LEVEL set to 2 in Debug mode. It means that there are some extra security controls over iterators to detect memory leaks and other problematic stuff with iterators.

After longer research I came to realization that GDAL is compiled with /MD switch and my application wasn’t. The solution was easy. I just added /MD and Debug mode of app start working like a charm.

Quote from MSDN about /MD compiler switch:

Defines _MT and _DLL so that both multithread- and DLL-specific versions of the run-time routines are selected from the standard .h files. This option also causes the compiler to place the library name MSVCRT.lib into the .obj file.
Applications compiled with this option are statically linked to MSVCRT.lib. This library provides a layer of code that allows the linker to resolve external references. The actual working code is contained in MSVCR71.DLL, which must be available at run time to applications linked with MSVCRT.lib.

Update 16.10. 2011

/MD solved problem, but there was another warning: Command line warning D9025: overriding ‘/MDd’ with ‘/MD’.

To solve Iterator issue for GDAL you need to compile DEBUG version of gdal.lib with switch /MDd instead of default /MD.

Just open nmake.opt file and replace /MD in lines with DEBUG definition by /MDd.

There are two lines with MD:

OPTFLAGS= $(CXX_ANALYZE_FLAGS) /nologo /MDd /EHsc /Zi /W4 /D_CRT_SECURE_NO_DEPRECATE 
/D_CRT_NONSTDC_NO_DEPRECATE /Fd$(GDAL_ROOT)\gdal$(VERSION).pdb /DDEBUG
OPTFLAGS=   /nologo /MDd /EHsc /GR /Zi /W4 /Fd$(GDAL_ROOT)\gdal$(VERSION).pdb  /DDEBUG

Then rebuild GDAL:

nmake -f makefile.vc clean
nmake -f makefile.vc MSVC_VER=1600 DEBUG=1

29. August 2011

Managing LDAP with Apache Directory Studio

One of key downsides of LDAP in past was lack of cross-platform tools for managing directory structure.

Recently I found very good implementation of LDAP management tool based on Eclipse. It is Apache Directory Studio.

It is possible to connect it also to Microsoft Active Directory. Good work!

9. June 2011

Connect Android to Internet via PC with WiFi

Imagine situation: you have only PC or Notebook with Windows connected to the Internet and you also need to connect Android device to net. There is no WiFi device arround.

First approach is to create just ad-hoc wifi network. The only problem is that Android does not support ad-hoc networks.

Some folks suggest to use VirtualRouter. Unfortunately I had some problems to connect to the network created by this software. This solution doesn’t work for me.

Then I found solution that works like a charm – Connectify.me.

Just turn-on sharing on the device connected to the Internet and choose Home network with virtual interface.

Then start Connectify.me and set up network.

I found another issue related to Lenovo Internet Connection tools. WiFi was shutting down after few minutes. It is quite easy to fix it, when you know where to find right checkbox.

Just open “Lenovo – Internet Connection”, go to Tools. Open Global Settings. Uncheck “Allow wireless radios to be turned off when inactive”. Click ok.

Enjoy WiFi and Android :-)

20. April 2011

Productivity in software project drops at least to 1/2 after handover

It is quite clear that productivity in software project will fall down “little bit” when you hand over the project to somebody else.

New team does not have all the knowledge of original author and it takes longer time to solve project issues.

The problem is that this loss in productivity is not quantified and project managers relay just on some fuzzy feeling.

I found interesting talk given by Audris Mockus about Digital Software Archeology. He made deep research in the topic of productivity in software development and he defined several useful terms.

Audris formulate very interesting result of his research: Productivity after handover dropped to 1/2. This is quite important to realize. It affects project planning and resource allocation.