Saturday, May 05, 2007

Norton 360: Should we tell him?

I came across the latest viral marketing campaign from Symantec Australia today, it's promoting the new Norton 360 home security/recovery suite using a YouTube video:
The ad is quite funny for an IT geek like myself, especially the 'wall of fire' reference to the firewall function (which is actually named after the physical firewalls in buildings that limit a fire spreading).The ad micro-site includes a competition to see if you can spot the two places where 360 appears in images on the micro-site, but not in the ad. For what it's worth my money is on the tennis racket and the cup (although the tennis racket shows a white blob on the end in the video, you can't tell it's '360' as well as you can in the photo below).



Anyway, I can't say much about the product itself, except that I like the idea of stopping IM viruses and online backup and it seems to have a nice user-friendly console:

For over a year I've been using McAfee's SecurityCenter product suite (now VirusScan Plus) and frankly finding it damn annoying. At one stage it was prompting me 4-5 times a browsing session to confirm that I was a registered user on the McAfee website, because it had downloaded a new virus definition, or a firewall update. Surely this is something that could have been remembered, or taken on trust?

I've now downgraded to just the anti-virus (which I get free through work) and am back to using ZoneAlarm for my firewall needs and relying on Gmail to scour my email for spam. I typically use Mozilla Firefox, so I get anti-phishing tools built into the browser.

With Norton 360 it looks like Symantec are maintaining Norton's reputation for usable security software:
“Based on your constructive feedback, we made a number of usability and performance improvements through the course of the beta program. In addition, we are making available an optional add-on pack for Norton 360 for anti-spam, ad blocking, parental controls and confidential information blocking. The optional add-on pack will be available for download by the end of March.”
For what it's worth, I would love to win this one and see if Norton 360 can sort out my security and data backup needs wihtout constantly interrupting my web browsing ...

Friday, May 04, 2007

Rails slideshows

There are some great Rails slideshows on SlideShare, here are some of my favourites:

Scaling Twitter:
“It’s Easy, Really.
  1. Realize Your Site is Slow
  2. Optimize the Database
  3. Cache the Hell out of Everything
  4. Scale Messaging
  5. Deal With Abuse”


Introduction to Active Record:
“I have never seen an Active Record implementation as complete or as useful as rails.”
Martin Fowler



Ruby on Rails Resources (RESTful development):
“Constraints are liberating (a straight jacket for your mind)”

Monday, April 30, 2007

Authentication in Ruby on Rails

I've been getting sporadic time fragments to spend on Ruby on Rails, hardly throwing myself into it, but the best I can manage with my work and family commitments. One of the key items I'm wrestling with is user authentication.

This is an important area to me as any web app I am likely to write in Rails will need to authenticate users, at the very least site admins, but more likely regular users that have private data/functions they need to access.

Allow me to explain a crucial point here; when people look at application security there are two related, but different, concepts that are often confused. These are authentication and authorisation.
Authentication
This is how you prove that you are who you claim to be. An authenticated user is one who we accept the identity of.

Authorisation
This is how we determine what you are allowed to do. The first step is always to authenticate that you are really who you claim to be, the next is to determine what authorisation you have been granted within our application.
I actually intend to implement both concepts in my breakable toy apps, but unless I can find a good answer to the first one, I won't be able to do the second.

Fortunately authentication systems can be easily shared, for example I could try to implement Google account authentication, which would allow users to login to my application using their Google account. The acts_as_google_account plugin might give me exactly what I need in this area. That places the burden of user administration on Google and leaves me just worrying about authorisation.

It is much harder to take on board someone else's authorisation system, as it is by necessity interwoven with the object model we are using, and may not meet anyone else's expectations about how to control user access. A truly orthogonal authorisation system may be possible, but I have yet to see one.

Anyway, my problem at the moment is that acts_as_google_account has minimal documentation, no test cases and a module called "Foo" ... hardly something that instils confidence in the code. I could look at the Acts as Authenticated plugin, which at least is documented (almost well documented) and widely used, and someone has already worked out how to install the plugins as generators (which is more what they are).

ModelSecurity is very nice as it implements at the model level, avoiding the potential loopholes that controller-based authorisation schemes provide (e.g. a new controller is built that exposes the models without implementing the right security scheme). However there are some concerns with its integration with auto-completing text fields. But at least some of the issues have been worked out for me.

I had read someone complain that ModelSecurity implements a single level of security, which would be less than useful for me, however a read of the ModelSecurity class reference shows that the security scheme allows you to specify any test you like, so you could implement user security groups or other funkiness as you will (e.g. allow access for users whose firstname begins with "A" and a date of birth in April for any even-numbered year).

Other possibilities are to look at ActiveRBAC (RBAC = Role-Based Access Control) and the Authorization plugin.

Of them all, ModelSecurity appeals to me the most as it secures at the lowest level possible. Hopefully the next time I write about this I will have implemented it in one of my toy apps.

Sunday, April 29, 2007

Managing badly against the grain

Bob Sutton (author of The No Asshole Rule) has an interesting article at Harvard Business Online on the discontinuity between the accepted wisdom regarding 'superstar' employees and the objective evidence about that wisdom. I've got family members in the HR consulting area, so I find this sort of thing interesting, but I came across this bit about the No Asshole Rule which seemed worth sharing:
“there were several CIOs who emphasized that such bosses and work climates not only drove people out, but they created environments were people devoted too much energy to avoiding blame and the wrath of others, and not enough time to actually doing their jobs”
Have you ever experienced an asshole boss or work climate? I have, at two different workplaces, and it took a terrible toll both times. Apart from the fact that it wears you down to deal with such dysfunctional people, it can influence your own attitudes, so that you find yourself exhibiting signs of being an asshole yourself, not to mention taking on full-time blame avoidance and wrath dodging.

It doesn't help that asshole behaviour usually comes from people you feel you should respect (they're senior, the cream of the crop, the respected director, the firm's rising star), which can hide the harm it does if you let it make you too self-critical (they're right, I'm not good enough, I screwed up, I don't deserve this job ...). But the truth is that if a manager criticises your performance, does nothing to help you improve it, and yet expects improvement - then they are acting like an asshole.

When it comes to looking at what managers should do, Bob Sutton suggests we look at evidence-based management. Jeffrey Pfeffer runs a website about evidence-based management and recently testified to Congress about it. He summarised his testimony into five points (re-formatted by me):
“First, organizations in both the public and private sector ought to base policies not on casual benchmarking, on ideology or belief, on what they have done in the past or what they are comfortable with doing, but instead should implement evidence-based management.

Second, the mere prevalence or persistence of some management practice is not evidence that it works -- there are numerous examples of widely diffused and quite persistent management practices, strongly advocated by practicing executives and consultants, where the systematic empirical evidence for their ineffectiveness is just overwhelming.

Third, the idea that individual pay for performance will enhance organizational operations rests on a set of assumptions. Once those assumptions are spelled out and confronted with the evidence, it is clear that many -- maybe all -- do not hold in most organizations.

Fourth, the evidence for the effectiveness of individual pay for performance is mixed, at best -- not because pay systems don't motivate behavior, but more frequently, because such systems effectively motivate the wrong behavior.

And finally, the best way to encourage performance is to build a high performance culture. We know the components of such a system, and we ought to pay attention to this research and implement its findings.”
The assertion that organisations are sending their managers to courses and drafting their policies based on what is essentially made up rules is scary. Just because we wish something were true, doesn't mean it is, and acting otherwise is plain stupid.

Bringing that back to project management, which is my personal sphere of management experience, and Ross Pettit at The Agile Manager blog just posted on Patterns and Anti-Patterns in Project Portfolio Management. The anti-patterns he mentions are worth noting, although I'm not sure I buy the conclusion that Agile Management is the answer.

A good analogy for this stuff is the carpenter that stubbornly tries to plane against the grain and is unhappy with the resulting jagged finish. It is fair enough to say that in our personal experience we may not experience a particular situation often enough to be able to derive statistically relevant rules from it, but when others have done it for us, it behoves us to educate ourselves before we act.

[UPDATE: Another carpentry analogy is that we need to learn the trade and the tricks will follow. Too often we look for management shortcuts (the tricks) rather than getting the basics (the trade) right.]

Thinking of self-education, I'm in a place right now where I'm wondering whether I'm a software developer or a project manager. I find myself reading things like The Pragmatic Programmer and dis.cipul.us and tinkering with Ruby on Rails apps at home (my breakable toys) which clearly is part of my developer persona, but I also am interested in management and love the challenge of tackling projects at a level well above worrying about my daily tasks.

Articles found via Thoughtworks' Jason Yip here and again here.

Friday, April 27, 2007

Sydney weblogger April meetup

Thanks to Meetup.com I got a chance to meet a bunch of other Sydney bloggers last night. It was great fun and very interesting to meet other people with blogs, some of them very popular.


Of course you have to tread carefully when it comes to topics of conversation, as bloggers we are naturally opinionated and can find things to disagree about (politics, science, religion etc) pretty easily. However there was a surprisingly strong commonality when it came to reading sci-fi and fantasy - so that helped bring us together.

Funnily enough blogging itself was one of the least interesting topics - perhaps because we all do it so much - but it was nice to be able to share a laugh about waiting up for partners to come to bed because they are still blogging! The event was organised by Sara the Bargain Queen who does a great job of getting everyone together. Thanks Sara!

Monday, April 23, 2007

News.com.au 'Accountating'

I'm sure I only catch about 5% of these typos:

For goodness sake, if you work at News.com.au can you please, please try using the new Firefox with your CMS? The integrated spell-checker will save you from these sorts of problems - it even has an Aussie dictionary (en-au).

Wednesday, April 18, 2007

Ruby on Rails embraces BigDecimal

I am just getting back into Ruby on Rails after ignoring it for far too long. One of the first things I did was buy some shiny new books. The first one I picked up was Designing the Obvious, by Robert Hoekman. The second was The Pragmatic Programmer by Andrew Hunt and Dave Thomas. Funnily enough, neither of these books is explicitly about Ruby on Rails - but both deal with ideals (simple, yet effective design and pragmatic programming) that lie behind Rails' appeal to me.


I also checked out Dave Thomas's blog and in one of his recent posts he points out that Rails now embraces decimal database fields:
“In the Rails trunk, numeric and decimal database columns with a scale factor are now converted into Ruby BigDecimal objects. If the scale factor is zero, they instead become integers.

Migrations now support decimal columns too, with the addition of two new attributes, precision and scale.
   add_column :orders, :price,
:decimal, :precision => 8, :scale => 2
I just spent a day reworking all the Depot chapters to use this, and it seems to work great.”
That is great news, and I'm really looking forward to not needing to use the workaround I previously found.