Categories
Web Development

JavaScript Globals

If you ever wrote mildly substantial JavaScript, you noticed that that JavaScript is not as premiscuous as it may appear when it comes to namespaces.
If you define a variable outside any block of code, that variable is not necessarily available within the body of functions, say.
The solution is to use the a real global element and ‘attach’ it the global value as property. The object of choice is window and the solution is as simple as
window.myProperty="Yuval";
Thereafter the global value is accessible as
window.myProperty

Very elementary, but I always forget these facts…

Share
Categories
Computing Java

Critique of ArgoUML

I am using two free Java-based UML tools for my software design and patterns class.

One is Violet, which is brilliant in the fact that it limits its own scope and functionality so much that it is extremely useful and very easy to pick up, while being limited.

The other is ArgoUML (I am using version 0.18.1) which is at the opposite end of the scope scale. It has a lot to offer but when you offer a ton, you sometimes compromise on the basics. ArgoUML used to offer all of the major UML diagrams, but apparently the implementation was buggy enough for them to disable sequence diagrams, among others. Their class diagram support, though is strong and the application is very servicable. Until certain little things come up.

Suppose you want to output an image of a small section of your very large model. The logical things that come to mind are:

  • selecting the classes you want to output and selecting the ‘output to image’ function
  • selecting the relevant classes, copying them to a new model with the relationships between them and then outputting the model to an image

Sadly in ArgoUML the first option will always output the entire model no matter what, and the second option will only copy the actual classes, but not the relationships (the lines) between them.

Next time you think how much Visio sucks, appreciate the little things.
The problem with Visio, is that its UML support is not great; the model looks sort of like correct UML, and it is very Microsoft-technology centric, as opposed to the Java-centric approach of ArgoUML (Violet is so basic it is agnostic – hence less is more!). And yeah, Visio costs an arm and a leg. And if you are paying, you can just as well get SmartDraw and be done with it.

I will stick with my limited but lovable tools for now.

More comments about ArgoUML:
– No undo/redo functionality
– Impossible to copy and paste method definitions

Share
Categories
Music

She wants revenge

‘She wants revenge’ is a band.
Their song ‘Tear you apart’ is played quite frequently on Sirius’ alternative music channel and as opposed to the general generic and classic alternative around it, it sounds fresh. Fresh like something that just jumped back to life from the eighties (there was some good music when I was growing up, damn it!).
The production is very light, just a drum machine (or a very basic beat) that sounds very much like what my Casio organ would produce, or better yet, something out of London or Manchester before the happy happy of E. In other words, another Joy Division inspired band. And their singer has a very dry voice that works very well with the minimalism accompanying him. Like very early Depeche Mode instrumentally, with the brooding overtones of their better albums.
Whatever. Just sharing. This song rocks.
See them in a video for a lesser song.
The duo have a really irritating website, but most bands do.
Coming to the Middle East in Cambridge Feb. 14. May even go.

Share
Share