(Republished from Cincom Smalltalk Tech Tips)
Good while ago I posted ResourcefulTestCase talking about a simplified pattern for test resources in the context of SUnit. Basic idea was that if you tend to group your test cases around their required resource you often end up with a package where many TestCase classes are mirrored with TestResource classes one-to-one. In this situation it is more convenient to simply use the class side of the TestCase class as its resource and cut the amount of classes by half.
(Republished from Cincom Smalltalk Tech Tips)
Did you ever run into a situation where you had a stream and some previously written chunk of code that could process the stream almost as is, if only the stream included few additional bytes in the beginning? Usually, I ended up just biting my lip and fetching the full content of the stream, prepending the missing bits and then setting up an internal stream on top of the collection.
(Republished from Cincom Smalltalk Tech Tips)
I’ve been using Linux as my primary desktop platform for some years now. I generally try to keep up with the releases and stick with the default choices as much as possible. Recently I tried to use F-Spot because it’s the default photo manager for GNOME now. It’s got some nice features and is generally OK, although not very flexible, very much within the spirit of today’s UI design dogmas (“You can’t handle flexibility, you … user … you!
(Republished from Cincom Smalltalk Tech Tips)
Our Seaside effort yields some useful byproducts including improvements to the, so far rather Spartan, WebSupport package. This package now provides HttpClient and HttpRequest extensions simplifying submission of HTML form data through HTTP POST method.
In general, form data can be submitted in a “url encoded” format in a simple, single-part HTTP request (content-type: application/x-www-form-urlencoded), or each data entry can be submitted as an individual part in a multipart HTTP request (content-type: multipart/form-data).
(Republished from Cincom Smalltalk Tech Tips)
The core SUnit package provides support for shared test resources via the TestResource class. A TestCase that wants to use TestResources is expected to list all its resource classes in its class side #resources method. Individual test case methods then access the resources via the resource classes, usually as default, singleton instances. That provides potentially interesting levels of flexibility, however the access to the resources themselves is not exactly convenient.
(Republished from Cincom Smalltalk Tech Tips)
It’s quite interesting that even though it’s now decades old we’re still running into this fundamentally rather trivial problem. It is especially pronounced in heavilly cross-platform environments like VisualWorks. As soon as you have multiple environments, e.g. Windows and Linux and you move text files between the two, you’re pretty much guaranteed to run into files with doubled or trippled line-ends in them sooner or later.
(Republished from Cincom Smalltalk Tech Tips)
The latest version of the ComputingStreams in the public repository adds two new stream classes, CachedReadStream and CachedWriteStream. I’m not proud of the well worn, “cached”, name and welcome any suggestions, but that’s what it is for now. These streams are the first step in my (hopefully) final battle with stream positioning. If you’ve ever used streams in anger, you’ll probably agree that many problems require yanking the stream position back and forth frantically.
(Republished from Cincom Smalltalk Tech Tips)
I’ve mentioned previously that we have spent a lot of time on ASN.1 in this release cycle, so I better say something about it. However this article won’t be an introduction to ASN.1, I want to focus on the improvements in our implementation, but there are some easy introductions available and even free books for the gory details.
I figured that the best way to demonstrate the framework is to show how it’s used in an application, and our most interesting application so far is the X.
(Republished from Cincom Smalltalk Tech Tips)
Considerable amount of time in this release cycle was spent on improving our ASN.1 support. I don’t want to get into details of this rather technical topic (maybe next time), but I’d like to show how much we’ve gained from it. As it happens ASN.1 is one of the principal building blocks of many security related standards, for example the PKCS suite of standards, CMS and S/MIME and obviously the ITU-T’s X-series of recommendations where ASN.
(Republished from Cincom Smalltalk Tech Tips)
VW 7.4 is going through its final stages, so I thought this might be a good time to brag about what’s coming. Today I’d like to mention one of my pet projects. Well, it’s “my” only in the sense of me being fond of it, but the work is actually done by Dave Wallen. He wrote a DLL/CC wrapper for the crypto library used by OpenSSL.