Caleb Cushing's blog

Java Privacy, broken by design

It is worth prefixing that none of the following arguments apply to anything using the keyword static which makes things more procedural (or in some cases functional, than Object Oriented. The suggestion in Java is to give the least required permission, but this, in my humble opinion, violates the Open-Closed Principle. Java has four privacy levels. Giving something the least permission required to function is fine in a Security context, privacy in programming however is simply there to discourage developers from doing stupid things. Read more →

Documentation! it should be TDDD

UPDATE: I shouldn’t have said what I said about RJBS and have apologized publicly Test Driven Development should be Test and Documentation Driven Development. I don’t want to read your code to figure out how to use it. I don’t really care if you write the Test, documentation, or the feature first. But you should do all three before moving on to the next one. I’m gonna pick on Dist::Zilla this seems like a very good tool. Read more →

Quick sha1sum with Crypto++

I’ve been working on Korama. I was originally planning on hashing each music file and using the sha1 for the track primary key. However, after benchmarking an actual implementation. I’ve decided that it’s too slow, 20 minutes for 3k+ tracks, also my program was about 5 minutes slower than find … -exec sha1sum not sure on the reason why. However, since I had problems figuring out how to do it I figure I’ll post a basic sha1sum program that I made with the help of people on the Crypto++ Mailing List. Read more →

To pointer, or not to pointer: That is the question

For a very long time now I’ve been looking for good explanations of pointers, and how the varying kinds differ.I’ve finally found a book that does a good job of explaining what they are and how they differ. The book is by Bjarne Stroustrup (the creator of C++) it’s called Programming: Principles and Practice Using C++. The book is supposed to teach you how to program (become a good programmer) using C++ not teach the C++ language. Read more →