JUNPATTERN 1.
Use
as many JUNPATTERNS as you can in your applications.
JUNPATTERN 2.
Make
everything public. No matter what – fields, properties, methods… If someone has
the goal to hack your app – he will manage to do this anyway. So why then we
need to suffer from the lack of access to something once again?!
JUNPATTERN 3.
Make
members static, if possible. Especially methods. Why do we need to create an
instance of an object to access the method, if we can simply make it static and
use it on the class level?! So the best solution is to make it static, believe
me.
JUNPATTERN 4.
Copy
the code. So you always have needed logic in front of your eyes, without making
mouse clicks in attempt to find some method. We even don’t need these
complications with inheritance!
JUNPATTERN 5.
Don’t
write unit tests – they are useless. If you have written the code, you clearly
know that it works splendid! Therefore – unit testing is just the waste of your
time.
JUNPATTERN 6.
Don’t
be afraid of nested code blocks. That’s OK if you face with 10-level nested
code construction. Why should we spray our important and complex business logic
in different locations?!
JUNPATTERN 7.
Create
a special class for storing various methods. So it’s a great and convenient location
to place all methods you don’t know where to place. Don’t forget to make it
static!
JUNPATTERN 8.
Always
catch exceptions and use empty catch blocks. It prevents users of our
application from being scared at the sight of the error message.
JUNPATTERN 9.
Create methods large number of
parameters, instead of separating the global task solution into separate
methods with few parameters. This approach is more resultative and convenient.
JUNPATTERN 10.
To be continued…