Blogroll

OK, this started with something Dave Winer wrote, and it got me interested.

I think I have the blogroll solution done for my own tool that I’m building (for fun/learning — not good code…yet…):

And here it is imbedded in the page; the blogroll list is on the bottom right.

I differed from Dave’s design (Bryan Bell’s?) by putting bigger arrows to the right and left instead of stacking them.

I tried out Dave’s solution (which he put online for play; I don’t know if it’s still active), but I had an issue with the close proximity of the arrows. I like his/Brian’s design better than mine, but mine is easier to hit with a mouse. I dunno. I’ll have to play for a bit and see which is better. I guess all I can say is that my initial (first impressions = important) impression of Dave/Brian’s design is that it was difficult to hit the buttons — arrows squeezed in a small space.

Beyond that, testing tells.

PHP solution (against PostgreSQL).

Actually, I’ve had another solution done rather quickly, but it involved too many queries.

The current solution requires only the queries actually necesary to make a change to the database — there are no queries to get “max/count([whatever])” or what have you.

Now that is all handled by array manipulation.

I still don’t think I have it optimized, but this is a step in the right direction.

It looks like I eliminated three queries, which were mostly redundant.

This is a higher level of array work than I have done in the past, but it was a good project. It’s one of the reasons I did this second version.

NOTE: PHP still does not have the best array handling functions. Don’t get me wrong – it has a million functions, but a lot are sorta silly or incomplete.

Example: arrary_shift() — pushes the first element off the beginning of an array.

OK, good start.

But why no way to delete arrary[3] directly? Need to unset and then either: reset() or reset with call to array_values to eliminate pointer.

To me, if there are four elements in an array (0-3), and I want to remove the third element (2), I should be able to do this and have the pointer for the third element set to the former fourth element (3).

Doesn’t work that way now, that I can see.

Learning curve, but I like that….

More tools in my tool belt…