Devchat.tv Episode Roundup

Devchat.tv Episode Roundup

Download on the App Store

All Devchat.tv Episode Roundup episodes

  • Ruby’s Percent Functions
    Ruby uses special characters to define certain data types. If you wish to use these characters in your data types, you need to escape them or use percent functions.
    Percent functions are much simpler.
    Download 35.8 MB
    Download (iphone & ipod) 14.7 MB
    0 min
  • Ruby’s Percent Functions
    Ruby uses special characters to define certain data types. If you wish to use these characters in your data types, you need to escape them or use percent functions.
    Percent functions are much simpler.
    Download 35.8 MB
    Download (iphone & ipod) 14.7 MB
    0 min
  • Ruby’s Percent Functions
    Ruby uses special characters to define certain data types. If you wish to use these characters in your data types, you need to escape them or use percent functions.
    Percent functions are much simpler.
    Download 35.8 MB
    Download (iphone & ipod) 14.7 MB
    0 min
  • RC 16 – The DRY Principle (Don’t Repeat Yourself)

    The DRY principle is a guiding principle behind frameworks like Ruby on Rails. It's basic tenet as provided by the Pragmatic Programmers is:

    EVERY PIECE OF KNOWLEDGE MUST HAVE A SINGLE, UNAMBIGUOUS, AUTHORITATIVE REPRESENTATION WITHIN A SYSTEM.

    This basically means that between your database schema, code, architecture, etc. you should only have one representation of each piece of knowledge that applies to your system.


    This goes far beyond your basic avoidance of Copy/Paste Programming. Your code does not have to be identical to be duplicate. For example, you may have code that tells you how to build an address. This may use as business name, address fields, city, state, and zip. You may also have code that builds an address for a user, using the user's name, address fields, city, state, and zip. This is a simple example that shows code duplication.

    But what about mathematical algorithms. Or, an example that I just worked through at work, we're using flash and HTML authentication. Both systems need to be able to authenticate. So, how do we consolidate our code so that authentication knowledge is only managed in one place?

    I've also seen instances where duplicate code is hard to generalize to match all cases. In those circumstances, I ask myself the following questions.

    • Do all of these processes need to be maintained for consistency? Or in other words, if I change class A's behavior, do I need to change class B's behavior?
    • Is this the same process in both cases regardless of dependencies?
    • Is there a case where one process will need to be modified to significantly deviate from the other?
    • Am I creating more work by combining these processes than I would by simply maintaining them as they are?
    • I'm fully aware of that after making my decision, I may not get back to modifying this code, so I have to make the best decision I can. The main concern I have is maintainability.

      If I can maintain things in one place, for example building code generation off of a configuration file that fans out to multiple parts of the system, keeping the implementation details in the config file. (Think about a SOAP WSDL file.) Or if I can build a configuration off of some code implementation. Or I can generate some documentation from the code. I can avoid circumstances where I can break my code in one place by changing it in another.

      That's the true power of the DRY principle.

      Download this Episode

       

      21 min
    • Nested Forms With JQuery
      Ruby on Rails allows you to nest models within a form. Ryan Bates of Railscasts demonstrated how to set up these forms with JavaScript using the Prototype framework, which ships with Rails. In this episode, Charles Max Wood gives a brief overview of how Ryan's code works, and then refactors the JavaScript to use JQuery.
      Ryan Bates demonstrated how to build a form with nested attributes in Ruby on Rails with Prototype. This screencast demonstrates how to refactor that form into usage of jQuery.
      Download 88.4 MB
      Download (iphone & ipod) 40.7 MB
      0 min
    • Nested Forms With JQuery
      Ruby on Rails allows you to nest models within a form. Ryan Bates of Railscasts demonstrated how to set up these forms with JavaScript using the Prototype framework, which ships with Rails. In this episode, Charles Max Wood gives a brief overview of how Ryan's code works, and then refactors the JavaScript to use JQuery.
      Ryan Bates demonstrated how to build a form with nested attributes in Ruby on Rails with Prototype. This screencast demonstrates how to refactor that form into usage of jQuery.
      Download 88.4 MB
      Download (iphone & ipod) 40.7 MB
      0 min
    • Nested Forms With JQuery
      Ruby on Rails allows you to nest models within a form. Ryan Bates of Railscasts demonstrated how to set up these forms with JavaScript using the Prototype framework, which ships with Rails. In this episode, Charles Max Wood gives a brief overview of how Ryan's code works, and then refactors the JavaScript to use JQuery.
      Ryan Bates demonstrated how to build a form with nested attributes in Ruby on Rails with Prototype. This screencast demonstrates how to refactor that form into usage of jQuery.
      Download 88.4 MB
      Download (iphone & ipod) 40.7 MB
      0 min
    • RC 15 – Pair Programming

      This week's episode on pair programming discusses where you might see pair programming, HashRocket's pairing setup, perceived and real disadvantages to pair programming, its advantages, and what it takes to do good pairing.

      Pair programming is usually associated with Extreme Programming. It is sometimes seen as a mentoring practice, but is actually a collaboration practice, not a mentoring practice. This is because both programmers participate equally, not one leading and the other following for long durations. Pair programming is done with 1 computer and 2 programmers. I've never seen it work well with 2 computers and 2 programmers unless one computer was being ignored or under-utilized.

      Obie Fernandez shared HashRocket's pairing setup and much more on his blog. The setup is not cheap. It's envied by many a programmer.

      Some of the disadvantages of pair programming (some of which are only perceived disadvantages) are:

      • It ties up two programmers. It would appear that you're wasting at least one person's time. They programmer not actually programming. The problem with that statement is… which one isn't programming? They both are. They're both doing the same job. And in the end, I've experienced about 1 and a half times the work done in a pair as I or the other programmer could get done on their own.
      • So, doesn't it cost more if two of you only accomplish 1.5x the work? Maybe. The quality of the code produced by pair programming is decidedly higher. This doesn't mean that pairs can't produce bad code, but it usually reduces the chances, which leads to higher productivity later on due to mistakes that were not made. Does this account for the other half of one person's work? Like I said, maybe.
      • It's inconvenient and reduces flexibility. Sometimes it is inconvenient. I really enjoy working on something until it's completed. If I have to switch pairs and tasks, it really bugs me that the other task wasn't finished first. You also have fewer pairs than people, which means fewer tasks being worked on at the same time.
      • The advantages are:

        • Flexibility: If you pair on everything, then you can contribute to anything. This is a huge advantage. My friend and co-worker measures this depth of expertise in buses. “If I get hit by a bus, we lose all of our expertise in X.” Pairing and sharing increases your bus-depth. (I still haven't been able to pair with him.)
        • Code Ownership: If you worked on each piece of the application, then you bear some responsibility when it breaks. If you spread this across the team, problems get solved very quickly.
        • Collaboration Nothing builds team unity like solving problems together. You also get the benefit of gaining your co-workers' expertise when you code with them.
        • Here are a few things that are critical to good pairing:

          • Communication: How many times did Chad Fowler mention communication? If you can't communicate well your intentions either verbally or through code, then you have one guy coding and another watching. This is where you validate at least one of the disadvantages to pair programming.
          • Ability to work together If you can't stand the guy, or stand to sit next to the guy, you can't pair with him. His odor or personality will overwhelm your ability to communicate and concentrate effectively.
          • Skill Level The company I work for has a strong mentality for “We don't hire idiots.” Weeding out the idiots or not hiring under-qualified people really makes the team stronger and pairing easier because you don't have to spend time explaining, you can spend it working.
          • Setup Read Obie's article. He really summed it up best. It's hard to work where it's hard to collaborate.
          • Download this Episode

            22 min
          • RC 14 – Chad Fowler Interview – Part 2

            In this episode, Chad discusses how he broke out of a comfortable job as a forklift operator, which ultimately led to him becoming a programmer.

            He discusses his job, Ruby Central, and the Pragmatic Studio as contributions he makes to the community.

            We also discuss the ebb and flow of passion for programming and how to avoid burnout on the things that we love. He has actually put a ban on himself for travel so he can spend time on the things that are important.

            Chad told me that he espouses the Test Driven Development mindset, Continuous Integration, and Agile or dynamic methodologies. We discuss task automation, Puppet, Chef, etc.

            The important things in software development boil down to quality. If you can automate your common, important tasks and make it easy for the person who needs it to kick off the process on their own.

            Chad also had some great suggestions for new developers. First, read code. Second, write tests for the areas of code that don't have tests. This will force you to refactor the code and make it better.

            To get involved in the community, you can start or organize a conference, create open source projects, help software maintainers meet Ruby 1.9 compatibility issues, join a mailing list, and so much more…

            Download this Episode

            36 min