85% of survey respondents use an observability tool within their organization. Join our Observability and Performance event to find out why.
Platform Engineering: Enhance the developer experience, establish secure environments, automate self-service tools, and streamline workflows
Question Master at corejavainterviewquestions.com
Sam is a senior java developer and all round geek. He has worked for a number of financial institutions. He is the question master over at www.corejavainterviewquestions.com. @SambaHK
Stats
Reputation: | 5683 |
Pageviews: | 1.1M |
Articles: | 19 |
Comments: | 14 |
Comments
Jun 10, 2016 · Sam Atkinson
Agreed. It's easy to write terrible code in functional or a non functional style. Maybe it's just a maturation curve we're all slowly climbing up :)
Jun 10, 2016 · Sam Atkinson
In my experience, Spring and Hibernate make codebases much harder to maintain, understand and test. When creating my own code for configuration, it's just a class that new's up a bunch of stuff to wire it together. It's simple and effective.
There's no more need to mock huge Java objects than there would be in Spring. Either way you're injecting "something". Hopefully if you're codes written cleanly you won't have massive objects to mock.
Jun 08, 2016 · Sam Atkinson
Completely agree with small, easy to test method. 100000%.
Jun 08, 2016 · Sam Atkinson
It certainly is subjective. My goal isn't to write happy posts that satisfy everyone but express my opinions on things. Some people will agree, some will disagree, and that's ok. I love these comments sections as I get to learn new things too.
May 08, 2016 · Sam Atkinson
Hey Bram,
Best book is "Growing Object Oriented Software Guided by Tests". It's the bible of TDD. Highly recommended.
I'm intending on doing a write up of BookStore shortly. I recommend signing up to my mailing list at www.corejavainterviewquestions.com as I'll be posting it there.
S
Feb 25, 2016 · Sam Atkinson
If it's a client library, e.g. something other people consume, then do not include Spring is an incredibly important rule. Libraries should not mandate how the main application is wired up, else it becomes more like a framework.
Feb 25, 2016 · Sam Atkinson
I wouldn't go so far as to say it's nonsense, but the sentiment of the article was meant to be "aim for zero, use common sense". SLF4J API is certainly one that makes sense to include as long as you don't include the implementation.
Feb 25, 2016 · Sam Atkinson
Thanks, fixed!
Feb 25, 2016 · Sam Atkinson
Generally I don't favour copy/paste code. The article meant to say this is just for if you're using a tiny util part of a library, e.g. commons or guava. If you're fully dependent on a proper library, and it's key to your functionality, then include it in your dependencies.
Feb 24, 2016 · Sam Atkinson
Yes! So much this, can't believe I forgot to add it. The amount of times junit leaks out because it's not put in test scope is crazy.
Feb 24, 2016 · Sam Atkinson
Ah thanks. Can you transform the package space when you do it? If not then it's definitely a no go as you're going to clash with other versions of same lib still.
Feb 24, 2016 · Sam Atkinson
Instead of making snarky remarks and feeling big and clever, why don't you leave a comment explaining about what it is and how it's relevant so everyone can learn?
I've used shade a couple of times for packaging (it was mandatory for making a dropwizard project work on heroku) but not sure what it has to offer in this context.
Feb 07, 2016 · Sam Atkinson
Yes yes yes. You are 100% correct, this is a mistake. I'll get it fixed. Thanks!
Jan 14, 2016 · Sam Atkinson
You get the special prize for noticing the intentional mistake. Just wanted to make sure you were reading it thoroughly ;). Thanks!