中国IT动力,最新最全的IT技术教程
最新100篇 | 推荐100篇 | 专题100篇 | 排行榜 | 搜索 | 在线API文档 | 网通镜像
首 页 | 程序开发 | 操作系统 | 软件应用 | 图形图象 | 网络应用 | 精文荟萃 | 教育认证 | 硬件维护 | 未整理篇 | 站长教程
ASP JS PHP工程 ASP.NET 网站建设 UML J2EESUN .NET VC VB VFP 网络维护 数据库 DB2 SQL2000 Oracle Mysql
服务器 Win2000 Office C DreamWeaver FireWorks Flash PhotoShop 上网宝典 CorelDraw 协议大全 网络安全 微软认证
硬件维护  CPU  主板  硬盘  内存  显卡  显示器  键盘鼠标  声卡音箱  打印机  机箱电源  BIOS  网卡  C#  Java  Delphi  vs.net2005
  当前位置:> 程序开发 > 编程语言 > Java > 测试
iostream of Consciousness @ JDJ
作者:未知 时间:2005-08-10 22:20 出处:Java频道 责编:chinaitpower
              摘要:iostream of Consciousness @ JDJ

I've been weaving these threads of cubist pseudo-consciousness for over a year now, and the consequences of such promiscuous international celebrity are really starting to get out of hand.

It seems as if I'm constantly handling "product placement" e-mails from big-shot marketing types, begging me to scrupulously avoid any mention of their products whatsoever. (They always add that "whatsoever" in there, as if I'd try to sneak something in on them. Well, you don't have to hit me over the head with an Uncle Bernie's Fine Cavalla mackerel!)

I've been up to my scalp in Java code again this month and have enjoyed many opportunities to reflect on its unique strengths and weaknesses. Most of these wool-gathering sessions end rather abruptly, as a build completes, a button needs pushing, or another blankety-blank test case blows bitwise chunks all over the logs. Reality intrudes with an indelicately echoed Ctrl-G, and it's another trip to the top of the E/C/D waterfall (and me without my barrel). I can't believe they pay me to have all this fun.

One thought that keeps recurring during these flights of javac-induced fancy is the very different nature of the bugs I find myself chasing and squishing in Java, compared with the other languages I've used (and I've used a few).

At the risk of dropping my pretentiously thin veil of false humility - the one you've seen through since day one - I must say I've cranked out some serious code since becoming a professional programmer, and there's no end in sight. Some of the popular languages I've used (and abused) include REXX, MASM, Tcl, awk, gawk, Perl, Pascal, Modula-2, C, C++, csh, and my favorite, Java (of course). At best, I've "mastered" maybe one or two of these languages at some point over the years. (Sometimes I imagine that Java belongs on my "mastery" list... then I wake up.)

Way back before this whole overblown "microprocessor" fad perturbed the orderly Hollerithic landscape of fanfold batch computing, I even programmed something called an "electronic analog" computer (and badly, at that).

Electronic analog computers are "programmed" using patch cords and panels, and I was not without innate skills in that area, even in high school. In fact, I was a natural. I'm here to tell you I could plug and unplug those patch cords lickety-split, thank-you-very-much.

Unfortunately, since I didn't have any idea which plugs to patch where, my results stunk (often literally, wafting an aroma of melting plastic insulation). I guess I should have paid attention to that Calc II prerequisite, after all.

With apologies to Henry Spencer (author of the "Ten Commandments for C Programmers"), perhaps there is an analog computing axiom/corollary/lemma for would-be OO programmers: "Be careful how you hook your objects together, lest they stink." Yeah, that quote will ensure me a spot in history. You betcha.

Anyway, analog computers are really quite remarkable. If you patch together the right combination of plugs, you can accurately and continuously model complicated parallel mathematical equations of many variables. To the extent that these mathematical equations correctly model an "analogous" physical system, the electronic system behaves just like that leaf spring, or that ambient vapor pressure, or that trout population, or that ICBM nose cone. (If you're interested in finding out more about analog computing, try dropping the phrase "analog computer" into your favorite search engine or visit Doug Coward's wonderful "Analog Computer Museum" Web site, http://dcoward.best.vwh.net/analog/.)

So far, I've yet to chase a pointer bug in Java, but that's not to say that it's all a bed of roses. For my part, I've found Java's principle sanity thief usually extends java.lang.Thread or implements java.lang.Runnable; thread synchronization bugs can be deucedly difficult to dispatch or dismember.

I remember a piece of multithreaded Java code missing some synchronization in a chained assignment statement:

inNdx = outNdx = 0;

It's around 4:00 p.m. on Friday when the call comes in: "We've encountered an ArrayIndexOutOfBoundsException that stinks like burning insulation. You didn't let Wyman near this code, did you?"

关闭本页
 
首页 | 投资与合作 | 服务条款 | 隐私政策 | 收藏本站 | 设为首页 | 新用户注册 | 免责声明 | 使用帮助
Copyright ©2005-2008 chinaitpower.com All rights reserved. www.chinaitpower.com 版权所有