HOMEWORK 1 REFACTORING AND LEGACY CODE

It was hard but satisfying. But I’m proud to say that I stuck to it this time and wrote all the tests before writing the actual code except for the view and some skeleton methods so it didn’t throw method-not-found errors–basically I had to get it to the point where the tests failed for the right reasons and not because it couldn’t find some method. Then at the very end I wrote the cucumber integration tests for the sad paths. This week’s SaaS homework has been the most elaborate so far. All other users will not see the option at all. This week, we had to add a new feature! Even though I could have knocked out the homework in probably less than half the time without testing, I really liked the practice.

At last I allowed myself to write some actual code, which didn’t take long. Related Posts Week 4: And thus we have legacy homework 1 and 2 last week and this week. It was hard but satisfying. The body of the new article will be a concatenation of the two previous articles. If what I’m doing now will break something else, then I’ll know about it soon enough if I wrote my tests right. That shouldn’t be a surprise because writing the test is always the hardest part for me!

Then I had to write a bunch of unit tests for the model.

Then at the very end I wrote the cucumber integration tests for the sad paths. Related Posts Week 4: This week, we had to add a new feature! And the comments of all previous articles if any will now be comments of this article. I spent a LONG time on this homework. First I wrote the Refactlring integration tests for the happy path only.

SaaS Legacy Homework 2: Lessons Learned · jlc

So all I have to do now is concentrate on writing whatever little bit I’m working on now, instead of trying to keep the entire app in my head and worry about not breaking anything else. That shouldn’t be a surprise because writing the test is always the hardest part for me!

  ARGUMENTATIVE ESSAY TÜRKÇE KONU ANLAT M

The title refactiring author will be from one of the two articles.

Only administrators can merge articles. I really like the idea of my git history telling the story of my code. Twitter Fitter—the tweet generator! I am still very new to Rspec and TestUnit syntax, and spend so long trying to figure out fefactoring how to phrase things.

But this time I played nomework with them in the debugger gem. I tried really hard to keep my git commits small, task based, and meaningful this time, which meant I had to do a few git things I’ve never done before like adding specific lines instead of entire files.

SaaS Legacy Homework 2: Lessons Learned

As the instructors explain in the lectures, after teaching the class for a while, they asked some of the top software companies what one thing they wish graduates of computer science programs would learn before entering the workforce. There’s probably a lot of other things but these are the easy ones that I can remember off the top of my head And if you’re curious about the code I wrote for this week’s homework, it’s up on Github.

homework 1 refactoring and legacy code

The overwhelming answer was “how to work with legacy code”. This week’s SaaS homework has been the most elaborate so far. Last week we were asked to fix a bug in it.

I also feel like testing frees up my brain from worrying about every little bit of my application. The one thing that was SUPER helpful was using the debugger gem and plain old rails console with the –sandbox option while writing the tests, because it helped me figure out exactly how refatcoring get to certain elements in order to test them.

  DISSERTATION JAKOB KREIDL

So even though at first they had no idea how to teach this, they set out to do so in this class. All other users will not see the option at all.

The body of the new article will be a concatenation of the two previous articles. Then I wrote the unit test for the controller. At last I allowed myself to write some actual code, which didn’t take long. So instead of putting all the tests there, I just wrote a few to make sure the controller was asking the model for that information.

If what I’m doing now will break something else, then I’ll know about it soon enough if I wrote my tests right. The hardest part was writing the tests. I’ve used them homdwork previous apps but they always seemed like a mystery to me.

homework 1 refactoring and legacy code

And thus we have legacy homework 1 and 2 last week and this week. And also having the ability to revert any single change without messing anything else up. SaaS Legacy Homework 2: But I’m proud to say that I stuck to it this time and wrote all the tests before writing the actual code except for the view and some skeleton methods so it didn’t throw method-not-found errors–basically I had to get it to the point where the tests failed for the right reasons and not because it couldn’t find some method.

Our feature in a nutshell: