Skip to main content

Funny Programming Mistake

I thought you might find this programming mistake I made to be somewhat humorous.
public MyJSplitPane getMyJSplitPane() {
 MyListener myListener;
 MyArray[] myArray;

 myArray = source1.getMyArray();
 if (myJSplitPane == null) {
  myListener = getMyListener();
  myJSplitPane = new MyJSplitPane(myArray, myListener);
 }
 return myJSplitPane;
}

/**
* @return Returns the myListener.
*/
private MyListener getMyListener() {
 MyJSplitPane myJSplitPane;
 if (myListener == null) {
  myJSplitPane = getMyJSplitPane();
  myListener = new MyListener(source2, myJSplitPane, this);
 }
 return myListener;
}

Comments

Popular posts from this blog

What We're About

About Us Mission Statement: We provide a product to make high performing software developers happy by giving them a chance to work in a more self-directed way on software that is more meaningful to them. Core Values (in priority order): Integrity : Honesty, trustworthiness, and faithfulness Preparation : Research, planning, and goals Reputation : Branding, naming, presence, and networking Profitability : Product sales Production : Product development, ideas, online content Improvement : Research and training Support : Minimal overhead Who We Are Isaac Serafino  is a Software Architect in Omaha, Nebraska. He has a strong experience developing technology solutions. He has long had the dream to lead his own startup business. Our Products Snap Screen™ More efficiently provide a safe environment for using electronic devices. Sends pictures of what is on the display at somewhat random times so user knows they could be observed at any time, but the supervisor does not

The Importance of Direction

Which would you say is more important: getting somewhere faster, pushing something harder, or going the right direction? It should be obvious that no matter how much speed or power you use, that won't do any good if you're going the wrong direction. It could also be pointed out that early in a journey, even a small change in direction makes a big difference in where you end up. Therefore, we should make sure we have our direction correct, as the first priority.

How (Not) to Handle Different Exceptions

Came across this sample from a certain multi-billion-dollar company, purporting to show how to implement exception handling. I slightly changed a few cosmetic details to make it anonymous. try { // ... } catch (GeneralException e) { if (e instanceof SpecificExceptionA){ // ... } else if (e instanceof SpecificExceptionB){ // ... } } This is a true actual story--you can't make this stuff up. Yeah, I thought it was pretty hilarious; so I felt like I had to share it.