FOSCON2005 @ FreeGeek
For anyone who was or was not able to attend OSCON for Ruby and Rails related things, FreeGeek (think through the PDXLUG) sponsored some of the ruby/rails speakers from OSCON to come down and give a talk. This was very cool.
I arrived a few minutes late and DHH was speaking about rails. Very cool, especially because it was not one of the talks he had given so far at OSCON (atleast that I had seen).
Also there was Vanerburg speaking about metaprogramming in Ruby. The material he presented was pretty interesting. His talk plus Dave Thomas’ talk at the beginning of the week really gets me excited about Ruby. WOW! It is such an incredible language. it has so much more to offer than what you can get out of the Pickaxe book (Book is excellent, just does not push all the boundaries of Ruby. That may have require another 500 pages.)
West spoke about recreating the NextStep API for flash called ActiveStep and integrating it with Rails. Pretty interesting, although I did not get some of what he was talking about when it was flash specific. I have never done anything w/ flash. Very interesting.
And lastly there was White Lucky Stiff. They were slightly beyond description. Two guys and a girl showing homemade artsy computer animations, playing music and telling jokes. All material, w/ the exception of a couple of jokes, was about… Ruby. And most of it was funny. Definitely not politically correct, but that’s what made it so fun.
Met Robby Russell and talked to him for a bit. Great guy.
FreeGeek rocks. Turns out FreeGeek is a non-profit that recycles computer and teaches people how to build computers and run linux (job training) in the Portland area. Their location is very cool. Kinda like a computer garage. I was very comfortable there. It was a good fit.
Also in attendance was Matz – He did not give a presentation but accepted a gift from FreeGeek. A Japanese to English Dictionary.
Update Phil corrected me. Sorry for the misinformation. Rich Kilmer talked about the ActiveStep Flash API. Why the lucky stuff rather than “White Luck Stiff”. And Matz was given a dictionary of American idioms.
Don’t trust my memory!
OSCON 2005 – Extracting Rails from Basecamp
Last session of the day. More rails!
Extracting Rails from Basecamp
Basecamp came from 37 Signals.
- Less people, more power
- Less money, more value
- Less resources, better use
- Less time, better time
Trust – the best technical decisions come from technical people when it comes down to developing applications.
Start w/ least amount of resource and then start to scale.
Tried to build half a product rather than a half ass product.
Less Software
Approach to software engineering under constraints was to write less software.
So why another framework?
Experienced PHP background w/ some java.
Basecamp originally written in PHP. Hit wall with PHP – it fought back against what he wanted it to do.
Inspired by java but it was too much enterprise. Too much focus on the 99.999% and not enough on the 98%. Geard toward building the amazon.com of software, not the single developer hacking away.
So… Liberate the good ideas from the different languages. Ruby was the new place to liberate those ideas and make them not hurt.
Calls himself a shallow programmer
- Aesthetics
- Joy
- Less
So halfway through Basecamp he realized this might be useful to other people. And now we need an extraction.
Doesn’t work to design a framework before you start coding. That’s the cart before the horse. You are then limited to what you designed.
Need application driven development to make good frameworks.
So why opensource it.
- Selfish. Let other people do some of the work. Write it youself or let some one else help you. Only works when there are selfish reasons on the other end (they gain something too)
- (and two other reasons)
And it works. 1000 patches in 9 months. Extract, pass, reap, rinse, repeat.
Now need to get traction for your opensource project. If nobody is looking, it does not matter.
Greatest fear as an opensource developer is obscurity. Need a network to reap the effects.
Opensource programmers need to get rid of their academic humbleness and bring rave about the good stuff. If you are not passionate, nobody else will. Need to set a baseline of excitement. Passion is infectious. You decide how high to set the bar. David set the bar very high!
Self delusions work!
Go Looking for Trouble. Tout advantages over the known. “If it bleeds, it leads”
Dealing with Traction
Now you need to scale your culture
- Early influx can bend you out of shape.
- Release not so early, then often. (get it mostly like you want it then release and release often. That way there is less debate about the way things should work)
- Set a viral example of kindness. Care and show direction for newbies. Don’t tell anyone to RTFM. That will drive your users off and set and example for your culture.
Items will be added to rails by necessity. Example i18n. Not many people using it. Some people have tried it, but once enough people need and are using i18n, it will appear almost automagically and be useful.
Best Hacker of the Year
Congrats to David Heinemeier Hansson for the O’Reilly/Google best hacker of the year

OSCON 2005 – State of the opensource databases
Ingres _ by CA_
Ingres r3 is the version which was put into opensource.
Features
- Value based table partitioning (a-c go here d-x go here, etc)
- can partition tables based on value of records
- No application change required
- parallel query execution
- may utlize more than one cpu on MP machines for a single query.
- single processor machines also benefit
- Advanced query optimization techniques (query decomposition, flattening, and rewrite)
- Federation through ingres star
- support two phase commits for distributed transactions
- Replication of master at one or more slaves
- can also have multiple masters where the other master acts as a slave when doing updates to one or the other
- next release to support grids
- admittly driver support is lacking
- winblows only db gui
MySQL with David and Monty
- runs on 87 gazillion platforms
- Connector/MXJ – embedded jdbc within java (embedded java database???)
- Storage engine slides…
- Special storage engines
- Archive – logging data you don’t want to delete or update
- Blackhole – allows replication but throws away all data
- MyISAM for logging: prefix locking allows fully concurrent inserts and reads
MySQL 5.0
- Stored procedures
- Triggers
- Views
- XA – distributed commits across different databases
- Data dictionary
- Server side cursors
- Precision Math – exact calculations with well defined rounding and atleast 56 digits precision. Very fast w/ static memory allocation
- Strict mode – ability to get rollback/errors instead of closest value/warning messages (eh? can tell you when it is a bad date, 02/31/2005)
- Federated storage engine
- greedy optimizer (fast multi table joins)
- instance manager (replaces mysqld_safe script)
- extenstion to LOAD DATA for doing transformations/calculations at time of load
- 5.0 still has 327 bugs but 16 really bad bugs at time of this writing.
- Upcoming features
- partitioning (needed for 20 petabytes that one user is planning)
- replication additions – row based (physical) replication (normal is logical) + multi source replication
- global backup api
- mysql cluster w/ disk data (non indexed columns)
- Hash Merge joins
Firebird w/ Ann ?
- High concurrency, high performance
- low administration costs
- flexible architecture
- active project
Development seems to be fairly slow going. Borland reniged the opensource license and Firebird is a fork. First releases were mostly bug fixes. 1.0 and 1.5 can share same data file.
Firebird Strengths
- Flexible architecture
- processed based (fork)
- multi-threaded shared server
- embedded
- low admin cost
- self balancing indexes
- cooperative garbage collection
- single file database
- transportable backup
Firebird future (2.0)
- currently in alpha 3
- global temporary tables
- execute block
- physical backup
Vulcan
- in parallel development
- fork to work on 64bit arch
- internal sql
Postgresql 8.1
8.1 features are frozen now. beta release in mid-august or early september.
Key New Features:
- Indexes combined using bitmaps – index any attributes you want to query on later. then when you do a join across different attributes, the engine bitmaps the indexes and can perform very fast lookups (knows where to find pages and other data structures)
- Two-phase commit for distributed transactions
- Automatic vaccuum process
- Global shared buffer lock removed, improves SMP support
- Functions returning multiple out parameters (oracle feature)
- Shared row locks
Pervasive, Green Plum and EnterpriseDB and Unisys building products/businesses around Postgres. Approx 1.5 million downloads of 8.0.×. and lots of new users (notable NWS and Ameritrade)
OSCON 2005 – Webwork vs. Spring spackdown
Matt Raible and Matthew Porter
Not much to report here. Mostly a bitch session about what’s wrong w/ java frameworks. I could not help but feel sorry after using rails for the last couple of months.
Matt and Matthew are both good presenters. Good light presentation for the day.
OSCON 2005 – Firefox extension development
Tools – XPIStubs (pronounced Zippy Stubs) Use this and forget half of what you need to know. Still needs some work.
Speaker looks like Hani (bileblog)
Looks like this tool stubs out everything you need to develop firefox extensions. Run the program to stub out program, do a ./configure make and it installs a plugin into firefox that pops up a window “Test”.
All you need to know to get started developing firefox extendsions are
- XPIStubs to get quickly stubbed out
- XUL and javascript for UI
- XulPlanet.com for reference
Extensions allow you to add new features to existing applications and add new functionality to browsers.
Why user firefox:
- Cross platform applications
- add content to the users browser
- provide the user w/ a better experience through client side customization
- easier than many alternatives
- b/c it’s cool
XUL
The xml interface language for mozilla/firefox
It provides
- layout and base widget set
- uses css for styling
- event handling via javascript command sets
- overlays
And… it may be loaded remotely or locally.
Command Event
- trap events like button clicks and key presses and allow you to respond to those events.
Broadcasters
- like command but can push out
Controllers
- Command sets can call on controllers to respond to events (like focus)
- Controllers are javascript classes that update state for commands
RDF and Templates
- allows you to define a template for displaying RDF data
- Difficult to use but very cool
XBL Bindings
- XML binding language
- allows ou to create new widgets or modify existing widgets
XPCOM
- cross platform components
- in C++, XBL or javascript. Also support scripting languages (PyXPCOM)
- Components are global to all chrome packages
- possibly the most important part of GRE
XPI: Cross platform Installer
- packaged in a jar file
- handles cross platform installs
Dev Tools
- typically use text based tools (vim, emacs, notepad??)
- Dom Inspector
- cview (XPCOM inspector)
- Venkman (javascript debugger)
Not Bad – rest seems like it will be demos, so shutting down to save batter power.
Update – ACK! It almost looks like jelly – programming in XML – WAY WAY Verbose
OSCON 2005 Keynote
Over the keynote was just OK. Not terribly exciting.
Tim O’Reilly is an awsome speaker as always. He seemed to keep it short this time for some reason. one thing he said that struck a chord, was once you create an standard, values moves up the stack. He believes opensource is doing this now, moving up the stack of standards (hardware).
Next up was Kim Polase (think I got her last name right). Good speaker but did not need to be delivering something as part of the keynote. Her talk seemed to be a plug for Spikesource.
Next up was Andrew Morton, linux kernel hacker extradonaire for OSDN. Difficult to understand b/c of how he spoke into the mic. Definitely a developer. Spoke a little in a drone about the integration of opensource and the commercial world.
Lastly was an interview with Jonathan Schwartz. Says he is happy to see an opensource implementation of Java (apache harmony project) but license for Java will not be open b/c they don’t want it to fork. Of opensolaris, says there is now no need ot compare big, bad closed source solaris to open linux. Can now compare the features of one to the other since they are both open. And to show that he was not 100% full of shit (maybe that is a little strong) said netbeans has the features it has today because of eclipse.
I think I would have rather have seen Tim give the entire keynote. I did not get much from any of the other speakers.
Update: Introduced myself to David HH (Rails) after keynote. Nice guy. Awsome framework.
OSCON 2005 – Learning XSLT
This update is late since my server was down during the track. Also my notes were pretty shoddy since there was so much info I was trying to digest plus I was getting sick during the track. My ribs ached and I my teeth were chattering b/c I was so cold. I believe I had a fever. Must have been some kind of virus.
The last time I tried using XSLT, I really, really did not like it. Lots of frustration and curse words. But given that I have to work with XSLT in my current project (to transform word xml templates) I decided to attend. I was going to attend Eric Hatchers Opensource gems, but that talk seemed to be mostly about Lucene and using a few opensource java projects. Interesting but given ruby has changed my interest in java and I need to use XSLT, well…
I’ll spare you my shoddy notes. Have a look at the speakers slides from the class. My notes mostly copied much of what was in the slides anyway. Plus the slides mirror much of what is going to be in the speakers upcoming Oreilly book.
Evan Lenz did an excellent job at presenting XSLT in a clear, very understandable way. I walked away feeling brain overload but feel like I learned something that I can apply.
Background on speaker, Evan Lenz
- Recommends Michael Kay’s XSLT Programmers Reference
- Participated on the XSL Working Group for a couple of years
- Wrote XSLT 1.0 Pocket Reference
- Preparing for PhD program in Digital Arts and Experimental Media
bidwell down (AGAIN!)
Well it was yesterday during OSCON and prevented me from blogging.
This is getting nuts. Seems to be occurring 2-3 times/week lately.
I really like textdrive but the downtime is getting really annoying. Particularly since I am trying to blog OSCON and the server goes down right in the middle of a track.
They are using FreeBSD, which I really like, but when you look at the status of bidwell when it is down (status.textdrive.com) it seems to be __fsck__ing for a long long time. Why doesn’t BSD have journaling file systems like linux. I understand why they can’t use linux’ but seems like they would have started development on one. On the linux boxes I use, it is so nice not to have to go through the fsck.
OSCON 2005 – Learning Ajax
You’ll walk away with
- Enought code to be dangerous
Damn. I thought I was already dangerous. Crap.
Demo Life in a text area
Interesting – autosave in a textarea – much like autosave in a text editor or something like MS Word.
What is ajax
- still being defined – good portion still up to you
- No page refreshes – Don’t make me blink
- don’t make users and developers learn new idioms.
- Technology should not slow you down – ajax does not fundamentally change what you have been doing.
- Better interfaces without redesigning from ground up.
Should turn browser into a client for your protocol/api
Good, Bad, Ugly
- Good – more responsive, more intuitive interfaces
- Bad – Inaccessible by default (google web accellerator)
- ugly – debugging takes a village
When is ajax the answer
- give advantages of desktop apps in a web browser.
- when you need to do things that traditional request/refresh can not accomplish
- when the competition does it (you gotta do it too)
- when it makes the users experience better, not worse
Ajax basically manipulates the DOM. Everything is a node.
It’s moving a little slow at the moment. Talking about the javascript api for manipulating the dom and about how not everything is a node (text for example)
Easiest thing to make code portable is use getDocumentById() call
The speaker is sick! a big chunk of custom javascript for moving around paragraphs on a page. Glad there are toolkits for this. It would sound like a turrets party if I had to do it.
Did not know this – can set style propery of any node and can access css styles using CamelCase names.
Mozilla and MSDN have good dhtml references and speaker thinks MSDN has the best.
Limitations can’t request resources which are not on the same domain (XMLHttpRequests). you could proxy if needed
~4k is the usual typical upper and lower limit of what you can store in client cache (cookies) on a per domain level
Browser incompatibilities – write to the spec and use http://quirksmode.org as a reference for cross platform incompatibilities.
IE has conditional comments – block of code is commented out, but runs in appropriate browser. For example would only run in IE5 or IE5.5, or IE6, etc. Conditional Comments are not used very often, but very useful for determining which one of the many xmlhttprequest objects to load.
.innerHtml is a read/write attribute which modifies the dom. Should uses sparingly but is very useful.
.innerHTML example
precode
var fooNode = document.getElementById(“foo”);
var parentContents = node.innerHTML; // where innerHTML = ‘div id=’foo’/’
node.innerHTML = parentContents;
// fooNode is no longer a valid reference here
/code/pre
Point is if your program depends on a node being there, like an onclick handler, it may be going if you do not use innerHTML judiciously.
What to return
- html
- easy to insert into document (fast)
- can return a string – easy to debug
- difficult to make portable
- implies replacement, not updates
- xml
- usually supported, MUST use “text/xml” document type
- doesn’t tie your server to your rendering
- you’ll need to buildUI on the client
- xml is typically not fast b/c you have to traverse the document (usually w dom)
- Plain text
- javascript
- fastest for large data sets
- eval() is the fastest parser available
- native language of you scripting environment
- skips the xml-to-data structure step
- app more likely to speak xml or html
- JSON helps (standard proposed by ?? – a lightweight subset of what can be descript in javascript literal)
- fastest for large data sets
You could send back javascript for large data sets where the javascript you send back would have something like a large dataset in an array. Smaller in size and faster to render than xml/html.
Engineering for ajax
- Server-side design principals
- ajax-style UIs should call the REST APIs you apps already expose – example Flickr
- multiple points of entry
- Single request, single action
- more requests, smaller requests
- When retro-fitting existing apps, wrap at the module level, don’t write new code
Back from break – talking about autosaving
- xmlhttp for moving data back and forth. Use HTTP POST verb, idempotence matters.
- serInterval() for occasional execution
- event handlers wired to Nodes, IDs
- brittle – hard to maintain or reuse
XMLHTTP Basics
- synchronous or async communications (most calls will be asynchronous)
- simple callback scheme for status
- some verbs problematic (Safari KHTML)
- HEAD
- PUT
- File upload not available cross-browser
- can be handled with iframes and form hacks
Now covering different ajax toolkits
Prototype by Sams Stevenson Ajax framework baked into Rails http://prototype.conio.net/
Dojo Ajax framework written by speaker, Alex Russell http://dojoframework.org
The toolkits (showing Dojo) have built-in graphics for UI display, example a progress indicator or spinner.
Whoa…. Dojo is pretty impressive. As I understand it, it’s sorta like tapestry but for ajax. you create widgets for say an autosaving text area. You can drop a widget on any part of your app and override default values by providing a dojo widget html fragment (div with some specific elements). Not tied to dom id, node, etc.
Debugging Tools
- Mozilla JS console
- Safari JS console
- Opera JS console
- IE Script Debugger
- Rhino or WSH – command line JS
Rhino command line example
java -jar js.jar
brings you into a javascript shell (like irb or python shell) poor interactive command line
example.js
precode
function foo() { print(“BAR”) };
/code/pre
java -jar js.jar example.js
precode
js foo()
BAR
js
/code/pre
Advanced Tools
- LiveHTTPHeaders – Mozilla/FF – Mozilla extension
- Venkman – Mozilla/FF JS debugger
- Squarefree JS Console bookmarklet
- MSE JS debugger for IE
- Konqueror
- VirtualPC/VMWare (for testing different browsers)
- Ethereal (w00t!)
- your tenaciousness
The talk was pretty good. Did not find myself getting bored through alot of it. I’m just glad someone else develops the JS libraries so I don’t have to.
Update Did not get to finish blogging while in the class b/c the server where I host netinlet.com went down (pretty much until the end of the conference that day). Was able to save all the content offline though and updated that. This is the repost of original + additional content.
