Posted February 24th, 2010 by jon
I’ve recently started to practice the pomodoro technique. Holy F! This super simple practice has uncovered how much time I completely waste in a workday (not to mention my non-work time).
I feel like I’m cheating myself and my customer (read employer), so I’m going to do something about it. I’ve never read much of Covey, but @shanselman mentioned Covey’s quadrants (see a mind-map version below) in this video I watched the other day. For me, living only in quadrants 1 & 2 (the top two) is all good, but there are times when I basically want to just ‘check out’ and be a bum (Office Space style). My goal is to be intentional and choose when I’m doing that, rather than just letting it happen.
Baby Steps
The pomodoro technique is a great start to help manage and become aware, but I need some help. Here’s what I set up for myself at this point:
- Pomodo7o with Growl Plugin
- Growl using the Visor notification (I don’t like toast, so this is great for me)
- VirtuaWin (for Windows, this is built into most other OS’s, e.g. Spaces on OSX)
- Throw ALL distracting things to a second VirtuaWin workspace.
- Gmail
- GReader
- Twitter (turn off twitter notifications)
- Outlook (turn off new mail toast and new mail tray indicator)
- Evernote (turn off any messages)
- Windows Live Writer
- Time tracking applications
- Anything else that dings/hoots/toasts or otherwise distracts you
- Only check email (Gmail and Outlook) during pomodoro breaks or other scheduled times
- Only check twitter during pomodoro breaks or other scheduled times (I’ve started only checking twitter before I start work, and right before I head home).
- Hook Outlook into Growl so I don’t miss meetings
- Keep a text file or post-it note ready to capture interruptions. Most interruptions can be logged, and then dealt with in a subsequent pomodoro.
I only allow myself to go over to my other desktop during a pomodoro break. This makes it really easy to know when I’m going off task. It also makes it REALLY hard to find something wasteful to do. There isn’t anything in my “workspace” that is wasteful anymore, so if I do ANYTHING in there, it’ll probably be productive.
Feeling Too Disconnected?
I’ve got the shakes! Doing this thing cold turkey is hella hard. So here’s a patch to wean you off.
Download Trowl and hook up @’s and DM’s (and select other folks you might need to hear from throughout the day). Now those tweets will be Growled at you. I don’t get @’ed or DM’ed too often, so it’s not terribly distracting, but has high reward in helping to reduce the withdrawal symptoms.
I’m just starting, so this is my first attempt really. How do you manage?
Posted February 11th, 2010 by jon
No, it isn’t called YAPA.
Basically, I wanted a gentle introduction to the Pomodoro Technique, so I thought, what better way to introduce myself to it, than to build a pomodoro app while pomodoro’ing (new word, probably).
So I whipped up an app that uses some of the fancy taskbar features of Windows 7. If you don’t have Windows 7, this thing is going to be pretty useless to you.
Intoducing… Pomodo7o:
- Simple
- Provides minimal distraction (to keep flow)
- 25/5 Pomodoros
- Pause/Reset [I know, I know, but sometimes you just gotta]
- Awesome
- Taskbar Progress Indicator
- Taskbar Thumbnail Controls
You may not know what the heck I’m talking about on the last two bullets and they probably sound like some bullet point on a marketing brochure created by the marketing drones at Microsoft (wait… that is where those names came from). They’re both Windows 7 features which I think are pretty cool.
Here’s a couple screenshots for ya… the first one shows the progress indicator. The progress is how far you are into your pomodoro. The second one shows the thumbnail controls when you hover over the tomato icon. You can pause or reset your current pomodoro using those buttons.
Take it or leave it… either way, it’ll be a fun toy to play with.
Feedback/Requests: http://pomodo7o.uservoice.com
Source: http://github.com/jonfuller/pomodo7o
Download: http://github.com/jonfuller/pomodo7o/downloads
Bug Reports: http://github.com/jonfuller/pomodo7o/issues
Out!
Posted February 10th, 2010 by garrinmf
Quick information post here. While searching on this issue I saw lots of posts with “I uninstalled the mysql 64-bit version and installed the 32-bit version to make this work”.
It doesn’t have to be like that. Ruby doesn’t care in the slightest what version of mysql it’s talking to, it does so over mediums that are universal.
According to your PATH environment variable part of installing the ruby mysql gem is to add ‘mysql/bin’ to your PATH or to copy the libmysql.dll to ‘ruby/bin’. If you don’t you get errors like ‘The specified module could not be found’. If you do this and you’re running mysql for x64 then you can potentially get errors about ‘%1 is not a valid Win32 application’.
Having had very similar issues with the native libraries and a .NET program, I know that things can’t get weird. I’m going to guess that, like me, you installed a 32-bit version of Ruby, so it gets run in some compatibility mode for 32-bit programs, and all things it directly interacts with (loads), need to be 32-bit. Since you copied a 64-bit version of libmysql.dll it’s not happy. Simply copy a libmysql.dll from a 32-bit installation, I happened to have a 32-bit laptop with mysql installed laying around, and all should work fine.
It can get even more confusing with .NET because if you build your app when choosing the ‘x86′ platform, it works like mentioned above with everything always needing to be 32-bit. If you compile it with ‘any cpu’ selected for the platform it depends on the machine; if it’s 64-bit you need 64-bit things and if it’s 32-bit you need 32-bit.
Posted January 25th, 2010 by jon
One of my apprentices from this past summer just accepted a job… at another company. I’m totally pumped for him, but most of the people I brag to about it say the same thing with the same reaction:
<sigh_of_defeat>Shoot, we didn’t get him.</sigh_of_defeat>
As if we failed miserably.
For me, the apprenticeship/intern process has the following 4 goals (in order of importance, most to least).
- Teach and develop the apprentice as much as they can possibly absorb. This includes technical skills, sof-tech skills (like how to learn, what it means to be an engineer, passion, etc.), and soft skills (e.g. how to deal with your lead/PM/that annoying guy next door, etc.).
- Learn from the apprentice as much as I possibly can. These guys are at school at an amazing time with amazing things happening. Leech this new knowledge… it’s relatively free. (I’m unapologetically selfish in this regard… I love to learn
- Develop an environment where the apprentice feels comfortable with his mentor, and can start to learn and teach with his mentor back and forth… a true partnership.
- Oh yeah, the last/least benefit… recruiting. (Sorry Raman)
If at the end of this he happens to also be productive, great, win-win… but that isn’t the point (again, that’s my opinion).
After that list, does this look like defeat? Not to me. This looks like a dead-on success. We NAILED it. Let’s celebrate! Congrats Man. Next time we meet, I’m sure I’ll have something to learn.
[I’m at least going to pretend I played some small part in this outcome. Whether I really did or not, is debatable.]
Posted December 11th, 2009 by jon
Man, I’d searched for this feature time and time again. And finally found it here: http://www.kevinwilliampang.com/post/Visual-Studio-Split-Views.aspx
If you don’t want to follow the link…
Just double click that guy, or drag it downward, and you’ve split your file into two buffers. Awesomeness.

Posted November 19th, 2009 by garrinmf
Hopefully somebody comes back in the comments with a better solution, as this feels dirty to me, but for someone else looking for "a" method here is what I came up with.
The scenario:
There is this XML document that is already specified and utilized throughout an entire system that contains a Person object. In the persistence framework the coder initially took the lazy route and stored the large binary data for the picture right in row with the rest of the Person data. The class looked something like this:
C#:
-
public class Person
-
{
-
// fields...
-
-
public virtual byte[] Picture
-
{
-
get;
-
set;
-
}
-
// more properties and other gooey goodness...
-
}
All was well and good until the system was under any amount of load and the huge image was getting loaded into memory whenever the row was loaded. The OR/M of choice didn't support lazy property loading and the best long term solution, in any case, was to move the column to it's own table. Moving into the filesystem, while another choice that was possibly better, wasn't an option.
So a little coding later, the picture byte[] data was moved into it's own subcomponent / child object, the OR/M of choice was tweaked to lazy load that particular object via proxy and that left something like this
C#:
-
public class Person
-
{
-
// fields...
-
-
public virtual BinaryData Picture
-
{
-
get;
-
set;
-
}
-
// more properties and other gooey goodness...
-
}
-
-
public class BinaryData
-
{
-
public virtual ulong Id
-
{
-
get;
-
set;
-
}
-
-
public virtual byte[] Data
-
{
-
get;
-
set;
-
}
-
// other gooey goodness...
-
}
Easy fix in the persistence side of things, simple refactoring, and you're off and saving your blobs in a much more performance friendly manner. Except that your simple "XmlSerializer.Deserialize" call is now failing because your Person object now has a different structure that doesn't match the XML.
After much googling, documentation reading, and hand pounding no solution was found. All kinds of tricks for renaming properties in XML, making properties attributes, and otherwise effecting the XML but nothing in affecting the mapping of one 'level' of the hierarchy to another. Only fix found, was to essentially catch an exception which is never good. On the XmlSerializer object there was a "UnknownElement" event that gets fired when unknown elements are found that don't map to a property.
Final Solution:
C#:
-
public class Person
-
{
-
// fields...
-
-
[XmlIgnore]
-
public virtual BinaryData Picture
-
{
-
get;
-
set;
-
}
-
// more properties and other gooey goodness...
-
}
-
-
public class BinaryData
-
{
-
public virtual ulong Id
-
{
-
get;
-
set;
-
}
-
-
public virtual byte[] Data
-
{
-
get;
-
set;
-
}
-
// other gooey goodness...
-
}
-
-
// elsewhere in the deserializer.UnknownElement event handler
-
private void serializer_UnknownElement(object sender, XmlElementEventArgs e)
-
{
-
if (e.Element.Name == "Picture")
-
(e.ObjectBeingDeserialized as Person).Picture.Data = (Convert.FromBase64String(e.Element.InnerText));
-
}
Note: This does work if you are deserializing a list of Person objects as well. The e.ObjectBeingDeserialized property is set to the Person object at the time of the event, not the collection that is eventually returned.
Posted November 18th, 2009 by jon
In my few days of being a developer, I’ve heard and seen lots of talk about Singletons. Things like
Singletons are teh suck. Don’t use them. EVAR.
to
Singleton’s saved my life and marriage!
In fact, I might’ve been the person that said both of these… gasp!
I never like to speak in absolutes, so I’ll say it this way (see what I did there?)… if you’re striving to implement a singleton, you’re probably wrong. For all you guys that are right, I guess you’re right, and you can leave now, I guess. This might help you out.
I was reading a blog from Mr. Dependency where he was talking about statics and basically what amounts to global state, and how that
binds you into globally available, global data, which usually (always?) turns into anarchy.
How do we always get ourselves into this mess if we know it’s bad in the first place? Well, some of us (those who are now zombocomming, from above) don’t know it’s bad in the first place, and the rest of us probably do it because it’s easy to implement, and we understand it. Long story short, we can do the singleton implementation in our sleep, so we pull out the singleton hammer, and smack the nail. It always goes in a little sideways, but at least it goes in.
Maybe we should be using a different hammer?
What I’d like to do now, is propose to split singleton in two. I think there are two distinct responsibilities that the current thought of ‘singleton’ introduces. It:
- Manages Session Scoping/Lifecycle/Lifestyle (albeit, poorly, only one strategy is available)
- Disables the ability to create more
When I talk about this out loud, I call the two approaches the singleton implementation pattern, and singleton lifecycle.
What I am a fan of, is the singleton lifecycle. You create one of those objects, and use it throughout the application. You don’t get messy and allow global access to it all over the place (which necessarily happens when you have global state). You intentionally inject it to collaborators, and intentionally don’t inject it to non-collaborators (don’t just hand this guy out willy-nilly, he’s important).
So naturally, the naysayers ask/demand:
How do you manage that there is a public constructor on this class!? Dev’s are going to be new’ing this thing up all over the place!
I say:
False. Use a DI tool and let it manage it for you. Or establish a convention with your team, and enforce it through social contracts.
Both of these approaches allow your scope lifecycle turn into whatever you want at any time, in case you decide global isn’t what you really want. It can be application session scoped, or some other scope, test scoped, or whatever you want… incredibly flexible.
If you go with the DI tool approach, instead of tying yourself to a particular scope, you can now have any scope you want, by changing a configuration parameter. Delaying decisions until the latest responsible moment… seems like I’ve heard that one before.
Posted November 11th, 2009 by jon

Every software project is different, and there are subtleties associated with each one. Every project requires unique and specific tools, and we need someone to build them, or each member of the team needs the freedom and responsibility to do it him/herself.
I have very little (zero?) tolerance for waste when it comes to automatable processes that aren’t automated because “we don’t have time”, or “we’ll discuss it later” and then it gets dropped, or any other reason that is less than justified.
Zero Friction Development is what I’m going for here. (here is an article that I found interesting around this topic… it’s not really our fault, it’s built into our nature)
What kinds of things am I talking about? Anything that slows down my development that can be automated away to make me a happier developer. Whoa, wait, happy? Is that a requirement I have of my workplace? Absolutely. I can put up with periods of un-happiness, but long-term unhappiness is not acceptable (for me). Oops, sorry, almost derailed there for a minute.
Specific frictions I’ve addressed or have seen addressed… just so you can get an idea about the things that I’ve seen done, that might trigger an idea for you:
- Code-diff generation – On a previous project, all the code for our product was stored in the database itself (Intersystems’ Cache), so we didn’t have a real decent way to generate diff-sets for code review. So we wrote a tool to do it. A previously laborious task (at least 30 minutes for a simple changeset), with much room for human error, turned into a 30-second, enter in a task number and press ‘Go’ joy.
- Code Generation – On a previous project the best way to get where we needed was simply to inspect the structure of a piece of data, and then generate code to deal with it. You’ve probably done this one before… many times.
- Source Control Integration – Again with the Cache project, we needed a way to version our code using standard tools. We wrote a tool to bridge between the file system (for TortoiseCVS, or any other VCS) and the database storage.
- Client requires code-diff uploaded to their CMS for each completed task – Seems like a bogus business process, but it needs done. It’s painful because their CMS is slow and clunky. So I wrote a ruby script, paired with selenium, to automatically create a diff of my code and upload it to their CMS with some browser automation.
- Data generation – Ever need test datasets? Yeah, me too. Whip out some ruby and get it done.
- Tool integration – ever have two systems that need to be kept in sync? Yeah, it’s a pain, especially when neither have an API. What they both usually have though is either a command line interface or a web interface. Both of those are easy enough to script with, given some ruby magic and some browser automation.
- Time tracking – There have got to be 8 billion time tracking tools out there… if one doesn’t match your style, bust out a quick one that matches the way you work. Need it to integrate, there’s probably either a web interface, command line, or API, go for it… it’ll make you happier (hmm… there that is again!).
What other things have you automated? What are your thoughts on the toolsmith? There is a whole book about doing this type of stuff with Ruby. I’ve never read it, but I’ve heard it’s pretty good: Every Day Scripting with Ruby. Another excellent book by the guys at the prag bookshelf is Pragmatic Project Automation. It deals a lot with things we already do (build automation), but takes it further as well. Here is an intro: Pragmatic Project Automation Intro.
For sake of full disclosure, this is not a new idea, and I’m not claiming to have come up with it. It’s been tossed around for years, just wanted to bring it up again.
Posted November 2nd, 2009 by garrinmf
I've tried a couple of times to "move away" from Firefox as my main browser mainly to see changes in memory usage and also to check out other browsers "features". The show stopper? AutoReload provided by Tab Mix Plus (TMP) in Firefox. There are 2-3 pages that I want to continually refresh for work and I could never find the equivalent in other browsers. That is, until now! I'm typing this in Chrome and have been happily using chrome for the last 2-3 days.
Supposedly this works in any browser including Firefox if you don't want to utilize TMP, which I think was a major source of my memory issues with TMP keeping not only the history for the 30 tabs I have open but the 10 tabs I last had opened.
javascript: timeout=prompt(&quot;Set timeout [s]&quot;); current=location.href; if(timeout&gt;0) setTimeout('reload()',1000*timeout); else location.replace(current); function reload(){ setTimeout('reload()',1000*timeout); fr4me='&lt;frameset cols=\'*\'&gt;\n&lt;frame src=\''+current+'\'/&gt;'; fr4me+='&lt;/frameset&gt;'; with(document){write(fr4me);void(close())}; }
Just create a bookmark with the given code and then while on the page you want to reload, click the bookmark from your toolbar. It'll ask you how often you want to reload (in seconds) and it starts reloading!
Posted November 2nd, 2009 by garrinmf
The last couple of months I've been fighting some pain with utilizing IoC, scoping the lifecycle of an object based on another object. So the singleton pattern, but only under a given object, i.e. all objects under a given presenter that request a certain service get the same service. Pretty much every IoC out there has full support for web based scoping paradigms and most have a "per thread" scoping but none, AFAIK, support the object approach.
I realize I'm still just an apprentice, so I did some digging before I just assumed that everybody else was wrong and just implemented it myself (most IoC containers do support some sort of custom scoping).
What I realized was I hadn't "really" pulled off good SRP/SoC, or at least I hadn't refactored after moving to good SRP/SoC. Please realize, this is a made up story to reproduce the given problem, not all decisions are the "right" ones, they're the ones that get me where I want to go with this!
One day our customer said that they needed to be able to determine the distance any one of their Customers was away from given coordinates. So I got in and added a quick little method and viola!
C#:
-
public class Customer
-
{
-
private GPSCoord _location;
-
......
-
public decimal DistanceFromCoordinates(GPSCoord coords)
-
{
-
// figure out the distance
-
return distance;
-
}
-
......
-
}
Couple of months later, the customer said they needed to be able to choose between the distance being in Metric or Imperial on an installation basis. So, good guy that I am, I decided that a customer shouldn't change if the way we measured things changed so I pulled out the code and added a parameter to the Customer that took in an IDistanceService. All was well, things were separated, my IoC container of choice was loading the proper measurer and my Customer object didn't know the difference!
C#:
-
public class Customer
-
{
-
private GPSCoord _location;
-
private IDistanceService _distService;
-
......
-
public Customer(...., IDistanceService distService)
-
{
-
_distService = distService;
-
}
-
......
-
public decimal DistanceFromCoordinates(GPSCoord coords)
-
{
-
return _distService.DistanceBetween(_location, coords);
-
}
-
}
Now, the customer came back ANOTHER time (starting to sound familiar?) and said that they also needed to be able measure distances between two other, arbitrary items, and that the change between Metric/Imperial would be on a per Order basis, not installation. Not a problem says I, I already have my pretty IDistanceService , I can just add it as a parameter on said arbitrary item and it can measure away! And changing the implementation of IDistanceService per order, not a problem! I'll just scope per object. But wait, I don't have that ability in my IoC. Eh, it's the right way to do it, I'll just make sure my Order gets the right impl and do some manual dependency injection myself!!!
Just days after I push out the updates, the customer starts coming back to me with all kinds of weird issues. Orders having the right measurement system when opened but coming back to them they have the wrong one. Improper systems completely. I have no idea! I didn't duplicate any code, i followed all kinds of good things from the programmers "Alphabet Soup"; SRP/SoC/IoC/DIP/ISP!! How did I miss somewhere that the configuration was getting setup!?
After researching/discussing/looking I found the answer. It was subtle, but major. I had duplicate code all over the place. It's just, that in this case, the duplicate code wasn't actual code, but duplicate dependencies. When I said that the Customer shouldn't know about changes in how to MeasureDistances, what I should have said was that the Customer shouldn't know how to measure AT ALL!! Separating concerns, in this case, wasn't enough. I needed to centralize concerns as well. After pulling the dependencies out of the classes and centralizing the code to remove duplication, I needed to pull that dependency "up the stack" to a higher level in order to remove "dependency duplication". All of the individual references to the IDistanceService had turned into a nightmare to manage and update and they didn't need to be there. Let the object that was asking for the measurement reference the IDistanceService, not the items being measured!!
C#:
-
public class Customer
-
{
-
private GPSCoord _location;
-
......
-
public GPSCoord Location
-
{
-
get{...};
-
set{...};
-
}
-
}
-
-
public class OrderPresenter : IPresenter
-
{
-
// Anywhere a distance needs to be presented under this Order/OrderPresenter, utilize this IDistancePresenter!
-
public OrderPresenter(IDistanceService distService, ...)
-
{
-
....
-
}
-
}
Moral of the story, if something doesn't exist in any current framework, there's probably a reason!!