Dienstag, 3. September 2013

Smaller functions and edit multiple elements in a table

Yesterday and today I started making smaller functions in the application  translate_german_words. A consequence of using meaningful names is that you can make a function smaller creating new ones. Also is very helpful understand the different layers of abstraction in your application.
I could see that I was using the same parameter (word) in many new functions, so I changed this functions as methods of the class Word.

So at the moment I was able to see as a natural flow (easier to remember)

Meaningful Names > help making smaller functions > help guessing which function is a method of a class

Trying to make a function smaller I got blocked because there is a big "if" (similar to a case statement), so I'll have to think about it.

Also today I have learning how to edit multiple elements in a table. I should apply this new knowledge in the next task of Voluntary.

Keine Kommentare:

Kommentar veröffentlichen