Github user fhueske commented on the pull request:

    https://github.com/apache/flink/pull/1536#issuecomment-174959098
  
    The examples handle inputs differently than most other DataSet programs 
because they use default input data if no input paths are specified. This adds 
complexity which is not present in common programs. 
    
    I agree that reading input is an important aspect of a DataSet program, but 
adding 15 lines for each input to each example seems unnecessary to me.
    
    Extracting code into methods can be good practice, even if a method is only 
called once. Reading code can become a lot easier if it is clear what a method 
does (good method name + comments) because it can hide all little nasty details 
and helps to focus on the relevant parts. 
    The only question is how do we define relevance ;-)
    
    @stefanobaghino, I think this is a good idea. I would keep the parameter 
parsing in the main function of the examples, but only move the code to either 
read a CSV file or get a collection DataSource to a method.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to