Archive for the ‘computer science’ Category

More Usecases

Sunday, August 10th, 2008

Time for more usecases! (continued from this post)

Ranking Links

Sally is an active member of the link ranking site. She goes there multiple times a day to check out new links about plate tectonics and moderate them, so she always has her login cookie set. When she goes to the homepage, she is presented the top links for the day.There is also a tag cloud that has the most popular categories.

She clicks onĀ  the most interesting link, “Daffy Ducks view of plate tectonics”, and visits it. She then uses the upper frame to moderate the link with a score of +1, she hits back and is returned to the homepage, the link she moderated is closer to the top of the list because of her moderation.

Note: There needs to be some sort of trust metric (advagato style?) for moderation of links. The interface must also be designed so it isn’t like reddit.com, it’s not a news site, just an index.

Reporting Dead Links

Sally then clicks on another link “Tectonic Plates of the ancient world” which brings her to a 404 page, shen then clicks the “report bad link” button on the top frame and selects “page not there anymore” from the dropdown menu.

Design phase 1

Friday, August 8th, 2008

Alrighty, time for the spec writing to start!

drumroll

So, the basic goal is to create a link-repository application where people can submit links on a topic and they can be ranked, verified and deprecated as needed. E.g.

Submitting a Link

Bobby finds a neat link about plate tectonics. he goes to the website “tectonic-plate-o-matics.com” to enter the link to the community. He sees the current links ranked by rating. In a corner, he sees “Submit link”. He clicks and and is given a form that has the following inputs:

  • Link URL
  • Link title
  • Tags

He then submits the link and sees it show up on the front page. Note: Since Bobby isn’t logged in when he submits the link, it doesn’t show up for other anonymous users. Just the submitter and any users that have the “See anonymous links” set to true.

Ranking Links

Bobby now clicks on one of the links on the front page. He is taken, in a unobtrusive frame, to the link. The frame has a few buttons or inputs on it, including:

  • rank +1
  • rank -1
  • add tags
  • report link

When he clicks on any of these, he’s taken to a login page, the login page supports either open id or creating a user account on the web page itself. After he’s logged in, he is returned to the page he was on. It also contains a list of current tags for the link.

It also has a prominent “close X” button which cleanly closes the frame.

Tools: Pinax and Inkscape

Sunday, August 3rd, 2008

Pinax is a big ‘ole collection of Django reusable apps packaged into a ‘portal’ or ‘cms’ type website. It supports OpenID, blog posts, twitter posts, messages, groups and profiles. It feels like the Django equivalent to Joomla!. Django has really, drastically matured in the few years that it’s been around. Reusable Django apps are multiplying and are of a general high quality, integration is cake, and templates are much easier to write than modifying PHP code. (Like the templates used in Joomla! or Wordpress)

I’ve really grown to love Inkscape as well. It’s excellent for technical drawings, page layout and logos. I just wish they’d release new versions more often. :)

Java and Readability

Monday, July 7th, 2008

I read this cool blog post about some readability and “Functional Programming” type stuff to do in java. Looking at how much cleaner it is than calling new all the time…I wonder why something like this isn’t included in the Java standard library.

Most of the stuff is just using parameter lists to create Lists, and from there creating Hashes from two arrays of the same size (ala a zip function). The other things are mostly “fluent interfaces” and nice uses of static methods. Still…why haven’t I seen any API’s (besides EasyMock) that have this type of stuff?

Open Source Meetup

Thursday, June 26th, 2008

Tonight I went to the Colorado Springs Open Source Meetup. The topic covered this month was Joomla! a content management system. I had no idea how big or full featured it was, it has components to handle everything from wikis, OpenID integration, CAPTCHAs, message boards, social networking, e-commerce. I wouldn’t be surprized if you could find the kitchen sink.

The East Branch library community room is excellent, very large, sound system, projector. We also had food provided by our sponsor, so great on all points :-D

I can’t wait until the next meetup.

Other Todos

Tuesday, July 31st, 2007
  • Write a product() function for py3k if it isn’t already written
    • Done, patch rejected (product function not wanted as a builtin)
  • Install roundup for personal bug tracking
    • Generally use mind maps now for idea tracking, don’t really have a todo list system.
  • Investigating business object type things that are open source

(updated December 1st, 2008)

Blender Game engine tutorial

Sunday, July 15th, 2007

Alrighty, so it’s time to learn how to use the blender game engine. First we’re going to use the links here as a starting point.

We’ll also be doing some programming with livewire, since 2D is much easier than 3D, to start out with.

First, lets look to see what blender knows about objects in the game:

Game Engine Documentation

Now, here’s an example of what we can do with what blender knows:

Blender Scripting tutorial

So, we can access the properties of any object in the blender game engine, along with the sensors and actuators. The script is run in the game main loop automatically by blender, so we don’t have to worry about that.

Programming in livewires

To start off with, we need to installl pygame and livewires on your windows machine.

Lets start out working in the interactive interpreter provided by IDLE. So lets do a quick demo of what you can do.

from livewires import *
begin_graphics()
circle(200, 200, 50)

This has drown a circle at those coordinate within the window. This PDF contains other information that you may need to do stuff with livewire and graphics. Other PDFs on the livewires library are available here.

First we’ll just get used to drawing with livewires, then we’ll be able to make a game that takes user input.

GIMP iwarp and morphing

Thursday, July 12th, 2007

Hmm, I really should see what the development version of the GIMP has in its iwarp plugin. In GIMP 2.2, it could definitely use some improvements, I’ve used it a lot for photo retouching, so a larger preview areas would be nice or zoom, etc. And it’d be interesting to do some graphical stuff in C.

I really want to make a user friendly morphing program, as well. Something that might be able to generate nice polygon grids to be put into xmorph or iwarp. It just needs a good UI, I’m pretty sure that xmorph already has the algorithmic code necessary. It should be an interesting GUI project, but first I need to rebuild my Ubuntu box to get KDE working again.

Ryan