Ashik’s IT Thoughts

February 9, 2007

Khandakar Asif Hasan on “Meet the Mentors” by SQABD

Filed under: Community — ashikuzzaman @ 5:16 pm

SQA Bangladesh took an excellent initiative to interview the mentors of software industry in Bangladesh and podcast those through Meet the Mentors program. Listen to their first podcast(MP3) session at:

http://sqabdmentors.blogspot.com/2007/02/khandakar-asif-hasan-on-meet-mentors-by.html

This session is with Khandakar Asif Hasan, Director at Spectrum Engineering Consortium Ltd who shared his valuable insights on the strategies for development of software industry infrastructure. In this interview he touched the areas of software development life cycle process, proper training of human resources to build up core professionals in this field, the issue of internship, current Bangladesh Government policies in IT sector, modifications that need to apply to grab local software markets, essense of sustainable software development community, major problems of our software industry by comparing with the neighboring country India. He emphasized on collaboration between software companies and sharing knowledge, tools between each other to guide our software development community with a successful new dimension. Overall this podcast session tries to visualize the milestones and problems of software industry through the analytical portray of Khandakar Asif Hasan with his mission, vision and experiences of journey in the software industry during more than a decade.

I was lucky enough to get Asif Vai as mentor in my software engineering career when I joined Spectrum Engineering Consortium Ltd at 2001. Those who have worked with him, have the appreciation for both his architectural vision as well as engineering approach to solving any (non technical) problems. Layered architecture, design patterns, process centric software development approach, importance of good document writing, team work, knowledge sharing are only a few of what he instilled in our team. He understands the industry trends and from a bird’s eye view can tell which one is appropriate to adapt with and which one should be only studied and left in the buzz. We need more mentors like him in our software industry. I invite you to go through the whole session and share your feedbacks with me.

Directly download from:

http://www.sqabd.com/files/Mentors/Episode1-Mentors_SQABD.mp3

http://feeds.feedburner.com/~r/mentors/~5/87717612/Episode1-Mentors_SQABD.mp3

Jess & Rule Based Systems

Filed under: Java — ashikuzzaman @ 3:25 am

Recently I worked on JESS, stands for Java Expert System Shell, in Philips Motiva project which is a remote patient monitoring platform. We use Jess for decision making support in Motiva to make it an intelligent system. I can’t think of learning JESS without reading its creator Ernest Friedman-Hill’s book JESS In Action. Ernest is also a moderator of JavaRanch. There are alternate rule engines available – Mandarax, QuickRules, Drools, ofbiz, JRules, Haley Rules Products, Common Knowledge.

While working with JESS, I have developed a sample prototype to use the basic language syntaxes of JESS. The program is as follows. It shows usage of basic Jess language sytanxes, if/then/else, while consturcts, bind, list etc. The programs gives an overview of chess borad game and its pieces.

JESS ON CHESS

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Jess On Chess
;; Developed By: Ashik Uzzaman
;; Aug 22, 2006
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; this is jess
;; working on chess
;; i hope its
;; not quite a mess
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(printout t “
=========== Start of Jess On Chess. ===========” crlf)

;; what is chess?
(printout t crlf
“**** What is Chess?
Chess is an abstract strategy board game and mental sport for two players.
The object of the game is to checkmate the opponent’s king.
This occurs when the king is under immediate attack (in check) and
there is no way to prevent it from being captured on the next move.” crlf)

;; declare squares
(printout t crlf
“**** What is Chess Borad?
Chess is played on a square board of 8 rows (called ranks) and 8 columns (called files), giving (* 8 8) = ” (* 8 8) ” squares of alternating light and dark color, which are referred to as ‘light squares’ and ‘dark squares’.” crlf crlf)

(bind ?row# 1)
(bind ?column# 1)
(bind ?maxrows 8)
(bind ?maxcolumns 8)
(bind ?files (create$ A B C D E F G H))
;; ranks in chess are 1 to 8 so not declaring any list for them

(while (<= ?column# ?maxcolumns) do
(while (<= ?row# ?maxrows) do
(printout t (nth$ ?column# ?files) ?row# ” “)
(bind ?row# (+ ?row# 1)))
(printout t crlf)
(bind ?row# 1)
(bind ?column# (+ ?column# 1)))

(printout t crlf
“**** How many light squares are there?” crlf)
(printout t “(/ (* 8 8) 2) = ” (/ (* 8 8) 2) crlf “The light squares of a chess board are….” crlf crlf)

(bind ?row# 1)
(bind ?column# 1)
(while (<= ?column# ?maxcolumns) do
(while (<= ?row# ?maxrows) do
(if (= (mod ?row# 2) 1) then
(if (= (mod ?column# 2) 0) then
(printout t (nth$ ?column# ?files) ?row# ” “))
else
(if (= (mod ?column# 2) 1) then
(printout t (nth$ ?column# ?files) ?row# ” “)))
(bind ?row# (+ ?row# 1)))
(printout t crlf)
(bind ?row# 1)
(bind ?column# (+ ?column# 1)))

(printout t crlf
“**** How many dark squares are there?” crlf)
(printout t “(- (* 8 8) (/ (* 8 8) 2)) = ” (- (* 8 8) (/ (* 8 8) 2)) crlf “The dark squares of a chess board are….” crlf crlf)

(bind ?row# 1)
(bind ?column# 1)
(while (<= ?column# ?maxcolumns) do
(while (<= ?row# ?maxrows) do
(if (= (mod ?row# 2) 0) then
(if (= (mod ?column# 2) 0) then
(printout t (nth$ ?column# ?files) ?row# ” “))
else
(if (= (mod ?column# 2) 1) then
(printout t (nth$ ?column# ?files) ?row# ” “)))
(bind ?row# (+ ?row# 1)))
(printout t crlf)
(bind ?row# 1)
(bind ?column# (+ ?column# 1)))

;; declare team
(bind ?teams (create$ white black))
(printout t crlf
“Two players represent 2 teams in a game ” ?teams ” and tries to win
by killing the opponent king which is know as “checkmate”. Depending on
success to checkmate the opponent king or saving one’s own king from
checkmate by opponent, a game may result in win, loss or draw.” crlf)

;; define there are 2 types of team represented by color – white and black
(bind ?team-members (create$ king queen rook bishop knight pawn))
(bind ?member-numbers (create$ 1 1 2 2 2 8))
(bind ?member-descriptions (create$ “the invaluable member of team” “the most powerful” “other major pieces that move straight” “minor pieces that move diagonally” “other minor pieces that have interesting movement” “the cheapest members of the team”))

(printout t crlf
“Each team has the following members ” ?team-members crlf)

(bind ?count 1)
(while (<= ?count 6) do
(printout t crlf (nth$ ?count ?member-numbers) ” ” (nth$ ?count ?team-members) ” – ” (nth$ ?count ?member-descriptions) crlf)
(bind ?count (+ ?count 1)))

;; define that there might be empty squares or occupied squares
(printout t crlf
“A square may be occupied by any one member of the 2 teams.” crlf)

;; define that no square can be occupied by more than 1 member
(printout t crlf
“But no square can be occupied by more than 1 member.” crlf)

;; define that no member can occupy more than 1 square
(printout t crlf
“Also no member can occupy more than 1 sqaure.” crlf)

(printout t crlf
“**** So what is the total number of memebrs occupying the chess board?
The total number of sqaures – (* 8 8) = ” (* 8 8) crlf)

(printout t
“The total number of white pices – (+ (+ (+ (+ (+ 1 1) 2) 2) 2) 8) = ” (+ (+ (+ (+ (+ 1 1) 2) 2) 2) 8) crlf)

(printout t
“The total number of black pices – (+ (+ (+ (+ (+ 1 1) 2) 2) 2) 8) = ” (+ (+ (+ (+ (+ 1 1) 2) 2) 2) 8) crlf)

(printout t
“The total number of pices combinedly (black and white) – (* (+ (+ (+ (+ (+ 1 1) 2) 2) 2) 8) 2) = ” (* (+ (+ (+ (+ (+ 1 1) 2) 2) 2) 8) 2) crlf)

(printout t
“The total number of empty squares at the start of the game – (- (* 8 8) (* (+ (+ (+ (+ (+ 1 1) 2) 2) 2) 8) 2)) = ” (- (* 8 8) (* (+ (+ (+ (+ (+ 1 1) 2) 2) 2) 8) 2)) crlf)

(printout t “

=========== End of Jess On Chess. ===========

this is jess
working on chess
i hope its
not quite a mess” crlf crlf)

Blog at WordPress.com.