UMLet is an open source UML diagramming tool with a twist! I’ve used many UML tools in the past, but UMLet is different.
It’s a diagramming tool for the diagram-challenged in us!! You simply type text and it will convert to UML boxes and arrows immediately. It can create simple UML diagrams, Use cases, Activity diagrams and sequence diagrams. I use it to produce some non-UML diagrams as well.
It has a pallet of UML elements already available which you can double click or drag and drop onto your diagram. You will a properties box on the right, where you can start typing – rename, add arrows, lines etc. Yes, you can change the already present elements in the pallet as well!
I particularly like the fact that you can add custom elements to the already rich set of drawing elements. While creating a drawing element, you add Java code snippets to create shapes to your custom elements. Really powerful! OH yeah, it compiles the Java snippets on the fly!!!
Here is a really nice presentation on Prezi to get you started. It has an embedded video as well. Short and sweet.
If you want to learn more about the tool, you can always look at the Source code on github.
The diagrams are stored in UXF (UML Exchange format) format. It is really an XML file with specific format used by the tool. I’ve tried and succeeded in generating this file for some simple diagrams. It is available in various flavors – as a standalone (Java) executable or as a plugin in various IDE including Eclipse.
As a tool, it is intriguing – from the simplicity of use to the versatility of adding to new elements. Complex Diagrams can be produced quickly. I love it. Give it a try! You can download the tool here.
We all use Bluetooth. It’s on your cell phone, earphone, laptop, eve in your car. We use it to link up 2 devices so they can connect wireless-ly. I always wondered what kind of technical term is that. We all know Blu Ray – a device with Blue ray (laser) used to read/write to the disk. Infrared – uses infra red to connect. What kind of ray is in Blue tooth?
Recently, while I was browsing something else, came across a little anecdote about the name. Would you believe, it may be referring to blue teeth a king had due to eating too many blueberries or due to tooth infection!
When one of the founds of Bluetooth, Kardach from Intel, was looking for a name for the new technology, had been reading a book about Vikings that featured the reign of Harald Bluetooth (Scandinavian Blåtand/Blåtann), whom he viewed as an ideal symbol for bringing competing Danish tribes together, as he explained:
Bluetooth was borrowed from the 10th-century, second king of Denmark, King Harald Bluetooth; who was famous for uniting Scandinavia just as we intended to unite the PC and cellular industries with a short-range wireless link.
Apparently, the name stuck when he couldn’t register the technical name for it in time.
The bluetooth logo is a combination of couple of Rune characters as well, as Wikipedia article puts it:
We are getting into Redhat JBOSS for our Java project. I am currently exploring all the options available in JBOSS (also comparing it with Sybase EA Server we are using currently). I intend to share our experiences with the platform here.
One of the things I use a lot in EA Server will be the Jagtool – a command line interface to the app Server’s repository. In JBoss, I found Jboss-cli to do this for us. And I just found out from the below link, that you can actually start that in GUI mode as well. This link has a detailed information on the GUI mode. More on the tool later.
Learn C programming by reading some of the best books from expert authors
An exhaustive list of best hand picked free Eclipse plug-ins for a developer to be efficient
I earlier posted about exciting world of Regex here. Let’s try to learn some more in this followup post.
First if you want to play with Regex, here is a nice tool you can use:
By default it comes up with a sample pattern and the matches in the given sample text. You can type in the pattern you are testing, the actual text in the middle box and if you chose Replace, you get to see what the output will look like.
Let’s use this tool to convert our RSVP list in free text to a spreadsheet list.
If you read my original post, we had 4 RSVPs. It looked somewhat like this:
Will you attend:
Will you be here for lunch:
Here is my session in Regexr testing this:
The bottom portion shows the Replaced text – converted and cleaned, readied to be copied out to Excel. The spreadsheet will look like this:
Here is the actual regular expression used in this example:
RSVP[0-9]+:\n+Name:[ ]*(.+)\nWill you attend:(.*)\nWill you be here for lunch:(.*)\nHow many:.*([0-9]+).*[\n]*
Let’s go through the regular expression for arriving at this:
First line would have, RSVP:
In Regex any number can be represented by [0-9]+ **. That is a digit is represented by any character between 0 and 9. A whole number would then be one or more digits.
Thus, RSVP: can be written as,
Next text is actually on another line. This can represented by \n. You may know this is newline. Now we are on the second line.
This can be matched by, Name: (.*)
That would be any character after Name: . If you notice, we have a space after Name:. What if the user didn’t add any space or added many spaces in between? We can rewrite the above as,
That’s a space inside the square brackets. [ ]* represents 0 or more spaces. This way, we will match it, even if there is no space between the label “Name:” and the name that followis it. If used with a +, it will mean one or more spaces – at least one space must be there.
Next we have (.*). Dot (.) is any character and .* means zero or more characters. By enclosing a pattern within parantheses (), we make a “Capture Group”. This is what will be remembered (like in a variable) when this pattern is matched with a text. This can be returned and useful in Replace functionality. Each captured group will have a number associated with it – like $1*** for the first, $2 for the second etc. This is also called back reference. More on this later.
And we continue with the rest of the lines. The replace pattern will look like this:
That’s all captured variables ($1 – $4) separated by tab characters recognized by Excel as cell separators (we could also use Comma). End it with \n to push to the next line.
Voila! We have successfully converted a free-form text into a spreadsheet.
That was a rudimentary example. And if you noticed, I left out some complications – for e.g., what if they said 1 or 2 people will be coming and I want to take the maximum, meaning 2.
The fact is, Regex is never used alone in a tool like this. Often times, you will build this (and more regex) into a script/program to achieve the full desired results. Perl and Python are heavily invested in Regex. Other programming languages (including Java) do support Regex using some library API.
To be contd…
** As an aside, this is similar to the BNF form for writing language grammar (I’ve considered only positive whole numbers for this discussion):
*** Sometimes you will see \1 instead of $1.