RSS

TexnicCenter Profiles

I recently created a new profile in Miktex to generate PDF files from latex through DVI (similar to the Latex=>PS=>PDF) profile that comes with the TeXnicCenter distribution. The new profile is a shortcut to what I was usually doing (i.e. latex => dvi and then dvi=>pdf).

The profile is called Latex=>DVI=>PDF. The profile file (which contains my other profiles as well) can be found here: TexnicCenter Profiles

Please note this profile file contains also the build-in profiles that come with the texniccenter distribution. Using this profile file, will override your current settings.


Bookmark this post
These icons link to social bookmarking sites where readers can share and discover new web pages.

  • Y!GG
  • Digg
  • del.icio.us
  • StumbleUpon
  • Reddit
  • Facebook
  • LinkedIn
  • TwitThis

.NET Certification

A few weeks ago (http://kyriakos.anastasakis.net/prof/blog/?p=24) I posted that I was interested in .NET certification. Unfortunately I haven’t had the time to work on it since then. The main incentive was to get acquainted with the DSL tools provided in .NET 3.0 (even though the available certification exams are only for .NET 2.0).

Today I read an article in ComputerWeekly that there is a shortage of .NET skills (http://www.computerweekly.com/Articles/2007/09/03/226513/employers-struck-by-shortage-of-.net-skills.htm)

It would be interesting to work on a contact .NET project and see the potential of applying Model Driven techniques in practice… But I guess I will have to find some time to study for the certification first.


Bookmark this post
These icons link to social bookmarking sites where readers can share and discover new web pages.

  • Y!GG
  • Digg
  • del.icio.us
  • StumbleUpon
  • Reddit
  • Facebook
  • LinkedIn
  • TwitThis

SiTra and Eclipse 3.3 or Java 1.6

I recently installed eclipse 3.3 and Java 1.6. Today I tried to use SiTra (Simple Transformations in Java) but when I tried to compile it Java started complaining on the following methods of the SimpleTransformerImpl.java:

public Object transform(Object object) {
return transform(Rule.class, object);
}
public List<? extends Object> transformAll(List<? extends Object> sourceObjects) {
return transformAll(Rule.class, sourceObjects);
}

The error was something about java inconvertible types. I don’t know if it is the new version of eclipse or Java 1.6. Looks like for some reason the compiler doesn’t recognise that Rule.class is of type Class<? extends Rule<S, T>>, so as to call the public <S, T> T transform(Class<? extends Rule<S, T>> ruleType, S source)

A simple solution is to ct the Rule.class expression to Class (it sounds weird but it worked).

So the transform and transformAll methods become:


public Object transform(Object object) {
Class r = Rule.class;
return transform(r, object);
}
public List<? extends Object> transformAll(List<? extends Object> sourceObjects){
Class r = Rule.class;
return transformAll(r, sourceObjects);
}


Bookmark this post
These icons link to social bookmarking sites where readers can share and discover new web pages.

  • Y!GG
  • Digg
  • del.icio.us
  • StumbleUpon
  • Reddit
  • Facebook
  • LinkedIn
  • TwitThis

Making UML2Alloy compatible with Alloy v4.0

Alloy Analyzer v4.0 has been out for quite a while. Alloy v4.0 is an extension of the Alloy v 3.0 language (http://alloy.mit.edu/alloy4/quickguide/a4.html). More specifically parts of the concrete syntax of the language has changed (i.e. when invoking a predicate from within another predicate we now have to use brackets “pred1 [param1,param2,..]” instead of parentheses “pred 1(param1, param2,..)“. Also some of the properties of the language have changed (in MDA terms constraints on the metamodel, or well-formedness rules have changed). For example in Alloy 4 you are able to overload predicates, functions and fields. These are relatively small changes and it should be easy to accommodate them in UML2Alloy.

However, Alloy v4.0 has been developed from scratch and it is based on the kodkod model finder. The AST implementation has changed substantially and the convenience methods provided on the AST model elements are fine tuned for the Alloy compiler. For example Signature constructors are private and I couldn’t find a way to update the properties of Signatures (i.e. the Multiplicity of the Signature) after a Signature has been created.

Of course this is perfect if you have an Alloy model and you just want to parse, but not very convenient if you use an MDA approach to instantiate Alloy AST objects. For example in UML2Alloy you can change the Multiplicity of a Signature (i.e. change from set to some to enforce that some Signature instances will exist in the model). If you don’t have access to the Multiplicity attribute of the Signature class, after the object has been created, complicates the situation.

Moreover the AST class elements have been defined as final so there is no way you can override the Alloy v4.0 AST classes.

So, I spent almost 1 day evaluating the situation and trying to find a solution. One solution would be to create my own implementation of Alloy’s AST. Another would be to create wrapper classes of Alloy’s AST that will have pointers to the actual Alloy implementation.

Then I stepped back and thought about the siltation. Well, I already have a rather stable implementation that uses Alloy v3.0 AST. In Alloy v4.0 the AST has NOT changed. Just the concrete syntax. So the solution is easy.

Currently in UML2Alloy after the Alloy AST objects have been generated by SiTra, a visitor is used to create a text file that contains the Alloy model. So, all I have to do is use another visitor and override the methods that create the part of the model for which the concrete syntax has changed.


Bookmark this post
These icons link to social bookmarking sites where readers can share and discover new web pages.

  • Y!GG
  • Digg
  • del.icio.us
  • StumbleUpon
  • Reddit
  • Facebook
  • LinkedIn
  • TwitThis

.NET 3.0 Sample Application

DinnerNow http://www.dinnernow.net is a .NET 3.0 sample application. I heard about it on ArcCast (http://channel9.msdn.com/shows/ARCast_with_Ron_Jacobs).

DinnerNow is an interesting application taking advantage of most of .NET 3.0 Windows Foundations (i.e. WCF, WPF, etc) and the source code is available for download. I want to download the source code and play with it over the weekend and familiarise with those kinds of technologies.


Bookmark this post
These icons link to social bookmarking sites where readers can share and discover new web pages.

  • Y!GG
  • Digg
  • del.icio.us
  • StumbleUpon
  • Reddit
  • Facebook
  • LinkedIn
  • TwitThis

.NET 2.0 Certification?

Lately I have started becoming interested in becoming a .NET certified professional. But is it worth it starting to work towards a .NET 2.0 certification, considering the visual studio 2008 will be out in 6 months time? However it will probably take sometime after the release of VS 2008 for MS to review their certifications.

For the time being I am thinking of working in my spare time for the MCPD: Web Developer certification. The main reason for this is that I need to get my mind off the PhD from time to time. I also have a free copy of VS 2005 Professional, when I attended the launch tour, so practising for the exams shouldn’t be a problem. My plan is to be ready for the first exam by sometime at the end of August. Let’s see if I can make it!


Bookmark this post
These icons link to social bookmarking sites where readers can share and discover new web pages.

  • Y!GG
  • Digg
  • del.icio.us
  • StumbleUpon
  • Reddit
  • Facebook
  • LinkedIn
  • TwitThis

UML vs DSL

Recently I came across an audio file from the discussion on UML vs DSL that took place in a panel in the Code Generation 2007 conference. The panel with leading experts from the industry, discusses the latest trends in the modelling languages used.

The file can be found at: http://www.codegeneration.net/audio/cgn-episode1.mp3


Bookmark this post
These icons link to social bookmarking sites where readers can share and discover new web pages.

  • Y!GG
  • Digg
  • del.icio.us
  • StumbleUpon
  • Reddit
  • Facebook
  • LinkedIn
  • TwitThis

A simple program for subversion statistics (subvstats)

Today I finished a beta version of a simple java program that collects the statistics from a subversion repository. I have created a website for the program: http://www.freewebs.com/subvstats/

It currently works by checking the whole history of the repository, finding how many lines have been added/removed in each file by using the “svn diff” command and creating an HTML report.
A sample of the report can be found here: http://www.freewebs.com/subvstats/samplereport.html

The program should work for relatively small repositories. As soon as I have time I will document it more and generate more statistics. And yes, I am thinking of making it opensource, but not in its current state. I first need to find some time to document the code properly and have a stable version.

Keywords: Subversion, statistics, package, tool, program, software, java, subvstats.


Bookmark this post
These icons link to social bookmarking sites where readers can share and discover new web pages.

  • Y!GG
  • Digg
  • del.icio.us
  • StumbleUpon
  • Reddit
  • Facebook
  • LinkedIn
  • TwitThis

Microsoft Access parametric queries on Forms.

For the past two days I have been working with MS Access to create an application. One of the features I wanted to create, was a parametric query that would take the value from a combobox on a form and create a report.

To be more precise I had a form with a combobox populate with IDs and names and when the user selected a specific item from the combo and clicked on a button I wanted to have a report that showed some information of related to the selected ID.

One way to do it is to create some vb code and create a select query with a “where” clause. But, that is not too flexible, caz if I want to change the query, I have to change the code.

Today I came across a more flexible solution. Parametric queries. I knew how to use parametric queries, but not in conjunction with forms. So if you want to create a parametric query related to a form, all you have to do in the query is define the parameter at the beginning like:

PARAMETERS [Forms]![formName]![ControlName] ParameterType;

In the where clause you also have to use the same notation. So for example:

where Id = [Forms]![formName]![ControlName]

and that’s it!


Bookmark this post
These icons link to social bookmarking sites where readers can share and discover new web pages.

  • Y!GG
  • Digg
  • del.icio.us
  • StumbleUpon
  • Reddit
  • Facebook
  • LinkedIn
  • TwitThis

Microsoft Access crashes when trying to create MDE file

I was trying to convert an MS Access database I had developed to MDE. It was crashing every time I was trying to create the MDE file.

After some search on the internet I run across a Microsoft article that solved the problem for me.

The link is: http://support.microsoft.com/Default.aspx?scid=kb;en-us;814858&spid=2509&sid=98

What it says is:

WORKAROUND
To work around this problem, you can reload the VBA project of the Access database from text and then create the MDE file or the ADE file. To do this, follow these steps:

Note Make a backup copy of the database before you start these steps.
1. On the taskbar, click start and then click Run.
2. Type msaccess.exe /decompile and then click OK.

3. Open the original .mdb file or the original .adp file that you want to save as the new MDE file or the new ADE file.
a. Press ALT+F11 to open the Visual Basic Editor.
b. On the Debug menu, click Compile <databasename>.

c. On the File menu click Save <databasename>, and then close the Visual Basic Editor.
4. On the Tools menu, click Database Utilities and then click Make MDE File or click Make ADE File.
5. In the Save MDE As dialog box or the Save ADE As dialog box, locate the folder where you want to save the MDE file or the ADE file, type the file name in the File name box, and then click Save.<databasename>

I tried it and it and it works like a charm! Apparently I had deleted some forms and there was some VBA code related to those forms that was still there. With the decompile option not only did I manage to create an MDE file, but I also reduced the size of the db by almost 1MB(!!) after I compacted it.

From now on I am going to use the /decompile option every time before I deploy a new version of access.


Bookmark this post
These icons link to social bookmarking sites where readers can share and discover new web pages.

  • Y!GG
  • Digg
  • del.icio.us
  • StumbleUpon
  • Reddit
  • Facebook
  • LinkedIn
  • TwitThis