How to Start a Software Company 2.0

by Richard Rodger

       
 
CSV Manager 1.1.9 Released

I've just put up a new release of CSV Manager, my CSV file parsing Java component. This release adds the ability to handle comments in CSV files.

I should explain how the Ricebridge versioning system works. It's pretty standard in fact. The first number is the major version. All releases with the same major version are forwards and backwards compatible with each other. And when you buy into a major version, you get all releases in that version. I don't believe in making customers constantly pay for upgrades. A major version bump occurs when there is a really big change in functionality.

The second number is the minor version. This indicates a release series with a stable feature set. No major structural changes occur within a minor version. The minor version is bumped whenever there is a reasonable increase in functionality. Compatibility with earlier minor versions is retained.

The third number is the build number within the minor release. This is incremented each time there is a bug-fix release. It is also sometimes used for small features, such as, oh…, comment support, say. All bugs, by the way, are documented. You know exactly what you're getting when you buy a Ricebridge component.

The only thing I haven't got quite sorted just yet is a proper change log for the components. But hey, it's on the to-do list!

So now you know how I work. Just to repeat, if you buy the 1.1 version of any of our products, you'll get all the versions up to 1.9 (or 1.whatever we get to), as free upgrades.

Technorati Tags: Del.icio.us Tags:

@ 04:47 PM GMT+00:00 [ comments [0] ]   email this   links to this
 
 
Don't Panic!

The worst thing you can do as a website owner is to constantly make lots of little changes.

The best thing you can do as a website owner is to constantly make lots of little changes.

You need to know what works on your website, and what doesn't. And your visitor statistics will help you find out. But if you keep making changes on an ongoing basis, you'll never know for sure. I've just put up a change on my own site, and I've realised that it will be really hard to tell if it's going to work or not.

Unless you just love multivariate analysis, it's much better to let things run for a few weeks to really find out what fires up your visitors. Statistics are strange things, and you can get really big swings from one week to the next. The standard deviation is bigger than you think.

So before you panic, and jump around the place changing stuff on your site, just take a deep breath and make sure you know what's happening right now. Measure twice, cut once. Make lots of changes, but make each change deliberately, in a way you can measure. Try to space things out, or makes changes that are independent. Lots of little improvements over time add up to big sales, but you don't want to go for a random walk either.

So be zen about your site. You may know something is wrong. You may have seen someone try to use your site and flounder. You may think you need a new colour scheme. You may even think you need an onsite avatar (no, don't go there!). But make sure you can tell the difference between before and after.

(And the change I made? I put links to my solution-focused tutorials on the top left, above the boring standard navigation menu. I'm sure it'll work, but I've mixed it in with other changes and it'll all be too hard to untangle.)

@ 08:24 PM GMT+00:00 [ comments [2] ]   email this   links to this
 
 
Yet Another Dojo Mini-App

Here's a technorati tag generator written in JavaScript and using the Dojo Toolkit. A while back I was moaning about the lack of documentation for Dojo, so I thought I would do something about it.

I decided to reinvent the wheel :) Tag generation is a great little thing for a JavaScript web application. It has very focused functionality and it's not a very big piece of code. So if you want to get into Dojo, you can just look at the JavaScript that I wrote, and see how I use bits and pieces of Dojo to implement stuff.

Now what I did not do was use any widgets. Dojo widgets are a whole other ball game. I have written about them before — see my post about implementing a progress bar widget. This bit of example code is more about all the other cool stuff that Dojo lets you do.

The full source code for the tag generator is available in the tags.js file. The code is fairly direct, there's a bit too much repetition and stuff like that. But I thought I would try to not to "architect" it too much, as it is meant to be easy to understand.

Events

The event handling uses the dojo.event.connect function. I also use the convenient $ function convention, instead of the far too verbose document.getElementById, to pick out the HTML elements I want to attach events too. All the event connection code is at the end of the tags.js file.

Transparency

The links on the side bar bring up semi-transparent divs. This is done with the dojo.style.setOpacity function, which hides all the browser specific stuff. I fade in the transparency over a few seconds using the dojo.lang.setTimeout function, which works properly with JavaScript objects, so it's better than the native setTimeout function.

Escaping

Dojo also provides a full suite of escaping functions. I use dojo.string.escapeXml and dojo.string.encodeAscii for formatting the tag text correctly. These are great little functions that "just work".

Dynamic HTML

Various HTML elements are shown and hidden using the dojo.html.show and dojo.html.hide functions. These work fine so long as the element is display:block. It the element is inline, they won't work.

AJAX

And, of course, AJAX. You knew it was coming. The comment form submits the comment data to the server using AJAX and pops up an alert to let you know it was saved. Look for the dojo.io.bind function to handle all this for you. A really big win. Totally cross-browser and another "just works" feature for Dojo.

I should mention that I use JSON for the data encoding, just in case you were wondering how I did that. It's by far the best method for AJAX data exchange. Yeah, I know, the X is for XML. Well, honestly, JSON is better and much easier to work with, it’s just that AJAJ is crappy acronym.

So there you go. If you're an old hand at Dojo, then this post is probably a bit pointless, but if you're just starting out, hopefully you'll find some of it useful. It's meant to highlight things that Dojo can help you with, even if you aren't building the next GMail, Flickr or Web 2.0 Wonder Site.

Feel free to ask questions in the comments…

Technorati Tags:

@ 01:04 PM GMT+00:00 [ comments [0] ]   email this   links to this
 
 
Sun T2000 Headache

Literally. This thing is so loud I now have a headache. No more benchmarking for me today.

@ 02:28 PM GMT+00:00 [ comments [0] ]   email this   links to this
 
 
Free Product Trials

I've decided to introduce free trials for my two main products. As a micro-ISV, these types of decisions are always a bit tricky. I've done pretty well up to now sticking to online demos. By their nature, the products (a csv parser and an xml parser), are not that suited to downloadable demos. They are API-based components, after all, so there's nothing to see, as such.

But I've decided the time is right to experiment. You don't get anywhere in business if you stick to the same old strategy regardless. Based on visitor comments and usage of the online demos, I think that the lack of a downloadable trial for the products is hurting my sales. By how much is hard to say. But we'll soon find out!

One reason that people do not offer a downloadable trial is fear of copying. Well, to be frank, this is just not a problem for me. I don't know why people are so afraid of copying. To my mind, those who copy could probably not afford to buy anyway, so you've lost nothing, and gained a user. I already offer my products free to charities and public bodies, so this is an extension of that line of thinking. Sure, some will never buy, but down the line, quite a few will. Maybe that's terribly innocent, but hey, I believe in people!

The other question about demos is how to structure them — time-limited or function-limited. I don't really like function-limited. It makes a bad impression. And it mucks about with basic functionality. So I've gone time-limited. You'll get your standard 30 days. That should be enough time to see if the components work on your CSV or XML file.

So check back here in a month or two and we'll see how this little experiment goes.

@ 04:05 PM GMT+00:00 [ comments [0] ]   email this   links to this
 
 
Sun T2000 Server Arrives! Happy Day!

Well, you've got hand it to Jonathan Schwarz (Sun CTO), when he says "free server", he means "free server".

A while back I decided to apply for this "free server" promotion that Sun Microsystems is running. You get a free server if you can run some benchmarks and if you blog about it. It seemed way too good to be true, but hey, I'll try anything once. So off I went to their online application form, filled out the details, and thought; "there's no way they'll go for a micro-ISV!"

But they did — I got a call from Sun a while back and was told it was on. A Sun reseller, Horizon Open Systems, are looking after the details. I still can't quite believe it! Way to go Sun. I know Sun bashing is a bit of a sport, and they have done some silly things, but I doubt you'll find a opportunity like this with any other vendor.

Here are the benchmarks I'm going to be running: CSV Manager Performance Report, and XML Manager performance report. Let's just say I expect significant speed increases.

So what is the server anyway? It's a Sun Fire T2000. Here's a picture of the box. It sure is purty. It has a 4-core ULTRASparc T1 Processor, 4Gb of memory and two 73Gb SAS disks. And that's just the starter kit. Makes you want to cry if you've been living in x86-land.

There is one tiny fly in the ointment though. Sun sort of forgot to pack an RJ-45 to DB9 adapter, which you need to access the machine controller, so that you can actually boot Solaris. Oops. So at the moment it just a big lump of metal and silicon sitting in my office. The Frustration! Anyway, Horizon are getting me sorted with the cable, so we should be up and running next week. It's gonna be a long weekend.

@ 09:26 PM GMT+00:00 [ comments [2] ]   email this   links to this
 
 
Competition #2 Results, Competition #3 Ready-To-Go...

Congratulations to Roman Nowak, winner of last week's Ricebridge Java Components Competition! A free XML Manager for you sir!

So this week, let's get pay homage to our descendants: grab those HTML anchors! All you have to do is figure out some simple XPath expressions to get at the data in the document, and a free copy of our XML Manager Java component is yours.

Alright people, don't just stand there! ... Go!

...

Uh, begin, commence, start moving… theoretically you have been racing for about forty seconds now, and so far Mr. Schaffer is winning because he's nearest to the door.

@ 04:19 PM GMT+00:00 [ comments [0] ]   email this   links to this
 
 
Woohoo! JARS TOP 5% Rating!

CSV Manager, our Java CSV file component, has just got a JARS TOP 5% rating!

Previously we had a TOP 25% rating, but now we've been moved up! Here is the mail I got this morning:

Resource Name  : CSV Manager
Developer ID   : RR22
Resource  ID   : RR22-1

-------------------------------------------
Presentation : 400
Function     : 300
Originality  : 250
-------------------------------------------
Total        : 950 (out of a possible 1000.)

JARS - The Java Applet Rating Service 
- http://jars.developer.com/

Not bad. The presentation score is really great. We put a ton of work into our documentation (there's loads of it for a start). We really are pretty obsessive when it comes to good documentation. It's the one thing that lets great components down. Document or die. That's the way it is.

Right. Next job: a TOP 5% Rating for XML Manager. Here we go...

@ 01:21 PM GMT+00:00 [ comments [0] ]   email this   links to this
 
 
This Week's Java Components Competition, and Competition #1 Results

Congratulations to A. Luepke, winner of last weeks Ricebridge Java Components Competition!. A free XML Manager license is on it's way.

And on to this weeks competition. Just get your head around a simple address book XML document. All you have to do is figure out some simple XPath expressions to get at the data in the document.

And thanks to all of last weeks entrants — let's see what you can do with this week's challenge.

Good Luck!

@ 05:14 PM GMT+00:00 [ comments [0] ]   email this   links to this
 
 
Typing Update

I haven't given up on the tragic typing. Still plugging away on goodtyping.com:

Very good Richard! You have made only 1 error (0.42%).
You can proceed to lesson 9.

Seconds: 112

Keystrokes Per Minute (KPM): 127.50

Perhaps not the greatest progress in the world, but hey! Overall I am pretty happy with the goodtyping.com site and would recommed it if you are trying to learn touch-typing.

Now if only they would let me turn off CAPS LOCK

@ 02:43 PM GMT+00:00 [ comments [0] ]   email this   links to this
 
 
Competition: Free Java Components!

Competition time! Just to make life interesting I'm starting a series of weekly competitions to win a free XML Manager or CSV Manager license. All you have to do is come up with some simple XPath expressions.

As this is a new idea for me, I'm interested to hear what you think, especially from a business perspective. Will I get a "YES" out of this idea?

@ 01:06 PM GMT+00:00 [ comments [0] ]   email this   links to this
 
 
Business Training Wheels

The New York Java Consultant (Solomon Duskis) notes that we seem to be starting businesses pretty young in Ireland. That's quite ironic since all the "I sold stuff as a kid before I made my millions" stories that I've ever read in business books have always been American stories. It's kind of an archetype: young American male with nothing but guts starts business against the odds and makes it big. And of course he earned his stripes selling lemonade and cookies.

Maybe it's a sign of the times — we're just starting to develop the do-your-own-thing mentality over here. For so long in Ireland, the pinnacle of success was a civil service job with a state pension. And just maybe you could be a doctor if you were really good. Most people with any sense left the country (of course, they're all back now starting companies!). I think it's not just about the economic climate — it's about a psychology of liberation. You need to give yourself permission to succeed. Note that I said succeed, not fail. Irish people have been giving themselves permission to fail for far to long. Success, on the other hand, is scary.

And it is true that lots of young people in Ireland are quite open to starting businesses, straight out of school or college. Last year I was on a business startup program, and there were two graduates on it. It makes sense to have a go at starting a business at that age — nothing to hold you back.

@ 10:42 AM GMT+00:00 [ comments [4] ]   email this   links to this
 
 
Friday Fun: Waterfall 2006

Time to get with the agile backlash. Tell your super-flexible velocity-driven project manager where to stick it.

(Thanks to Sean McGrath for this one).

@ 02:11 PM GMT+00:00 [ comments [0] ]   email this   links to this
The Boyle-Walton Science Museum

It's about time we got a science museum in Waterford, considering that the county has produced two of the giants of modern science:

Robert Boyle: "The Father of Chemistry", and
Ernest Walton: Nobel prize for splitting the atom.

So if you have any connection to Waterford at all, go and put your name down.

Never mind the motorway, a science museum would be much cooler!

@ 09:55 AM GMT+00:00 [ comments [0] ]   email this   links to this
 
 
User Manager: Some Design Ideas

I promised to make the development of the next Ricebridge product, User Manager, more transparent. So here goes…

User Manager is already in production. It's a fine-grained user access and permissions system. It handles arbitrary permissions for arbitrary business objects and is designed to be extensible.

That's all well and good, but the actual implementation as it stands is pretty specific to the client who contracted the original work. And rightly so.

Here's what we have now:

1. The extension and integration mechanism is via subclassing. Bzzt! Wrong answer. Definitely not the way to go – experience has shown that. In the current version you subclass the RBUser and RBUserManager classes with your own in order to hook up the user management features to your own application. Not really fun at all. Instead I think this should be done via contained classes. So your own User class, be it a POJO or whatever, is referenced inside an integration class, used by User Manager. I'm thinking of calling the integration class something like UserRef, the Ref suffix standing for "reference".

2. The Naming convention sucks. In order to avoid clashes with implementor subclasses I chose to prefix most of the component classes with the prefix "RB". It's just ugly. And not really that necessary. A lot of the user management specific classes should have proper names: UserManager, Login, Access etc. If the developer is going to use User Manager then they won't be using these class names anyway. They only big issue is with entity class names: User, Role, Group, etc. Point 1. above suggests a naming convention for them: UserRef, RoleRef, GroupRef, etc. These reference classes hold the actual entity objects, or perhaps even their own suitable references. If you're using old-style EJBs you might need this sort of dereference. I don't know – I've tried to forget most of my EJB knowledge and been largely successful! Urgghh. Shiver.

3. The permissions rules need a bit of redesign. This is quite a biggie and I doubt if this will be the last mention of them. Here's how they work now:
You have a set of Permissions. Each permission is binary. The Permissions are stored as a bit array. Each User has a permission set. So you can load up the permission set for a user and check if a permission bit is set for the permissions you are interested in. The list of permissions is not meant to be really long – maybe 256 at most. They are general things like read, write, save, etc.

Each role also has a set of permissions (there are no groups in the current version). So if you put a user in a role, they get all the permissions of the role. The permissions are just ORed together; they are additive.

The real power comes from the permissions you can assign to arbitrary business objects. These are just identified by a String name. You can assign a set of permissions to a user for a business object. That way you can give fine-grained control of business objects to only certain users.

To look at it another way, the permissions are like verbs, and the business objects are like, well, objects. The user is the subject.

For the original client requirements, we also put in a "domain" system, so that you could have domains as well as business objects. You could assign permissions to domains in the same was as business objects. Thinking about it now, there is no difference between domains and business objects. Domains are business objects. So out they go. We'll keep the idea of business objects of course.

4. Groups are not supported. The current system only uses roles. Is there a difference between groups and roles? Implementation-wise probably not — they are both just things you assign permission sets to. But I think there is a semantic difference. A group can reference a real-world collection — a class of students, a project team, and individual retail unit. It makes no sense to mess up the group just to control permissions. So I think that User Manager will have both roles and groups. Roles are where you put your permissions and groups are where you put your users. Of course, you will still be able to assign permissions to a group — that seems necessary for ease-of-use.

OK. Where do we go from here? Well the new design will look something like this. You have permissions. This are binary values and you get a list of them. Maybe 8, maybe 256, maybe 4096. Whatever. As many as you need, but you'd be nuts to have too many. Remember, it's the business objects where the fine-grained control happens. You also have users. Each user has a permission set. So at the basic level, you could have permission at index 0 as the "login" permission. If this bit is set, the user can login. Just using the User permissions means you can assign broad and general permissions to users – the ability to read everything, save everything, etc. Of course you can get more specific, but that multiplies your permissions and is not such a good idea.

And then you have groups. Just a collection of users. And each group gets a permission set as well. The group permissions are additive — they are added to the existing permissions of the user. Groups are mean to have a semantic referent and are not meant to be used for permission juggling. That's what roles are for. Roles are just the same as groups — you can assign them to users and they have an additive permission set. The only extra thing is that you can also assign them to groups.

So now here's what you have. You can set up your list of users, give them all a base set of permissions. Then you put them in groups, and give the groups some more permissions if that's useful. The group permissions should be fairly stable ones. Then you create some roles with permissions for specific activities. You then assign the roles to your users and groups as required. If you need to make changes, you mess with the roles, not the users and groups. Of course, some changes should happen to users and groups directly, like removing the login permission.

Now we come to business objects. I don't actually like that name. Let's generalise a bit. Let's call them "scopes". A scope is anything you want it to be — it is just a String reference to something. It might be an individual business entity — a product id or SKU, or it might be a "domain", some collection of business entities, or it might have some other meaning. That's for the developer to decide. Scopes are the unit of fine-grained access control. You assign permissions to scopes for individual users, groups and roles. So you can say, for instance, that scope "foo" has permission "modify" for users "a", "b" and "c".

The scope permissions are also additive. But we can add a twist here as well. After all the additive permissions are resolved for a user in a given scope or scopes, we can allow for negative scope-based permissions. This allows removal of certain privileges without totally shutting users out. This idea is a more experimental one at this stage – we'll have to see how it plays out.

So how do you get the permissions for a user at a given moment? The permissions are a function of: user, roles for the user, groups for the user, roles of the groups for the user, and then all of the scopes that apply to the user and any of the groups and roles for that user. This will have to be coded to avoid performance problems – some sort of caching is in order. Finally negative scopes are applied.

The following database structure encodes some of this design:
Permission: bit-index, name
User: id, username, base_permission_set (byte array)
Role: id, name, base_permission_set (byte array)
Group: id, name, base_permission_set (byte array)
Assign: user, role, group (use any two)
Scope: string-id, user, role, group, permission_set, positive/negative

So to get the roles for a user:
select Role.* from Role, Assign where Role.id = Assign.role and Assign.user = ?

To get groups for a user:
select Group.* from Group, Assign where Group.id = Assign.group and Assign.user = ?

To get roles for a group:
select Role.* from Role, Assign where Role.id = Assign.role and Assign.group = ?

To get all the roles of the groups of a user:
select Role.* from Role, Assign as ar, Assign as ag where Role.id = ar.role and ar.group = ag.group and ag.user = ?

For a given scope, get all the entries from the scope table, and cache them in a hash map. We can then match this against the roles and groups of the current user. Each scope is unlikely to have a high number of entries. If a scope applies to each user say, then it should be a group or a role. The User Manager should provide an easy way to turn a scope into a group or a role in fact.

Alright, that's enough for today.

@ 11:58 AM GMT+00:00 [ comments [2] ]   email this   links to this
 
 
 
YahooBloglines
NewsgatorMSN
Google Readerdel.icio.us FurlSubscribe with myFeedster
« April 2006 »
SunMonTueWedThuFriSat
      
1
2
3
4
5
6
8
9
11
13
14
15
16
17
18
20
22
23
24
25
27
28
29
30
      
Today

All | General | Java | Business | Fun | Perl | Rant | Ireland | Web
[This is a Roller site]
[Valid Atom 1.0] [Valid RSS]
Technology Blog Top Sites
Blogarama - The Blogs Directory

Blog Directory & Search engine

Blog Flux Directory
Irish Blogs
 View My Public Stats on MyBlogLog.com

Performancing
Enter your Email


Powered by FeedBlitz
Theme adapted from Sotto.
 
Ricebridge XML Manager
  • Convert XML to a table of data
  • Convert XML to CSV, and CSV to XML
  • High-speed, single-pass XPath
  • Memory-stable and fault-tolerant
  • Loads of documentation
  • Cut-and-paste code examples
  • Find a bug, get a gift cert
Ricebridge Java XML Manager Component


Ricebridge CSV Manager
  • Convert CSV to a table of data
  • Handle any type of delimited file
  • Memory-stable and fault-tolerant
  • Loads of documentation
  • Cut-and-paste code examples
  • Find a bug, get a gift cert
Ricebridge Java CSV Manager Component


Popular Posts

 Sign up for MyBlogLog.com
Alertra Website Monitoring Service
Get Chitika eMiniMalls
Solo Tees
BlogJet