occasionally useful ruby, ubuntu, etc

11Jul/100

Grandparent of Ruby and Java: Eiffel and friends

I'm curious about the effort involved in writing a new programming language, and hence have been doing a little research (including watching Guy Steele's now-famous and amusing Growing a Language lecture). I know I want to target the NekoVM (primarily one of the targets of haxe, for now), but what languages should I base it on? One of the languages I've heard a good deal about about, mainly based on its design-by-contract principles, is Eiffel.

(even if you're not interested in building a new language, learning about programming languages and their design decisions increases our understanding of them and, hopefully, our proficiency with them)

24Aug/093

Banks and OAuth support

For fun, I decided to ping all of my financial companies (Bank Of America, CapitalOne, Chase, EmigrantDirect, INGDirect, Vanguard) about their plans for OAuth support. I don't know how many of you use the wonderful service known as Mint, but I like it a lot. Unfortunately, a part of me died when I gave them my username/password for my banking sites. And INGDirect is secure enough that Mint can't even interface with them! Sorta cool.

Anyway, here's what the institutions said:

10Aug/090

Web server output generation design patterns

There are several styles of content generation that I know of so far...I'm reviewing them because I'm looking to see if there could be something better.

Flat-file

Example: plain ol' PHP

PHP, at its simplest, doesn't have any separation at all -- you can, if you choose, have all the programming/form-processing logic in the same file that renders the output to the browser.  While simple, if you're creating a full website, this can be cumbersome and confusing.

Filed under: musing Continue reading
19Jul/090

Design pattern/flow for building a website

So here's how I normally do things:

  1. Do as much of the models as possible in this first pass, skipping validation but including schema stuff
  2. Stick a couple things into the controllers that I think I'll need
  3. Build out some of the views, giving them some basic styles
  4. Revisit the models to add validation, helper methods
  5. Build out the rest of the views, give them real styles
  6. Muse about specs, then give up before starting
  7. Put more stuff into the controllers
  8. Iterate on random components until you're done

Needless to say, I'm getting to the point where my lack of organization kills my mini-projects before I hit step 4, sometimes even sooner than that.  So I'm going to try a slightly more...conventional (or widely suggested, at least) approach:

  1. Create controllers with just enough information so that your pages will display.  No setting variables yet or other logic!
  2. Fill out the views with as much HTML and fake data as you need.  Site have a sign-in page?  Leave a link to "force sign-in" the user that simply sets them to an authenticated state.  All it should do is set a session variable
  3. Spec out the models.  Don't check for validation yet, just check for core functionality, i.e. there is a User table, the first user has a name of Foo and email of bar@baz.com, etc.
  4. Fill out your model code so that the specs pass -- this includes migrations with sample data (these can be removed in a later migration).
  5. Spec out your controllers/views.
  6. Fill out your controllers/views so they pass specs.
  7. Do the rest of the little things that need doing, like validation, error messaging, authentication, styling, etc.
  8. Revel in having finished a project.

Hopefully I'll get further than step 3 this way! I'm going to try to focus more on content/frontend instead of getting bogged down in the backend, and I want to actually write specs.

Any comments/suggestions?

Filed under: musing, ruby No Comments
19Apr/092

XSLT is a giant pain

Some of you may be aware that XML+XSLT 1.0 can be rendered directly by modern browsers (even IE6!), which led me to thinking that it may be a good idea to give it a try and see how good or bad it was.

Tagged as: , Continue reading
31Mar/090

Starting new projects

So I know I'm not the only dev who does this, but I tend to start a lot of projects -- and not finish them. I'm coming up with a checklist of things that I want to make sure I do before getting involved in any new projects.

Read on for some of the initial questions you should ask yourself, and what to do next.

Filed under: musing Continue reading
1Jan/092

Accessing GM_xmlhttprequest from event handlers bound by jQuery

So I like jQuery. And I like Greasemonkey. I especially like the ability of Greasemonkey's ajax calls to go cross-domain. But how do I get access to this functionality in my event handlers? Calling GM_xmlhttprequest in a method that doesn't execute while the Greasemonkey sandbox is still alive doesn't work. At first I didn't think it was possible, but I discovered a way...using setInterval.

28Oct/080

Startling Discovery

So I have made a startling discovery -- the plastic cap on the end of your shoelaces is called an aglet.

Filed under: musing No Comments
2Oct/080

Game ideas?

Well, another day, another quest for game ideas. An online game would be fun to make, but my problem is always I think too damn big. My last idea was a Utopia clone, and I got so far as to create a scripting language that compiled into Ruby, but I just never got around to finishing it. What would be nice is a game that's fun in its simplicity -- simple to play, simple to program, just something you spend half an hour or an hour on a day, tops. There'd be a way to interact with other people easily; there'd be chat rooms and forums, and discernible "hot spots" where a lot of people were chatting or posting messages. But the most important thing is core gameplay: unique, rewarding, and fun. I'll get right on that...

1Jul/080

Reading a lot

Hey all. I've had a lot of free time on my hands lately, so I've been splitting that between watching TV, reading online articles, and designing Stick Diablo (name pending). There's a lot of interesting news out there though...if you're curious about what I'm checkin' out, take a look at my shared Google Reader list, here. Hope you find something interesting!

Filed under: musing No Comments