Live Notes from The Future of Web Apps Summit Introducing a silver bullet for developers: Motivation. A stronger influence on productivity than any other factor. This should be the focus of development processes, need to enjoy the mundane details of what you do. Motivation comes from happiness, so the tools we use should optimise for happiness. How do you go about making programmers happy about what they do? Coding is usually mundane. Beautiful code makes programmers happy. Feeling good about statements which express what is required in an obvious, pleasing, right way. But, your application is not a unique snowflake. You are not special :-). This is hard to deal with, but most of your work revolves around the same mundane details as everyone else. With Ruby on Rails we have optimised for what most people do the same most of the time. 80% is mundane, 20% is special. Convention over Configuration. Config is a big programming task, which is repetitive and hated. Beautiful code doesn't repeat itself. Example of convention of classes linking to tables which are the plural of the class name (milestone/milestones, project/projects). For the special cases you configure, for the rest you assume the conventions. Example also of the naming of web app controllers mapping to the URL without rewriting urls. Flexibility is overrated. It's a tradeoff with readability and speed of coding. Constraints are liberating - if it's easier to follow conventions you'll build consistent systems and not worry about the irrelevant details. Focus instead on what your app actually does. Do the right thing - the clean, pure, beautiful thing. Hard to do - developers have an angel and a devil on each side of them :-) Too tempting to do things the easy, quick way that you pay for in the future. PHP is the devil :-) Constantly encourages you to do the quick dirty hacks, to be a slob. You can fight it, but it's hard, especially when the pressure's on. The angel is embedded in RoR. Conventions. You have to go out of your way to do things differently. Invitations. Embedded invitations to do better, encouraging good practice. Opportunities. To be better and learn more. Allowing common patterns but showing that there are better ways to do things. Expectations. Embedded in the system and the community. Example of running tests with code. Rollback. Ruby makes database rollback easy through blocks of transactions. Validation and associations embedded in the system, and the reliance on conventions makes the code clean and beautiful; almost like plain text. Association chains. Lists model. Ruby everywhere in RoR because it decreases mental overhead of switching, and allows you to move back and forward. So Ruby for embedding in html, for configuration, for functions. Finding the Fit: You feel the hurt - You need to have reached the limitations, found the lack of structure and consistency, degraded productivity etc. Yoy appreciate the agile - testing, domain models. You can skip the vendor - DHH is not a vendor, you want to help yourself. But does it scale? Yes :-) http://www.rubyonrails.org
Technorati Tags: Conferences, Creativity, Design, Future, futureofwebapps, Internet, Open Source, Software, technology, Web
0 comments:
Post a Comment