Thursday, May 31, 2012

JIRA

Trying to do a short self-elucidative piece. What is it that doesn't klick for me with this JIRA thing? If there is a central thing that is the problem, not counting the slowness, the inconsistency, the clunkiness; they're all there, but not damningly so.

Could it be that it focuses on tasks, and not on what should be done?

I think that the cause of this is that it was designed as a bug-tracker, an issue system from the beginning. It feels like I may have written this before somewhere, maybe I think it is was an astute observation or something.

As I write, a new idea popped into my head: isn't that an assembly-line style of operation?

Now that wouldn't be so bad for me really, if it wasn't for the fact that...oh, short piece. Stop.

Wednesday, May 30, 2012

Eclipse's Java Stack Trace Console


Another one of these weird things that you don't know if it's deliberate or not. It's a good idea, paste some stack trace that you've copied from wherever, and it can help you find and open the source locations for editing or just perusal. But the implementation is really not that good. 

Exhibit A. We paste something like this:

True MySQLSyntaxErrorException (ProfileRequest.java:129)

Two links appear. Or: two blue underlines appear, appearing to be two links. In this example, 'MySQLSyntaxErrorException' forms one link, and the file name + line number the other, which is what I am actually after. But the links don't work separately. The first linkable thing found on each line seems to be what the whole line links to when you click.

I mean, just weird. Why show the second one as a link, if you don't have the time to implement it? Maybe it's using a regex syntax colorer or something.

The workaround is either to copy text with the intended links first on each line, or set the caret before the link and hit return to insert a linebreak before the intended link. The intended link will now be first on the next line, and thus we can click that line to open it.

And also, while I'm at it: don't keep multiple projects open, if they contain stuff that can confuse this thing. It seems it will not check further once it finds any library, source code or not, with a matching class name or whatever, even if there is another project that has source code for that class.

Friday, May 25, 2012

Alt 7

Did some testing on a Windows machine. Suddenly, the layout looked like a disaster. And it could not be fixed. I reverted some (small) changes, still no improvement. There was cursing. Involved colleague.  Colleague's version of the site looked fine. Mystifixation, Anger. Web Development.

Finally I realized: I must've inadvertently have touched the 'Alt' and '7' keys, which changes the compatibility mode to that of IE7.

Genuine class

I love web development. It's so...mature...integrated...well thought-out...tooled-up...yeah.

Just found the following stupid bug, and I don't intend to be a smart-Alec about it. It's trivial. So, we do these jquery things .live('click', function ...) or whatever. And we use 'class' for this. After some  refactoring, let's call it that, a clickable link changes behavior. 

Turns out that the rewrite put two 'class' attributes in the same element tag. The first class attribute contained some styling. The second class attribute contained the 'class' that controls the click action. The second class attribute is ignored.

The syntax-coloring html editor of the Eclipse I use does not flag this as a problem.

Conclusions: don't use 'class', use attributes. They are not as clumsy, except that they kind of have to be prefixed 'data-', so that tools don't color it in warning yellow, and the web can use new attributes in the brighter future. They also can have values. Also, find or invent better editing tools. Turn on html syntax warnings in browser, if it has them.

Wednesday, May 16, 2012

Java Operators MIssing

||=, &&=

Should be short-circuiting, of course.

Maven Classpath

mvn exec:exec -Dexec.executable="echo" -Dexec.args="%classpath"

That's one way you can get a classpath suitable for running a class in your project. I.e. it includes your 'target/classes'.

Now, how do you get the classpath for 'test'?

EDIT.

A to the Q: you use the 'classpathScope' parameter. Like so:


mvn exec:exec -Dexec.executable="echo" -Dexec.classpathScope=test -Dexec.args="%classpath"