## Chocolate Feast

Today’s evening is New Year’s Eve 2016. Happy New Year 2017!!! By the way, 2017 is a prime number. The next prime will be 2027. Went ahead and took a look at the HackerRank challenge Chocolate Feast. If interested take a look at the description at the following URL: https://www.hackerrank.com/challenges/chocolate-feast?utm_campaign=challenge-recommendation&utm_medium=email&utm_source=24-hour-campaign

As usual I first take a look at the Need Help? I then spend time working on my solution. After trying and passing the sample tests I read most of the discussions to improve on my solution and try additional tests that other fellow developers have obtained. Finally I go ahead and submit my solution. Continue reading “Chocolate Feast”

## Valid Parentheses

I have not solved a LeetCode challenge in a couple weeks. Went to the site and the system suggested the Valid Parentheses using the following URL:  https://leetcode.com/problems/valid-parentheses/

The idea is to determine if a sequence of parentheses in a string are properly matched. Please take a look at the actual challenge using the previous URL.

Following is a screen capture of the console on my Eclipse IDE: Continue reading “Valid Parentheses”

## Max Priority Queue

A priority queue is an abstract data type which is like a regular queue or stack data structure, but where additionally each element has a “priority” associated with it. In a priority queue, an element with high priority is served before an element with low priority. If two elements have the same priority, they are served according to their order in the queue.

While priority queues are often implemented with heaps, they are conceptually distinct from heaps. A priority queue is an abstract concept like “a list” or “a map”; just as a list can be implemented with a linked list or an array, a priority queue can be implemented with a heap or a variety of other methods such as an unordered array. Continue reading “Max Priority Queue”

## Filling Jars

It has been a week or so since I tried a challenge in HackerRank. Between work and holidays not much spare time available. BTW Happy Holidays!!!

The URL for the challenge follows:  https://www.hackerrank.com/challenges/filling-jars?utm_campaign=challenge-recommendation&utm_medium=email&utm_source=24-hour-campaign

Before proceeding reading this blog I would suggest to go to the web site and solve it on your own. Continue reading “Filling Jars”

## Agile Design

As I have already mentioned in a previous post, I purchased and are currently reading the book “Agile Software Development Principles, Patterns and Practices” by Robert C. Martin. I am about to start reading section 2 titled “Agile Design”.

The author lists the following seven symptoms of poor design which on their own are very important to observe (I believe they are called code smells): Continue reading “Agile Design”

## Prime Numbers

The motivation for this entry is based on chapter 5 of the book Agile Software Development Principles, Patterns and Practices by Robert Martin. In that chapter the author writes an initial program with correct output. The issue is that it is not as simple to follow (and possibly maintain) as the final one. The final one is longer but much easier to follow.

I was not able to find the source code in the URL specified by the book: www.objectmentor.com/PPP (the domain is up for grabs). I wanted to determine if the performance would be different (better) for the short program when compared against the longer one, which also outputs the same results. Continue reading “Prime Numbers”

## Test Driven Development

What is Test Driven Development? Is it useful? Should I and my team make use of it?

According to Wikipedia (I have edited the following paragraphs):

“Test-driven development (TDD) is a software development process that relies on the repetition of a very short development cycle: Requirements are turned into very specific test cases. The software is improved to pass new tests, only. This is opposed to software development that allows software to be added that is not proven to meet requirements. Continue reading “Test Driven Development”

## Should One Start a Project Without Requirements?

A week or two ago, a couple engineers and I were discussing software engineering topics and the following question came up: “Would you start a software development project without requirements”? As you might expect, this is a loaded question that has no single correct answer.

What follows are my thoughts on how to put the question and answers in perspective. Continue reading “Should One Start a Project Without Requirements?”

## Java Native Interface (JNI)

In today’s world most systems are architected as a set of services implemented in different programming languages deployed on multiple hardware platforms. Often it is required for a piece of software written in a different programming language than the module it needs to interface with. I have been in situations when modules written in C# or Java had the need to interface with code written using the C programming language (typically for performance, separations of concern reasons or to allow the Java program access functionality written in a different language). Continue reading “Java Native Interface (JNI)”

## Sherlock and The Beast

Sherlock and The Beast is a HackerRank challenge. The name is good and the description quite amusing. Please take a look at it at the following URL: https://www.hackerrank.com/challenges/sherlock-and-the-beast?utm_campaign=challenge-recommendation&utm_medium=email&utm_source=24-hour-campaign

A screen capture, using the sample input from the challenge, from the console of the Eclipse IDE follows: Continue reading “Sherlock and The Beast”