Site Sponsors:
Dot-Bomb Developer Woes? 
Those of us who have been writing software for any length of time are becoming distressed by the army of - what seems to be increasingly - blissfully ignorant, if not implicitly arrogant - software maintainers.

Harsh Words?


Indeed, from completely alienating decade-long users from even wanting to touch things like the new Microsoft Word (ignorant - ever heard of Microsoft’s CUA guidelines?), to completely breaking our code & understanding of how a framework works (arrogant - do they think that the folks who originally designed it were stupid?), the prognosis for an egalitarian future looks about as short as the tenure that accompanies many of our maintenance woes.

Egads!


Such were my thoughts as I set my hand toward updating my electronic book reader recently. Wanting to simply replace a JTextArea in favour of some owner-drawn text, we blissfully set about creating our own JPanel to do just that.

Sadly, as I tested my new JPanel, "OMG" was the polite version of what raced thru my mind. The Panel drew. Then it blanked & went fascinatingly stupid on me.

What could be the problem?

Dues, & Dues Not?


Of course, for those of us who have paid our dues in learning the way of the paint(), validate() and update() paradigm, the recommended way of doing things TODAY in Java is to instead use paintComponent(). No problems there. Lots of folks have blogged about it: The default super.paint() quite reasonably manages the draw, as well as paintChildren(etc). Nice design.

Breakage


The problem is that, even after replacing paint() with paintComponent(), that the flippin' thing still blanks... and blanks... and draws & blanks. --So much so that folks who encounter the problem are being humiliated by folks who thought they knew how painting in Java works.

The Source is Strong with Us


Not to worry though, while only about .01% of the blogs are keeping up with the latest (or even dare date their articles!) Java lets us get to the source of the problem. By chasing the implementation down to the new PaintManager, it became obvious that double-buffering was the culprit. (Image was grabbed before my render - Blank!)

Know Thy Google...


Now that I knew what to 'google for, we came across a nice little post or two on the subject. Push comes to shove, it seems that most folks are okay with the fact that RepaintManager will work so as to ignore any traditional way of using a canvas, paint() or paintComponent() call. I, as well as many others, are not. Blanking our content by default is not cool. It is arrogant.

Fix


Sure, the point was made on posts cerca & since 2008 that "the comment on the paint manager has a warning", but the effect is to enforce behaviour on folks who might want to move their legacies forward without reading up on every framework & feature change. In short, things did not blank by default.

Who cares about that GrayRect fix for JDK 6 ... We assume that a company is using tenured resources. (Tenured software develops know their legacies.) We presume that companies know that the best software developer are SMEs on their products well before they are allowed to write a line of code.

Ass u me


I suppose we are now learning never to assume: In the battle between cost, quality, and time, quality takes a back seat. That has ever been the case?

Yet because anyone with a compiler-in-hand is allowed to "save" their companies a few dollars for-the-year, companies should not, therefore, mind as folks decide to abandon their flagship projects. Products like Mic.sos.oft Office. --Look at the savings hiring cheap developers brings!

But Frameworks like Swing impact millions of products. The way it operates should be sacred. Indeed, as I turn a jaundiced eye toward Java ballyhooing their embedded prowess this month, anyone with any tenure simply laughs up their sleeves. Why? Because we know that things like Hadoop are insanely busy re-writing the PERFORMANCE CRITICAL PARTS of their ENTERPRISE Map/Reduce TOOLING in C/C++. (Smile: Only those tiny players - like Facebook, Google, Yahoo, and the DoD, use Hadoop. There are only so many rooms full of servers one should be willing to host: Little wonder they have the need for speed!) (Amazon loves C/C++)

One Map / Reduce Process per JVM = lots of wasted processing power. Indeed, like everyone else, I have my OWN inane theory on one origin of black holes: I believe that, whenever the amount of idle oscillating processing power exceeds the ambient life-force energy (or something :) in any given solar system, that an inevitable implosion results when any rogue dark, strange, uncle (or aunty) -matter migrates there-to. --So the next time you ponder the Horsehead Nebula (or perhaps a stray asteroid ever-drifting nearer our orb?), whimsically imagine a logo in the midst of each perplexity, all body-snatchingly hissing & pointing our way, effectively declaring "Java / Intel Inside"? ;-)

The Way of the Farce


Java Everywhere, indeed? -You want to put Java in a pacemaker with 4K memory? Wow!

Anyone out there understand the very language an operating system is written in (C/C++) ... and why? BECAUSE C/C++ IS FASTER THAN JAVA, FOLKS! That, after all, is WHY we have JNI!

But does anyone c-a-r-e?

Of course not. It is all about marketing today - let the developer & user hang.

For shame!

O, say ... can you .. C?


But when it comes time for ME to look into OUR set-top box, operating system, interstellar probe, weapons system, or pacemaker (!), I, like every other tenured software developer, wants to see a sticker that effectively says "C/C++ Inside."

In the embedded marketplace, all we have to do is to witness how quickly innovations like the BASIC STAMP platform lost their market to AVR / Arduino (even Radio Shack now carries Arduino!) to see how much better C/C++ is ... ! Would anyone even laughingly consider writing an operating system in 100% pure Java?

So call me prejudiced. Call me evil. Call me a communist, liberal, or democrat... but we must believe that part of being a professional is to know the right tool, for the right job.

Conversely, part of being a neophyte is to do well to (1) learn how to use a hammer, but then to do poorly & try to (2) turn everything into a nail. That is just being lazy. (i.e. Be careful who you call "D-e-m-o-c-r-a-t"?! ;-)

Phew!


Okay - I got that our of my system (pun intended?) Everyone knows I love Java. I also love the way Obama was allowed to destroy the financial future of our nation. I also cherish the fact that both Oracle & Obama still think that what they have done is right. (I voted for the other guy :) Smart is what smart does?

So while far from being the most efficient implementation, and completely for educational purposes, here is how I solved the blinking text (or anything else you might want to draw!) problem in Java:


@Override
public void paintComponent(Graphics gr) {
...
if (manager == null) {
manager = RepaintManager.currentManager(this);
manager.setDoubleBufferingEnabled(false);
}
...
}


Now it works the way it did before all of those wonderful developers at Sun (ahem) forced their RepaintManager on U.S.

Enjoy!

-Rn

[ view entry ] ( 3409 views )   |  permalink  |  related link
New Features for EzLog for Java 
While working for the client mentioned earlier, we found ourselves starting & stopping tasks. So much so, that even a spreadsheet was being challenged to create an invoice.



That was the bad news. The GOOD news was that we had a real & present excuse to add another feature to EzLog4j:



So in addition to "hotel ranking" (1 - 5 stars) our log entries, we can *now* also add start & stop time information:


(old version)



(new version)


The result is the ability to track just how long we have been working.

Enjoy,

-Rn




[ view entry ] ( 2074 views )   |  permalink  |  related link
Ezlog4J - New Release 

Why The Release ...


I was recently involved in a very intense update of training for a Web-Server product. -Not only did the product have numerous new features & bugs, but my client wanted us to keep a journal of everything we were doing.

Blowing the dust off of an internal release of EzLog4J, I had forgotten how handy the tool can be! The release was so valuable, in fact, that we wanted to share that latest & greatest via the project release site.



IUO ... Not?


While we have been enjoying the listed features there-above for some time, Version 2.1 includes the ability to "hotel rank" log entries, search, triage, and export any number of logging events to CSV and HTML.

The bottom line is that even when we are logging every-little-thing, that we can also be hotel-ranking, exporting, and sharing our prioritized result-views with others.

S.W.A.T.


For example, we had numerous ideas why a crash was taking place. While I documented each event, I could also search the hive for common errors.

After we reviewed a set of events, by "hotel ranking" the most important log-entries, I could export only (for example) the "top" (5-Star) items. Better still, once exported we could also re-import them so as to start a new research project all-over-again.

It was like blogging in 5-D ... I even found an excuse to use the built-in voice recorder.

Simplicity is cool :)

Hype


Here is the official:

"Don't have time to write it down? No worries! EzLog4J is a graphical interface for managing voice notes, as well as text / HTML log entries.

Notes are captured to standard, editable, log-files. Logs can also be searched, filtered, & then shared via CSV and HTML.

EzLog4J is designed to run anywhere Java is installed. Works great on Windows, Mac OS X, Linux, and elsewhere.

EzLog4J makes a fine journal or categorized micro-blogger; It keeps track of all of those ad-hoc insights, ideas, & inspirations. -Details that can add up to help make any day, an inspired one!

From a professional point of view, by allowing us to quickly categorize our project-related activities, EzLog4J can help us diagnose complex problems, as well as assist us in creating better status reports.

Finally, EzLog is also free software. Because EzLog4J is free, we can share it with our friends, relatives, co-workers, and chance encounters until our hearts are content!

While somewhat dated (it looks a lot better now!), here is a recently re-published video on YouTube.


Enjoy,

-Rn


p.s. The video is ancient - it documents the first release. -There are many more features in the 2.1 update.


[ view entry ] ( 2425 views )   |  permalink  |  related link

<<First <Back | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | Next> Last>>