Tech Talks
Saturday, June 9, 2018
Java Keytool
A reference to good article about java keytool
https://dzone.com/articles/understand-java-keytool-keystore-commands?edition=377191&utm_source=Daily%20Digest&utm_medium=email&utm_campaign=Daily%20Digest%202018-04-24
Saturday, April 14, 2018
AOP Concepts
AOP Concepts
Aspect
Central unit
contains the code that explains the weaving rules
Join Point
Points in the execution of an application (Execution points)
Places where the crosscutting actions taken place
Pointcut
A mechanism for selecting join points
Program construct that selects join points and collects context at those points.
Collect the join point context
Eg : execution(public * *.*(..))
Advice
Before
Around
After
BeforeReturn
AfterReturn
BeforeThrow
AfterThrow
Aspect
Central unit
contains the code that explains the weaving rules
Join Point
Points in the execution of an application (Execution points)
Places where the crosscutting actions taken place
Pointcut
A mechanism for selecting join points
Program construct that selects join points and collects context at those points.
Collect the join point context
Eg : execution(public * *.*(..))
Advice
Before
Around
After
BeforeReturn
AfterReturn
BeforeThrow
AfterThrow
Saturday, October 21, 2017
Synchronizing with Public/Open Source source code
Usecase/Problem Scenario :
- I am using an opensource source project as a base for my project.
- I need to make my custom implementation/changes.
- But the open source project is still under active development.
- I need to merge the changes from public project to private project which is in another repo.
Solutions is:
1. Clone the public project in local.
git clone -o https://github.com/sample_project.git
2. cd into the your project, which you have clonned already.
cd my_project
3. add the base project as a remote reference to your repository
git remote add -f base_project C:\sample_project
4. Pull the changes.
git pull base_project master --allow-unrelated-histories
5. Resolve the conflicts & commit
Limitations:
- Need to perform the pull manually each time. Which is in another way is safe.
Above is the solution which I formulated based on the references I made. Please let me know is there any further limitations in this approach.
Welcome if there any better alternative of this use-case.
- I am using an opensource source project as a base for my project.
- I need to make my custom implementation/changes.
- But the open source project is still under active development.
- I need to merge the changes from public project to private project which is in another repo.
Solutions is:
1. Clone the public project in local.
git clone -o https://github.com/sample_project.git
2. cd into the your project, which you have clonned already.
cd my_project
3. add the base project as a remote reference to your repository
git remote add -f base_project C:\sample_project
4. Pull the changes.
git pull base_project master --allow-unrelated-histories
5. Resolve the conflicts & commit
Limitations:
- Need to perform the pull manually each time. Which is in another way is safe.
Above is the solution which I formulated based on the references I made. Please let me know is there any further limitations in this approach.
Welcome if there any better alternative of this use-case.
Make use of Subversion (SVN)
NOTE : THIS IS AN UNFINISHED ARTICLE. PLEASE EXPECT ERRORS
What is version control?
What is SVN?
Why you need a version controller?
How to use a version controller?
What is SVN?
Why you need a version controller?
How to use a version controller?
My intrest on start this blog is to discuss about How to use a version controller. But to give more clarity, I have started with some concepts as well.
A version controller is a tool that manages the versioning of your source code(my point is versioning the source code; there are several tools that manages other stuff also; eg. Document version control).
This enables you to go privious and forward in your change history.
Each change commit will be given a unique version.
This enables you to go privious and forward in your change history.
Each change commit will be given a unique version.
When a version controler is useful. Does it useful for a single man project; a univercity project.
I have experiance of deleting source code and searching for a backup. Situation like confuced among two backups, which is latest?
So yes. Its useful for even single man, 5 files project.
To agree on me you need to know advantages of it. Ask Google.... it will tell you more than this.
Hurre im using a version controller, version management of my code is cool. NO!
He he, this is ware the intreresting poit comes. Any version management tool will helps you to manage your code versioning, it ONLY helps.
What ever tool you use version manageent of our code is purely depends on your practice.
Your update and commit practice.
Ah at least now came to the point i wanted to talk about.
How to use svn.
Always keep your code updated. Referances saying that every 10 to 20 minuits the source code should be updated.
This is very important in multy player projects.
Actually the concept is
Repository should always have wroking code.
Commit practice it very important part and debeatable part. When and what should i commit to the repo.
Your commit practice is depends on your coding practice.
Actually recommended way as i think is each time when you completed a unit it has to be commited. Several units togather builds a feature or function. A unit is a pice of code which is testable and which adds value the the project.
All version controller allows to add a commit message while commiting. This is a very importent point. This is what helps us to understand what has been commited in this revesion. So make use of it. Usual recommendation is keep it short and meaningful.
PS :
6Published with Blogger-droid v2.0.10
Friday, July 15, 2016
Less IFs, more power.
Have you ever wondered how IFs impact on your code? Avoid dangerous IFs and use Objects to build a code that is flexible, changeable and easily testable, and will help avoid a lot of headaches and weekends spent debugging! Share how to write effective code the easy way!
The goal of the Anti-IF Campaign is to raise awareness of the effective use of software design principles and practices, by first of all removing bad, dangerous IFs.
Friday, February 7, 2014
Oracle DB Character set
We had a problem last week in our project environments, which is related to database.
Some persistent operation (Same text insertion ) working on SIT db and the same is not working on UAT db :
So did checked the difference and found that their character set used is different.
This results in different length check for same input text.
The problem happened with VARCHAR column type and the UI for particular field is a free text element.
Executed the following query in both the environment to get some information on character sets.
SELECT * FROM NLS_DATABASE_Parameters WHERE parameter = 'NLS_CHARACTERSET';
SELECT * FROM NLS_DATABASE_Parameters WHERE parameter = 'NLS_NCHAR_CHARACTERSET';
Found the following information regarding that :
NLS_CHARACTERSET is used for CHAR, VARCHAR2, CLOB, columns and NLS_NCHAR_CHARACTERSET used for NCHAR, NVARCHAR2, NCLOB columns.
The output of the above queries matters on low level encoding of column values in the DB.
Sunday, December 22, 2013
Start learning Ruby- Installation and Introduction (Republishing)
Start learning Ruby- Installation and Introduction
Ruby is a programming language which were born in Japan and Japanese human language and adopted to English.
Rather than telling about history I'll move to practical stuff now.
Installing Ruby
If your using Windows OS download the setup from http://www.ruby-lang.org/en/downloads/ else if your using Linux OS install using "yum install ruby"
In Windows you may need to add the RUBY_PATH to classpath enviornment variable.
Once you have installed the rupy you can check it using following command by opening your terminal.
ruby -v
Hello World Program
Here we are going to run our first hello world program
Open your favorite text editor
Here is the butyl, you may remember your first Java/c#/etc Hello World program which having more than 4 lines. See the ruby hello world
Type following code:
puts "Hello World";
Save it as any name you wish(mine is first.rb) with .rb extension.
From your comman prompt/terminal cd to the file location execute using following command,
$> ruby first.rb
This print 'Hello World' on your terminal.
Thats it for the moment in future i'll come up with some more ruby programming.
Rather than telling about history I'll move to practical stuff now.
Installing Ruby
If your using Windows OS download the setup from http://www.ruby-lang.org/en/downloads/ else if your using Linux OS install using "yum install ruby"
In Windows you may need to add the RUBY_PATH to classpath enviornment variable.
Once you have installed the rupy you can check it using following command by opening your terminal.
ruby -v
Hello World Program
Here we are going to run our first hello world program
Open your favorite text editor
Here is the butyl, you may remember your first Java/c#/etc Hello World program which having more than 4 lines. See the ruby hello world
Type following code:
puts "Hello World";
Save it as any name you wish(mine is first.rb) with .rb extension.
From your comman prompt/terminal cd to the file location execute using following command,
$> ruby first.rb
This print 'Hello World' on your terminal.
Thats it for the moment in future i'll come up with some more ruby programming.
Subscribe to:
Posts (Atom)
