Posts

Showing posts with the label Software Engineering

Using Kotlin for DTOs instead of Java

Image
Creating DTOs  in Java, you often end up with very verbose code, similar to the following Address data class: public class Address { private String contactName; private String companyName; private String street; private String streetNumber; private String streetAppendix; private String zipCode; private String city; private String country; private String state; private String contactPhone;  public String getContactName() { return contactName; } public void setContactName(final String contactName) { this.contactName = contactName; }          // 90 lines of getter / setter code has been omitted here!   } Studies have shown  that there is a correlation between code size and erroneous code . Hence reducing code size results in concise code which improves readability and understanding of the underlying solution idioms. The following Kotlin data class  with merely 11 lines of code re...

How to update from iOS 7.1 to iOS 8 beta 3

Image
After downloading and unzipping the IPSW iOS 8 beta image, connect the iPhone to your Mac, launch iTunes and click on " Check for Update " holding down the Alt key (Shift key on Windows).