Thursday, September 28, 2006
Seaside for the .Net Developer
Ramón León compares web development with Smalltalk/Seaside and web development with .NET.
Wednesday, September 27, 2006
Small Cruise
There is a sneak preview of SmallCruise available showing the integration between Dolphin Smalltalk and CruiseControl.net (providing Continuous Integration of your Smalltalk projects).
Tuesday, September 26, 2006
Sandcastle
When working with Smalltalk I usually dont care about reference documentation since I'm more used to browsing the code directly. On the other hand it is very easy to use reflection in Smalltalk and write out some static html files if required (see this Squeak class documentation for an example).
In Java and .NET you typically use documentation annotations in the code and tools like JavaDoc and NDoc. As you may have heard NDoc is now discontinued since Microsoft provides an own documentation tool called "Sandcastle".
So I just downloaded the Community Technology Preview for "Sandcastle" to document the assemblies of one of my .NET projects. Sandcastle allows you to build accurate, informative documentation with a common look and feel similar to the MSDN documentation.
There are several GUI tools available helping you to control the compilers input and output (the CTP for Sandcastle comes only comes with a command line compiler).
After trying the SandCastleBuilder tool I was more happy using the SandcastleGUI tool. Much better than using MRefBuilder.exe, BuildAssembler.exe and XslTransform.exe manually.
Since I already had the MS HTML Help Compiler installed it was very easy to build a CHM file with the docu. One of the nice features is that the documentation includes live links to the MSDN documentation.
All in all nothing worldshaking but sometimes helpful if work on the .NET side of life.
In Java and .NET you typically use documentation annotations in the code and tools like JavaDoc and NDoc. As you may have heard NDoc is now discontinued since Microsoft provides an own documentation tool called "Sandcastle".
So I just downloaded the Community Technology Preview for "Sandcastle" to document the assemblies of one of my .NET projects. Sandcastle allows you to build accurate, informative documentation with a common look and feel similar to the MSDN documentation.
There are several GUI tools available helping you to control the compilers input and output (the CTP for Sandcastle comes only comes with a command line compiler).
After trying the SandCastleBuilder tool I was more happy using the SandcastleGUI tool. Much better than using MRefBuilder.exe, BuildAssembler.exe and XslTransform.exe manually.
Since I already had the MS HTML Help Compiler installed it was very easy to build a CHM file with the docu. One of the nice features is that the documentation includes live links to the MSDN documentation.
All in all nothing worldshaking but sometimes helpful if work on the .NET side of life.
News from Exupery
A port of the Exupery virtual machine is now available for Windows and Solaris.
The Exupery project (by Bryce Kampjes) compiles bytecodes to machine code. The source code is available at SqueakMap.
Dont forget to have a look at the Exupery talk from Brussels2006 Smalltalk party (see video).
The Exupery project (by Bryce Kampjes) compiles bytecodes to machine code. The source code is available at SqueakMap.
Dont forget to have a look at the Exupery talk from Brussels2006 Smalltalk party (see video).
Wednesday, September 20, 2006
IsDate and Agent Zed
While reviewing code I found an interesting bug in a VB component today.
There is a piece of software that should validate if a given input value
represents a correct date.
Unfortunately it just used the IsDate() function to check the value.
If I reduce the code to its minimum it does something similar to:
This works as expected: the inputValue represents a date (so we get "True")
and after the date conversion we get the correct date: 28.02.2006.
But have you tried with "31.02.06" - an input value which is not a
correct date (at least if you think of the format dd.mm.yy)
It is silently accepted by the code and VB is converting it into
the "06.02.1931"! Beside the fact that this is the day where actor
Rip Torn was born (who played Agent Zed in Men in Black) we found the
reason for accepting the bad input value.
So if VB cant find a matching date in the right order it just parses
the string reverse and checks for a reasonable date value.
Let's do a quick check in .NET using C#:
Fortunately this is not an issue since a FormatException is thrown.
Conclusion: never stop testing your code and when it comes to
dates remember the birth of Agent Zed...
There is a piece of software that should validate if a given input value
represents a correct date.
Unfortunately it just used the IsDate() function to check the value.
If I reduce the code to its minimum it does something similar to:
Private Sub Command1_Click()
Dim inputValue As String
inputValue = "28.02.06"
MsgBox IsDate(inputValue)
MsgBox CDate(inputValue)
End Sub
Dim inputValue As String
inputValue = "28.02.06"
MsgBox IsDate(inputValue)
MsgBox CDate(inputValue)
End Sub
This works as expected: the inputValue represents a date (so we get "True")
and after the date conversion we get the correct date: 28.02.2006.
But have you tried with "31.02.06" - an input value which is not a
correct date (at least if you think of the format dd.mm.yy)
It is silently accepted by the code and VB is converting it into
the "06.02.1931"! Beside the fact that this is the day where actor
Rip Torn was born (who played Agent Zed in Men in Black) we found the
reason for accepting the bad input value.
So if VB cant find a matching date in the right order it just parses
the string reverse and checks for a reasonable date value.
Let's do a quick check in .NET using C#:
DateTime date = DateTime.Parse("31.02.06");
Fortunately this is not an issue since a FormatException is thrown.
Conclusion: never stop testing your code and when it comes to
dates remember the birth of Agent Zed...
Monday, September 18, 2006
More VM news
Looks like Ian Piumarta's new Pepsi and Coke Meta-VM might lift off with the OLPC project. A quote from the OLPC news:
"2. Alan Kay, Kim Rose, and the eToys team spent the week in Cambridge at the OLPC offices. They continue to make rapid progress towards the integration of eToys into the laptop software environment (they also provided useful feedback) and have eToys running on the laptop. IanPiumarta gave the OLPC team an update on his dynamically reconfigurable virtual machine, which may be in the longer term the basis of programming environment for the Laptop, in that it is simple, fast, extremely flexibleand quite eloquent."
Wednesday, September 13, 2006
Comet Screencasts - new web possibilities
Diego shows some examples for Comet use as screencasts:
- a Cooperative shopping cart
- a colaborative spreadsheet
Full info is available here and here - spanish only.
So there are more and more arguments for using Seaside as THE web development framework. If you dont know about Comet you should have a look at one of my ealier posts about it.
- a Cooperative shopping cart
- a colaborative spreadsheet
Full info is available here and here - spanish only.
So there are more and more arguments for using Seaside as THE web development framework. If you dont know about Comet you should have a look at one of my ealier posts about it.
News from Squeak and OLPC
Another step for the "One Laptop per Child" (OLPC) project: Squeak Etoys is running on a first prototype display. See the pictures on Ians homepage:
http://piumarta.com/photos/olpc/
http://piumarta.com/photos/olpc/
Monday, September 11, 2006
Sun release Strongtalk VM into OpenSource
Sun has released the Strongtalk VM as Open Source in September 2006. The Strongtalk VM executes Smalltalk much faster than any other Smalltalk implementation (at the time of its release), using an advanced inlining compiler based on type-feedback technology. See
http://www.strongtalk.org/
for more info.
The current system was developed in secret at a small startup company, Animorphic Systems (officially LongView Technologies, Inc.), that was started in 1994. Unfortunately for Strongtalk, the rapid and unexpected rise of Sun Microsystem's Java forced Animorphic to halt work on the Strongtalk system before it was ever released. Animorphic was acquired by Sun Microsystems in 1997, and parts of the Animorphic virtual machine technology became the core of what is currently Sun's production Java virtual machine implementation (it made it into the Hotspot Java Jitter/dynamic optimizer).
The VM is a mixed-mode system, with a fast interpreter as well as dynamic
compiler that was invoked based on dynamic profiling info. The only previous application of similar technology was Self, which was entirely compiled and had a huge footprint.
The Strongtalk VM did not make use of the type system at all; typing was strictly optional. Method dispatch was based on inline caches, including PICs. All code was represented internally as mixins, and any class could be used as a mixin as well.
Benchmarks showed that we were 2.5-4 times faster than commercial Smalltalks at that time (Digitalk, ParcPlace (now Cincom) and IBM).
http://www.strongtalk.org/
for more info.
The current system was developed in secret at a small startup company, Animorphic Systems (officially LongView Technologies, Inc.), that was started in 1994. Unfortunately for Strongtalk, the rapid and unexpected rise of Sun Microsystem's Java forced Animorphic to halt work on the Strongtalk system before it was ever released. Animorphic was acquired by Sun Microsystems in 1997, and parts of the Animorphic virtual machine technology became the core of what is currently Sun's production Java virtual machine implementation (it made it into the Hotspot Java Jitter/dynamic optimizer).
The VM is a mixed-mode system, with a fast interpreter as well as dynamic
compiler that was invoked based on dynamic profiling info. The only previous application of similar technology was Self, which was entirely compiled and had a huge footprint.
The Strongtalk VM did not make use of the type system at all; typing was strictly optional. Method dispatch was based on inline caches, including PICs. All code was represented internally as mixins, and any class could be used as a mixin as well.
Benchmarks showed that we were 2.5-4 times faster than commercial Smalltalks at that time (Digitalk, ParcPlace (now Cincom) and IBM).
Wednesday, September 06, 2006
Squeak Developer Workspace (including Seaside)
A new release of DeveloperWorkspace for Squeak 3.9 is available. It creates a predefined image and may help developers as well as beginners. It now also includes all packages for Seaside development.
Some of its features:
Unfortunately I was not able to register a new package version on SqueakMap today, so here is a short howto:
Download the latest 3.9 release of Squeak (actually Squeak3.9g-7055.zip) from http://ftp.squeak.org/3.9
Open a new workspace and evaluate the following code:
A workspace will appear with
Just select this text and evaluate it.
Answer all following questions with "yes" or "ok". Note that you have to provide a username and password during the install. They are used to secure the seaside webserver configuration console.
When the installation finishes just save the image. You can now use the tools or follow the instructions in one of the workspaces.
Have fun
Some of its features:
- assembles usefull packages and developer tools (AST, FFI, RefactoringBrowser, RoelTyper, TestBrowser, Techo, ScriptManager, MemoryUsage, ...)
- syntax highlighting using Shout
- autocompletion using eCompletion package
- includes seaside and a seaside workspace to easily start web development (no external webserver required)
- window switching using ALT+W (thanks to keybinder)
- provides an beginners workspace (uncomplete, help appreciated)
Unfortunately I was not able to register a new package version on SqueakMap today, so here is a short howto:
Download the latest 3.9 release of Squeak (actually Squeak3.9g-7055.zip) from http://ftp.squeak.org/3.9
Open a new workspace and evaluate the following code:
| repository version |
repository := MCHttpRepository location: 'http://www.squeaksource.com/DeveloperWorkspace' user: '' password: ''.
version := repository versionFromFileNamed: 'DEVImageInstaller-tbn.4.mcz'.
version load.
A workspace will appear with
DEVImageInstaller install
Just select this text and evaluate it.
Answer all following questions with "yes" or "ok". Note that you have to provide a username and password during the install. They are used to secure the seaside webserver configuration console.
When the installation finishes just save the image. You can now use the tools or follow the instructions in one of the workspaces.
Have fun
Monday, September 04, 2006
Pictures from ESUG 2006
Here are the first pictures from the 14th European Smalltalk User Group (ESUG) conference in Prague.
You can also have a look at the presentations from Monday.
and some first impressions from James:
- Meta Driven Browsers (about the OmniBrowser framework)
- Modularizing the ObjectLens
You can also have a look at the presentations from Monday.
and some first impressions from James:
- Meta Driven Browsers (about the OmniBrowser framework)
- Modularizing the ObjectLens
Wednesday, August 30, 2006
Some news from DabbleDB
Andrew created a new screencast on DabbleDB showing how to create an application from imported digg.com data. If you want you can help digging.
DabbleDB is also mentioned on the Dan & David Show as being used by Ismael Ghalimi, the co-founder and CEO of Intalio.
For those who dont know: DabbleDB is a new web application written Smalltalk using Squeak and the seaside web framework (both open source). It's focus is on easy application development based on structured data.
DabbleDB is also mentioned on the Dan & David Show as being used by Ismael Ghalimi, the co-founder and CEO of Intalio.
For those who dont know: DabbleDB is a new web application written Smalltalk using Squeak and the seaside web framework (both open source). It's focus is on easy application development based on structured data.
Rethinking the typing
There were some thoughts from an outsider about Smalltalk on the Squeak-dev mailinglist, I can only agree to his point of view about typing:
In dynamic languages you can focus on solving the problem - in static languages you always get distracted by annoying compiler messages...
"Before I was an effienciency/static typing junky, but smalltalk has made me
rethink the typing at least. :) After all, how many errors *has* that
really caught for me compared to all the times code didn't compile because
the compiler was confused about something that should work."
In dynamic languages you can focus on solving the problem - in static languages you always get distracted by annoying compiler messages...
Wednesday, August 23, 2006
Rubics Cube
There are a couple videos of a Rubik's Cube in croquet space on YouTube. Looks like this is work done by one of Robert Hirschfeld's students.
- Video 1
- Video 2
- Video 3

Robert is the author of various Squeak packages like AspectS or MethodAnnotationBrowser.
Unfortunately he now moved to Potsdam to work for the Hasso Plattner Institute. We are both native-born in Thuringia (which is one of the most beautiful landscapes in germany by the way) and I miss the endless Smalltalk discussions with him after work in Munich's beer gardens...
- Video 1
- Video 2
- Video 3
Robert is the author of various Squeak packages like AspectS or MethodAnnotationBrowser.
Unfortunately he now moved to Potsdam to work for the Hasso Plattner Institute. We are both native-born in Thuringia (which is one of the most beautiful landscapes in germany by the way) and I miss the endless Smalltalk discussions with him after work in Munich's beer gardens...
Thursday, August 17, 2006
Crashing toad
TOAD is a really usefull tool when working with databases. While working with Oracle today it suddenly crashed and displayed an interesting call stack. Did'nt know that the UI was written using Pascal:
Wednesday, August 16, 2006
The power of two
If you work in IT business then some numbers are very meaningful
if you see them in a memory dump or a code listing. If you know
about bits and bytes and the mathematics behind them then at least
the following series should be well known:
The series for 16 bits is something you could easily remember.
But whats next. Let's write a small(talk) expression to see how the
series continues up to 1000 bits:
Ooops - I didnt know that (2 raisedTo: 1000) is:
Really? Unbelievable! Next step would be to learn all of them ;)
if you see them in a memory dump or a code listing. If you know
about bits and bytes and the mathematics behind them then at least
the following series should be well known:
1 2 4 8 16 32 64 128 256 512 1024 2048 4096 8192 16384 32768 65536 ...The series for 16 bits is something you could easily remember.
But whats next. Let's write a small(talk) expression to see how the
series continues up to 1000 bits:
(0 to: 1000) collect: [ :each | 2 raisedTo: each ]Ooops - I didnt know that (2 raisedTo: 1000) is:
10715086071862673209484250490600018105614048117055336074437503883703510511249361224931983788156958581275946729175531468251871452856923140435984577574698574803934567774824230985421074605062371141877954182153046474983581941267398767559165543946077062914571196477686542167660429831652624386837205668069376Really? Unbelievable! Next step would be to learn all of them ;)
Tuesday, August 15, 2006
StarUML
Found a nice and free Win32 UML Tool on the web. It is called StarUML.
StarUML supports Java, C++, C#, Pattern, RationalRose and XMI. Last one is especially important - so I can transform the model to anything I like. Diagrams can also be exported to JPG, EMF, WMF and BMP. It comes with full Delphi source code - so it is easily adaptable.
I like it but even with all these features I think it will not replace my hottest design tool.
StarUML supports Java, C++, C#, Pattern, RationalRose and XMI. Last one is especially important - so I can transform the model to anything I like. Diagrams can also be exported to JPG, EMF, WMF and BMP. It comes with full Delphi source code - so it is easily adaptable.
I like it but even with all these features I think it will not replace my hottest design tool.
Monday, August 14, 2006
Christo Code Coverage
Stefan Reichhart has announced "Christo" - a tool to dynamically and safely retrieve coverage of code-elements (e.g. packages, classes, methods, ...).
It adapts many different technologies to collect data. So you might apply this tool using ByteSurgeon, MethodWrappers, ObjectAsMethodWrappers, JCompiledMethods/AST (short: JAST), or ...
It's part of his Master Thesis about "Testing".
It adapts many different technologies to collect data. So you might apply this tool using ByteSurgeon, MethodWrappers, ObjectAsMethodWrappers, JCompiledMethods/AST (short: JAST), or ...
It's part of his Master Thesis about "Testing".
Tuesday, August 08, 2006
Wednesday, August 02, 2006
Injection Rejection
Software developers should always take care for security and prevent SQL injection as explained in this funny story. :)
Subscribe to:
Posts (Atom)