This week, our class has been working on our first large scale group Rails project. The premise is that we create a web based ordering system for a restaurant.
So far our group has been meeting a large number of our goals. We forced ourselves to work in small iterations. We are documenting our 'dream' fun adders in pivtotal tracker but focusing on getting the basics done and not over-reaching.
The first day, Monday, our group went to the coffee shop and drew out wireframes for the layout, wrote user stories in pivotal and then designed the database. This has been hugely helpful throughout the whole process. I wasn't sure if taking an entire 'work day' to do layout without any actual coding would be profitable, but I think it made the entire project accessible for all the team members.
On the second day, we mobbed the initial database creation and rails model and controller creation.
Wednesday we tackled the big terrors. Getting the entire database to be done with postgres and pushing to Heroku.
Thursday we worked together, all day, with two people pairing on user authentication while the third teammate worked on special projects. Rolen and George were able to set up see data and got a shopping cart to populate and display. George Rolen and I finished the users. I focused on getting a basic well formatted layout.
I chose to focus on the layout. I have noticed the trend that having a very basic pretty background makes a world of difference in how a team will feel about how a project is going. I am hypothesizing that 'shitting out' something early and easy to edit will allow us to focus on fine tuning the backend without being overly worried about the front end.
The biggest challenge for me so far in understanding rails has been transferring the database to postgres. Many, many times I've shouted 'HOW DOES COMPUTER WORK?!'
I had created rails applications before coming to the program. They were uniformly very, very fragile. I am actually very excited to return to the old projects and now, with a ruby background, understand the things that were total mysteries. Also to mock past me.
It was also very interesting to go back to the Hartl tutorial while we were generating user authentication now that I understand testing. Hartl's focus on testing almost completely derailed my learning from his book - since it rested on being able to install a few gems correctly. Now I have a hard time figuring out if the tutorial has been improved (I followed a rails 3 tutorial, now it's updated to rails 4) or if I am just much better at understanding.
This has been a fun project to work on, and it's nice to feel comfortable with our progress. I'm looking forward to working on the project over the weekend, especially since we are planning to meet up at an indoor playground so our teammates daughters can play and we can at least attempt to code, or at least fellowship :)
I feel like I've been lucky to have classmates who are positive and intelligent, so when groups are announced, I don't have to dread the announcement. So far everyone that I've worked with has a good attitude, which keeps projects from being nightmarish and allows an open exchange of learning.
This week started with getting a surprise project: Clone Wars on Monday afternoon with the requirement to have it finished by Thursday morning and presentable by Thursday afternoon.
The project was working with a team of two other students to take a local business's website, pull out the contents with Nokogiri and Mechanize and then recreate it with Sinatra and a SQLite3 database.
Our group had a few constraints - the largest of which was time. Since we didn't know about the project before Monday, many of us had scheduled other appointments (doctor, mentor, etc) and I, personally, had my mother flying in to Denver. So we really only had two days to complete the project and couldn't work as a group after 5:30.
What I Learned:
Sinatra: I feel like my focus with the project didn't extend to learning much about Sinatra that I didn't already know.
SQL: I learned a lot about translating between SQLite3 and PostGreSQL as a function of pushing our project to Heroku. I worked with one of our teachers, Jorge (https://twitter.com/novohispano) to get the project Heroku ready. We did a LOT of fail, read the logs, google-fu, minor change and then check. A lot of issues came from SQLite3 commands not translating into something that PostGreSQL could use. One critically cool thing we did was creating a rake task for the migration of the information into the database.
HTML/CSS: I learned a LOT about inspecting elements and formatting from this project. We pulled straight html from the website - which was in XHTML… so a lot of what we had to do was clean up the formatting. I also learned to pull color hex codes from Gimp.
What Was the Most Confusing Part that We Hacked Together?:
Am I allowed to say 'All of It'?
How are you Feeling about Writing/Using Feature or Acceptance tests?
Well. At one point I wrote some great tests. But then, with the time constraint of having something that wasn't completely embarrassing deliverable by Thursday, I started rushing ahead without tests.
Boo this developer.
I really enjoyed a presentation by another group of students explaining how they created acceptance tests first thing to make it clear what they wanted to accomplish at the end. I very, very much want to do acceptance testing first on my next project.
If you had another week for Clone Wars, what would you build?
I don't even know if I would build so much as clean up. I like what we created, which was a scraper that could recreate a website - but every part of it needed more love and attention. I would have wanted to clean up with the scraper so that it could be used without a lot of human correction. I would want to add validations and protections on to information going into the database. I would want to build up the testing suit so that it could help in pulling other websites… I would want to delete outdated code that we left in the project… etc etc etc
What was different about working in a three-person group?
This actually wasn't the first project that I worked in a group of three for… but it was the first project without clear step by step directions. Defining objectives as a groups is hard. When I work on my own, or with other people, it's easy to correct errors in judgement. But with three people, it's hard to recognize when you've gone down the wrong path and then correct it.
With a larger group, taking the time to write acceptance tests might really help at the beginning of the project. I'd also like to look into using pivotal tracker or creating github issues to define reasonable expectations… but an acceptance test is a little bit more grounded. In writing the code to create the test, you get an idea of how large your expectations are.
That said, I was super impressed by my group. We kept our spirits up really high and it ended up being very fun to work with my teammates :)
This past week, we finished up the Idea Box Project (Individual Sinatra Application) and went on a full day code retreat.
As far as working on IdeaBox, I found it pretty refreshing to work on my own. I was surprised by things I learned about my own abilities vs what I thought I knew.
1.Negative: I thought I was better at testing.
On my first iteration through IdeaBox (I did two versions) - I tested the whole way. It was awesome. But I hated working with the YAML database and came up against an issue that I couldn't figure out how to solve with the documentation that I could find. So I researched datamapper and recreated the project with it.
I figured I could transfer the testing suite. This was inaccurate.
Lord I wish I had gotten the testing set up though. Testing saves so much time.
2. Positive: I tackled some issues I didn't think I could tackle
I managed to get the first iteration of IdeaBox up on Heroku through many error searches and minimal swears.
I also managed to make the website look acceptable - I wanted to focus on the code behind the website (since I tend to default to trying to pretty something up) so I relegated design of the project to the last day- but I was happy with my last minute visual additions.
If I were to go back and do things differently, I would have asked for help with the testing early on in my second iteration. I think the issue that prevented the tests from functioning was a high level issue, but not something that would have been hard to fix for someone in the know. I just don't understand how to connect tests very well.
I didn't ask for help because I was rushing, and jumping out on a limb by trying datamapper last minute and I didn't want to explain myself (always a sign that you are doing something untoward).
The Code Retreat was awesome.
1. I learned that I teach and work better if I have to write out my directions and thoughts. Bouncing back and forth in silence with a pair was unspeakably fun. And I feel I'm better able to articulate by writing than speaking.
For example - this blog post has more words in it that I the grand total of words I've spoken in class. If I had to guess.
2. I also learned that pairing all day is way, way more exhausting than I thought it was. I acted in a movie trailer once, and the end of the day I was more tired than I had ever or have since been. It's remarkably taxing to pay that much attention, at all times. We don't realize how reparative those daydream breaks are.
3. When I worked with Ben Lewis, he a. showed me how to adjust the text size in my terminal (I kind of knew this) and then b. set global keys for window management. I have used these global keys approximately 300 billion times in the last three days.
I think that's the major benefit in working with more experienced developers - or even just peers - you learn tricks through osmosis.
This week we've been working on two different Sinatra web applications - this represents the first time, other than creating a blog with middleman, that we've been creating something for the web. Obviously, the largest difference in doing this over doing command line projects is the complications involved with understanding routing. The secondary difference is probably formatting for views, but at least personally, I've had experience with static html pages so this isn't too challenging.
Breaking out into the formatting for Sinatra made testing well-nigh impossible for a little while. The biggest compromise that I made coming into these projects from focus week was having to compromise on TDD. Currently with Idea Box, I have unit tests but have not yet been able to create an integration test (other than my own testing by staring at the results of pushing to heroku, and running foreman and rackup).
I LOVE working on individual projects, and I think I made a great deal of progress with being able to work at my own speed. I had the good fortune of getting some help from teammates at crucial time s and then met with my mentor to review my testing strategy last night. She was able to explain exactly what I was testing and show me examples of capybara tests that she is currently fighting in her own work. I recognize that I learn different things from working in groups, but man, working alone is awesome.
That said, I was way more tired at the end of the day from having to keep on myself to tackle challenges. It was very easy to move away from something that was frustrating me. I found that during focus week, when I worked with @wvmitchell and @simontaranto, I had tons of extra 'brain power' at the end of the day because the flow of how we were working kept me from constantly second guessing if I was working on the right thing.
Next week is our first assessment, and the largest week point that I can think of is that I'm a little loose on completing assignments. For example, I am supposed to posting in our class blog and am instead posting in my actual blog. As far as strong points, I think I'm doing pretty well in utilizing the class resources. I've had a great and productive mentoring relationship so far and try not to either overload or underload the teachers with questions. I think I'm making progress in learning, although I'm not sure if that's self evident.
Here's to another week!