Reputation
21,584
Next tag badge:
171/100 score
18/20 answers
Badges
6 42 120
Newest
 Nice Answer
Impact
~882k people reached

1d
reviewed Leave Closed Is a 25+ table join a code smell all by itself?
Jan
27
comment Zero Downtime Deployment - Transitional Db Schema
@PeterScott You got it. Just keep in mind that you dont want to run the script until you are sure that all active sessions are over in the old system and it has been a long enough time that all DNS caches have been updated to the new CNAME or IP address.
Jan
27
comment How is this Java Keystore cert still valid?
If what I said above is TRUE, then it works not because your server is wrong but because your client application for whatever reason decides to trust it anyway. If the client is a user, and that user is using a browser, typically that browser would see the expired cert and give the user a warning message. The browser has a certificate trust store as well and it could be that the user accepts the certificate problem and decides to trust it anyway. Perhaps the client is another Java system, well normally it would reject an expired cert but it may have a trust store with the expired cert.
Jan
27
comment How is this Java Keystore cert still valid?
Nothing I said here really changes because I am still trying to understand what in fact the certificate is being used for and what behavior are you seeing that is incorrect. If I understand correctly, your Tomcat server is running an old Java app that is using CAS framework to authenticate a Servlet or other network resource being provided by that old application. CAS keystore is configured in Tomcat through a JKS file, it is serving network resources to clients but presenting an EXPIRED certificate that it has in its JKS file. You are expecting this to fail but it works?
Jan
27
answered Zero Downtime Deployment - Transitional Db Schema
Jan
27
comment How is this Java Keystore cert still valid?
Why are you convinced that the application shouldn't start up when the keystore certificate is invalid? Is it being loaded as a keystore and/or a trust store? Providing or requiring a network resource? What error do you expect to see? There isn't enough information here I am afraid.
Jan
27
answered How is this Java Keystore cert still valid?
Jan
26
revised When testing is it OK to use a method of the subject to test another method of the subject?
Removed meta information from the question
Jan
26
comment Should we avoid language features that C++ has but Java doesn't to increase maintainability?
Comments are reserved for clarification of the question or improving it. Please use our chat feature for discussions. Thank you.
Jan
23
awarded  Nice Answer
Jan
14
comment Junction table related to another junction table
This is a good data model, however can you edit your question to provide more explanation to how your data model addresses the specifics of the OP's question? Otherwise this seems like a great answer to a question that the OP didn't ask, which is confusing.
Jan
14
comment Junction table related to another junction table
@mark951131b Premature optimization is evil. If you have strict performance requirements and clearly expected record volumes in the millions then I would suggest implementing a prototype and doing performance testing to see if you meet performance expectations with the current database design. If not only then should you consider denormalization of the database schema and other tuning. Otherwise, join the tables in query. That is why relational databases and SQL are there for you. People seem to have an irrational fear of table joins when it is clearly not a problem 95% of the time.
Jan
14
comment Junction table related to another junction table
Not going to answer because Killian Foth did a good job of that already. Wanted to point out some other unrelated issues I noticed. Pricing sheets for Hotel Rooms are fluid and change from day to day. There may be other potential attributes that could influence the price of a room (Eg. Did you book 6 months in advance? Is there a festival in town? Did you order online? etc...) You may want to consider having some kind of pricing rate table that can change overtime, then the actual purchase price of the room would be a property of the Booking instead of the Room itself.
Jan
11
revised Programmatically fix broken Java source code
deleted 71 characters in body
Jan
4
comment Find path of steepest descent along with path length in a matrix
This is a good answer. Just a quick note for the future, posting code is technically ok in a question or answer, but we do prefer to use pseudo code where possible. It could be confusing to new users that may think this site is for help with code and debugging.
Jan
3
comment DAO design for writing big XML file on database
This is a very well thought out answer. I still think Spring Batch framework is the best approach considering things like load balancing, partitioning job execution, supportability in production and exception management, but this is the best approach over all with the given constraints.
Jan
3
answered DAO design for writing big XML file on database
Jan
2
comment Is there a design pattern to remove the need to check for flags?
@Maurycy I don't understand the witch hunt against verbosity. It ranks pretty low on my priority list for good code. I find it easier to get a complete grasp of all aspects of software as written when it is verbose than something that was done in a clever ad-hoc way with no general guiding design or principles.
Jan
2
comment Is there a design pattern to remove the need to check for flags?
(cont...) with that being said, the code example above I do question if it is the best example of Decorator. In Java I like annotations better for decorating a class.
Jan
2
comment Is there a design pattern to remove the need to check for flags?
I agree with the spirit of the answer here and upvoted it. He is advocating for Decorator pattern to describe the class then encapsulating the conditional logic within an Abstract Factory or in a Service or Business Logic layer as one would in Transaction Script pattern. This is a sound approach verbosity be damned. It promotes separation of concerns and encourages all unit testable code to be within either a Service class or a Factory.