Categories
Intuitive behaviour
18th May 2009
Today I was looking at exception stack trace. One of suspicious places was ‘…\reports_controller.rb:129″. Okay, navigating to this location using RubyMine is a piece of cake. Ctrl+Shift+N to get to reports_controller.rb, then Ctrl+G to position caret at specified line. But hey, that’s two actions. I hit Ctrl+Shift+N, put ‘reports_controller.rb:129′ in and voila! It worked just as I expected!
RubyMine: +1 to intuitivity, +1 to overall impression.
Advanced default parameters
09th March 2009
Today I was quite amazed by one of Ruby features. It is about default values of method parameters. For example you can do something like this:
def get_current_actions(project_id, status_id = params[:status_id] || DEFAULT_STATUS_ID)
# implementation goes here
end
The code is saying basically this: “if status_id is not passed explicitly, try to take its value from params array. If it doesn’t contain specified key, then fall back to a constant”. This feature (as almost all the rest of Ruby magic) made avaiable by Ruby’s nature: it is interpreted language. This type of code is totally unusual to guys like me, who come from the world of static typing and compiled languages. But I think I’m gonna get used to it
Iterations are good
04th March 2009
Iterations in software development. Tried to implement proper solution on the first try? I bet you failed. It’s like in Google Earth zooming in your house from the planet view. To achieve your goal, you’ve got to advance a little bit, adjust your position, advance further… Iterate until done.
Making more mockups
03rd March 2009
Today Elen, my manager, approached me and asked to make a prototype of a new functionality in our project management system. This is a reimbursement management module: employees spend some money (taxi from airport, for example), then they create requests for reimbursements and if they are lucky and management approves the requests, they get the money back
So, prototype it is. (more…)
SugarCRM: More colors!
06th February 2009
When I was implementing previous issue, my manager asked me: “Can we also mark meetings with colors, corresponding to users?”. This way it becomes somewhat easier to identify originator of an event. “Yeah, it would be cool, but it can be tricky and difficult to implement”, I said, rejecting the feature request. I said so just to save my ass from potentially frustrating project. Just the day before Marcelo had told me that he has a friend who was working with SugarCRM for a year and he hadn’t quite enjoyed the experience. (more…)
SugarCRM: really shared calendar
06th February 2009
SugarCRM is a decent piece of software. At least, it doesn’t look bad and source code is not as scary as it could be. However, it could have better documentation (I realized that when I was adding some custom fields to built-in entities). But this is another topic.
And today I am going to tell you about its Calendar feature. My colleagues were wishing it could be easier to share a meeting with others. Yes, sharing is theoretically (and practically) possible. All you have to do is to add selected individuals to your event and they will see it on their calendars in “Shared” section. This sounds like sensible behavior for large companies. However, for a small company like us it is more desirable to have zero-friction sharing. It will bring some informational noise (meetings that don’t really relate to certain individuals), but since we are small company, we can live with it. So, I started looking into the sources and here are my findings. SugarCRM stores association between users and meetings (and other entities, like calls) in join tables, usually named like “meetings_users”. And it uses these tables, when showing calendar. The easiest solution for our problem (zero friction sharing) would be to take that join table out of queries and show ALL meetings. And we will do just that. (more…)
Unmount this drive… Please?
08th January 2009
One thing I dislike in my current Vista installation is how it behaves while trying to unmount USB harddrive. I have a 320 gig external drive, which serves as a storage for my backups, torrents and videos. Also I store and run different virtual machines from it.
This morning I was about to go to the office. I shut down µTorrent and clicked “Safely remove” on my drive. “This disk cannot be removed right now. I don’t know who uses it, but someone surely is.” was the response. I tried again. The same result. Hmm, maybe some program or explorer window is indeed hanging around. I double-checked all icons on a taskbar, then running processes in Task Manager. Nothing.
Formatting with named parameters
05th January 2009
Problems with formatting
The “official” way to format strings in .NET BCL is to use String.Format method (and wrappers for it, like Console.Write).
This is not very reliable method. You can forget to include parameter into the format string or confuse one parameter with another. And your IDE does not offer any help here. (more…)
Case sensitivity and tools
19th December 2008
I want to say again that decision to make identifiers case-insensitive is one of the worst design decisions a language author can make. Along with that goes “declare on first usage” decision, but more on this later.
Why is it bad? Because you either have to have proper development tools that support this decision, or assume high professionalism of the developers, letting them use conventional tools. Good professional developer will be consistent with casing of identifiers, because he sticks to some naming convention and case means something there (this is wild assumption, but I believe it is true, hehe). (more…)
Creating UI mockups with Balsamiq
18th December 2008
Virtually in every project you have to do some UI mockups. I mean, if you have some methodology, you are a team and you are serious about your project.
In my past experience I have tried different ways of creating mockups:
- hand-drawn pictures;
- hand-drawn pictures, photographed with digital camera and inserted into requirement doc;
- Visio documents (duh!);
- some actual code.