Jon Aquino's Mental Garden

Engineering beautiful software jon aquino labs | personal blog

Saturday, May 21, 2005 Making progress

Well, it's Day 1 of development of Got the domain name registered, and as you can see above I've started coding. Whew! I must have been coding for 10 hours. I am learning a lot about Ruby on Rails -- this is a great learning project. RoR is a great web application framework, but it does seem to take a day or so before one starts to feel comfortable with it (same with everything else I'm sure).

11:30 PM -- time to wind down for bed. There comes a point at which one simply has to say, "Enough for today!"

A couple more pics. I'm hoping that Jeff can come up with some good ideas for the design of this thing.


  • Stay tuned, I'll see what I can come up with. Looking good so far, Jonathan: I love a nice unstyled canvas to work with.

    By Anonymous Jeff Werner, at 5/22/2005 9:33 AM  

  • Hi Jon,

    I'm not a blogger, but I live with one and I'm a database geek.

    I have a couple of suggestions for your data model.

    First, I think that you're going to run into trouble if posts and comments are stored in seperate tables. You'll be able to do more (like comment on comments) if they share the same table with a self link and a type field.

    I suspect that the same things may apply to your two types of groups and even to people.

    I'll lurk on this thread so let me know if you're interested in more input.

    By Anonymous Steven E, at 5/22/2005 1:27 PM  

  • Jeff - awesome. I have posted more screenshots

    Steven - I'm very grateful for the advice (and will be sure to acknowledge you in the credits). I'm actually punting on the comments for now (just providing a field so the user can enter a URL to a message-board service like Google Groups), but I'm pretty sure we'll want integrated message boards for Version 2, so your smart advice on recursion will be implemented at that point.

    Wow, I feel like a startup! Are there any startups that work for nothing?

    I'm canning the GlobalGroup -- just having one Group for simplicity. GlobalGroup is a nicety that implements, but I suspect most people don't use it.

    So the model is now simply:

    one Location to many Groups
    many Groups to many Users

    (Wonder if we want to rename Location to City ... some people come from small villages, so maybe not. And aircraft carriers count as a Location. Let's stick with Location.)

    Steven - here's a quote you might like: "To a database person, every nail looks like a thumb. Or something like that." —Jamie Zawinski

    By Blogger Jonathan, at 5/22/2005 1:59 PM  

  • Steven, here are the database details. If you want to check it over, I would be grateful!

    CREATE TABLE `locations` (
    `id` int(11) NOT NULL auto_increment,
    `name` varchar(100) NOT NULL default '',
    PRIMARY KEY (`id`)

    CREATE TABLE `groups` (
    `id` int(11) NOT NULL auto_increment,
    `location_id` int(11) NOT NULL default '0',
    `name` varchar(100) NOT NULL default '',
    `description` text NOT NULL,
    `picture_url` varchar(255) NOT NULL default '',
    `message_board_url` varchar(255) NOT NULL default '',
    PRIMARY KEY (`id`),
    KEY `LOCATION` (`location_id`)

    CREATE TABLE `users` (
    `id` int(11) NOT NULL auto_increment,
    `login` varchar(80) NOT NULL default '' COMMENT 'Email address',
    `password` varchar(40) NOT NULL default '',
    `name` varchar(100) NOT NULL default '',
    `email_allowed` tinyint(1) NOT NULL default '0',
    `description` text NOT NULL,
    `picture_url` varchar(255) NOT NULL default '',
    PRIMARY KEY (`id`),
    UNIQUE KEY `LOGIN` (`login`)

    CREATE TABLE `groups_users` (
    `id` int(11) NOT NULL auto_increment,
    `user_id` int(11) NOT NULL default '0',
    `group_id` int(11) NOT NULL default '0',
    `organizer_ind` tinyint(1) NOT NULL default '0',
    PRIMARY KEY (`id`),
    KEY `GROUP` (`group_id`),
    KEY `USER` (`user_id`)

    By Blogger Jonathan, at 5/22/2005 2:10 PM  

  • Just a quick interupt in your database conversation here, but in case you haven't seen it already, Jonathan, the Unofficial Google Maps Embedding How-To looks like a great addition:

    By Anonymous Jeff Werner, at 5/22/2005 2:44 PM  

  • Fantastic idea Jeff. I'm wondering about the easiest way to integrate this (so the user doesn't need to figure out the latitude and longitude).

    Maybe they go to Google Maps, zoom to where they want, then paste the URL into Meetr. Meetr will take it from there (parsing the URL to extract the lat/long).

    Something like dat!

    By Blogger Jonathan, at 5/22/2005 2:51 PM  

  • Hi Jon,

    Sorry for the delay, I've been away from my PC.

    The revised model looks good. You can fine tune it later, maybe by adding comments again or a group to group table.

    For now you might want to consider making the URLs nullable.

    What MySQL version does your host provide?

    By Anonymous Steven E, at 5/23/2005 6:42 PM  

  • Hi Steven - thanks for the review!

    I agree that it would be better to have certain fields nullable - the thing is, Ruby on Rails seems to be inserting empty strings instead of nulls (I have posted this question to their mailing-list). Ah well.

    The MySQL version at Textdrive is 4.0.20, I believe.

    By Blogger Jonathan, at 5/23/2005 10:48 PM  

  • Cooooooooooooool idea Jon!

    By Blogger Leon, at 5/30/2005 4:08 PM  

  • Well, I've kind of lost interest in this project. I'm just going to dump my todo list here in case I decide to pick it up again.

    - Logged in as [first and last name, not username]
    - restart lighttpd on reboot
    - redirect_to_top: go to either Your Page or Main Page, depending on whether they are logged in
    - allow changing email. Verify?
    - review redirects to pages other than the homepage
    - review each file to ensure that there are no deleted pages inadvertently restored through cvs
    - test user.delete. It calls both redirect and logout (which calls redirect). Weird.
    - eliminate unnecessary links in header
    - how do salted_login roles work?
    - exercise the various user actions and views
    - change "location" to "city"
    - test that pending delete actually deletes on the expiry date
    - ask Jeff for thoughts on design of registration form
    -call store_location so we never get to default welcome page
    - check that flash calls (e.g. "method", "notice") are displayed
    - when create group, add self as organizer
    - allow username, email to be edited
    - fix html email: gmail doesn't recognize it as html. And gmail unfortunately includes the trailing " when it opens the link. Send plain text message instead (remove [a] tag).
    - don't even ask if the user wants to be remembered. Just remember them. (Is this safe on "public computers"?)
    - forgot password emails
    - destroy EmailExperimenter
    - set up cron job to restart lighttpd when server rebooted?
    - remember me on this computer
    - polish up email bodies
    - after user registers, say "go check your email" instead of showing login screen
    - test "remember me on this computer" with IE
    - test IE pw autocomplete
    - set salt? could hacker determine password using technique to send user lost password?
    - give focus to first textbox, on any page
    - simplify registration
    - dedicated Add Group page
    - client-side email address validation
    - confirm email
    - research ruby security issues
    - "powered by Ruby on Rails[link]"
    - AJAX
    - "for storing your group photo online", "for storing your photo online"
    - "recommended Google Groups settings"
    - email confirmation
    - event has associated post
    - customize periodicity
    - say "hTmL Allowed"
    - announce to vijug. Enter vijug meeting
    - scheduling option: manual. Validate date in future
    - email confirmation (validate: email not already used)
    - update email (and validate)
    - tests
    - if location/group with that name already exists, just go to existing group
    - give input examples (e.g. Victoria BC)
    (e.g. The Vancouver Frisbee Group)
    - view upcoming events
    - RSS
    - turn email notification on/off
    - obfuscate pws in db
    - allow html in descriptions
    - Remember me on this computer (cookies)
    - guess location
    - validation e.g. Fields must be filled in
    - my email, as contact for meetr
    - paginate long lists
    - "back" links
    - only edit group if organizer
    - only create group if logged in. First member is creator.
    - allow deleting a location if it contains no groups
    - CVS
    - remove scaffolding to prevent undesired edits
    - block Google Web Accelerator
    - active, inactive members
    == Location Show ==
    - group descriptions (html-escaped, truncated)
    == Location List ==
    == Uiser Show ==
    - groups: names, locations, and descriptions (leave - visible and accessible only if you are the user)
    == Group Show ==
    - next meeting time/place
    - members, w pics, descriptions (html-escaped, truncated)
    - edit periodicity
    - don't show Join This Group if already part of this group, or if not logged in
    - don't show Join This Group if not in this group, or if not logged in
    - Forgot your password?
    - use standard footer
    - trim spaces
    - use "label for"
    - destroy foo scaffold, controller, model
    - warn sender that the recipient will see their email address
    - verify that clicking on checkbox label toggles checkbox
    - say how many characters the descriptions can be (MySQL Text type) Even better, say how many characters remain, like the Google Groups sign-up.
    - combine Signup, User Show, and User Edit screens
    - change x-small to small
    - prettier error reporting in user edit page
    - use proper error reporting rather than simply printing "save failed"
    - simplify check for url size to >0. Probably dont need to check for nil.
    - say leave/join this group where possible on the location page and user page
    - if most victoria groups are shut down,create a new group called We've Moved To
    - Ruby Paypal class. Display required and actual amounts
    - join someone else's group ie have group name renderer that takes care of when to say join/leave
    - test all links
    - refactor out repeated text, like Join this group, leave this group. Drop whitespace and use 20-char filter
    - cache group.users and user.groups in controller
    - tell gina t, robin good, VIJUG (rails loc), thread on alternatvies, google/technorati for alternatives, rails real-world projects, rails IRC, Dave Blasby, Jody; ask rails mailing list to vote for it on delicious, Vivid (hobby - extol having professional designer; also RoR (took n evenings)), A-listers who have mentioned, Victoria Bloggerati
    - add to Jon Aquino Labs
    - sparklines?
    - show # members
    - browse meetup site for more ideas to borrow
    - get second pair of eyes to review security code
    - unit tests for security
    - ensure all strings get trimmed eg message_board_url
    - validate: urls start with http://
    - paginate group list; maybe hide Add Group behind a page.
    - replace font-size:small with "aside" class
    - build-in discussion group?
    - replace links with buttons. How does do it?
    - allow remove location if no groups
    - on sign-in, turn on Emails Allowed by default
    Drop ref to Victoria BC Canada
    - favicon
    - logo
    - edit 404 and 500 pages
    - RoR layouts
    - group page: mark current organizer, or say This group needs an organizer (learn more)
    - use case: non-group-member becomes organizer+groupmember in one click
    - change <= to <=h. Or even better, TextHelper#sanitize
    - Implement: How to send email when rails throws an exception
    - ensUre rails is running in production mode
    - write unit tests
    - prompt if user is navigating away from edit page
    - set salted hash word
    - in controller, grab user from session rather than finding them by id (security risk). Grep @session, User.find
    - warn person signing up if lodin or email taken
    - remove all references to foo
    - ch pw confirmation reinstated when I install salted hash
    - reinstall ruby, rails (ensure ruby totally removed, including from cygwin)
    - what are mocks?
    - read 4 days on rails
    - change Actionmailer config from shaw to textdrive
    - what's with the roles?
    - set salt (somewhere)
    - allow public to browse most of the pages
    - check: if not logged in and try to go somewhere but get prompted to log in, after logging in you get taken to where you were going
    - 2 kinds of securitychecks to test: is user logged in, and is user the right user
    - purpose of role field in users table?
    - preprocess form values: trim strings, convert "" to nil
    - include in email: message board url
    - whether groups/users are active/inactive
    - when organizer sends group email, post to message board
    - comments: linear discussion (no branching). Rss
    - install iconv. Uncomment commented-out lines
    - ch that during delayed delete, user does not appear on group membership lists
    - Meet the alternative: (free)
    - test - can't delete city or group
    - grep scaffold and remove
    - nonorganizer cannot edit group (link hidden; attempts prevented by security)
    - issue: back button does not update store location. Ask irc about this.

    By Blogger Jonathan, at 7/02/2005 7:12 PM  

  • No more meetr ? the site is close ?

    By Anonymous Anonymous, at 9/19/2005 5:54 AM  

  • Hi Anon - Alas, I do not have the energy to carry on with this project. Maybe if I get suddenly inspired. Have no challengers to arisen?

    By Blogger Jonathan, at 9/19/2005 9:27 PM  

  • Actually, I've got a great idea! Go to and clone it for you group. (Start by clicking Clone This App -- email me if you need a hand). You might want to delete most of the front-page categories (it's totally customizable). Anyway, there you have it: a free web app with meeting notices and discussion groups, complete with RSS feeds!

    By Blogger Jonathan, at 11/22/2005 7:46 PM  

Post a Comment

<< Home