Gemstone/S

If I had my way Gemstone/S would be a primary component of any enterprise application I was involved with. There is simply no better way of storing your objects that in an object database. Gemstone goes further since for one it also behaves as an app server. “Stored Procedures” are simply just good ole methods. One essentially gets to persist the object model. There is no painful object relational mapping but distributed objects between clients and Gemstone . Queries basically work the same way as iterating over standard Smalltalk collections work. There is of course, special optimised support for various uses but what it boils down to is that Gemstone is simply a much simpler way than the rdms based alternatives.

I was lucky enough to have spent over 5 years working with Gemstone on large enterprise apps for the utility industry. One of the apps involved using Gemstone with a GIS, which was a lot of fun. Gemstone is not “new” technology. It is just extremely current , relevant, modern technology. It has been used commercially since at least the early 90’s. Many strategic mission critical applications have been built with Gemstone. Florida Power & Light where I started my Smalltalk career uses it in a number of apps including their Emergency response system i.e. that which handles hurricanes. JP Morgan has a large bread and butter financial framework built with Gemstone. Right down the street from me a huge Japanese multinational uses Gemstone to support its transportation business. These are just a few examples.

Its been a while since Gemstone has presented to NYC Smalltalk. One of the most noteworthy news is that Gemstone/S is now 64 bit which just blows open many of the scalability thresholds for a system that was already very scalable.

Norm Green of Gemstone will present on February 1st, 2006. Please visit our wiki for further details and directions.

The transit strike from a New Yorker’s perspective

Unless you are here , there is no way that people can truly appreciate what is going on and therefore comments sympathetic or “understanding” of this strike will miss their mark and perhaps just plain piss people off. This is not just an inconvenience. This strike is really actually hurting people, they are spending money and time that they don’t have. In many cases lives are actually at risk, their health is at risk, daily life has become a torture. This is being done by people that have it pretty good comparatively speaking to the majority of “working class” people in New York, people who decided to break the law, who took advantage of the leverage that they have because of what they do. Imagine if cops decided to walk off the job. How about firefighters, nurses, teachers. They turned down a package that is better than most of other packages municipal workers have. That’s okay , it is their right to turn offers down. It is not their right to hurt the innocent in order to get their way. This is in fact an act of terrorism. One thousand TWU workers decided that what their organization was doing was wrong and returned to work today. The TWU’s parent organization must think it is wrong because they are not supporting the TWU. I have no doubt that it is wrong and no doubt that the Taylor Law is a necessary protection. Time will tell if it is enough in its current implementation.

How am I being affected? Well, I’m okay personally. I can TightVNC to work, I use Skype for daily meetings. Our bug tracker has a https interface etc. However, my wife works in retail and a strike on Christmas week will probably kill the chances of making her numbers for this year. The real issue is the personal ordeal of getting to and from work. She has it bad but many have it much , much worse.

Presentation: Object Oriented Algorithm Design

David Siegel will present next on Wednesday, December 7th, 2005. Here is the abstract and bio:


Abstract:

An introduction to a family of algorithms whose uses include approximate string matching, spelling correction, synchronizing sequences, and analysis of DNA and protein data.

Bio:

David Siegel has been working with objects for over twenty years. His interests include language design, algorithms, data structures, persistence and concurrency.


If I may I would like to elaborate a bit further on our colleague. David is one of our long standing regulars at NYC Smalltalk. As a matter of fact, many of David’s twenty years include quite a bit of Smalltalk and quite a bit of OODMS specifically Gemstone. Its probably accurate to say that he is “famous” for his work as one of the main architects on large Gemstone project but I’m not going to mention the name of said project since he does not bring it up.

Elegant OO designs in languages as Smalltalk can often make up for the brute force approaches that is typical to “closer to the metal” languages. Isolating the right algorithm primitives and implementing just those in an External C library can provide for an implementation that meets performance requirements but also one that is extensible. Of course, we believe that using Smalltalk just makes all of the above easier .

BTW, a great follow up presentation would be one that deals with the VisualWorks pluging framework i.e. that framework which allows one to code Smalltalk and then compile it to C and subsequently make it accessible to the virtual machine.

Directions to the meeting can be found on our wiki.

Waiting for Godin

Now isn’t that a pretty sight. Welcome the new member to my musical family, the Godin Nylon SA. Yes, its a nylon guitar with a beautiful lush sound of a classical / flamenco guitar. The electronics in the guitar , basically EQ boosts, allow you to setup for more Flamenco tones i.e. boost the highs to the richer medium tones of the classical nylon guitar but all amplified and built to play amplified and without the terrible feedback that one can get from mic-ed guitars or hollowed body guitars. Apparently, according to some of the artists using the Godin SAs one can go directly into a board and record beautifully. That in of itself is a compelling reason to have this guitar in one’s collection i.e. if one is into Spanish guitar / jazz / world fusion. The neck is a beautiful and extremely playable. Essentially, the neck of a steel string guitar. The fretboard is ebony which is the only wood I can really play on, so ebony is a must in my guitars. Folks, that is not all though. Far from it. What makes this guitar a particularly interesting guitar is that it was built from the ground up to be a synth controller. It has a built-in RMC hex pickup which can individually track every string. Every aspect of the guitar was built with trackability in mind. The woods chosen , the placement of the bridge, neck position , everything. Finally extensive testing particulary on Roland Guitar synths, make for a guitar that tracks very well. So not only will I now be able to sound like a sax but more importantly I will be able to drop some lines that my single hand keyboard skills can’t cut. Also instead of using a computer mouse to transcribe my melodies into software such as Finale I’ll be able to use the Godin to input notes directly into the notation software , Finale mostly.

I like to buy my guitars brand new. Mind you not that I buy many. The new addition has to serve a specfic purpose which is why I probably can’t see myself buying an electric guitar anytime soon. My Ibanez Artist has served me well for many years. The Ovation that I bought almost two years ago provides a very specific sound and also is more demanding. The Godin most definitely will serve a unique purpose. The nylon strings will also place a different demand on my hands which is all good. The playing of other types of instruments i.e. via the Godin will certainly require adaptation i.e. I can just feel a ton of new synapses popping up. But I digress, this time I did not buy this guitar brand new. I actually gave Ebay a try. I actually had purchased a guitar amp modeller (PodXT) through eBay but these type of things are different than guitars. Guitars are more like girlfriends which wife’s can’t rationally get jealous off. I get pretty attached to my guitars. I could never sell any of them. Anyhow, I think that I lucked out on this transaction. The guitar is only six months old, still under warranty, and depending on how one looks at it I saved anywhere from $350.00 to $450.00. I also bought it from a guitar player which makes me feel more comfortable i.e. not from some music instrument/ gadget pimp.

I must admit I’m nervous. I hope she has a smooth ride home.

Move over POD , there’s a new kid in town

When I drop close to $400.00 on a “mobile” digital media player I expect it to last a long time. Two years just ain’t enough. Well, that is just what happened. Just about two years after my purchase of the iPod the thing just crapped out on me. I really considered not going with the iPod at the time since there was at least one other unit which had great reviews but iTunes sold me. The fact that I did not have to commit to a monthly fee and that I could purchase individual tunes was key. Today, we find at least another service providing the same namely Walmart which sells their tunes for 88 cents and which seems for at least the music I listen (Jazz/World Fusion Guitar oriented) to have a comparable selection as iTunes. Also I bumped into a press release about Microsoft starting their own pay per song service which is great for the consumer. One thing MS has is pull and that has to mean better selection for the consumer. In anycase, it turns out that I don’t buy a whole lot. In the last two years it seems that I have accumulated about 150 purchased tunes from iTunes. In the same two years I probably have purchased about six CDs. Yet, I listen to music especially this past years for approx 30 hours per week.

Anyhow, now that my iPod is defunct, what am I to do? Drop more money on Apple after they let me down? No freakin way. Now, I get to study the issue and go for quality . Do the Research. The result is that I am going to give iAudio a chance. Specifically, I have purchased the iAudio X5L which has an unbelievable 35 hours of audio play , less if you watch video, supports Linux? What? Yes. Here are its features, all for the same price as the comparable iPod although not really comparable iAudio blows the iPod in features. The audio and general build quality are ranked as excellent. I guess I’m still mad about the demise of my iPod which must be why I took the time to copy and format the features list below. I have also inserted my comments where appropriate. I want people to know. There are also a number of reviews. One of the most comprehensive can be found here.

Features:

X5, with its super-compact slim design is not only convenient to carry, but also stylish with a high-quality aluminium external finish on most of the unit.

iAUDIO comes equipped with a 160 x 128 dot, 260,000 color TFT-LCD, which allows you to check the general operation status of the device with one glance.

It’s possible to convert various video files to MPEG4 up to 15 FPS using JetAudio. The transcoded video file can be played back on iAUDIO X5.

You can import photos taken from a digital camera to iAUDIO, and view them from iAUDIO using the USB Host feature of iAUDIO X5. (*Certain digital cameras are not supported.)

You can view both text and image files on iAUDIO X5. You can view text files while listening to music. There is apparently support for a scrollable lyrics display feature.

With the super huge storage capacity, this 20GB product can save approximately 5,000 songs (MP3 files — 4 MB each). iAUDIO X5 is capable of recognizing up to 2,000 folders and 10,000 files. The new models come with 30GB.

A super power saving circuit is used to provide a long playback time. A continuous playback of up to 14 hours is possible after a full charge. (based on the company’s test environment). Up to 35 hours with the X5L model.

It supports MP3, OGG, WMA, WAV files, as well as FLAC (a lossless compressed codec). The first player in Korea to support this format, and only the second in the world!

Create your own iAUDIO ! You can create your own logo or download logos from our web site. You can also set your own picture as wallpaper. Cute, I’ll probably have a picture of my dog there.

With the built-in, high-fidelity microphone, iAUDIO can record voice at the level of dedicated voice recorders.You can record important meetings or lectures using this feature. My composition/music mentor suggested I record our lessons , this will be a great feature for me.

iAUDIO provides direct encoding by which you can record output from an external audio device at a 1:1 ratio. This means that you can connect the recording terminal and the output terminal of an external audio device with a bi-directional stereo cable for recording. Using this feature, you can receive the direct input from audio devices such as a walkman, MD (mini disk), old LP phonograph, or TV, and record them with iAUDIO. Hmm, maybe I can rescue my investment of tunes in some proprietary format which can only run on specific hardware. Note, I do mean investment I have already paid for these.

Listen to FM radio and record it by pressing a button, instantly. Play them back on iAUDIO, or save to your computer. Also has a preset feature which allows you to save your preferred radio stations as channel numbers. Maybe a good way to scan for new artists although most of the Jazz fusion stuff seems to be lame and watered down soul-less.

iAUDIO is automatically recognised as a removable disk when you connect it to your PC via the USB cable. You no longer need a separate USB drive with small storage any more. There is support for Mac and Linux.


Discover true, rich bass sound.iAUDIO is the only mp3 player that provides exquisite sound with world-renowned U.S. BBE Sound System for the first time in the world. BBE Sound System is known for its true sound reproduction and clarity.It is only available with iAUDIO. No other mp3 player can be compared! BBE, has been used in the recording industry for quite a while now. Many moons ago I had purchased a unit which I used on vocals and guitar.

Create your own world with high-quality EQ JetEffect.iAUDIO U2 can create up to 1.2 trillion different sounds with a total of six top-of-the-line sound effects (5 Band EQ, BBE, Mach3Bass, MP Enhance, 3D Surround and Pan).

Whether it’s Rock or Jazz, Easy Listening or Classical, you will enjoy rich sound from the most delicate to the most powerful.

Superb Cresyn headphones are a standard accessory with iAUDIO U2.Cresyn is one of the leading brand in sound reproduction. With this light, top-quality headset, you wouldn’t want to take them off! I’ll probably invest in Senheizzer or Sony high quality ear buds.


You can enjoy your music and read lyrics at the same time! New Lyric Display Feature provides you with lyrics on wide color LCD

iAUDIO X5 support Clock feature to do View Clock, Alarm, FM radio recording and more through this.

Support USB 2.0 interface to transfer your 700Mbytes movie files within few seconds! Max speed is 480Mbps.

Scan through your music folder while listening. X5’s intelligent control is designed for your convenience. Command-oriented navigation window and popup-type menu window make organizing simple! X5 allows you to spend less time in hassle and more time in enjoying your favorite music.

Create and edit playlists directly on the X5. Organize your songs any way you like. Random and other playback modes available.Also user can edit playlist while playing. Add or delete.

Supports M3U playlist that mostly used in PC. Can playback by storing music files each different folder into the list

Display mode, Auto off and Sleep function are included with the iAUDIO X5.

You can use the firmware upgrade feature to improve product performance. We support user’s requests and suggestions by continuously providing firmware on a non-periodic basis.

Up to 12 minutes of anti-shock. Enjoy your music while running or driving.

The custom made leather case fits perfectly to your X5 to protect and make your X5 look even more attractive. (Optional Accessory)

Easy to manage iAUDIO X5 through JetShell, which is upgraded and it’s compatible with removable disk. JetShell can do CD ripping, File convert and music playback.

JetShell, the file transfer software included in the iAUDIO package, allows you to convert music to MP3 files easily and rapidly. Now you convert and upload your favorite music from Audio CDs to iAUDIO.

Also included in the package is JetAudio, the most popular integrated multimedia player software in the world. Also, a simple video conversion for X5 is possible using the JetAudio conversion tools without need for any additional program.

Use Mac or Linux? No problem!! iAUDIO X5 is available to be used on Mac or Linux OS.

All functions are easy to controlled by 6 line wide LCD remote controller and it include indigo blue backlight. (Optional Accessory)

Stylish designed cradle has 3 main functions. File and data transfer and fast recharge thru USB interface, direct encoding thru line-in port, external speaker output thru line-out port. (Optional Accessory).

The skinny on the VW Linux Oracle Client

I found that installing Oracle on Linux and CentOS for that matter was not a straightforward process but for that matter there were also some issues in hooking VisualWorks up that made for a bumpy ride. Any senior Smalltalker / developer probably would eventually figure things out but in the hopes of saving others some of the pain I went through I’ll detail my little adventure below.

Oracle Installation

Once upon a time in a land not so far away I found myself in front of a Linux box with an Oracle 10 g client install CD. My objective was to install Oracle 10g Instant client i.e. that which simply installs the libraries required for the Oracle client call interface and nothing more, nothing less.

Problem: CentOS is not recognised as “supported” Linux distro.

and here is where I forget what I did. Have to write these blog entries closer to time zero. Essentially, the “runInstaller.sh” found at the top of the Oracle Client 10g CD can be run with a flag which means don’t check if the current OS is a valid distro etc. I’ll try to dig up that flag and amend this article but I do recall that in particular the CentOS forums where helpful.

Configuring VisualWorks

It is extremely important to provide visibility for the Oracle libs from the get go. This is accomplished by setting two environment vars to the location of the Oracle libs. This was done in the startup script for my VisualWorks image. The entries are:

ORACLE_HOME=/apps/oracle
export ORACLE_HOME

PATH=$PATH:$ORACLE_HOME/lib
export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib
export LD_LIBRARY_PATH

Note that the Oracle documentation states that env var “ORACLE_HOME” does not need to be setup for the call interface to work. Also the install of Instant client does not create a “lib” directory. I created one because the directory structure the installer creates is just too painful for me. So I simply took the libraries and put them in the lib directory which I created under ORACLE_HOME.

Configuring Oracle

Oracle call interface will require the following env vars to be set as follows:

NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1
export NLS_LANG
TNS_ADMIN=$ORACLE_HOME/lib
export TNS_ADMIN

NLS_LANG is I assume pretty self explanatory but TNS_ADMIN is not. As a matter of fact, nobody knew in this shop what that did. The reason being is that when one performs any of the “fatter” install options this var is set underneath the covers. TNS_ADMIN specifies the location where the tnsnames.ora file resides. Entries in this file follow the pattern illustrated below:

TBOPROD =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = linux)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = tbOPROD)
)
)

etc …

So let’s break this down:

  • TBOPROD = this is simply the label assigned to the entry above.
  • Host & Port = host and port where the oracle cluster is running.
  • SERVICE_NAME = the name of the database instance.

Your dba usually sets this file up and usually generated by Oracle configuration tools.

Calling Oracle

The following workspace code illustrates how to retrieve a connection:

connection := OracleLinuxInterface new.
connection username: ‘Charles’
connection environment: ‘//MyLinuxBox/TBOPROD’.
connection connect: ‘smalltalkrocks’

Well this is as far as I go with this article. The VisualWorks docs do good job of showing how the database EXDI interface works. Furthermore , you really ought to be using an object relational mapping layer such as GLORP instead of using the EXDI layer which just provides for Direct SQL However, what is noteworthy is that I found that the pattern provided for the “environment” string is incorrectly documented in the docs. What I found to work is illustrated above and that is why I have included the workspace above.

Hope this is useful.

-Charles

American Nuclear Insurers – business case

Daniel Antion has been for the last two years an active member of NYC Smalltalk. Dan lives and works out in Conneticut but makes the time to visit NYC for our presentations and stays around for drinks while we all meet at the the hotel bar to discuss everything Smalltalk.

For our next meeting Dan will talk about how Smalltalk has been a business enabler to his organization.

Here is what Dan had to say about the presentation:

“Specifically, I would like to talk about the ways in which Smalltalk has enabled ANI to quickly respond to business and regulatory requirements. The rapid develvopment cycles combined with abundent tools and the ability to reuse and extend our objects as well as the environment has allowed us to tackle some large projectss and a variety of small projects with a very small staff.

Part of the presentation focuses on highlighting the language capabilities by addressing small, less critical projects than developers normally talk about. Building support for a language, in my experience, can’t be confined to large projects only.”

Some facts about Dan:

“Daniel Antion is Vice President, Information Services for American Nuclear Insurers. He is responsible for all systems development activities in addition to managing general information technology efforts. Prior to joining ANI, he worked in systems development for several companies. He also worked as a consultant for Coopers & Lybrand and KPMG Peat Marwick, specializing in information systems and consulting services to financial institutions. An enthusiastic fan of Smalltalk, Dan has made presentations at Smalltalk Solutions and OOPSLA.”

Hope to see you all there.

-Charles

Are you magellin’

Ever since I purchased my Garmin StreetPilot I have been built an obsession for all that is GPS. I even contemplated buying a Satellite phone , one can pick one up in eBay for a reasonable amount as well as pre-paid cards. Why? Just for those times when you are hiking in the middle of nowhere upstate New York and your cell phone goes blind. Just what happened last time we went upstate , no emergency it was just a little disconcerting to not be able to get in contact with a human being in case we were mauled by some bear. Anyhow, I did not buy the satellite phone, I’ll do that after we buy the Hummer H2 which goes very well with Satellite phones and GPS systems, which I agreed to only buy after we buy a place in the Poconos which we have not really started saving for yet. Of course in between all that is my next guitar which I will definitely get for my birthday next year. In the meanwhile I purchased another GPS unit from Garmin , the Etrex Vista C, great for hiking. One can download topographical maps as well as maps which include hiking trails, city maps. It also does cool things as tracking your path so that you can backtrack etc and lots more.

I guess one of the reasons why GPS stuff is fascinating to me is because I spent approx 4 years working among other things on a VisualWorks GIS application for a utility company. I would like to somehow add doing something with GPS and VisualWorks to my pet project list but that list keeps getting longer. Bruce Badger wrote a driver to his Magellan GPS unit a while back. Actually demoed it at NYC Smalltalk. Garmin also has an SDK which can be wrapped. JUN has API for doing topo stuff so it maps well to GIS. Smalltalk MT if recall correctly has a GIS framework available. I used and extended AppliedReasoning’s GeoSynchrony ( I may be hazy on the name) but they are no more last I heard and that and their graphics package sank with the ship.

Minimal image stripper

For those of you not on the VWNC list here is an interesting post from Terry Raymond. He now has 2.2 mb base image which I believe he is using to support Smalltalk scripting type of functionality. The image only supports file-ins and chunck format at that but he stated the he could probably add support for parcels. Apparently, said support may add another 1 mb. I assume that if on Windows we should still be able to use compression and Reshacker to deliver a relatively small exe which matters to some for example those downloading apps from the web or perhaps folks deploying on PocketPC devices etc. If this can be made to support parcels maybe its the start of an SRE (Smalltalk Runtime Environment).

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

Hi

There is now a stripper for 7.3.1 in
http://www.cincomsmalltalk.com/CincomSmalltalkWiki/DOWNLOAD/CODE/stripper731.zip

Watch the word wrap.

Read the include readme and follow the instructions to create a
small(2.2mb)
7.3.1 image.

The stripped image does not support parcels.

Terry

===========================================================
Terry Raymond Smalltalk Professional Debug Package
Crafted Smalltalk
80 Lazywood Ln.
Tiverton, RI 02878
(401) 624-4517 traymond@craftedsmalltalk.com
<http://www.craftedsmalltalk.com>
===========================================================

A little black magic, making generic VW constructors

I have been playing with a little Smalltalk black magic to solve a philosophical problem. I believe that my acts should be consistent with my beliefs, not always possible not always what I want at the moment but …

So what is the problem?

I happen to be one of those Smalltalkers that creating setters and getters for every instance variable as a default policy just rubs me the wrong way. Now, please I don’t want to start the 20th billionth debate on this, but to me there is state that is just meant to be private really private and putting an accessor in front of one is like building a bathroom without a door. Not cool.

So then don’t create accessors for everything , you may say?

but how many times do we see instance creation methods i.e. constructors where we do this type of stuff:

MyClass>>>newFor: this and: that
inst := self new.
inst this: this; that: that.


^inst

In this case we need the instance side setters #this: and #that:

Alternatively we could do something like:

MyClass>>>newFor: this and: that
inst := self new.
inst newFor: this and: that.

^inst

Here, I don’t have to create the accessors and therefore leave my instVars private but I still have to create an instance side method to field the incoming args used in the construction of the instance. Annoying, but worse it still does provide a mechanism to mutate instance variables that are meant to be private albeit one can’t just mutate one.

Recently one night I was bored and just decided to come up with something no matter if it was ugly or bad, brainstorm something into creation.

I decided on the following requirements:

  • a generic constructor i.e. a message where I could pass an array of instance variable names / value pairs.
  • only allow for every respective class to be the sole constructor of its instances in this manner

The result would then look something like this:

MyClass>>>newFor: this and: that

” e.g.:

self construct: {‘this’->this. ‘that’->that.}

Now, what the heck is that {stuff …}.

That is, if I recall correctly, something that was borrowed from Squeak by Cincom’s Vassili Bykov and its called Brace Constructors. Don’t have time to get into it right now but it basically one can delimit objects with periods i.e. $. So for example one can do the following:

{1. 5+2. true. self calculateSomething}

Anyhow , back at the ranch.

I’m sure that this looks very strange to most Smalltalkers and I’ll admit that I’m not totally sold yet although it really is convenient. So far so good . I may end up liking it.

Note that the following will not work:

MyClass construct: {‘this’->this. ‘that’->that.}

An exception is raised stating that only “MyClass” can send #construct:.

In the next installment of this article I will cover how that is done and the pros and cons.