This is a must watch if you are doing Rails and doing TDD, it’s an eye opener on how you should really approach testing Rails apps the “Right” way.
I stumbled upon this StackOverflow question: testing – Organizing rspec 2 tests into ‘unit’ and ‘integration’ categories in rails – Stack Overflow.
Basically, the guy asks how he can run specs isolated into logical groups, running the unit without running the integration and so on.
At Gogobot, we have exactly that, since we run our specs in the CI, we can decide which to run, and they run one after the other and dependent on each other, so if you fail UNIT, the build fails, no need to continue on.
You can run the rakes like so
This is what our spec.rake looks like
There’s a lot of buzz going on about software development methodologies, people talking about Agile, Kanban, Pair, XP and more and more.
There’s not much people are talking about when it comes to a single developer.
I have been a consultant/developer for the past ~3 years or so, working from home for several clients both in Israel and abroad (US mainly).
During this time I gained tons of experience in knowing what works and what doesn’t, this may be specific to me, but I don’t think so, so I decided to share this knowledge. So… what am I doing to keep productive during the day?
The pomodoro technique I am using is simple, I have a small application running on my Mac constantly (there’s windows versions as well).
When I start work, I simply choose start pomodoro, input what I am going to work on and dive in.
Now, all that’s pretty standard, but I am using it with get-shit-done, so once I start a pomodoro, get-shit-done executes work mode.
This work mode shuts down all outer traffic to time-sinks like Facebook, Twitter, news sites, YouTube and many more.
The script is customizable so I keep changing what I want/need. Along side with shutting down the time sinks, I execute a “busy” mode on Skype and any IM I am using at the moment. This is completely automatic, you can see it in the following screenshots
As you can see, any pomodoro I do is going into “Things” which I can then look at my day and see where my time went, what did I accomplish during the day and so on (it has OmniFocus integration as well).
If you want to get the app, you can get it here
This may seem stupid so up high here, but it’s REALLY important. I found that in days where I drink and stay hydrated, I am much more productive, less tired and get a lot more done during the day.
Another benefit is that I need to visit the restroom quite often so I don’t slack around in the chair too much. I use an application for that as well, it sits in my top bar and reminds me to take 5 minute water breaks every hour. if you are wired in, you can just ignore that, but don’t ignore it too much, it’s not the point
If you want to get the app, you can get it here
Things To Do
I open every day with a “things to do” list.
I write down anything I need to do, and then I forget about it, I don’t keep my mind occupied with all I need to do, I look at the list during the day.
One important thing is that I set times for stuff
- 1-2pm => working on the cashier module
- 2:30-3:30pm => working on the master/slave @dirty variable
While of course, these 2 tasks don’t actually take an hour, it’s here just for an example :-).
Anything you need to remember during the day, write it down, than simply let it go, don’t keep you mind occupied about that.
I keep any blog post idea, stuff that come to mind on other project that are not currently in work order and more…
Knowing I have it written down saves me the trouble of having it in my brain, and I dedicate all my brain resources (which are slim to begin with) dedicated to my code.
I must say, I have tried any TODO app out there, the one that works best for me is a pen and a paper, I use Things as a history for my pomodoros and nothing more (usually)
Another possible controversial title in a “be productive” blog post
When I am TDD’ing my mind goes into a “small piece” mode, I think only about the next 2-3 steps in what I need to accomplish.
People (wrongly) think that TDD is time consuming and they get less done, I have proven it numerous times in the past that this is incorrect, people that TDD are often 2-3X more productive then others.
Just think about every time you open a browser to “test” something, it can be done in TDD while you save your file, and you can instantly see if you broke something else in the code you are not thinking about.
The right side code is test, left side is actual controller code
When you are not productive…
There are simply days when you are not productive on the actual things you need to get done, in these days I don’t try and force myself into it, I simply move to other exciting stuff for 20-30 minutes (sometimes more)
I do a TON of open source, I help people in groups, forums etc..
Sometimes, answering a question, gets me back into code mode and I can find myself wired in for 2-3 hours after it.
To sum up
I touched but a fraction of my work methodology.
The thing is, you need to find YOUR groove, you need to find your pace, the hours where you are productive, the things that excite you.
You may take some of what I said here, you may take all and you may take nothing, all I am saying is that regardless of where/how you work in the team, you can have your own thing going on.
You may work with Pivotal Tracker or Trajectory, but still maintain your TODO list for the next few hours (like I do).
Share your thoughts…
I would love to hear what you think in the comments and have a discussion.