Tagged: RailsConf

Presentations from Rails Conf

In a lot of my posts I said that I would link to the presentation. All the presentations can be found here:

http://www.web2expo.com/pub/w/51/presentations.html

My favorites from the current list are: Building Community-focused Apps with Rails Scaling a Rails Application from the Bottom Up

Continue Reading →

Rails Conf after thoughts

Now that I am home and have managed to sleep a bit I have been thinking about my overall experience at Railsconf 2007. Overall it was great. It was fun to meet so many people working in Rails. The community is filled with friendly individuals who are willing to share everything they know or just sit an chat. I even managed to get in a fun game of chess on the giant board by the vendor booths.

My favorite talks were the ones that included code. That is probably because I am a programmer, but somehow code makes the talk real. I went to a few talks that were explanations of processes. Those are OK, but they include a lot of common sense stuff that you will already know if you have been in the field for a few years. The very best talks were ones that included code and showed best practices. I don't want to be a Rails core team fan boy, but I love to hear Jamis Buck talk. He and Koz did a great job showing off the 'Rails Way'. DHH's talk was great. He is a nice guy with grea...

Continue Reading →

Rails Conf after thoughts

Now that I am home and have managed to sleep a bit I have been thinking about my overall experience at Railsconf 2007. Overall it was great. It was fun to meet so many people working in Rails. The community is filled with friendly individuals who are willing to share everything they know or just sit an chat. I even managed to get in a fun game of chess on the giant board by the vendor booths.

My favorite talks were the ones that included code. That is probably because I am a programmer, but somehow code makes the talk real. I went to a few talks that were explanations of processes. Those are OK, but they include a lot of common sense stuff that you will already know if you have been in the field for a few years. The very best talks were ones that included code and showed best practices. I don't want to be a Rails core team fan boy, but I love to hear Jamis Buck talk. He and Koz did a great job showing off the 'Rails Way'. DHH's talk was great. He is a nice guy with grea...

Continue Reading →

Solr on Rails Erik Hatcher

Ferret is fast. He has moved around and the documentation is a bit sparse. Solr was created by people at CNET, used by Internet Archive, Krugle, Revolution Health, his projects: Collext, Blacklight. Findability - serendipity is great. You should be able to browse and discover stuff you didn't intend to. Read Ambient Findability Lucene is fast and scalable. Written in Java. Solr is a layer on top of Lucene. Flare is a plugin he wrote that is a bit of a hack but does "faceted browsing, auto-suggest, folksonomy tagging/annotating." Adds caching, replication, faceting, highlighting, spell checking, Http interface. You can talk to it via Net::HTTP::Post or use solr-ruby (gem), acts_as_solr (will hopefully use gem soon, Hatcher submitted a patch)

 gem install solr-ruby 

Look at the code in his slides.

Luke is a tool that lets you view your lucene index.

This is a pretty sweet tool for adding search to your site. I plan on looking into it further.

Continue Reading →

The Rails Way Jamis Buck, Michael Koziarski

Don't forget to look at The Rails Way blog.

Move logic into your model. This lets you break functionality into more granular components and makes testing easier. Keep your controllers skinny. Jamis blogged about this principle here.

Use before filters to setup state before your controller runs. Use before_create in your models.

ActiveSupport helps you make your code intention revealing. Ruby code can be self documenting.

has_many, belong_to makes your code powerful easy to use, but many users don’t use the power of the associations.

 Document.find_all_by_user_id(@john.id)

vs

@john.documents # this one hits the db once and then stores the objects in memory. After the call you don't have to keep hitting the db.

You can do the same with

 @john.documents.find(:all, :conditions => .... 

try this:

 @cool.documents.find_by_user_id(@john.id) 

then define it as a method:

 @cool.documents_authored_by(@john.id) 
just be sure to not duplicate the method in both the tags and authors ...

Continue Reading →

Practical Design for Developers David Verba

Practical Design for Developers David Verba

Another standing room only session. Perhaps the organizers will wise up and have at least on larger room next year for the sessions that are very popular.

We are going over the basics of audience analysis – understand your users: Context Motivations Challenges

Know your stakeholders – anyone that has an interest in the project Understand your objectives

Maybe it is just me but this seems like webdesign 101 it is also the standard stuff you hear in a 9th grade English class. Know your users. Talk to them. Get the goals from everyone that has a stake the project etc.

What is interesting to me is that he seems to imply that you can figure out your ‘users’ I have been reading Don’t Make Me Think. What is interesting is that Steve Krug the author says that there are no standard users of website. There are users and they frequently use your site in unique ways that the next user will not follow. That is one thing that makes the web a unique medium. ...

Continue Reading →

Taking Care of Rails Support Tasks Through Custom Daemons Tammer Saleh

Saleh is talking about using a Daemon to get rails to talk to LDAP. The code for the LDAP deamon and the code to make it look like a model live here. I will add a bit of code here and there, but hopefully the presenter will upload the slides so I don’t have to retype everything. There is some great code in this presentation.

Daemons are a bit of a dark art.

 def daemonize Kernel.fork and Kernel.exit Process.setsid Kernel.fork and Kernel.exit

system maintenance items so you don't hold up directory maintenance and so you don't have to deal with permissions

File.umask 0 Dir.chdir '/'

you don't want to hold onto

ObjectSpace.each_object(IO) {|io| io.close rescue nil} STIN.open('/dev/null') end

or just use a gem

 require daemons Daemons.daemonize

loop {

or whatever

conn = accept }

You can interact directly with your Rails environment. include environment file

Threads ThreadsBase.allow_concurrency = true

Or you will get a nasty error: Mysql::Error: Lost conn...

Continue Reading →

Bad Food

I have eaten a lot of bad food over the past few days which is too bad given that Portland has good restaurants. The main source of bad food is the Rails conference. A WORD TO CONFERENCE ORGANIZERS: Stale pastry and coffee do not count as breakfast. Lunch is not much better. It is so bad that we went to Denny's this morning. I was forced to debug my cereal - some kind of winged ant found its way into my raisin bran. Denny's food is just nasty.

I like Japanese food so we went looking for a Japanese restaurant last night. When we saw the place we kept walking because it looked like it would be crap. Unfortunately, all the other places were full and we were running out of time so we went back. Bad choice. If you are in Portland do not eat at Koji OsaKaya. Their food is total crap.

I have taken to eating granola bars and bananas. Does anyone have a decent recommendation for lunch?

PS a special thanks goes out to thoughtworks for supplying me with ALOT of granola bars.

Continue Reading →

Rails Conf Intro from Chad Fowler and Some Stuff from the Mountain West Ruby Conference

Chad Fowler is talking right now. I think he works on giving keynotes that leave you scratching your head a bit. His keynote at the Mountain West Ruby conference had mixed reviews. We left wondering what his intent was, but we weren’t sure if it was just our perception. Last night we had a chance to meet up with some of the people who were at the conference. They commented that they had a similar “huh?” moments during Fowler’s keynote. One of the guys brought his chief Java architect hoping to persuade him over to Ruby. After the talk the architects comments were, "so Ruby is slow, we shouldn't deploy on it, and you should be moving on to Haskell or Erlang anyway." I think that several people, especially the guys new to Ruby, got the impression that they were newbs polluting the Ruby world. These were the assembly programmers who weren't smart enough to jump sooner. How dare they stay in .Net, Php, or Java for so long. These guys of course are the same one who didn...

Continue Reading →

Rails Conf Day One Impressions

I ended up with a major migraine yesterday towards the end of David Black’s talk so I didn’t get a chance to finish up the post. Don’t worry I probably won’t.

My overall impression of the pre conference tutorials was that they were aimed at beginning users. If you have background in any of the topics then you might get a little value but 4 hours is a high price to pay for a little value.

I was originally critical of the first part of Jason Hoffman’s talk but last night I met some guys that really liked it. I guess it depends on what information you need. As a side note of all the talks yesterday Jason’s is a favorite. You can download the slides from his blog. If you have to scale any kind of web application, not just Rails, download and look through his slides. There is information in there that would cost you a small fortune to research.

We had time to chat with other developers from Utah last night. There are a decent number of guys in Utah working in either Ruby or Rails or both. W...

Continue Reading →

OpenID and David Heinemeier Hansson

After the Two Revolutions session I had a few minutes to talk to DHH. First I must say he is just a very nice guy. Programmer envy over. I had a discussion about OpenID. It is going to be a critical component of the next rev of our apps. OpenID hasn’t reached a level where it has the same blessing as REST or Atom. David feels that these protocols have one and the Rails team is willing to throw their weight behind them. OpenID will likely remain a plugin for now. After spending some time with the guys developing OpenID it was interesting to get DHH’s perspective. OpenID 2.0 is coming. It has more stuff. More features etc. DHH worries that it will detract from the simplicity.

I also had a conversation about releasing code on edge Rails. 37signals has no problem with it at all. DHH told me to freeze a version, test that and then release. This is a bit of a mind shift from the big frameworks like .net or java. If you release on a beta of either of those you will get fired and maybe sued. M...

Continue Reading →

Building Community-focused Apps with Rails Dan Benjamin

Sitting in the community app presentation right now. I was torn between this and the clean code presentation, but since we are building community apps this presentation seemed to be the most appropriate.

Here's the first slide: Fast prototyping Prototype becomes product Help Developers and Designers work together.

I am hoping it gets better and that the intro is just a quick run through the basics. If I end up in a bunch of sessions with nothing more than common sense, basic crap I will be pissed.

Here are my scatterbrained notes:

  • They developed cork'd at night over a few months as a hobby. It cost a couple hundred bucks.
  • Cork'd has been aquired.
  • They had 500 users in the first 2-3 hours and now have about 20k users.
  • Think of your efforts as a product. Keep the business in mind.
  • Start small - their first web server was a Mac Mini
  • Resist big infrastructure
  • Build the right team that may or not be friends. Don't add to many people
  • Determine ownership -- just my notes on t...

Continue Reading →

Two Revolutions Alan Francis

I tried to get into the REST talk but it is so full that they have guys guarding the doors to keep people out. I am instead sitting in an extreme programming session. I wouldn't have come in here except I noticed that DHH walked in. I figure if he sees potential value in this talk then it is likely that I might as well.

The talk turned out to be interesting in that it led to a discussion of revolution of of Frameworks and development philosophies. Historically, frameworks have evolved and been replaced with something new. In their wake however they leave large installations and large numbers of programmers trained in the technology. So I agree that there needs to be change and things need to get better. However, there is a need for responsibility. The success of these frameworks (like Ruby on Rails) depends on widespread adoption. Widespread adoption depends on some assurance that the framework will be around, be scalable, be developed, etc.

Continue Reading →

Rails Conf DHH keynote

Listening to DHH right now. Play DHH buzzword bingo here. http://bingdoh.com/games/dhh-keynote He started out talking about the growth of the community and making fun of a job post requesting a Rails programmer with at least 3 years of Rails experience. (That is longer than he has been on Rails and he invented it.)

Now we are going into Rails 2.0 information. DHH is talking about namespaces in routes. DHH is now building a project. Pretty cool for a keynote. DHH showed of some of the new routing features. Some example code looks like this:

 map.namespace(:admin) do |admin| admin.resources :products, :has_many => [ :tags, :images, :variants ] end 

Yesterday I couldn’t figure out why scaffold_resource wouldn’t work on edge rails anymore. Today I see why. The ‘generate resource_scaffold’ has been promoted to just ‘generate scaffold’. They are also getting rid of the .rhtml and .rxml formats in favor of html.erb and xml.erb.

DHH is showing off a very cool feature of Rails w...

Continue Reading →

Standing on the Shoulders of Giants Adam Keys

This session is totally packed. We managed to sneak in. The door guys don't like that much. If there is a fire we will all die.

Adam Keys is funny and entertaining

"If you want to learn from the masters you have to read their code." Read code because "you're surrounded by idiots."

When you read Rails code start in the routes. You can look in the url to see where you are and then go to routes to figure out where the code is.

He is giving ideas for where to start and which parts of the app you should look at.

My complaint about this conference is still that the sessions aren't as advanced as I would like. I would love to see a session like we had at the Mountain West Ruby conference. Jamis Buck and Marcel Molina Jr. went through some code in front of everyone (our ozmozr code actually) and pointed out everything that was wrong. It was a great learning opportunity.

The main point of this talk is basically that you should be taking commonly used, well develo...

Continue Reading →

Rails Day One – Rails Routing

Sitting in a session by David Black. He is talking about routing in Rails. It is starting out pretty basic, but I am hoping that it will end up covering the more complex issues as time goes on.

We are going over named routes now. This is actually a very good tutorial, but it is aimed towards someone that has never done anything with routes.

We are now into the second part of the session. Black is going over some of the background of rest including ideas from Roy Thomas Fielding's dissertation which is generally attributed as the beginning of REST. He said that he would focus on the more practical aspects of REST in Rails, but he can't resist talking about some theory. I am ok with that, but I have read it before. Hopefully he will get to the details of REST and routing in Rails and delve into some of the more advanced scenarios which is where we are typically having problems.

We have started into REST in Rails. It is interesting that Black needs to caveat his comments due to ch...

Continue Reading →

Rails Conference Day One

We flew into Portland last night so that we would be ready bright and early this morning. I hate waking up at 6:30 am to go to a conference. We are programmers when will they realize that the conference should start at 11 and then run late into the night. Maybe even start at 3 and run until 1 am.

Anyway, we went looking for a restaurant last night called Sylvias. Lucky for us they were closed permanently. We drove around looking for somewhere to eat and ended up at Wendys. So far I hate Portland. We'll see how it goes over the next few days.

I am sitting in 'Scaling a Rails Application from the Bottom Up' by Jason Hoffman from Joyent this morning. I think I have come to the wrong session. He started by talking about how much power a server takes and how much bandwidth you may or may not need. I was hoping to see how to build a better, scalable Rails application. We aren't getting that and everything he is saying I know after running my own servers for years.

I am thinki...

Continue Reading →