Scredit Crunch

Scred party, and thanks again!

Posted in Life by toivotuo on February 19, 2008

We had a nice little get together tonight to thank all the people who participated in the beta phase of Scred. Not too many people turned up, but that was quite allright – the office would quickly have got rather crammed. We watched All Good Things…, the last Star Trek: TNG double episode to honor one of our release code names, and conclude our beta test phase. Hadn’t seen TNG for a while so it was nice and relaxing after some tense weeks.

Despite the rather ominous continuation of the “All Good Things…” phrase we tend to look things in a somewhat more positive light: All the good things Scred already does are just the beginning! So to borrow and another cliché (or two) – stay tuned, you ain’t seen nothin’ yet!

Scred launches as a public service

Posted in Scred by toivotuo on February 15, 2008

After a lot of hard work, sweat, arguments and certainly a few tears we are very proud to announce that Scred is now going public. That means anyone and everyone can sign up to start using Scred, directly from the new front page. It has been a tough journey to reach this point, but this is by no means the end. This, indeed, is only the beginning of what will be a rich world of community finance solutions. Many exciting new features are waiting in the pipeline, so keep watching this space.

Meanwhile Scred is now ready for the big world so please continue to use and enjoy how it makes handling debts and expenses between your friends so much easier.

Changes in this release:

  • Anyone can now register into Scred. Invitation is not required.
  • Brand new front page with direct ‘Sign up’ links.
  • Error messages further clarified.
  • Users can now update their password on the Scred Mobile application without having to reset all their data. Should be used after updating your password on the web site.
  • Fixed a problem in Scred Mobile which lead to some users having issues with accessing the Scred server.
  • Long pool names were an issue with Scred Mobile. Now fixed.
  • Scred Mobile version is 1.0.
  • Remember that Scred Mobile is a real mobile application, not just a
    simplified website. It can be run both online and offline. Get it at http://www.scred.com/mobile/
  • Help pages updated with new information and updated screenshots.

Thanks to all our beta users for your feedback, both positive and negative. We hope it was
worth the effort. The feedback link is not going anywhere, so do feel free to post bug reports, ideas and comments whenever you feel.

New Scred release (“All Good Things”)

Posted in Scred by toivotuo on February 5, 2008

We are very happy to announce another release of Scred which we have dubbed ‘All Good Things‘. Several useful additions have been made and we would be especially pleased to receive feedback from our beta users at this point.

Note that if you use Scred on your mobile phone you will need to update the version with this release. The old version will no longer work!

Changes in this release:

  • Compatibility with Internet Explorer and Opera greatly improved.
  • Pools can no longer be freely joined. You will require approval from an existing pool member to join. The exception is the Test pool which can be joined freely.
  • You can now switch off email announcements in your profile.
  • If you have forgotten your password you can post a new one to yourself.
  • The test pool balance is no longer included in your total balance.
  • Button now included to view all stored messages at My Scred.
  • Scred for your mobile phone now uses encryption to send data to the service. Note: you must upgrade the Scred software on your phone.
  • Many improvements have been made to error messages to make them clearer and more understandable.
  • Extra validation checks made to input data in several locations.
  • Various small bugs fixed.

Thank you for continuing to use Scred. We have put a lot of effort and work into it and we very much appreciate the contributions and feedback which our beta users have provided. We hope to make Scred ever better and more useful with every new release.

Why Template Toolkit sucks

Posted in Rants by setok on February 5, 2008

A lot of recent Scred development has been built around the Perl Template Toolkit system. I have always been of the opinion that mixing code with the final layout is a very bad idea and this position has only been strengthened by recent experiences. Templates should be just that, templates, or prototypes, of the final result. Files where the visual layout is tweaked, without caring about the logic in the background and which are then processed to get the final result. This does not require anything fancy, just placeholders for the actual data. Let a real script language do the job of managing the logic.

Here are some reasons why Template Toolkit’s model is fundamentally wrong:

  • Logic and representation can get mixed without a clear separation of concerns.
  • Tasks cannot be separated. A graphics person cannot tweak the visual layout without at least some knowledge of the code, and vice versa.
  • Testing is messy at best. Difficult to verify the results of processing in a fashion which is independent of the visual layout
  • Editors generally aren’t big fans of mixing two separate languages within each other. Automatic indentation and other editor features might cease to work effectively.
  • The need to learn and use Yet Another Script Language of dubious merit.
  • Indentation of the resulting HTML easily becomes totally messed up (or alternatively the indentation of the template).
  • You cannot view a template file with a normal browser, without passing it through processing. Thus it does not act as an actual prototype for the resulting page.
  • Actual code reuse seems to be low.

Many of these points can be applied to any other template system similar to Template Toolkit. Additionally I find the incoherent syntax of the language to be annoying and at least the version I’ve been using does not seem to want to crash if accessing a variable or function which does not exist. Instead it tries to be clever and applies empty values. The final HTML is also left with big white spaces where template code was run (and yes, we tried the whitespace joining option, but that resulted in other problems).

Some of these issues can be resolved by careful TT coding and template modularisation. But then again, why bother? If you are going about separating things then why not do it with any mature script language with rich support for modularisation, objects, test facilities etc.

I spent a day coding a new template system in Tcl. It is based on the idea that templates merely refer to objects by class name. These then provide the actual values and content for filling in relevant parts. A separate Tcl script is evaluated to create those objects. The objects can simply be structures with the required fields, or they can contain methods which calculate the values. This is all invisible to the template. It doesn’t care how things are done.

The templates themselves contain dummy values which can be viewed with any web browser, thus allowing you to tweak the layout to your heart’s desire, without touching a line of code.

I dubbed the system ‘Illusion’ because it is clever at hiding things and the result happens as if by magic, without either party knowing about each other. It is simple and effective and although it is still lacking a few things which I have in mind, I believe it proves the concept and you can play around with it.

For now it’s available as a git repository. You can get it with the following:

git clone http://people.fishpool.fi/~setok/git/Illusion.git

Note that it requires at least Tcl 8.4 and XOTcl.

Follow

Get every new post delivered to your Inbox.