Monday, December 21, 2009

Stop the Obfuscation~!

Once again, I have to agree with you Brandon. There is another point to this as well. In the build that I run, with so many thousands of classes, each with hundreds (if not thousands) of lines of code, this obfuscation process takes quite a bit longer to run in the build. Anything that takes longer in the build, but doesn't offer clear developer benefit can deter developers from running the build (and tests) before check-in because it just takes too long.

Thanks for the great post Brandon.

in reference to: Java Programming Tip: Why Not to Obfuscate - mechanicalSPIRIT (view on Google Sidewiki)

Friday, December 18, 2009

Spanky's closed down?


After my wonderful experience at Spanky's following my 7 year old daughter's driver's ed course, I fell in love with Spanky's. So did she. Their environment was comfortable, clean and friendly, and their food tastes great.

I was really sad though that for her birthday, they were unexpectedly closed. I visited yesterday in hopes for delicious lunch. Again they were closed. Called today too. But they appear to be closed.

What is going on Spanky's? I am in need of your Fresh Delicious Guacamole Burger!

in reference to: SPANKY'S EXPRESS (view on Google Sidewiki)

Friday, December 11, 2009

Sketchy designs

Many of you may be looking for a comparison of a lot of the mockup / sketchy design tools. While I haven't tried all of these tools out, and I really do love Balsamiq, this may be a nice place to start! Now if I could just find that cool data graphing design tool I saw yesterday...

in reference to:

"Comparison of Computer Based Sketchy ToolsSoftware developers are starting to recognize the importance of computer-based sketchy wireframes, and there is a growing assortment of tools to create them. This is a quick breakdown of how each of the major tools matches our criteria for a complete computer-based sketchy tool:"
- Sketchy Wireframes - Boxes and Arrows: The design behind the design (view on Google Sidewiki)

Thursday, December 10, 2009

your mockup prototype as a PDF

OK, so this feature is super awesome. Providing a way to export a mockup, with clickable interaction. This is awesome. Today in fact, I sent off a screen full of mockups to some stakeholders, wishing I could demonstrate the flow better than just a bunch of mockup screenshots lined up in a row.

in reference to: Balsamiq Exports Multi-Canvas Mockups to Single PDF | Konigi (view on Google Sidewiki)

SketchFlow vs Balsamiq

Sketch flow looks very neat, and I do really wish that Balsamiq would add the ability to sketch out some of the workflows, and I wish that it would provide stakeholders a player in which to view my mockups, and make their own sketches and marks and comments on it for a bit of historical marking.

in reference to: Why SketchFlow Is not a Mockup Software | .NET Zone (view on Google Sidewiki)

The Ponzi Scheme that stole my house in Highland

Some of you may have read earlier in my blog http://www.fishtells.com/2008/04/lure.html concerning the investments that went sour for me. Well, this is where my money ended up finally. Misused and abused by Mr. Rick Koerber. I'm glad he is being indicted and prevented from scamming even more people.

in reference to: Rick Koerber pleads not guilty to new criminal charges (view on Google Sidewiki)

Wednesday, December 9, 2009

drag-select controls inside container

I just wrote up my pet peeve:

The other thing I wish Mockups would do is give me an easy way to select the stuff inside of a dialog box, or other container. I.e. when I want to select the items in a dialog, I often end up selecting the container instead. I think it would be a little nicer to make the insides of the dialog box not so clickable. Maybe just the edges of the dialog box clickable would be well enough, then I could group select the controls inside.

This is meant to solve my problem, but in my latest version of Mockups, this doesn't work. When I shift drag, I don't get a lasso at all. In fact, it just appears to annoy me. Also, I liked the smiley face application icon in my task bar better. the one you got there now doesn't really look like anything.

in reference to:

"holding SHIFT when the mouse is over some controls will ignore them so that you can drag-select other controls. This is a small change but it’s pretty handy, here’s a quick video demonstration:"
- Balsamiq Company Blog (view on Google Sidewiki)

Even More improvements for Mockups

Balsamiq just released their newest version of Mockups, which includes some things that I've wanted, but didn't tell them I wanted. Somebody else told them though:
- Move dock ui library left, right, top
- dock the properties inspector (it gets in the way sometimes)

The one I think is the most useful is
- Stretchable Geometric Shapes

Seems dumb, but when I was making some more general purpose projects for cards night, I wanted some shapes, but I didn't want them to look so blocky. Now my shapes will look more natural. Way to go Balsamiq!

Coming up, they have a feature to fix an annoyance I encountered today... moveable document tabs.

Now, if I could just get them to make a really nice way to do UML. I alway feel like I'm piecing things together.

I realize of course that they made Mockups for screens, but I love to use it for my class diagrams, sequence diagrams and general flow diagrams as well.

in reference to: Balsamiq Company Blog (view on Google Sidewiki)

A DSL for processing Web Service Results

My latest project included the requirement to process web service results in a generic way. I thought to myself... This is a job for Groovy Script!

But it became somewhat troublesome as these scripts would be written by non engineers, and it also opened up some security risks.

So, now the question remains, how would I then secure these results processing scripts, while also making them easier to write from 'services' types of folks?

in reference to: A Domain-Specific Language for unit manipulations | Groovy Zone (view on Google Sidewiki)

Saturday, December 5, 2009

Follow the blog

I just added the follow my blog functionality. Why not follow my blog. I post on lots of stuff to make your development more productive. Just click on the follow link on the side. Then when I post something new, you'll be notified, and maybe you can put something great into your project too.

Design Mockups, realtime, real easy











A few months ago, I introduced Balsamiq mockups into my project because using Excel spreadsheets to design my screens was just stupid. I couldn't really 'communicate' with the rest of the team in India.

I still remember the night when I pulled this out. I remember Amit from Intelligrape in India happily exclaimed, with hope in his timbre, "Oh Brent, this is going to be so much better for us. Thank you."

He was right. It has increased the team velocity tremendously. We are able to work through the screens in realtime over YuuGuu, drilling down to the finest points of the design.

Here are a couple of the screen shots. We even use it for some class diagrams and sequence diagrams.


in reference to: Balsamiq Mockups Home | Balsamiq (view on Google Sidewiki)

Getting a signed in user in Grails tests

I found this to be helpful. I just needed one more piece of information.

def subject = [
isAuthenticated: true,
principal: "admin"
] as Subject

SecurityUtils.metaClass.static.getSubject = {-> return subject }
Subject.metaClass.getPrincipal = {-> return "admin" }

This way, when I needed the user later on in the code, when I called getPrincipal, I got it. E.g.

JsecUser currentUser = JsecUser.findByUsername(SecurityUtils.getSubject()?.getPrincipal());

in reference to:

"void setUp() {       def subject = [           isAuthenticated: false,           ...       ] as Subject       SecurityUtils.metaClass.static.getSubject = {-> return subject }       ...   }"
- Nabble - grails - user - JSecurity-Plugin and Integration-Tests (view on Google Sidewiki)

Thursday, December 3, 2009

Class Diagram needs class groups selector

I love this plugin, but it really needs a way to graphically select some domain classes and delegate them to a diagram I could select from a menu or pick list or something.

in reference to:

"You may change diagram preferences defaults in your projects configuration file (Config.groovy)."
- Grails Plugin - Class diagram plugin (view on Google Sidewiki)

Seems pretty cool.

I think I like this Side Wiki. Now, if it would only let me highlight stuff for context, etc, I would love that.

in reference to: Google Sidewiki (view on Google Sidewiki)

Monday, October 26, 2009

Game Maker.... pretty cool


Last Weekend, I spent Saturday Morning volunteering my time with students from my son's charter school, Mountainville Academy. I hosted a workshop on the fun and accessible multimedia project/game factory called Scratch.

We went for 3 hours in smaller instructional periods, followed by hands on time. In my opinion, it was all very successful. We covered nearly half of the scratch blocks in the time allotted, and I could begin to see some nice projects coming along.

During that time, one of the students mentioned another game making software package called 'Game Maker', hosted at YoYo Games. I downloaded it and began playing with it a little bit. It had some truly brilliant features that were definitely missing from Scratch. However, it does appear less accessible than Scratch. I.e. I think Scratch hits my 5th graders really well, producing good projects in just a few hours. GameMaker is meant for High Schoolers and beyond, it would seem.

One thing I liked though, were some of the tutorials, including this one: What is a good game. I recommend that if you are in my class, you read it. It will help guide you in your game creation so that after you spend all that time building the game, people will want to spend time playing it.

For those in my class, I want to see all of your scratch projects. I have created a scratch gallery called Mountainville Academy projects located here. Take a moment to take a look at some of the projects there, and to put your own in there as well. I'll see you all on Halloween!

Tuesday, July 7, 2009

Using GraphViz to automatically Diagram your Grails Domain Model



I'm working on a feature that automatically diagrams the Domain model stored in Grails, similar to the method prototyped by the Curious Bunny here. His example works pretty well for a simple model, but begins to break down due to a seeming Grails limitation.

In my model, I have a Party, Organization and Company class. Company extends Organization, Organization extends Party.
Party <--- Organization < --- Company Inside of my Controller that produces the Graph, I iterate through a classes subclasses like so:

domainClass.subClasses.each {subClass ->
out.println """"$domainClass.name" -> "$subClass.name" """
}

This works ok, but when this is run on Company, both Party and Organization are in the set. In a UML diagram, I don't really want both of them, I only want one of them. I.e. it produces a diagram that is more cluttered than it needs to be.

This diagram represents a simplified subset of my domain, based off the Party Pattern Archetype in the book: Enterprise Patterns and MDA: Building Better Software with Archetype Patterns and UML

Notice the redundant inheritance.

Anybody know how to only get direct subclasses, instead of recursive subclasses?

Tuesday, April 21, 2009

Blog host

So, I'm trying to figure out how to host my own blog. Steve Pavlina suggests that I host it with its own domain name, using this domain provider Pair, and ServInt VPS using wordpress. It sounds like a brilliant idea, but I'm not too familiar with PHP.

Since I'm already very familiar with Java and JSP etc, I was wondering if there exists some sort of WordPress for java. Apparently there is, or I can get a free account at WordPress itself, but then they get all of the ad revenue.

My sister-in-law has her own blog called theliteratemother.org that is hosted on wordpress as well. It seems to be pretty cool, and maybe more like what I'm looking for.

Otherwise, I'm looking at spending at least $50/month to host it where Steve Pavlina suggests. I.e. ServInt.

Seems like I should at least as Bridget where she hosts hers, I suppose.

Hibernate Caching

I've been working on getting Hibernate caching to work at work to implement a new feature from Product Management. The original requirements suggested rolling our own caching mechanism, but since our application already has hibernate, it doesn't seem to make sense to roll our own.

Early investigation lead me here:

A wonderful article about hibernate caching. Since our application uses xdoclet for defining hibernate mapping, it wasn't quite complete.

But I really like the analysis because it displays rather clearly how much faster it runs with the caching thrown in.

I'm tempted as well to perform a similar analysis. The article talks about caching the object, and the relationships to the object, which are essential for my problem as well because I have a hierarchy in my objects of Parent -> child. My object is called the Domain Object.

the hbm_xml would be this:



The xdoclet then would be (found here):
/**
* @author petersmiley
*
* @hibernate.class table="Domains" dynamic-insert="true" dynamic-update="true" optimistic-lock="version"
* @hibernate.cache usage="read-only"
* @struts.form "DomainForm"
*
* @auditable.property entity-name="audit.entity.domain"
*/
public class Domain extends BaseObject implements Auditable, Comparable {
.... and the link back to the parent:
/**
* @struts.form-field form-name="parentDomain"
* @hibernate.cache usage="read-write"
* @hibernate.many-to-one
* column="PARENT_ID"
* class="com.norkom.base.resources.model.Domain"
* not-null="false"
* unique="false"
* --cascade="none"
* --outer-join="false""
*
* @auditable.property identified-by="parent.domain"
*/
public Domain getParentDomain() {
return parentDomain;
}
public void setParentDomain(Domain parentDomain) {
this.parentDomain = parentDomain;
}

Note: if you use "read-only" then don't expect to be able to put any objects into the database. When it says read-only, it means it! (I tried it. I had to change to read-write)

Here is my unit test:
public void testCachedCrud() {
List list = domainDao.getAllDomains();
assertEquals(0, list.size());
TestTimer createDomainsTimer = new TestTimer("test Create Domains");
int size = 10;
for (int i=0;i
Domain parentDomain = createBasicDomain(PARENT_DOMAIN_NAME + i);
for(int j=0;j
Domain childDomain = createBasicDomain(CHILD_DOMAIN_DOMAIN + i + ":" + j);
childDomain.setParentDomain(parentDomain);
domainDao.saveDomain(childDomain);
}
domainDao.saveDomain(parentDomain);
}
createDomainsTimer.done();

for (int i=0;i
TestTimer timer = new TestTimer("test Get Domains" + i);
Domain parentDomain = domainDao.getDomainByName(PARENT_DOMAIN_NAME + i);
timer.done();
}
}

Results, with cacheing:
INFO [DomainDaoImplTest] -> Loading config for: /com/norkom/base/business/dao/impl/test-context.xml
EMMA: collecting runtime coverage data ...
WARN [Configurator] -> No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: jar:file:/C:/work/trunk/SUBVERSION/Libs/hibernate/2.1.8/ehcache-0.9.jar!/ehcache-failsafe.xml
WARN [EhCacheProvider] -> Could not find configuration [com.norkom.base.resources.model.Domain]; using defaults.
DEBUG [TestTimer] -> test Create Domains: 140 ms
DEBUG [TestTimer] -> test Get Domains0: 0 ms
DEBUG [TestTimer] -> test Get Domains1: 0 ms
DEBUG [TestTimer] -> test Get Domains2: 0 ms
DEBUG [TestTimer] -> test Get Domains3: 0 ms
DEBUG [TestTimer] -> test Get Domains4: 0 ms
DEBUG [TestTimer] -> test Get Domains5: 0 ms
DEBUG [TestTimer] -> test Get Domains6: 0 ms
DEBUG [TestTimer] -> test Get Domains7: 0 ms
DEBUG [TestTimer] -> test Get Domains8: 0 ms

Now, lets try without caching...
DEBUG [TestTimer] -> test Get Domains9: 0 ms



Tuesday, March 24, 2009

Real Guitar Hero!

I've been wondering if there is a way to do Soft Mozart for Guitar, perhaps by reflectors on the guitar and shining an infrared light at it, using some tracking points on the guitar itself, and the WiiMote camera to track which strings are plucked, etc.

Keyboard Breakout


So, I just bought a keyboard along with some cool educational software called Soft Mozart to help teach my kids how to play music on the piano.

Since I'm such a geek, I also created a little game that uses the keyboard to play breakout.

Here is a screenshot.

You've got to have a midi keyboard plugged in to try it out. It uses JFugue for the Midi, and my old standbye, PulpCore for the game engine.

You can play it here: http://www.fishnetgames.net/games/breakout/index.html