about:drewcsillag

Feb 19, 2015 - 10 minute read - programming java dependency-injection

Dependency Injection Without A Framework

I think that most people would agree these days that dependency injection is a good thing for many reasons. It allows you to decouple concrete classes from each other It makes for a uniform method of object construction It simplifies plumbing Makes it easier to make testable classes The problem that I have with it is that, at least in Java, the main frameworks for doing it, being Guice and Spring, can sometimes be as bad as the problem DI tries to solve.

Feb 14, 2015 - 6 minute read - programming

Removing Magic

When starting as a software developer, everything seems like magic, compilers, IDEs, networking, kernels, etc. While we can ignore how these things work, to really grow as a developer, the magic must be removed. At the end of the day, our job is to produce something that works, having a well-rounded knowledge of how the full stack works can help you to understand when weird stuff happens, and come up with useful theories as to what is going on.

Jan 24, 2015 - 9 minute read - programming java

Why Java?

Background I started my professional career with a Pascal program (I know that dates me a bit) and then continued with C and C++ and discovered Python around version 1.4 and used it heavily for over ten years, and really didn’t like Java when I first met it (version 1.3-1.4 time frame). I’ve also used a ton of other languages for real deployed projects, like Python, Ruby, C, C++, Common Lisp (which I <3 love), C#, Clojure, Visual Basic, and Go, so I’m a not the average “blub” programmer saying this.

Jan 23, 2015 - 1 minute read - programming python

Python Fun - onliners

I’ve not done a ton of programming in Python for a while, but I still do like the language. I also like trying to do things in one line (ok, one statement), just because it’s a bit more difficult :). These are pretty old, but I used to keep these in my email signature line… Mandlebrot set #this one really only works if your terminal window is 80 wide import os;map(lambda i:os.

Dec 23, 2014 - 4 minute read - programming science

Programming Done Right Follows The Scientific Method

AKA Good Programmers Are Doing Real Science There are a bunch of long-ish winded definitions of the scientific method, but I think a reasonable pithy description would be: Come up with a theory to explain an existing phenomena. Use that theory to come up with a falsifiable prediction. Conduct experiments to prove or disprove the truth of the prediction. Independent parties repeat #3 and reproduce the results. Now if the experiments at step three or four disprove the truth of the prediction, one of a few things can happen:

Dec 22, 2014 - 3 minute read - programming refactoring

Refactoring Serial Calls To Leaf Calls

When dealing with the problem of a long method, the simplest thing you can usually do is to break it into it’s conceptual pieces and have a series of tail called functions that call the next chunk of the computation.

So given this:

private Thing methodThatIsTooLong(TypeThing arg1, OtherType arg2) {
   // chunk1
   // chunk2
   // ....
   // chunkN
}

You get:

Nov 5, 2014 - 2 minute read - programming abstraction conceptual load DRY

A Source Of Over-Abstraction - Or DRY Isn't Free

In The Cult Of Abstraction I railed against the over-use of abstraction. Here, I want to talk about a particular source cause of over-abstraction I have seen (and been guilty of). Recently, while working with another team here at Spotify, I was working through some of their test code using the Helios Testing Framework, and the harness used a surprisingly complicated tree of classes to set up the various containers it used.

Sep 26, 2014 - 3 minute read - agile scrum gtd process

Doing Agile Wrong

While I’m often at odds with software frameworks (libraries are to be preferred over frameworks, generally), I’ve found that process frameworks can be very good indeed, when done right. Implementors of agile methodologies ironically can fall into the trap of doing it wrong. Why ironic? Well let’s look at the agile manifesto from the agile manifesto website: Individuals and interactions over processes and tools Working software over comprehensive documentation Customer collaboration over contract negotiation Responding to change over following a plan What I’ve heard is that in many companies they prescribe: “We do agile this way”, which breaks the first statement of agile.

Aug 2, 2014 - 2 minute read - productivity shorthand gregg

Gregg Shorthand Resources

I’ve known handywrite shorthand for a number of years, and finally decided that I should learn shorthand proper, ideally with the best bang/buck ratio, as well as minimal amount of initial learning, with being able to ramp up the amount I learn later, as time permits. I settled on Gregg shorthand, Anniversary Edition. In hunting the net in the hopes of learning Gregg, I’ve found a bunch of PDFs that I’ve found helpful.

Jul 24, 2014 - 4 minute read - kanban organization arc-m postit levenger circa rollabind GTD productivity agile agile organizer

The Agile Organizer, Part 3 - Retrospectives

(see here for the full Agile Organizer series) Retrospectives If you do Agile, it’s probable that you do something called a retrospective. At least in the ones I’ve been involved with, there’s usually a part where we go over what’s going well, and what could be changed. With the agile organizer, I’ve found that periodically doing retrospectives about the way I am using it is useful and worthwhile. If you use it, I hope you would too.

May 31, 2014 - 4 minute read - kanban organization arc-m postit levenger circa rollabind GTD productivity agile agile organizer

The Agile Organizer, Part 2

(see here for the full Agile Organizer series) In The Agile Organizer, I described the basics my organization system. In this second part, I go into some ways that I use it that weren’t covered in the first post. The Dumping Ground Sometimes, when I’m working on an idea, I just want to get the bits down, but don’t want to think, necessarily, about how they fit just yet. In such a case, I’ll have a page where I just stick the stickies to a page wherever they’ll fit, with the idea that I’ll come back to it later to sort it all out.

May 26, 2014 - 1 minute read - Java 8 functional programming

Quicksort And Java 8

In looking at functional languages, I’ve often been impressed with the clarity of implementations of Quicksort. Now that Java 8 includes lambdas, we can now do one that, while not as nice as an implementation in, say Haskell, is still quite nice. While I wouldn’t use the below code in production, as it’s choice of pivot point is naive and would go kaboom on a large sorted list from stack exhaustion, it is a nice illustration of the utility and clarity that Java 8’s lambdas when mixed with Guava functional stuff give.