Friday, December 6, 2024

Agile Methodology for a Java Project

 

Agile methodology is a popular and effective approach for managing software development projects, including those involving Java. It emphasizes flexibility, collaboration, and customer satisfaction through iterative development and continuous feedback. Here’s a detailed description of how Agile methodology can be applied to a Java project:

1. Introduction to Agile Methodology

Agile methodology is a set of principles and practices that promote adaptive planning, evolutionary development, early delivery, and continuous improvement. It encourages rapid and flexible responses to change, making it ideal for dynamic and complex projects. Agile is characterized by iterative cycles called sprints, typically lasting 1-4 weeks, where a potentially shippable product increment is developed.

2. Key Agile Practices

a. Scrum Framework: Scrum is one of the most widely used Agile frameworks. It involves roles such as the Product Owner, Scrum Master, and Development Team. The Product Owner defines the project vision and prioritizes the backlog, the Scrum Master facilitates the process, and the Development Team executes the work.

b. Kanban: Kanban focuses on visualizing the workflow, limiting work in progress, and optimizing flow. It uses a Kanban board to track tasks and ensure smooth progress.

c. Extreme Programming (XP): XP emphasizes technical excellence and includes practices like pair programming, test-driven development (TDD), and continuous integration.

3. Agile Process for a Java Project

a. Project Initiation: The project begins with a kickoff meeting where the team discusses the project goals, scope, and high-level requirements. The Product Owner creates a product backlog, a prioritized list of features and tasks.

b. Sprint Planning: At the start of each sprint, the team holds a sprint planning meeting to select items from the product backlog to work on. The team breaks down these items into smaller tasks and estimates the effort required.

c. Development: During the sprint, the development team works on the selected tasks. For a Java project, this involves writing Java code, creating unit tests, and integrating with other components. Agile practices like TDD ensure that the code is robust and maintainable.

d. Daily Stand-ups: The team holds daily stand-up meetings to discuss progress, identify obstacles, and plan the day’s work. This promotes transparency and quick resolution of issues.

e. Sprint Review: At the end of the sprint, the team demonstrates the completed work to stakeholders in a sprint review meeting. Feedback is gathered and incorporated into the product backlog.

f. Sprint Retrospective: The team reflects on the sprint in a retrospective meeting, discussing what went well, what didn’t, and how to improve. This fosters continuous improvement.

4. Benefits of Agile for Java Projects

a. Flexibility: Agile allows for changes in requirements even late in the development process. This is crucial for Java projects where new technologies and frameworks may emerge.

b. Customer Collaboration: Regular feedback from stakeholders ensures that the project aligns with customer needs and expectations.

c. Improved Quality: Practices like TDD and continuous integration lead to higher code quality and fewer defects.

d. Faster Delivery: By delivering small, incremental updates, Agile ensures that the project delivers value early and often.

e. Enhanced Team Collaboration: Agile promotes a collaborative environment where team members work closely together, share knowledge, and support each other.

5. Conclusion

Adopting Agile methodology for a Java project can significantly enhance the development process. It provides a structured yet flexible approach that accommodates changes, improves quality, and ensures customer satisfaction. By focusing on iterative development, continuous feedback, and collaboration, Agile helps teams deliver successful Java projects that meet the evolving needs of stakeholders.

Wednesday, December 29, 2021

Error during install face recognition openCV library

Try to install face-recognition

>> 1. pip install face-recognition

The following error occurs

    ERROR: Command errored out with exit status 1:

     command: 'C:\Users\user1\AppData\Local\Programs\Python\Python310\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\user1\\AppData\\Local\\Temp\\pip-install-8aq3akpy\\dlib_948d0b43c95149f1b66c47d668a43117\\setup.py'"'"'; __file__='"'"'C:\\Users\\user1\\AppData\\Local\\Temp\\pip-install-8aq3akpy\\dlib_948d0b43c95149f1b66c47d668a43117\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\user1\AppData\Local\Temp\pip-record-icdraszt\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\user1\AppData\Local\Programs\Python\Python310\Include\dlib'

         cwd: C:\Users\user1\AppData\Local\Temp\pip-install-8aq3akpy\dlib_948d0b43c95149f1b66c47d668a43117\

    Complete output (8 lines):

    running install

    running build

    running build_py

    package init file 'tools\python\dlib\__init__.py' not found (or not a regular file)

    running build_ext

    ERROR: CMake must be installed to build dlib


-------------------------------------------------------------------------------------------

Install cmake first and retry to install face-recognition

>> 1. pip install cmake

Result okay.

>> 2. pip install face-recognition

Another error occurs

Collecting face-recognition

  Using cached face_recognition-1.3.0-py2.py3-none-any.whl (15 kB)

Collecting Click>=6.0

  Using cached click-8.0.3-py3-none-any.whl (97 kB)

Collecting dlib>=19.7

  Using cached dlib-19.22.1.tar.gz (7.4 MB)

  Preparing metadata (setup.py) ... done

Requirement already satisfied: Pillow in c:\users\user1\appdata\local\programs\python\python310\lib\site-packages (from face-recognition) (8.4.0)

Requirement already satisfied: face-recognition-models>=0.3.0 in c:\users\user1\appdata\local\programs\python\python310\lib\site-packages (from face-recognition) (0.3.0)

Requirement already satisfied: numpy in c:\users\user1\appdata\local\programs\python\python310\lib\site-packages (from face-recognition) (1.21.5)

Requirement already satisfied: colorama in c:\users\user1\appdata\local\programs\python\python310\lib\site-packages (from Click>=6.0->face-recognition) (0.4.4)

Using legacy 'setup.py install' for dlib, since package 'wheel' is not installed.

Installing collected packages: dlib, Click, face-recognition

    Running setup.py install for dlib ... error

    ERROR: Command errored out with exit status 1:

     command: 'C:\Users\user1\AppData\Local\Programs\Python\Python310\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\user1\\AppData\\Local\\Temp\\pip-install-irtsarfs\\dlib_286f31435cee4d82a3d5891795f64bb6\\setup.py'"'"'; __file__='"'"'C:\\Users\\user1\\AppData\\Local\\Temp\\pip-install-irtsarfs\\dlib_286f31435cee4d82a3d5891795f64bb6\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\user1\AppData\Local\Temp\pip-record-lp8e89mp\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\user1\AppData\Local\Programs\Python\Python310\Include\dlib'

         cwd: C:\Users\user1\AppData\Local\Temp\pip-install-irtsarfs\dlib_286f31435cee4d82a3d5891795f64bb6\

    Complete output (60 lines):

    running install

    running build

    running build_py

    package init file 'tools\python\dlib\__init__.py' not found (or not a regular file)

    running build_ext

    Building extension for Python 3.10.1 (tags/v3.10.1:2cd268a, Dec  6 2021, 19:10:37) [MSC v.1929 64 bit (AMD64)]

    Invoking CMake setup: 'cmake C:\Users\user1\AppData\Local\Temp\pip-install-irtsarfs\dlib_286f31435cee4d82a3d5891795f64bb6\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\user1\AppData\Local\Temp\pip-install-irtsarfs\dlib_286f31435cee4d82a3d5891795f64bb6\build\lib.win-amd64-3.10 -DPYTHON_EXECUTABLE=C:\Users\user1\AppData\Local\Programs\Python\Python310\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\user1\AppData\Local\Temp\pip-install-irtsarfs\dlib_286f31435cee4d82a3d5891795f64bb6\build\lib.win-amd64-3.10 -A x64'

    -- Building for: NMake Makefiles

    CMake Error at CMakeLists.txt:5 (message):




      !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!



      You must use Visual Studio to build a python extension on windows.  If you

      are getting this error it means you have not installed Visual C++.  Note

      that there are many flavors of Visual Studio, like Visual Studio for C#

      development.  You need to install Visual Studio for C++.



      !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!





    -- Configuring incomplete, errors occurred!

    Traceback (most recent call last):

      File "<string>", line 1, in <module>

      File "C:\Users\user1\AppData\Local\Temp\pip-install-irtsarfs\dlib_286f31435cee4d82a3d5891795f64bb6\setup.py", line 222, in <module>

        setup(

      File "C:\Users\user1\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\__init__.py", line 153, in setup

        return distutils.core.setup(**attrs)

      File "C:\Users\user1\AppData\Local\Programs\Python\Python310\lib\distutils\core.py", line 148, in setup

        dist.run_commands()

      File "C:\Users\user1\AppData\Local\Programs\Python\Python310\lib\distutils\dist.py", line 966, in run_commands

        self.run_command(cmd)

      File "C:\Users\user1\AppData\Local\Programs\Python\Python310\lib\distutils\dist.py", line 985, in run_command

        cmd_obj.run()

      File "C:\Users\user1\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\command\install.py", line 61, in run

        return orig.install.run(self)

      File "C:\Users\user1\AppData\Local\Programs\Python\Python310\lib\distutils\command\install.py", line 568, in run

        self.run_command('build')

      File "C:\Users\user1\AppData\Local\Programs\Python\Python310\lib\distutils\cmd.py", line 313, in run_command

        self.distribution.run_command(command)

      File "C:\Users\user1\AppData\Local\Programs\Python\Python310\lib\distutils\dist.py", line 985, in run_command

        cmd_obj.run()

      File "C:\Users\user1\AppData\Local\Programs\Python\Python310\lib\distutils\command\build.py", line 135, in run

        self.run_command(cmd_name)

      File "C:\Users\user1\AppData\Local\Programs\Python\Python310\lib\distutils\cmd.py", line 313, in run_command

        self.distribution.run_command(command)

      File "C:\Users\user1\AppData\Local\Programs\Python\Python310\lib\distutils\dist.py", line 985, in run_command

        cmd_obj.run()

      File "C:\Users\user1\AppData\Local\Temp\pip-install-irtsarfs\dlib_286f31435cee4d82a3d5891795f64bb6\setup.py", line 134, in run

        self.build_extension(ext)

      File "C:\Users\user1\AppData\Local\Temp\pip-install-irtsarfs\dlib_286f31435cee4d82a3d5891795f64bb6\setup.py", line 171, in build_extension

        subprocess.check_call(cmake_setup, cwd=build_folder)

      File "C:\Users\user1\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 369, in check_call

        raise CalledProcessError(retcode, cmd)

    subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\user1\\AppData\\Local\\Temp\\pip-install-irtsarfs\\dlib_286f31435cee4d82a3d5891795f64bb6\\tools\\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\user1\\AppData\\Local\\Temp\\pip-install-irtsarfs\\dlib_286f31435cee4d82a3d5891795f64bb6\\build\\lib.win-amd64-3.10', '-DPYTHON_EXECUTABLE=C:\\Users\\user1\\AppData\\Local\\Programs\\Python\\Python310\\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\user1\\AppData\\Local\\Temp\\pip-install-irtsarfs\\dlib_286f31435cee4d82a3d5891795f64bb6\\build\\lib.win-amd64-3.10', '-A', 'x64']' returned non-zero exit status 1.

    ----------------------------------------

ERROR: Command errored out with exit status 1: 'C:\Users\user1\AppData\Local\Programs\Python\Python310\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\user1\\AppData\\Local\\Temp\\pip-install-irtsarfs\\dlib_286f31435cee4d82a3d5891795f64bb6\\setup.py'"'"'; __file__='"'"'C:\\Users\\user1\\AppData\\Local\\Temp\\pip-install-irtsarfs\\dlib_286f31435cee4d82a3d5891795f64bb6\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\user1\AppData\Local\Temp\pip-record-lp8e89mp\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\user1\AppData\Local\Programs\Python\Python310\Include\dlib' Check the logs for full command output.

----------------------------------

Install visual studio for C++ and try again.





Thursday, June 25, 2015

Shortcut of RAD

Here's my list of shortcut when using RAD / Eclipse..
You can change it in the preferences.


#ShortcutsDescription
Searching / Auto-completion
1Ctrl+fSimple a find function
2Ctrl+kFind next
3Ctrl+Shift+kFind previous
4Ctrl+lGo to line x in the java file
5Ctrl+oList all methods in the java file
6F3Show source for a method or a class
7Ctrl+shift+rList of resource with your initial
8Ctrl+spaceContent assist
9Ctrl + /Single line comment by //
10Ctrl + Shift + /Multiple line comments by //
Debugging (in debug mode)
11Ctrl+bBuild All
12F6Step into
13F8Step over
Formatting / Save
14Ctrl+Shift+fCode formatting
15Ctrl+Shift+oOrganize Imports
16Ctrl+shift+sSave All

Friday, March 21, 2014

Resolved: java.lang.OutOfMemoryError: Java Heap space

When opening a large heap file, the following error occurs.
java.lang.OutOfMemoryError: Java Heap space
at com.ibm.jinwoo.heap.HeapInfo.readHAX(HeapInfo.java: 8319)
...



Solution
It would be resolved by increasing the memory for the Heap Analyzer by the following command.

java -Xmx1024m - jar ha454.jar

if it is not enough, you can try to adjust to -Xmx2048m or -Xmx4096m

Monday, December 30, 2013

[How to] How to call a function defined in the package

The following sql is to call a function defined in the package
 
declare
  outVal number;
begin
   -- Call the function
   outVal := mypackage.myfunction (100);
end;

Friday, August 9, 2013

Howto: Find the biggest value in the column

This article teaches you how to get the biggest value in the columns in the same table.

It could be done by the built-in function GREATEST

However, it does not work when there are null values in the column.

You may use NVL function as a work around.

Friday, July 19, 2013

[Resolved] Ping Connection Pool failed for XXX Class name is wrong or classpath is not set for : com.mysql.jdbc.jdbc2.optional.MysqlDataSource

Tried to setup the connection pool for mysql in Glassfish today. The following error occurs when I tried to ping the connection pool.

Error Message
Ping Connection Pool failed for XXX Class name is wrong or classpath is not set for : com.mysql.jdbc.jdbc2.optional.MysqlDataSource Please check the server.log for more details.



Solution
1. Download Connector / J
http://dev.mysql.com/downloads/connector/j/

2. Put it in the glassfish's lib folder


3. Restart the server

4. Ping Successfully!

MySQL, Glassfish 4, Connection Pool Setup