DerekMorrison

On software engineering, .NET, and technology

DevLink Conference - Day 2 Notes

devLink2008Sponsors

The session that made the biggest impression on me from Day 2 was an informal, impromptu talk that was arranged during lunch to demonstrate Test Driven Development (TDD). The premise was that several presenters or prominent developers from the conference were to start a simple, greenfield sample project and use TDD to write code from requirements.

The results were striking (and not in a good way).

The leaders took suggestions from the audience about what kind of app should be developed and simple requirements were gathered. As several volunteer developers took turns typing, there were arguments over difficulties with the environment, over naming guidelines, over Visual Studio add-ins, over testing frameworks, and over code templates. Some of the typists experienced with TDD jumped ahead of the general audience, writing code that they were accustomed to writing without properly explaining themselves. There were arguments from the audience that some of the code was being written without first writing tests and therefore was in violation of TDD.

All in all, it was eye opening for me (having little experience with Test Driven Development) to see several proponents of TDD fall apart in this simple demonstration.

Of course it was not a properly prepared talk. It did not have a focused vision, and there was a lot of informal distracting chatter between the audience and the group of people directing the talk. However, it was still discouraging to be denied the chance of seeing a cohesive demonstration of a practice I've heard quite a lot about.


Day 2

Web Testing

McWherther

  • TestDriven.Net
  • MbUnit row tests (like data driven tests in MSTest).
  • The very precise .NET Stopwatch class used to performance test (dataset loading, etc).
  • Test for 0, 1... N. If things work with 0 and 1, and some N, then they should work for other values (but watch out for large values).
  • May need to run integration, web, slower tests at night because you want tests to run very quickly.
  • Even if your unit tests are hitting the db, that's still ok and at least you're doing testing.
  • Don't show me pictures of and talk about your dog - I don't care.
  • Very expensive. Visual Studio Team System (AKA "Left Kidney") Edition is $5000 for single developer.
  • Web tests, recorder tool
  • Load testing. Mercury tool, other load testing tools?
  • Test 56k connections for time outs, don't assume everyone has broadband.
  • Fiddler. Using to inspect payloads.
  • FireBug has some performance measuring tools, but it's not as comprehensive as Fiddler.
  • Watin (Ruby' Watir for .Net).
  • Watin test recorder. Updates fixed Ajax issues.
  • Setting up Cassini for testing.
  • Wcat (in resource kit for iis 6).
  • Go command line. It'll be cheaper and more powerful.
  • Profiling. Ants profiler.
  • Web testing, load testing, profiling. Understanding these things seems to be concentrated on more maybe, but there could even be more sessions done with it.
  • DotTrace.
  • It's good hearing about the various tools, but doesn't seem to be enough real-world experience behind it.
  • TDD by example, Kent Beck
  • Pragmatic Unit Test with C# and NUnit
  • Behavior Driven Development talk: Tinyurl.com/Mx4p2
  • They keep saying to sneak practices into organizations, as if managers will suddenly notice that code is better and ask "Wow, things are great! What did you change?".
  • I'm getting fatigue from youthful enthusiasm.
  • SiteWalker.

Open Spaces - SOA

  • Kickoff, how to get enterprise to adopt SOA from existing communications code in place
  • Flex doesn't work well with SOAP, so Rest is a better fit?
  • Using SOA to tie disparite systems together.
  • What is SOA is a bad quesstion. More appropriately, what do you want from it. What does your company want from it.
  • It can be soap, rest, remoting. Whatever can work.
  • It's message passing. To create a big interface that will bridge large #s of gaps is not good to focus on.
  • Soa is very ambiguous I'm feeling. It's people dealing with interconnected systems.
  • It's a buzzword that non-technical people in companies can latch onto.
  • Woa - web oriented arch
  • Cloud computing sounds great, but we're still probably far away from having companies trust it.
  • Excel being able to pull data is impressive to business people. They could get this ,it's hard to grasp sharePoint, bam, sitefinity.
  • It's better to show than to tell about.
  • Bof
  • "I ducking hate sharepoint"
  • You can't put Esb in a box
  • Something that maintains a directory of services is valuable
  • Uddi
  • Couple of consultants expressing experience integrating services within companies.
  • Oslo? Does uddi fall away with it?
  • Msft has a roadmap, kinda private, and if they stop talking about something then maybe it's going away.
  • Thomas Erl books. Great resource, big books, but a quick read.
  • New patterns. Maybe driven by ego. But the value of a pattern is that it capitalizes on existing knowledge and experiences.
  • Scott Bellware is becoming House MD
  • Soa in a word
    • Reusability? been promised before
    • Reusability within the enterprise
    • Interop maybe?
    • Integration?
    • Loosely coupled integration?
  • We're not doing anything new, you could still just pass a flat file around, but this is a more open way where you maybe don't have to understand an opaque util that processes that flat file.
  • Noticed that laptops, slides didn't look near as refined and beautiful.
  • Soa has a steeper learning curve because you need to know about several pieces.
  • This is going to be a factor for me layer (integration), so should increase priority of Astoria, restful stuff ... Also, design patterns.
  • It's important to separate components where they can be service oriented.
  • With speaking and writing, even general conversation, explaining ideas elegantly is the key skill. I need to be able to think  clearly, and restrain myself. Can practice this is writing. Keep myself honest by proving my points. I don't think quickly though, so slow down to go  fast.
  • Open spaces help to flesh out ideas from various people. The speaker has to be very, very good to attend a strictly face-forward presentation.

Lunch - TDD demo

  • Start using TDD syntax for tests. Stop always calling things BlahTest.
  • Take out template code and comments (it's noise).
  • Lunch session on TDD was full. Seems to be interest in testing and tdd. Even though we're using statixally types languages, we still need tests (and it's a tool to develop business requirements)
  • Try doing TDD on a refactoring or new feature. Let the design drive me.
  • Was great to see speakers being engaged. Lots of stumbling, arguments over tooling. Good to see them in practice.
  • Are getters and setters evil?
  • The zealots have an aversion to MSTest.
  • Class WhenAllPeopleAreFed
  • Method Are_there_people_to_feed, for example.
  • It take discipline to take small steps and not skipping things.
  • Michael Feathers book was highly recommended.

Service Design

Rayburn

  • Best is the enemy of good. Good enough is by def good enough.
  • Soa is nothing but evolution.
  • Quotes a study that documents the most popular real world benefit of implementing SOA is agility.
  • YAGNI
  • You can't get it right.
  • WF and WCF go together well and Msft will continue to support them. It's a good idea to invest learning in these.
  • WSDL plus address
  • Are open spaces for people who like to talk. Is it more ego driven?
  • It's not RESTful
  • How do WCF and REST work together
  • Use XML namespaces. Many people neglect this.
  • Service methods are not code. Take one parameter that has all parameters bundle, then can add optional parameters.
  • What doesn't matter? New operations and new properties on existing types.
  • Orgs that are just starting to use or create services shouldn't need an ESB. Don't get treatment until you feel pain.
  • How will Astoria change this stuff? I haven't looked at it a lot, but I don't see this as the major problem.
  • Some asks, what if I need to return a million rows? If it's possible and you have enough bandwidth and power, do it. Or consider using an async technique, such as a return address (if doing programmatically) or provide an FTP address, username, and pass that a file will be present at.
  • Oslo.

Closing Keynote

Joe Stagner

  • Today's problems can't be solved with the same thinking that got us into those problems. Einstein.
  • The web is completely broken? No!!
  • Consumer IP traffic should surpass enterprise for the first time in 2008.
  • Last year, my parents did most of their Christmas shopping online.
  • Data centers are the fastest growing energy segment in the US.
  • This is bullshit. He's just talking with his friends in the audience and making stupid jokes. Guy next to me just said, this is awesome, which makes me depressed about the audience.
  • Develop habit of using time better. Pretending like I have less time and try to effectively work 4 days. Focus hardcore. Also, prepare this year for when I have to work in a real environment. Stricter.
  • Msft is the biggest SW company. 78k employees.
  • Question: What is Msft development division doing to reduce complexity and make adopting new techs that are rapidly being produced more palatable?
  • Answer: You don't have to do it, and Mvc
  • Although I don't think his talk was particularly innovative or inspirational, his attitude seems to generally be in the right place with regards to embracing future developments.
  • Makes a joke to not use UpdatePanel. They've apparently had bad experiences with it scaling.
  • When OSS for Msft? "Honestly, I think a lot of people don't get OSS in Msft."
  • A lot of people don't realize that Msft cannot accept legally contributions from OSS contributors. They can't take the risk. Is the risk perceived? Will Msft ever get over this? Not likely.

DevLink Conference - Day 1 Notes

devLink2008Sponsors

Partly because I'm lazy and partly because I came away from the conference disillusioned and disheartened, I haven't posted my notes about DevLink (a .Net conference I went to several weeks back near Nashville, TN) like I did awhile back for the local Ruby conference (the Ruby Hoedown). I know you've been holding your breath for my insightful impressions, so I'm sorry for the delay.

Recently I've toyed with the idea of stepping away from developing in .NET and with Microsoft tools. Sure, there's a lot of good stuff they provide for developers, but the monopoly thing and their clunky reputation starts to grind on you after awhile. However, I'm not sure if that's realistic, and maybe I'm too entrenched. Or maybe not. Ehhh.

Nevertheless, it's nice to be in a development community that you can look up to and that gives you a good feeling inside.

Did I get a good feeling going to DevLink? Certainly not. It was more of a icky, awkward feeling - like walking in on your grandparents making love.

Why? Well it wasn't all bad. There were some good presenters that gave me interesting perspectives. It's just that there were a lot of uninspiring talks too that made me question if I'm in the right place with my career.

But, I'm just an inexperienced douche bag and it was just one conference in one particular place.


Day 1

The highlights of Day 1 were the disappointing keynote that caused a flurry of negative comments on Twitter and several people to abandon it. On a more positive note, there was a well-delivered and knowledgeable talk by .Net Rocks host Richard Campbell about scaling ASP.NET and and a look at a functional language that's being pimped a lot lately by Redmond.

Keynote: Stranger in a Strange Land

Rex Black

  • [The big deal about this presentation was the twitter feedback that was present. People voiced their displeasure. Saw which people were participating on Twitter]
  • What is outsourcing? Outsource developing and/or test. To even multiple companies.
  • Immediately I’m struck by how dense the presentation slides are. Shouldn’t have this much information on slides? Can’t pay attention to what he’s saying (there’s even an animated gif in his slide header!).
  • How did outsourcing arise? The bubble, people sought to reduce costs. Also to take advantage of resources present in a different geographical region. Labor and cost savings. Inability to handle in-house.
  • Unspoken reasons: peer-pressure (everyone’s doing it), and dissatisfaction with in-house business.
  • How to deal with it?
  • Chaos does not scale!
  • Outsourcing greatly increases complexity.
  • Like any complex endeavor, careful planning, organization, and closely managed execution are key.
  • Lifecycle / process choices? I’m agnostic. Just have one, and stick to it (but still think about it).
  • Take quality beyond CMM
  • CMM can be used as a marketing device
  • It does not say much about testing (even a CMM Level 5 org can score low in test maturity!).
  • Plan for and manage project risks. Working with dev teams in certain regions can be influenced by politics (wars).
  • Being there
  • Do you trust people you’ve never met?
  • Do you really hear the whole message when you don’t talk face to face?
  • Conference calls and email work for routine communication
  • But, sometimes only a visit will do
  • Need to adapt to the cultures
  • Conclusions: outsourcing is here to stay. It might be cheaper, but it’s harder and more complex (and thus riskier).

Gathering Business Requirements

Tim Peek

  • Many projects don’t take the time to define requirements enough.
  • Requirements: fill in the details of scope.
  • Very important to define what details are not part of scope.
  • When a new requirement emerges, check to see if it’s in the scope.
  • There are non-functional requirements such as how it looks, aesthetics.
  • There are also false requirements such as vague requirements, opinions, technology decisions (“Let’s use an Oracle database on this project”, “This application needs to run on the intranet.” – why??)
  • Techniques
    • Use cases. “A user does an action and something happens”.
    • Prototypes
    • Requirements development. I ask questions, you talk, I listen. I analyze, ask follow-up questions. I document, ask follow-up questions, we all agree. Can take months, years. Is very hard work.
  • [He emphasized being very stringent and thorough]
  • [Someone asks how you can estimate requirements gathering though, if it can take so much time. His answer was "come see my other talk on so and so".]
  • Techniques for elicitation.
    • One on one interviews
    • Group interviews
    • Questionnaires
    • Prototypes
    • Follow people
  • Validation (make sure requirements from Elicitation are accurate)
  • Consolidate the requirements.
    • Put similar requirements together.
    • Determine if you have a complete picture or if gaps are present.
    • Eliminate requirements that are out of scope.
  • Specification
    • Prioritize
    • Traceability
    • Testability
  • [For me, sounds good in theory, but it just seems nebulous. I would need to be in an environment that values good requirements gathering and physically implements it and has a process to get a feel for what he’s describing. I just can’t relate well enough. It seems too hard to get it right.]
  • [Still too much text in slides.]
  • Make signoff a formal process.
  • Someone asked how to test WinForms or WPF apps at the moment. These are more opaque than HTML testing. Do WinForms and WPF represent inferior ways to dev apps?

Scaling ASP.NET Web Apps

Richard Campbell

  • Scaling means that the page behaves the same as concurrent users increase. The page is consistent as the number of users scale.  We can even sacrifice the performance of a single page to improve consistency for users.
  • IE 7 does 2 requests at same time. FF does 2. http spec specifies 2.  IE 8 will do about 6.
  • Web browser makes a request, then gives back data (TTFB), but the page still has to request CSS, JS, and images (2 simultaneously).
  • Websiteoptimization.com analyzer
  • Latency matters
  • Decomposing the problem. Server compute time, client compute tiem, bandwidth, concurrent connections, latency (http ping time).
  • Performance spreadsheet and formula.
  • Make sure you’re working on the right problem!
  • Consolidating JS and CSS cuts down on round trips.
  • In a perfect world, we should have 4 files: 1 for html, 1 JS, 1 for CSS, and 1 image (using CSS sprites).
  • Server compute time is, in the end, the thing that doesn’t scale and is genuinely a problem (but make sure you’re working on the right problem and not choking on something else).
  • Set cache refresh? Don’t do too often (or else you loose the benefit), but maybe once a day.
  • Everyone has too much content on slides!! No presentation zen that I saw.
  • ASP.NET’s signature problem is memory consumption.
  • ASP.NET comes under load, memory runs out, GC kicks in, asp.net tells IIS to hold all requests, IIS stacks up requests.
  • Everyone wants 100% of everything (uptime, accuracy, scalablity). But you really need to do what’s important to the business (e.g. For a bank, it’s much better to do nothing, than to do a transaction incorrectly).
  • Dell 1950 = 250 req/sec (untuned asp app)
  • It’s important to have communication between development and IT so each one is aware of the other’s world and is respectful.
  • Lots of people are saying they can do a better garabage collection algorithm, but they have yet to prove it. There are very smart people working on this at Msft. It’s easy to criticize decisions made in 2000, 8 years later.
  • Tech politics. When a business is successful, you tend to get cowboys who say they they wan to improve things (aka circumvent the procedure).
  • It’s hard to do good, accurate load testing.
  • Summary
    • Focus on actual user perf problems. What is reality.
    • Start with low hanging fruit.
    • Use methodical perf improvement.
    • At large scale the network is the computer.

Open Space - Distributed Source Control Management

  • Is Svn good enough?
  • What's the compelling reason to move to Git? I just got people off SourceSafe to Svn, and now I have to explain DSCM and branching?
  • A big reason is private commits.
  • Git is great for feature work.
  • Why suddenly have so many people moved to Git? GitHub. The fact that people have moved to RoR means that they're alternative thinkers, so they're already receptive to Git.
  • Bazaar. Friendlier to Windows? Bazaar, Mercurial and Git
  • You can start using Git by using it just like Svn, then slowly introducing branches.
  • Workflows detailed on the Bazaar and Mercurial site.
  • Will eventually Msft get there? You can already do TFS shelves (even though they reside on the server).
  • If you are in an environment that's not receptive to these changes, then you have 2 choices (change your environment or live with it).
  • There seems to be a real danger of people being afraid to commit because they're committing publicly.
  • Is Git a cargo cult?

F#

Ted Neward and Amanda Laucher

  • Don Syme did it. Also did generics. Was made syntax compatible with OCaml.
  • Official post by Somar saying F# was going to be productized.
  • Very sparse designer support for it.
  • Might be useful to learn F# because it's like Erlang?
  • Strongly typed, statically-types, but type inferenced.
  • "Full benefits of C# or Java without all the high ceremony."
  • Room is packed - lots of people interested in functional programming maybe.
  • SETI at home was one of the first large scale exercises in functional computing.
  • Functional unit testing is isolated, simpler.
  • Has both a compiler and interpreter.
  • The "let" F# construct
  • This is a silly talk, unfocused, too much quasi-entertainment and fluff.
  • People seem very dependent on intellisense, or maybe this is just background compilation they're relying on.
  • Very funky syntax.
  • let myfunction x y = (x * x) + y
  • Where x and y are parameters to the function.
  • The idea of tuples. They combine values into packets. Think of them as a row from a table. Where a row can have columns with different types.
  • Because it has to compile to IL, is it a leaky abstraction?
  • One of the dangers of an inferred language is that it can be inferred incorrectly.
  • There's the equal operator, then there's the <- destructive update operator.
  • ' operator
  • This talk is masturbatory.
  • The plan is F# will set on top of Parallel LINQ stuff which will interface with VM and OS to scale across processors.
  • Was mind blowing to see this bizarre syntax.
  • Relation to "yield" keyword in C# (amount other things like delegates and lambdas).

Ruby Hoedown Day 2 Notes

image

Here are the notes I took from day 2 of the Ruby Hoedown conference:

Calling Your Code: Gluing Phone Calls to Ruby

Troy Davis
  • [Troy spoke on how you can use Ruby to write voice applications with phone calls.]
  • Asterisk - open source PBX & telephony platform
  • Adhearsion - Ruby framework that sits on top of Asterisk.
  • Typical flow:  PSTN -> SIP -> Asterisk -> AGI request (Asterisk Gateway Interface) -> Accept call with Adhearsion -> Run call flow
  • Instead of administering the PBX manually, can use Asterisk to administer it in Ruby.
  • There are various TTS (text to speech) engines (some much better than others).
  • [Troy walked through a few live demos using mobile phone. There were problems, but overall it's impressive.]
  • Example apps:
    • Yelpvox - call a #, then get surrounding restaurant information
    • SendSign - real estate flyer information service. If flyer box is empty, call the provided # to get information. Can then go to SendSign.com, enter in the phone # that you called from, and see the homes that you looked for.
    • Frucall - do online comparison shopping by calling a number and entering in a barcode of a product while you're in the store.
  • What you need to get started:
    • Asterisk or FreeSwitch (available in virtual machine format)
    • Text to speech engine
    • SIP provider
    • DIDs (phone numbers)

Ruleby: The Rule Engine for Ruby

Joe Kutner
  • We're used to imperative programming.
  • It's nice, but the programmer should, ideally, understand all of the entire program (which is often impossible with imperative programming).
  • Alternative: rules engines, rules-based paradigm
  • Write rules declaritively, but don't specify how code runs.
  • Ruleby uses a Ruby domain specific language (DSL) to specify rules
  • Uses the Rete algorithm. Good, but exchanges memory for speed (be aware of this).

flog << Test.new

Rick Bradley
  • Flog - continuous integration for code complexity.
  • Evolution of a programmer:
    1. Lamer
    2. Haxor
    3. Cowboy
    4. Embryo (start to notice testing)
    5. Webelo
    6. Poseur (half-heartedly do testing)
    7. Human
    8. Apprentice
    9. Journeyman
  • Test driving code in a greenfield scenario is much more different than testing existing code.
  • Technique: don't change existing code without test covereage.
  • Legacy code = code without tests (Michael Feather's book Working with Legacy Code)
  • [Comments from the audience: This may just unnecessarily confuse the terms "untested code" and "legacy code". What if old code is well tested? Rails 1.0 is well tested, but is still legacy code.]
  • So, for an existing app without tests, where do you start? Very basically, on the outside, pealing away layers.

Archaeopteryx: A Ruby Midi Generator

Giles Bowkett
  • [Presentation starts with live demo of electronic music driven by a Ruby script and edited live in a text editor to change the music's style.]
  • I'm a former DJ.
  • A lot of DJs are using laptops now, which should in theory, make computer geeks popular at parties.
  • Venture capitalism is like the patronage system for artists and is stifling.
  • Programmers are often distracted by shiny toys.
  • Be profitable from the start by being small and cheap.
  • I'm trying to create my own niche market using Archaeopteryx and MIDI controllers for DJ work.
  • This is your brain on music book.
  • I'm going to test my program by running it for 7 days at Burning Man.
  • Good business is the best art. -Warhol
  • [For sure it's an entertaining presentation, but there are too many rat holes and it comes off to me as scatter-brained.]

Lightning Talk: What Can We Learn?

Yahuda Katz
  • Ruby can be used in the "enterprise".
  • While I don't want to use Rhino or Hibernate, we can learn a lot from Java's experiences.
  • Whereas Ralis embraces convention whole-heartedly, Merb has good defaults set on a highly configurable backend.

Keynote: Ghosts of Ruby

David Black
  • The Ruby language did, in fact, exist before Rails.
  • Presently, version 1.8.6 has the highest adoption.
  • 1.8.7 is a strange, present/future 1.8.6 with backported 1.9 features.
  • 1.9.0 is not in widespread use.
  • 1.9 features
    • New Enumerable methods. There are lots.
    • BasicObject - knows nothing, above Kernel in the class heirarchy.
    • New lambda literal constructor
      • -> () { }
      • A way to have blocks with method argument paramter semantics.
      • Ex: -> (a, b=1) { b } is like lambda { |a, b=1| } except that this is kinda invalid because how can you distinguish b=1 from the bitwise or operator.
  • [Points out several things he finds personally peculiary in 1.9]

Ruby Hoedown Day 1 Notes

Here are the notes that I took from day 1 of the Ruby Hoedown conference. I hope I didn't misquote anyone too badly, but these are the points that stuck out to me the most.

Ruby: A Year of Innovation

Jason Seifer and Gregg Pollack

CIMG3640

Above: Jason as "DJ Ango" (in reference to the Django framework)

  • This talk is not 100% Rails (it's a Ruby conference, after all)
  • We'll be talking about several cool Ruby libraries:
  • Rack
    • Framework A --> Rack --> Web application server
    • Serves as an adapter between numerous Ruby frameworks and web servers.
  • Phusion Passenger
    • I needed a blog for my user group.
    • I chose TextDrive for hoster, and it was painful.
    • Switched to DreamHost, but it turned out to be HellHost.
    • Was too slow, needed something more powerful, but wait - it's just a freakin' blog!
    • Phusion Passenger came out (and it's compatible with Rack!) so you can use it with any framework (not just Rails).
  • Github
    • What do you get when you mix SourceForge with Facebook? [Some people from the audience yell] GitHub! [I think one of said people was Chris Wanstrath, a co-creator of GitHub]
    • Features include Hardcore Forking Action!
    • GitHub is more than a year old, but it's adoption has taken off in the past year.
    • Many well-known projects, such as Rails itself, are now hosted there.
    • [I've been hearing so much about Git, it reminds me that I really, really need to get out of my SourceSafe and Subversion habits and try a distributed version control system like Git or Mercurial]
  • Ruby EventMachine
    • Event processing library.
    • Like Twisted for Python, Apache Mina for Java, and Poe for Perl
    • You can do this stuff with threads, but its slow (and potentially deadlock dangerous).
    • Evented Mongrel took EventMachine and applied it to Mongrel, but there's a catch - EventMachine is best for fast requests that aren't long-running.
    • Recently built into Merb.
    • Use like so: deferred_requests["/uploads", "/long_process"]
    • Other alternatives: Thin, Ebb, and Starling.
  • Redmine
    • For awhile, Trac was the only good project management application.
    • Redmine is a project management app written in Rails.
  • Pool Party
    • Cloud EC2 computing made easy.
  • make_resourceful
    • Scaffolds make it easy to generate data access code, but much of the code is duplicated.
    • Helps to eliminate duplicate code from scaffolding.
  • Various screencast series have launched
    • Railscasts
    • Peepcode
    • Pragmatic Programmers screencasts
    • And soon.... EnvyCasts!
  • Hpricot
    • doc = Hpricot.open("www.website.com") and then work on the doc object.
  • Juggernaut
    • Server push with Rails (uses Flash)
  • Praun
    • Ruby PDF generation
  • Capistrano
    • Deployments made easy
  • Ruby Virtual Machines
    • JRuby for the Java VM
    • IronRuby for .Net
  • Skynet
    • Clones Google's map reduce functionality
  • DataFabric
    • Allows DB sharding for scalability
  • merb
    • Everything that Rails isn't
    • Lightweight, JavaScript library agnostic, DB access agnostic, but still with a strong set of defaults
  • Sinatra
    • Very lightweight web app development.
    • Hello world web app in Sinatra:
      require "sinatra"
      get "/" do
          "Hello world
      end

The Future is Now: Leveraging the Cloud with Ruby

Robery Dempsey
  • I'm angry because people say Rails can't scale.
  • What is scalability? The ability to expand gracefully under load.
  • What do you need?
    • Servers
    • Storage
    • Access to other utilities
    • Not have to buy everything up front.
    • Can you do that with Ruby? Of course! ... that's the cloud
  • Other ways other than using cloud computing.
    • High availability cluster. A set of servers that constantly ping each other. If one goes down, then another takes over.
    • Load balancing cluster. A routing mechanism directs traffic to various servers based on load.
    • Grid. A loosely coupled group of servers
  • A Gartner study says that by 2011, startup companies will start buying a significant portion of their infrastructure on demand.
  • Amazon EC2. Neat, but you need to build reliability in yourself. I've had EC2 instances vaporized upon restart. If this is the only copy of your server, you're screwed.
  • There are alternatives to manual Amazon EC2:
    • Morph
      • Uses EC2, but has a custom, rigid deployment mechanism.
      • Doesn't even allow file-level access.
    • RightScale
      • Lots of configuration options.
      • $2,500 setup, $500/month plus Amazon fees.
    • Heroku
      • Free (for now!)
      • Later, will be charged based on... units of work kinda... (it's sketchy)
      • Everything is done in the browser
      • Automatic scaling
      • Work locally, then deploy
    • PoolParty
      • Uses an Ubuntu EC2 AMI (Amazon machine image)
      • Not production ready
    • Scalr
    • ElasticRails
  • So, if you go straight with EC2 yourself, a standard EC2 deployment will cost $432 for a good-sized app.
  • And you have to do a lot of configuration yourself.
  • His suggestion of 3rd party tools (from cheapest to most expensive and scalable):
    1. Morph
    2. Scalr
    3. RightScale
  • There are Ruby libraries to interact with various Amazon services such EC2, S3, SimpleDB, and SQS.
  • [There was a comment from the audience about a problem having mail sent from Amazon serves flagged as spam]
  • [There was another comment wishing that IT department would embrace cloud computing more]

Mock Dialogue: Conversations on Testing and Mocking

Joe O'Brien & Jim Weirich
  • [Acted a scripted simulation of two developers working through difficult testing and mocking scenarios]
  • Concept of a fluent interface. Like in jQuery:
    $('form#login')
    // hide all the labels inside the form with the 'optional' class
    .find('label.optional').hide().end()
    // add a red border to any password fields in the form
    .find('input:password').css('border', '1px solid red').end()
    // add a submit handler to the form
    .submit(function(){
    return confirm('Are you sure you want to submit?');
    });
  • Mentioned Psychology of Builds article. The frequency of build or test runs drop dramatically when builds last longer than 30 seconds.
  • Michael Feathers guidelines for unit tests.
  • [This format of presentation seems to take you along lines of a conversation that I wouldn't necessarily go, but still, the style is differentl]
  • Difference between stubs and mocks: stubs fake objects that can give you data back, mocks are a little more involved.
  • Flexmock and Mocha mock frameworks for Ruby
  • Mocks still need to be supplemented with system tests that test the whole stack.

Ruby Best Practice Patterns

Rein Henrichs
  • Best practices are a current understanding, and they do change.
  • Now, for a little introduction / diversion...
  • The Developers Dilemma - job security decreases as code maintainability increases.
  • So, to guard against this... Unfactoring!
  • Taking well-designed code and purposefully making it obscure to insure job security.
  • "Decomposing" methods. Naming methods incorrectly, even using Pig Latin, or other obfuscation techniques.
  • But seriously, on to the real talk...
  • Composed methods - try keeping methods small.
  • Kent Beck - Smalltalk Best Practices
  • Execution around method pattern
    • How can I ensure 2 things happen? (ex: I want to open a file and ensure that it closes)
    • around_filter in Rails
    • Wrap an object in a block to make sure it has been completely initialized and uninitialized.
    • [The "using" keyword in C#]
  • Sharing objects with multiple lines in a method. Pass variable into an initializer, initialize other temp variables and have them as shared variables within the class.
  • I urge people to look into Ruby libraries or various open source projects for examples of pattern usage. Ask yourself why the writers did something in a certain way.
  • Be aware when code doesn't feel right to you.
  • Code should be fun to write and read.
  • [Comment from David Black about the idea of taste and readability. Some things he's seen that people describe as readable don't seem readable to him. Rein responds that it's a valid point; people have different tastes in music, but still humans can generally agree on what harmony is and what scales we use.]
  • [Another commenter stated that it's important to separate generic patterns from Ruby idioms.]

Lightning Talks

  • PJ Davis
    • Web interface for God system monitoring tool
  • Brian Lyles
    • Test all the fucking time!
    • Become obsessed with testing.
    • I write code to make my specs turn green.
    • Various tools:
      • TestSpec
      • Shoulda
      • Mspec
      • Cucumber
    • Do not imitate the old masters, seek what they sought.
    • Is there every a time when you shouldn't test? Yes, when you're not coding. If it works without tests, it works by accident.
  • Yousseff Mendelsohn
    • "Truthy" gem package for Ruby. Helps to ease confusing true and false evaluations in Ruby.
    • Usage: variable.truthy?
    • Only nil and false are false in Ruby. Really. That's it. Stop looking.
  • Another guy
    • Making charts with Google Charts
    • gchartruby library

Keynote

Chris Wanstrath
  • No slides, I will just read an essay.
  • In the future, Ruby will be more popular.
  • People will wax philosophic about the old days of Smalltalk (when they've never actually done Smalltalk).
  • The suits will come down upon us, but hopefully Ruby will stay good.
  • [His talk is well-written, but quoted Wikipedia too much for my taste, and without visual slides and little content, the majority of it fell flat on me.]
  • PHP has a ton of helpful methods (aka a shotgun blast of functions in the global namespace).
  • I haven't made a ton of money directly from open source software, but I have gotten a lot of work indirectly from it and through my reputation gained from working on open source.
  • You need to work on a side project.
  • But, you say you don't have the time?
    • Stop reading RSS feeds, and instead rely on aggregation sites or speakers to give you the really important news.
    • Rely on people to filter for you.
  • But what if people don't like it, it's already been done, or it's stupid??
  • Forget it, just do a side project that you love.

Ruby Hoedown Impressions

banner

Last weekend, I attended The Ruby Hoedown conference here in Huntsville. As a mostly .Net developer, it was refreshing going to a conference where material and ideas were presented outside of my normal habits. I've been tinkering with Ruby and Ruby on Rails for awhile now, and when I saw the conference advertised and the line-up of speakers having a couple writers and podcasters that I've been paying attention to on the fringe lately, I signed up (even though work didn't buy my excuse that a Ruby conference would contribute to my .Net skills, I still decided to sign up on my own and take a vacation day).

Overall, the presentations were very exciting from what I'm used to at software conferences or meetings, and were formed from a mix of humorous images (including Chuck Norris and various internet memes), illustrative diagrams, and even screencasts of coding embedded in the presentations.

The highlight for me was seeing the guys from the Rails Envy podcast deliver the opening keynote. Their presentation seemed to have just the right balance of content, delivery, and even entertainment. As well as the podcast, they have also produced a humorous series of parody videos comparing RoR to other web frameworks. As I'm writing this, I see that they've even posted a 10 minute summary video of the Hoedown.

Going sure didn't help my feelings of OS X envy (I've never seen so many geeks brandishing mac laptops), and I definitely feel mainstream now having an iPhone. In short, an unusually stylish and hip-geeky group compared to other conferences I've been too.

On the down side, the conference did seem a little unorganized at times, and there were slight problems with communicating the agenda and delays in presentations. Also, towards the end I felt a little fatigue with how witty the presenters were trying to be, and wished that I could see a little less funny Google image search results try to pass for presentation content.

Also, much of the content wasn't directly relevant to me, but this wasn't a negative, as the purpose of going was to see something different. Even if I only understood 50% of some talks, I'm still learning new keywords, practices, and ideas, and just seeing how everyone is using tools makes me reevaluate how I use various dev tools and even web apps.

These are just some of my general impressions, but I've taken notes from many of the presentations, and I'll be posting those over the next couple of days.

My Current Firefox Extensions

I got a new machine at the office towards the beginning of this week, and I've spent the last few days installing and tweaking software. A lot of settings can be exported and imported with many programs and operating systems these days, so in a certain way having to reconfigure things seems like a waste of time. But recently I've been relying on defaults more and more, and I can also use times like this to re-evaluate what settings and tools I really need.

Maybe I'm becoming old and curmudgeonly, but I'm finding that I don't have the stomach anymore to spend tons of time tweaking and optimizing software settings. I was pleased to find that I've settled on the following Firefox extensions after a few days of heavy use on the new machine:

FirefoxExtensions

(And, actually, I could probably do without FaviconizeTab).

I might end up adding or taking away a few here and there, but I think this is a good sign that I can get up and running with Firefox 3 quickly and that it provides a lot of functionality by default.

As a side note, this reminds me of a Coding Horror post on The Dark Side of Extensions.

X Envy

In this post from VentureBeat, a survey is cited saying that only 8 percent of developers are writing applications for Vista this year. While these claims don't seem very substantial (I'm thinking that a more interesting question is how many developers are writing for .Net and not targeting Vista specifically over Windows XP), the following section nevertheless struck me:

Granted, the 8 percent data is taken from only 380 North American developers surveyed, but over half of them said they were still developing for previous iterations of Windows. Meanwhile, Apple’s OS X has seen a 380 percent surge in growth as a targeted development platform.

It seems for the past couple of years I've been steadily hearing about Mac OS X apps that make me envious. The other day, Andy Ihnatko mentioned one called Fluid on MacBreak Weekly that allows you to create site specific browser applications. As someone who keeps Google Calendar and Gmail tabs open all day, an app that allows me to cleanly separate key web applications into their own space that is integrated well into the OS seems very appealing.

But that's just one example. Here are several other compelling Mac OS X apps that come to mind at this moment:

* Ok, so I cheated a little and these are available for Windows too, but that's part of the point.

Of course it's easier to spout off a bunch of trendy apps than to actually derive value from them on an everyday basis, but I still can't help but feel intrigued by the amount of exciting products coming out for OS X. Looking at the development tools available for the Mac, it doesn't make me very envious (I'm thinking of you, Cocoa and Xcode), but yet there seems to be a vibrant community of Mac OS X focused developers who seem to be skilled in developing sophisticated and well-designed UIs.

I'm not sure where this stems from, and maybe it's just my perspective at the moment, but it still seems like a factor that's coming to the forefront.

And, of course, there are several key applications for Windows that I just couldn't do without such as Visual Studio.... and... maybe Microsoft Office... and... oh yeah, this issue tracking software we use at work, but wait... it has a web-based version...

We're On Google Street View

While I was looking up directions to my house on Google Maps to give to someone, I noticed that I've been indexed by Google Street View. It amazes me that they have the resources to shoot even my little house.

Here it is. Note that it may be a little off (just go North about 9 clicks until you see the blue truck out front on the right).

Maybe Developers Don't Even Know What They Want

While listening to a new podcast the other day, I stumbled up on an old presentation from a Java conference (Javapolis 2005) titled "Perspectives on Agility" by Kevlin Henny. While the talk, in general, contained several interesting points concerning agile development, one point peaked my interest in particular. I get the feeling that it's often said by developers (and I definitely know I'm guilty of this) that the customer doesn't know what they want. More specifically, they don't know what they want until they see it, and by that time, a significant amount of effort might have already been devoted to a project and more work will be needed to correct things. This might be true, and even seems reasonable to accept this as a part of human nature (as agile methods commonly do), but what about developers? Do they exhibit the same behavior to some extent?

In the presentation, Henney suggests that the most capable software engineers that could work on a software project are the ones that have seen it to its completion (or, just as likely, failure). Typical developers are constantly learning about the problem domain and may even significantly adjust their development tools and practices during a project. While the traditional waterfall process is often chided for its naive attitude towards changing requirements (which is ironic considering that in the original paper describing the process it was never called a "waterfall" and the author even warned against using it), I wonder how many times when software is planned changing developer knowledge or habits are taken into account.

When confronted once with a client who rejected "agile" software processes (the client having been burned before by a process describing itself as "agile"), Henney describes successfully re-branding his approach as a "sustainable" process. While he might have gotten some inherent acceptance owing to recent popular environmentalist attitudes, I think "sustainable" is a good term to describe a software development approach that accepts both changing customer requirements and perceptions as well as changing developer knowledge and habits.

Podcast Habits

While listening to the first episode of a new podcast by a pair of my favorite bloggers Jeff Atwood (of Coding Horror fame) and Joel Spolsky (from JoelOnSoftware.com), I heard a discussion about their new developer community site Stack Overflow and its associated podcast. They described the site, but also gave reasons for doing a podcast. This got me to thinking more about why I like listening to podcasts so much and which ones and what types of shows I have gravitated towards listening to since I started listening to them a few years ago.

First, a disclaimer: If you don't like the idea of podcasts/audio books, that's perfectly fine. Some people tend to have an aversion to them and prefer the printed word. That's fine, and you're probably better off for it. Reading's better for you brain anyway, and you can consume information faster by reading than listening to it anyway, or something like that...   So, you can just stop reading now and come back in another 2 months when I write my next post.

Still with me? Here's another disclaimer: I am now sure that I have a weird, geeky, anti-social, possibly unhealthy podcast habit. I can't stop listening to them, all the time. I practically always have my iPhone's earbuds in: at work basically all day (I work on a project by myself and communicate mainly with my client through email), while I'm at the gym, driving by myself (or, if my passengers are particularly uninteresting), while I'm at home doing chores, basically most of the time. I'm writing this listening to a podcast (Armin Van Buuren's State of Trance music podcast). As such, what I'm writing is coming from this perspective of podcastaholism. As soon as it's possible to get decent earphone implants, I'm in. You need the right equipment to make this practical and seamless (read - an all in one pda/phone/media player). I'm still loving the iPhone, and it look like there are plenty of these devices popping up and it's the way things are going. It's truly a geek orgasmic experience to be jogging while listening to a podcast, get a phone call from the Red Cross about setting up a donation, have the audio gently transition from iPod mode to phone mode (as the iPhone so slickly does), make the appointment, then be gently transitioned back to the audio program without skipping a beat.

Enough disclaimers. Here's a few reasons why I love audio programs:

Above all, you can listen to a podcast and still use your eyes. This means you can listen while commuting, while exercising, while working even. For my adult ADHD self, this always multi-tasking behavior is well suited.

I don't get angry in traffic (really, never). In fact, if there's an accident and I'm forced to stand in line an extra 20 or 30 minutes, I'm actually a bit glad for these, what Dale Carnegie called, "gifts of time" and I'm able to listen to more material.

Podcasts make exercising fun. I love exercising now, both because of the runner's high thing, and because I get to listen to a (usually) stimulating audio program while I'm at it.

When I can pair doing chores with listening, it makes them enjoyable. There's nothing like ironing clothes while learning about Sydney's Gay and Lesbian Mardis Gras.

People speak or converse differently than they write. While with good writing you can express a complex thought maybe more elegantly and definitely more concisely than with speech, listening to someone explain something or a group talk about something of interest gives you a better feeling for their personalities and tends to bring out more dynamic, improvised, and somewhat cruder thoughts (like everyday conversation). This can go either way. While there are many delightful, entertaining, and intelligent speakers, I've been unpleasantly surprised several times by how people (John Dvorak, Joel Spolsky, Paul Thurrott come to mind) can be fairly competent writers but stumbled through hours of bad jokes and off topic side conversation that forces me to skip to the next show in my queue.

I'm able to get a very candid and personal impression of various personalities or micro-celebrities. I'm a motorcycle racing fan, and it's very entertaining to hear a mechanic and blogger on one of Ducati's teams speak about his experiences traveling around the globe on the excellent MotoGPod podcast.

I can also hear from professionals closer to my field, such as on the This Week in Django podcast. To hear insightful talk from core Python developers data access and internationalization problems is fascinating. As a developer dealing with bugs everyday, it's particularly fun and a little comforting to hear from prominent developers on a major project deal with nuanced issues and committing fixes to a public source control repository (they discuss specific changesets even!).

I think it can be a good educational tool (if used correctly). Most notably for me, I think it's helped me as I try to learn Russian. It seems important to be exposed to a lot of spoken language if you're trying to learn another tongue to get a halfway-decent pronunciation, and I it has helped me listening and repeating the Pimsleur Russian courses and various podcasts aimed at those learning Russian (although Jamila and my Russian-speaking friends might disagree :).

There are disadvantages I've found. It's anti-social to walk around other people (especially co-workers or your girlfriend) with earbuds in for a very long time while tuning them out. I've had to learn how to politely take the earbuds out and pretend like I'm listening. I still can't decide if it's dangerous to drive with earphones, but this is probably fine judging by how many crazy drivers I see without earphones in or listening to loud crappy music blaring as they barrel down the interstate. Also, I have to be careful of what material I listen to when. It's possible to listen to a dance podcast or two while programming, but if there's a show that is particularly technical or detail oriented, I'd better save that for a jog sometime.

I'm posted a list of the podcasts I listen to here. It's really a .opml (podcast subscription file) but named "podcasts.txt" (because I couldn't get my web server to serve it correctly), so you can rename it as .opml to use with iTunes, etc or just browse through it in plain text if that's not your interest.