Well, just a very short time after I started using Heroku, they went commercial. Yes, after their very successful beta period, where apparently 24,999 web sites other than mine were already hosting, Heroku is now offering a paid version of their service. I had a sneak peak at the pricing a few days ahead of time, but I was not able to talk. And despite my intentions of blogging this right away, the other demands on my time have kept me occupied till just now.
Heroku is mimicking the successful "freemium" pricing plan of other services, but brings it into the Ruby web application hosting space, within some pretty generous limitations. Yes, exactly. Heroku still allows you to get started with their service at no charge at all. Wow. I do not know of any free web hosting service that does not at minimum plaster your site with hideous ads. Let alone quality Ruby hosting. Let alone Ruby powered cloud computing.
As your traffic needs increase, or database storage needs, they have a variety of pricing tiers. Thanks to a slick AJAXified pricing tool, the complexity of so many pricing options is somewhat mitigated. Plus it's fun to play with.
The evolution of most startups seems to track really well with Heroku's overall business strategy: as a customer becomes larger and more successful, their increased traffic and database needs will cause them to start paying Heroku. If your venture does not really go anywhere, it is not really taking up much in the way of resources anyhow. This aligns Heroku nicely with the needs of their customers, instead of pitting them against them trying to extract revenues too early in the growth curve.
Despite a few growing pains, they have had pretty decent uptime on my app so far. Even with my new app Thumbfight getting a few sudden traffic bursts, as well as having a major reliance on Twitter for back-end processing (more about Thumbfight in an upcoming post).
Heroku is a work in progress, but so is most everything else on the entire Internet. Heroku provides an amazingly easy and insanely cheap way to jumpstart your Ruby-based web application hosting and deployment, while still getting some real expertise. As long as you can work within their current technical limitations, for a Ruby-powered startup, I think Heroku is a great way to go.
Wednesday, April 29, 2009
Saturday, April 18, 2009
Project Flying Robot: Getting RAD With The ATMega328
I have been wanting to upgrade the hardware used in our Dorkboards for flying_robot, from the ATMega168, to the newer better faster ATMega328. More memory, and a faster UART for serial communications with the XBee modems in the same pinout = easy win. Thanks to a quick shipping turnaround from @adafruit I got them in before the weekend, so I could play a little bit today.
The first step was to upgrade my hard-working Arduino Diecimila to a 328. I now have it working great with Ruby Arduino Development (RAD), but since RAD was really setup for Arduino 12, I had to make a couple changes. Here is what I did:
1. D/l and install Arduino 15 (brave, I know, since that is the latest release, and many people run one version down from the latest)
2. Change my hardware.yml entry
3. Change my software.yml entry
4. Lastly, since the ATMega328 bootloader runs at a faster rate, I had to tweak the RAD code itself to support it. The file "/vendors/rad/generators/makefile/makefile.erb" is the template used to create the makefile that compiles and uploads the code to the Arduino. Line 77 in that file controls the baud rate, which needs to be set like this for the '328:
Once I had done this, I was easily and quickly able to recompile/re-upload the latest flying_robot code to my test board. Yeah! Hopefully tomorrow I can upgrade Rogue 1 and try a flight at the new, higher communication speed.
The first step was to upgrade my hard-working Arduino Diecimila to a 328. I now have it working great with Ruby Arduino Development (RAD), but since RAD was really setup for Arduino 12, I had to make a couple changes. Here is what I did:
1. D/l and install Arduino 15 (brave, I know, since that is the latest release, and many people run one version down from the latest)
2. Change my hardware.yml entry
mcu: atmega328p
3. Change my software.yml entry
arduino_root: /Applications/arduino-0015
4. Lastly, since the ATMega328 bootloader runs at a faster rate, I had to tweak the RAD code itself to support it. The file "/vendors/rad/generators/makefile/makefile.erb" is the template used to create the makefile that compiles and uploads the code to the Arduino. Line 77 in that file controls the baud rate, which needs to be set like this for the '328:
UPLOAD_RATE = 57600
Once I had done this, I was easily and quickly able to recompile/re-upload the latest flying_robot code to my test board. Yeah! Hopefully tomorrow I can upgrade Rogue 1 and try a flight at the new, higher communication speed.
Tuesday, April 14, 2009
Heroku, Why Haven't I Been Using You Till Now?
Last night, I finally got around to deploying something on Heroku, an interesting service founded by my formerly LA-based Ruby programming chums Adam Wiggins, James Lindenbaum, and Orion Henry. I had played with their previous incarnation of the service, now known as "Heroku Garden" but only recently have I gotten to know a little bit more about the incredible offering they have evolved into.
Basically, the Heroku crew have addressed the question "how can I deploy my Ruby on Rails, Sinatra, or other Rack-based web application into a dynamic cloud of servers with ridiculous ease?" They have done this with an ingenious architecture that takes advantage of Amazon's EC2 to provide their internal infrastructure. This allows Heroku to concentrate on their most important core value proposition, of a simple way to take your Ruby code and just push it into the cloud.
Notice I said "push". Heroku requires that you use git for source control of your application. You are using git for everything now, right? If not, git with it! Sorry, could not resist that. Anyhow, by simply adding a remote master to your existing git repo that points to Heroku, along with a few Ruby gems that they provide, you can deploy your app just by pushing your current branch to the Heroku master.
Doing this, causes your app to get packaged up into "slug". Once you have an active slug, it will be be deployed to a "dyno" within the Heruku grid, which is what a virtual node within their architecture is called. As your app requires more resources, the slug can be deployed to more dynos within "less than 2 seconds for most apps". That is way faster than starting up a new Amazon EC2 instance yourself, and having this extra layer has a number of other interesting benefits as well.
Heroku has a quick start guide, which pretty much runs down what you need to do. I had found a slightly more simplified quickstart here. I already had an existing Sinatra-based app that I wanted to test on Heroku, so here were my steps:
1. Install heroku gem
2. Setup Heroku account info, and upload public key
This will prompt you for your Heroku account info. If you have not created one yet, better jump over to http://heroku.com/signup and create one
3. Create Heroku app from my existing app
I just changed so my current directory was the app I wanted to add to Heroku, then entered:
This creates the new app on Heroku, and creates a remote branch so you can deploy just by pushing the code.
4. Deploy my code
That's it! If you have a really simple app, with no database access, you are done. What, you are deploying a Ruby on Rails app and need a database setup? OK, then...
5. Run database migrations
NOW, you are fully deployed and running on Heroku. Unless you are not. I still had a minor problem with my app. I was writing my log file into "logs/production.log" but Heroku does not normally allow write access to disk. The two exceptions to this are the "tmp" directory and "log" directory (notice singular). They do provide an easy way to view your most recent log entries, by typing
So, here is my total time required to deploy this app on Heroku:
- Reading quickstart = 3 minutes
- Installing gem and entering account info = 2 minutes
- Making my app a Heroku app = 1 minute
- Deploying my app for the first time to Heroku = 2 minutes
- Figuring out what I had done wrong from the Heroku documentation = 10 minutes
TOTAL = 18 minutes
Here were my bonus steps:
- Reading Heroku docs on using a custom domain with Heroku = 1 minute
- Realize I need to rename my app using Heroku command line = 1 minute
- Rename my app using Heroku command line = 1 minute
- Setting my DNS settings to point to Heroku = 5 minutes
- Telling Heroku about my custom domain = 1 minute
TOTAL = 9 minutes
So there you have it... a fully deployed app, living in the Heroku grid and consequently the Amazon EC2 cloud, in less than 30 minutes, having never used their tools before, including troubleshooting a minor configuration problem. That may seem unfair... and it is. That is exactly the kind of unfair I like on my side!
Much credit should go to the Heroku team for creating something extremely cool and functional. Important details are still not available, like pricing etc., but at least for now Heroku, is a great way to easily get your app up into the cloud within literally minutes.
What is the future for Heroku? Funded by Y Combinator, they have been quietly working away, and now with Sinatra team leads Blake Mizerany and Ryan Tomayko onboard as well, I think we will be hearing a lot from this exciting little company.
Basically, the Heroku crew have addressed the question "how can I deploy my Ruby on Rails, Sinatra, or other Rack-based web application into a dynamic cloud of servers with ridiculous ease?" They have done this with an ingenious architecture that takes advantage of Amazon's EC2 to provide their internal infrastructure. This allows Heroku to concentrate on their most important core value proposition, of a simple way to take your Ruby code and just push it into the cloud.
Notice I said "push". Heroku requires that you use git for source control of your application. You are using git for everything now, right? If not, git with it! Sorry, could not resist that. Anyhow, by simply adding a remote master to your existing git repo that points to Heroku, along with a few Ruby gems that they provide, you can deploy your app just by pushing your current branch to the Heroku master.
Doing this, causes your app to get packaged up into "slug". Once you have an active slug, it will be be deployed to a "dyno" within the Heruku grid, which is what a virtual node within their architecture is called. As your app requires more resources, the slug can be deployed to more dynos within "less than 2 seconds for most apps". That is way faster than starting up a new Amazon EC2 instance yourself, and having this extra layer has a number of other interesting benefits as well.
Heroku has a quick start guide, which pretty much runs down what you need to do. I had found a slightly more simplified quickstart here. I already had an existing Sinatra-based app that I wanted to test on Heroku, so here were my steps:
1. Install heroku gem
sudo gem install heroku
2. Setup Heroku account info, and upload public key
heroku keys:add
This will prompt you for your Heroku account info. If you have not created one yet, better jump over to http://heroku.com/signup and create one
3. Create Heroku app from my existing app
I just changed so my current directory was the app I wanted to add to Heroku, then entered:
heroku create myappname
This creates the new app on Heroku, and creates a remote branch so you can deploy just by pushing the code.
4. Deploy my code
git push heroku master
That's it! If you have a really simple app, with no database access, you are done. What, you are deploying a Ruby on Rails app and need a database setup? OK, then...
5. Run database migrations
heroku rake db:migrate
NOW, you are fully deployed and running on Heroku. Unless you are not. I still had a minor problem with my app. I was writing my log file into "logs/production.log" but Heroku does not normally allow write access to disk. The two exceptions to this are the "tmp" directory and "log" directory (notice singular). They do provide an easy way to view your most recent log entries, by typing
heroku logswhich is how I figured out my problem with the log directory.
So, here is my total time required to deploy this app on Heroku:
- Reading quickstart = 3 minutes
- Installing gem and entering account info = 2 minutes
- Making my app a Heroku app = 1 minute
- Deploying my app for the first time to Heroku = 2 minutes
- Figuring out what I had done wrong from the Heroku documentation = 10 minutes
TOTAL = 18 minutes
Here were my bonus steps:
- Reading Heroku docs on using a custom domain with Heroku = 1 minute
- Realize I need to rename my app using Heroku command line = 1 minute
- Rename my app using Heroku command line = 1 minute
- Setting my DNS settings to point to Heroku = 5 minutes
- Telling Heroku about my custom domain = 1 minute
TOTAL = 9 minutes
So there you have it... a fully deployed app, living in the Heroku grid and consequently the Amazon EC2 cloud, in less than 30 minutes, having never used their tools before, including troubleshooting a minor configuration problem. That may seem unfair... and it is. That is exactly the kind of unfair I like on my side!
Much credit should go to the Heroku team for creating something extremely cool and functional. Important details are still not available, like pricing etc., but at least for now Heroku, is a great way to easily get your app up into the cloud within literally minutes.
What is the future for Heroku? Funded by Y Combinator, they have been quietly working away, and now with Sinatra team leads Blake Mizerany and Ryan Tomayko onboard as well, I think we will be hearing a lot from this exciting little company.
Labels:
cloud computing,
heroku,
ruby,
ruby on rails,
sinatra
Wednesday, April 08, 2009
LARubyConf 2009 - Jim Weirich - "The Grand Unified Thoery of Software Development
As the 2009 Los Angeles Ruby Conference (LARubyConf) drew to a close, our keynote speaker Jim Weirich took the podium. I have seen Jim speak several times, and he is both intelligent, as well as down to earth, which is a rare combination indeed.
The subject of his keynote would be anything but down to earth. In fact, it would have to be one of the most ambitious talks I have ever seen at a Ruby conference. Only Jim could have pulled it off as he did, with both humor and insight.
One thing Jim does is have to conduct Tech Interviews. One question he always asks is "What do you look for in a good design?" Most people's answer: "UMMMMMM..."
Then Jim seemingly shifted themes abruptly, to physics. Specifically, subatomic particles.
It is known that particles that are charged the same repulse each other. Furthermore, every time you change electric field, there is a changing magnetic field at 90 degree angle.
James Clerk Maxwell
Maxwell discovered 4 equations that describe relation between electrical and magnetic fields. By describing these two entirely separate forces, combines into single force. Maxwell's work probably greatest contribution to science.
Then, along came Ernest Rutherford's famous electron experiment. The one where electrons were supposed to evenly deflect onto a screen, but instead occasionally would deflect wildly. As a result, we now know that matter was mostly open space.
There are four known forces
- electromagnetic
- gravity
- strong nuclear
- weak nuclear
The search for the "Unified Field Theory" in physics is a search for a single explanation that accommodates all four forces.
This is very much like the search for a single explanation for software design.
Some Commonly Accepted Software Design Principles
- SOLID
- Law of Demeter
- DRY
- Small Methods
- Design by Contract
Lots of ideas about how to write software, but no grand unified theory.
"The Grand Unified Theory of Software Development"
Composite/Structured Design
- Glenford J Meyers - 1978
Coupling & Cohesion - from best to worst
- no coupling
- data coupling - local data, simple
- stamp coupling - local data, structured
- control coupling
- external coupling - global data, simple
- common coupling - global data, structured
- content coupling - when you reach inside of modules and mess with them from outside
control coupling
- method has flag parameter
- flag control which algorithm to use
Symptoms
- word OR in description
Example:
Which one lists only private methods?
Another example, Rails does this:
Myers' classification were OK, however failed to extend well to objects and dynamic languages
Meilir Page-Jones's book "What Every Programmer Should Know About Object-Oriented Design" has 3 sections, two of which are not too useful, but the third is very interesting. It talks about the idea of Connascence in software design.
Connascence - when two things are born and grow up together
Two pieces of code share Connascence when a change in one module requires a corresponding change in the other.
CoN - Connascence of Name
- when code linked by name
- can also apply to databases
- class name is NOT, but parameters are
Locality Matters
- if you have things grouped together, there is stronger connascence.
- as dist increase, you reduce connect between them
Connescence of Position
- when the order of the params matters
Low/high degree of CoP
When you encounter CoP it is better to transform it to CoN
Degree Matters
CoP in test data example
CoM - Connescence of Meaning
- when two bits of code have to agree on the meaning of data
When you encounter CoM it is better to transform it to CoN
Contranesence is when things have to change opposite to each other
- for example, collision of class names in two different modules
- solution is to use namespaces
Another Example?
- do not monkeypatch unless you have to, and if so use namespaces
Connascence of Algorithm
- Two methods that do different things, but that are bound together by algorithm. For example, two different bits of code in two different languages that have to talk to each other. JavaScript client, Ruby server is good example.
CoA -> CoN
- also known as DRY
CoT - Connascence of Timing
- for example, a race condition
Summary
- Connascence is the 'quark' of software design
- Not really any tools to analyze code
- Seems like there is a relation between connascence and design patterns
Wow! Jim had taken us all the way from subatomic particles, to a start towards a unified theory of software design, and tied it all together nicely. And made it fun! It was a tremendous cap on an excellent conference, and we all had really appreciated Jim's contribution.
The subject of his keynote would be anything but down to earth. In fact, it would have to be one of the most ambitious talks I have ever seen at a Ruby conference. Only Jim could have pulled it off as he did, with both humor and insight.
One thing Jim does is have to conduct Tech Interviews. One question he always asks is "What do you look for in a good design?" Most people's answer: "UMMMMMM..."
Then Jim seemingly shifted themes abruptly, to physics. Specifically, subatomic particles.
It is known that particles that are charged the same repulse each other. Furthermore, every time you change electric field, there is a changing magnetic field at 90 degree angle.
James Clerk Maxwell
Maxwell discovered 4 equations that describe relation between electrical and magnetic fields. By describing these two entirely separate forces, combines into single force. Maxwell's work probably greatest contribution to science.
Then, along came Ernest Rutherford's famous electron experiment. The one where electrons were supposed to evenly deflect onto a screen, but instead occasionally would deflect wildly. As a result, we now know that matter was mostly open space.
There are four known forces
- electromagnetic
- gravity
- strong nuclear
- weak nuclear
The search for the "Unified Field Theory" in physics is a search for a single explanation that accommodates all four forces.
This is very much like the search for a single explanation for software design.
Some Commonly Accepted Software Design Principles
- SOLID
- Law of Demeter
- DRY
- Small Methods
- Design by Contract
Lots of ideas about how to write software, but no grand unified theory.
"The Grand Unified Theory of Software Development"
Composite/Structured Design
- Glenford J Meyers - 1978
Coupling & Cohesion - from best to worst
- no coupling
- data coupling - local data, simple
- stamp coupling - local data, structured
- control coupling
- external coupling - global data, simple
- common coupling - global data, structured
- content coupling - when you reach inside of modules and mess with them from outside
control coupling
- method has flag parameter
- flag control which algorithm to use
Symptoms
- word OR in description
Example:
Array.instance_methods(true)and
Array.instance_methods(false)
Which one lists only private methods?
Another example, Rails does this:
Customer.find(:all)vs.
Customer.find(:first)
Myers' classification were OK, however failed to extend well to objects and dynamic languages
Meilir Page-Jones's book "What Every Programmer Should Know About Object-Oriented Design" has 3 sections, two of which are not too useful, but the third is very interesting. It talks about the idea of Connascence in software design.
Connascence - when two things are born and grow up together
Two pieces of code share Connascence when a change in one module requires a corresponding change in the other.
CoN - Connascence of Name
- when code linked by name
- can also apply to databases
- class name is NOT, but parameters are
Locality Matters
- if you have things grouped together, there is stronger connascence.
- as dist increase, you reduce connect between them
Connescence of Position
- when the order of the params matters
Low/high degree of CoP
When you encounter CoP it is better to transform it to CoN
Degree Matters
CoP in test data example
User.find(:first)
CoM - Connescence of Meaning
- when two bits of code have to agree on the meaning of data
When you encounter CoM it is better to transform it to CoN
Contranesence is when things have to change opposite to each other
- for example, collision of class names in two different modules
- solution is to use namespaces
Another Example?
- do not monkeypatch unless you have to, and if so use namespaces
Connascence of Algorithm
- Two methods that do different things, but that are bound together by algorithm. For example, two different bits of code in two different languages that have to talk to each other. JavaScript client, Ruby server is good example.
CoA -> CoN
- also known as DRY
CoT - Connascence of Timing
- for example, a race condition
Summary
- Connascence is the 'quark' of software design
- Not really any tools to analyze code
- Seems like there is a relation between connascence and design patterns
Wow! Jim had taken us all the way from subatomic particles, to a start towards a unified theory of software design, and tied it all together nicely. And made it fun! It was a tremendous cap on an excellent conference, and we all had really appreciated Jim's contribution.
Labels:
keynote,
larubyconf,
larubyconf2009,
los angeles rubyconf
Tuesday, April 07, 2009
LARubyConf 2009 - Blake Mizerany - "Sinatra: the Ultimate Rack Citizen"
I was very happy when the next presenter at the Los Angeles Ruby Conference 2009 (LARubyConf) was Blake Mizerany, creator of the very cool Ruby micro-framework Sinatra. As long-time readers of this blog know, I am very into Sinatra.
There has been an incredible amount of work going into Sinatra lately, so I was very interested to catch up on what the team has been up to.
What is Sinatra? A Ruby Domain Specific Language (DSL) Mapping REST to simple actions
Why?
- small
- fast
- great rack and ruby citizen
- strong focus on HTTP
- HTTP caching helpers built in before it was cool
- content negotiation
- no boilerplate
- dead simple config when the default are not enough
- smart configuration
- DOCS- sinatrarb.com
- extending is easy
- rack is the only dependency
- very low WTF to LOC ratio (jeremy mcnally's rubyfringe talk)
when?
- a few controllers models and views
- starting any web application
- you need reusable apps and/or middleware and/or resources
- you need speed
who?
- heroku
- github
- taps
- integrity
sinatra in your gems
- a mini-github for offline repo browsing
- a local plugin and play wiki
- memcached utilization graphs
- config reusable github hook
Example: NotTwitter
As classic Sinatra
Change
to
But I want to deploy to Passenger or Heroku! No problem.
./bin/install-not-twitter
Copy example config.ru to cwd
Copy .gems file
.ru is a standard Rack config file.
.gems is a Heruku configuaration file that will handle any needed Ruby gems installations
3 Awesome Features in Sinatra
pass - I cannot handle this request, try the next route
forward - sinatra as middle ware... done my job, let the next app take over... pop in front of rails metal
use - Sinatra loves rack so much, we made sure not to hide it
Resources
http://sinatrarb.com
http://github.com/rack/rack
http://github.com/rack/rack-contrib
http://github.com/rtomayko/rack-cache
If you are doing everything with Rails, you are probably using too much for the job. Sinatra is simple, fast, and extensible. I am using it in two production applications right now, along with Rails. Sinatra handles parts of the application better than how Rails does, so that is how I roll.
Especially with the ever increasing momentum behind Rack, Sinatra is a good bet for getting things done. Combined with Rails Metal, and you really have it all.
There has been an incredible amount of work going into Sinatra lately, so I was very interested to catch up on what the team has been up to.
What is Sinatra? A Ruby Domain Specific Language (DSL) Mapping REST to simple actions
Why?
- small
- fast
- great rack and ruby citizen
- strong focus on HTTP
- HTTP caching helpers built in before it was cool
- content negotiation
- no boilerplate
- dead simple config when the default are not enough
- smart configuration
- DOCS- sinatrarb.com
- extending is easy
- rack is the only dependency
- very low WTF to LOC ratio (jeremy mcnally's rubyfringe talk)
when?
- a few controllers models and views
- starting any web application
- you need reusable apps and/or middleware and/or resources
- you need speed
who?
- heroku
- github
- taps
- integrity
sinatra in your gems
- a mini-github for offline repo browsing
- a local plugin and play wiki
- memcached utilization graphs
- config reusable github hook
Example: NotTwitter
As classic Sinatra
set :username,
Proc.new { fail "yo"}
get '/' do
...
end
Change
require 'sinatra'
to
require 'sinatra/base'
But I want to deploy to Passenger or Heroku! No problem.
./bin/install-not-twitter
Copy example config.ru to cwd
Copy .gems file
.ru is a standard Rack config file.
.gems is a Heruku configuaration file that will handle any needed Ruby gems installations
git init && git add .
git commit
heroku craete
git push heku aster
heroku
3 Awesome Features in Sinatra
pass - I cannot handle this request, try the next route
forward - sinatra as middle ware... done my job, let the next app take over... pop in front of rails metal
use - Sinatra loves rack so much, we made sure not to hide it
Resources
http://sinatrarb.com
http://github.com/rack/rack
http://github.com/rack/rack-contrib
http://github.com/rtomayko/rack-cache
If you are doing everything with Rails, you are probably using too much for the job. Sinatra is simple, fast, and extensible. I am using it in two production applications right now, along with Rails. Sinatra handles parts of the application better than how Rails does, so that is how I roll.
Especially with the ever increasing momentum behind Rack, Sinatra is a good bet for getting things done. Combined with Rails Metal, and you really have it all.
Labels:
larubyconf,
larubyconf2009,
los angeles rubyconf,
ruby,
sinatra
Sunday, April 05, 2009
LARubyConf 2009 - Danny Blitz - "Herding Tigers: Software Development and the Art of War"
I had no idea what I was about to experience at Los Angeles Ruby Conference 2009 (LARubyConf) when Danny Blitz took the podium as the next presenter. I had seen him hanging out with his distinctive pompadour, tattoos, and leather jacket. He is a big guy, and hard to miss. But he had been pretty quiet till then, which was about to change radically.
Herding Cats is a term commonly used when describing the management of software teams. But when Danny Blitz says cats, he means big cats aka tigers. So who is this guy? He has done TONS of stuff, from DOD to Dell, to the DARPA autonomous vehicle challenge. Very cool stuff.
Get Agility?
"A good plan violently executed now is better than a perfect plan executed next week" - Patton
Q. Why is software so difficult?
A. We don't want to face the truth
Q. Why don't we want to face the truth?
A. We're afraid
Q. What are we afraid of?
A. We're afraid we do not know anything about end result
Q. How can we deal with this?
A. Admit the truth
A tiger team is a small self improving team.
What can you expect from a tiger team?
Their first project was scheduled to take 5 weeks - took 5 days
TIGERS ARE A TEAM!
QA is part of tiger team
Tigers show leadership
Tigers self-improve
Almost no meetings on a tiger team
QA and test automation are the tip of the spear
QA should be there from very beginning
Shared psychology and intelligence
Winning, boldness, excellence
Not afraid of the dark
Who is on team?
- all staff needed to deliver product
- leader, 4 devs, 1 automation engineer, 1 Q, product staff m,ember
- in addition, architecture, system admins, any other support staff
why warfare?
- business is battle
There are two kinds of warfare: attrition and maneuver
Attrition warefare
- traditional, tactical
- clashing head-on
Maneuver warfare
- internet space
- rapid modern violent
- unexpected movements
Speed
- it is a competitive weapon
- undeniable advantage in business
Speed mitigates risk
- not a guarantee
- damage is contained by quickly compensating
Speed improves the team
Speed adds to job satisfaction
Speed allows agile to function properly
- max iteration length (usually 30 days)
Speed builds credibility
- shows a lot of work in short order
Cows and tigers
- cow is bigger, but who wins?
Disease: using agile terms to describe non-agile project
Corporate animal kingdom
- Tiger
cautious, calculating, looks to win
- Cow
herding
not known to be original
afraid of risk
- Bear
big, usually mellow
awesome battle skills
live and let live attitude
- Leopard
truly wild
will attack at any time
- Elephant
huge and tough
invincible
best to avoid battle
- Hyena
scavenger
steals food
evil
"Tiger teams are like Hell's Programmers" - Danny Blitz
Leadership
this is what makes or breaks
faith
love
hope
success belongs to the team
failure belongs to the leader
buck stops here
fearlessness
listener and learner
protector
outside influences
internally too
team members themselves
US marine management techniques
- manage by end state and intent
- reward failure
- demand to be questoned
- glorify the lower levels of organization
Politeness and professionalism
- that or poison
Agile is not a methodology, it is a mindset, it is inevitable
Danny says he is working on the book called "Herding Tigers". He has also started a blog at herdingtigers.com. All I can say is, he is a very dynamic and exciting speaker. Everyone was captivated, myself included. I'm still not sure how I took these notes.
Rock on, Danny!
Herding Cats is a term commonly used when describing the management of software teams. But when Danny Blitz says cats, he means big cats aka tigers. So who is this guy? He has done TONS of stuff, from DOD to Dell, to the DARPA autonomous vehicle challenge. Very cool stuff.
Get Agility?
"A good plan violently executed now is better than a perfect plan executed next week" - Patton
Q. Why is software so difficult?
A. We don't want to face the truth
Q. Why don't we want to face the truth?
A. We're afraid
Q. What are we afraid of?
A. We're afraid we do not know anything about end result
Q. How can we deal with this?
A. Admit the truth
A tiger team is a small self improving team.
What can you expect from a tiger team?
Their first project was scheduled to take 5 weeks - took 5 days
TIGERS ARE A TEAM!
QA is part of tiger team
Tigers show leadership
Tigers self-improve
Almost no meetings on a tiger team
QA and test automation are the tip of the spear
QA should be there from very beginning
Shared psychology and intelligence
Winning, boldness, excellence
Not afraid of the dark
Who is on team?
- all staff needed to deliver product
- leader, 4 devs, 1 automation engineer, 1 Q, product staff m,ember
- in addition, architecture, system admins, any other support staff
why warfare?
- business is battle
There are two kinds of warfare: attrition and maneuver
Attrition warefare
- traditional, tactical
- clashing head-on
Maneuver warfare
- internet space
- rapid modern violent
- unexpected movements
Speed
- it is a competitive weapon
- undeniable advantage in business
Speed mitigates risk
- not a guarantee
- damage is contained by quickly compensating
Speed improves the team
Speed adds to job satisfaction
Speed allows agile to function properly
- max iteration length (usually 30 days)
Speed builds credibility
- shows a lot of work in short order
Cows and tigers
- cow is bigger, but who wins?
Disease: using agile terms to describe non-agile project
Corporate animal kingdom
- Tiger
cautious, calculating, looks to win
- Cow
herding
not known to be original
afraid of risk
- Bear
big, usually mellow
awesome battle skills
live and let live attitude
- Leopard
truly wild
will attack at any time
- Elephant
huge and tough
invincible
best to avoid battle
- Hyena
scavenger
steals food
evil
"Tiger teams are like Hell's Programmers" - Danny Blitz
Leadership
this is what makes or breaks
faith
love
hope
success belongs to the team
failure belongs to the leader
buck stops here
fearlessness
listener and learner
protector
outside influences
internally too
team members themselves
US marine management techniques
- manage by end state and intent
- reward failure
- demand to be questoned
- glorify the lower levels of organization
Politeness and professionalism
- that or poison
Agile is not a methodology, it is a mindset, it is inevitable
Danny says he is working on the book called "Herding Tigers". He has also started a blog at herdingtigers.com. All I can say is, he is a very dynamic and exciting speaker. Everyone was captivated, myself included. I'm still not sure how I took these notes.
Rock on, Danny!
LARubyConf 2009 - Jeremy Evans - "Sequel"
The next session at the 2009 Los Angeles Ruby Conference (LARubyConf) was Jeremy Evans presenting Sequel, which is a very powerful database toolkit for Ruby.
Ruby originally had adapters for each database. The problem was that each was very database specific. This was a problem due to both SQL differences, as well as API differences.
no behavior
1997 - ruby-postgres was first created.
2000 - DBI
2004 - Active Record
Although AR made things easier, it had strong opinions. These opinions did not always map perfectly to any particular database.
2007 - Sequel
Completely DB independent API.
Example is concatanating strings, which requires a completely different syntax in each flavor of SQL database.
Concise
Optional Behavior
Opinions?
Ruby should be like clay in a child's hands - Matz
Sequel advantages:
- Simple - as possible but no simpler
- Flexible - opinions, not dogma
- Powerful
- Lightweight - 1/2 memory usage as active record
- Well maintained
- Easy to Contribute
- Easy to Understand
- More Fun
Show me the *** code!
Transactions
SQL Loggers
Each DB has its own connection pool
Sequel is a functional API, where object methods return copies of themselves.
.select - while columns
.filter
.order
This means you can easily chain function calls, like jQuery. Awesome!
Sequel represents its internal objects using SQL's own internal representations
Sequel has 'core' and 'model'
Hooks & Validations - got 'em
Sequel it built entirely out of plugins. That sounds interesting, but experience with DataMapper has shown me that too many plugins may not be a good thing. However, I do not have any direct experience with Sequel yet, so this may be a non-issue.
13 - # of database adapters that Sequel supports today
Database graphing
Everything was going so well up to this point. However, Jeremy then tried to do his demo on Windows, just to show that if you are one of the poor souls using Windows, it can still work for you. He failed to account for the quirkiness of conference display adapters, and what that can do to a machine. Oh well, no demo.
That said, I was really impressed by what I heard about Sequel. I think I will have to try it out on something, just to see how it does.
Ruby originally had adapters for each database. The problem was that each was very database specific. This was a problem due to both SQL differences, as well as API differences.
no behavior
1997 - ruby-postgres was first created.
2000 - DBI
2004 - Active Record
Although AR made things easier, it had strong opinions. These opinions did not always map perfectly to any particular database.
2007 - Sequel
Completely DB independent API.
Example is concatanating strings, which requires a completely different syntax in each flavor of SQL database.
Concise
Optional Behavior
Opinions?
Ruby should be like clay in a child's hands - Matz
Sequel advantages:
- Simple - as possible but no simpler
- Flexible - opinions, not dogma
- Powerful
- Lightweight - 1/2 memory usage as active record
- Well maintained
- Easy to Contribute
- Easy to Understand
- More Fun
Show me the *** code!
require 'seq'
DB = Sequal.sqlite('larun')
DB[:attendees].count
# => 1
DB[:attendees].first
# => {:name ='', :address =>}
Transactions
DB.trans do
DB[:entry],insert(:account_id => 1)
...
end
SQL Loggers
DB.loggers << Logger.new($stdout)
Each DB has its own connection pool
DB[:table].all # or .each
.update(:column => 'value)
.delete
DB[:table] # this is a dataset... like query cursor
Sequel is a functional API, where object methods return copies of themselves.
.select - while columns
.filter
.order
This means you can easily chain function calls, like jQuery. Awesome!
Sequel represents its internal objects using SQL's own internal representations
Sequel has 'core' and 'model'
class Attendee < Sequel::Model
many_to_one
one_to_many
end
Hooks & Validations - got 'em
Sequel it built entirely out of plugins. That sounds interesting, but experience with DataMapper has shown me that too many plugins may not be a good thing. However, I do not have any direct experience with Sequel yet, so this may be a non-issue.
13 - # of database adapters that Sequel supports today
Database graphing
Everything was going so well up to this point. However, Jeremy then tried to do his demo on Windows, just to show that if you are one of the poor souls using Windows, it can still work for you. He failed to account for the quirkiness of conference display adapters, and what that can do to a machine. Oh well, no demo.
That said, I was really impressed by what I heard about Sequel. I think I will have to try it out on something, just to see how it does.
Labels:
larubyconf,
larubyconf2009,
los angeles rubyconf,
ruby,
sequel
LARubyConf 2009 - Aaron Patterson - "Journey Thru A Pointy Forest, or You Suck At XML"
The second presentation of the day at Los Angeles Ruby Conference 2009 (LARubyConf) was Aaron Patterson, XML maniac. I had a run at hardcore XML/XSL a few years back, and it has been a while since I walked the razor's edge of the angle bracket. But Aaron is not just an aficionado, he is genuinely obsessed. Given that he is the maintainer of the Nokogiri and Mechanize gems, this makes me happy.
He covered four areas related to XML:
- XML Processing
- HTML Processing
- Data Extraction
- HTML Correction
The XML Processing section was as thorough a synopsis of XML as one could possible fit into just a few minutes. He went over the four main XML processing styles:
- SAX
- Push
- Pull
- DOM
SAX parsers are fast, and low on memory use. However, searching is hard, doc handlers are verbose, and programmer expense high.
Push Parsing works the same as SAX, the difference is the programmer controls document IO. Has low memory use, fast, fine control over IO.
Pull Parsers are handed XML, and yield a node object. They work like cursors, moving thru the document, so you only get one chance to process data without starting over from the beginning again.
DOM Interface is what most programmers are familiar with. Given XML, they build an in-memory tree. They can then be easily searched using XPath. DOM parsers provide easy data extraction, are programmer friendly, but have high memory use, and you pay a serious speed penalty.
HTML Processing is just like XML parsing, but it limited to the HTML DOM.
Data Extraction in XML can be done two different ways:
- CSS selectors
- XPath queries
XPath basics:
Here is an example of a problem for parsers that support either CSS and XPath selector as parameter, like Hpricot:
The problem is that it is both valid XPath AND CSS. Nokugiri has separate methods for searching CSS or Xpath, so as to avoid this problem.
XML Namespaces use URL's to remain globally unique, to avoid collisions between XML formats taht are different, but use the same node name. Here is an important point: XML Namespaces are as important as tag names.
HTML Correction is taking some invalid HTML, and "fixing" it. For example, making sure that all tags are properly nested.
Aaron wrote a tool called tree_diff, that compares XML trees, cause "they are interesting". With this tool he was able to process many HTML files with multiple HTML correctors/parsers, then compare the results to see if they matched. In many cases, they did not!
Fonts are hard
Attributes are harder
29% of the time it works all of the time
Seems like after all that, I will never use anything but Nokogiri for XML parsing again!
He covered four areas related to XML:
- XML Processing
- HTML Processing
- Data Extraction
- HTML Correction
The XML Processing section was as thorough a synopsis of XML as one could possible fit into just a few minutes. He went over the four main XML processing styles:
- SAX
- Push
- Pull
- DOM
SAX parsers are fast, and low on memory use. However, searching is hard, doc handlers are verbose, and programmer expense high.
Push Parsing works the same as SAX, the difference is the programmer controls document IO. Has low memory use, fast, fine control over IO.
Pull Parsers are handed XML, and yield a node object. They work like cursors, moving thru the document, so you only get one chance to process data without starting over from the beginning again.
DOM Interface is what most programmers are familiar with. Given XML, they build an in-memory tree. They can then be easily searched using XPath. DOM parsers provide easy data extraction, are programmer friendly, but have high memory use, and you pay a serious speed penalty.
HTML Processing is just like XML parsing, but it limited to the HTML DOM.
Data Extraction in XML can be done two different ways:
- CSS selectors
- XPath queries
XPath basics:
//foo <!-- start at absolute root -->
.//foo <!-- start a relative root -->
//foo[@bar] <!-- has bar attribute -->
//foo[@bar = 'baz'] <!-- has bar attribute with a value of 'baz' -->
Here is an example of a problem for parsers that support either CSS and XPath selector as parameter, like Hpricot:
p[b]
The problem is that it is both valid XPath AND CSS. Nokugiri has separate methods for searching CSS or Xpath, so as to avoid this problem.
XML Namespaces use URL's to remain globally unique, to avoid collisions between XML formats taht are different, but use the same node name. Here is an important point: XML Namespaces are as important as tag names.
HTML Correction is taking some invalid HTML, and "fixing" it. For example, making sure that all tags are properly nested.
Aaron wrote a tool called tree_diff, that compares XML trees, cause "they are interesting". With this tool he was able to process many HTML files with multiple HTML correctors/parsers, then compare the results to see if they matched. In many cases, they did not!
Fonts are hard
Attributes are harder
29% of the time it works all of the time
Seems like after all that, I will never use anything but Nokogiri for XML parsing again!
Labels:
larubyconf,
larubyconf2009,
los angeles rubyconf,
ruby,
xml
LARubyConf 2009 - Dan Yoder - "Resource Oriented Architectures and Why It Matters"
Lead-off man Dan Yoder started off the day's proceedings at the Los Angeles Ruby Conference (LARubyConf) 2009, with a presentation on Ruby Waves called "Resource Oriented Architectures and Why It Matters". Despite not getting the same attention that some Ruby frameworks have, the Waves team has been tirelessly working on it. According to Dan, the foundation of Waves has gotten pretty solid. Waves adds a lot of support for things over and above just handling http requests. So what is Waves really? It is a layer on top of Rack for defining application frameworks.
The next thing beyond MVC is to help developers write more rest compliant apps.
But do the constraints in REST really buy anything? Actually, yes.
One nice thing about internet-based development, is that the existing infrastructure is already there like proxies, load balancers etc.
But why does it work? At the heart are the constraints.
The web is NOT MVC
- so why do we use it so often for web apps
- piggybacking off of the web browser
Example of busting out of the browser - RSS feeds from blogs and podcasts
OAuth SMART Proxies
Video Search
- edge caching
Resource Oriented Architecture (ROA) is just distributed objects, loosely based on Roy Fielding's definition
ROA solves an old problem, that there have been many attempts at solving previously with CORBA, COM, etc. But this time will be different.
Learning From Past Mistakes
- be platform neutral
- be wire neutral (any protocol)
- define meta-object protocols
- good performance, use edge and client caching
- allow layered architectures
Waves and ROA
Rich DSL for HTTP Requests
But it is still Ruby!
The One File Waves App
- influenced by Sinatra
- not quite as clean as Sinatra
Roadmap
A Resource DSL Example
What's with that "schema" block? This example also defines the RDF schema for the resource to provide machine-discoverability. That is one very cool aspect of ROA that I personally have not seen addressed much within the Ruby community.
Waves is really coming along, and I am planning to explore it a bit in the coming weeks. For more info, go check out http://rubywaves.com
The next thing beyond MVC is to help developers write more rest compliant apps.
But do the constraints in REST really buy anything? Actually, yes.
One nice thing about internet-based development, is that the existing infrastructure is already there like proxies, load balancers etc.
But why does it work? At the heart are the constraints.
The web is NOT MVC
- so why do we use it so often for web apps
- piggybacking off of the web browser
Example of busting out of the browser - RSS feeds from blogs and podcasts
OAuth SMART Proxies
Video Search
- edge caching
Resource Oriented Architecture (ROA) is just distributed objects, loosely based on Roy Fielding's definition
ROA solves an old problem, that there have been many attempts at solving previously with CORBA, COM, etc. But this time will be different.
Learning From Past Mistakes
- be platform neutral
- be wire neutral (any protocol)
- define meta-object protocols
- good performance, use edge and client caching
- allow layered architectures
Waves and ROA
Rich DSL for HTTP Requests
on (:get, ['location'],
:query => {:lat => /\d{4}/, :long => /\d{4}/},
:accept => [:json, :xml])
But it is still Ruby!
The One File Waves App
- influenced by Sinatra
- not quite as clean as Sinatra
Roadmap
A Resource DSL Example
class Blog
include Waves::Resource::Server
resource :list, :expires => 3.days, ['blogs'] do
get { model.find_all}
end
...
schema :element, ['schema', 'blog', '2009-03'] do
attributes :title, String, :descriptions => String
link :entries, :list => Story
end
...
end
What's with that "schema" block? This example also defines the RDF schema for the resource to provide machine-discoverability. That is one very cool aspect of ROA that I personally have not seen addressed much within the Ruby community.
Waves is really coming along, and I am planning to explore it a bit in the coming weeks. For more info, go check out http://rubywaves.com
Labels:
larubyconf,
larubyconf2009,
los angeles rubyconf,
ruby waves
LARubyConf 2009 Was A Big Success
Yesterday was the first ever Los Angeles Ruby Conference. Despite being located a bit out of the way, down in Tustin, the venue was actually completely amazing. Called the Marconi Automotive Museum, the place was like "Robin Master's garage" quipped one attendee, being that it was FULL of Ferrari's and other highly valuable and hot sports cars.
Thanks to the tireless efforts of Coby Randquist and JR Fent, along with a host of others, this first conference was a tremendous success. There was an incredible lineup of speakers, with something for everyone. All of us who attended were really impressed by the quality of the event. There was even one guy who came all the way from Boston (this is great time of year to visit California from the east coast, people). After a short introduction, the program was off and running.
The sessions were:
Dan Yoder - "Resource Oriented Architectures and Why It Matters"
Aaron Patterson - "Journey Thru A Pointy Forest, or You Suck At XML"
Jeremy Evans - "Sequel"
Danny Blitz - "Herding Tigers - Software Development and the Art of War"
Wolfram Arnold - "Scaling 'most popular' lists: a plugin solution"
Blake Mizerany - "Sinatra: The Ultimate Rack Citizen"
Michael Fairchild & Ari Lerner - "Poolparty.rb"
Bill Lapcevic - "Managing Ruby on Rails for High Performance"
Ron Evans & Damen Evans - "Flying Robot: Unmanned Aerial Vehicles using Ruby and Arduino"
John Barnette & Aaron Patterson - "Johnson"
Pradeep Elankumaran - "Fast and Scalable Front/Back-end Services using Ruby, Rails, and XMPP"
Brendan Lim - "Mobilize Your Rails Application"
Adam Blum - "Rhodes Framework for Mobile Client Development"
Jim Weirich - Keynote speech - "The Grand Unified Theory of Software Development"
I took copious notes, and so I will be posting separately for each session, to avoid a massive blob post. The sessions were quite excellent, our demo of flying_robot was really well received, and Jim Weirich's keynote was by turns funny and thought provoking.
Thank you to everyone who participated by organizing, presenting, and/or attending LARubyConf. The 110 or so people there really appreciated it! I had a great time, learned a lot, met some great new people, and got to see some old friends. I really look forward to the next one!
Thanks to the tireless efforts of Coby Randquist and JR Fent, along with a host of others, this first conference was a tremendous success. There was an incredible lineup of speakers, with something for everyone. All of us who attended were really impressed by the quality of the event. There was even one guy who came all the way from Boston (this is great time of year to visit California from the east coast, people). After a short introduction, the program was off and running.
The sessions were:
Dan Yoder - "Resource Oriented Architectures and Why It Matters"
Aaron Patterson - "Journey Thru A Pointy Forest, or You Suck At XML"
Jeremy Evans - "Sequel"
Danny Blitz - "Herding Tigers - Software Development and the Art of War"
Wolfram Arnold - "Scaling 'most popular' lists: a plugin solution"
Blake Mizerany - "Sinatra: The Ultimate Rack Citizen"
Michael Fairchild & Ari Lerner - "Poolparty.rb"
Bill Lapcevic - "Managing Ruby on Rails for High Performance"
Ron Evans & Damen Evans - "Flying Robot: Unmanned Aerial Vehicles using Ruby and Arduino"
John Barnette & Aaron Patterson - "Johnson"
Pradeep Elankumaran - "Fast and Scalable Front/Back-end Services using Ruby, Rails, and XMPP"
Brendan Lim - "Mobilize Your Rails Application"
Adam Blum - "Rhodes Framework for Mobile Client Development"
Jim Weirich - Keynote speech - "The Grand Unified Theory of Software Development"
I took copious notes, and so I will be posting separately for each session, to avoid a massive blob post. The sessions were quite excellent, our demo of flying_robot was really well received, and Jim Weirich's keynote was by turns funny and thought provoking.
Thank you to everyone who participated by organizing, presenting, and/or attending LARubyConf. The 110 or so people there really appreciated it! I had a great time, learned a lot, met some great new people, and got to see some old friends. I really look forward to the next one!
Labels:
larubyconf,
larubyconf2009,
los angeles rubyconf,
ruby
Subscribe to:
Posts (Atom)