Wednesday, March 30, 2011

Tcl nob, newbie beginners tutorials list.

Just found these good looking tutorials for beginners and thought it will help someone...


I'll update when I find more...

Tcl, Read dynamic variables

I've just solved another Tcl mystery I had from day one in Tcl (around 2 months :)
It was not critical until today!

Example
set qwe.qaz.1 Hello
set qwe.qaz.2 From
set qwe.qaz.3 ShloEmi

set wanted_qaz 3
upvar 0 "qwe.qaz.${wanted_qaz}" wanted_qaz_val
set this_will_be_ShloEmi $wanted_qaz_val

Hope this helps...

Tuesday, March 29, 2011

GUIDE: tclunit/TDD for Tcl, usage and examples.

As promised (tdd-tools-for-tcl.html) here is my humble experience/research with tclunit.

Guides / tutorials found



Research results

Usage example

Have fun...

Sunday, March 27, 2011

GUIDE/TWEAK: Improve Eclipse load time

In my old station Eclipse load around 35~37 seconds. This is slow!
After a short research I've found that there is a way to speed things up...
After executing this steps I've improved the load time to ~11 seconds.

Uninstall unnecessary plugins
  1. Eclipse menu -> Help -> Install New Software
  2. On the lower right you'll find 'what is already installed?' Click it.
  3. On the 'Installed Software' tab select the wanted plug-ins and select 'Uninstall...'.
  4. Follow the instructions...


Configuring the Eclipse.ini file to improve performance.
NOTE - Execute the following steps on your own risk!! I'm not responsible (It works for me).

  1. Close Eclipse
  2. Goto your Eclipse root folder.
  3. MAKE COPY / DUPLICATE THE ORIGINAL 'eclipse.ini' FILE before moving to the next step!!!
  4. Edit the file 'eclipse.ini' to contain the folwing text:
-data
C:/Devenv/Devenv eclipse workspace
-showlocation
-showsplash
org.eclipse.platform
--launcher.defaultAction
openFile
-vm
C:/Program Files/Java/jre6/bin/client/jvm.dll
-vmargs
-Dosgi.requiredJavaVersion=1.6
-Declipse.p2.unsignedPolicy=allow
-Xms128m
-Xmx384m
-Xss4m
-XX:PermSize=128m
-XX:MaxPermSize=384m
-XX:CompileThreshold=5
-XX:MaxGCPauseMillis=10
-XX:MaxHeapFreeRatio=70
-XX:+CMSIncrementalPacing
-XX:+UnlockExperimentalVMOptions
-XX:+UseG1GC
-XX:+UseFastAccessorMethods
-Dcom.sun.management.jmxremote
  • If any thing goes wrong - use the duplicated file you made at step 4!!


Have fun...

Solution sources

Friday, March 25, 2011

TDD unit testing tools for Tcl

After committing my first 'big' feature to my current employee, I got a feeling that something was left behind in the heat of the rush. That think was, of course, the new code test coverage.

That lead me to try and find tools / guidance for Tcl TDD.

Here are the things I've found for Tcl:

  1. A very good TDD tutorials found
    1. http://www.agiledata.org/essays/tdd.html
    2. http://geosoft.no/development/unittesting.html
  2. TDD tools for Tcl
    1. Wiki comparison of available tools for Tcl -  http://en.wikipedia.org/wiki/List_of_unit_testing_frameworks#Tcl
    2. tclunit - http://www.tcl.tk/man/tcl8.4/TclCmd/tcltest.htm
      1. Download here - http://sourceforge.net/projects/tclunit/

Thats all, not much. I intend to check tclunit, experience with it and report back later on... see Y'a.

Wednesday, March 23, 2011

Guide: Drawing graph for free using GraphViz opensource lib.



  • file.dot


digraph G {
Yehiel -> Shlomi;
Aviva -> Shlomi;

David -> Rotem;
Ilana -> Rotem;

Shlomi -> Yeara;
Rotem -> Yeara;
}



  • Command line example

drive:> "c:\Program Files\Graphviz path\bin\dot.exe" -Tbmp file.dot -o out.bmp


  • Output (out.bmp)
(see above ...)