A discussion for one type of dynamic programming problems - MinMax Game: Predict the Winner.
Given an array of scores that are non-negative integers. Player 1 picks one of the numbers from either end of the array followed by the player 2 and then player 1 and so on. Each time a player picks a number, that number will not be available for the next player. This continues until all the scores have been chosen. The player with the maximum score wins.
Given an array of scores, predict whether player 1 is the winner. You can assume each player plays to maximize his score.
I am reading a book recently called Re-Engineering Legacy Software from Chris Birchall , and find many interesting insights.
The chapter 4 to 6 discussed different types of re-engineering from small scope to large : Refactoring, Re-Architecting and The Big Rewrite. The author also discuss some real examples.
For example, in chapter 5, he discussed how to break a monolithic application (a log management app) into modules, by defining interfaces and iterative development to reduce risk.
He also discuss an example to re-architect a huge monolithic legacy ecommerce web app to Service-Oriented Architecture and what the challenges will it be.
4/5 Star, Recommended.
Feel the same pain with shared database for development and I am looking for some potential solutions. Source control for Database is definetly helpful and Database Continuous Integration also seems promising. But to what extend and how to keep consistency if you used seprate database are still not that clear.
Blog reading:
Top 4 Reasons Why a Shared Development Database is Evil. by Ben Day
The unnecessary evil of the shared development database by Troy Hunt
Database Continuous Integration 101 in Atlanssian Blog
Stackoverflow discussion :
Should we have separate database instance for each developer?
This is the note for Reliable Distributed Algorithm Week 2 - Basic Abstractions and Failure Dectectors. It discusses what’s a Partitialy Synchronous System, and one of Failure Dectectors - Eventually Perfect Failure Dectectors (EPFD) under the assumption of Partitialy Synchrony.
This post is about how to use Java Socket to build a simple http server responding to GET request. We first discuss how to do it with single thread, then we extend the server to multi-thread. It’s part of note and the assignment of Distributed Java offered by Rice University at Coursera. (Week 2 and 4).