Sunday Mar 23, 2014

Don't Create Brittle Software

Every developer is a software user/consumer at various levels, and I'm sure that every one of us has run into a dev tool, library, or component that left us cringing. Why is it so difficult to bend to our will? Why does it seem so broken? WHY DID IT STOP WORKING WITH THE LAST UPDATE???

User-facing software shouldn't break or perform in ways that are "ugly", and if your software is a library/component, neither should your API. Whoever your user is, updates shouldn't break things, and failures (of whatever kind) should be handled gracefully. For example...

If your software doesn't facilitate the user's activity, i.e. make it easier, it is at best sub-optimal and may even be unusable. If your library's API doesn't deprecate and migrate changes clearly and gradually, other developers may find it difficult or impossible to use as well.

User Experience (UX) is about so much more than a User Interface (UI). Whatever you develop should be clean, as intuitive as possible to use, and work in expected ways. Highly self-configurable (to the extent possible) is a huge plus as well. If you are developing a library or custom control, its value can be measured by two things:

  1. The ease with which it can be applied to and cover "default" applications (simplicity)
  2. The mechanisms you provide to cover edge cases or "the other 20%" (versatility/extensibility)

These two guidelines apply whether you publish your code as open source or not; after all, the goal of open source software is not to taunt other developers with what could have been and force them to do it themselves.

Keeping these things in mind can help a developer craft better software that is more useful to more people.

Just something that has been on my mind for awhile now...

Cheers,
Mark

Have a horror story you'd like to share? Please don't post names - no need for public floggings (!) - but if you have a particularly bad example that you use as a reminder to write better code, please share it in the comments so we can shudder with you. Misery loves company. :)

Monday Nov 18, 2013

MonologFX Update: Timed JavaFX Dialogs

When I wrote the original MonologFX dialogs for JavaFX, I was just trying to clean up a few things I'd done in my earlier project, DialogFX, that I felt could have been done better. Based upon some excellent feedback and suggestions, I rolled out the update...just as the OpenJFX team was releasing their own dialog code that is destined to be in JavaFX/OpenJFX. :-) As I mentioned in this previous post, rather than just hoard the code, I released it anyway in the hopes others might continue to find it useful - and updated the dialogs in the JFXtras Labs library as well - but didn't really expect there to be much continued interest.

I'm happy to say I was wrong. One of my goals was to make a very simple set of dialogs that worked well in most cases and that just "got out of the developer's way"...tools you didn't have to think about extensively to use in your JavaFX application, just "drop & go". They were never meant to be all things to all people, rather a solid option for most use cases. But...

I've gotten some excellent follow-on requests, and I've explored several of them. While I may never have the time to implement them all - and some wander FAR from the original goals - some just fit. One of those ideas was for timed dialogs.

What is a Timed Dialog, and When Would I Use It?

A few developers pointed out that there are occasions when an app is running unattended and dialogs can either a) stop everything or b) pile up by the droves on the user's desktop. And JFXtras implementer Scott mentioned how nice it would be to have an informational dialog that worked similar to a mail notification, popping up and then disappearing after some pre-determined amount of time. The user should also be able to clear the dialog immediately, of course.

Enter the timed dialog. Drawing inspiration from the aforementioned mail notifications and a sample game by colleague Angela Caicedo, I expanded upon Angela's game-switching example to create a (hopefully pleasing) dialog fade in/out effect. Using the number of seconds specified by the developer (you!) via the method setDisplayTime(int displayTime), MonologFX apportions a reasonable percentage of that time to fade in, display, and fade out operations...making user input entirely optional.

What Does it Look Like?

It's much easier to demo than it is to explain, so I created a quick video of a normal dialog, then a timed one, in action. Click here to watch it on YouTube.

Limitations, Caveats, "Keep Off the Grass" Signs

A timed dialog is really best suited for informational dialogs - those where there is no user input required, like the aforementioned mail notifications. If a response is required from a user and a dialog disappears of its own volition, which option should be chosen? The "cancel" option would seem best in some cases, and the "default" in others.

Creating the fade in/out effect required a non-blocking implementation, which meant that it would always return a value immediately...and in the current design, that is "cancel". Which again points to using them as informational dialogs, but not for obtaining user feedback.

So for the foreseeable future, timed dialogs are really focused upon and should be confined to use as informational dialogs. If you need the application user to make a conscious choice prior to proceeding, keep that dialog prominently displayed until you get a response!

Where Can I Get Them?

I've already pushed the code to my Github repository for MonologFX and the JFXtras-Labs 2.2 and JFXtras-Labs 8.0 repos. And if you just want to download a .jar file and kick the tires, I've put a copy in the MonologFX repo's dist folder. Just download the .zip file, unzip it, and run java -jar MonologFX.jar for a quick demo.

Odds & Ends

I also made a few architectural changes to MonologFX this weekend during our first-ever "Thanks For Sharing Informal, International HackFest", and more will be integrated over time. Please stay tuned for more information. :-)

Happy Coding!
Mark

Friday Aug 30, 2013

Join me at JavaOne 2013

I'm excited to be able to speak at JavaOne again this year! Last year was an incredible experience, great brain food for anyone committed to Java and the Java ecosystem. This year promises to be even better.

This year, I have the privilege of sharing the podium with some of my favorite folks in the world, from around the world! Here are the sessions I'll be taking part in:


Session ID: BOF2605
Session Title: JavaFX, Widgets, and Apps, Oh My! Launching Frameworks for Platforms Large and Small
Venue / Room: Hilton - Plaza A
Date and Time:9/24/13, 18:30 - 19:15

This is a Birds Of a Feather (BOF) session by Hendrik Ebbers, Carl Dea, and me. The best thing about BOFs (for me) is that in addition to allowing us to share what we've been working on, it allows like-minded attendees to fully participate, asking questions, sharing ideas...more like a round table for the whole room to take part in. It's incredibly stimulating, and a lot of learning takes place for all involved.


Session ID: TUT3676
Session Title: Java Embedded Extreme Mashups: Building Self-Powering Sensor Nets for the Internet of Things
Venue / Room: Hotel Nikko - Nikko Ballroom I
Date and Time:9/24/13, 12:30 - 14:30

This is a two-hour tutorial where Jose Pereda and I take attendees through building a self-licking, renewable energy (RE) ice cream cone.  :-)  Renewable energy systems come in all shapes and sizes, and embedded systems - especially Java-driven ones - are excellent for monitoring those systems. Building remote sensor nets that not only monitor and report system status, but are also powered by those same RE systems, is inexpensive and straightforward once you have the right hardware and know-how. We cover everything from hardware to software, communication and optimization, with solutions that scale well from small personal systems to utility-sized deployments. And we have a good time doing it.  :-)


So please, come join us! There's no better place to see what's happening in the world of Java than JavaOne. Hope to see you there!


All the best,
Mark

Tuesday May 28, 2013

Virtual Developer Day: Java ME, SE, and EE

It's an exciting time in the Java Jungle! There are a lot of things going on "in Java" right now, and as a result, there are several free webinars scheduled to provide introductions to technologies and concepts you might want to know a bit more about. Just recently, I mentioned the upcoming Introducing Java EE 7 webcast, and now there's another one you'll probably be very interested to attend. The best part(s)? You can attend from your home or workplace and it's completely free! The worst part? You may struggle to decide which track to take - they're all that good.

For this four-hour Virtual Developer Day, here are the tracks and their topics:

Separate dates/times are offered for western and eastern hemispheres; please click this link to learn more and register.

Keep the Java flowing,
Mark

Wednesday May 22, 2013

Java EE 7: Get Ready!

With the recent approval of the Java EE 7 platform JSR, Java EE 7 is on its way!

There will be two webinars to introduce new features and give you an idea of what all the buzz is about. You can access this feature-packed event from your own desk, jump in when you can and step away when you need to do so. Registering once gets you access to both days, so you can sign up now and nail down your schedule as the time approaches.

What will you see in this online event ?
  • Business Keynote (Hasan Rizvi and Cameron Purdy)
  • Technical Keynote (Linda DeMichiel)
  • Breakout Sessions on different JSRs by specification leads
  • Live Chat
  • Lots of Demos
  • Community, Partner, and Customer video testimonials

Follow this link to sign up, or click on the images above/below. "See" you there!

All the best,
Mark

About

The Java Jungle addresses topics from mobile to enterprise Java, tech news to techniques, and anything even remotely related. The goal is to help us all do our work better with Java, however we use it.

Your Java Jungle guide is Mark Heckler, an Oracle Java/Middleware/Core Engineer with development experience in numerous environments. Mark's current work pursuits and passions all revolve around Java and leave little time to blog or tweet - but somehow, he finds time to do both anyway.

Mark lives with his very understanding wife, three kids, and dog in the St. Louis, MO area.



Stay Connected

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today