imsavva.com

Folder icon

Coding

1Z0-808
ATG
Apache Fop
Elasticsearch
GWT
Groovy
JPA
Java
JavaScript
Jetty
Kibana
OCA
PDF
collections
concurrency
dates
dig deeper
exceptions
games
interview questions
logging
patterns
task
1
2
3
4
5
6

Parsing a date string to ISO8601 with Joda Time

showPostImage(637278502)

Uncaught exception: the image is currently being shown in a museum

Recently, I faced a date conversion task: convert a string date "yyyy-MM-ddZ" (i.e. "1983-09-15+03:00") to the ISO8601 standard "yyyy-MM-dd'T'HH:mm:ss.SSSZ" (i.e. "1983-09-15T03:00:00.000+03:00"). I used Apache Joda time to convert date. First, add a Maven dependency in pom.xml To format a string containing date, I…
Posted on
2017-02-26

Simple Hibernate + JPA tutorial

showPostImage(431772724)

Uncaught exception: the image is currently being shown in a museum

In this small tutorial, we will see how to start using Hibernate framework. In further lessons, I will show how to create one-to-one, one-to-many, and many-to-many relationships. Now we are going to create a new Maven project, add some dependencies, configure JPA and create our first entity. Let's get started. By the…
Posted on
2017-02-08

How to create an ATG pipeline processor?

showPostImage(287503035)

Uncaught exception: the image is currently being shown in a museum

I'm currently studying Oracle ATG. Kinda big monstrous e-commerce platform. Today I had to create a commerce pipeline processor. So, I started googling and found this great tutorial by Oracle:  Creating processors . Well, that's not bad. But it's a bit poor. For example, I'd like to know, what is the  Object pParam…
Posted on
2016-06-21

Observer pattern

showPostImage(-716380058)

Uncaught exception: the image was stolen by a UFO

Observer is a software design pattern, that is used when some objects create events and other objects should be notified when these events occur. The main idea is that we have two types of instances: one that produces events and one that consumes them. Events producer must have three methods: addObserver(Observer…
Posted on
2016-06-19

Strategy pattern

showPostImage(868043779)

Uncaught exception: the image is currently being shown in a museum

With this post I'm starting series of articles dedicated to GoF design patterns. GoF stands for Gang of Four - four authors that wrote a famous book about design patterns. So the first pattern I want to describe is Strategy . It allows to choose the behaviour of instances at runtime by defining appropriate strategy…
Posted on
2016-06-12

Programming competition and a small Java task

showPostImage(-933165126)

Uncaught exception: the image is currently being shown in a museum

Last week we had a programming competition at work which consisted of some small tasks. One of them was to check, if we can make a given string palindrome by adding one letter in any place. Shame on me, I didn't manage with this task on time. However I got the third place in this competition. 🏆😁 So the task: Your app…
Posted on
2016-04-27

Java task. Fibonacci sequence.

showPostImage(1086603326)

Uncaught exception: the image was stolen by a UFO

Fibonacci numbers are a number sequence, where first two numbers are 1 and 1 or 0 and 1. Each subsequent number is the sum of previous two numbers. This task is often asked by interviewers (not only in Java). Let's solve it in two ways: using a loop and recursion. To see a recursive solution of this task, click "read…
Posted on
2016-03-21
1
2
3
4
5
6
Do I really need the footer?