I know that I know nothing

testing tools

clock March 11, 2016 21:19 by author Administrator

screenshot on mac

clock July 30, 2015 11:38 by author Administrator


clock May 2, 2015 22:09 by author Administrator

“I’m the smartest man in Athens because I know that I know nothing.” —Socrates 470-399 BC

To see the number of process for a user run this

clock November 25, 2014 21:46 by author Administrator

To see the number of process for a user run this (replacing [user] with the username):


ps -eLF -u[user] | wc -l

Open multiple Eclipse workspaces on the Mac

clock January 27, 2014 17:26 by author Administrator

At the command line, navigate to your Eclipse installation. For example:

cd /Applications/eclipse/

or wherever you installed Eclipse to.

Once there, launch Eclipse as follows:

./eclipse &

This will launch eclipse and immediately background the process.

example cd /azizkhani/Download/eclipse/

درد یک پنجره را پنجره ها می فهمند

clock January 26, 2014 21:49 by author Administrator


درد یک پنجره را پنجره ها می فهمند

معنی کور شدن را گره ها می فهمند

سخت بالا بروی ، ساده بیایـــــی پایین

قصه ی تلخ مرا سرسره ها می فهمند

یک نگاهت به من آموخت که در حرف زدن

چشم ها بیشتر از حنجره ها می فهمند

آنــچه از رفتنت آمد بــــــه سرم را فـــردا

مردم از خواندن این تذکره ها می فهمند

نه نفهمید کســــی منزلت شمس مرا

قرن ها بعد در آن کنگره ها می فهمند


Good vs Bad Leader

clock January 10, 2014 21:48 by author Administrator


ContextGood LeaderBad Leader
Responsibility A good leader always takes responsibility of his project. If the project fails, he knows he’s the one to blame and he has the courage to admit it. A bad leader knows it can’t be his fault, so he channels his energy into proving his team was the culprit, or maybe just some members he doesn’t like anyway.
Hard-work A leader is a role-model for his team members. He’s working at least as hard as any other team member. Just because he’s the authority, it doesn’t mean he has to work only what he enjoys, leaving the ugly stuff for the rest of the team. A bad leader has had enough already. Why he should write code anymore when you have all these guys at your service.
Mentoring A good leader always mentors his junior team members. He doesn’t let them fail with difficult assignments. He knows that investing in his team will definitely bring a return of investment in the form of quality. A bad leader doesn’t care about this stuff. The less experienced members should be hardened through tough tasks.
Respect A good leader respects all his members, no matter how skillful they are. He knows that there is only one way to lead a team, and that’s through respect, not fear. A bad leader doesn’t respect anyone but himself. He may laugh when someone makes a mistake, that’s going to be reported the upper management anyway.
Climbing the company hierarchy A good leader believes in skills and professionalism. He does his job and expects to earn the right position he deserves. A bad leader doesn’t have many skills, but he’s a master bootlicker. As much as he despises his subalterns, he’s constantly flattering his superiors.
Anger management A good leader is emotionally mature, so he knows how to control his feelings. He doesn’t scream at his team, or threatens them in any way. A bad leader likes to show his rank, and what could be a better way if not through intimidating his team. He knows that fear is a great motivator.
Trust A good leader trust his team members. He knows he’s working with intelligent individuals that couldn’t have made it here otherwise. That’s why he encourages everybody to push themselves out of their knowledge comfort zone, so they could end up learning more, and becoming better. A bad leader doesn’t trust anyone but himself. And those less experienced developers shouldn’t be given anything but writing documents, or probably doing some unit tests for the code he writes. After all, who likes all that hassle of testing perfectly written code anyway.
Task assignment A good leader chooses those tasks everybody is running away from. He gives an example when assigning himself laborious tasks everybody’s had enough of. A bad leader always chooses the tasks he likes best. Maybe it’s a new framework he would love trying out, and why would anyone give up on such a pleasant experience. If he finds it to too difficult, he can then pass it to his team, to fix the remaining issues.
Reporting issues A good leader tries to do his best to overcome any difficulty. But there are times when this is not enough, so he immediately reports the situation to his upper management, so proper action may be taken. A bad leader always masks issues. He doesn’t like to report them, since that may affect his good reputation. If the problem arises he will try to find someone to blame, as it can’t ever be his fault.
Code Reviewing A good leader believes in code review and encourages his team to take part into reviewing others’ work. When recurrent issues arise, he writes them into a shared knowledge blog, so that everybody can learn better ways of tackling a given problem. A bad leader doesn’t have time for reviewing, and everybody is on his own anyway. If someone breaks something, the bad leader will simply tell on him.
Frustration A good leader may have been led by a bad leader, and he promised himself he wouldn’t ever be that guy. He is mature enough to learn from others’ mistakes. A bad leader wants others to suffer as he suffered when he was himself a junior.
New ideas A good leader likes to listen more than talking. He let all his team members participate in any brain-storming session. He knows that great ideas may pop-up from where you’d expect less. A bad leader doesn’t like when others show off their so-called good ideas. His ideas are better anyway. And if he hears an interesting opinion, he may laugh at it, and then go to the upper management praising what he’s just come up with.


Applying the 80:20 Rule in Software Development

clock November 16, 2013 18:58 by author Administrator

80:20 Who uses What, What do you Really have to Deliver

Another well-known 80:20 rule in software is that 80% of users only use 20% of features. This came out of research from the Standish Group back in 2002, where they found that:

  • 45% of features were never used;
  • 19% used rarely;
  • 16% sometimes;
  • only 20% were used frequently or always.

What is a software quality?

clock September 5, 2013 21:12 by author Administrator

Quality(T) = Changeability(T) / Known defects(T)

What can we say about software quality and defects?

  • Software quality is inversely proportion to the number of defects in the system: high quality implies few defects and vice versa
  • Defects have undesirable consequences
  • Defects incur costs, in all likelihood financial costs but there are others, time in particular. Even if defects are not fixed they will incur costs, e.g. over payments from a financial system or people ringing the helpline to report a spelling mistake
  • Removing defects requires rework and rework costs time and money

define “Easy to change”

  • Change is localized
  • Change is less error-prone – perhaps better stated as “change does not inject defect” (Somewhere in Jones writing he suggests 7% of defect fixes inject new defects so high quality software would have a bad fix injection rate less than 7%)
  • Change is more maintainable, i.e. changing software does not detract from the changeability of the software

Weblogic fast-swap

clock May 17, 2013 22:23 by author Administrator

This is something that could eat up time in any bigger project. If you make changes to your working application and you need to track down bugs, it's inevitable to redeploy your application on any change. What is done in seconds, if you
a) know the WLS administration and/or
b) your application is quite lean

If you have a fullblown JEE application with all the magic inside, it's no problem to wait for a successful redeployment for minutes.
In practice there are some ways to get rid of this overhead very quickly.

1) Weblogic's ChangeAwareClassLoader (WLS <=10.x)
Java classloaders do not have any standard mechanism to undeploy or unload a set of classes, nor can they load new versions of classes. In order to make updates to classes in a running virtual machine, the classloader that loaded the changed classes must be replaced with a new classloader. When a classloader is replaced, all classes that were loaded from that classloader (or any classloaders that are offspring of that classloader) must be reloaded. Any instances of these classes must be re-instantiated. If you deploy an exploded application and run the WLS in development mode, you can take advantage from the ChangeAwareClassloader. If you make changes to a single class, the WLS simply replaces the whole classloader and starts over with your newly created class. This was one of the first approaches to quicker development roundtrips. Anyway it is still not the solution for bigger applications.

2) Weblogic Fast-Swap (WLS >=10.x)
Java EE 5 introduces the ability to redefine a class at runtime without dropping its ClassLoader or abandoning existing instances. This allows containers to reload altered classes without disturbing running applications, vastly speeding up iterative development cycles and improving the overall development and testing experiences. The usefulness of the Java EE dynamic class redefinition is severely curtailed, however, by the restriction that the shape of the class – its declared fields and methods – cannot change. The purpose of FastSwap is to remove this restriction in WLS, allowing the dynamic redefinition of classes with new shapes to facilitate iterative development.

With FastSwap, Java classes are redefined in-place without reloading the ClassLoader, thereby having the decided advantage of fast turnaround times. This means that you do not have to wait for an application to redeploy and then navigate back to wherever you were in the Web page flow. Instead, you can make your changes, auto compile, and then see the effects immediately.

    • FastSwap is only supported when WLS is running in development mode. It is automatically disabled in production mode.
    • Only changes to class files in exploded directories are supported. Modifications to class files in archived applications, as well as archived JAR files appearing in the application’s classpath are not supported.

To enable FastSwap in your application, add <fast-swap>true</fast-swap> to the weblogic-application.xml file.

FastSwap can also be enabled for a standalone web-application by adding the <fast-swap> element to the weblogic.xml file.

Once FastSwap is enabled at the descriptor level, an appropriate ClassLoader is instantiated when the application is deployed to WLS. It is recommended that you have your IDE setting set to "compile-on-save" so that java files are compiled on saving. The FastSwap agent tries to find all classes that have been modified since the last iteration by looking at all directories in the classpath.

FastSwap is supported with POJOs (JARs), Web applications (WARs) and enterprise applications (EARs) deployed in an exploded format. FastSwap is not supported with resource adapters (RARs).


Supported changes:
    • Addition and Removal of static methods
    • Addition and Removal of instance methods
    • Changes to static and instance method bodies
    • Addition and Removal of static fields
    • Addition and Removal of instance fields
    • Java Reflection results do not include newly added fields and methods and include removed fields and methods. As a result, use of the reflection API on the modified classes can result in undesired behavior.
    • Changing the hierarchy of an already existing class is not supported by FastSwap. For example, either a) changing the list of implemented interfaces of a class; or b) changing the superclass of a class, is not supported.
    • Addition or removal of Java annotations is not supported by FastSwap, since this is tied to the reflection changes mentioned above.
    • Addition or removal of methods on EJB Interfaces is not supported by FastSwap since an EJB Compilation step is required to reflect the changes at runtime.
    • Addition or removal of constants from Enums is not supported.
    • Addition or removal of the finalize method is not supported.

When FastSwap is enabled, after you recompile a class, FastSwap attempts to redefine classes in existing classloaders. If redefinition fails because your changes fall outside the scope of supported FastSwap changes, the JVM throws an UnsupportedOperationException in the WLS window and in the server log file. Your application will not reflect the changes, but will continue to run.


About the author

 Welcome to this web site . This page has two purposes: Sharing information about my professional life such as articles, presentations, etc.
This website is also a place where I would like to share content I enjoy with the rest of the world. Feel free to take a look around, read my blog

Java,J2EE,Spring Framework,JQuery,

Hibernate,NoSql,Cloud,SOA,Rest WebService and Web Stack tech...


Month List

Sign In