Another great meeting. Got insights into some of the work that Joseph was involved in i.e. the enhancement of the Sunit framework. As we all know automated unit testing i.e. the Sunit framework which was then the model for Junits and others came out of the Smalltalk world. Personally, I learned a few things. For one, I had never taken the time to learn what TestResources do. In the past I used the TestCase subclass class to build resources that could then be made available for the TestCase instances. TestResources are more flexible and can be shared across different test cases. As has proven to be the case so far the informal discussions that arise at the bar are as interesting as the presentations. It also helps to have a local Smalltalk legend in our midsts to get those historical insights on the Xerox Parc days and the various Smalltalk personalities.
My Plight with Tight, part 2
Today I decided to look into using a minimal desktop manager and only start my VisualWorks application. I therefore changed my $HOME/.vnc/xstartup to look like:
!/bin/sh
# Uncomment the following two lines for normal desktop:
#unset SESSION_MANAGER
#exec /etc/X11/xinit/xinitrc
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
setroot -solid grey
/home/visualworks/scripts/startVWVirgin7_3_1.sh &
xterm -geometry 80×24+10+10 -ls -title “$VNCDESKTOP Desktop” &twm &
Unfortunately, I found that the window title bars and the desktop manager’s menus were not being setup.
After some struggle I discovered that for some reason starting the vnc desktop i.e.
$ > vncserver :3
after logging in as the user wishing to establish the vnc desktop would cause the problem. Instead if one logs in as root and then does an “su” to log into the user’s account in question, then running the above command will set things correctly. Mind you, one gets a warning about not being able to “lock root’s xauthority” file but it will eventually come back with a successfully established vnc desktop.
For some reason the xterm does not start however one can spawn a new one via the desktop manager’s menu.
Perhaps a more Linux / VNC savvy reader can explain the whys. Typically, if using for example a gnome desktop there are no issues at all with the user’s desktop owner actually issuing the desktop instantiation command. BTW, I also made sure that the twm startup files (usr/X11R6/lib/X11/twm/system.twmrc by default or just .twmrc if under the user’s home directory) specified window borders (ClientBorderWidth “10” ) and even included one under my home directory but again to no avail.
At least the above workaround gets me back on track to what is most important i.e. development using VisualWorks Smalltalk. Hope this helps any other Smalltalker contemplating getting on the same boat with TightVNC or VNC for that matter.
My plight with tight
Lately I have been struggling with configuring TightVNC both at work and at home. TightVNC is a spin on VNC (Virtual Network Computing). Think of remote desktops , terminal services etc. The scope included making things work with VisualWorks and making things work in both Linux and Windows. After some pain I found out that there are three ways of using TightVNC:
- Like terminal services
- Like a remote desktop ( remote control)
- Like this private X space you can setup for yourself
Like Terminal Services
If one setups VNC as a xinetd service then the result is that VNC will behave like Windows terminal services. By this I mean that every time one attempts to connect the user is prompted with the Linux desktop’s login screen. These sessions are not “shareable” i.e. their is only one active user which is the user that logged in. Info on how to setup VNC as a “xinetd” service can be found here. On Windows I did not find a way of using TightVNC in a terminal services type of way. Instead, when one connects to a Windows box using TightVNC one is actually on the current Windows desktop i.e. under “remote control” or remote desktop mode.
Like a Remote Desktop
The default when hooking up to a Linux TightVNC server is not to hook up to what is called “display 0” i.e. the current X console running on the box in question. Therefore this means that one cannot right off use TightVNC to support “customer service” scenarios. In our case that works out fine, our users are on Windows PCs and the servers are either on Windows or Linux. So for us TightVNC’s primary purpose will be to connect to TightVNC servers running under Linux. However, if one has to connect to the user’s console i.e. if running Linux then that is apparently possible.
Like this private X space you can setup for yourself
This is to me that most useful mode. Effectively, one setup a private X console/desktop where one can spawn applications. When one exits the TightVNC viewer said private desktop does not go away. Therefore when one reconnects one still has access to the spawned applications. Since said apps are running in an X desktop one then can deploy headful apps with all the necessary GUI based tools which can include partial to full development environments. I know of three companies deploying their Smalltalk apps in such fashion. I also deploy the NYC Smalltalk wiki under VNC. It works great. The capability to debug production issues is greatly enhanced using this strategy.
Security
Neither TightVNC nor VNC are inherently secured. However, one can use SSH tunneling to secure VNC. More information can be found on www.realvnc.com faq. I also saw a readme file on how to use Stunnel to do the same. Also one can use a minimal desktop such as TWM and only spawn the desired applications. TWM just provides the necessary window and user input support i.e. there are no admin tools available such as those found in a Gnome desktop for example. Additionally, the desktop exposed can be under a specific user with very specific rights etc. The TightVNC session does use password authentication and of course one can add authentication at the app level as well.
Other Issues
I thought I had issues with running VisualWorks 7.3.1 from a Linux based TightVNC server. Happy to report that is not the case. Well, I did have a problem with certain images going into a free fall upon startup i.e. they would not get past the splash screen and would just start gobbing up all memory. To be honest I don’t have all my facts worked out. My current theory, is that base virgin images extracted via the Gnome Archive manager somehow become corrupted in such a way that starting them in a VNC session throws them into a loop. Once I replaced the faulty image with the base virgin image that is provided with the VisualWorks installation things just worked fine. BTW, for those who live in Windows most of the time , be aware that there are a couple of extra steps to do in Linux to make an image usable. Read the install.pdf.
Conclusion
I am now quite happy. Connecting to the office in New Jersey from my home in Forest Hills, NYC works quite well. A tad slower but even browsing and working with the development tools feels like almost there. Now, I don’t know how it would work out if I had to connect to the Netherlands but for now VNC is doing everything that I expected it to do and more and it works very well with VisualWorks. I don’t know if TightVNC is really any better than RealVNC but don’t really care either way, at least for now.
Katrina’s sneeze
The picture to the right is of my brother’s backyard after Katrina paid South Florida a visit. Some in that area of Davie/Ft. Lauderdale went without power for almost two days. My brother still has not had his phone service restored. I was able to call my Dad though. Of course, compared to what Lousiana and Missisippi are going through Katrina was merely an inconvenience here. My family including myself lived through Andrew which I belived up to now was the biggest or at least most costly hurricaine to hit the U.S. Andrew was a category 5, Katrina made landfall at category 4 levels but a much bigger storm and therefore a much bigger mess. The nightmare is yet to begin. I was not able to move back into our home for about 10 months. The insurance relief is not quite enough and not very timely. There is a ton of red tape and life does not just wait for you. Whatever plans, goals one may have had may have to be put on hold for a while. Hurricaines are not huge killers at least not in the States but they can very definitely bump you and your plans off path and getting back on track can for many be very difficult.
These things are really getting out of hand, we are already up to the K’s and we have not yet passed Labor day.
Making your filenames work in Linux
So I am in the middle of porting the NYC Smalltalk servers to CentOS. One of the issues that I ran into is that in Windows I setup the “start in” directory for the images (VisualWorks images i.e not gifs, etc) that I launch to be the directory where the image resides. In Linux I did not know how to do this. As a matter of fact, some folks that I know did not know either and build their own mechanism for resolving filenames. However, I want simply for code that worked in Windows to work in Linux without change or without changing the respective file locations.
Basically I wanted for the following to be true:
Given that ‘blah.txt’ exits in the same directory as where the current image exits then the following should be true:
(ObjectMemory imageName asFilename directory) = ‘blah.txt’ asFilename directory.
Well, thanks to one of the member of the VisualWorks Non-Commercial List I was able to to as much. The answer is simple: “change to” the working directory in your shell script to be what you need. This exactly what we do with a Windows shortcut except that in Linux we use scripting. So for example my startup script looks like this:
VISUALWORKS=/apps/visualworks/vw7.3.1
export VISUALWORKS
cd /apps/visualworks/vw7.3.1/image/wiki
/apps/visualworks/vw7.3.1/bin/linux86/visual /apps/visualworks/vw7.3.1/image/wiki/visual.im
Hope this is useful, it sure saved me some headaches.
[Presentation] SUnits and Test Driven Development
Joseph Pelrine will be presenting at NYC Smalltalk on September 14th. Same place same time. A post in comp.lang.smalltalk and the NYC Smalltalk yahoo groups will follow. It will also be announced on our wiki shortly. Anyhow here’s the heads up, it should be an interesting presentation.
Abstract:
Rarely have 3 classes and a handful of methods changed the face of software development more. SUnit, first described in an article published in the October 1994 Smalltalk Report, was an instrumental part of eXtreme Programming and its offshoot, Test-Driven Development. It has also spawned a legion of clones for other languages.
The last few years have seen a number of powerful features added to SUnit, features whose use isn’t all that easy to understand. In this talk, Joseph Pelrine, current maintainer of the Camp Smalltalk Sunit project, will talk about the past and present history of SUnit, the reasons behind the new features, and will show a number of handy tips and tricks which can be used to turbocharge your testing.
Bio:
Joseph Pelrine is C*O of MetaProg, a company devoted to increasing the quality of software and its development process, and is one of Europe’s leading experts on eXtreme Programming as well as Europe’s first certified ScrumMaster Practitioner and Trainer. He has had a successful career as software developer, project manager and consultant, and has spoken about it at such diverse places as IBM, OOPSLA and the Chaos Computer Club. His work in organizational complexity has led him to currently focus his interest on the Cynefin sense-making framework and its application to Agile processes.
CentOS
Its late and I’m tired but I had decided a while back that I was going to port my servers to CentOS and tonite’s the night, everything is going to be all right. Well let’s hope. The cd is cranking but it seems sluggish in taking me through the graphical installation wizard. Ok, it is not happy about something. Maybe the graphical installation option was not the right decision.
Ok, I now opted for the “linux text” installation option and this is going through the options much quicker. This is also the option that I have used in the past with Red Hat. It has that ole Clipper / Paradox look to it. In the meanwhile I had made sure to move my wiki to my other Windows box and change the port forwarding tables on my router. However, I forgot that I had been supporting some of my blog posts images with an Apache server. That directory is now gone i.e. since I clobbered it with the CentOS installation.
I wonder how much of a dent CentOS is making into Red Hat’s Enterprise business. We use RHE at work and so for me it does make sense to use CentOS for my personal needs.
For those of you who don’t know CentOS is basically free Red Hat Enterprise. I don’t like the idea of not paying for things. Yes, I’m weird that way so If CentOS works out for me I’ll probably PayPal them about $50.00 per year. I recently purchased an inexpensive clone with an AMD Semprom board overclocking at I believe 3200, with 512 mb ram for less than $300.00. Its pretty amazing to me that one can very inexpensively setup a viable cluster. Reliability can be a matter of redundancy as opposed to dropping a lot of cash on HP blades.
Ok, the installation is finished. Gnome looks much better from what I recall last. I had switched to KDE sometime ago. What is cool about CentOS is that it has an update service such as RHE.
Now, I just have to get VNC to work from my Win XP notebook to the Linux boxes, install VW , Postgres, Gemstone and look into switching from SmallWiki to the WikiWorksForSSP framework. Not tonite. I keep nodding off , I’ll go to bed once I confirm that the packages updated without issue.
The Guy Upstairs and his DNAs
Mike has what seems to me to be a very cool job and yet it can get very morbid. I first met Mike the Spring before 911 when he and his wife moved in upstairs. Mike works for a DNA lab/consulting outfit and it was his firm that ran the mammoth job of trying to identify via DNA the remains of all the poor souls that lost their lives on that horrible day. Well, that took what seemed forever to me but the gory truth is that there were a lot of samples to identify. Then the Tsunami hit which dwarfed the death toll of 911 and yes Mike was sent to Thailand to help with that. A different problem though the DNA was really spread out and most of it at sea.
I bumped into Mike yesterday as I was taking off my shoes before going into the house after throwing the ball at the park with my Rhodesian Ridgeback. I said to him , “ I noticed you all took a little vacation last week.” “Oh no” he replied , “I was sent to London to work on the bombings” . “What is this with you following death” , he smiled “death follows me”.
And yet I would love to build an app to help with this. Ever since I read about Watson and Crick’s work I have been fascinated with anything related to DNA.
As far as Mike I wonder if he has nightmares or is he now just jaded?
Opentalking the Database – Ch. 1: The Need
Version: 1.0
The Requirements
- Eliminate the need to install database specific components on end user PCs.
- Do not change application code however refactor where needed. The goal is to make changes to the access of the database transparent to the application.
The Solution
Employ Opentalk ST-ST to proxy database connections/sessions.
Background
The application which does what it does well uses the “direct SQL” methodology for interacting with currently an Oracle database. Note that this application was built well before I had arrived. If things were up to me we would be using Gemstone but that is another story. Hopefully, Glorp will take the edge off but first we want to make it easier to deploy and manage the application.
So simplistically the idea goes like this:
Fig. 1
The Solution entails:
-
Configure communications
-
Try to minimize excessive chatter between proxy and real db session i.e. employ a “caching proxy” I’ll explain what I mean later.
-
Understand what objects are passed between the proxy and its target remote object in order to configure pass modes and decide what Classes may need to live in both spaces.
-
Understand what to do about exceptions and db errors.
-
Understand what to do about communications errors.
-
Test in a VPN
-
Try to stress test.
-
among other things …
More to come but I am out of time for this chapter.
[music] The Grande Passion
I finally caught up with Al Di Meola’s The Grande Passion. Ever since I bought my Ovation guitar I have been more interested in the albums DiMeola made with his acoustic group World Sinfonia. For one I can relate to them better since I am exclusively playing on the Ovation and have not touched my electric for over almost a year. Also, this album is heavily infused with Tango influences and in particular the compositions and playing of Astor Piazzolla, a legend of Tango at an equal footing with greats such as Coltrane in the impact that he had on his contemporaries. As a matter of fact, along with this album I also bought Piazzolla’s Tango Zero Hour. I have not had a chance to listen to it yet but what is an interesting story is that I met one of the producers for that album while walking my dog around my neighbourhood. Their label specialises on Latin fusions. Check out their site: www.americanclave.com. Amazon has a sample of the music on the Grande Passion as well as commentary. Here is a direct link to a free download for Double Concerto.
DiMeola’s playing is great as usual but in many ways more passionate, perhaps due to Tango which is a very passionate and rhythmic form.