Sunday, December 05, 2004

indoor volleyball and basketball

Ever since the beach volleyball is over, I have been playing indoor volleyball and basketball every Sat afternoon. It has been fun and will end this season next week. I will be on vacation/time off soon:-).They approved my time off and I could spend my chinese new year in china with my parents this time. fell pretty cool and excited. I plan do some travelling.

last night went out for dinner (YunNan style). Then we played poker and "killer" game at a friend's place. He finished his contract and go back to Beijing next week.. should be loads of fun over there. I will probably see him in over a month over there. o well it's wierd last night that a few us has been playing "killer" on and on, me 4 times, then playing "cop" 2 times.. some ppl never did.. odd as it is. had to take 5-6 shots of hard liquor. going down my throat and burned right to my stomach.. eventually feel sleepy and all went home.. haven't had this 65 % liquor for a while.. it is good and I sleep till 10:00 and no need to go work or give a ride or sth...good feeling.

Friday, December 03, 2004

Pytion is not java

Python is not Java!

I like what he said: stop writing too much code . I will add: stop thinking too much code

Tuesday, November 30, 2004

hackable software is about control over code

Then hackers like UNIX while the rest loves Windows. However Windows is morphing itself into a UNIX kernel with its window system. Why? It is because it is statically hackable in UNIX thru shell script, pipe etc. That give them more control.

Open source software and UNIX have a common characteristic: hackable. For UNIX, it appears hard to hack for a starter. Windows seems go the other way. But once you master C, a few shell script language then everythings seems downhill from there.

And the hackers like open source just because it is hackable. The more hackable the software is, the more control hackers over it. The software (actually requirements from human) is a live form that keeps changing dynamically, to maintain sth. like that you need it be hackable, either staticlly hackable or dynamically.

Wednesday, November 24, 2004

feather linux's working sweet

http://featherlinux.berlios.de

pretty sweeeeet as tiny as 60M. I've tried it on my Thinkpad and desktop from a CD. Both worked. It even gave me a different ip address (DHCP) other than the one assigned at work.

I'd like to make a small linux distribution for programmer only, just gcc,perl,python, tcl and shells, netcat, nmap and a few other networking tools. will do that in my spare time:-).

http://www.sysresccd.org/ is cool too for resucuing the Linux/Windows, i will burn 1 CD tonight and see how it works.

http://www.knoppix.net/ is for Knoppix distribution.

The Feather Linux article is a good one.

Tuesday, November 23, 2004

an interesting observation

After reading an interview for HPING creator , I 've learned quite a few networking tools are created by Italitan devleopers such as the one used in Matrix Reloaded(NMAP). It also reminds me of how Python and Linux get created in Europe. o well Perl and GNU comes from America, however I think Python and Linux are more important nowadays. What drives inventions by individual in computer technology?

Most of technological advances happened in America seem to come from well funded organization's team work. For instance, Bell labs invented UNIX, Berkeley for BSD, Xerox Parc for GUI and Ethernet, MIT for X window, with one exception of Larry Wall'sPerl. With my personal experience as working in both in US and Canada for years, my humble guess is most developers here like to get paid for their work. Getting paid is a good thing, however the idea of it also hinders the great invention by individual, so most of inventions in I.T are done by large team instead of talented individaul. Why do we like to get paid for the software we wrote? I think it's due to higher pressure level living in America.












home automation links

I'm thinking of give it a spin and maybe add a Python API, then some CLP.

career move?

I am thinking about what kinda of company should be right for me and make me happier at work.

For a long time (a little over 10 years) I have mostly worked with small or large organization such as start-up, banks, insurance company, big I.T firm. Sometimes I have to cut my resume shorter since the fast changing jobs during dot com boom. From 1994-2001, almost all the projects are brand new, i had chances to practice my design skills, it is fun, cool and rewarding. After 2001, things have changed, every job I took is like fire fighting, trouble shooting, I am more and more towards into all-in-one firefighter. I feel tired and bored, like to rant more than ever. I am checking out Google labs now, other places who uses Python/C as their major programming language. It seems most talented and smarter people like to work for Amazon, Google and Yahoo type. That might make them happier than working with company drones and million dollar going-down-the-toilet projects.

Based on my experience, i have two ways out of this dilemma. One is to find a travelling consulting job and keep doing what I am doing, but keep the firefighting short and brief, earn better bucks, take another 3 months off to somewhere exotic and fun and collect myself for brain damage for the previous 9 months. The other would be totally forgot what I've become, find a cool company like Google and start a new career working with smart ppl.







Monday, November 22, 2004

add links

finally I got some time today to add my frequent visited links to my links. it will make it easier for me to navigate them.

Thursday, November 11, 2004

some typical WAS HA configuration

For a typical WAS HA architecture, it's sth like the following:

WTE(Caching Proxy)<---->ND (Network Dispatcher)<-->multiple IHS <---> WAS cluster (vertically cloned WAS) <--> DB2/MQ

Each one occupies a physical machine. Pretty expensive cost, multiple points of failure if not set up correctly, each one performs its own function.




HD enclousre works like a charm

I bought this Powerdata HD enclousre 2.5" for $14.99CAN and 1 year in store warranty. It 's pretty darn fast and I'd copied 900M in about 5 minutes. I like this design since it's pluggable and I can still use my notebook HD for other purpose.

Tivoli Performance Viewer jumpstart hack

TPV turns out to be a usable tool for PD and performance monitoring. At once I used it to find if a suspicious EJB method has been called. That really helped our dreadful deadlock hunting in WCS.

If you happen to have a WAS 5.x installed but without TPV installed, you can just copy from someone else's WAS with TPV by doing the following:

1. copy tperfviewer.bat/.sh to the $WAS_HOME/bin
2. copy perf*.jar, pmi*.jar, chart.jar (KL group's chart widget) to $WAS_HOME/lib.

I call it jumpstart since it 's like copy some files from the working one to the non-working one.

Now you are ready to fire it up like "tperfviewer ", soap port is 8879 for WAS ND by default.




Tuesday, November 02, 2004

Murphy's Love Laws

1. All the good ones are taken.
2. If the person isn't taken, there's a reason. (corr. to 1)
3. The nicer someone is, the farther away (s)he is from you.
4. Brains x Beauty x Availability = Constant.
5. The amount of love someone feels for you is inversely proportional to how much you love them.
6. Money can't buy love, but it sure gets you a great bargaining position.
7.The best things in the world are free --- and worth every penny of it.
8. Every kind action has a not-so-kind reaction.
9. Nice guys(girls) finish last.
10. If it seems too good to be true, it probably is.
11. Availability is a function of time. The minute you get interested is the minute they find someone else.

Monday, October 25, 2004

Tuesday, October 19, 2004

a simple Jython timing function

for any func i'd like to time in Java, I can use it with a call

print 'foo takes=',mytime(foo,[bar1,bar2,..barN])



# a higher order func
def mytime(f,args):
start=System.currentTimeMillis()
f(*args)
end=System.currentTimeMillis()

return end-start


Wednesday, October 13, 2004

write tools in Jython

It should work with other JDBC drivers. Wrote this article at the beginning of year as a result of making my working life easier.

english
   
chinese


Thanksgiving long weekend flu

i 'd been coughing lately. half of ppl around me are coughing.. must be flu.. weekend is even busier than weekdays... toronto has a crazy night life for asian ppl.. karoke, late dinner, drinks,friends known and unknown.. just like old times.

Friday, October 08, 2004

the design of CLP

Today I took a quick look at WSLT (from BEA) as a scripting solution (written in Jython) for WebLogic admin tasks.

For the last couple of days, I implemented a mini CLP for some WAS DynaCache cache. It is simple and quite extensible. I followed the DB2 CLP design.

This brings me an interesting thought on this issue.
Which way is better?

#1: design CLP commands only in a list of string seperated by white space characters and let
platform shell to take care of flow control, variable,name space if any.

#2: a full scripting language such as WebSphere 's wsadmin and Weblogic's WSLT. It provides flow control, variable, etc. That's why Jacl or Jython has been directly exposed to the end user (i.e. administrator).

Personally, i think #1 is better in that after a while, I don't need to look at the command reference any more. If I want to control it, always go back to my favorite shell. Secondly, for anyone who don't know Tcl or Jython (as most admin from Perl or Shell) syntax well, to look up the reference is pain in the butt.

DB2 CLP design gets this right: to keep simple things simple.

Victor

Wednesday, October 06, 2004

automated QA tools using Jython

1. Grinder 3

http://grinder.sourceforge.net/g3/index.html

2. PushToTest

I've evaluated both of them from a user's perspective. I am a developer who has expericence with Silk Performancer.

Here are my opinions in summary.

  • It should provide a higher level API than writing Jython. Silk Performance BDL has a better design on this although it's somehow akward Pascal syntax. IMHO, Jython can be used to parse and eval the higher level API easily, I did this myself for writing a mini command line processor in my project, it can turn a cmd,A1...An into a function call (API) of cmd(*args). pretty cool. 1 liner of lamba function.



  • It looks like Proxy server is very popular in implemening this technique.
    The recorder 's proxy can be improved to support HTTPS. Only 1 certificate needed to install btw the browser and the proxy server for Java solution.
    Silk did better job to bypass SSL layer i think. pretty cool too.



  • The GUI is sluggish written in SWING. should use IE/browser or rich client in SWT.













Monday, October 04, 2004

things to learn in the coming month till Xmas

Try to squeeze time daily to learn

o Objective Caml.
just download it.

o Job related
more Struts, a bit more WCS maybe




Tuesday, September 28, 2004

a chat with Tao

I had a chat this morning with Tao ( a coworker at Sun). He works for TD now and a super smart guy. He is so good at Perl now and write Perl code without referencing to the manul. He loves writing closure in Perl 5.

We both are interested in functional programming. He points me to OCAML www.ocaml.org, a ML style language. I came across it before and I think i will start learn it once I've time.

Monday, September 27, 2004

four challenges for me

I had a thought on the continous learning efforts in this career.


1. learning from Technology.

It requires me to master at least 7 major languages (C, Perl, Python, Java/C++,Lisp,SQL, ksh) and other mini languages like HTML, Sed,AWK,PHP, ASP, VB, JavaScript etc. Without them, you can't see the whole picture and will never able to design an useful language by yourself.

In addition, a solid hands on experience with different OS, networking protocols, and those well-written books from Richard Steven.

Right now, I am pretty much at half way of being the master. I am pretty fast learning but need time to focus on details. It is no easy task. Sometimes I feel like a ShaoLin monk having to spend all his life to become a master in one of their (1/72?) fighting techniques.


2. learning from Product

It requires me to learn all popular products on enterprise levle such as WebSphere, WebLogic, DB2, MQ etc.. as well as Open Source level such as Apache, Tomcat, Struts, Velocity,Maven etc.


If you get deeper into this, you will see why they design it that way, practical or not. It is this part of design reverse engineering that makes it interesting besides looks good on resume. Sometimes, it is popping up in my mind I saw this happened somewhere, maybe I can reapply it over there. The product innner knowledge does get you smarter since it is the product of other smart people if it is proven to be popular:-).




3. from Business domain
Basic understanding of eCommerce, finance etc is necessity

4. from People
How to deal with different people at work. People are different.



Wednesday, September 22, 2004

interceptor pattern

It is used at least:

o WAS DynaCache

o EJB

Wednesday, September 15, 2004

funny comments about Java developers

http://www.linuxworld.com/story/44251_p.htm

I laughed my head off when he is talking about how tedious to take a dinner/lunch.

eye opener for me

This is from Steve Tilkov's blog.
"What basically determines whether a language is useful is whether it can be used to solve real world problems efficiently. And this, in turn, depends very much on the libraries available — and the only chance for any language to compete with Java or C# is if it’s based on the JVM/CLR
"

I hold the same view for a while. That is why I'm interested in Jyhon as vast libraries Java has. Now I wanna know about add LISP like features on JVM such as macro.

a good book from MIT

“Structure and Interpretation of Computer Programs” http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-4.html#%tocstart

Wednesday, September 08, 2004

WAS DynaCache

It is from IBM research to cache pages in fragment or in full.
An interesting idea to do caching on view (MVC term) level.

However one thing bugs me is their cachespec.xml. I think the rules (cache rules, invalidation/dependency rules) described in XML are not very clear, esp. missing a 1 liner of condition (logic expression) expression that telling us when to cache and invalidate. It is quite tedious to read.
The right design to make it easier and readier is to use 1 liner logic experiession like BNF syntax. XML is just used for encapsulation only.


Friday, August 27, 2004

WCS WAS admin vs. DB2 CLP

Just happen to read those shell scripts under $WAS/bin, $WCS/bin. One thought came to me is DB2 got admin part right. WAS forces the administrator to learn TCL syntax to write admin program while DB2 provides a sematically higher level inteface to DBA. IMHO, WAS should provide a similar higher level interface (at least easier to remember) and use TCL as implementation only, not as interface.


IT career and hacking

Suddenly a flashback to my days at GVU center, Georgia Tech. I happened to know a few good hackers there. That was 1993-94. The inspriation of those ppl on me are quite positive. From that time, I knew they were using FreeBSD, C, C++ and Python, and they built the kernel from the source code. I was doing some Tcl/C stuff on SunOS myself. After so many years, I still feel their hacker spirit smelling like flowers in springs. I admit I missed the days like that.

After 94, I've met lots of smart ppl at work. However they are not hackers, they are more into how to design things right and efficiently, instead of curuosity driven playing with toys. Since I got paid for working for big bank, big names, it is the career path I took. Bascially working among most of company drones with accasionaly bumped into some smart ppl but no hackers any more. However I am still curiosity driven, such as learned Python, Jython and loz of other things along the road. It is painful sometimes you work with drones since you need to talk in the language they can understand. Surprisly, I am a very good teammate and get along with everyone. I think it is because I know they want me as a helper, touble shooter, a developer. But I know deep inside me I like to be a great hacker, who is always curious and learning about things that I dunno about.

This year (2004) has been quite an interesting year for me in terms of updating loz of IBM product experience such as DB2, WAS 5, WSAD 5, MQ 5.3. It is like hacking sometimes, you need to read loz of docs, play with loz of toys, then suddendly had an idea or two on how to do things better. That drove me to wrote a tool for WAS, an article for DB2.

The years at GIT really helped me to develop a long term attitute towards my career. And those guys really inspired me to create more fun at work.







Wednesday, August 25, 2004

IBM Websphere class loader tool (CFT)

This tool comes from the real experience of WAS 5 class loader trouble shooting I've been thru. I've been doing some support for the tool CFT at Alphaworks. Its feedback is pretty positive. The tool itself is written in Jython and Java on top of Mbean API. It took me a while to coin up the whole idea.

I am glad this tool makes some people 's life easier. It is fun to have an idea, make it work and support it.
I added some functions customers wanted and send out the update to IBM.


LDAP over SSL with Jython

I wrote a tool for testing LDAP bind,serach with IBM IDS, MS AD.

It is useful for troubleshooting (with turning JSSE tracing on) and helped one of my coworker to slove his AD problem which turns out to be a SSL cert problem.

Things that are interesting:

1. I used a local trust store instead of messing up the JRE's cacerts.
System.setProperty("javax.net.ssl.trustStore", "mycerts")

2. LDAPS uses 636 as default port.

3. I use Jython for gluing java code (JNDI/LDAP bind, search). My view of using jython is use as much Java library (JNDI provider in this case) as possible. The reason is simple, our applications are written in Java and I want to mimic the behavior of the applications as a LDAP client. Then Why use Jython? it is darn fast for me to change the code hence timer saver. So I can enjoy more life besides coding:-).


Monday, August 23, 2004

tricky EJB access intent proved uncool

A continuation of DB2 deadlock hunting revealed that the EJB container (WAS 5) generated a "UPDATE" for remote getter method (with no READ access intent) on the CMP entity bean.

Someone added an interface (with only 1 method) to the bean's remote but forgot to mark the method as "READ".

According to someone familiar with EJB container in WAS, the container will issue an "UPDATE" to DB2. This is the root cause of our extra UPDATE and actually caused deadlocks for us. It 's good to know and make me more frustrated and wonder why it has been designed this way. It doesn't seem be coming from EJB spec. sigh.. i guess welcome to the real and dark side of EJB which doesn't seem to be cool at all.

The complexity of EJB esp. CMP implementation can easily go beyond what average developer's brain can handle. I don't feel I'd love to program this way but being forced to.






Halifax

I've been there in April 2004. IMHO, A great college town ( with a lot less ppl than T) with friendly ppl (esp. chicks).

Just keep a tracking point here.
http://photos.yahoo.com/pythonrocks

a great weekend at Ashbridge

I have been internet "free" for the last weekend. I am trying to stay away from my PC except playing Empire Earth sometimes. For Sat. and Sun, I pretty much spent every afernoon at Ashbridge park playing B-ball and BBQ. we can still play for like another month at least. Then the summer will be totally over.

The bad thing about the the park and beach is too packed and there is a tournament every other week and made it even worse. sigh.. toronto has too many ppl living now.. it is funny to see those towtrucker are making quick cashes by putting cars on their trailer and a cop writing a ticket at the same time. They do work like buddies:-).

Monday, August 16, 2004

Fight club rules

1 - The first rule of Fight Club is, you do not talk about Fight Club.
#2 - The second rule of Fight Club is, you DO NOT talk about Fight Club.
#3 - If someone says stop, goes limp, taps out, the fight is over.
#4 - Two guys to a fight.
#5 - One fight at a time.
#6 - No shirts, no shoes.
#7 - Fights will go on as long as they have to.
#8 - If this is your first night at Fight Club, you have to fight.

Great Hacker

http://www.paulgraham.com/gh.html

The Python Paradox

http://www.paulgraham.com/pypar.html

Well said. I agree with him.

DB2 deadlocks in Websphere applications

I spent almost the whole last month trying to figure out root causes of some DB2 deadlocks. Finally I nailed them.

At first, it is hard to reproduce. So I used a tool called Silk Peformer to make it reproducable by stressing the application gradually. Then take a DB2 event monitor during running the script. The hardest part is to match WAS trace.log (by Java thread id) and the huge DB2 event monitor log (by DB2 application handle). Moreover, I got to talk to some developers who are familar with the business logic involved here to understand why it does that etc.

It is hard but rewarding to see why deadlocks happened. It will be nicer to have a tool for DB2 event monitor log. I want to see sorting by application handle and search by SQL statement too.

Steps for deadlock solving.
1.
Take a closer look at DB2 event monitor log, esp. how many applications has been involved. Draw a diagram whenever possible.

2.
Search the java/jsp code with deadlocked SQL and get a list of possible class and method involved.

3. we have been doing it bottom up, now go read Java code that involved in different threads. see if any Java/JSP that found in 2. are involved here.
Read WAS trace log to verfiy that.

4. There are two possibilities source of deadlock,
a. coming from application code. It can be verfied thru inserting a java
stack trace at the method level.
b .coming from EJB container.
It can come from unmarked "READ" (access intent) remote method.


Thursday, July 08, 2004

< img src="" > can be quite harmful

Lately I did lots of DB2 event monitoring, snapshot, Java dump on a troubled page. From the logs, I see 2 threads coming in as click on a href. Eventually I got suspicious with IBM IHS. Tailing -f access_log reveals 2 HTTP GET sent from a single a href.

Today we finally found the harmful <img src="">. It is inside a JSP which will post to /wcs/stores/servlet/. This will put a load on our DB2 esp needs a X lock on some tables.

One of my teammate who has been working on the projects told me she had known this problem for a year. She has no idea why an extra HTTP GET comes in. Now we know why.

Wednesday, July 07, 2004

java dump on AIX is useful

"kill -3 pid" and search for thread stack info. It takes a snapshot of Java threads. It helps me to know what happened on this slow loading page.


go back working 5 days

It is getting busier at work this week and I have to go back to work for 5 days.

Wednesday, June 30, 2004

IBM directory server 5.1

Finally got it loaded with sample LDIF and working on my W2K. In addtion, a JNDI client for simple bind, searching with Jython and ldapsearch is also working.

LDAP protocol is very popular these days. lots of large size projects are using it for user authentication and infos.
In my project, for the performance reason we use it for authentication and all the rest is done via a Web Service SOAP over HTTPS API.

I 've measured performance on LDAP over SSL. There are two types of LDAP connections: 1 persistent connection (looking for uid), the other is LDAP bind for user authentication. Reusing the first lookup connection is a good idea.

cherry picking

I will go cherry picking on July 1. Hope it will be fun cuz it is my 1st time doing it:-).

The web site is www.cherryavenuefarms.org.

July 1, 2004

I drove 1 hr and half to get there (very close to the Niagra Falls),
It was fun. However it took me 3 hrs to get back due to accident on QEW and regular & constant delay at 401 (constrution going on around airport). Politicans just don't care about the communters's pain. I figured they all fly by jets paid by tax dollars any way. Sigh.

Monday, June 28, 2004

Turn off WAS security with vi

for ND,
WAS Security setting is in:
DeploymentManger\config\cells\security.xml

we can turn off WAS by editing this security in case of admin console is not available.

DB2 Stinger going autonomic

http://www-106.ibm.com/developerworks/db2/library/techarticle/dm-0406zikopoulos/index.html

This is an interesting read and "autonomic" reminds me of Tivoli for DB2. I am not sure if they overlap each other in terms of functions. However screenshots in Paul's article looks like those in DB2V8.1 which I don't have positive experience with it on a decent desktop.

This might be a niche market for DB2 PD tools.

Thursday, June 24, 2004

Sat Beach Volleyball

I had a good time at Woodbine beach this Sat. This is my 3rd week this year to play beach volleyball. I am getting better and better. It is lotz fun.

Watched the "Troy" movie and it got a good fighting scene though I don't like whoever played the Helen. The actress doesn't look royal but a high school gal, maybe a more hooker like if we dress her properly:-).

Today I am working. I am thinking of vacation and travelling in China for fun once my contract ends.



home networking

Last Friday I spent 2 hours to set up my slackware 9.0 dual booting with Windows 2000, and set up a dynamic DNS account with NetGear router RP114. I love RP114's cmd line interface and it is much stable and faster than its IE interface. o well I had this router for so long and too lazy to set it up for port forwarding. Finally it works.

Now I can telnet/ftp to home at work. Isn't this just great?

Maybe I can start a sideline biz doing PC/linux support for some cash money since I am not working on Friday due to budget cut.

DB2 CLP vs. Oracle vs WAS

My guts feeling likes to keep simple things simple, but not simpler. That is why I like DB2 CLP. In Oracle 8i (dunno about it now), you have to admin things in SQL and you need to know the system catalog pretty well.

IMHO, Oracle has never been UNIX friendly. Its start/stop is based on SQLPlus, unlike most of UNIX daemon.

yes I like DB2 CLP in this matter.

Comparing to WAS admin (wsadmin), it has the folowing advantages:
1. Easier to write in UNIX shells, even in windows batch.
Therefore, if we design wsadmin this way, that means we need to define the command language like DB2 CLP, instead of use TCL semantics directly, we will only use TCL as implementation for the language. This will make this language easy to use like CLP, and easy to write in shells.

Microsoft optical Intellimouse

One of my friend suggested me to use Microsoft optical Intellimouse since I told him I've had pain in my right shoulder with the cheap mouse we had at work.

I will buy one today after work and hopefully it works a lot better than cheap ones. I will bring it in on Monday. Tomorrow is a day off and I will play some tennis.

Tivoli Monitoring for Transcation Peformance

I've seen a demo today for this. Not very impressed. But I know Tivoli is the way to go in the long run. Business drives the needs.

C vs. Java for Enterprise software

As current stage of hardware and OS performance, C is still the best choice for developing performance intensive applications like DB2 and MQ.

WAS has a much smaller set of functions to implment than MQ and DB2. Java is acceptable for middle tier server doing translations btw browser and backend.

IBM websphere bundle strategy

I've realized this today.
With WAS, IBM is able to attract customers to buy WSAD,DB2, Tivoli. Therefore WAS is the soul of the IBM software. For instace, IBM sells WCS bundle ( WAS, DB2, WCS itself) to its customers