Welcome to Siva's Blog

~-Scribbles by Sivananda Hanumanthu
My experiences and learnings on Technology, Leadership, Domains, Life and on various topics as a reference!
What you can expect here, it could be something on Java, J2EE, Databases, or altogether on a newer Programming language, Software Engineering Best Practices, Software Architecture, SOA, REST, Web Services, Micro Services, APIs, Technical Architecture, Design, Programming, Cloud, Application Security, Artificial Intelligence, Machine Learning, Big data and Analytics, Integrations, Middleware, Continuous Delivery, DevOps, Cyber Security, Application Security, QA/QE, Automations, Emerging Technologies, B2B, B2C, ERP, SCM, PLM, FinTech, IoT, RegTech or any other domain, Tips & Traps, News, Books, Life experiences, Notes, latest trends and many more...

Wednesday, July 21, 2010

Quote of the Day!

Everyone thinking of changing the world, but no one thinks of changing himself!!!

Saturday, July 10, 2010

Search and Replace Tricks in EditPlus

From EditPlus Wiki - http://editplus.info/wiki/Search_and_Replace_Tricks

Suppress all empty lines

Find: "^\n" (without quotes)
Replace: "" (without quotes)
RegExp
Note: You may have to repeat it several times to remove all empty lines (until the editor can't find the string to replace), because only the first one of a series of consecutive empty lines will be edited.

Suppress all non-empty lines

Find: "^.+$" (without quotes)
Replace: "" (without quotes)
RegExp


Comment out lines

Find: "^" (without quotes)
Replace: "// " (without quotes)
RegExp
Note: Empty lines will not be affected. This example actually adds a text at the beginning of every non empty line, the comment symbol used ("//") is the one of PHP.

Comment lines

Find: "$" (without quotes)
Replace: " // Comment here" (without quotes)
RegExp
Note: Empty lines will not be affected. This example actually adds a text at the end of every non empty line, the comment symbol used ("//") is the one of PHP.

Join lines

Find: "\n" (without quotes)
Replace: "," (without quotes)
RegExp
Note: Turn separated lines into comma separated values. Empty lines will be affected as well.

Split lines

Find: "," (without quotes)
Replace: "\n" (without quotes)
RegExp
Note: Turn comma separated values into separated lines. Consecutive commas will generate empty lines.

Remove all leading spaces and tabs from every line

Find: "^[ \t]+" (without quotes)
Replace: "" (without quotes)
RegExp
Note: this will obviously remove any indentation


Remove all trailing spaces and tabs from every line

Find: "[ \t]+$" (without quotes)
Replace: "" (without quotes)
RegExp


Remove consecutive spaces

Find: "  +" (without quotes)
Replace: " " (without quotes)
RegExp
Example: before: "this  is an   example", after: "this is an example"

Fix punctuation

Find: "([\.\,\;\:\?\!])([a-zA-Z])" (without quotes)
Replace: "\1 \2" (without quotes)
RegExp
Example: before: "How are you?I'm fine,thanks.", after: "How are you? I'm fine, thanks."
Note: If you want to use this statement in a Wiki context, remove "\:" from the search string, otherwise you may break Wiki metatags, for example [[Category:Example]] will be replaced by [[Category: Example]]

Wrap a tag pair around a text

Find: "(bold)" (without quotes)
Replace: "\1" (without quotes)
RegExp
Example: before: "bold", after: "bold"

Wrap a tag pair around every line

Find: "^(.+)$" (without quotes)
Replace: "


  • \1





  • " (without quotes)
    RegExp
    Note: this example wraps the tag pair







  • every line to create a list of items; you'd probably want to apply changes only to a selected text.

    Delete everything inside a tag pair (keeping tags)

    Find: "().+()" (without quotes)
    Replace: "\1\2" (without quotes)
    RegExp
    Note: Tags must be on the same line.
    Example: before: "this is an example", after: "this example"

    Delete everything inside a tag pair (removing tags too)

    Find: ".+" (without quotes)
    Replace: "" (without quotes)
    RegExp
    Note: Tags must be on the same line.
    Example: before: "this is an example", after: "this  example"

    Delete all lines containing a given string

    Find: "^.*STRING.*$" (without quotes)
    Replace: "" (without quotes)
    RegExp
    Note: Lines will be emptied but not suppressed. See #Suppress all empty lines to suppress empty lines.

    Replace only the first occurrence of a character

    Find: ";(.*)" (without quotes)
    Replace: "|\1" (without quotes)
    RegExp
    Note: In this example, only the first occurrence of ";" for each line will be replaced with "|".
    Example: before: "this;is;an;example", after: "this|is;an;example"

    Replace only the last occurrence of a character

    Find: "(.*);" (without quotes)
    Replace: "\1|" (without quotes)
    RegExp
    Note: In this example, only the last occurrence of ";" for each line will be replaced with "|".
    Example: before: "this;is;an;example", after: "this;is;an|example"

    Truncate a string after the first occurrence of a marker (keeping the marker)

    Find: "^([^;]*;).*$" (without quotes)
    Replace: "\1" (without quotes)
    RegExp
    Note: In this example, the marker is ";".
    Example: before: "this;is;an;example", after: "this;"

    Truncate a string at the first occurrence of a marker (removing the marker too)

    Find: "^([^;]*);+.*$" (without quotes)
    Replace: "\1" (without quotes)
    RegExp
    Note: In this example, the marker is ";".
    Example: before: "this;is;an;example", after: "this"

    Truncate a string after the last occurrence of a marker (keeping the marker)

    Find: "^(.*;).*$" (without quotes)
    Replace: "\1" (without quotes)
    RegExp
    Note: In this example, the marker is ";".
    Example: before: "this;is;an;example", after: "this;is;an;"

    Truncate a string at the last occurrence of a marker (removing the marker too)

    Find: "^(.*);.*$" (without quotes)
    Replace: "\1" (without quotes)
    RegExp
    Note: In this example, the marker is ";".
    Example: before: "this;is;an;example", after: "this;is;an"

    Truncate a string before than the first occurrence of a marker (keeping the marker)

    Find: "^[^;]*(;.*)$" (without quotes)
    Replace: "\1" (without quotes)
    RegExp
    Note: In this example, the marker is ";".
    Example: before: "this;is;an;example", after: ";is;an;example"

    Truncate a string up to the first occurrence of a marker (removing the marker too)

    Find: "^[^;]*;(.*)$" (without quotes)
    Replace: "\1" (without quotes)
    RegExp
    Note: In this example, the marker is ";".
    Example: before: "this;is;an;example", after: "is;an;example"

    Truncate a string before than the last occurrence of a marker (keeping the marker)

    Find: "^.*(;.*)$" (without quotes)
    Replace: "\1" (without quotes)
    RegExp
    Note: In this example, the marker is ";".
    Example: before: "this;is;an;example", after: ";example"

    Truncate a string up to the last occurrence of a marker (removing the marker too)

    Find: "^.*;(.*)$" (without quotes)
    Replace: "\1" (without quotes)
    RegExp
    Note: In this example, the marker is ";".
    Example: before: "this;is;an;example", after: "example"

    Turn a CSV table into a list of PHP if conditions

    "^([^\,]+)\,([^\,]+)\,([^\,]+)$" (without quotes)
    "elseif (vcmp$=="\1") {$v2="\2"; $v3="\3";}" (without quotes)
    RegExp
    Example: before: "Italy,Rome,Euro", after: elseif (vcmp$=="Italy") {$v2="Rome"; $v3="Euro";}
    Note: In this example, there are three values per record, and the CSV separator is a comma (,), you may need to replace it with another character like \t for tab. Remember to change the first "elseif" to "if".

    Truncate last value from a MySQL INSERT query

    Find: "(VALUES \(.+), *.+\);" (without quotes)
    Replace: "\1);" (without quotes)
    RegExp
    Example: before: "INSERT INTO table VALUES ('value1','value2','value3');", after: "INSERT INTO table VALUES ('value1','value2');"

    Keep only last value in a MySQL INSERT query

    Find: "(VALUES \(.+,)(.+\);)" (without quotes)
    Replace: "VALUES (\2" (without quotes)
    RegExp
    Example: before: "INSERT INTO table VALUES ('value1','value2','value3');", after: "INSERT INTO table VALUES ('value3');"

    Turn MySQL fields into empty values

    Find: "`[^`]*`([\,\)\'\"])" (without quotes)
    Replace: "''\1" (without quotes)
    RegExp
    Example: before: "INSERT INTO table (`phone`,`phonecell`,`fax`) VALUES (`phone`,`phonecell`,`fax`);", after: "INSERT INTO table (`phone`,`phonecell`,`fax`) VALUES ('','','');". (Only the second instance of "(`phone`,`phonecell`,`fax`)" must be selected and search and replace must be applied to such selection).
    Note: this is meant to replicate the values in a INSERT query according to the specified fields (and use the empty values as a placeholder): you simply need to copy the fields and past them after VALUES, and then replace them this way.

    Wikification: Link all elements of a list

    Find: "(\*)(.*)$" (without quotes)
    Replace: "\1[[\2]]" (without quotes)
    RegExp
    Example: before: "*Example", after: "*[[Example]]"

    Wikification: Link all elements of a list, changing the linked text

    Find: "(\*)(.*)$" (without quotes)
    Replace: "\1[[\2_(category)|\2]]" (without quotes)
    RegExp
    Example: before: "*Example", after: "*[[Example_(category)|Example]]"

    Thursday, July 8, 2010

    findJAR.com

    findJAR.com is a JAR search engine that helps Java developers to find JAR libraries containing required Java classes.  

    http://www.findjar.com/

    Monday, July 5, 2010

    50 tips for successful teams

    Teamwork is not rocket science, and mostly a matter of common sense. Here are 50 simple but powerful ways you could make teamwork work.

    1.    Act with integrity; this is one quality that will make a great team.
    2.    Credibility as a team-leader is mostly as good as only it is perceived. So display credibility and act with credibility.
    3.    Walk the talk, you get judged well only when you walk the talk. Example: if you are asking for quality work, it’s a given that you also would do the same. Doing the other way destroys credibility.
    4.    Be enthusiastic; encourage the team to be enthusiastic as well.
    5.    Never hire in haste, which makes waste.
    6.    Educate the team on who your customer is, who your competition is.
    7.    Create a mechanism to know what is happening in competition.
    8.    Let the team know that the customer is supreme, and he is your most important asset.
    9.    Give no room for politics in your team. At the hint of it, stem it at the root; and exhibit the fact that politicking is a strict no-no.
    10.    Communicate personally as often as possible; use the phone; only re-iterate in written communication.
    11.    Smile and laugh in the team, work need not be serious as most of us would think it to be.
    12.    Share the joy of any of your team-members.
    13.    Share and partake in their sorrows. Give a helping hand, in whichever way you can when a need arises.
    14.    Make the team workplace a fun place to be; again laugh and smile.
    15.    Show the team member how happy you are to have him/her in the team.
    16.    Celebrate each of your team-members birthdays, anniversary… pass on gifts voluntarily.
    17.    Have a vision statement for the team; in line with the organization’s vision statement.
    18.    Make the purpose of the team clear – it could be revenues, number of customers, turn around time, producing so many units… whatever.
    19.    Let this purpose be written down and shared amongst all team members.
    20.    Set individual goals clearly – leave no ambiguity in this – make it measurable for them as well as you.
    21.    Clear state the expected quality of work, and quantity of work – on a day, for  a week, for the month, and for the year.
    22.    Go out of your way to help a team member reach the stated goal.
    23.    Make each of them feel that he/she can confide in you.
    24.    Understand and talk to them of their job-goals and career goals.
    25.    Make learning a team habit. Encourage learning in any form.
    26.    Train the team in relevant and contemporary work skills.
    27.    Build the team on the strength of his/her personal qualities.
    28.    Don’t brood on their weaknesses. Or pass comments on them.
    29.    Make them aware of the business opportunities and threats, and the way to remain in a position of advantage.
    30.    Build a lot of fun around the goals..  make work interesting…..
    31.    Celebrate small milestones, by any team member, and shower praises in public
    32.    Celebrate and reward team ideas, which would bring in better results, fresh insights, and knowledge to all – and celebrate this each and every time.
    33.    Discourage yes-men. If two people agreed on everything, then one of them is redundant.
    34.    Show the team members a growth path – a path that would be intertwined with positive contribution.
    35.    Reward excellence. Abhor mediocrity.
    36.    Do not reprimand team members. Grown ups don’t need to be reprimanded; they only need to be counseled or advised.
    37.    Allow people to make mistakes, which are the only way you get a learning team. Sans mistakes, no new things are going to happen.
    38.    Make corrections well in time; not once in a blue moon. Once in a blue moon corrections upset the person, you and the team objectives.
    39.    Evince interest in each individual; know them a little more than professionally – their family, their interests, passion, hobbies etc.
    40.    Go for lunch once a week outside the office campus; this is by far the best way to bond.
    41.    Get the families of teams together once a month. If the teams are cross location, make it at least once in a quarter.
    42.    Be transparent and rational in all decision making.
    43.    Be objective and not subjective in any of your deeds at work, and related to work.
    44.    Make incentive plans objective, simple and clear. Complicated plans lead to a lack of uniform understanding across the team. This colors judgment, and defeats the team spirit.
    45.    Take personal interest to ensure that all pay-out timelines are adhered to by the organization and the divisions.
    46.    State clearly that a performer would have a soft corner, and would be rewarded.
    47.    Reward performers often. And for the accomplishments.
    48.    Keep team meetings brief, and with a stated objective and agenda.
    49.    Do not meet formally without a written agenda circulated.
    50.    Build in a surprise element in rewards for small wins – this could be internal or external to the organization – could be a new client acquired, a new proposal, a cost saving measure, a new idea, whatever…