Loading ...
Sorry, an error occurred while loading the content.

Realising my mistakes with XP

Expand Messages
  • Psychie Naill
    Hi there, This is a continuation from an earlier post two weeks ago [*From the ground up vs. Top down development] *to which I added some questions. Ron
    Message 1 of 40 , Aug 1, 2006
    • 0 Attachment
      Hi there,


      This is a continuation from an earlier post two weeks ago [*From the ground
      up vs. Top down development] *to which I added some questions. Ron advised
      me to explain my situation a little better.....


      Next time, if you have time, please tell us a bit about how you're
      working now (beyond "seldom" ;->). And do you have anyone near by
      with whom you are sharing this project, and the XP adventure?

      .......Ron Jeffries, July 20th


      .....so that's what this post is all about; what exactly I did and where I
      think I'm going wrong. It may be a little too detailed so please forgive me
      for this. I just thought this may be valuable information for someone like
      me in the future.


      First of all, thank you for being so welcoming and inviting me to share my
      situation properly. My plan in joining the list was to ask questions which
      were as specific as possible, so that I wouldn't take up too much of
      anyone's time. I mainly observed the discussions on the list which seemed to
      be about more important topics than mine so I'm pleasantly surprised and
      delighted you'd be willing to know more.


      Ok here it goes:

      Myself an two friends are trying to start up an IT company. One person has
      been assigned to Hardware (Servers / Networking etc...), one to Software
      (Me) and one to the outside world (i.e. he's our "business face" to do the
      talking, handling customers etc.


      Our first project is to provide the IT infrastructure for a retail outlet.
      This involves writing custom software for Point of Sale, Inventory
      management, Job Dispatching and Reports to analyse the state and growth of
      the business.


      For the Demo, I basically hacked for about a week taking short naps
      whenever I could (the usual programmer stuff) and came out with something
      that looked like it did something similar to what was required. By February
      it looked like we were going to get the deal but we wouldn't know for sure
      till March. I was sick of Hacking code (well I loved the hacking but was
      sick of the lack of structure and amount of bugs it resulted in) so I
      decided it was time for a change. I had a month.


      I do my programming in PHP and the entire system will be written in PHP. I
      somehow came across the Extreme Programming Wiki but can't actually remember
      how (probably to do with the lack of sleep). I read all I could there but it
      seemed to require a prior knowledge of XP, for instance Unit Testing was
      completely alien to me. I grew excited at the thought that there might
      actually be a way to automatically test code, but the Wiki didn't seem to
      confirm this. I then read the ExtremeProgramming.org site from start to
      finish and there I found a link to Ron's XProgramming.com where there was a
      page listing testing frameworks. WooHoo!! It was true! I read around for a
      while and got my head around the process.


      I was considering checking out Ruby on Rails to see what all the hype was
      about. I had read the the speed at which web applications could be developed
      with RoR was amazing. I then came across the cakePHP development framework
      which started as a RoR port to PHP and expanded from there. This is an MVC
      based framework and so it looked like this would add more structure to my
      life. I looked at others but since this was based on RoR I though I'd be
      killing "2 birds with 1 Stone" and learn a bit about the ideas and structure
      behind RoR at the same time, without the need to steer away from PHP. It
      seemed like I could do things much faster this way so I read the manual and
      got ready for the learning curve.


      The recommended testing suite for cakePHP was SimpleTest. I spent another
      while re-familiarising myself with SimpleTest and the related links from the
      website.


      After that, I decided it was time to get into version control as I had
      never used it before. I'm self thought so everything I know I get from
      reading, example code and lately IRC conversation and Podcasts. These lead
      me to subversion and so I read most of the SVN Book. By this time it was
      March and I got the go-ahead from the customer to do the system. Although I
      had read a lot during the month, doing was a different story.


      During the month of waiting I was designing the database whenever I got the
      chance or came up with a new requirement. I was working from some user story
      cards I wrote myself after showing the demo as I had a pretty good idea of
      what the customer wanted after showing him the demo.

      I believe this (i.e. trying to design the database for the entire system
      first) was probably my first mistake. However, I only recently found out
      that the database design evolves with the rest in XP (as was the point of my
      last posts) and so I continued. I finalised the design and went about my new
      XP ways. I went back to the customer, wrote some scenarios on some index
      cards and used these to produce my understanding of what 'User Stories'
      actually are. I wasn't too sure so I spent a while looking for tutorials
      specifically explaining User Stories. I laid them out so that I could
      visualise the system and numbered them all in order of priority. I know that
      they are only supposed to be numbered from 1 to 5 but for now I just
      numbered them in the order I was going to implement the functionality, until
      I knew for sure I was doing things correctly and that the stories were
      valid. I didn't break them down into engineering task either for the same
      reasons.

      This was probably mistake number 2. I had read that XP could be started by
      only applying some of the ideas and I needed to get going asap so I risked
      it.

      I wanted to get to a certain stage of functionality and to get used to all
      of the new methods/tools I had started using. As I hadn't any engineering
      tasks, I couldn't assign them points so instead, in order to try to measure
      my progress per iteration, I recorded on each card how many days it took to
      implement that particular story. These of course would all be high as most
      of what I was doing (e.g. the framework syntax, the unit testing, the story
      cards etc...) was new to me. I also skipped the CRC cards for now as, to be
      honest, I was no OOP expert either so I wanted to learn a bit more to give
      me the confidence to do the cards properly (although now I see that this was
      another mistake as the cards were initially developed as a way to actually
      help in the understanding if OOP, so my logic was backwards). I was
      basically writing unit tests directly from the User Story cards, and then
      writing code from there.


      Since I was using the MVC pattern (so far as it is adopted to PHP of
      course) I naturally came across some obstacles. Testing Models wasn't a
      problem as they dealt with data. However, I couldn't seem to get my head
      around trying to test controllers as these are really supposed to be the
      "glue" between the Model and the View. I then left out these tests and
      decided that I could test the controllers indirectly using Selenium (a web
      based tester from ThoughtWorks). I was doing a particularly complex part of
      the program and writing the selenium tests was seriously slowing me down so
      since deadlines were approaching, I decided to skip them till the
      functionality was finished.

      Yep, another mistake. I later realised that what I would really be doing
      with Selenium was actually Acceptance testing. Incidentally, these tests are
      still to be written and the code for this particular piece of functionality
      needs a complete rewrite. I have since realised how to unit test controllers
      and so will be doing this first in my next iteration.


      My weekly iteration plan was also non-existent due to the fact that I was
      moving so slowly with respect to the scope of the project and the time left
      to the first implementation. I was getting an average of one story coded
      every two days, but needed to do two per day in order to meet the deadline.
      Naturally I cut off the non-essential stories and showed the customer what I
      can only describe as a "demo of progress", i.e. it showed what stage the
      system was at without actually doing all of the work in the background.
      Luckily he had more to add at this stage and if I had gone much further I
      would have had some redundant work. This showed me how important being in
      constant contact with the customer is, however since I was moving so slowly
      I was afraid the customer would lose faith. Even so, not keeping in constant
      was indeed a big mistake. How do you suggest keeping in contact with the
      customer when progress is embarrassingly slow?


      Every time I'd try to do something new I'd go and read a bit more about it
      first so naturally my progress was slow. I also started to look at tool to
      help from a project management point of view. I spent a fair while looking
      into bug/request trackers etc, and have finally settled on Trac, although I
      haven't actually set it up yet. I spent too much time on this but thought if
      I had it up and running I could plan, assign and view the progress of
      non-software related tasks for my two partners as well as myself. This way I
      could maximise the overall flow of work done and give myself the extra drive
      to keep up. It's hard to get a start-up going and work on a project at the
      same time if you like sleeping and eating.


      At present the project is two months overdue as the initial agreement was
      to have the preliminary system in by June 1st. This is not all my fault
      however as the customer is very slow in giving me the stock data for the
      system. I sent him a spreadsheet containing worksheets representing tables
      in the database with the fields I wanted to be filled in, along with some
      sample data to show what I meant. I left out any database association fields
      of course in order to avoid confusion. Naturally, even though I told him not
      to, he added fields he thought were needed and sent them back to me half
      filled in three weeks ago. Along with these he sent me his supplier
      catalogues and asked me to do the data entry myself instead as it's too
      inconvenient for him. He expected to be able to just give me the raw data
      and it would get sucked up into the system as this is what our competition
      was offering to do. I explained how, since our version of the system was so
      customised to his needs (and our competition's system wasn't) that I needed
      the data in a specific way in order for the system to function the way he
      wanted, but ended up agreeing to do as much of the data entry as I could
      myself. Perhaps I will get one of my two partners to do this but I'm worried
      that if the customer can't get it right and he understands everything about
      the attributes of the stock data, then I doubt if one of the guys will be
      more efficient. At least I know the workings of the system so perhaps it
      would be best for me to do so. Another possible mistake???

      The launch date is now September 1st and I'm just finishing the point of
      sale module now. I should have handled things better but in fairness I've
      also been trying to get the legal side of things sorted. Unfortunately I'm
      the kind of person that likes to be involved in all aspects of the project
      so that I can make sure it's being done right, (or at least what I think is
      right). Does anyone else have this problem where you give people jobs to do
      but they never do it the way you told / showed them?


      Perhaps I shouldn't have tried to do so many new things at once but thought
      once the initial learning curves have passed things can only get more
      productive. I probably shouldn't have used valuable time looking into the
      project management tools but as we have other projects in mind which are
      also lacking in progress I thought they'd help in clarifying where we are
      and what we need to focus on. I'm also planning to hire some extra
      developers once some cash starts rolling in and once I gain some XP
      experience. This is another reason why I wanted to get some experience with
      the tools. When introducing new developers to our team I want to be bringing
      them into a well oiled machine rather than a pile of spanners. I can't
      really discuss XP with anyone face to face as the only people I know who
      know what XP is, exist only in cyberspace. In fact, I don't even know any
      real developers, so it makes things even more difficult. So basically, as
      far as the software development life-cycle is concerned, I'm a one man show
      until I get something finished.


      There's my story for now. If anyone has any comments / advice about what I
      have been doing or what I should be doing from now on, they would be greatly
      appreciated. Even writing this post has helped to clarify areas where I was
      going wrong. Hopefully, this will also be of use to someone other than
      myself. Once again, my apologies if this post was too long or if parts
      seemed too bloated with irrelevant information.


      By the way, thanks to all for their help and advice on the last post. And
      thanks to Ron for the links. The range of advice given in the replies would
      cover a good deal of the problems described above, especially on the
      database end, and the only information I gave was that I had started with
      the database design. Therefore, I'm very interested to see what comes out
      from this post.


      Cheers,


      Psychie.


      [Non-text portions of this message have been removed]
    • Psychie Naill
      Cheers Tony, Will do. Psychie. [Non-text portions of this message have been removed]
      Message 40 of 40 , Aug 9, 2006
      • 0 Attachment
        Cheers Tony,

        Will do.

        Psychie.


        [Non-text portions of this message have been removed]
      Your message has been successfully submitted and would be delivered to recipients shortly.