Monday, July 30, 2012

jquery call asp.net code behind function

The technique I used is 
1) create hidden field in asp.net
2) create hidden button in asp.net

This is used during for example jquery autocomplete where I need to post information back to the servers.
autocomplete call will trigger hidden button onclick.
The codebehind will access the data via hidden field. (note the hidden field onchange only works when there is a form submission. Hence the hidden button was required)


The other way round from codebehind called jquery can be done via
1) Page.registerstartupscripts 
2) clientscript.registerclientscriptblock


jquery set asp.net hidden field can be done:
$("#<%= x.ClientID %>").val() //get
$("#<%= x.ClientID %>").val(newvalue) //set

Friday, March 30, 2012

the game

An individual perceived speediness in delivering business value, might be actually reducing a team velocities ...

when you axe, you should axe an entire team ...

there are no bad followers, only bad leaders ...

when the tribe has spoken, there is nothing much to do except walked away with the precious memories of once a good time together ...

Thursday, December 29, 2011

running multiple scripts in MSSQL

  1. Create the script
  2. :setvar workpath "c:\scripts\"
    :setvar FileToexecute "test3.sql"
    --:r $(workpath)$(FileToexecute)
    :r $(workpath)test1.sql
    :r $(workpath)test2.sql
  3. enable SQLCMD mode
  4. Run the above query

enabling the SQLCMD mode
using :r
joining :r with variables
unable to use buildin sqlcmd variables

Tuesday, November 17, 2009

gaining confidence...

When we write a program, we should always write modules to allow us to see the health of the module, such as connectivity to JMS servers, open office instances ...

provide admin functionality but make it as inaccessible as possible.

Sunday, September 27, 2009

Simplication via Polyglot

Radical Simplification Through Polyglot and Poly-paradigm Programming

*less code
*biz logic and impl separation (DSL)

imutable
nothing to sync
no locks semaphores mutexes

data stable, but a lot of functions use list, map, filter, fold/reduce (cloud computing)

adding types, few functions, use OO inheritances

declarative vs imperative

erlang
no mutable variables & side effect
IPC optimised msg passing (actor model)
lightweight & fast process

*less code 
*model domain as close as possible 
*declarative concise bug free 
*no mutable variables & side effect

-mocking dependency 

Wednesday, September 16, 2009

“FIRST class” test cases

Make “FIRST class” test cases (Fast, Independent, Repeatable, Small and Transparent)

Fast. Your test cases should be very fast to execute, every time you want to run all of them it shouldn’t take more than a few seconds for an small application.

Independent. You should be able to run your test cases in any order.

Repeatable. The result of the test case should be always the same, no matter how many times you have executed it before.

Small. Small test cases are easy to understand and change, are also likely to be faster.

Transparent. It should be clear what the purpose of each test case is.

from How to write a good test case: 5 tips to write better test cases

Wednesday, August 26, 2009

inverse vandals

"Basically, inverse vandals dont care about their work and its impact on the lives of users and the many others affected by their work, which is a pity. Software has a sort of magic in itself, and interactive software provides a concrete, vivid example of such a magic. Whether you are a teenager playing a video game or an old guy fiddling with an early computer in your garage, there was probably a moment in your life when you were totally amazed by a piece of software - otherwise you would probably have chosen another career."

Wiley Professional Java User Interfaces p. xxiiv